@tap-payments/auth-jsconnect 2.10.0-beta → 2.10.0-development

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 (192) hide show
  1. package/build/@types/app.d.ts +7 -1
  2. package/build/@types/app.js +7 -0
  3. package/build/@types/form.d.ts +3 -0
  4. package/build/@types/index.d.ts +1 -0
  5. package/build/@types/index.js +1 -0
  6. package/build/@types/terminal.d.ts +116 -0
  7. package/build/@types/terminal.js +1 -0
  8. package/build/api/account.d.ts +1 -0
  9. package/build/api/account.js +7 -0
  10. package/build/api/auth.d.ts +10 -1
  11. package/build/api/index.d.ts +9 -1
  12. package/build/api/index.js +3 -1
  13. package/build/api/terminal.d.ts +23 -0
  14. package/build/api/terminal.js +60 -0
  15. package/build/app/rootReducer.d.ts +1 -0
  16. package/build/app/rootReducer.js +3 -1
  17. package/build/app/settings.d.ts +1 -0
  18. package/build/app/settings.js +9 -4
  19. package/build/app/store.d.ts +2 -0
  20. package/build/assets/currencies/SARSymbol.d.ts +7 -0
  21. package/build/assets/currencies/SARSymbol.js +28 -0
  22. package/build/assets/currencies/index.d.ts +2 -0
  23. package/build/assets/currencies/index.js +2 -0
  24. package/build/assets/currencies/utils.d.ts +4 -0
  25. package/build/assets/currencies/utils.js +4 -0
  26. package/build/assets/locales/ar.json +10 -1
  27. package/build/assets/locales/en.json +36 -1
  28. package/build/components/DeviceCard/DeviceCard.d.ts +18 -0
  29. package/build/components/DeviceCard/DeviceCard.js +103 -0
  30. package/build/components/DeviceCard/index.d.ts +3 -0
  31. package/build/components/DeviceCard/index.js +2 -0
  32. package/build/components/TextWithCurrency/TextWithCurrency.d.ts +7 -0
  33. package/build/components/TextWithCurrency/TextWithCurrency.js +14 -0
  34. package/build/components/TextWithCurrency/index.d.ts +2 -0
  35. package/build/components/TextWithCurrency/index.js +2 -0
  36. package/build/components/Tooltip/Tooltip.js +1 -1
  37. package/build/constants/api.d.ts +1 -1
  38. package/build/constants/api.js +2 -2
  39. package/build/constants/app.d.ts +14 -3
  40. package/build/constants/app.js +151 -14
  41. package/build/constants/assets.d.ts +8 -0
  42. package/build/constants/assets.js +14 -3
  43. package/build/constants/flows.d.ts +14 -0
  44. package/build/constants/flows.js +14 -0
  45. package/build/constants/validation.d.ts +2 -0
  46. package/build/constants/validation.js +2 -0
  47. package/build/features/app/auth/authStore.d.ts +24 -5
  48. package/build/features/app/auth/authStore.js +186 -89
  49. package/build/features/app/business/businessStore.js +53 -29
  50. package/build/features/app/connect/connectStore.js +47 -35
  51. package/build/features/app/connectExpress/connectExpressStore.d.ts +14 -3
  52. package/build/features/app/connectExpress/connectExpressStore.js +301 -109
  53. package/build/features/app/individual/individualStore.js +0 -1
  54. package/build/features/app/kyc/kycStore.js +49 -25
  55. package/build/features/app/tax/taxStore.js +1 -1
  56. package/build/features/app/terminal/terminalStore.d.ts +106 -0
  57. package/build/features/app/terminal/terminalStore.js +635 -0
  58. package/build/features/auth/screens/OTP/OTP.d.ts +13 -2
  59. package/build/features/auth/screens/OTP/OTP.js +15 -3
  60. package/build/features/auth/screens/OTP/index.d.ts +1 -2
  61. package/build/features/auth/screens/Passcode/Passcode.d.ts +16 -0
  62. package/build/features/auth/screens/Passcode/Passcode.js +82 -0
  63. package/build/features/auth/screens/Passcode/PasscodeInput.d.ts +6 -0
  64. package/build/features/auth/screens/Passcode/PasscodeInput.js +42 -0
  65. package/build/features/auth/screens/Passcode/index.d.ts +2 -0
  66. package/build/features/auth/screens/Passcode/index.js +2 -0
  67. package/build/features/auth/screens/Passcode/validation.d.ts +8 -0
  68. package/build/features/auth/screens/Passcode/validation.js +4 -0
  69. package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.js +3 -8
  70. package/build/features/business/screens/Customers/ExpectedSalesRange.js +3 -8
  71. package/build/features/business/screens/MobileOwnership/CollectMobileOwnership.js +4 -6
  72. package/build/features/connect/screens/MobileOwnership/CollectMobileOwnership.js +4 -6
  73. package/build/features/connectExpress/screens/GenericPrepareDataLoading/GenericPrepareDataLoading.d.ts +3 -0
  74. package/build/features/connectExpress/screens/GenericPrepareDataLoading/GenericPrepareDataLoading.js +9 -0
  75. package/build/features/connectExpress/screens/GenericPrepareDataLoading/index.d.ts +2 -0
  76. package/build/features/connectExpress/screens/GenericPrepareDataLoading/index.js +2 -0
  77. package/build/features/connectExpress/screens/MobileOwnership/CollectMobileOwnership.js +4 -6
  78. package/build/features/connectExpress/screens/VerifyMobileAuthOTP/OTPInput.d.ts +5 -0
  79. package/build/features/connectExpress/screens/VerifyMobileAuthOTP/OTPInput.js +49 -0
  80. package/build/features/connectExpress/screens/VerifyMobileAuthOTP/VerifyMobileAuthOTP.d.ts +5 -0
  81. package/build/features/connectExpress/screens/VerifyMobileAuthOTP/VerifyMobileAuthOTP.js +88 -0
  82. package/build/features/connectExpress/screens/VerifyMobileAuthOTP/index.d.ts +3 -0
  83. package/build/features/connectExpress/screens/VerifyMobileAuthOTP/index.js +2 -0
  84. package/build/features/connectExpress/screens/VerifyMobileAuthOTP/validation.d.ts +8 -0
  85. package/build/features/connectExpress/screens/VerifyMobileAuthOTP/validation.js +4 -0
  86. package/build/features/connectExpress/screens/VerifyNafath/VerifyNafath.js +9 -3
  87. package/build/features/entity/screens/EntityCapital/CapitalPaid.js +3 -7
  88. package/build/features/entity/screens/EntityCapital/CapitalShareValue.js +3 -7
  89. package/build/features/featuresScreens.d.ts +1 -0
  90. package/build/features/featuresScreens.js +72 -0
  91. package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +3 -8
  92. package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.js +3 -8
  93. package/build/features/kyc/screens/Terms/Terms.js +8 -2
  94. package/build/features/kyc/screens/Users/Users.js +1 -1
  95. package/build/features/shared/Background/LogoBackground.js +5 -17
  96. package/build/features/shared/Button/Button.js +2 -3
  97. package/build/features/shared/Button/FlowsButtons.js +2 -1
  98. package/build/features/shared/Input/Input.d.ts +1 -1
  99. package/build/features/shared/PushNotification/PushNotification.d.ts +11 -0
  100. package/build/features/shared/PushNotification/PushNotification.js +34 -0
  101. package/build/features/shared/PushNotification/index.d.ts +2 -0
  102. package/build/features/shared/PushNotification/index.js +2 -0
  103. package/build/features/shared/SuccessScreen/SuccessScreen.d.ts +3 -1
  104. package/build/features/shared/SuccessScreen/SuccessScreen.js +2 -2
  105. package/build/features/terminal/Terminal.d.ts +14 -0
  106. package/build/features/terminal/Terminal.js +95 -0
  107. package/build/features/terminal/index.d.ts +1 -0
  108. package/build/features/terminal/index.js +1 -0
  109. package/build/features/terminal/screens/LinkNewTerminal/LinkNewTerminal.d.ts +3 -0
  110. package/build/features/terminal/screens/LinkNewTerminal/LinkNewTerminal.js +68 -0
  111. package/build/features/terminal/screens/LinkNewTerminal/index.d.ts +2 -0
  112. package/build/features/terminal/screens/LinkNewTerminal/index.js +2 -0
  113. package/build/features/terminal/screens/LinkNewTerminal/styles.d.ts +10 -0
  114. package/build/features/terminal/screens/LinkNewTerminal/styles.js +28 -0
  115. package/build/features/terminal/screens/LinkedSuccess/LinkedSuccess.d.ts +3 -0
  116. package/build/features/terminal/screens/LinkedSuccess/LinkedSuccess.js +50 -0
  117. package/build/features/terminal/screens/LinkedSuccess/index.d.ts +2 -0
  118. package/build/features/terminal/screens/LinkedSuccess/index.js +2 -0
  119. package/build/features/terminal/screens/LinkedTerminalInfo/LinkedTerminalInfo.d.ts +3 -0
  120. package/build/features/terminal/screens/LinkedTerminalInfo/LinkedTerminalInfo.js +50 -0
  121. package/build/features/terminal/screens/LinkedTerminalInfo/index.d.ts +2 -0
  122. package/build/features/terminal/screens/LinkedTerminalInfo/index.js +2 -0
  123. package/build/features/terminal/screens/Loading/Loading.d.ts +4 -0
  124. package/build/features/terminal/screens/Loading/Loading.js +10 -0
  125. package/build/features/terminal/screens/Loading/index.d.ts +2 -0
  126. package/build/features/terminal/screens/Loading/index.js +2 -0
  127. package/build/features/terminal/screens/NoTerminalLinked/NoTerminalLinked.d.ts +3 -0
  128. package/build/features/terminal/screens/NoTerminalLinked/NoTerminalLinked.js +57 -0
  129. package/build/features/terminal/screens/NoTerminalLinked/index.d.ts +2 -0
  130. package/build/features/terminal/screens/NoTerminalLinked/index.js +2 -0
  131. package/build/features/terminal/screens/NoTerminalLinked/styles.d.ts +36 -0
  132. package/build/features/terminal/screens/NoTerminalLinked/styles.js +34 -0
  133. package/build/features/terminal/screens/OperatorError/OperatorError.d.ts +5 -0
  134. package/build/features/terminal/screens/OperatorError/OperatorError.js +9 -0
  135. package/build/features/terminal/screens/OperatorError/index.d.ts +2 -0
  136. package/build/features/terminal/screens/OperatorError/index.js +2 -0
  137. package/build/features/terminal/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +3 -0
  138. package/build/features/terminal/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +21 -0
  139. package/build/features/terminal/screens/ResetPasswordSuccess/index.d.ts +2 -0
  140. package/build/features/terminal/screens/ResetPasswordSuccess/index.js +2 -0
  141. package/build/features/terminal/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +3 -0
  142. package/build/features/terminal/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +31 -0
  143. package/build/features/terminal/screens/SuccessWithFlowButtons/index.d.ts +2 -0
  144. package/build/features/terminal/screens/SuccessWithFlowButtons/index.js +2 -0
  145. package/build/features/terminal/screens/TerminalDeviceList/DeviceList.d.ts +9 -0
  146. package/build/features/terminal/screens/TerminalDeviceList/DeviceList.js +20 -0
  147. package/build/features/terminal/screens/TerminalDeviceList/Header.d.ts +6 -0
  148. package/build/features/terminal/screens/TerminalDeviceList/Header.js +23 -0
  149. package/build/features/terminal/screens/TerminalDeviceList/TerminalDeviceList.d.ts +3 -0
  150. package/build/features/terminal/screens/TerminalDeviceList/TerminalDeviceList.js +129 -0
  151. package/build/features/terminal/screens/TerminalDeviceList/index.d.ts +2 -0
  152. package/build/features/terminal/screens/TerminalDeviceList/index.js +2 -0
  153. package/build/features/terminal/screens/TerminalDeviceList/styles.d.ts +71 -0
  154. package/build/features/terminal/screens/TerminalDeviceList/styles.js +56 -0
  155. package/build/features/terminal/screens/UnlinkedSuccess/UnlinkedSuccess.d.ts +3 -0
  156. package/build/features/terminal/screens/UnlinkedSuccess/UnlinkedSuccess.js +52 -0
  157. package/build/features/terminal/screens/UnlinkedSuccess/index.d.ts +2 -0
  158. package/build/features/terminal/screens/UnlinkedSuccess/index.js +2 -0
  159. package/build/features/terminal/screens/UnlinkedTerminalInfo/TerminalList.d.ts +9 -0
  160. package/build/features/terminal/screens/UnlinkedTerminalInfo/TerminalList.js +16 -0
  161. package/build/features/terminal/screens/UnlinkedTerminalInfo/UnlinkedTerminalInfo.d.ts +3 -0
  162. package/build/features/terminal/screens/UnlinkedTerminalInfo/UnlinkedTerminalInfo.js +94 -0
  163. package/build/features/terminal/screens/UnlinkedTerminalInfo/index.d.ts +2 -0
  164. package/build/features/terminal/screens/UnlinkedTerminalInfo/index.js +2 -0
  165. package/build/features/terminal/screens/UnlinkedTerminalInfo/styles.d.ts +74 -0
  166. package/build/features/terminal/screens/UnlinkedTerminalInfo/styles.js +98 -0
  167. package/build/features/terminal/screens/Verify/OTPInput.d.ts +7 -0
  168. package/build/features/terminal/screens/Verify/OTPInput.js +51 -0
  169. package/build/features/terminal/screens/Verify/Verify.d.ts +5 -0
  170. package/build/features/terminal/screens/Verify/Verify.js +85 -0
  171. package/build/features/terminal/screens/Verify/index.d.ts +2 -0
  172. package/build/features/terminal/screens/Verify/index.js +2 -0
  173. package/build/features/terminal/screens/Verify/validation.d.ts +8 -0
  174. package/build/features/terminal/screens/Verify/validation.js +4 -0
  175. package/build/features/terminal/screens/shared/index.d.ts +2 -0
  176. package/build/features/terminal/screens/shared/index.js +2 -0
  177. package/build/features/terminal/screens/shared/styles.d.ts +72 -0
  178. package/build/features/terminal/screens/shared/styles.js +50 -0
  179. package/build/features/terminal/screens/shared/utils.d.ts +7 -0
  180. package/build/features/terminal/screens/shared/utils.js +24 -0
  181. package/build/hooks/useAppConfig.js +1 -1
  182. package/build/hooks/useAppDispatch.d.ts +1 -0
  183. package/build/index.d.ts +3 -2
  184. package/build/index.js +4 -2
  185. package/build/theme/palette.js +12 -0
  186. package/build/theme/typography.js +4 -0
  187. package/build/utils/common.d.ts +1 -1
  188. package/build/utils/common.js +7 -5
  189. package/build/utils/error.d.ts +1 -0
  190. package/build/utils/error.js +3 -0
  191. package/build/utils/string.d.ts +1 -1
  192. package/package.json +3 -4
@@ -4,14 +4,16 @@ import { connectExpressSelector, verifyNafathAsync } from '../../../app/connectE
4
4
  import NafathVerification from '../../../shared/NafathVerification';
5
5
  import { handlePrevScreenStep } from '../../../../app/settings';
6
6
  import { useAppDispatch, useAppSelector } from '../../../../hooks';
7
+ import GenericPrepareDataLoading from '../GenericPrepareDataLoading';
7
8
  var VerifyNafath = function () {
8
9
  var _a = React.useState(false), success = _a[0], setSuccess = _a[1];
9
10
  var _b = React.useState(false), failed = _b[0], setFailed = _b[1];
10
11
  var _c = React.useState(false), isReady = _c[0], setIsReady = _c[1];
12
+ var _d = React.useState(false), showLoadingScreen = _d[0], setShowLoadingScreen = _d[1];
11
13
  var dispatch = useAppDispatch();
12
14
  var data = useAppSelector(connectExpressSelector).data;
13
15
  var authData = (data.responseData || {}).authData;
14
- var _d = authData || {}, expiry = _d.expiry, app_url_android = _d.app_url_android, app_url_ios = _d.app_url_ios, random = _d.random;
16
+ var _e = authData || {}, expiry = _e.expiry, app_url_android = _e.app_url_android, app_url_ios = _e.app_url_ios, random = _e.random;
15
17
  React.useEffect(function () {
16
18
  if (authData && !isReady) {
17
19
  setIsReady(true);
@@ -20,7 +22,11 @@ var VerifyNafath = function () {
20
22
  React.useEffect(function () {
21
23
  if (!isReady)
22
24
  return;
23
- var promise = dispatch(verifyNafathAsync({ onSuccess: function () { return setSuccess(true); }, onFailure: function () { return setFailed(true); } }));
25
+ var promise = dispatch(verifyNafathAsync({
26
+ onSuccess: function () { return setSuccess(true); },
27
+ onFailure: function () { return setFailed(true); },
28
+ showLoadingScreenAfterNafathSuccess: function () { return setShowLoadingScreen(true); }
29
+ }));
24
30
  return function () {
25
31
  promise === null || promise === void 0 ? void 0 : promise.abort();
26
32
  };
@@ -30,6 +36,6 @@ var VerifyNafath = function () {
30
36
  }, []);
31
37
  if (!isReady)
32
38
  return null;
33
- return (_jsx(NafathVerification, { randomNumber: random, expiryInSeconds: expiry, success: success, failed: failed, urls: { android: app_url_android, ios: app_url_ios }, onFinish: function () { return onBack(); } }));
39
+ return showLoadingScreen ? (_jsx(GenericPrepareDataLoading, {})) : (_jsx(NafathVerification, { randomNumber: random, expiryInSeconds: expiry, success: success, failed: failed, urls: { android: app_url_android, ios: app_url_ios }, onFinish: function () { return onBack(); } }));
34
40
  };
35
41
  export default React.memo(VerifyNafath);
@@ -15,11 +15,12 @@ import { useTranslation } from 'react-i18next';
15
15
  import { useController, useFormContext } from 'react-hook-form';
16
16
  import { useAppDispatch, useAppSelector } from '../../../../hooks';
17
17
  import { settingsSelector } from '../../../../app/settings';
18
- import { formatNumberAsCurrency, getCurrencyByCountryIso2, removeAllCharsFromNumber } from '../../../../utils';
18
+ import { formatNumberAsCurrency, removeAllCharsFromNumber } from '../../../../utils';
19
19
  import { ScreenContainer } from '../../../shared/Containers';
20
20
  import Input from '../../../shared/Input';
21
21
  import { clearError } from '../../../app/entity/entityStore';
22
22
  import { EndAdornment } from '../../../shared/EndAdornment';
23
+ import TextWithCurrency from '../../../../components/TextWithCurrency';
23
24
  var CapitalPaid = function (_a) {
24
25
  var _b;
25
26
  var readOnly = _a.readOnly, isVerified = _a.isVerified;
@@ -34,14 +35,9 @@ var CapitalPaid = function (_a) {
34
35
  var value = formatNumberAsCurrency(removeAllCharsFromNumber(target.value));
35
36
  capitalPaidControl.field.onChange(value);
36
37
  };
37
- var getCurrency = React.useMemo(function () {
38
- return t(getCurrencyByCountryIso2(settingsData.businessCountry.iso2));
39
- }, [settingsData.businessCountry.iso2]);
40
38
  var capitalPaidControl = useController({ control: control, name: 'capitalPaid' });
41
39
  var capitalPaidValue = capitalPaidControl.field.value;
42
40
  var error = (_b = capitalPaidControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
43
- return (_jsx(ScreenContainer, __assign({ sx: { mt: 2.5 } }, { children: _jsx(Input, { readOnly: readOnly, label: t('capital_paid_label', {
44
- currency: getCurrency
45
- }), required: true, onChange: handleChange, value: capitalPaidValue, sx: { '& .MuiInputBase-input': { cursor: 'auto' } }, placeholder: t('capital_paid_hint'), warningType: 'alert', warningMessage: error && t(error), endAdornment: _jsx(EndAdornment, { value: capitalPaidValue, isVerified: isVerified }) }) })));
41
+ return (_jsx(ScreenContainer, __assign({ sx: { mt: 2.5 } }, { children: _jsx(Input, { readOnly: readOnly, label: _jsx(TextWithCurrency, { text: t('capital_paid_input_label'), countryCode: settingsData.businessCountry.iso2 }), required: true, onChange: handleChange, value: capitalPaidValue, sx: { '& .MuiInputBase-input': { cursor: 'auto' } }, placeholder: t('capital_paid_hint'), warningType: 'alert', warningMessage: error && t(error), endAdornment: _jsx(EndAdornment, { value: capitalPaidValue, isVerified: isVerified }) }) })));
46
42
  };
47
43
  export default React.memo(CapitalPaid);
@@ -13,13 +13,14 @@ import { jsx as _jsx } from "react/jsx-runtime";
13
13
  import * as React from 'react';
14
14
  import { useTranslation } from 'react-i18next';
15
15
  import { useController, useFormContext } from 'react-hook-form';
16
- import { formatNumberAsCurrency, getCurrencyByCountryIso2, removeAllCharsFromNumber } from '../../../../utils';
16
+ import { formatNumberAsCurrency, removeAllCharsFromNumber } from '../../../../utils';
17
17
  import { useAppDispatch, useAppSelector } from '../../../../hooks';
18
18
  import { settingsSelector } from '../../../../app/settings';
19
19
  import { ScreenContainer } from '../../../shared/Containers';
20
20
  import Input from '../../../shared/Input';
21
21
  import { clearError } from '../../../app/entity/entityStore';
22
22
  import { EndAdornment } from '../../../shared/EndAdornment';
23
+ import TextWithCurrency from '../../../../components/TextWithCurrency';
23
24
  var CapitalShareValue = function (_a) {
24
25
  var _b;
25
26
  var readOnly = _a.readOnly, isVerified = _a.isVerified;
@@ -34,14 +35,9 @@ var CapitalShareValue = function (_a) {
34
35
  var value = formatNumberAsCurrency(removeAllCharsFromNumber(target.value));
35
36
  capitalShareValueControl.field.onChange(value);
36
37
  };
37
- var getCurrency = React.useMemo(function () {
38
- return t(getCurrencyByCountryIso2(settingsData.businessCountry.iso2));
39
- }, [settingsData.businessCountry.iso2]);
40
38
  var capitalShareValueControl = useController({ control: control, name: 'capitalShareValue' });
41
39
  var capitalShareValueValue = capitalShareValueControl.field.value;
42
40
  var error = (_b = capitalShareValueControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
43
- return (_jsx(ScreenContainer, __assign({ sx: { mt: 2.5 } }, { children: _jsx(Input, { readOnly: readOnly, label: t('capital_share_value_label', {
44
- currency: getCurrency
45
- }), required: true, onChange: handleChange, value: capitalShareValueValue, sx: { '& .MuiInputBase-input': { cursor: 'auto' } }, placeholder: t('capital_share_value_hint'), warningType: 'alert', warningMessage: error && t(error), endAdornment: _jsx(EndAdornment, { value: capitalShareValueValue, isVerified: isVerified }) }) })));
41
+ return (_jsx(ScreenContainer, __assign({ sx: { mt: 2.5 } }, { children: _jsx(Input, { readOnly: readOnly, label: _jsx(TextWithCurrency, { text: t('capital_share_value_input_label'), countryCode: settingsData.businessCountry.iso2 }), required: true, onChange: handleChange, value: capitalShareValueValue, sx: { '& .MuiInputBase-input': { cursor: 'auto' } }, placeholder: t('capital_share_value_hint'), warningType: 'alert', warningMessage: error && t(error), endAdornment: _jsx(EndAdornment, { value: capitalShareValueValue, isVerified: isVerified }) }) })));
46
42
  };
47
43
  export default React.memo(CapitalShareValue);
@@ -12,3 +12,4 @@ export declare const entityFeatureScreens: Array<FeatureScreenStep>;
12
12
  export declare const brandFeatureScreens: Array<FeatureScreenStep>;
13
13
  export declare const boardFeatureScreens: Array<FeatureScreenStep>;
14
14
  export declare const kycFeatureScreens: Array<FeatureScreenStep>;
15
+ export declare const terminalFeatureScreens: Array<FeatureScreenStep>;
@@ -27,6 +27,7 @@ import ConnectExpressIdentityVerifyNafathScreen from './connectExpress/screens/I
27
27
  import ConnectExpressCollectIndividualScreen from './connectExpress/screens/CollectIndividualInfo';
28
28
  import ConnectExpressCollectDobScreen from './connectExpress/screens/DOB';
29
29
  import ConnectExpressCollectBusinessScreen from './connectExpress/screens/CollectBusinessInfo';
30
+ import ConnectExpressVerifyAuthMobileOtpScreen from './connectExpress/screens/VerifyMobileAuthOTP';
30
31
  import ConnectExpressCreateAccountLoaderScreen from './connectExpress/screens/CreateAccountLoader';
31
32
  import ConnectExpressPreparingDataLoaderScreen from './connectExpress/screens/PrepareDataLoading';
32
33
  import ConnectExpressSuccessFlowButtonsScreen from './connectExpress/screens/SuccessWithFlowButtons';
@@ -56,6 +57,7 @@ import AuthAccountCreatedLoaderScreen from './auth/screens/AccountCreatedLoader'
56
57
  import AuthEmailSentScreen from './auth/screens/EmailSent';
57
58
  import AuthMigratingDataScreen from './auth/screens/MigratingData';
58
59
  import AuthOperatorError from './auth/screens/OperatorError';
60
+ import AuthPasscodeScreen from './auth/screens/Passcode';
59
61
  import CustomersPage from './business/screens/Customers';
60
62
  import IDBODPage from './business/screens/IDBOD';
61
63
  import BusinessVerifyPage from './business/screens/Verify';
@@ -139,6 +141,18 @@ import KycOperatorErrorPage from './kyc/screens/OperatorError';
139
141
  import KycSuccessPage from './kyc/screens/Success';
140
142
  import KycTermsPage from './kyc/screens/Terms';
141
143
  import KycUsersPage from './kyc/screens/Users';
144
+ import TerminalLoadingPage from './terminal/screens/Loading';
145
+ import TerminalOperatorErrorPage from './terminal/screens/OperatorError';
146
+ import TerminalVerifyPage from './terminal/screens/Verify';
147
+ import NoTerminalLinkedPage from './terminal/screens/NoTerminalLinked';
148
+ import TerminalDeviceListPage from './terminal/screens/TerminalDeviceList';
149
+ import LinkNewTerminalPage from './terminal/screens/LinkNewTerminal';
150
+ import LinkedTerminalInfoPage from './terminal/screens/LinkedTerminalInfo';
151
+ import UnlinkedTerminalInfoPage from './terminal/screens/UnlinkedTerminalInfo';
152
+ import LinkedSuccessPage from './terminal/screens/LinkedSuccess';
153
+ import UnlinkedSuccessPage from './terminal/screens/UnlinkedSuccess';
154
+ import TerminalBoardPage from './terminal/screens/SuccessWithFlowButtons';
155
+ import TerminalResetPasswordSuccessPage from './terminal/screens/ResetPasswordSuccess';
142
156
  export var connectFeatureScreens = [
143
157
  {
144
158
  name: 'CONNECT_BUSINESS_COUNTRY_STEP',
@@ -262,6 +276,10 @@ export var connectExpressFeatureScreens = [
262
276
  name: 'CONNECT_EXPRESS_COLLECT_BUSINESS_INFO_STEP',
263
277
  element: ConnectExpressCollectBusinessScreen
264
278
  },
279
+ {
280
+ name: 'CONNECT_EXPRESS_VERIFY_AUTH_OTP_STEP',
281
+ element: ConnectExpressVerifyAuthMobileOtpScreen
282
+ },
265
283
  {
266
284
  name: 'CONNECT_EXPRESS_ACCOUNT_ALREADY_CREATED_STEP',
267
285
  element: ConnectExpressAccountAlreadyCreatedScreen
@@ -320,6 +338,10 @@ export var authFeatureScreens = [
320
338
  name: 'AUTH_OTP_STEP',
321
339
  element: AuthOTPScreen
322
340
  },
341
+ {
342
+ name: 'AUTH_PASSCODE_STEP',
343
+ element: AuthPasscodeScreen
344
+ },
323
345
  {
324
346
  name: 'AUTH_PASSWORD_STEP',
325
347
  element: AuthPasswordScreen
@@ -695,3 +717,53 @@ export var kycFeatureScreens = [
695
717
  element: KycSuccessPage
696
718
  }
697
719
  ];
720
+ export var terminalFeatureScreens = [
721
+ {
722
+ name: CONNECT_FLOWS.terminal.loadingData,
723
+ element: TerminalLoadingPage
724
+ },
725
+ {
726
+ name: CONNECT_FLOWS.terminal.operatorError,
727
+ element: TerminalOperatorErrorPage
728
+ },
729
+ {
730
+ name: CONNECT_FLOWS.terminal.verify,
731
+ element: TerminalVerifyPage
732
+ },
733
+ {
734
+ name: CONNECT_FLOWS.terminal.noTerminalLinked,
735
+ element: NoTerminalLinkedPage
736
+ },
737
+ {
738
+ name: CONNECT_FLOWS.terminal.terminalList,
739
+ element: TerminalDeviceListPage
740
+ },
741
+ {
742
+ name: CONNECT_FLOWS.terminal.terminalLinkNew,
743
+ element: LinkNewTerminalPage
744
+ },
745
+ {
746
+ name: CONNECT_FLOWS.terminal.linkedTerminalInfo,
747
+ element: LinkedTerminalInfoPage
748
+ },
749
+ {
750
+ name: CONNECT_FLOWS.terminal.unlinkedTerminalInfo,
751
+ element: UnlinkedTerminalInfoPage
752
+ },
753
+ {
754
+ name: CONNECT_FLOWS.terminal.terminalLinkedSuccess,
755
+ element: LinkedSuccessPage
756
+ },
757
+ {
758
+ name: CONNECT_FLOWS.terminal.terminalUnlinkedSuccess,
759
+ element: UnlinkedSuccessPage
760
+ },
761
+ {
762
+ name: CONNECT_FLOWS.terminal.board,
763
+ element: TerminalBoardPage
764
+ },
765
+ {
766
+ name: CONNECT_FLOWS.terminal.resetPassword,
767
+ element: TerminalResetPasswordSuccessPage
768
+ }
769
+ ];
@@ -16,7 +16,7 @@ import { useController, useFormContext } from 'react-hook-form';
16
16
  import Box from '@mui/material/Box';
17
17
  import { styled } from '@mui/material/styles';
18
18
  import { settingsSelector } from '../../../../app/settings';
19
- import { getCurrencyByCountryIso2, hasVerifiedValue } from '../../../../utils';
19
+ import { hasVerifiedValue } from '../../../../utils';
20
20
  import { useAppDispatch, useAppSelector, useLanguage } from '../../../../hooks';
21
21
  import Collapse from '../../../../components/Collapse';
22
22
  import Text from '../../../../components/Text';
@@ -26,6 +26,7 @@ import InputSelect from '../../../shared/InputSelect';
26
26
  import CheckIcon from '../../../shared/CheckIcon';
27
27
  import { ScreenContainer } from '../../../shared/Containers';
28
28
  import { EndAdornmentExpanded } from '../../../shared/EndAdornment';
29
+ import TextWithCurrency from '../../../../components/TextWithCurrency';
29
30
  var Container = styled(Box)(function () { return ({
30
31
  display: 'flex'
31
32
  }); });
@@ -45,16 +46,12 @@ var MonthlyIncome = function (props) {
45
46
  var settingsData = useAppSelector(settingsSelector).data;
46
47
  var monthlyIncomeList = (data.individualData.responseBody || {}).monthlyIncomeList;
47
48
  var monthlyIncomeControl = useController({ control: control, name: 'monthlyIncome' });
48
- var countryCode = settingsData.businessCountry;
49
49
  var user = (data.verify.responseBody || {}).user;
50
50
  var isMonthlyIncomeVerified = function (item) {
51
51
  if (!(item === null || item === void 0 ? void 0 : item.id))
52
52
  return false;
53
53
  return hasVerifiedValue(user === null || user === void 0 ? void 0 : user.data_verification, "monthly_income.".concat(item.id));
54
54
  };
55
- var getCurrency = React.useMemo(function () {
56
- return t(getCurrencyByCountryIso2(countryCode.iso2));
57
- }, [countryCode.iso2]);
58
55
  React.useEffect(function () {
59
56
  if ((monthlyIncomeList === null || monthlyIncomeList === void 0 ? void 0 : monthlyIncomeList.length) > 0) {
60
57
  setIncomeList(monthlyIncomeList);
@@ -83,9 +80,7 @@ var MonthlyIncome = function (props) {
83
80
  };
84
81
  var income = monthlyIncomeControl.field.value;
85
82
  var error = (_a = monthlyIncomeControl.fieldState.error) === null || _a === void 0 ? void 0 : _a.message;
86
- return (_jsx(Collapse, __assign({ in: props.show }, { children: _jsxs(ScreenContainer, __assign({ sx: { pb: 0 } }, { children: [_jsx(InputSelect, { label: t('please_enter_actual_income', {
87
- currency: getCurrency
88
- }), required: true, readOnly: props.readOnly, onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, placeholder: t('choose_any_source_of_income'), value: (isAr ? income === null || income === void 0 ? void 0 : income.range.ar : income === null || income === void 0 ? void 0 : income.range.en) || '', warningMessage: error && t(error), endAdornment: _jsx(EndAdornmentExpanded, { isVerified: isMonthlyIncomeVerified(income), anchorEl: anchorEl }) }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'range.en', searchValuePath: ['range.en', 'range.ar'], list: incomeList, onSelectItem: onSelectItem, renderItem: function (item) {
83
+ return (_jsx(Collapse, __assign({ in: props.show }, { children: _jsxs(ScreenContainer, __assign({ sx: { pb: 0 } }, { children: [_jsx(InputSelect, { label: _jsx(TextWithCurrency, { text: t('monthly_income'), countryCode: settingsData.businessCountry.iso2 }), required: true, readOnly: props.readOnly, onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, placeholder: t('choose_any_source_of_income'), value: (isAr ? income === null || income === void 0 ? void 0 : income.range.ar : income === null || income === void 0 ? void 0 : income.range.en) || '', warningMessage: error && t(error), endAdornment: _jsx(EndAdornmentExpanded, { isVerified: isMonthlyIncomeVerified(income), anchorEl: anchorEl }) }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'range.en', searchValuePath: ['range.en', 'range.ar'], list: incomeList, onSelectItem: onSelectItem, renderItem: function (item) {
89
84
  return (_jsxs(_Fragment, { children: [_jsx(Container, { children: _jsx(IncomeText, __assign({ isSelected: item.id === (income === null || income === void 0 ? void 0 : income.id) }, { children: isAr ? item.range.ar : item === null || item === void 0 ? void 0 : item.range.en })) }), item.id === (income === null || income === void 0 ? void 0 : income.id) && _jsx(CheckIcon, { isVerified: isMonthlyIncomeVerified(item) })] }));
90
85
  } }) }))] })) })));
91
86
  };
@@ -14,13 +14,14 @@ import * as React from 'react';
14
14
  import { useTranslation } from 'react-i18next';
15
15
  import { useController, useFormContext } from 'react-hook-form';
16
16
  import Collapse from '@mui/material/Collapse';
17
- import { formatNumberAsCurrency, getCurrencyByCountryIso2, removeAllCharsFromNumber } from '../../../../utils';
17
+ import { formatNumberAsCurrency, removeAllCharsFromNumber } from '../../../../utils';
18
18
  import { useAppDispatch, useAppSelector } from '../../../../hooks';
19
19
  import { settingsSelector } from '../../../../app/settings';
20
20
  import { ScreenContainer } from '../../../shared/Containers';
21
21
  import Input from '../../../shared/Input';
22
22
  import { individualSelector, clearError } from '../../../app/individual/individualStore';
23
23
  import { EndAdornment } from '../../../shared/EndAdornment';
24
+ import TextWithCurrency from '../../../../components/TextWithCurrency';
24
25
  var ShareValue = function (_a) {
25
26
  var _b;
26
27
  var show = _a.show, readOnly = _a.readOnly;
@@ -29,7 +30,6 @@ var ShareValue = function (_a) {
29
30
  var control = useFormContext().control;
30
31
  var bckError = useAppSelector(individualSelector).error;
31
32
  var dispatch = useAppDispatch();
32
- var countryCode = settingsData.businessCountry;
33
33
  var handleChange = function (_a) {
34
34
  var target = _a.target;
35
35
  if (bckError)
@@ -37,14 +37,9 @@ var ShareValue = function (_a) {
37
37
  var value = formatNumberAsCurrency(removeAllCharsFromNumber(target.value));
38
38
  shareValueControl.field.onChange(value);
39
39
  };
40
- var getCurrency = React.useMemo(function () {
41
- return t(getCurrencyByCountryIso2(countryCode.iso2));
42
- }, [countryCode.iso2]);
43
40
  var shareValueControl = useController({ control: control, name: 'shareValue' });
44
41
  var shareValue = shareValueControl.field.value;
45
42
  var error = (_b = shareValueControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
46
- return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(ScreenContainer, __assign({ sx: { mt: 2.5 } }, { children: _jsx(Input, { readOnly: readOnly, label: t('share_value_label', {
47
- currency: getCurrency
48
- }), onChange: handleChange, value: shareValue, sx: { '& .MuiInputBase-input': { cursor: 'auto' } }, placeholder: t('share_value_hint'), warningType: 'alert', warningMessage: error && t(error), endAdornment: _jsx(EndAdornment, { value: shareValue, error: error }) }) })) })));
43
+ return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(ScreenContainer, __assign({ sx: { mt: 2.5 } }, { children: _jsx(Input, { readOnly: readOnly, label: _jsx(TextWithCurrency, { text: t('share_value_input_label'), countryCode: settingsData.businessCountry.iso2 }), onChange: handleChange, value: shareValue, sx: { '& .MuiInputBase-input': { cursor: 'auto' } }, placeholder: t('share_value_hint'), warningType: 'alert', warningMessage: error && t(error), endAdornment: _jsx(EndAdornment, { value: shareValue, error: error }) }) })) })));
49
44
  };
50
45
  export default React.memo(ShareValue);
@@ -15,7 +15,7 @@ import { handleNextScreenStep, settingsSelector } from '../../../../app/settings
15
15
  import Box from '@mui/material/Box';
16
16
  import { styled } from '@mui/material/styles';
17
17
  import { useAppDispatch, useAppSelector, useLanguage, useSanitizedTranslation } from '../../../../hooks';
18
- import { getWebsiteLink, isSA, maskIDNumber } from '../../../../utils';
18
+ import { getWebsiteLink, isOtherThanKWOrSA, isSA, maskIDNumber } from '../../../../utils';
19
19
  import { CONNECT_FLOWS, EXTERNAL_LINKS } from '../../../../constants';
20
20
  import Button from '../../../shared/Button';
21
21
  import ScreenContainer from '../../../shared/Containers/ScreenContainer';
@@ -55,6 +55,7 @@ export var Terms = function () {
55
55
  var termsAndConditionsLink = getWebsiteLink(isAr, countryCode, EXTERNAL_LINKS.TERMS_CONDITIONS);
56
56
  var privacyPolicyLink = getWebsiteLink(isAr, countryCode, EXTERNAL_LINKS.PRIVACY_POLICY);
57
57
  var isSACountry = React.useMemo(function () { return isSA(settingsData.businessCountry.iso2); }, [settingsData.businessCountry.iso2]);
58
+ var isOtherThanKWOrSACountry = React.useMemo(function () { return isOtherThanKWOrSA(settingsData.businessCountry.iso2); }, [settingsData.businessCountry.iso2]);
58
59
  var onNext = function () {
59
60
  if (hasOneUserOnly) {
60
61
  if (isSACountry) {
@@ -76,6 +77,11 @@ export var Terms = function () {
76
77
  }
77
78
  dispatch(handleNextScreenStep(CONNECT_FLOWS.kyc.users));
78
79
  };
79
- return (_jsxs(ScreenContainer, { children: [_jsx(Header, { idNumber: idNumber }), _jsx(BoxStyled, __assign({ onClick: function () { return redirect(termsAndConditionsLink); } }, { children: st('kyc_terms_conditions') })), _jsx(BoxStyled, __assign({ onClick: function () { return redirect(termsAndConditionsLink); } }, { children: st('kyc_refund_policy') })), _jsx(BoxStyled, __assign({ onClick: function () { return redirect(termsAndConditionsLink); } }, { children: st('kyc_dispute_policy') })), _jsx(BoxStyled, __assign({ onClick: function () { return redirect(privacyPolicyLink); }, sx: { mb: error ? 3 : 0 } }, { children: st('kyc_privacy_policy') })), _jsx(Button, __assign({ sx: { mt: 3 }, disableBack: true, isAr: isAr, loading: loading, error: st(error || ''), onClick: onNext }, { children: isSACountry ? st('approve_with_nafath_app') : st('approve_with_paci_app') }))] }));
80
+ var getNextButtonTitle = function () {
81
+ if (isOtherThanKWOrSACountry)
82
+ return st('continue');
83
+ return isSACountry ? st('approve_with_nafath_app') : st('approve_with_paci_app');
84
+ };
85
+ return (_jsxs(ScreenContainer, { children: [_jsx(Header, { idNumber: idNumber }), _jsx(BoxStyled, __assign({ onClick: function () { return redirect(termsAndConditionsLink); } }, { children: st('kyc_terms_conditions') })), _jsx(BoxStyled, __assign({ onClick: function () { return redirect(termsAndConditionsLink); } }, { children: st('kyc_refund_policy') })), _jsx(BoxStyled, __assign({ onClick: function () { return redirect(termsAndConditionsLink); } }, { children: st('kyc_dispute_policy') })), _jsx(BoxStyled, __assign({ onClick: function () { return redirect(privacyPolicyLink); }, sx: { mb: error ? 3 : 0 } }, { children: st('kyc_privacy_policy') })), _jsx(Button, __assign({ disabled: isOtherThanKWOrSACountry, sx: { mt: 3 }, disableBack: true, isAr: isAr, loading: loading, error: st(error || ''), onClick: onNext }, { children: getNextButtonTitle() }))] }));
80
86
  };
81
87
  export default memo(Terms);
@@ -69,7 +69,7 @@ var Users = function () {
69
69
  })
70
70
  .catch(function () { });
71
71
  };
72
- return (_jsxs(ScreenContainer, __assign({ sx: { pl: 2, pr: 2 } }, { children: [_jsx(DescriptionStyled, { children: st('kyc_users_description', { provider: isSACountry ? 'NAFATH' : 'PACI' }) }), userList.map(function (user, index) {
72
+ return (_jsxs(ScreenContainer, __assign({ sx: { pl: 2, pr: 2, pb: 3 } }, { children: [_jsx(DescriptionStyled, { children: st('kyc_users_description', { provider: isSACountry ? 'NAFATH' : 'PACI' }) }), userList.map(function (user, index) {
73
73
  return (_jsx(BoxStyled, __assign({ onClick: function () { return onClickUser(user); } }, { children: (activeUser === null || activeUser === void 0 ? void 0 : activeUser.id) === user.id && loading ? (_jsx(Loader, { innerColor: 'black', outerColor: 'black', size: 8, style: { height: 20, width: 20 }, toggleAnimation: !!loading })) : (_jsxs(_Fragment, { children: [_jsx(ImgStyled, { src: ICONS_NAMES.individual_filled_icon }), maskIDNumber(user.identification.id), _jsx("span", {})] })) }), index));
74
74
  }), error && (_jsx(Warning, __assign({ sx: { mt: 3, mb: 3 }, warningType: 'error' }, { children: error })))] })));
75
75
  };
@@ -1,19 +1,16 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { memo } from 'react';
3
3
  import { styled } from '@mui/material/styles';
4
4
  import Box from '@mui/material/Box';
5
5
  import Icon from '../../../components/Icon';
6
6
  import { ICONS_NAMES } from '../../../constants';
7
- import { useLanguage } from '../../../hooks';
8
7
  var BoxStyled = styled(Box)(function (_a) {
9
8
  var _b;
10
9
  var theme = _a.theme;
11
10
  return (_b = {
12
11
  display: 'flex',
13
- flexDirection: 'column',
14
12
  justifyContent: 'center',
15
- alignItems: 'center',
16
- paddingTop: theme.spacing(5)
13
+ paddingTop: theme.spacing(10)
17
14
  },
18
15
  _b[theme.breakpoints.down('sm')] = {
19
16
  paddingTop: theme.spacing(11)
@@ -23,20 +20,11 @@ var BoxStyled = styled(Box)(function (_a) {
23
20
  var LogoBadgeStyled = styled(Icon)(function (_a) {
24
21
  var theme = _a.theme;
25
22
  return ({
26
- height: theme.spacing(8.875),
27
- width: theme.spacing(8.875)
28
- });
29
- });
30
- var LogoIconStyled = styled(Icon)(function (_a) {
31
- var theme = _a.theme;
32
- return ({
33
- width: theme.spacing(5.875),
34
- height: theme.spacing(3.625),
35
- marginTop: theme.spacing(2.5)
23
+ height: theme.spacing(9.5),
24
+ width: theme.spacing(19.322)
36
25
  });
37
26
  });
38
27
  var LogoBackground = function () {
39
- var isAr = useLanguage().isAr;
40
- return (_jsxs(BoxStyled, { children: [_jsx(LogoBadgeStyled, { src: ICONS_NAMES.TAP_LOGO_EN_ICON }), _jsx(LogoIconStyled, { src: isAr ? ICONS_NAMES.TAP_LOGO_TEXT_AR : ICONS_NAMES.TAP_LOGO_TEXT_EN, alt: 'tap logo' })] }));
28
+ return (_jsx(BoxStyled, { children: _jsx(LogoBadgeStyled, { src: ICONS_NAMES.TAP_LOGO, alt: 'tap logo' }) }));
41
29
  };
42
30
  export default memo(LogoBackground);
@@ -53,8 +53,7 @@ var BackIconStyled = styled(Icon, { shouldForwardProp: function (prop) { return
53
53
  var ButtonBoxStyled = styled(Box)(function (_a) {
54
54
  var theme = _a.theme;
55
55
  return ({
56
- margin: theme.spacing(0, 2.5, 2.5, 2.5),
57
- marginBlockStart: theme.spacing(5),
56
+ margin: theme.spacing(5, 2.5, 2.5, 2.5),
58
57
  maxHeight: theme.spacing(5.375),
59
58
  display: 'flex',
60
59
  alignItems: 'center',
@@ -113,5 +112,5 @@ export default function CustomButton(_a) {
113
112
  }, 500);
114
113
  };
115
114
  }, []);
116
- return (_jsxs(Fragment, { children: [_jsx(Collapse, __assign({ in: !!error && !hideError }, { children: _jsx(Warning, __assign({ sx: { mb: 1 }, warningType: 'error' }, { children: error })) })), _jsxs(ButtonBoxStyled, __assign({ sx: sx }, { children: [isBackEnabled && (_jsx(BackButtonStyled, __assign({ onClick: function () { return onBackClicked === null || onBackClicked === void 0 ? void 0 : onBackClicked(); }, isAr: isAr, type: 'reset', startIcon: _jsx(BackIconStyled, { isAr: isAr, src: ICONS_NAMES.WHITE_ARROW }) }, props))), _jsx(ButtonStyled, __assign({ disabled: disabled, isLoading: btnLoading, type: !btnLoading ? 'submit' : 'button', isBack: isBackEnabled, endIcon: btnLoading === false ? !disableNextIcon && _jsx(IconStyled, { isAr: isAr, src: ICONS_NAMES.WHITE_ARROW }) : undefined }, props, { children: !btnLoading ? (_jsxs(Text, __assign({ sx: { marginInlineEnd: isBackEnabled ? '-24px' : '-15px' } }, { children: [" ", children] }))) : (_jsx(Loader, { innerColor: 'white', outerColor: 'white', size: 15, toggleAnimation: !!btnLoading })) }))] }))] }));
115
+ return (_jsxs(Fragment, { children: [_jsx(Collapse, __assign({ in: !!error && !hideError }, { children: _jsx(Warning, __assign({ sx: { mb: 1 }, warningType: 'error' }, { children: error })) })), _jsxs(ButtonBoxStyled, __assign({ sx: sx }, { children: [isBackEnabled && (_jsx(BackButtonStyled, __assign({ isAr: isAr, type: 'reset', startIcon: _jsx(BackIconStyled, { isAr: isAr, src: ICONS_NAMES.WHITE_ARROW }) }, props, { onClick: function () { return onBackClicked === null || onBackClicked === void 0 ? void 0 : onBackClicked(); } }))), _jsx(ButtonStyled, __assign({ disabled: disabled, isLoading: btnLoading, type: !btnLoading ? 'submit' : 'button', isBack: isBackEnabled, endIcon: btnLoading === false ? !disableNextIcon && _jsx(IconStyled, { isAr: isAr, src: ICONS_NAMES.WHITE_ARROW }) : undefined }, props, { children: !btnLoading ? (_jsxs(Text, __assign({ sx: { marginInlineEnd: isBackEnabled ? '-24px' : '-15px' } }, { children: [" ", children] }))) : (_jsx(Loader, { innerColor: 'white', outerColor: 'white', size: 15, toggleAnimation: !!btnLoading })) }))] }))] }));
117
116
  }
@@ -163,6 +163,7 @@ export default function FlowsButtons(_a) {
163
163
  var isAr = useLanguage().isAr;
164
164
  var t = useTranslation().t;
165
165
  var onRedirect = function (item) {
166
+ var _a;
166
167
  if (!item.href)
167
168
  return;
168
169
  var name = item.name === FlowsTypes.BANK ? 'Wallet' : capitalize(item.name);
@@ -180,7 +181,7 @@ export default function FlowsButtons(_a) {
180
181
  return;
181
182
  }
182
183
  if (typeof settingsData.appConfig.onBoardButtonClick === 'function') {
183
- settingsData.appConfig.onBoardButtonClick({ name: item.name, token: item.token });
184
+ settingsData.appConfig.onBoardButtonClick({ name: item.name, token: item.token, countryCode: (_a = settingsData.businessCountry) === null || _a === void 0 ? void 0 : _a.iso2 });
184
185
  return;
185
186
  }
186
187
  dispatch(handleOpen(false));
@@ -20,7 +20,7 @@ export declare const InputStyled: import("@emotion/styled").StyledComponent<Pick
20
20
  warningType?: "alert" | "error" | "hint" | undefined;
21
21
  } & {} & import("@mui/system").MUIStyledCommonProps<Theme>, {}, {}>;
22
22
  export interface CustomInputProps extends InputProps {
23
- label?: string;
23
+ label?: string | JSX.Element;
24
24
  required?: boolean;
25
25
  labelSx?: SxProps<Theme>;
26
26
  }
@@ -0,0 +1,11 @@
1
+ import * as React from 'react';
2
+ export interface PushNotificationProps {
3
+ success: boolean;
4
+ failed?: boolean;
5
+ expiryInSeconds: number;
6
+ onFinish?: () => void;
7
+ children: React.ReactNode;
8
+ error: string;
9
+ }
10
+ declare const _default: React.MemoExoticComponent<({ success, failed, expiryInSeconds, onFinish, children, error }: PushNotificationProps) => JSX.Element>;
11
+ export default _default;
@@ -0,0 +1,34 @@
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 { useCountDown, useCountUp } from '../../../hooks';
16
+ import Warning from '../../../components/Warning';
17
+ import { ScreenContainer } from '../../shared/Containers';
18
+ var PushNotification = function (_a) {
19
+ var success = _a.success, failed = _a.failed, expiryInSeconds = _a.expiryInSeconds, onFinish = _a.onFinish, children = _a.children, error = _a.error;
20
+ var t = useTranslation().t;
21
+ var count = useCountUp({ start: 0, end: expiryInSeconds, sleepMS: 1000 }).count;
22
+ var errorWaitingTime = 3;
23
+ var failedCount = useCountDown({ startTimer: !!failed, start: errorWaitingTime, end: 0, sleepMS: 1000 }).count;
24
+ var remainingTime = expiryInSeconds - errorWaitingTime;
25
+ var isEnded = failed ? failedCount === 0 : count === expiryInSeconds;
26
+ var endPhaseStarted = count >= remainingTime;
27
+ React.useEffect(function () {
28
+ if (isEnded && onFinish)
29
+ onFinish();
30
+ }, [isEnded]);
31
+ var isErrorPhase = (endPhaseStarted && !success) || failed;
32
+ return (_jsxs(ScreenContainer, { children: [children, isErrorPhase && _jsx(Warning, __assign({ sx: { mt: 2 } }, { children: t(error) }))] }));
33
+ };
34
+ export default React.memo(PushNotification);
@@ -0,0 +1,2 @@
1
+ import PushNotification from './PushNotification';
2
+ export default PushNotification;
@@ -0,0 +1,2 @@
1
+ import PushNotification from './PushNotification';
2
+ export default PushNotification;
@@ -1,3 +1,4 @@
1
+ import { SxProps, Theme } from '@mui/material/styles';
1
2
  import * as React from 'react';
2
3
  export interface ThankYouProps {
3
4
  title?: string;
@@ -9,6 +10,7 @@ export interface ThankYouProps {
9
10
  description?: string | React.ReactElement;
10
11
  enableBack?: boolean;
11
12
  onBack?: () => void;
13
+ sx?: SxProps<Theme>;
12
14
  }
13
- declare const _default: React.MemoExoticComponent<({ title, description, showEmailProviders, onSuccess, successTitle, loading, error, enableBack, onBack }: ThankYouProps) => JSX.Element>;
15
+ declare const _default: React.MemoExoticComponent<({ title, description, showEmailProviders, onSuccess, successTitle, loading, error, enableBack, onBack, sx }: ThankYouProps) => JSX.Element>;
14
16
  export default _default;
@@ -55,9 +55,9 @@ var IconStyled = styled(Icon)(function (_a) {
55
55
  _b);
56
56
  });
57
57
  var ThankYou = function (_a) {
58
- var title = _a.title, description = _a.description, showEmailProviders = _a.showEmailProviders, onSuccess = _a.onSuccess, successTitle = _a.successTitle, loading = _a.loading, error = _a.error, enableBack = _a.enableBack, onBack = _a.onBack;
58
+ var title = _a.title, description = _a.description, showEmailProviders = _a.showEmailProviders, onSuccess = _a.onSuccess, successTitle = _a.successTitle, loading = _a.loading, error = _a.error, enableBack = _a.enableBack, onBack = _a.onBack, sx = _a.sx;
59
59
  var t = useTranslation().t;
60
60
  var isAr = useLanguage().isAr;
61
- return (_jsxs(ContainerStyled, { children: [_jsx(IconStyled, { src: ICONS_NAMES.SUCCESS_GIF, alt: 'loading...' }), _jsxs(TitleStyled, { children: [title, " "] }), description && _jsx(DescriptionStyled, { children: description }), showEmailProviders && (_jsx(MailBoxStyled, { children: _jsx(EmailProvidersButton, { gmail: { title: t('gmail_btn_open_title'), href: 'https://mail.google.com/mail/u/0/#inbox' }, outlook: { title: t('outlook_btn_open_title'), href: 'https://outlook.live.com/mail/0/' }, apple: { title: t('apple_btn_open_title'), href: 'mailto:' }, mail: { title: t('mail_btn_open_title'), href: 'mailto:' } }) })), onSuccess && !showEmailProviders && (_jsx(MailBoxStyled, { children: _jsx(SuccessButton, __assign({ onClick: onSuccess, disableBack: true, disableNextIcon: true, disabled: loading, isAr: isAr, loading: loading, error: t(error || '') }, { children: t(successTitle || '') })) })), enableBack && (_jsx(Button, __assign({ sx: { mb: 1.5, mt: 0 }, onClick: function () { return onBack === null || onBack === void 0 ? void 0 : onBack(); }, variant: 'text' }, { children: t('back') })))] }));
61
+ return (_jsxs(ContainerStyled, __assign({ sx: sx }, { children: [_jsx(IconStyled, { src: ICONS_NAMES.SUCCESS_GIF, alt: 'loading...' }), _jsxs(TitleStyled, { children: [title, " "] }), description && _jsx(DescriptionStyled, { children: description }), showEmailProviders && (_jsx(MailBoxStyled, { children: _jsx(EmailProvidersButton, { gmail: { title: t('gmail_btn_open_title'), href: 'https://mail.google.com/mail/u/0/#inbox' }, outlook: { title: t('outlook_btn_open_title'), href: 'https://outlook.live.com/mail/0/' }, apple: { title: t('apple_btn_open_title'), href: 'mailto:' }, mail: { title: t('mail_btn_open_title'), href: 'mailto:' } }) })), onSuccess && !showEmailProviders && (_jsx(MailBoxStyled, { children: _jsx(SuccessButton, __assign({ onClick: onSuccess, disableBack: true, disableNextIcon: true, disabled: loading, isAr: isAr, loading: loading, error: t(error || '') }, { children: t(successTitle || '') })) })), enableBack && (_jsx(Button, __assign({ sx: { mb: 1.5, mt: 0 }, onClick: function () { return onBack === null || onBack === void 0 ? void 0 : onBack(); }, variant: 'text' }, { children: t('back') })))] })));
62
62
  };
63
63
  export default React.memo(ThankYou);
@@ -0,0 +1,14 @@
1
+ /// <reference types="react" />
2
+ import { LibConfig } from '../../@types';
3
+ export interface TerminalLibProps extends LibConfig {
4
+ verifyToken?: string;
5
+ configToken?: string;
6
+ loaderColor?: string;
7
+ }
8
+ export interface TerminalLibFullProps extends TerminalLibProps {
9
+ unmount?: () => void;
10
+ }
11
+ export declare function TerminalElement(props: TerminalLibFullProps): JSX.Element;
12
+ export declare function renderTerminalLib(config: TerminalLibProps, elementId: string): {
13
+ unmount: () => void;
14
+ };