@tap-payments/auth-jsconnect 2.0.54-test → 2.0.56-test

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (203) hide show
  1. package/build/@types/app.d.ts +39 -14
  2. package/build/@types/app.js +9 -0
  3. package/build/@types/form.d.ts +11 -0
  4. package/build/api/auth.d.ts +14 -1
  5. package/build/api/auth.js +24 -1
  6. package/build/api/axios.js +2 -2
  7. package/build/api/data.d.ts +33 -7
  8. package/build/api/data.js +41 -16
  9. package/build/api/entity.d.ts +2 -0
  10. package/build/api/index.d.ts +11 -8
  11. package/build/api/individual.d.ts +1 -1
  12. package/build/app/rootReducer.d.ts +3 -0
  13. package/build/app/rootReducer.js +7 -1
  14. package/build/app/settings.js +8 -2
  15. package/build/app/store.d.ts +7 -1
  16. package/build/assets/locales/ar.json +14 -4
  17. package/build/assets/locales/en.json +14 -4
  18. package/build/components/AnimationFlow/AnimationFlow.d.ts +4 -1
  19. package/build/components/AnimationFlow/AnimationFlow.js +5 -7
  20. package/build/components/AnimationFlow/BottomSheet.js +2 -1
  21. package/build/components/AnimationFlow/Dialog.d.ts +4 -1
  22. package/build/components/AnimationFlow/Dialog.js +9 -4
  23. package/build/components/FileInput/DragAndDrop.d.ts +9 -1
  24. package/build/components/FileInput/DragAndDrop.js +113 -8
  25. package/build/components/Lottie/Lottie.d.ts +878 -0
  26. package/build/components/Lottie/Lottie.js +58 -0
  27. package/build/components/Lottie/files/pulsating_circle_waves.json +236 -0
  28. package/build/components/Lottie/files/success.json +425 -0
  29. package/build/components/Lottie/index.d.ts +3 -0
  30. package/build/components/Lottie/index.js +3 -0
  31. package/build/components/ProgressBar/CircularProgressBar.d.ts +14 -0
  32. package/build/components/ProgressBar/CircularProgressBar.js +48 -0
  33. package/build/components/ProgressBar/index.d.ts +2 -0
  34. package/build/components/ProgressBar/index.js +2 -0
  35. package/build/components/SocialMediaGroup/SocialMediaGroup.d.ts +2 -1
  36. package/build/components/SocialMediaGroup/SocialMediaGroup.js +27 -34
  37. package/build/constants/api.d.ts +1 -0
  38. package/build/constants/api.js +10 -7
  39. package/build/constants/app.d.ts +15 -0
  40. package/build/constants/app.js +75 -3
  41. package/build/constants/assets.d.ts +17 -1
  42. package/build/constants/assets.js +22 -6
  43. package/build/constants/validation.d.ts +1 -0
  44. package/build/constants/validation.js +1 -0
  45. package/build/features/app/auth/authStore.d.ts +35 -0
  46. package/build/features/app/auth/authStore.js +148 -0
  47. package/build/features/app/bank/bankStore.d.ts +4 -0
  48. package/build/features/app/bank/bankStore.js +42 -22
  49. package/build/features/app/business/businessStore.js +53 -43
  50. package/build/features/app/connect/connectStore.d.ts +13 -1
  51. package/build/features/app/connect/connectStore.js +164 -4
  52. package/build/features/app/entity/entityStore.d.ts +53 -0
  53. package/build/features/app/entity/entityStore.js +461 -0
  54. package/build/features/app/individual/individualStore.js +19 -11
  55. package/build/features/app/otp/otpStore.d.ts +28 -0
  56. package/build/features/app/otp/otpStore.js +153 -0
  57. package/build/features/app/signIn/signInStore.js +2 -2
  58. package/build/features/auth/Auth.d.ts +10 -0
  59. package/build/features/auth/Auth.js +87 -0
  60. package/build/features/auth/index.d.ts +1 -0
  61. package/build/features/auth/index.js +1 -0
  62. package/build/features/auth/screens/OTP/OTP.d.ts +5 -0
  63. package/build/features/auth/screens/OTP/OTP.js +72 -0
  64. package/build/features/auth/screens/OTP/OTPInput.d.ts +5 -0
  65. package/build/features/auth/screens/OTP/OTPInput.js +44 -0
  66. package/build/features/auth/screens/OTP/index.d.ts +3 -0
  67. package/build/features/auth/screens/OTP/index.js +2 -0
  68. package/build/features/auth/screens/OTP/validation.d.ts +8 -0
  69. package/build/features/auth/screens/OTP/validation.js +4 -0
  70. package/build/features/bank/Bank.js +10 -4
  71. package/build/features/bank/screens/BankDetails/BankDetails.js +2 -2
  72. package/build/features/bank/screens/BankDetails/BankStatement.js +33 -8
  73. package/build/features/business/Business.d.ts +1 -1
  74. package/build/features/business/Business.js +12 -5
  75. package/build/features/business/screens/Activities/ActivitiesList.d.ts +1 -1
  76. package/build/features/business/screens/Activities/SalesChannels.js +1 -1
  77. package/build/features/business/screens/Customers/CustomerLocations.d.ts +2 -2
  78. package/build/features/business/screens/Customers/CustomerLocations.js +25 -7
  79. package/build/features/business/screens/Customers/ExpectedCustomers.js +16 -4
  80. package/build/features/business/screens/Customers/ExpectedSalesRange.js +32 -14
  81. package/build/features/connect/Connect.d.ts +2 -1
  82. package/build/features/connect/Connect.js +40 -10
  83. package/build/features/connect/screens/CivilID/CivilID.d.ts +5 -0
  84. package/build/features/connect/screens/CivilID/CivilID.js +85 -0
  85. package/build/features/connect/screens/CivilID/IDNumber.d.ts +7 -0
  86. package/build/features/connect/screens/CivilID/IDNumber.js +59 -0
  87. package/build/features/connect/screens/CivilID/index.d.ts +3 -0
  88. package/build/features/connect/screens/CivilID/index.js +2 -0
  89. package/build/features/connect/screens/CivilID/validation.d.ts +8 -0
  90. package/build/features/connect/screens/CivilID/validation.js +4 -0
  91. package/build/features/connect/screens/Individual/Individual.js +6 -2
  92. package/build/features/connect/screens/Merchant/Merchant.js +35 -11
  93. package/build/features/connect/screens/Merchant/SalesChannels.d.ts +5 -0
  94. package/build/features/connect/screens/Merchant/SalesChannels.js +114 -0
  95. package/build/features/connect/screens/Merchant/SocialMedia.js +56 -11
  96. package/build/features/connect/screens/Merchant/validation.d.ts +87 -0
  97. package/build/features/connect/screens/Merchant/validation.js +68 -2
  98. package/build/features/connect/screens/Mobile/Mobile.js +7 -4
  99. package/build/features/connect/screens/VerifyPACI/VerifyPACI.d.ts +5 -0
  100. package/build/features/connect/screens/VerifyPACI/VerifyPACI.js +169 -0
  101. package/build/features/connect/screens/VerifyPACI/VerifyPACILoading.d.ts +5 -0
  102. package/build/features/connect/screens/VerifyPACI/VerifyPACILoading.js +22 -0
  103. package/build/features/connect/screens/VerifyPACI/VerifyPACISuccess.d.ts +5 -0
  104. package/build/features/connect/screens/VerifyPACI/VerifyPACISuccess.js +8 -0
  105. package/build/features/connect/screens/VerifyPACI/index.d.ts +3 -0
  106. package/build/features/connect/screens/VerifyPACI/index.js +2 -0
  107. package/build/features/entity/Entity.d.ts +7 -0
  108. package/build/features/entity/Entity.js +70 -0
  109. package/build/features/entity/index.d.ts +1 -0
  110. package/build/features/entity/index.js +1 -0
  111. package/build/features/entity/screens/EntityInfoConfirm/ActivitiesList.d.ts +54 -0
  112. package/build/features/entity/screens/EntityInfoConfirm/ActivitiesList.js +139 -0
  113. package/build/features/entity/screens/EntityInfoConfirm/EntityInfo.d.ts +5 -0
  114. package/build/features/entity/screens/EntityInfoConfirm/EntityInfo.js +56 -0
  115. package/build/features/entity/screens/EntityInfoConfirm/LicenseName.d.ts +5 -0
  116. package/build/features/entity/screens/EntityInfoConfirm/LicenseName.js +17 -0
  117. package/build/features/entity/screens/EntityInfoConfirm/LicenseNumber.d.ts +5 -0
  118. package/build/features/entity/screens/EntityInfoConfirm/LicenseNumber.js +28 -0
  119. package/build/features/entity/screens/EntityInfoConfirm/OperationStartDate.d.ts +6 -0
  120. package/build/features/entity/screens/EntityInfoConfirm/OperationStartDate.js +38 -0
  121. package/build/features/entity/screens/EntityInfoConfirm/SalesChannels.d.ts +5 -0
  122. package/build/features/entity/screens/EntityInfoConfirm/SalesChannels.js +112 -0
  123. package/build/features/entity/screens/EntityInfoConfirm/index.d.ts +2 -0
  124. package/build/features/entity/screens/EntityInfoConfirm/index.js +2 -0
  125. package/build/features/entity/screens/EntityInfoConfirm/validation.d.ts +107 -0
  126. package/build/features/entity/screens/EntityInfoConfirm/validation.js +17 -0
  127. package/build/features/entity/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +5 -0
  128. package/build/features/entity/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +9 -0
  129. package/build/features/entity/screens/ResetPasswordSuccess/index.d.ts +3 -0
  130. package/build/features/entity/screens/ResetPasswordSuccess/index.js +2 -0
  131. package/build/features/entity/screens/Success/Success.d.ts +5 -0
  132. package/build/features/entity/screens/Success/Success.js +16 -0
  133. package/build/features/entity/screens/Success/index.d.ts +3 -0
  134. package/build/features/entity/screens/Success/index.js +2 -0
  135. package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +3 -0
  136. package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +109 -0
  137. package/build/features/entity/screens/SuccessWithFlowButtons/index.d.ts +2 -0
  138. package/build/features/entity/screens/SuccessWithFlowButtons/index.js +2 -0
  139. package/build/features/entity/screens/Verify/OTPInput.d.ts +7 -0
  140. package/build/features/entity/screens/Verify/OTPInput.js +47 -0
  141. package/build/features/entity/screens/Verify/Verify.d.ts +5 -0
  142. package/build/features/entity/screens/Verify/Verify.js +78 -0
  143. package/build/features/entity/screens/Verify/index.d.ts +2 -0
  144. package/build/features/entity/screens/Verify/index.js +2 -0
  145. package/build/features/entity/screens/Verify/validation.d.ts +8 -0
  146. package/build/features/entity/screens/Verify/validation.js +4 -0
  147. package/build/features/featuresScreens.d.ts +3 -0
  148. package/build/features/featuresScreens.js +48 -0
  149. package/build/features/individual/Individual.d.ts +1 -1
  150. package/build/features/individual/Individual.js +12 -5
  151. package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +1 -1
  152. package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +14 -3
  153. package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.js +11 -3
  154. package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.js +2 -2
  155. package/build/features/otp/OTP.d.ts +7 -0
  156. package/build/features/otp/OTP.js +58 -0
  157. package/build/features/otp/index.d.ts +0 -0
  158. package/build/features/otp/index.js +1 -0
  159. package/build/features/otp/screens/OTPVerify/OTPInput.d.ts +6 -0
  160. package/build/features/otp/screens/OTPVerify/OTPInput.js +47 -0
  161. package/build/features/otp/screens/OTPVerify/Verify.d.ts +5 -0
  162. package/build/features/otp/screens/OTPVerify/Verify.js +49 -0
  163. package/build/features/otp/screens/OTPVerify/index.d.ts +2 -0
  164. package/build/features/otp/screens/OTPVerify/index.js +2 -0
  165. package/build/features/otp/screens/OTPVerify/validation.d.ts +8 -0
  166. package/build/features/otp/screens/OTPVerify/validation.js +4 -0
  167. package/build/features/password/Password.d.ts +1 -1
  168. package/build/features/password/Password.js +12 -5
  169. package/build/features/shared/Background/Background.d.ts +7 -5
  170. package/build/features/shared/Background/Background.js +16 -5
  171. package/build/features/shared/Dialog/CloseDialog.d.ts +11 -0
  172. package/build/features/shared/Dialog/CloseDialog.js +62 -0
  173. package/build/features/shared/Dialog/DialogContainer.d.ts +8 -0
  174. package/build/features/shared/Dialog/DialogContainer.js +56 -0
  175. package/build/features/shared/Dialog/index.d.ts +4 -0
  176. package/build/features/shared/Dialog/index.js +4 -0
  177. package/build/features/shared/Input/Input.d.ts +1 -1
  178. package/build/features/shared/Input/Input.js +2 -2
  179. package/build/features/shared/UploadFile/UploadFile.d.ts +8 -3
  180. package/build/features/shared/UploadFile/UploadFile.js +23 -8
  181. package/build/features/signIn/SignIn.d.ts +1 -1
  182. package/build/features/signIn/SignIn.js +12 -4
  183. package/build/features/tax/Tax.d.ts +1 -1
  184. package/build/features/tax/Tax.js +12 -4
  185. package/build/hooks/index.d.ts +1 -0
  186. package/build/hooks/index.js +1 -0
  187. package/build/hooks/useAppConfig.js +2 -0
  188. package/build/hooks/useAppDispatch.d.ts +3 -0
  189. package/build/hooks/useErrorListener.js +3 -2
  190. package/build/hooks/useScreen.d.ts +3 -0
  191. package/build/hooks/useScreen.js +14 -0
  192. package/build/index.d.ts +5 -2
  193. package/build/index.js +11 -2
  194. package/build/utils/device.d.ts +1 -0
  195. package/build/utils/device.js +13 -0
  196. package/build/utils/html.d.ts +1 -0
  197. package/build/utils/html.js +6 -0
  198. package/build/utils/locale.js +1 -1
  199. package/build/utils/rsa.d.ts +2 -2
  200. package/build/utils/rsa.js +1 -1
  201. package/build/utils/string.d.ts +22 -20
  202. package/build/utils/string.js +9 -0
  203. package/package.json +1 -1
@@ -14,17 +14,28 @@ import { memo } from 'react';
14
14
  import { styled } from '@mui/material/styles';
15
15
  import Box from '@mui/material/Box';
16
16
  import LogoBackground from './LogoBackground';
17
- var BackgroundStyled = styled(Box, { shouldForwardProp: function (prop) { return prop !== 'isTapOrigin'; } })(function (_a) {
18
- var isTapOrigin = _a.isTapOrigin, theme = _a.theme;
17
+ import { BACKGROUND_ID } from '../../../constants';
18
+ import { useScreen } from '../../../hooks';
19
+ var BackgroundStyled = styled(Box, {
20
+ shouldForwardProp: function (prop) { return !['isTapOrigin', 'open', 'isSmall'].includes(prop); }
21
+ })(function (_a) {
22
+ var isTapOrigin = _a.isTapOrigin, open = _a.open, isSmall = _a.isSmall;
19
23
  return ({
20
24
  width: '100vw',
21
25
  height: '100vh',
22
- background: isTapOrigin ? 'linear-gradient(180deg, #98ABAF 0%, #D9D6CC 100%)' : 'rgba(0, 0, 0, 0.5)'
26
+ zIndex: isSmall ? 'auto' : 999,
27
+ position: 'absolute',
28
+ background: !open
29
+ ? 'inherit'
30
+ : isTapOrigin
31
+ ? 'linear-gradient(180deg, #98ABAF 0%, #D9D6CC 100%)'
32
+ : 'rgba(0, 0, 0, 0.5)'
23
33
  });
24
34
  });
25
35
  var Background = function (_a) {
26
- var children = _a.children, isTapOrigin = _a.isTapOrigin, loading = _a.loading;
36
+ var children = _a.children, isTapOrigin = _a.isTapOrigin, loading = _a.loading, hideLogo = _a.hideLogo, sx = _a.sx, open = _a.open;
27
37
  var showLogo = !loading && isTapOrigin;
28
- return (_jsxs(BackgroundStyled, __assign({ id: 'background', isTapOrigin: isTapOrigin }, { children: [showLogo && _jsx(LogoBackground, {}), children] })));
38
+ var small = useScreen().small;
39
+ return (_jsxs(BackgroundStyled, __assign({ id: BACKGROUND_ID, isSmall: small, isTapOrigin: isTapOrigin, sx: sx, open: open }, { children: [showLogo && !hideLogo && _jsx(LogoBackground, {}), children] })));
29
40
  };
30
41
  export default memo(Background);
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ interface CloseDialogStyledProps {
3
+ message?: string;
4
+ confirmTitle: string;
5
+ closeTitle: string;
6
+ open: boolean;
7
+ onConfirm?: () => void;
8
+ onCancel?: () => void;
9
+ }
10
+ export default function CloseDialog({ message, confirmTitle, closeTitle, open, onConfirm, onCancel }: CloseDialogStyledProps): JSX.Element;
11
+ export {};
@@ -0,0 +1,62 @@
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 { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
13
+ import { alpha, styled } from '@mui/material/styles';
14
+ import Collapse from '../../../components/Collapse';
15
+ import Text from '../../../components/Text';
16
+ import Box from '@mui/material/Box';
17
+ var ConfirmCloseBox = styled(Box)(function (_a) {
18
+ var theme = _a.theme;
19
+ return ({
20
+ position: 'absolute',
21
+ backgroundColor: theme.palette.common.white,
22
+ borderRadius: theme.spacing(1),
23
+ height: theme.spacing(5.5),
24
+ display: 'flex',
25
+ justifyContent: 'space-evenly',
26
+ alignItems: 'center',
27
+ zIndex: 20,
28
+ width: '100%',
29
+ bottom: theme.spacing(2.625)
30
+ });
31
+ });
32
+ var DisableBoxStyled = styled(Box)(function (_a) {
33
+ var theme = _a.theme;
34
+ return ({
35
+ backgroundColor: alpha(theme.palette.common.black, 0.5),
36
+ zIndex: 10,
37
+ position: 'absolute',
38
+ top: 0,
39
+ left: 0,
40
+ width: '100%',
41
+ height: '100%',
42
+ borderRadius: theme.spacing(1.5)
43
+ });
44
+ });
45
+ var YesTextStyled = styled(Text)(function (_a) {
46
+ var theme = _a.theme;
47
+ return ({
48
+ color: theme.palette.primary.main,
49
+ cursor: 'pointer'
50
+ });
51
+ });
52
+ var NoTextStyled = styled(Text)(function (_a) {
53
+ var theme = _a.theme;
54
+ return ({
55
+ color: theme.palette.primary.dark,
56
+ cursor: 'pointer'
57
+ });
58
+ });
59
+ export default function CloseDialog(_a) {
60
+ var message = _a.message, confirmTitle = _a.confirmTitle, closeTitle = _a.closeTitle, open = _a.open, onConfirm = _a.onConfirm, onCancel = _a.onCancel;
61
+ return (_jsxs(Collapse, __assign({ in: open }, { children: [_jsx(Box, { children: _jsxs(ConfirmCloseBox, { children: [_jsxs(Text, { children: [" ", message] }), _jsx(YesTextStyled, __assign({ onClick: onConfirm }, { children: confirmTitle })), _jsx(NoTextStyled, __assign({ onClick: onCancel }, { children: closeTitle }))] }) }), _jsx(DisableBoxStyled, { id: 'disable-container' })] })));
62
+ }
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ export interface DialogProps {
3
+ onClose?: () => void;
4
+ onConfirm?: () => void;
5
+ children: React.ReactElement;
6
+ isTapOrigin?: boolean;
7
+ }
8
+ export default function Dialog({ isTapOrigin, onClose, children, onConfirm }: DialogProps): JSX.Element;
@@ -0,0 +1,56 @@
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, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
13
+ import React from 'react';
14
+ import { styled } from '@mui/material/styles';
15
+ import { useTranslation } from 'react-i18next';
16
+ import Icon from '../../../components/Icon';
17
+ import Box from '@mui/material/Box';
18
+ import { ICONS_NAMES } from '../../../constants';
19
+ import CloseDialog from './CloseDialog';
20
+ var CloseIconStyled = styled(Icon)(function (_a) {
21
+ var theme = _a.theme;
22
+ return ({
23
+ width: theme.spacing(3.75),
24
+ height: theme.spacing(3.75)
25
+ });
26
+ });
27
+ var CloseBox = styled(Box, { shouldForwardProp: function (prop) { return prop !== 'isTapOrigin'; } })(function (_a) {
28
+ var theme = _a.theme, isTapOrigin = _a.isTapOrigin;
29
+ return ({
30
+ display: 'flex',
31
+ justifyContent: 'end',
32
+ marginBlockStart: theme.spacing(2),
33
+ marginInlineEnd: theme.spacing(2),
34
+ cursor: 'pointer',
35
+ direction: theme.direction,
36
+ position: isTapOrigin ? 'initial' : 'absolute',
37
+ right: 0,
38
+ left: 0
39
+ });
40
+ });
41
+ export default function Dialog(_a) {
42
+ var isTapOrigin = _a.isTapOrigin, onClose = _a.onClose, children = _a.children, onConfirm = _a.onConfirm;
43
+ var _b = React.useState(false), open = _b[0], setOpen = _b[1];
44
+ var t = useTranslation().t;
45
+ var handleOnCloseButton = function () {
46
+ setOpen(true);
47
+ onClose && onClose();
48
+ };
49
+ var handleOnConfirm = function () {
50
+ onConfirm && onConfirm();
51
+ };
52
+ var handleOnCancel = function () {
53
+ setOpen(false);
54
+ };
55
+ return (_jsxs(_Fragment, { children: [onClose && (_jsx(CloseBox, __assign({ isTapOrigin: isTapOrigin, id: 'close-container', onClick: handleOnCloseButton }, { children: _jsx(CloseIconStyled, { src: ICONS_NAMES.CLOSE_ICON }) }))), children, onClose && (_jsx(CloseDialog, { message: t('confirm_close_flow_title'), confirmTitle: t('confirm_close_flow_yes'), closeTitle: t('confirm_close_flow_no'), open: open, onConfirm: handleOnConfirm, onCancel: handleOnCancel }))] }));
56
+ }
@@ -0,0 +1,4 @@
1
+ import DialogContainer from './DialogContainer';
2
+ import CloseDialog from './CloseDialog';
3
+ export { CloseDialog };
4
+ export default DialogContainer;
@@ -0,0 +1,4 @@
1
+ import DialogContainer from './DialogContainer';
2
+ import CloseDialog from './CloseDialog';
3
+ export { CloseDialog };
4
+ export default DialogContainer;
@@ -22,5 +22,5 @@ interface CustomButtonProps extends InputProps {
22
22
  label?: string;
23
23
  required?: boolean;
24
24
  }
25
- export default function CustomInput({ label, required, ...props }: CustomButtonProps): JSX.Element;
25
+ export default function CustomInput({ label, required, placeholder, ...props }: CustomButtonProps): JSX.Element;
26
26
  export {};
@@ -51,6 +51,6 @@ var LabelContainerStyled = styled(Box)(function (_a) {
51
51
  });
52
52
  });
53
53
  export default function CustomInput(_a) {
54
- var label = _a.label, required = _a.required, props = __rest(_a, ["label", "required"]);
55
- return (_jsxs(_Fragment, { children: [label && (_jsxs(LabelContainerStyled, { children: [_jsx(InputLabelStyled, { children: label }), required && _jsx(Mandatory, {})] })), _jsx(InputStyled, __assign({}, props))] }));
54
+ var label = _a.label, required = _a.required, placeholder = _a.placeholder, props = __rest(_a, ["label", "required", "placeholder"]);
55
+ return (_jsxs(_Fragment, { children: [label && (_jsxs(LabelContainerStyled, { children: [_jsx(InputLabelStyled, { children: label }), required && _jsx(Mandatory, {})] })), _jsx(InputStyled, __assign({}, props, { placeholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder.toString() }))] }));
56
56
  }
@@ -10,12 +10,17 @@ export declare const InputContainerStyled: import("@emotion/styled").StyledCompo
10
10
  interface UploadFileProps {
11
11
  label: string;
12
12
  required?: boolean;
13
- dragTitle: string;
14
- uploadTitle: string;
13
+ title: string;
14
+ subTitle: string;
15
+ dragDescription: string;
16
+ uploadingTitle: string;
17
+ successTitle: string;
15
18
  error?: string;
16
19
  isSubmitting?: boolean;
20
+ isUploading?: boolean;
21
+ isFileUploaded?: boolean;
17
22
  onFileUploaded: (file: File) => void;
18
23
  onReset: () => void;
19
24
  }
20
- declare const UploadFile: ({ label, required, dragTitle, uploadTitle, isSubmitting, error, onFileUploaded, onReset }: UploadFileProps) => JSX.Element;
25
+ declare const UploadFile: ({ label, required, title, subTitle, dragDescription, uploadingTitle, successTitle, isSubmitting, isUploading, isFileUploaded, error, onFileUploaded, onReset }: UploadFileProps) => JSX.Element;
21
26
  export default UploadFile;
@@ -16,10 +16,14 @@ import { ScreenContainer } from '../../shared/Containers';
16
16
  import Box from '@mui/material/Box';
17
17
  import { InputLabelStyled } from '../../shared/Input/Input';
18
18
  import Mandatory from '../../shared/Mandatory';
19
- import { DragAndDrop, UploadInput } from '../../../components/FileInput';
19
+ import { DragAndDrop } from '../../../components/FileInput';
20
20
  import Collapse from '../../../components/Collapse';
21
- import Warning from '../../../components/Warning';
22
21
  import ClearIcon from '@mui/icons-material/Clear';
22
+ import CheckIcon from '../../../features/shared/CheckIcon';
23
+ import { maskFileName } from '../../../utils';
24
+ import Icon from '../../../components/Icon';
25
+ import { ICONS_NAMES } from '../../../constants';
26
+ import Text from '../../../components/Text';
23
27
  var FeatureStyled = styled(ScreenContainer)(function (_a) {
24
28
  var theme = _a.theme;
25
29
  return ({
@@ -36,11 +40,11 @@ var LabelContainerStyled = styled(Box)(function (_a) {
36
40
  });
37
41
  var BoxStyled = styled(Box)(function (_a) {
38
42
  var theme = _a.theme;
39
- return (__assign(__assign({ direction: theme.direction }, theme.typography.subtitle2), { color: theme.palette.primary.main, fontWeight: theme.typography.fontWeightBold, background: theme.palette.background.default, padding: theme.spacing(1.5, 2.5, 1.5), width: '85%', wordBreak: 'break-all' }));
43
+ return (__assign(__assign({ direction: theme.direction }, theme.typography.subtitle2), { color: theme.palette.primary.main, fontWeight: theme.typography.fontWeightBold, background: theme.palette.background.default, padding: theme.spacing(1.5, 2.5, 1.5), width: '88%', wordBreak: 'break-all', display: 'flex', justifyContent: 'space-between' }));
40
44
  });
41
45
  var UploadBoxStyled = styled(Box)(function (_a) {
42
46
  var theme = _a.theme;
43
- return (__assign(__assign({}, theme.typography.caption), { background: theme.palette.primary.main, color: theme.palette.common.white, fontWeight: theme.typography.fontWeightRegular, cursor: 'pointer', width: '15%', display: 'flex', justifyContent: 'center', alignItems: 'center' }));
47
+ return (__assign(__assign({}, theme.typography.caption), { background: theme.palette.primary.main, color: theme.palette.common.white, fontWeight: theme.typography.fontWeightRegular, cursor: 'pointer', width: '12%', display: 'flex', justifyContent: 'center', alignItems: 'center' }));
44
48
  });
45
49
  var ClearIconStyled = styled(ClearIcon)(function (_a) {
46
50
  var theme = _a.theme;
@@ -55,14 +59,16 @@ export var InputContainerStyled = styled(Box)(function (_a) {
55
59
  var theme = _a.theme;
56
60
  return ({
57
61
  display: 'flex',
58
- width: '100%'
62
+ width: '100%',
63
+ justifyContent: 'center'
59
64
  });
60
65
  });
61
66
  var UploadFile = function (_a) {
62
- var label = _a.label, required = _a.required, dragTitle = _a.dragTitle, uploadTitle = _a.uploadTitle, isSubmitting = _a.isSubmitting, error = _a.error, onFileUploaded = _a.onFileUploaded, onReset = _a.onReset;
67
+ var label = _a.label, required = _a.required, title = _a.title, subTitle = _a.subTitle, dragDescription = _a.dragDescription, uploadingTitle = _a.uploadingTitle, successTitle = _a.successTitle, isSubmitting = _a.isSubmitting, isUploading = _a.isUploading, isFileUploaded = _a.isFileUploaded, error = _a.error, onFileUploaded = _a.onFileUploaded, onReset = _a.onReset;
63
68
  var _b = React.useState(''), fileName = _b[0], setFileName = _b[1];
69
+ var _c = React.useState(false), showFile = _c[0], setShowFile = _c[1];
64
70
  var handleFileChange = function (file) {
65
- setFileName(file === null || file === void 0 ? void 0 : file.name);
71
+ setFileName(maskFileName(file === null || file === void 0 ? void 0 : file.name));
66
72
  onFileUploaded === null || onFileUploaded === void 0 ? void 0 : onFileUploaded(file);
67
73
  };
68
74
  var handleReset = function () {
@@ -71,6 +77,15 @@ var UploadFile = function (_a) {
71
77
  onReset === null || onReset === void 0 ? void 0 : onReset();
72
78
  }
73
79
  };
74
- return (_jsxs(FeatureStyled, { children: [_jsxs(LabelContainerStyled, { children: [_jsx(InputLabelStyled, { children: label }), required && _jsx(Mandatory, {})] }), _jsx(Collapse, __assign({ in: !fileName }, { children: _jsxs(InputContainerStyled, { children: [_jsx(DragAndDrop, { title: dragTitle, onSuccess: handleFileChange }), _jsx(UploadInput, { title: uploadTitle, onChange: handleFileChange })] }) })), _jsx(Collapse, __assign({ in: !!fileName }, { children: _jsxs(InputContainerStyled, { children: [_jsx(BoxStyled, { children: fileName }), _jsx(UploadBoxStyled, __assign({ onClick: handleReset }, { children: _jsx(ClearIconStyled, {}) }))] }) })), _jsx(Collapse, __assign({ in: !!error, timeout: 400 }, { children: _jsx(Warning, __assign({ warningType: 'alert' }, { children: error })) }))] }));
80
+ React.useEffect(function () {
81
+ if (isFileUploaded && !!fileName) {
82
+ setTimeout(function () {
83
+ setShowFile(true);
84
+ }, 800);
85
+ }
86
+ else
87
+ setShowFile(false);
88
+ }, [isFileUploaded]);
89
+ return (_jsxs(FeatureStyled, { children: [_jsxs(LabelContainerStyled, { children: [_jsx(InputLabelStyled, { children: label }), required && _jsx(Mandatory, {})] }), _jsx(Collapse, __assign({ in: !showFile }, { children: _jsx(InputContainerStyled, { children: _jsx(DragAndDrop, { title: title, subTitle: subTitle, description: dragDescription, fileExists: !!fileName, uploadingTitle: uploadingTitle, successTitle: successTitle, uploading: isUploading, uploadSuccess: isFileUploaded, onSuccess: handleFileChange, error: error }) }) })), _jsx(Collapse, __assign({ in: showFile, timeout: 300 }, { children: _jsxs(InputContainerStyled, { children: [_jsxs(BoxStyled, { children: [_jsxs(Box, __assign({ sx: { display: 'flex' } }, { children: [_jsx(Icon, { src: ICONS_NAMES.DOC_ICON }), _jsx(Text, { children: fileName })] })), _jsx(Box, { children: _jsx(CheckIcon, {}) })] }), _jsx(UploadBoxStyled, __assign({ onClick: handleReset }, { children: _jsx(ClearIconStyled, {}) }))] }) }))] }));
75
90
  };
76
91
  export default UploadFile;
@@ -4,4 +4,4 @@ export interface SignInLibProps extends LibConfig {
4
4
  }
5
5
  export declare function SignInLib(props: SignInLibProps): JSX.Element;
6
6
  export declare function renderSignInLib(config: SignInLibProps, elementId: string): void;
7
- export declare function unmountSignInLib(elementId: string): void;
7
+ export declare function unmountSignInLib(elementId: string, unmountTimeout?: number): void;
@@ -19,7 +19,7 @@ import { ReduxProvider, ThemeProvider } from '../../components/Providers';
19
19
  import Collapse from '../../components/Collapse';
20
20
  import { reactElement } from '../../utils';
21
21
  import { FeatureContainer } from '../shared/Containers';
22
- import { SigIn_SCREENS_NAVIGATION } from '../../constants';
22
+ import { DIALOG_ID, SigIn_SCREENS_NAVIGATION } from '../../constants';
23
23
  import { signInFeatureScreens } from '../featuresScreens';
24
24
  import CustomFooter from '../shared/Footer';
25
25
  import { signInSelector } from '../app/signIn/signInStore';
@@ -32,7 +32,7 @@ var SignIn = memo(function (props) {
32
32
  useErrorListener(signInError || error);
33
33
  useStepStartedListener();
34
34
  var activeScreen = data.activeScreen, isTapOrigin = data.isTapOrigin, open = data.open;
35
- return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ isTapOrigin: isTapOrigin, loading: loading }, { children: _jsx(AnimationFlow, __assign({ isTapOrigin: isTapOrigin, open: open, error: error, loading: loading, breakpoint: 'sm', footer: _jsx(CustomFooter, {}), screenId: activeScreen.name }, { children: _jsx(FeatureContainer, { children: signInFeatureScreens.map(function (_a, index) {
35
+ return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ open: open, isTapOrigin: isTapOrigin, loading: loading }, { children: _jsx(AnimationFlow, __assign({ isTapOrigin: isTapOrigin, open: open, error: error, loading: loading, breakpoint: 'sm', footer: _jsx(CustomFooter, {}), screenId: activeScreen.name }, { children: _jsx(FeatureContainer, { children: signInFeatureScreens.map(function (_a, index) {
36
36
  var Element = _a.element, name = _a.name;
37
37
  var isActive = activeScreen.name === name;
38
38
  return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
@@ -44,6 +44,14 @@ export function SignInLib(props) {
44
44
  export function renderSignInLib(config, elementId) {
45
45
  reactElement(elementId).render(_jsx(SignInLib, __assign({}, config)));
46
46
  }
47
- export function unmountSignInLib(elementId) {
48
- reactElement(elementId).unmount();
47
+ export function unmountSignInLib(elementId, unmountTimeout) {
48
+ if (unmountTimeout === void 0) { unmountTimeout = 1000; }
49
+ var element = document.getElementById(elementId);
50
+ var dialogEl = document.getElementById(DIALOG_ID);
51
+ setTimeout(function () {
52
+ var _a;
53
+ ((_a = element === null || element === void 0 ? void 0 : element.children) === null || _a === void 0 ? void 0 : _a.length) && element.removeChild(element.children[0]);
54
+ dialogEl && dialogEl.remove();
55
+ reactElement(elementId).unmount();
56
+ }, unmountTimeout);
49
57
  }
@@ -4,4 +4,4 @@ export interface TaxLibProps extends LibConfig {
4
4
  }
5
5
  export declare function TaxLib(props: TaxLibProps): JSX.Element;
6
6
  export declare function renderTaxLib(config: TaxLibProps, elementId: string): void;
7
- export declare function unmountTaxLib(elementId: string): void;
7
+ export declare function unmountTaxLib(elementId: string, unmountTimeout?: number): void;
@@ -19,7 +19,7 @@ import { ReduxProvider, ThemeProvider } from '../../components/Providers';
19
19
  import Collapse from '../../components/Collapse';
20
20
  import { getParameterByName, reactElement } from '../../utils';
21
21
  import { FeatureContainer } from '../shared/Containers';
22
- import { TAX_SCREENS_NAVIGATION } from '../../constants';
22
+ import { DIALOG_ID, TAX_SCREENS_NAVIGATION } from '../../constants';
23
23
  import { taxFeatureScreens } from '../featuresScreens';
24
24
  import CustomFooter from '../shared/Footer';
25
25
  import { taxSelector, verifyLeadToken } from '../app/tax/taxStore';
@@ -46,7 +46,7 @@ var Tax = memo(function (props) {
46
46
  if (!loading)
47
47
  verifyToken();
48
48
  }, [loading]);
49
- return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ isTapOrigin: isTapOrigin, loading: loading || customLoading }, { children: _jsx(AnimationFlow, __assign({ isTapOrigin: isTapOrigin, open: open, error: error, loading: loading || customLoading, breakpoint: 'sm', footer: _jsx(CustomFooter, {}), screenId: activeScreen.name }, { children: _jsx(FeatureContainer, { children: taxFeatureScreens.map(function (_a, index) {
49
+ return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ open: open, isTapOrigin: isTapOrigin, loading: loading || customLoading }, { children: _jsx(AnimationFlow, __assign({ isTapOrigin: isTapOrigin, open: open, error: error, loading: loading || customLoading, breakpoint: 'sm', footer: _jsx(CustomFooter, {}), screenId: activeScreen.name }, { children: _jsx(FeatureContainer, { children: taxFeatureScreens.map(function (_a, index) {
50
50
  var Element = _a.element, name = _a.name;
51
51
  var isActive = activeScreen.name === name;
52
52
  return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
@@ -58,6 +58,14 @@ export function TaxLib(props) {
58
58
  export function renderTaxLib(config, elementId) {
59
59
  reactElement(elementId).render(_jsx(TaxLib, __assign({}, config)));
60
60
  }
61
- export function unmountTaxLib(elementId) {
62
- reactElement(elementId).unmount();
61
+ export function unmountTaxLib(elementId, unmountTimeout) {
62
+ if (unmountTimeout === void 0) { unmountTimeout = 1000; }
63
+ var element = document.getElementById(elementId);
64
+ var dialogEl = document.getElementById(DIALOG_ID);
65
+ setTimeout(function () {
66
+ var _a;
67
+ ((_a = element === null || element === void 0 ? void 0 : element.children) === null || _a === void 0 ? void 0 : _a.length) && element.removeChild(element.children[0]);
68
+ dialogEl && dialogEl.remove();
69
+ reactElement(elementId).unmount();
70
+ }, unmountTimeout);
63
71
  }
@@ -10,3 +10,4 @@ export * from './useAppConfig';
10
10
  export * from './useErrorListener';
11
11
  export * from './useWindowSize';
12
12
  export * from './useStepStartedListener';
13
+ export * from './useScreen';
@@ -10,3 +10,4 @@ export * from './useAppConfig';
10
10
  export * from './useErrorListener';
11
11
  export * from './useWindowSize';
12
12
  export * from './useStepStartedListener';
13
+ export * from './useScreen';
@@ -49,6 +49,8 @@ export var useAppConfig = function (_a) {
49
49
  dispatch(handleOpen(rest.open));
50
50
  }, [rest.open]);
51
51
  useEffect(function () {
52
+ if (rest.open === false)
53
+ return;
52
54
  removeRequestHeaders();
53
55
  checkDomain();
54
56
  setBaseUrl();
@@ -7,4 +7,7 @@ export declare const useAppDispatch: () => import("redux-thunk").ThunkDispatch<{
7
7
  individual: import("../features/app/individual/individualStore").IndividualState;
8
8
  password: import("../features/app/password/passwordStore").PasswordState;
9
9
  signIn: import("../features/app/signIn/signInStore").SignInState;
10
+ entity: import("../features/app/entity/entityStore").EntityState;
11
+ otp: import("../features/app/otp/otpStore").OtpState;
12
+ auth: import("../features/app/auth/authStore").AuthState;
10
13
  }, undefined, import("redux").AnyAction> & import("redux").Dispatch<import("redux").AnyAction>;
@@ -11,7 +11,8 @@ export var useErrorListener = function (error) {
11
11
  }, [error]);
12
12
  useEffect(function () {
13
13
  var _a, _b;
14
- if (!settings.error)
14
+ if (!settings.error && !settings.loading) {
15
15
  (_b = (_a = settings.data.appConfig).onReady) === null || _b === void 0 ? void 0 : _b.call(_a);
16
- }, [settings.error]);
16
+ }
17
+ }, [settings.error, settings.loading]);
17
18
  };
@@ -0,0 +1,3 @@
1
+ export declare const useScreen: (breakpoint?: 'xs' | 'sm' | 'md' | 'lg' | 'xl') => {
2
+ small: boolean;
3
+ };
@@ -0,0 +1,14 @@
1
+ import { useEffect, useState } from 'react';
2
+ import { useWindowSize } from '.';
3
+ import { useTheme } from '@mui/material/styles';
4
+ export var useScreen = function (breakpoint) {
5
+ if (breakpoint === void 0) { breakpoint = 'sm'; }
6
+ var _a = useState(false), small = _a[0], setSmall = _a[1];
7
+ var width = useWindowSize().width;
8
+ var theme = useTheme();
9
+ useEffect(function () {
10
+ var target = theme.breakpoints.values[breakpoint || 'sm'];
11
+ setSmall(width < target);
12
+ }, [width]);
13
+ return { small: small };
14
+ };
package/build/index.d.ts CHANGED
@@ -7,5 +7,8 @@ import { IndividualLib, renderIndividualLib, IndividualLibProps, unmountIndividu
7
7
  import { BankLib, renderBankLib, BankLibProps, unmountBankLib } from './features/bank';
8
8
  import { TaxLib, renderTaxLib, TaxLibProps, unmountTaxLib } from './features/tax';
9
9
  import { SignInLib, renderSignInLib, SignInLibProps, unmountSignInLib } from './features/signIn';
10
- export type { ConnectLibProps, BusinessLibProps, PasswordLibProps, IndividualLibProps, BankLibProps, TaxLibProps, SignInLibProps };
11
- export { ConnectLib, renderConnectLib, unmountConnectLib, BusinessLib, renderBusinessLib, unmountBusinessLib, PasswordLib, renderPasswordLib, unmountPasswordLib, IndividualLib, renderIndividualLib, unmountIndividualLib, BankLib, renderBankLib, unmountBankLib, TaxLib, renderTaxLib, unmountTaxLib, SignInLib, renderSignInLib, unmountSignInLib };
10
+ import { EntityLib, EntityLibProps, renderEntityLib, unmountEntityLib } from './features/entity';
11
+ import { OTPLib, OTPLibProps, renderOTPLib, unmountOTPLib } from './features/otp/OTP';
12
+ import { AuthLib, AuthLibProps, renderAuthLib, unmountAuthLib } from './features/auth';
13
+ export type { ConnectLibProps, BusinessLibProps, PasswordLibProps, IndividualLibProps, BankLibProps, TaxLibProps, EntityLibProps, OTPLibProps, AuthLibProps, SignInLibProps };
14
+ export { ConnectLib, renderConnectLib, unmountConnectLib, BusinessLib, renderBusinessLib, unmountBusinessLib, PasswordLib, renderPasswordLib, unmountPasswordLib, IndividualLib, renderIndividualLib, unmountIndividualLib, BankLib, renderBankLib, unmountBankLib, TaxLib, renderTaxLib, unmountTaxLib, EntityLib, renderEntityLib, unmountEntityLib, OTPLib, renderOTPLib, unmountOTPLib, SignInLib, renderSignInLib, unmountSignInLib, AuthLib, renderAuthLib, unmountAuthLib };
package/build/index.js CHANGED
@@ -7,7 +7,10 @@ import { IndividualLib, renderIndividualLib, unmountIndividualLib } from './feat
7
7
  import { BankLib, renderBankLib, unmountBankLib } from './features/bank';
8
8
  import { TaxLib, renderTaxLib, unmountTaxLib } from './features/tax';
9
9
  import { SignInLib, renderSignInLib, unmountSignInLib } from './features/signIn';
10
- export { ConnectLib, renderConnectLib, unmountConnectLib, BusinessLib, renderBusinessLib, unmountBusinessLib, PasswordLib, renderPasswordLib, unmountPasswordLib, IndividualLib, renderIndividualLib, unmountIndividualLib, BankLib, renderBankLib, unmountBankLib, TaxLib, renderTaxLib, unmountTaxLib, SignInLib, renderSignInLib, unmountSignInLib };
10
+ import { EntityLib, renderEntityLib, unmountEntityLib } from './features/entity';
11
+ import { OTPLib, renderOTPLib, unmountOTPLib } from './features/otp/OTP';
12
+ import { AuthLib, renderAuthLib, unmountAuthLib } from './features/auth';
13
+ export { ConnectLib, renderConnectLib, unmountConnectLib, BusinessLib, renderBusinessLib, unmountBusinessLib, PasswordLib, renderPasswordLib, unmountPasswordLib, IndividualLib, renderIndividualLib, unmountIndividualLib, BankLib, renderBankLib, unmountBankLib, TaxLib, renderTaxLib, unmountTaxLib, EntityLib, renderEntityLib, unmountEntityLib, OTPLib, renderOTPLib, unmountOTPLib, SignInLib, renderSignInLib, unmountSignInLib, AuthLib, renderAuthLib, unmountAuthLib };
11
14
  window['TapAuth'] = {
12
15
  renderConnectLib: renderConnectLib,
13
16
  unmountConnectLib: unmountConnectLib,
@@ -21,7 +24,13 @@ window['TapAuth'] = {
21
24
  unmountBankLib: unmountBankLib,
22
25
  renderTaxLib: renderTaxLib,
23
26
  unmountTaxLib: unmountTaxLib,
27
+ renderEntityLib: renderEntityLib,
28
+ unmountEntityLib: unmountEntityLib,
29
+ renderOTPLib: renderOTPLib,
30
+ unmountOTPLib: unmountOTPLib,
24
31
  renderSignInLib: renderSignInLib,
25
- unmountSignInLib: unmountSignInLib
32
+ unmountSignInLib: unmountSignInLib,
33
+ renderAuthLib: renderAuthLib,
34
+ unmountAuthLib: unmountAuthLib
26
35
  };
27
36
  console.log("TapAuth version: ".concat(require('../package.json').version));
@@ -2,3 +2,4 @@ import { DeviceDetectorResult } from 'device-detector-js';
2
2
  import { GetResult } from '@fingerprintjs/fingerprintjs';
3
3
  export declare const getBrowserInfo: () => DeviceDetectorResult;
4
4
  export declare const getFingerPrint: () => Promise<GetResult>;
5
+ export declare const mobileOS: () => 'Windows Phone' | 'Android' | 'iOS' | 'unknown';
@@ -11,3 +11,16 @@ export var getFingerPrint = function () {
11
11
  });
12
12
  });
13
13
  };
14
+ export var mobileOS = function () {
15
+ var userAgent = navigator.userAgent || navigator.vendor || window.opera;
16
+ if (/windows phone/i.test(userAgent)) {
17
+ return 'Windows Phone';
18
+ }
19
+ if (/android/i.test(userAgent)) {
20
+ return 'Android';
21
+ }
22
+ if (/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) {
23
+ return 'iOS';
24
+ }
25
+ return 'unknown';
26
+ };
@@ -2,3 +2,4 @@ export declare const createElementAndInject: (id: string) => HTMLDivElement;
2
2
  export declare const reactElement: (elementId: string) => import("react-dom/client").Root;
3
3
  export declare const scrollUp: (elementId: string, top?: number) => void;
4
4
  export declare const scrollDown: (elementId: string) => void;
5
+ export declare const removeElement: (elementId: string) => void;
@@ -24,3 +24,9 @@ export var scrollDown = function (elementId) {
24
24
  return;
25
25
  el.scrollTop = 0;
26
26
  };
27
+ export var removeElement = function (elementId) {
28
+ var el = document.getElementById(elementId);
29
+ if (!el)
30
+ return;
31
+ el.remove();
32
+ };
@@ -1,7 +1,7 @@
1
1
  import { initReactI18next } from 'react-i18next';
2
2
  import i18n from '../i18n';
3
3
  export var updateLocale = function (locale, country) {
4
- var data = locale[country.toUpperCase()] || locale['default'];
4
+ var data = locale['SA'] || locale[country.toUpperCase()] || locale['default'];
5
5
  if (i18n.isInitialized) {
6
6
  i18n.removeResourceBundle('*', 'translation');
7
7
  i18n.addResourceBundle('en', 'translation', data.en.translation);
@@ -1,2 +1,2 @@
1
- export declare const encryptObject: (data: unknown) => string | false;
2
- export declare const encryptString: (string: string) => string;
1
+ export declare const encryptObject: (data: unknown) => any;
2
+ export declare const encryptString: (string: string) => any;
@@ -1,5 +1,5 @@
1
- import { JSEncrypt } from 'jsencrypt';
2
1
  import { RSA_FRONTEND_MW_PUBLIC_KEY } from '../constants';
2
+ var JSEncrypt = require('jsencrypt').JSEncrypt;
3
3
  var rsa = new JSEncrypt();
4
4
  rsa.setPublicKey(RSA_FRONTEND_MW_PUBLIC_KEY);
5
5
  export var encryptObject = function (data) {
@@ -3,6 +3,7 @@ export declare const maskPhone: (str?: string) => string;
3
3
  export declare const maskID: (str: string) => string;
4
4
  export declare const maskEmail: (str: string) => string;
5
5
  export declare const showLastFour: (str: string) => string;
6
+ export declare const maskFileName: (str: string) => string;
6
7
  export declare const getIndividualName: (name: string) => {
7
8
  first: string;
8
9
  middle: string;
@@ -15,29 +16,30 @@ export declare const getFlowUrl: (path: string, lang: string) => string;
15
16
  export declare const getResetFlowUrl: (path: string, lang: string, operationType: string, id: string, infoId: string) => string;
16
17
  export declare const capitalizeTheFirstLetterOfEachWord: (words: string) => string;
17
18
  export declare const getRequestHeaders: (deviceInfo: DeviceInfo) => {
18
- al: string;
19
- at: string;
20
- aid: string;
21
- an: string;
22
- av: string;
23
- acv: string;
24
- asv: string;
25
- rn: string;
26
- rt: string;
27
- rb: string;
28
- rm: string;
29
- ro: string;
30
- rov: string;
31
- bn: string;
32
- bb: string;
33
- bv: string;
34
- bua: string;
19
+ al: any;
20
+ at: any;
21
+ aid: any;
22
+ an: any;
23
+ av: any;
24
+ acv: any;
25
+ asv: any;
26
+ rn: any;
27
+ rt: any;
28
+ rb: any;
29
+ rm: any;
30
+ ro: any;
31
+ rov: any;
32
+ bn: any;
33
+ bb: any;
34
+ bv: any;
35
+ bua: any;
35
36
  bi: string;
36
- ci: string;
37
- cm: string;
38
- l: string;
37
+ ci: any;
38
+ cm: any;
39
+ l: any;
39
40
  };
40
41
  export declare const removeRequestHeaders: () => void;
41
42
  export declare const getBaseUrl: () => string;
42
43
  export declare const getScreenNameBasedOnFlow: (flow: string) => "CONNECT_NID_STEP" | "" | "BUSINESS_BUSINESS_TYPE_STEP" | "INDIVIDUAL_ADDITIONAL_INDIVIDUAL_INFO_STEP" | "BANK_BANK_DETAILS_STEP" | "TAX_TAX_DETAILS_STEP";
43
44
  export declare const getEighteenYearsAgo: () => string;
45
+ export declare const isKW: (flag: string) => boolean;