@tap-payments/auth-jsconnect 2.8.57-development → 2.8.59-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 (189) hide show
  1. package/build/@types/app.d.ts +0 -1
  2. package/build/@types/form.d.ts +0 -1
  3. package/build/@types/redux.d.ts +0 -1
  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 +2 -0
  11. package/build/features/app/bank/bankStore.d.ts +18 -13
  12. package/build/features/app/bank/bankStore.js +165 -184
  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 +242 -239
  16. package/build/features/app/business/businessStore.d.ts +5 -0
  17. package/build/features/app/business/businessStore.js +88 -77
  18. package/build/features/app/connectExpress/connectExpressStore.d.ts +6 -15
  19. package/build/features/app/connectExpress/connectExpressStore.js +52 -110
  20. package/build/features/app/entity/entityStore.d.ts +36 -20
  21. package/build/features/app/entity/entityStore.js +246 -196
  22. package/build/features/app/individual/individualStore.d.ts +38 -22
  23. package/build/features/app/individual/individualStore.js +266 -263
  24. package/build/features/app/password/passwordStore.d.ts +23 -40
  25. package/build/features/app/password/passwordStore.js +233 -226
  26. package/build/features/app/tax/taxStore.d.ts +7 -13
  27. package/build/features/app/tax/taxStore.js +147 -168
  28. package/build/features/auth/screens/AuthSwitch/AuthSwitch.js +1 -13
  29. package/build/features/auth/screens/BusinessCountry/BusinessCountry.js +1 -7
  30. package/build/features/bank/Bank.d.ts +0 -1
  31. package/build/features/bank/Bank.js +4 -7
  32. package/build/features/bank/screens/BankDetails/BankDetails.js +5 -18
  33. package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
  34. package/build/features/bank/screens/Verify/Verify.js +5 -5
  35. package/build/features/board/Board.js +4 -8
  36. package/build/features/board/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +4 -3
  37. package/build/features/brand/Brand.d.ts +0 -1
  38. package/build/features/brand/Brand.js +4 -7
  39. package/build/features/brand/screens/BrandActivities/BrandActivities.js +12 -49
  40. package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.js +3 -6
  41. package/build/features/brand/screens/BrandActivities/RefundPolicy.js +1 -1
  42. package/build/features/brand/screens/BrandActivities/TAC.js +1 -1
  43. package/build/features/brand/screens/BrandActivities/TransactionPolicy.js +1 -1
  44. package/build/features/brand/screens/BrandInfo/BrandInfo.js +5 -23
  45. package/build/features/brand/screens/BrandSegmentInfo/BrandSegmentInfo.js +7 -23
  46. package/build/features/brand/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
  47. package/build/features/brand/screens/Verify/Verify.js +1 -1
  48. package/build/features/business/Business.js +4 -9
  49. package/build/features/business/screens/Activities/Activities.js +3 -12
  50. package/build/features/business/screens/BusinessType/BusinessType.js +2 -10
  51. package/build/features/business/screens/CivilID/CivilID.js +1 -1
  52. package/build/features/business/screens/Customers/Customers.js +3 -12
  53. package/build/features/business/screens/Customers/ExpectedSalesRange.js +3 -6
  54. package/build/features/business/screens/IDBOD/IDBOD.js +2 -10
  55. package/build/features/business/screens/OTP/OTP.js +1 -1
  56. package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +3 -14
  57. package/build/features/business/screens/Verify/Verify.js +3 -13
  58. package/build/features/connect/Connect.js +2 -3
  59. package/build/features/connect/screens/BrandSegment/BrandSegment.js +1 -1
  60. package/build/features/connect/screens/BusinessCountry/BusinessCountry.js +2 -9
  61. package/build/features/connect/screens/CivilID/CivilID.js +1 -1
  62. package/build/features/connect/screens/Individual/Email.js +1 -3
  63. package/build/features/connect/screens/Individual/Individual.js +1 -1
  64. package/build/features/connect/screens/Merchant/BrandList.js +3 -3
  65. package/build/features/connect/screens/Merchant/Merchant.js +1 -1
  66. package/build/features/connect/screens/Merchant/SalesChannels.js +1 -1
  67. package/build/features/connect/screens/Mobile/Mobile.js +8 -11
  68. package/build/features/connect/screens/NID/NID.js +1 -1
  69. package/build/features/connect/screens/OperatorError/OperatorError.js +1 -1
  70. package/build/features/connectExpress/ConnectExpress.js +1 -2
  71. package/build/features/connectExpress/screens/AuthenticationList/AuthenticationList.js +2 -5
  72. package/build/features/connectExpress/screens/AuthenticationList/EntityList.js +1 -6
  73. package/build/features/connectExpress/screens/AuthenticationList/validation.d.ts +0 -3
  74. package/build/features/connectExpress/screens/AuthenticationList/validation.js +0 -10
  75. package/build/features/connectExpress/screens/BusinessCountry/BusinessCountry.js +1 -7
  76. package/build/features/connectExpress/screens/CivilID/CivilID.js +1 -1
  77. package/build/features/connectExpress/screens/CivilIDMissed/CivilID.js +1 -1
  78. package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.js +1 -1
  79. package/build/features/connectExpress/screens/CollectIndividualInfo/CollectIndividualInfo.js +1 -1
  80. package/build/features/connectExpress/screens/CollectIndividualInfo/Email.js +1 -3
  81. package/build/features/connectExpress/screens/CreateAccountLoader/CreateAccountLoader.js +24 -14
  82. package/build/features/connectExpress/screens/Mobile/Mobile.js +2 -9
  83. package/build/features/connectExpress/screens/NID/NID.js +1 -1
  84. package/build/features/connectExpress/screens/NIDMissed/NID.js +1 -1
  85. package/build/features/connectExpress/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
  86. package/build/features/entity/Entity.d.ts +0 -1
  87. package/build/features/entity/Entity.js +4 -7
  88. package/build/features/entity/screens/EntityCapital/CapitalPaid.js +4 -8
  89. package/build/features/entity/screens/EntityCapital/CapitalShareValue.js +4 -8
  90. package/build/features/entity/screens/EntityCapital/EntityCapital.js +10 -34
  91. package/build/features/entity/screens/EntityName/EntityName.js +15 -32
  92. package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
  93. package/build/features/entity/screens/Verify/Verify.js +1 -1
  94. package/build/features/featuresScreens.js +7 -67
  95. package/build/features/individual/Individual.d.ts +0 -1
  96. package/build/features/individual/Individual.js +4 -7
  97. package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +14 -54
  98. package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +2 -5
  99. package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.js +3 -8
  100. package/build/features/individual/screens/AdditionalIndividualInfo/validation.d.ts +1 -4
  101. package/build/features/individual/screens/AdditionalIndividualInfo/validation.js +2 -3
  102. package/build/features/individual/screens/IndividualList/Email.js +2 -3
  103. package/build/features/individual/screens/IndividualList/IndividualList.js +5 -18
  104. package/build/features/individual/screens/IndividualList/UserList.js +9 -13
  105. package/build/features/individual/screens/IndividualPersonalInfo/Email.js +2 -4
  106. package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.js +20 -76
  107. package/build/features/individual/screens/IndividualPhoneInfo/PhoneInfo.js +1 -1
  108. package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
  109. package/build/features/individual/screens/Verify/Verify.js +1 -1
  110. package/build/features/password/Password.d.ts +0 -1
  111. package/build/features/password/Password.js +28 -75
  112. package/build/features/password/screens/CreatePassword/CreatePassword.js +4 -8
  113. package/build/features/password/screens/OTP/OTP.js +1 -1
  114. package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
  115. package/build/features/password/screens/Verify/Verify.js +5 -5
  116. package/build/features/shared/Button/FlowsButtons.js +3 -13
  117. package/build/features/shared/Containers/FeatureContainer.d.ts +0 -1
  118. package/build/features/shared/Containers/FeatureContainer.js +3 -3
  119. package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.d.ts +2 -5
  120. package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +11 -14
  121. package/build/features/signIn/SignIn.js +3 -12
  122. package/build/features/tax/Tax.d.ts +0 -1
  123. package/build/features/tax/Tax.js +4 -7
  124. package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
  125. package/build/features/tax/screens/TaxDetails/TaxDetails.js +2 -7
  126. package/build/features/tax/screens/Verify/Verify.js +5 -5
  127. package/build/hooks/index.d.ts +0 -1
  128. package/build/hooks/index.js +0 -1
  129. package/build/hooks/useVerifyToken.d.ts +2 -5
  130. package/build/hooks/useVerifyToken.js +5 -10
  131. package/build/utils/common.js +4 -4
  132. package/build/utils/locale.js +1 -2
  133. package/build/utils/string.d.ts +2 -5
  134. package/build/utils/string.js +5 -34
  135. package/package.json +2 -2
  136. package/build/features/bank/screens/OperatorError/OperatorError.d.ts +0 -5
  137. package/build/features/bank/screens/OperatorError/OperatorError.js +0 -9
  138. package/build/features/bank/screens/OperatorError/index.d.ts +0 -3
  139. package/build/features/bank/screens/OperatorError/index.js +0 -2
  140. package/build/features/board/screens/OperatorError/OperatorError.d.ts +0 -5
  141. package/build/features/board/screens/OperatorError/OperatorError.js +0 -9
  142. package/build/features/board/screens/OperatorError/index.d.ts +0 -3
  143. package/build/features/board/screens/OperatorError/index.js +0 -2
  144. package/build/features/brand/screens/OperatorError/OperatorError.d.ts +0 -5
  145. package/build/features/brand/screens/OperatorError/OperatorError.js +0 -9
  146. package/build/features/brand/screens/OperatorError/index.d.ts +0 -3
  147. package/build/features/brand/screens/OperatorError/index.js +0 -2
  148. package/build/features/business/screens/OperatorError/OperatorError.d.ts +0 -5
  149. package/build/features/business/screens/OperatorError/OperatorError.js +0 -9
  150. package/build/features/business/screens/OperatorError/index.d.ts +0 -3
  151. package/build/features/business/screens/OperatorError/index.js +0 -2
  152. package/build/features/connectExpress/screens/AuthenticationList/EntityLicenseType.d.ts +0 -31
  153. package/build/features/connectExpress/screens/AuthenticationList/EntityLicenseType.js +0 -90
  154. package/build/features/connectExpress/screens/OperatorError/OperatorError.d.ts +0 -5
  155. package/build/features/connectExpress/screens/OperatorError/OperatorError.js +0 -9
  156. package/build/features/connectExpress/screens/OperatorError/index.d.ts +0 -3
  157. package/build/features/connectExpress/screens/OperatorError/index.js +0 -2
  158. package/build/features/connectExpress/screens/PrepareDataLoading/PrepareDataLoading.d.ts +0 -5
  159. package/build/features/connectExpress/screens/PrepareDataLoading/PrepareDataLoading.js +0 -34
  160. package/build/features/connectExpress/screens/PrepareDataLoading/index.d.ts +0 -2
  161. package/build/features/connectExpress/screens/PrepareDataLoading/index.js +0 -2
  162. package/build/features/entity/screens/OperatorError/OperatorError.d.ts +0 -5
  163. package/build/features/entity/screens/OperatorError/OperatorError.js +0 -9
  164. package/build/features/entity/screens/OperatorError/index.d.ts +0 -3
  165. package/build/features/entity/screens/OperatorError/index.js +0 -2
  166. package/build/features/individual/screens/AdditionalIndividualInfo/IsAuthorizedSwitch.d.ts +0 -36
  167. package/build/features/individual/screens/AdditionalIndividualInfo/IsAuthorizedSwitch.js +0 -76
  168. package/build/features/individual/screens/OperatorError/OperatorError.d.ts +0 -5
  169. package/build/features/individual/screens/OperatorError/OperatorError.js +0 -9
  170. package/build/features/individual/screens/OperatorError/index.d.ts +0 -3
  171. package/build/features/individual/screens/OperatorError/index.js +0 -2
  172. package/build/features/password/screens/OperatorError/OperatorError.d.ts +0 -5
  173. package/build/features/password/screens/OperatorError/OperatorError.js +0 -9
  174. package/build/features/password/screens/OperatorError/index.d.ts +0 -3
  175. package/build/features/password/screens/OperatorError/index.js +0 -2
  176. package/build/features/password/screens/PrepareDataLoading/PrepareDataLoading.d.ts +0 -4
  177. package/build/features/password/screens/PrepareDataLoading/PrepareDataLoading.js +0 -10
  178. package/build/features/password/screens/PrepareDataLoading/index.d.ts +0 -2
  179. package/build/features/password/screens/PrepareDataLoading/index.js +0 -2
  180. package/build/features/signIn/screens/OperatorError/OperatorError.d.ts +0 -5
  181. package/build/features/signIn/screens/OperatorError/OperatorError.js +0 -9
  182. package/build/features/signIn/screens/OperatorError/index.d.ts +0 -3
  183. package/build/features/signIn/screens/OperatorError/index.js +0 -2
  184. package/build/features/tax/screens/OperatorError/OperatorError.d.ts +0 -5
  185. package/build/features/tax/screens/OperatorError/OperatorError.js +0 -9
  186. package/build/features/tax/screens/OperatorError/index.d.ts +0 -3
  187. package/build/features/tax/screens/OperatorError/index.js +0 -2
  188. package/build/hooks/useFormDirtyCheck.d.ts +0 -10
  189. package/build/hooks/useFormDirtyCheck.js +0 -66
@@ -1,90 +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 { styled, alpha } from '@mui/material/styles';
15
- import InfoIcon from '@mui/icons-material/Info';
16
- import InfoOutlinedIcon from '@mui/icons-material/InfoOutlined';
17
- import { useTranslation } from 'react-i18next';
18
- import { useController, useFormContext } from 'react-hook-form';
19
- import Text from '../../../../components/Text';
20
- import { ScreenContainer } from '../../../shared/Containers';
21
- import Mandatory from '../../../shared/Mandatory';
22
- import RadioLabel from '../../../../components/RadioLabel';
23
- import { LicenseType } from '../../../../@types';
24
- import RadioGroup from '../../../../components/RadioGroup';
25
- import Tooltip from '../../../../components/Tooltip';
26
- import Radio from '../../../../components/Radio';
27
- import { clearError, connectExpressSelector } from '../../../app/connectExpress/connectExpressStore';
28
- import { useAppDispatch, useAppSelector } from '../../../../hooks';
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
- var RadioStyled = styled(Radio)(function (_a) {
40
- var theme = _a.theme;
41
- return ({
42
- '& .MuiSvgIcon-root': {
43
- fontSize: theme.spacing(2.25),
44
- width: theme.spacing(2.25),
45
- height: theme.spacing(2.25)
46
- }
47
- });
48
- });
49
- var LabelStyled = styled('span')(function () { return ({
50
- display: 'inline-flex',
51
- alignItems: 'center'
52
- }); });
53
- export var InfoIconStyled = styled(InfoIcon)(function (_a) {
54
- var theme = _a.theme;
55
- return ({
56
- width: theme.spacing(2.75),
57
- height: theme.spacing(2.125),
58
- cursor: 'pointer',
59
- color: alpha(theme.palette.text.primary, 0.4),
60
- display: 'inline-flex'
61
- });
62
- });
63
- export var InfoOutlinedIconStyled = styled(InfoOutlinedIcon)(function (_a) {
64
- var theme = _a.theme;
65
- return ({
66
- width: theme.spacing(2.75),
67
- height: theme.spacing(2.125),
68
- cursor: 'pointer',
69
- color: alpha(theme.palette.text.primary, 0.4),
70
- display: 'inline-flex'
71
- });
72
- });
73
- var Type = function () {
74
- var t = useTranslation().t;
75
- var control = useFormContext().control;
76
- var error = useAppSelector(connectExpressSelector).error;
77
- var _a = React.useState(false), isCRHovered = _a[0], setIsCRHovered = _a[1];
78
- var _b = React.useState(false), isFLHovered = _b[0], setIsFLHovered = _b[1];
79
- var typeControl = useController({ control: control, name: 'licenseType' });
80
- var dispatch = useAppDispatch();
81
- var handleOnChange = function (_a) {
82
- var target = _a.target;
83
- if (error)
84
- dispatch(clearError());
85
- typeControl.field.onChange(target.value);
86
- };
87
- var typeValue = typeControl.field.value;
88
- return (_jsxs(ScreenContainer, __assign({ sx: { pb: 1.5, pl: 2.5, pr: 2.5 } }, { children: [_jsxs(LabelTextStyled, { children: [t('signup_business_type_label'), _jsx(Mandatory, {})] }), _jsxs(RadioGroupStyled, __assign({ value: typeValue ? (typeValue === LicenseType.FL ? LicenseType.FL : LicenseType.CR) : false, onChange: handleOnChange }, { children: [_jsx(RadioLabel, { value: LicenseType.FL, label: _jsxs(LabelStyled, { children: [t('homemaker_reg'), _jsx(Tooltip, __assign({ title: t('homemaker_reg_hint'), onMouseOver: function () { return setIsFLHovered(true); }, onMouseLeave: function () { return setIsFLHovered(false); }, onTouchStartCapture: function () { return setIsFLHovered(true); } }, { children: isFLHovered ? _jsx(InfoIconStyled, {}) : _jsx(InfoOutlinedIconStyled, {}) }))] }), control: _jsx(RadioStyled, { color: 'primary', disableFocusRipple: true, disableRipple: true, disableTouchRipple: true, focusRipple: false }) }), _jsx(RadioLabel, { value: LicenseType.CR, sx: { marginInlineEnd: '0px' }, label: _jsxs(LabelStyled, { children: [t('commercial_reg'), _jsx(Tooltip, __assign({ title: t('commercial_reg_hint'), onMouseOver: function () { return setIsCRHovered(true); }, onMouseLeave: function () { return setIsCRHovered(false); }, onTouchStartCapture: function () { return setIsCRHovered(true); } }, { children: isCRHovered ? _jsx(InfoIconStyled, {}) : _jsx(InfoOutlinedIconStyled, {}) }))] }), control: _jsx(RadioStyled, { color: 'primary', disableFocusRipple: true, disableRipple: true, disableTouchRipple: true, focusRipple: false }) })] }))] })));
89
- };
90
- export default Type;
@@ -1,5 +0,0 @@
1
- import * as React from 'react';
2
- export interface OperatorErrorProps {
3
- }
4
- declare const _default: React.MemoExoticComponent<({}: OperatorErrorProps) => import("react/jsx-runtime").JSX.Element>;
5
- export default _default;
@@ -1,9 +0,0 @@
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);
@@ -1,3 +0,0 @@
1
- import OperatorError, { OperatorErrorProps } from './OperatorError';
2
- export type { OperatorErrorProps };
3
- export default OperatorError;
@@ -1,2 +0,0 @@
1
- import OperatorError from './OperatorError';
2
- export default OperatorError;
@@ -1,5 +0,0 @@
1
- import * as React from 'react';
2
- export interface PrepareDataLoadingProps {
3
- }
4
- declare const _default: React.MemoExoticComponent<({}: PrepareDataLoadingProps) => import("react/jsx-runtime").JSX.Element>;
5
- export default _default;
@@ -1,34 +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 } from "react/jsx-runtime";
13
- import * as React from 'react';
14
- import { useTranslation } from 'react-i18next';
15
- import { isNetworkError } from '../../../../utils';
16
- import { useAppDispatch, useAppSelector, useLanguage } from '../../../../hooks';
17
- import DataLoading from '../../../shared/DataLoading';
18
- import Button from '../../../shared/Button';
19
- import { connectExpressSelector, retrieveDetailsAfterCreateAccountAsync } from '../../../app/connectExpress/connectExpressStore';
20
- var PrepareDataLoading = function (_a) {
21
- var dispatch = useAppDispatch();
22
- var isAr = useLanguage().isAr;
23
- var t = useTranslation().t;
24
- var _b = useAppSelector(connectExpressSelector), error = _b.error, loading = _b.loading;
25
- React.useEffect(function () {
26
- dispatch(retrieveDetailsAfterCreateAccountAsync());
27
- }, []);
28
- var onReTry = function () {
29
- dispatch(retrieveDetailsAfterCreateAccountAsync());
30
- };
31
- var isNE = React.useMemo(function () { return isNetworkError(error); }, [error]);
32
- return (_jsx(DataLoading, __assign({ error: error }, { children: isNE && (_jsx(Button, __assign({ onClick: onReTry, disableBack: true, isAr: isAr, loading: loading }, { children: t('try_again') }))) })));
33
- };
34
- export default React.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,5 +0,0 @@
1
- import * as React from 'react';
2
- export interface OperatorErrorProps {
3
- }
4
- declare const _default: React.MemoExoticComponent<({}: OperatorErrorProps) => import("react/jsx-runtime").JSX.Element>;
5
- export default _default;
@@ -1,9 +0,0 @@
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);
@@ -1,3 +0,0 @@
1
- import OperatorError, { OperatorErrorProps } from './OperatorError';
2
- export type { OperatorErrorProps };
3
- export default OperatorError;
@@ -1,2 +0,0 @@
1
- import OperatorError from './OperatorError';
2
- export default OperatorError;
@@ -1,36 +0,0 @@
1
- import * as React from 'react';
2
- export declare const InfoIconStyled: import("@emotion/styled").StyledComponent<{
3
- children?: React.ReactNode;
4
- classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
5
- color?: "inherit" | "disabled" | "error" | "info" | "success" | "action" | "primary" | "secondary" | "warning" | undefined;
6
- fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
7
- htmlColor?: string | undefined;
8
- inheritViewBox?: boolean | undefined;
9
- shapeRendering?: string | undefined;
10
- sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
11
- titleAccess?: string | undefined;
12
- viewBox?: string | undefined;
13
- } & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<React.SVGProps<SVGSVGElement>, "ref"> & {
14
- ref?: ((instance: SVGSVGElement | null) => void) | React.RefObject<SVGSVGElement> | null | undefined;
15
- }, keyof import("@mui/material/OverridableComponent").CommonProps | "color" | "fontSize" | "shapeRendering" | "children" | "sx" | "htmlColor" | "inheritViewBox" | "titleAccess" | "viewBox"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
16
- export declare const InfoOutlinedIconStyled: import("@emotion/styled").StyledComponent<{
17
- children?: React.ReactNode;
18
- classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
19
- color?: "inherit" | "disabled" | "error" | "info" | "success" | "action" | "primary" | "secondary" | "warning" | undefined;
20
- fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
21
- htmlColor?: string | undefined;
22
- inheritViewBox?: boolean | undefined;
23
- shapeRendering?: string | undefined;
24
- sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
25
- titleAccess?: string | undefined;
26
- viewBox?: string | undefined;
27
- } & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<React.SVGProps<SVGSVGElement>, "ref"> & {
28
- ref?: ((instance: SVGSVGElement | null) => void) | React.RefObject<SVGSVGElement> | null | undefined;
29
- }, keyof import("@mui/material/OverridableComponent").CommonProps | "color" | "fontSize" | "shapeRendering" | "children" | "sx" | "htmlColor" | "inheritViewBox" | "titleAccess" | "viewBox"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
30
- export interface IsAuthorizedSwitchProps {
31
- show: boolean;
32
- readOnly?: boolean;
33
- isVerified?: boolean;
34
- }
35
- declare const _default: React.MemoExoticComponent<({ show, readOnly, isVerified }: IsAuthorizedSwitchProps) => import("react/jsx-runtime").JSX.Element>;
36
- export default _default;
@@ -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,5 +0,0 @@
1
- import * as React from 'react';
2
- export interface OperatorErrorProps {
3
- }
4
- declare const _default: React.MemoExoticComponent<({}: OperatorErrorProps) => import("react/jsx-runtime").JSX.Element>;
5
- export default _default;
@@ -1,9 +0,0 @@
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);
@@ -1,3 +0,0 @@
1
- import OperatorError, { OperatorErrorProps } from './OperatorError';
2
- export type { OperatorErrorProps };
3
- export default OperatorError;
@@ -1,2 +0,0 @@
1
- import OperatorError from './OperatorError';
2
- export default OperatorError;
@@ -1,5 +0,0 @@
1
- import * as React from 'react';
2
- export interface OperatorErrorProps {
3
- }
4
- declare const _default: React.MemoExoticComponent<({}: OperatorErrorProps) => import("react/jsx-runtime").JSX.Element>;
5
- export default _default;
@@ -1,9 +0,0 @@
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);
@@ -1,3 +0,0 @@
1
- import OperatorError, { OperatorErrorProps } from './OperatorError';
2
- export type { OperatorErrorProps };
3
- export default OperatorError;
@@ -1,2 +0,0 @@
1
- import OperatorError from './OperatorError';
2
- export default OperatorError;
@@ -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,5 +0,0 @@
1
- import * as React from 'react';
2
- export interface OperatorErrorProps {
3
- }
4
- declare const _default: React.MemoExoticComponent<({}: OperatorErrorProps) => import("react/jsx-runtime").JSX.Element>;
5
- export default _default;
@@ -1,9 +0,0 @@
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);
@@ -1,3 +0,0 @@
1
- import OperatorError, { OperatorErrorProps } from './OperatorError';
2
- export type { OperatorErrorProps };
3
- export default OperatorError;
@@ -1,2 +0,0 @@
1
- import OperatorError from './OperatorError';
2
- export default OperatorError;
@@ -1,5 +0,0 @@
1
- import * as React from 'react';
2
- export interface OperatorErrorProps {
3
- }
4
- declare const _default: React.MemoExoticComponent<({}: OperatorErrorProps) => import("react/jsx-runtime").JSX.Element>;
5
- export default _default;
@@ -1,9 +0,0 @@
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);
@@ -1,3 +0,0 @@
1
- import OperatorError, { OperatorErrorProps } from './OperatorError';
2
- export type { OperatorErrorProps };
3
- export default OperatorError;
@@ -1,2 +0,0 @@
1
- import OperatorError from './OperatorError';
2
- export default OperatorError;
@@ -1,10 +0,0 @@
1
- import { FieldValues, UseFormReturn } from 'react-hook-form';
2
- type UseFormWithDirtyCheck = {
3
- isDirty: boolean;
4
- };
5
- type CustomAttrProps = {
6
- name: string;
7
- keys: string[];
8
- };
9
- export declare const useFormDirtyCheck: <TFieldValues extends FieldValues>(method: UseFormReturn<TFieldValues, any, undefined>, backendData: TFieldValues, customAttrs?: CustomAttrProps[]) => UseFormWithDirtyCheck;
10
- export {};
@@ -1,66 +0,0 @@
1
- import React from 'react';
2
- import _ from 'lodash';
3
- export var useFormDirtyCheck = function (method, backendData, customAttrs) {
4
- var _a = React.useState(false), isDirty = _a[0], setIsDirty = _a[1];
5
- var data = method.watch();
6
- var isValidData = function (formValue, backendValue) {
7
- if (_.isUndefined(formValue))
8
- return false;
9
- if (_.isArray(formValue) && formValue.length === 0)
10
- return false;
11
- if (_.isObject(formValue) && _.isEmpty(formValue))
12
- return false;
13
- if (formValue === '' && !backendValue)
14
- return false;
15
- return true;
16
- };
17
- var isArray = function (data, backendData) {
18
- return backendData && data && _.isArray(backendData) && _.isArray(data);
19
- };
20
- var isObject = function (data, backendData) {
21
- return backendData && data && _.isObject(data) && _.isObject(backendData);
22
- };
23
- var mapArrayOfObjectWithKeys = function (items, keys) {
24
- return _.map(items, function (item) { return _.pick(item, keys); });
25
- };
26
- var mapObjectWithKeys = function (item, keys) {
27
- return _.pick(item, keys);
28
- };
29
- var deepComparison = function (data, backendData, customAttrs) {
30
- var _loop_1 = function (key) {
31
- var formValue = data === null || data === void 0 ? void 0 : data[key];
32
- var backEndValue = backendData === null || backendData === void 0 ? void 0 : backendData[key];
33
- if (!isValidData(formValue, backEndValue))
34
- return "continue";
35
- var customAttr = customAttrs === null || customAttrs === void 0 ? void 0 : customAttrs.find(function (el) { return el.name === key; });
36
- if (customAttr) {
37
- var keys = customAttr.keys;
38
- if (isArray(formValue, backEndValue)) {
39
- formValue = mapArrayOfObjectWithKeys(formValue, keys);
40
- backEndValue = mapArrayOfObjectWithKeys(backEndValue, keys);
41
- if (formValue.length !== backEndValue.length)
42
- return { value: true };
43
- if (_.differenceWith(formValue, backEndValue, _.isEqual).length > 0)
44
- return { value: true };
45
- }
46
- if (isObject(formValue, backEndValue)) {
47
- formValue = mapObjectWithKeys(formValue, keys);
48
- backEndValue = mapObjectWithKeys(backEndValue, keys);
49
- }
50
- }
51
- if (!_.isEqual(formValue, backEndValue))
52
- return { value: true };
53
- };
54
- for (var key in backendData) {
55
- var state_1 = _loop_1(key);
56
- if (typeof state_1 === "object")
57
- return state_1.value;
58
- }
59
- return false;
60
- };
61
- React.useEffect(function () {
62
- var isDirty = deepComparison(data, backendData, customAttrs);
63
- setIsDirty(isDirty);
64
- }, [data, backendData]);
65
- return { isDirty: isDirty };
66
- };