@tap-payments/auth-jsconnect 1.0.90-test → 2.0.0

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 (220) hide show
  1. package/README.md +60 -54
  2. package/build/@types/app.d.ts +9 -0
  3. package/build/@types/app.js +9 -0
  4. package/build/@types/form.d.ts +2 -0
  5. package/build/api/account.js +1 -1
  6. package/build/api/auth.js +1 -1
  7. package/build/api/availabilityServices.js +1 -1
  8. package/build/api/axios.js +2 -2
  9. package/build/api/country.js +1 -1
  10. package/build/api/data.js +1 -1
  11. package/build/api/entity.js +1 -1
  12. package/build/api/firebase.js +1 -1
  13. package/build/api/individual.js +1 -1
  14. package/build/api/ip.js +1 -1
  15. package/build/api/lead.js +1 -1
  16. package/build/api/operator.js +1 -1
  17. package/build/app/rootReducer.d.ts +6 -7
  18. package/build/app/rootReducer.js +7 -9
  19. package/build/app/settings.d.ts +3 -3
  20. package/build/app/settings.js +5 -5
  21. package/build/app/store.d.ts +0 -2
  22. package/build/components/AnimationFlow/BottomSheet.js +1 -1
  23. package/build/components/AnimationFlow/Dialog.js +2 -2
  24. package/build/components/DatePicker/DatePicker.js +3 -3
  25. package/build/components/DatePicker/customStyle.css +86 -0
  26. package/build/components/Footer/Footer.d.ts +0 -2
  27. package/build/components/Footer/Footer.js +3 -4
  28. package/build/components/Input/Input.js +2 -2
  29. package/build/components/OTPTimer/OTPTimer.js +1 -1
  30. package/build/components/Providers/ThemeProvider.d.ts +1 -1
  31. package/build/components/SimpleList/SimpleList.js +1 -1
  32. package/build/components/SocialMediaGroup/SocialMediaGroup.d.ts +1 -1
  33. package/build/components/SocialMediaGroup/SocialMediaGroup.js +2 -2
  34. package/build/constants/app.d.ts +1 -2
  35. package/build/constants/app.js +1 -9
  36. package/build/features/app/bank/bankStore.d.ts +6 -2
  37. package/build/features/app/bank/bankStore.js +42 -5
  38. package/build/features/app/business/businessStore.d.ts +8 -4
  39. package/build/features/app/business/businessStore.js +41 -6
  40. package/build/features/app/connect/connectStore.d.ts +3 -2
  41. package/build/features/app/connect/connectStore.js +20 -18
  42. package/build/features/app/individual/individualStore.d.ts +6 -2
  43. package/build/features/app/individual/individualStore.js +41 -5
  44. package/build/features/app/password/passwordStore.d.ts +6 -2
  45. package/build/features/app/password/passwordStore.js +41 -5
  46. package/build/features/app/tax/taxStore.d.ts +6 -2
  47. package/build/features/app/tax/taxStore.js +43 -6
  48. package/build/features/bank/Bank.d.ts +1 -1
  49. package/build/features/bank/Bank.js +13 -12
  50. package/build/features/bank/screens/BankDetails/BankDetails.js +10 -9
  51. package/build/features/bank/screens/BankDetails/BankName.js +8 -8
  52. package/build/features/bank/screens/BankDetails/Beneficiary.js +7 -7
  53. package/build/features/bank/screens/BankDetails/ConfirmPolicy.d.ts +3 -0
  54. package/build/features/bank/screens/BankDetails/ConfirmPolicy.js +67 -0
  55. package/build/features/bank/screens/BankDetails/IBAN.js +8 -8
  56. package/build/features/bank/screens/BankDetails/validation.d.ts +3 -0
  57. package/build/features/bank/screens/BankDetails/validation.js +3 -2
  58. package/build/features/bank/screens/Success/Success.js +3 -3
  59. package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +10 -10
  60. package/build/features/bank/screens/Verify/OTPInput.d.ts +3 -1
  61. package/build/features/bank/screens/Verify/OTPInput.js +8 -3
  62. package/build/features/bank/screens/Verify/Verify.js +12 -11
  63. package/build/features/business/Business.d.ts +1 -1
  64. package/build/features/business/Business.js +13 -12
  65. package/build/features/business/screens/Activities/Activities.js +7 -7
  66. package/build/features/business/screens/Activities/ActivitiesList.d.ts +1 -1
  67. package/build/features/business/screens/Activities/ActivitiesList.js +9 -9
  68. package/build/features/business/screens/Activities/OperationStartDate.js +2 -2
  69. package/build/features/business/screens/Activities/SalesChannels.d.ts +1 -1
  70. package/build/features/business/screens/Activities/SalesChannels.js +7 -7
  71. package/build/features/business/screens/BusinessType/BusinessType.js +8 -8
  72. package/build/features/business/screens/BusinessType/LicenseList.js +10 -10
  73. package/build/features/business/screens/BusinessType/LicenseNumber.js +8 -8
  74. package/build/features/business/screens/BusinessType/SelectType.js +6 -6
  75. package/build/features/business/screens/BusinessType/validation.js +2 -2
  76. package/build/features/business/screens/Customers/CustomerLocations.d.ts +1 -1
  77. package/build/features/business/screens/Customers/CustomerLocations.js +8 -8
  78. package/build/features/business/screens/Customers/Customers.js +8 -8
  79. package/build/features/business/screens/Customers/ExpectedCustomers.js +6 -6
  80. package/build/features/business/screens/Customers/ExpectedSalesRange.js +7 -7
  81. package/build/features/business/screens/Customers/RefundPolicy.d.ts +2 -2
  82. package/build/features/business/screens/Customers/RefundPolicy.js +7 -7
  83. package/build/features/business/screens/Customers/TransactionPolicy.js +5 -5
  84. package/build/features/business/screens/IDBOD/DOB.js +5 -5
  85. package/build/features/business/screens/IDBOD/ID.js +6 -6
  86. package/build/features/business/screens/IDBOD/IDBOD.js +6 -6
  87. package/build/features/business/screens/OTP/OTP.js +9 -9
  88. package/build/features/business/screens/OTP/OTPInput.js +4 -4
  89. package/build/features/business/screens/Success/Success.js +3 -3
  90. package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +10 -9
  91. package/build/features/business/screens/Verify/OTPInput.d.ts +3 -1
  92. package/build/features/business/screens/Verify/OTPInput.js +8 -3
  93. package/build/features/business/screens/Verify/Verify.js +12 -11
  94. package/build/features/connect/Connect.d.ts +1 -1
  95. package/build/features/connect/Connect.js +13 -11
  96. package/build/features/connect/screens/Individual/Email.js +7 -7
  97. package/build/features/connect/screens/Individual/Individual.js +9 -9
  98. package/build/features/connect/screens/Individual/MobileNumber.d.ts +1 -1
  99. package/build/features/connect/screens/Individual/MobileNumber.js +11 -11
  100. package/build/features/connect/screens/Individual/Name.js +6 -6
  101. package/build/features/connect/screens/Individual/validation.js +1 -1
  102. package/build/features/connect/screens/Merchant/BrandList.d.ts +1 -1
  103. package/build/features/connect/screens/Merchant/BrandList.js +8 -8
  104. package/build/features/connect/screens/Merchant/BrandName.js +10 -10
  105. package/build/features/connect/screens/Merchant/Merchant.js +7 -7
  106. package/build/features/connect/screens/Merchant/SocialMedia.js +9 -9
  107. package/build/features/connect/screens/Merchant/TAC.js +7 -7
  108. package/build/features/connect/screens/Merchant/validation.js +1 -1
  109. package/build/features/connect/screens/Mobile/Mobile.js +10 -10
  110. package/build/features/connect/screens/Mobile/MobileNumber.d.ts +1 -1
  111. package/build/features/connect/screens/Mobile/MobileNumber.js +12 -12
  112. package/build/features/connect/screens/Mobile/Title.js +2 -2
  113. package/build/features/connect/screens/NID/DOB.js +5 -5
  114. package/build/features/connect/screens/NID/IDNumber.js +8 -8
  115. package/build/features/connect/screens/NID/NID.js +9 -9
  116. package/build/features/connect/screens/OTP/OTP.js +9 -9
  117. package/build/features/connect/screens/OTP/OTPInput.js +4 -4
  118. package/build/features/connect/screens/ThankYou/ThankYou.js +3 -3
  119. package/build/features/featuresScreens.d.ts +1 -2
  120. package/build/features/featuresScreens.js +30 -37
  121. package/build/features/individual/Individual.d.ts +1 -1
  122. package/build/features/individual/Individual.js +13 -12
  123. package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +8 -8
  124. package/build/features/individual/screens/AdditionalIndividualInfo/EmployerLocation.d.ts +1 -1
  125. package/build/features/individual/screens/AdditionalIndividualInfo/EmployerLocation.js +8 -8
  126. package/build/features/individual/screens/AdditionalIndividualInfo/EmployerName.js +6 -6
  127. package/build/features/individual/screens/AdditionalIndividualInfo/InfluencerSwitch.js +6 -6
  128. package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.d.ts +1 -1
  129. package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +9 -9
  130. package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.js +6 -6
  131. package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.d.ts +1 -1
  132. package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.js +8 -8
  133. package/build/features/individual/screens/AdditionalIndividualInfo/validation.d.ts +1 -1
  134. package/build/features/individual/screens/ShowIndividualInfo/ShowOwnerInfo.js +6 -6
  135. package/build/features/individual/screens/ShowIndividualInfo/info.js +1 -1
  136. package/build/features/individual/screens/Success/Success.js +3 -3
  137. package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +10 -10
  138. package/build/features/individual/screens/Verify/OTPInput.d.ts +3 -1
  139. package/build/features/individual/screens/Verify/OTPInput.js +8 -3
  140. package/build/features/individual/screens/Verify/Verify.js +12 -11
  141. package/build/features/password/Password.d.ts +1 -1
  142. package/build/features/password/Password.js +13 -12
  143. package/build/features/password/screens/CreatePassword/ConditionText.js +1 -1
  144. package/build/features/password/screens/CreatePassword/ConfirmPassword.js +3 -3
  145. package/build/features/password/screens/CreatePassword/CreatePassword.js +7 -7
  146. package/build/features/password/screens/CreatePassword/Password.js +6 -6
  147. package/build/features/password/screens/Success/Success.js +3 -3
  148. package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +10 -10
  149. package/build/features/password/screens/Verify/OTPInput.d.ts +3 -1
  150. package/build/features/password/screens/Verify/OTPInput.js +8 -3
  151. package/build/features/password/screens/Verify/Verify.js +12 -11
  152. package/build/features/shared/AcceptancePayouts/AcceptancePayouts.js +4 -4
  153. package/build/features/shared/Background/LogoBackground.js +4 -7
  154. package/build/features/shared/Button/AbsherButton.d.ts +2 -3
  155. package/build/features/shared/Button/AbsherButton.js +7 -12
  156. package/build/features/shared/Button/Button.d.ts +1 -1
  157. package/build/features/shared/Button/Button.js +7 -7
  158. package/build/features/shared/Button/EmailProvidersButtons.d.ts +1 -1
  159. package/build/features/shared/Button/EmailProvidersButtons.js +4 -3
  160. package/build/features/shared/Button/FlowsButtons.d.ts +5 -2
  161. package/build/features/shared/Button/FlowsButtons.js +14 -9
  162. package/build/features/shared/Button/MobileButton.d.ts +2 -3
  163. package/build/features/shared/Button/MobileButton.js +7 -12
  164. package/build/features/shared/Button/SuccessButton.js +1 -1
  165. package/build/features/shared/Footer/Footer.js +5 -5
  166. package/build/features/shared/Input/Input.d.ts +1 -1
  167. package/build/features/shared/Input/Input.js +2 -2
  168. package/build/features/shared/OTP/OTP.d.ts +3 -2
  169. package/build/features/shared/OTP/OTP.js +13 -5
  170. package/build/features/shared/Search/Search.js +1 -1
  171. package/build/features/shared/SearchIcon/SearchIcon.js +2 -2
  172. package/build/features/shared/SuccessScreen/SuccessScreen.js +5 -5
  173. package/build/features/tax/Tax.d.ts +1 -1
  174. package/build/features/tax/Tax.js +13 -12
  175. package/build/features/tax/screens/Success/Success.js +3 -3
  176. package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +10 -10
  177. package/build/features/tax/screens/TaxDetails/ConfirmPolicy.d.ts +3 -0
  178. package/build/features/tax/screens/TaxDetails/ConfirmPolicy.js +66 -0
  179. package/build/features/tax/screens/TaxDetails/TaxDetails.js +11 -8
  180. package/build/features/tax/screens/TaxDetails/VATId.js +18 -7
  181. package/build/features/tax/screens/TaxDetails/validation.d.ts +3 -0
  182. package/build/features/tax/screens/TaxDetails/validation.js +2 -1
  183. package/build/features/tax/screens/Verify/OTPInput.d.ts +3 -1
  184. package/build/features/tax/screens/Verify/OTPInput.js +8 -3
  185. package/build/features/tax/screens/Verify/Verify.js +12 -11
  186. package/build/hooks/index.d.ts +1 -0
  187. package/build/hooks/index.js +1 -0
  188. package/build/hooks/useAppConfig.d.ts +1 -1
  189. package/build/hooks/useAppConfig.js +4 -4
  190. package/build/hooks/useAppDispatch.d.ts +0 -1
  191. package/build/hooks/useAppSelector.d.ts +1 -1
  192. package/build/hooks/useAppTheme.d.ts +1 -1
  193. package/build/hooks/useAppTheme.js +3 -3
  194. package/build/hooks/useErrorListener.d.ts +1 -1
  195. package/build/hooks/useErrorListener.js +5 -7
  196. package/build/hooks/useLanguage.js +1 -1
  197. package/build/hooks/useRedirectionListener.js +1 -1
  198. package/build/hooks/useStepStartedListener.d.ts +1 -0
  199. package/build/hooks/useStepStartedListener.js +10 -0
  200. package/build/i18n.js +1 -1
  201. package/build/index.css +135 -0
  202. package/build/index.d.ts +8 -9
  203. package/build/index.js +8 -11
  204. package/build/theme/theme.d.ts +1 -1
  205. package/build/utils/locale.d.ts +1 -1
  206. package/build/utils/locale.js +1 -1
  207. package/build/utils/rsa.js +1 -1
  208. package/build/utils/string.d.ts +2 -1
  209. package/build/utils/string.js +22 -3
  210. package/package.json +1 -1
  211. package/build/features/Landing/Landing.d.ts +0 -7
  212. package/build/features/Landing/Landing.js +0 -55
  213. package/build/features/Landing/index.d.ts +0 -1
  214. package/build/features/Landing/index.js +0 -1
  215. package/build/features/Landing/screens/VerifyAndRedirect/VerifyAndRedirect.d.ts +0 -5
  216. package/build/features/Landing/screens/VerifyAndRedirect/VerifyAndRedirect.js +0 -41
  217. package/build/features/Landing/screens/VerifyAndRedirect/index.d.ts +0 -2
  218. package/build/features/Landing/screens/VerifyAndRedirect/index.js +0 -2
  219. package/build/features/app/landing/landingStore.d.ts +0 -22
  220. package/build/features/app/landing/landingStore.js +0 -103
@@ -47,10 +47,11 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
47
47
  };
48
48
  var _a;
49
49
  import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
50
- import API from '@api';
51
- import { hasKey, removeRequestHeaders } from '@utils';
52
- import { handleNextScreenStep } from '@app/settings';
53
- import { TAX_STEP_NAMES } from '@constants';
50
+ import API from '../../../api';
51
+ import { FlowsTypes } from '../../../@types';
52
+ import { hasKey, removeRequestHeaders } from '../../../utils';
53
+ import { handleNextScreenStep } from '../../../app/settings';
54
+ import { TAX_STEP_NAMES } from '../../../constants';
54
55
  export var verifyLeadToken = createAsyncThunk('verifyLeadToken', function (token, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
55
56
  var payload, data, leadResponse, _a, steps, entity, hasTaxCompleted;
56
57
  return __generator(this, function (_b) {
@@ -85,6 +86,23 @@ export var verifyLeadToken = createAsyncThunk('verifyLeadToken', function (token
85
86
  }
86
87
  });
87
88
  }); });
89
+ export var resendOTP = createAsyncThunk('resendOTPTax', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
90
+ var tax, payload, data;
91
+ return __generator(this, function (_a) {
92
+ switch (_a.label) {
93
+ case 0:
94
+ tax = thunkApi.getState().tax;
95
+ payload = {
96
+ service_name: 'tap_email',
97
+ verify_token: tax.data.verify.token
98
+ };
99
+ return [4, API.leadService.verifyLeadToken(payload)];
100
+ case 1:
101
+ data = (_a.sent()).data;
102
+ return [2, { data: data }];
103
+ }
104
+ });
105
+ }); });
88
106
  export var retrieveEntityInfo = createAsyncThunk('retrieveTaxEntityInfo', function (entityID) { return __awaiter(void 0, void 0, void 0, function () {
89
107
  var data;
90
108
  return __generator(this, function (_a) {
@@ -186,6 +204,7 @@ var initialState = {
186
204
  error: null,
187
205
  loading: false,
188
206
  data: {
207
+ flowName: FlowsTypes.TAX,
189
208
  verify: {
190
209
  token: ''
191
210
  },
@@ -193,7 +212,8 @@ var initialState = {
193
212
  otp: ''
194
213
  },
195
214
  taxData: {
196
- vatId: ''
215
+ vatId: '',
216
+ confirmPolicy: false
197
217
  }
198
218
  }
199
219
  };
@@ -226,13 +246,30 @@ export var taxSlice = createSlice({
226
246
  state.data.verify.responseBody = __assign(__assign(__assign({}, data), leadData), state.data.verify.responseBody);
227
247
  state.data.verify.token = token;
228
248
  })
229
- .addCase(verifyLeadToken.pending, function (state, action) {
249
+ .addCase(verifyLeadToken.pending, function (state) {
230
250
  state.error = null;
231
251
  state.customLoading = true;
232
252
  })
233
253
  .addCase(verifyLeadToken.rejected, function (state, action) {
234
254
  state.error = action.error.message;
235
255
  state.customLoading = false;
256
+ })
257
+ .addCase(resendOTP.pending, function (state) {
258
+ state.error = null;
259
+ })
260
+ .addCase(resendOTP.fulfilled, function (state, action) {
261
+ var _a;
262
+ state.error = null;
263
+ var data = action.payload.data;
264
+ var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
265
+ if (description) {
266
+ state.error = description;
267
+ return;
268
+ }
269
+ state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), data);
270
+ })
271
+ .addCase(resendOTP.rejected, function (state, action) {
272
+ state.error = action.error.message;
236
273
  })
237
274
  .addCase(verifyTaxLeadOTP.pending, function (state) {
238
275
  state.loading = true;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { LibConfig } from '@src/@types';
2
+ import { LibConfig } from '../../@types';
3
3
  export interface BankLibProps extends LibConfig {
4
4
  }
5
5
  export declare function BankLib(props: BankLibProps): JSX.Element;
@@ -11,26 +11,27 @@ var __assign = (this && this.__assign) || function () {
11
11
  };
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
13
13
  import { memo, useEffect } from 'react';
14
- import { useAppTheme, useAppDispatch, useAppSelector, useErrorListener, useAppConfig } from '@hooks';
15
- import { handleLanguage, settingsSelector } from '@app/settings';
16
- import AnimationFlow from '@components/AnimationFlow';
17
- import { store } from '@app/store';
18
- import { ReduxProvider, ThemeProvider } from '@components/Providers';
19
- import Collapse from '@components/Collapse';
20
- import { getParameterByName, reactElement } from '@utils';
21
- import { FeatureContainer } from '@features/shared/Containers';
22
- import { BANK_SCREENS_NAVIGATION } from '@constants';
14
+ import { useAppTheme, useAppDispatch, useAppSelector, useErrorListener, useAppConfig, useStepStartedListener } from '../../hooks';
15
+ import { handleLanguage, settingsSelector } from '../../app/settings';
16
+ import AnimationFlow from '../../components/AnimationFlow';
17
+ import { store } from '../../app/store';
18
+ import { ReduxProvider, ThemeProvider } from '../../components/Providers';
19
+ import Collapse from '../../components/Collapse';
20
+ import { getParameterByName, reactElement } from '../../utils';
21
+ import { FeatureContainer } from '../shared/Containers';
22
+ import { BANK_SCREENS_NAVIGATION } from '../../constants';
23
23
  import { bankFeatureScreens } from '../featuresScreens';
24
24
  import CustomFooter from '../shared/Footer';
25
- import { bankSelector, verifyLeadToken } from '@features/app/bank/bankStore';
25
+ import { bankSelector, verifyLeadToken } from '../app/bank/bankStore';
26
26
  import Background from '../shared/Background';
27
27
  var Bank = memo(function (props) {
28
28
  var theme = useAppTheme().theme;
29
29
  var dispatch = useAppDispatch();
30
30
  var _a = useAppSelector(settingsSelector), data = _a.data, error = _a.error, settingLoading = _a.loading;
31
- var customLoading = useAppSelector(bankSelector).customLoading;
31
+ var _b = useAppSelector(bankSelector), customLoading = _b.customLoading, bankError = _b.error;
32
32
  var loading = useAppConfig(__assign({ navigation: BANK_SCREENS_NAVIGATION }, props)).loading;
33
- useErrorListener();
33
+ useErrorListener(bankError || error);
34
+ useStepStartedListener();
34
35
  var activeScreen = data.activeScreen, isTapOrigin = data.isTapOrigin, open = data.open;
35
36
  var verifyToken = function () {
36
37
  var token = getParameterByName('token');
@@ -11,21 +11,22 @@ var __assign = (this && this.__assign) || function () {
11
11
  };
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
13
  import * as React from 'react';
14
- import { ScreenContainer } from '@features/shared/Containers';
14
+ import { ScreenContainer } from '../../../shared/Containers';
15
15
  import Beneficiary from './Beneficiary';
16
16
  import IBAN from './IBAN';
17
17
  import BankName from './BankName';
18
- import Button from '@features/shared/Button';
19
- import { useAppDispatch, useAppSelector } from '@hooks';
18
+ import Button from '../../../shared/Button';
19
+ import { useAppDispatch, useAppSelector } from '../../../../hooks';
20
20
  import { BankValidation } from './validation';
21
21
  import { useTranslation } from 'react-i18next';
22
22
  import { useForm, FormProvider } from 'react-hook-form';
23
23
  import { yupResolver } from '@hookform/resolvers/yup';
24
- import { useLanguage } from '@hooks';
24
+ import { useLanguage } from '../../../../hooks';
25
25
  import { styled } from '@mui/material/styles';
26
- import { bankSelector, createBankAccount } from '@features/app/bank/bankStore';
27
- import Form from '@components/Form';
28
- import { handleCurrentActiveScreen } from '@app/settings';
26
+ import { bankSelector, createBankAccount } from '../../../app/bank/bankStore';
27
+ import Form from '../../../../components/Form';
28
+ import { handleCurrentActiveScreen } from '../../../../app/settings';
29
+ import ConfirmPolicy from './ConfirmPolicy';
29
30
  var FormStyled = styled(Form)(function () { return ({
30
31
  display: 'flex',
31
32
  flexDirection: 'column',
@@ -52,9 +53,9 @@ var BankDetails = function () {
52
53
  var t = useTranslation().t;
53
54
  var isAr = useLanguage().isAr;
54
55
  var onBack = function () {
55
- dispatch(handleCurrentActiveScreen(''));
56
+ dispatch(handleCurrentActiveScreen('BANK_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
56
57
  };
57
58
  var disabled = ibanChecking || !methods.formState.isValid;
58
- return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(Beneficiary, {}), _jsx(IBAN, { fetchingIban: function (value) { return setIbanChecking(value); }, ibanChecking: ibanChecking }), _jsx(BankName, {}), _jsx(ButtonStyled, __assign({ onBackClicked: function () { return onBack(); }, disabled: disabled, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('confirm') }))] })) })) }));
59
+ return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(Beneficiary, {}), _jsx(IBAN, { fetchingIban: function (value) { return setIbanChecking(value); }, ibanChecking: ibanChecking }), _jsx(BankName, {}), _jsx(ConfirmPolicy, {}), _jsx(ButtonStyled, __assign({ onBackClicked: function () { return onBack(); }, disabled: disabled, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('confirm') }))] })) })) }));
59
60
  };
60
61
  export default BankDetails;
@@ -11,17 +11,17 @@ var __assign = (this && this.__assign) || function () {
11
11
  };
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
13
13
  import * as React from 'react';
14
- import { ScreenContainer } from '@features/shared/Containers';
15
- import Input from '@features/shared/Input';
14
+ import { ScreenContainer } from '../../../shared/Containers';
15
+ import Input from '../../../shared/Input';
16
16
  import { useTranslation } from 'react-i18next';
17
17
  import { useController, useFormContext } from 'react-hook-form';
18
18
  import { styled } from '@mui/material/styles';
19
- import ClearIcon from '@features/shared/ClearIcon';
20
- import CheckIcon from '@features/shared/CheckIcon';
21
- import { bankSelector } from '@features/app/bank/bankStore';
22
- import { useAppSelector } from '@hooks';
23
- import { removeAllOtherThanAlphabetAndSpace } from '@utils';
24
- import Collapse from '@src/components/Collapse';
19
+ import ClearIcon from '../../../shared/ClearIcon';
20
+ import CheckIcon from '../../../shared/CheckIcon';
21
+ import { bankSelector } from '../../../app/bank/bankStore';
22
+ import { useAppSelector } from '../../../../hooks';
23
+ import { removeAllOtherThanAlphabetAndSpace } from '../../../../utils';
24
+ import Collapse from '../../../../components/Collapse';
25
25
  var FeatureStyled = styled(ScreenContainer)(function (_a) {
26
26
  var theme = _a.theme;
27
27
  return ({
@@ -1,15 +1,15 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import * as React from 'react';
3
- import Input from '@features/shared/Input';
3
+ import Input from '../../../shared/Input';
4
4
  import { useTranslation } from 'react-i18next';
5
5
  import { useController, useFormContext } from 'react-hook-form';
6
6
  import { styled } from '@mui/material';
7
- import { removeOnlyNumbers } from '@utils';
8
- import { ScreenContainer } from '@features/shared/Containers';
9
- import { bankSelector } from '@features/app/bank/bankStore';
10
- import { useAppSelector, useLanguage } from '@hooks';
11
- import ClearIcon from '@features/shared/ClearIcon';
12
- import CheckIcon from '@features/shared/CheckIcon';
7
+ import { removeOnlyNumbers } from '../../../../utils';
8
+ import { ScreenContainer } from '../../../shared/Containers';
9
+ import { bankSelector } from '../../../app/bank/bankStore';
10
+ import { useAppSelector, useLanguage } from '../../../../hooks';
11
+ import ClearIcon from '../../../shared/ClearIcon';
12
+ import CheckIcon from '../../../shared/CheckIcon';
13
13
  var FeatureStyled = styled(ScreenContainer)(function (_a) {
14
14
  var theme = _a.theme;
15
15
  return ({
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const ConfirmPolicy: () => JSX.Element;
3
+ export default ConfirmPolicy;
@@ -0,0 +1,67 @@
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 { useTranslation } from 'react-i18next';
14
+ import { useController, useFormContext } from 'react-hook-form';
15
+ import { ScreenContainer } from '../../../shared/Containers';
16
+ import { styled, alpha } from '@mui/material/styles';
17
+ import Box from '@mui/material/Box';
18
+ import CheckBox from '../../../../components/CheckBox';
19
+ import Text from '../../../../components/Text';
20
+ import Warning from '../../../../components/Warning';
21
+ import Collapse from '../../../../components/Collapse';
22
+ var ConfirmContainerStyled = styled(Box)(function (_a) {
23
+ var theme = _a.theme;
24
+ return ({
25
+ display: 'flex',
26
+ flexDirection: 'row',
27
+ alignItems: 'center',
28
+ padding: theme.spacing(0, 2.5, 1.5, 2.5),
29
+ marginBlockStart: theme.spacing(3)
30
+ });
31
+ });
32
+ var TextStyled = styled(Text)(function (_a) {
33
+ var theme = _a.theme;
34
+ return (__assign({ color: alpha(theme.palette.text.primary, 0.4), fontWeight: theme.typography.fontWeightLight, whiteSpace: 'pre-line', height: 'fit-content' }, theme.typography.body2));
35
+ });
36
+ var CheckboxStyled = styled(CheckBox)(function (_a) {
37
+ var theme = _a.theme;
38
+ return ({
39
+ margin: theme.spacing(0),
40
+ padding: theme.spacing(0),
41
+ marginInlineEnd: theme.spacing(1.5),
42
+ color: theme.palette.primary.main,
43
+ '& .MuiSvgIcon-root': {
44
+ fontSize: theme.spacing(3.75)
45
+ },
46
+ '&.Mui-checked': {
47
+ color: theme.palette.text.primary,
48
+ borderRadius: theme.spacing(2.5)
49
+ }
50
+ });
51
+ });
52
+ var CollapseStyled = styled(Collapse)(function () { return ({
53
+ width: '100%'
54
+ }); });
55
+ var ConfirmPolicy = function () {
56
+ var _a;
57
+ var t = useTranslation().t;
58
+ var control = useFormContext().control;
59
+ var confirmControl = useController({ control: control, name: 'confirmPolicy' });
60
+ var confirmChecked = confirmControl.field.value;
61
+ var warningMessage = (_a = confirmControl.fieldState.error) === null || _a === void 0 ? void 0 : _a.message;
62
+ var handleConfirmCheckedChange = function (event, checked) {
63
+ confirmControl.field.onChange(checked);
64
+ };
65
+ return (_jsxs(ScreenContainer, { children: [_jsxs(ConfirmContainerStyled, { children: [_jsx(CheckboxStyled, { disableRipple: true, disableFocusRipple: true, focusRipple: false, checked: confirmChecked, onChange: handleConfirmCheckedChange }), _jsx(TextStyled, { children: t('bank_confirm_information') })] }), _jsx(CollapseStyled, __assign({ in: !!warningMessage }, { children: _jsx(Warning, __assign({ warningType: 'alert' }, { children: warningMessage && t(warningMessage) })) }))] }));
66
+ };
67
+ export default ConfirmPolicy;
@@ -36,19 +36,19 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
36
36
  };
37
37
  import { jsx as _jsx } from "react/jsx-runtime";
38
38
  import * as React from 'react';
39
- import Input from '@features/shared/Input';
39
+ import Input from '../../../shared/Input';
40
40
  import { useTranslation } from 'react-i18next';
41
41
  import { useController, useFormContext } from 'react-hook-form';
42
- import { removeAllOtherThanCharsAndNumber } from '@utils';
42
+ import { removeAllOtherThanCharsAndNumber } from '../../../../utils';
43
43
  import { styled } from '@mui/material';
44
- import { MAX_IBAN_VALUE } from '@constants';
45
- import { ScreenContainer } from '@features/shared/Containers';
44
+ import { MAX_IBAN_VALUE } from '../../../../constants';
45
+ import { ScreenContainer } from '../../../shared/Containers';
46
46
  import { debounce } from 'lodash-es';
47
- import { checkIbanBank } from '@features/app/bank/bankStore';
48
- import { useAppDispatch } from '@hooks';
47
+ import { checkIbanBank } from '../../../app/bank/bankStore';
48
+ import { useAppDispatch } from '../../../../hooks';
49
49
  import axios from 'axios';
50
- import ClearIcon from '@features/shared/ClearIcon';
51
- import CheckIcon from '@features/shared/CheckIcon';
50
+ import ClearIcon from '../../../shared/ClearIcon';
51
+ import CheckIcon from '../../../shared/CheckIcon';
52
52
  import CircularProgress from '@mui/material/CircularProgress';
53
53
  var InputStyled = styled(Input)(function () { return ({
54
54
  input: {
@@ -3,12 +3,15 @@ export declare const BankValidation: yup.ObjectSchema<import("yup/lib/object").A
3
3
  iban: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
4
4
  bankName: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
5
5
  beneficiaryName: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
6
+ confirmPolicy: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, true>;
6
7
  }>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
7
8
  iban: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
8
9
  bankName: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
9
10
  beneficiaryName: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
11
+ confirmPolicy: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, true>;
10
12
  }>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
11
13
  iban: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
12
14
  bankName: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
13
15
  beneficiaryName: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
16
+ confirmPolicy: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, true>;
14
17
  }>>>;
@@ -1,4 +1,4 @@
1
- import { REGEX_BENEFICIARY_NAME } from '@constants';
1
+ import { REGEX_BENEFICIARY_NAME } from '../../../../constants';
2
2
  import * as yup from 'yup';
3
3
  export var BankValidation = yup.object().shape({
4
4
  iban: yup
@@ -11,5 +11,6 @@ export var BankValidation = yup.object().shape({
11
11
  beneficiaryName: yup
12
12
  .string()
13
13
  .matches(REGEX_BENEFICIARY_NAME, 'beneficiary_name_invalid')
14
- .required('beneficiary_name_required')
14
+ .required('beneficiary_name_required'),
15
+ confirmPolicy: yup.boolean().required('alert_bank_confirm').isTrue('alert_bank_confirm')
15
16
  });
@@ -1,9 +1,9 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import * as React from 'react';
3
3
  import { useTranslation } from 'react-i18next';
4
- import SuccessScreen from '@features/shared/SuccessScreen';
5
- import { useAppDispatch, useAppSelector } from '@hooks';
6
- import { bankSelector, updateLeadSuccess } from '@features/app/bank/bankStore';
4
+ import SuccessScreen from '../../../shared/SuccessScreen';
5
+ import { useAppDispatch, useAppSelector } from '../../../../hooks';
6
+ import { bankSelector, updateLeadSuccess } from '../../../app/bank/bankStore';
7
7
  var Success = function (_a) {
8
8
  var t = useTranslation().t;
9
9
  var dispatch = useAppDispatch();
@@ -13,15 +13,15 @@ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
13
13
  import React, { memo, useEffect, useState } from 'react';
14
14
  import { useTranslation } from 'react-i18next';
15
15
  import { styled } from '@mui/material/styles';
16
- import { FlowsButtons } from '@features/shared/Button';
17
- import { ICONS_NAMES } from '@constants';
18
- import { useAppSelector, useLanguage } from '@hooks';
19
- import { allAreTruthy, showLastFour } from '@utils';
20
- import { bankSelector } from '@features/app/bank/bankStore';
16
+ import { FlowsButtons } from '../../../shared/Button';
17
+ import { ICONS_NAMES } from '../../../../constants';
18
+ import { useAppSelector, useLanguage } from '../../../../hooks';
19
+ import { allAreTruthy, showLastFour } from '../../../../utils';
20
+ import { bankSelector } from '../../../app/bank/bankStore';
21
21
  import Box from '@mui/material/Box';
22
- import Text from '@components/Text';
23
- import Container from '@features/shared/Containers/ScreenContainer';
24
- import AcceptancePayouts from '@features/shared/AcceptancePayouts';
22
+ import Text from '../../../../components/Text';
23
+ import Container from '../../../shared/Containers/ScreenContainer';
24
+ import AcceptancePayouts from '../../../shared/AcceptancePayouts';
25
25
  var TitleStyled = styled(Text)(function (_a) {
26
26
  var _b;
27
27
  var theme = _a.theme;
@@ -60,7 +60,6 @@ var SuccessWithFlowButtons = function () {
60
60
  var reMapFlowData = function (flows) {
61
61
  if (flows === void 0) { flows = []; }
62
62
  var images = ICONS_NAMES;
63
- var statuses = [];
64
63
  var mappedFlows = flows.map(function (_a) {
65
64
  var name = _a.name, url = _a.url, status = _a.status;
66
65
  var type = status === 'initiated' ? 'pending' : 'completed';
@@ -79,6 +78,7 @@ var SuccessWithFlowButtons = function () {
79
78
  var src = isCompleted ? "".concat(name, "_green_icon") : "".concat(name, "_filled_icon");
80
79
  var hoverSrc = "".concat(name, "_white_icon");
81
80
  return {
81
+ name: name,
82
82
  title: title,
83
83
  href: url,
84
84
  src: images[src],
@@ -96,6 +96,6 @@ var SuccessWithFlowButtons = function () {
96
96
  if ((flows === null || flows === void 0 ? void 0 : flows.length) > 0)
97
97
  reMapFlowData(flows);
98
98
  }, [flows, isAr]);
99
- return (_jsxs(ContainerStyled, { children: [_jsxs(TitleStyled, { children: [t('account_details'), " "] }), _jsx(AcceptancePayouts, { showAcceptance: isAcceptance, showPayout: isPayout }), _jsx(ButtonGroupStyled, { children: _jsx(FlowsButtons, { buttons: buttons }) })] }));
99
+ return (_jsxs(ContainerStyled, { children: [_jsxs(TitleStyled, { children: [t('account_details'), " "] }), _jsx(AcceptancePayouts, { showAcceptance: isAcceptance, showPayout: isPayout }), _jsx(ButtonGroupStyled, { children: _jsx(FlowsButtons, { buttons: buttons, flowName: data.flowName }) })] }));
100
100
  };
101
101
  export default memo(SuccessWithFlowButtons);
@@ -1,5 +1,7 @@
1
1
  import * as React from 'react';
2
2
  export interface OTPProps {
3
+ loading: boolean;
4
+ setLoading: (flag: boolean) => void;
3
5
  }
4
- declare const _default: React.MemoExoticComponent<({}: OTPProps) => JSX.Element>;
6
+ declare const _default: React.MemoExoticComponent<({ loading, setLoading }: OTPProps) => JSX.Element>;
5
7
  export default _default;
@@ -13,10 +13,12 @@ import { jsx as _jsx } from "react/jsx-runtime";
13
13
  import * as React from 'react';
14
14
  import Box from '@mui/material/Box/Box';
15
15
  import { styled } from '@mui/material/styles';
16
- import OTPField from '@features/shared/OTP';
16
+ import OTPField from '../../../shared/OTP';
17
17
  import { useController, useFormContext } from 'react-hook-form';
18
18
  import { useTranslation } from 'react-i18next';
19
- import { DEFAULT_TIMER_VALUE } from '@constants';
19
+ import { DEFAULT_TIMER_VALUE } from '../../../../constants';
20
+ import { useAppDispatch } from '../../../../hooks';
21
+ import { resendOTP } from '../../../app/bank/bankStore';
20
22
  var BoxStyled = styled(Box)(function (_a) {
21
23
  var theme = _a.theme;
22
24
  return ({
@@ -26,17 +28,20 @@ var BoxStyled = styled(Box)(function (_a) {
26
28
  });
27
29
  });
28
30
  var OTPInput = function (_a) {
31
+ var loading = _a.loading, setLoading = _a.setLoading;
29
32
  var _b = useFormContext(), control = _b.control, setValue = _b.setValue;
30
33
  var t = useTranslation().t;
31
34
  var otpControl = useController({ name: 'otp', control: control });
35
+ var dispatch = useAppDispatch();
32
36
  var handleOnOTPChange = function (otp) {
33
37
  otpControl.field.onChange(otp);
34
38
  };
35
39
  var handleOnResendOTP = function () {
36
40
  if (otpControl.field.value)
37
41
  setValue('otp', '', { shouldValidate: true });
42
+ dispatch(resendOTP());
38
43
  };
39
44
  var otpValue = otpControl.field.value;
40
- return (_jsx(BoxStyled, __assign({ dir: 'ltr' }, { children: _jsx(OTPField, { timeEndLabel: t('ide_otp_resend_label'), timerInSeconds: DEFAULT_TIMER_VALUE, onResetClick: handleOnResendOTP, value: otpValue, onChange: function (number) { return handleOnOTPChange(number.toString()); } }) })));
45
+ return (_jsx(BoxStyled, __assign({ dir: 'ltr' }, { children: _jsx(OTPField, { loading: loading, timeEndLabel: t('ide_otp_resend_label'), timerInSeconds: DEFAULT_TIMER_VALUE, onResetClick: handleOnResendOTP, value: otpValue, onChange: function (number) { return handleOnOTPChange(number.toString()); } }) })));
41
46
  };
42
47
  export default React.memo(OTPInput);
@@ -11,20 +11,20 @@ var __assign = (this && this.__assign) || function () {
11
11
  };
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
13
  import * as React from 'react';
14
- import { useAppDispatch } from '@hooks';
14
+ import { useAppDispatch } from '../../../../hooks';
15
15
  import { useTranslation } from 'react-i18next';
16
16
  import { useForm, FormProvider } from 'react-hook-form';
17
17
  import { yupResolver } from '@hookform/resolvers/yup';
18
18
  import Box from '@mui/material/Box/Box';
19
19
  import { styled } from '@mui/material/styles';
20
- import { handlePrevScreenStep } from '@app/settings';
21
- import { useLanguage, useAppSelector } from '@hooks';
22
- import { maskPhone } from '@utils';
23
- import Form from '@components/Form';
24
- import Text from '@components/Text';
25
- import { ScreenContainer } from '@features/shared/Containers';
26
- import { bankSelector, clearError, resetOTPScreen, verifyBankLeadOTP } from '@features/app/bank/bankStore';
27
- import Button from '@features/shared/Button';
20
+ import { handlePrevScreenStep } from '../../../../app/settings';
21
+ import { useLanguage, useAppSelector } from '../../../../hooks';
22
+ import { maskPhone } from '../../../../utils';
23
+ import Form from '../../../../components/Form';
24
+ import Text from '../../../../components/Text';
25
+ import { ScreenContainer } from '../../../shared/Containers';
26
+ import { bankSelector, clearError, resetOTPScreen, verifyBankLeadOTP } from '../../../app/bank/bankStore';
27
+ import Button from '../../../shared/Button';
28
28
  import { OTPValidation } from './validation';
29
29
  import OTPInput from './OTPInput';
30
30
  var OTPTitleContainerStyled = styled(Box)(function (_a) {
@@ -57,6 +57,7 @@ var VerifyNumber = function (_a) {
57
57
  });
58
58
  var t = useTranslation().t;
59
59
  var isAr = useLanguage().isAr;
60
+ var _f = React.useState(false), resendLoading = _f[0], setResendLoading = _f[1];
60
61
  React.useEffect(function () {
61
62
  if (error)
62
63
  dispatch(clearError());
@@ -71,7 +72,7 @@ var VerifyNumber = function (_a) {
71
72
  dispatch(handlePrevScreenStep());
72
73
  };
73
74
  var phone = (_d = (_c = (_b = data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.contact) === null || _c === void 0 ? void 0 : _c.phone) === null || _d === void 0 ? void 0 : _d.number;
74
- var disabled = !methods.formState.isValid || !!error || !phone;
75
- return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(OTPTitleContainerStyled, { children: _jsxs(OTPTitleStyled, { children: [loading ? t('ide_otp_waiting_title') : t('ide_opt_sent_title'), !loading && phone && _jsx("span", __assign({ dir: 'ltr' }, { children: "".concat(maskPhone(phone || '')) }))] }) }), _jsx(OTPInput, {}), _jsx(Button, __assign({ disableBack: true, onBackClicked: function () { return onBack(); }, disabled: disabled, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('next') }))] })) })) }));
75
+ var disabled = !methods.formState.isValid || !!error || !phone || resendLoading;
76
+ return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(OTPTitleContainerStyled, { children: _jsxs(OTPTitleStyled, { children: [loading ? t('ide_otp_waiting_title') : t('ide_opt_sent_title'), !loading && phone && _jsx("span", __assign({ dir: 'ltr' }, { children: "".concat(maskPhone(phone || '')) }))] }) }), _jsx(OTPInput, { loading: resendLoading, setLoading: setResendLoading }), _jsx(Button, __assign({ disableBack: true, onBackClicked: function () { return onBack(); }, disabled: disabled, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('next') }))] })) })) }));
76
77
  };
77
78
  export default React.memo(VerifyNumber);
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { LibConfig } from '@types';
2
+ import { LibConfig } from '../../@types';
3
3
  export interface BusinessLibProps extends LibConfig {
4
4
  }
5
5
  export declare function BusinessLib(props: BusinessLibProps): JSX.Element;
@@ -11,16 +11,16 @@ var __assign = (this && this.__assign) || function () {
11
11
  };
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
13
13
  import { memo, useEffect } from 'react';
14
- import { useAppTheme, useAppDispatch, useAppSelector, useAppConfig, useErrorListener } from '@hooks';
15
- import { handleLanguage, settingsSelector } from '@app/settings';
16
- import { FeatureContainer } from '@features/shared/Containers';
17
- import { businessSelector, getCountries, verifyLeadToken } from '@features/app/business/businessStore';
18
- import AnimationFlow from '@components/AnimationFlow';
19
- import { store } from '@app/store';
20
- import { ReduxProvider, ThemeProvider } from '@components/Providers';
21
- import Collapse from '@components/Collapse';
22
- import { getParameterByName, reactElement } from '@utils';
23
- import { BUSINESS_SCREENS_NAVIGATION } from '@constants';
14
+ import { useAppTheme, useAppDispatch, useAppSelector, useAppConfig, useErrorListener, useStepStartedListener } from '../../hooks';
15
+ import { handleLanguage, settingsSelector } from '../../app/settings';
16
+ import { FeatureContainer } from '../shared/Containers';
17
+ import { businessSelector, getCountries, verifyLeadToken } from '../app/business/businessStore';
18
+ import AnimationFlow from '../../components/AnimationFlow';
19
+ import { store } from '../../app/store';
20
+ import { ReduxProvider, ThemeProvider } from '../../components/Providers';
21
+ import Collapse from '../../components/Collapse';
22
+ import { getParameterByName, reactElement } from '../../utils';
23
+ import { BUSINESS_SCREENS_NAVIGATION } from '../../constants';
24
24
  import { businessFeatureScreens } from '../featuresScreens';
25
25
  import CustomFooter from '../shared/Footer';
26
26
  import Background from '../shared/Background';
@@ -28,9 +28,10 @@ var Business = memo(function (props) {
28
28
  var theme = useAppTheme().theme;
29
29
  var dispatch = useAppDispatch();
30
30
  var _a = useAppSelector(settingsSelector), data = _a.data, error = _a.error, settingLoading = _a.loading;
31
- var customLoading = useAppSelector(businessSelector).customLoading;
31
+ var _b = useAppSelector(businessSelector), customLoading = _b.customLoading, businessError = _b.error;
32
32
  var loading = useAppConfig(__assign({ navigation: BUSINESS_SCREENS_NAVIGATION }, props)).loading;
33
- useErrorListener();
33
+ useErrorListener(businessError || error);
34
+ useStepStartedListener();
34
35
  var activeScreen = data.activeScreen, isTapOrigin = data.isTapOrigin, open = data.open;
35
36
  var verifyToken = function () {
36
37
  var token = getParameterByName('token');
@@ -14,17 +14,17 @@ import * as React from 'react';
14
14
  import { styled } from '@mui/material/styles';
15
15
  import ActivitiesList from './ActivitiesList';
16
16
  import { useForm, FormProvider } from 'react-hook-form';
17
- import { useAppDispatch, useLanguage, useAppSelector } from '@hooks';
18
- import Form from '@components/Form';
17
+ import { useAppDispatch, useLanguage, useAppSelector } from '../../../../hooks';
18
+ import Form from '../../../../components/Form';
19
19
  import { yupResolver } from '@hookform/resolvers/yup';
20
20
  import { useTranslation } from 'react-i18next';
21
- import { handlePrevScreenStep } from '@app/settings';
22
- import Button from '@features/shared/Button';
21
+ import { handlePrevScreenStep } from '../../../../app/settings';
22
+ import Button from '../../../shared/Button';
23
23
  import SalesChannels from './SalesChannels';
24
- import { ScreenContainer } from '@features/shared/Containers';
25
- import Collapse from '@components/Collapse';
24
+ import { ScreenContainer } from '../../../shared/Containers';
25
+ import Collapse from '../../../../components/Collapse';
26
26
  import OperationStartDate from './OperationStartDate';
27
- import { businessSelector, clearError, updateActivitiesInfo } from '@features/app/business/businessStore';
27
+ import { businessSelector, clearError, updateActivitiesInfo } from '../../../app/business/businessStore';
28
28
  import { ActivitiesValidationSchema } from './validation';
29
29
  var FormStyled = styled(Form)(function () { return ({
30
30
  display: 'flex',