@tap-payments/auth-jsconnect 2.10.11-development → 2.10.11

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 (200) hide show
  1. package/build/@types/app.d.ts +2 -2
  2. package/build/@types/app.js +0 -1
  3. package/build/@types/form.d.ts +4 -2
  4. package/build/@types/index.d.ts +0 -1
  5. package/build/@types/index.js +0 -1
  6. package/build/api/account.d.ts +2 -2
  7. package/build/api/account.js +7 -4
  8. package/build/api/auth.d.ts +2 -10
  9. package/build/api/auth.js +7 -3
  10. package/build/api/axios.d.ts +1 -1
  11. package/build/api/entity.d.ts +3 -0
  12. package/build/api/headers.d.ts +5 -0
  13. package/build/api/headers.js +3 -0
  14. package/build/api/index.d.ts +5 -11
  15. package/build/api/index.js +1 -3
  16. package/build/api/lead.d.ts +1 -0
  17. package/build/api/operator.d.ts +1 -1
  18. package/build/api/operator.js +5 -2
  19. package/build/app/rootReducer.d.ts +0 -1
  20. package/build/app/rootReducer.js +1 -3
  21. package/build/app/settings.js +1 -2
  22. package/build/app/store.d.ts +0 -2
  23. package/build/assets/currencies/AEDSymbol.js +1 -1
  24. package/build/assets/currencies/SARSymbol.js +1 -1
  25. package/build/assets/locales/ar.json +14 -5
  26. package/build/assets/locales/en.json +17 -7
  27. package/build/components/OTPTimer/OTPTimer.d.ts +1 -2
  28. package/build/components/OTPTimer/OTPTimer.js +4 -4
  29. package/build/components/Tooltip/Tooltip.js +1 -1
  30. package/build/constants/api.d.ts +2 -0
  31. package/build/constants/api.js +4 -0
  32. package/build/constants/app.d.ts +12 -12
  33. package/build/constants/app.js +98 -129
  34. package/build/constants/flows.d.ts +0 -15
  35. package/build/constants/flows.js +0 -15
  36. package/build/constants/validation.d.ts +1 -1
  37. package/build/constants/validation.js +1 -1
  38. package/build/features/app/auth/authStore.js +64 -54
  39. package/build/features/app/bank/bankStore.js +24 -20
  40. package/build/features/app/board/boardStore.js +11 -7
  41. package/build/features/app/brand/brandStore.js +22 -18
  42. package/build/features/app/business/businessStore.js +45 -36
  43. package/build/features/app/connect/connectStore.d.ts +6 -5
  44. package/build/features/app/connect/connectStore.js +48 -31
  45. package/build/features/app/connectExpress/connectExpressStore.d.ts +6 -5
  46. package/build/features/app/connectExpress/connectExpressStore.js +61 -20
  47. package/build/features/app/entity/entityStore.js +21 -17
  48. package/build/features/app/individual/individualStore.js +34 -28
  49. package/build/features/app/password/passwordStore.js +44 -46
  50. package/build/features/app/signIn/signInStore.js +12 -16
  51. package/build/features/app/tax/taxStore.js +20 -16
  52. package/build/features/auth/Auth.d.ts +1 -1
  53. package/build/features/auth/screens/AuthenticationList/AuthenticationList.js +10 -7
  54. package/build/features/auth/screens/AuthenticationList/EntityLicenseType.d.ts +4 -1
  55. package/build/features/auth/screens/AuthenticationList/EntityLicenseType.js +6 -4
  56. package/build/features/auth/screens/AuthenticationList/EntityList.js +11 -3
  57. package/build/features/brand/screens/BrandActivities/RefundPolicy.d.ts +1 -1
  58. package/build/features/business/screens/BusinessType/BusinessType.js +15 -5
  59. package/build/features/business/screens/BusinessType/EntityLicenseList.js +11 -5
  60. package/build/features/business/screens/BusinessType/LicenseList.js +20 -12
  61. package/build/features/business/screens/BusinessType/UnifiedNumber.d.ts +35 -0
  62. package/build/features/business/screens/BusinessType/UnifiedNumber.js +84 -0
  63. package/build/features/business/screens/BusinessType/validation.d.ts +6 -3
  64. package/build/features/business/screens/BusinessType/validation.js +31 -10
  65. package/build/features/business/screens/Customers/RefundPolicy.d.ts +1 -1
  66. package/build/features/connectExpress/screens/AuthenticationList/AuthenticationList.js +10 -10
  67. package/build/features/connectExpress/screens/AuthenticationList/EntityLicenseType.d.ts +4 -1
  68. package/build/features/connectExpress/screens/AuthenticationList/EntityLicenseType.js +6 -4
  69. package/build/features/connectExpress/screens/AuthenticationList/EntityList.js +11 -3
  70. package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.js +1 -0
  71. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.js +27 -16
  72. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseNumber.js +2 -2
  73. package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.js +1 -1
  74. package/build/features/connectExpress/screens/CollectBusinessInfo/UnifiedNumber.d.ts +36 -0
  75. package/build/features/connectExpress/screens/CollectBusinessInfo/UnifiedNumber.js +81 -0
  76. package/build/features/connectExpress/screens/CollectBusinessInfo/validation.d.ts +6 -3
  77. package/build/features/connectExpress/screens/CollectBusinessInfo/validation.js +57 -21
  78. package/build/features/connectExpress/screens/Mobile/Mobile.js +7 -6
  79. package/build/features/entity/screens/EntityName/EntityName.js +16 -15
  80. package/build/features/entity/screens/EntityName/UnifiedNumber.js +2 -2
  81. package/build/features/entity/screens/EntityName/validation.d.ts +50 -48
  82. package/build/features/entity/screens/EntityName/validation.js +100 -85
  83. package/build/features/featuresScreens.d.ts +0 -1
  84. package/build/features/featuresScreens.js +55 -67
  85. package/build/features/shared/Button/Button.js +1 -1
  86. package/build/features/shared/Button/FlowsButtons.js +1 -1
  87. package/build/features/shared/OTPVerifySecurityError/OTPVerifySecurityError.js +9 -0
  88. package/build/features/shared/OTPVerifySecurityError/index.d.ts +2 -0
  89. package/build/features/shared/OTPVerifySecurityError/index.js +2 -0
  90. package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +2 -2
  91. package/build/features/shared/SuccessScreen/SuccessScreen.d.ts +1 -3
  92. package/build/features/shared/SuccessScreen/SuccessScreen.js +2 -2
  93. package/build/hooks/useAppConfig.js +1 -1
  94. package/build/hooks/useAppDispatch.d.ts +0 -1
  95. package/build/index.d.ts +2 -3
  96. package/build/index.js +2 -4
  97. package/build/theme/palette.js +0 -12
  98. package/build/theme/typography.js +0 -4
  99. package/build/utils/common.d.ts +1 -1
  100. package/build/utils/common.js +14 -8
  101. package/build/utils/error.d.ts +2 -0
  102. package/build/utils/error.js +6 -0
  103. package/build/utils/string.d.ts +3 -3
  104. package/build/utils/string.js +5 -11
  105. package/build/utils/validation.js +1 -1
  106. package/package.json +3 -3
  107. package/build/@types/terminal.d.ts +0 -116
  108. package/build/@types/terminal.js +0 -1
  109. package/build/api/terminal.d.ts +0 -28
  110. package/build/api/terminal.js +0 -45
  111. package/build/components/DeviceCard/DeviceCard.d.ts +0 -18
  112. package/build/components/DeviceCard/DeviceCard.js +0 -103
  113. package/build/components/DeviceCard/index.d.ts +0 -3
  114. package/build/components/DeviceCard/index.js +0 -2
  115. package/build/features/app/terminal/terminalStore.d.ts +0 -109
  116. package/build/features/app/terminal/terminalStore.js +0 -673
  117. package/build/features/shared/PushNotification/PushNotification.d.ts +0 -11
  118. package/build/features/shared/PushNotification/PushNotification.js +0 -34
  119. package/build/features/shared/PushNotification/index.d.ts +0 -2
  120. package/build/features/shared/PushNotification/index.js +0 -2
  121. package/build/features/terminal/Terminal.d.ts +0 -14
  122. package/build/features/terminal/Terminal.js +0 -95
  123. package/build/features/terminal/index.d.ts +0 -1
  124. package/build/features/terminal/index.js +0 -1
  125. package/build/features/terminal/screens/LinkNewTerminal/LinkNewTerminal.js +0 -69
  126. package/build/features/terminal/screens/LinkNewTerminal/index.d.ts +0 -2
  127. package/build/features/terminal/screens/LinkNewTerminal/index.js +0 -2
  128. package/build/features/terminal/screens/LinkNewTerminal/styles.d.ts +0 -10
  129. package/build/features/terminal/screens/LinkNewTerminal/styles.js +0 -28
  130. package/build/features/terminal/screens/LinkedSuccess/LinkedSuccess.d.ts +0 -3
  131. package/build/features/terminal/screens/LinkedSuccess/LinkedSuccess.js +0 -51
  132. package/build/features/terminal/screens/LinkedSuccess/index.d.ts +0 -2
  133. package/build/features/terminal/screens/LinkedSuccess/index.js +0 -2
  134. package/build/features/terminal/screens/LinkedTerminalInfo/LinkedTerminalInfo.d.ts +0 -3
  135. package/build/features/terminal/screens/LinkedTerminalInfo/LinkedTerminalInfo.js +0 -50
  136. package/build/features/terminal/screens/LinkedTerminalInfo/index.d.ts +0 -2
  137. package/build/features/terminal/screens/LinkedTerminalInfo/index.js +0 -2
  138. package/build/features/terminal/screens/Loading/Loading.d.ts +0 -4
  139. package/build/features/terminal/screens/Loading/Loading.js +0 -10
  140. package/build/features/terminal/screens/Loading/index.d.ts +0 -2
  141. package/build/features/terminal/screens/Loading/index.js +0 -2
  142. package/build/features/terminal/screens/NoTerminalDeviceLinked/NoTerminalDeviceLinked.d.ts +0 -3
  143. package/build/features/terminal/screens/NoTerminalDeviceLinked/NoTerminalDeviceLinked.js +0 -56
  144. package/build/features/terminal/screens/NoTerminalDeviceLinked/index.d.ts +0 -2
  145. package/build/features/terminal/screens/NoTerminalDeviceLinked/index.js +0 -2
  146. package/build/features/terminal/screens/NoTerminalDeviceLinked/styles.d.ts +0 -36
  147. package/build/features/terminal/screens/NoTerminalDeviceLinked/styles.js +0 -34
  148. package/build/features/terminal/screens/OperatorError/OperatorError.d.ts +0 -5
  149. package/build/features/terminal/screens/OperatorError/OperatorError.js +0 -9
  150. package/build/features/terminal/screens/OperatorError/index.d.ts +0 -2
  151. package/build/features/terminal/screens/OperatorError/index.js +0 -2
  152. package/build/features/terminal/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +0 -3
  153. package/build/features/terminal/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +0 -21
  154. package/build/features/terminal/screens/ResetPasswordSuccess/index.d.ts +0 -2
  155. package/build/features/terminal/screens/ResetPasswordSuccess/index.js +0 -2
  156. package/build/features/terminal/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +0 -3
  157. package/build/features/terminal/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +0 -31
  158. package/build/features/terminal/screens/SuccessWithFlowButtons/index.d.ts +0 -2
  159. package/build/features/terminal/screens/SuccessWithFlowButtons/index.js +0 -2
  160. package/build/features/terminal/screens/TerminalDeviceList/DeviceList.d.ts +0 -9
  161. package/build/features/terminal/screens/TerminalDeviceList/DeviceList.js +0 -20
  162. package/build/features/terminal/screens/TerminalDeviceList/TerminalDeviceList.d.ts +0 -3
  163. package/build/features/terminal/screens/TerminalDeviceList/TerminalDeviceList.js +0 -144
  164. package/build/features/terminal/screens/TerminalDeviceList/index.d.ts +0 -2
  165. package/build/features/terminal/screens/TerminalDeviceList/index.js +0 -2
  166. package/build/features/terminal/screens/TerminalDeviceList/styles.d.ts +0 -9
  167. package/build/features/terminal/screens/TerminalDeviceList/styles.js +0 -13
  168. package/build/features/terminal/screens/TerminalListPage/TerminalListPage.d.ts +0 -3
  169. package/build/features/terminal/screens/TerminalListPage/TerminalListPage.js +0 -42
  170. package/build/features/terminal/screens/TerminalListPage/index.d.ts +0 -2
  171. package/build/features/terminal/screens/TerminalListPage/index.js +0 -2
  172. package/build/features/terminal/screens/UnlinkedSuccess/UnlinkedSuccess.d.ts +0 -3
  173. package/build/features/terminal/screens/UnlinkedSuccess/UnlinkedSuccess.js +0 -53
  174. package/build/features/terminal/screens/UnlinkedSuccess/index.d.ts +0 -2
  175. package/build/features/terminal/screens/UnlinkedSuccess/index.js +0 -2
  176. package/build/features/terminal/screens/UnlinkedTerminalInfo/UnlinkedTerminalInfo.d.ts +0 -3
  177. package/build/features/terminal/screens/UnlinkedTerminalInfo/UnlinkedTerminalInfo.js +0 -98
  178. package/build/features/terminal/screens/UnlinkedTerminalInfo/index.d.ts +0 -2
  179. package/build/features/terminal/screens/UnlinkedTerminalInfo/index.js +0 -2
  180. package/build/features/terminal/screens/UnlinkedTerminalInfo/styles.d.ts +0 -26
  181. package/build/features/terminal/screens/UnlinkedTerminalInfo/styles.js +0 -30
  182. package/build/features/terminal/screens/Verify/OTPInput.d.ts +0 -7
  183. package/build/features/terminal/screens/Verify/OTPInput.js +0 -51
  184. package/build/features/terminal/screens/Verify/Verify.d.ts +0 -5
  185. package/build/features/terminal/screens/Verify/Verify.js +0 -85
  186. package/build/features/terminal/screens/Verify/index.d.ts +0 -2
  187. package/build/features/terminal/screens/Verify/index.js +0 -2
  188. package/build/features/terminal/screens/Verify/validation.d.ts +0 -8
  189. package/build/features/terminal/screens/Verify/validation.js +0 -4
  190. package/build/features/terminal/screens/shared/Header.d.ts +0 -10
  191. package/build/features/terminal/screens/shared/Header.js +0 -30
  192. package/build/features/terminal/screens/shared/TerminalList.d.ts +0 -11
  193. package/build/features/terminal/screens/shared/TerminalList.js +0 -25
  194. package/build/features/terminal/screens/shared/index.d.ts +0 -5
  195. package/build/features/terminal/screens/shared/index.js +0 -5
  196. package/build/features/terminal/screens/shared/styles.d.ts +0 -196
  197. package/build/features/terminal/screens/shared/styles.js +0 -155
  198. package/build/features/terminal/screens/shared/utils.d.ts +0 -7
  199. package/build/features/terminal/screens/shared/utils.js +0 -24
  200. /package/build/features/{terminal/screens/LinkNewTerminal/LinkNewTerminal.d.ts → shared/OTPVerifySecurityError/OTPVerifySecurityError.d.ts} +0 -0
@@ -1,30 +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 { alpha, styled } from '@mui/material/styles';
13
- import Typography from '@mui/material/Typography';
14
- import Box from '@mui/material/Box';
15
- export var ResendText = styled(Typography)(function (_a) {
16
- var _b = _a.theme, palette = _b.palette, typography = _b.typography, spacing = _b.spacing;
17
- return (__assign(__assign({ cursor: 'pointer', color: palette.primary.main }, typography.caption), { fontWeight: typography.fontWeightRegular, textAlign: 'end', marginTop: spacing(0.75) }));
18
- });
19
- export var SendRequestContainer = styled(Box, {
20
- shouldForwardProp: function (prop) { return !['hasError'].includes(prop.toString()); }
21
- })(function (_a) {
22
- var _b = _a.theme, typography = _b.typography, palette = _b.palette, spacing = _b.spacing, hasError = _a.hasError;
23
- return (__assign(__assign(__assign(__assign({}, typography.button_small), { fontWeight: typography.fontWeightRegular, mt: 2, backgroundColor: palette.common.white, borderWidth: spacing(0.125, 0, 0.125, 0), borderStyle: 'solid', borderColor: palette.divider, padding: spacing(1.5, 2.5, 1.5, 2.5), marginTop: spacing(1), color: palette.text.primary }), typography.body1), (hasError && {
24
- background: alpha(palette.error.dark, 0.3),
25
- borderWidth: '1px, 0px, 1px, 0px',
26
- borderStyle: 'solid',
27
- borderColor: alpha(palette.error.dark, 0.7),
28
- color: alpha(palette.error.main, 0.7)
29
- })));
30
- });
@@ -1,7 +0,0 @@
1
- import * as React from 'react';
2
- export interface OTPProps {
3
- loading: boolean;
4
- setLoading: (flag: boolean) => void;
5
- }
6
- declare const _default: React.MemoExoticComponent<({ loading }: OTPProps) => JSX.Element>;
7
- export default _default;
@@ -1,51 +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 Box from '@mui/material/Box/Box';
15
- import { styled } from '@mui/material/styles';
16
- import OTPField from '../../../shared/OTP';
17
- import { useController, useFormContext } from 'react-hook-form';
18
- import { useTranslation } from 'react-i18next';
19
- import { DEFAULT_TIMER_VALUE } from '../../../../constants';
20
- import { useAppDispatch, useAppSelector } from '../../../../hooks';
21
- import { isTokenExpired } from '../../../../utils';
22
- import { clearError, terminalSelector, resendOTP } from '../../../app/terminal/terminalStore';
23
- var BoxStyled = styled(Box)(function (_a) {
24
- var theme = _a.theme;
25
- return ({
26
- display: 'flex',
27
- flexDirection: 'column',
28
- fontFamily: theme.typography.fontFamily
29
- });
30
- });
31
- var OTPInput = function (_a) {
32
- var loading = _a.loading;
33
- var _b = useFormContext(), control = _b.control, setValue = _b.setValue;
34
- var t = useTranslation().t;
35
- var otpControl = useController({ name: 'otp', control: control });
36
- var dispatch = useAppDispatch();
37
- var error = useAppSelector(terminalSelector).error;
38
- var handleOnOTPChange = function (otp) {
39
- if (error)
40
- dispatch(clearError());
41
- otpControl.field.onChange(otp);
42
- };
43
- var handleOnResendOTP = function () {
44
- if (otpControl.field.value)
45
- setValue('otp', '', { shouldValidate: true });
46
- dispatch(resendOTP());
47
- };
48
- var otpValue = otpControl.field.value;
49
- return (_jsx(BoxStyled, __assign({ dir: 'ltr' }, { children: _jsx(OTPField, { loading: loading, timeEndLabel: t('ide_otp_resend_label'), timerInSeconds: DEFAULT_TIMER_VALUE, onResetClick: handleOnResendOTP, value: otpValue, hasError: isTokenExpired(error), onChange: function (number) { return handleOnOTPChange(number.toString()); } }) })));
50
- };
51
- export default React.memo(OTPInput);
@@ -1,5 +0,0 @@
1
- import * as React from 'react';
2
- export interface OTPProps {
3
- }
4
- declare const _default: React.MemoExoticComponent<({}: OTPProps) => JSX.Element>;
5
- export default _default;
@@ -1,85 +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 { useAppDispatch, useSetFromDefaultValues, useSanitizedTranslation, useLanguage, useAppSelector } from '../../../../hooks';
15
- import { useTranslation } from 'react-i18next';
16
- import { useForm, FormProvider } from 'react-hook-form';
17
- import { yupResolver } from '@hookform/resolvers/yup';
18
- import Box from '@mui/material/Box/Box';
19
- import { styled } from '@mui/material/styles';
20
- import { handleNextScreenStep } from '../../../../app/settings';
21
- import { deepCopy, maskPhone } from '../../../../utils';
22
- import Form from '../../../../components/Form';
23
- import Text from '../../../../components/Text';
24
- import { ScreenContainer } from '../../../shared/Containers';
25
- import { terminalSelector, clearError, resetOTPScreen, verifyTokenOTP } from '../../../app/terminal/terminalStore';
26
- import Button from '../../../shared/Button';
27
- import { OTPValidation } from './validation';
28
- import OTPInput from './OTPInput';
29
- var OTPTitleContainerStyled = styled(Box)(function (_a) {
30
- var theme = _a.theme;
31
- return ({
32
- background: theme.palette.common.white,
33
- border: '1px solid',
34
- borderColor: theme.palette.divider,
35
- direction: theme.direction,
36
- borderRadius: theme.spacing(0, 0, 1.25, 1.25),
37
- marginBottom: theme.spacing(5.75)
38
- });
39
- });
40
- var OTPTitleStyled = styled(Text)(function (_a) {
41
- var theme = _a.theme;
42
- return (__assign(__assign({}, theme.typography.body1), { color: theme.palette.text.primary, fontWeight: theme.typography.fontWeightLight, marginBlock: theme.spacing(1.75), marginInlineStart: theme.spacing(2.5), lineHeight: 1.75 }));
43
- });
44
- var FormStyled = styled(Form)(function () { return ({
45
- display: 'flex',
46
- flexDirection: 'column'
47
- }); });
48
- var VerifyNumber = function (_a) {
49
- var _b, _c, _d;
50
- var dispatch = useAppDispatch();
51
- var _e = useAppSelector(terminalSelector), data = _e.data, loading = _e.loading, error = _e.error;
52
- var otp = data.otpData.otp;
53
- var methods = useForm({
54
- resolver: yupResolver(OTPValidation),
55
- defaultValues: {
56
- otp: otp
57
- },
58
- mode: 'onChange'
59
- });
60
- useSetFromDefaultValues(methods, data.otpData);
61
- var t = useTranslation().t;
62
- var st = useSanitizedTranslation();
63
- var isAr = useLanguage().isAr;
64
- var _f = React.useState(false), resendLoading = _f[0], setResendLoading = _f[1];
65
- var phone = (_d = (_c = (_b = data.responseData) === null || _b === void 0 ? void 0 : _b.authData) === null || _c === void 0 ? void 0 : _c.verification_by) === null || _d === void 0 ? void 0 : _d.sent_to;
66
- React.useEffect(function () {
67
- if (error && methods.formState.isValid && phone)
68
- dispatch(clearError());
69
- return function () {
70
- dispatch(resetOTPScreen());
71
- };
72
- }, [methods.formState.isValid]);
73
- var onSubmit = function (formData) {
74
- dispatch(verifyTokenOTP(deepCopy(formData)))
75
- .unwrap()
76
- .then(function (_a) {
77
- var nextScreen = _a.nextScreen;
78
- dispatch(handleNextScreenStep(nextScreen));
79
- })
80
- .catch(function () { });
81
- };
82
- var disabled = !methods.formState.isValid || !phone || resendLoading;
83
- return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(OTPTitleContainerStyled, { children: _jsxs(OTPTitleStyled, { children: [loading ? st('ide_otp_waiting_title') : st('ide_opt_sent_title'), !loading && phone && _jsx("span", __assign({ dir: 'ltr' }, { children: "".concat(maskPhone(phone || '')) }))] }) }), _jsx(OTPInput, { loading: resendLoading, setLoading: setResendLoading }), _jsx(Button, __assign({ disableBack: true, disabled: disabled, isAr: isAr, loading: loading, error: st(error || '') }, { children: t('next') }))] })) })) }));
84
- };
85
- export default React.memo(VerifyNumber);
@@ -1,2 +0,0 @@
1
- import OTP from './Verify';
2
- export default OTP;
@@ -1,2 +0,0 @@
1
- import OTP from './Verify';
2
- export default OTP;
@@ -1,8 +0,0 @@
1
- import * as yup from 'yup';
2
- export declare const OTPValidation: yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
3
- otp: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
4
- }>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
5
- otp: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
6
- }>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
7
- otp: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
8
- }>>>;
@@ -1,4 +0,0 @@
1
- import * as yup from 'yup';
2
- export var OTPValidation = yup.object().shape({
3
- otp: yup.string().min(6, 'otp_min_length').required('otp_required')
4
- });
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import { SxProps, Theme } from '@mui/material';
3
- interface HeaderProps {
4
- onLinkClick?: () => void;
5
- loading?: boolean;
6
- title?: string;
7
- sx?: SxProps<Theme>;
8
- }
9
- declare const _default: React.MemoExoticComponent<({ onLinkClick, loading, title, sx }: HeaderProps) => JSX.Element>;
10
- export default _default;
@@ -1,30 +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 { memo } from 'react';
14
- import { useTranslation } from 'react-i18next';
15
- import AddIcon from '@mui/icons-material/Add';
16
- import Loader from '../../../../components/Loader';
17
- import { AddIconContainer, HeadContainer, LinkButton, LinkText, TextTypography } from './styles';
18
- var Header = function (_a) {
19
- var onLinkClick = _a.onLinkClick, loading = _a.loading, title = _a.title, sx = _a.sx;
20
- var t = useTranslation().t;
21
- var getLink = function () {
22
- if (!onLinkClick)
23
- return;
24
- if (loading)
25
- return _jsx(Loader, { innerColor: 'black', outerColor: 'black', size: 14, style: { height: 28, width: 28, margin: 0 }, toggleAnimation: !!loading });
26
- return (_jsxs(LinkButton, __assign({ onClick: onLinkClick }, { children: [_jsx(AddIconContainer, { children: _jsx(AddIcon, { fontSize: 'small' }) }), _jsx(LinkText, { children: t('terminal_link_terminal') })] })));
27
- };
28
- return (_jsxs(HeadContainer, __assign({ sx: sx }, { children: [_jsx(TextTypography, { children: t(title !== null && title !== void 0 ? title : 'terminal_manage_terminals') }), getLink()] })));
29
- };
30
- export default memo(Header);
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
- import { TerminalInfo } from '../../../../@types';
3
- interface TerminalListProps {
4
- selectedTerminal: TerminalInfo;
5
- list: TerminalInfo[];
6
- select?: boolean;
7
- loading?: boolean;
8
- onClick: (device: TerminalInfo) => void;
9
- }
10
- declare const _default: React.MemoExoticComponent<({ list, onClick, selectedTerminal, select, loading }: TerminalListProps) => JSX.Element>;
11
- export default _default;
@@ -1,25 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { memo } from 'react';
3
- import { useTranslation } from 'react-i18next';
4
- import { ICONS_NAMES } from '../../../../constants';
5
- import Icon from '../../../../components/Icon';
6
- import Loader from '../../../../components/Loader';
7
- import { getTerminalId, getTerminalIdLabel, getTerminalName } from './utils';
8
- import { ListContainer, TerminalListContainer, TitleContainer, Image, Title, ScrollContainer, ListItem, StyledRadio, ArrowIcon } from './styles';
9
- var TerminalList = function (_a) {
10
- var _b, _c, _d, _e, _f, _g, _h, _j;
11
- var list = _a.list, onClick = _a.onClick, selectedTerminal = _a.selectedTerminal, _k = _a.select, select = _k === void 0 ? true : _k, loading = _a.loading;
12
- var t = useTranslation().t;
13
- var platformImage = ((_d = (_c = (_b = list[0]) === null || _b === void 0 ? void 0 : _b.platform) === null || _c === void 0 ? void 0 : _c.brand) === null || _d === void 0 ? void 0 : _d.logo) || ICONS_NAMES.platform_image;
14
- var platformName = (_j = (_h = (_g = (_f = (_e = list[0]) === null || _e === void 0 ? void 0 : _e.platform) === null || _f === void 0 ? void 0 : _f.brand) === null || _g === void 0 ? void 0 : _g.name) === null || _h === void 0 ? void 0 : _h[0]) === null || _j === void 0 ? void 0 : _j.text;
15
- var getEndComponent = function (terminal) {
16
- if (loading && (selectedTerminal === null || selectedTerminal === void 0 ? void 0 : selectedTerminal.id) === (terminal === null || terminal === void 0 ? void 0 : terminal.id))
17
- return _jsx(Loader, { innerColor: 'black', outerColor: 'black', size: 10, style: { height: 24, width: 24 }, toggleAnimation: !!loading });
18
- if (select)
19
- return (_jsx(StyledRadio, { sx: { paddingInlineEnd: 0 }, disableFocusRipple: true, disableRipple: true, disableTouchRipple: true, onChange: function () { return onClick(terminal); }, checkedIcon: _jsx(Icon, { src: ICONS_NAMES.radio_checked }), checked: (selectedTerminal === null || selectedTerminal === void 0 ? void 0 : selectedTerminal.id) === terminal.id }));
20
- if (!select)
21
- return _jsx(ArrowIcon, {});
22
- };
23
- return (_jsxs(ListContainer, { children: [_jsxs(TitleContainer, { children: [_jsx(Image, { src: platformImage, alt: 'Device' }), _jsx(Title, { children: t('terminal_devices', { name: platformName }) })] }), _jsx(ScrollContainer, { children: _jsx(TerminalListContainer, { children: list.map(function (terminal, index) { return (_jsx(ListItem, { sx: { minHeight: 'unset' }, onClick: function () { return onClick(terminal); }, name: getTerminalName(terminal), deviceId: getTerminalId(terminal), deviceIdLabel: getTerminalIdLabel(terminal), endAdornment: getEndComponent(terminal) }, index)); }) }) })] }));
24
- };
25
- export default memo(TerminalList);
@@ -1,5 +0,0 @@
1
- import Header from './Header';
2
- import TerminalList from './TerminalList';
3
- export * from './styles';
4
- export * from './utils';
5
- export { Header, TerminalList };
@@ -1,5 +0,0 @@
1
- import Header from './Header';
2
- import TerminalList from './TerminalList';
3
- export * from './styles';
4
- export * from './utils';
5
- export { Header, TerminalList };