@tap-payments/auth-jsconnect 1.0.97-test → 1.0.100-test

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/build/api/entity.d.ts +3 -0
  2. package/build/assets/locales/ar.json +3 -1
  3. package/build/assets/locales/en.json +3 -1
  4. package/build/constants/app.js +41 -6
  5. package/build/constants/validation.d.ts +1 -0
  6. package/build/constants/validation.js +1 -0
  7. package/build/features/app/bank/bankStore.js +19 -14
  8. package/build/features/app/business/businessStore.d.ts +1 -1
  9. package/build/features/app/business/businessStore.js +85 -30
  10. package/build/features/app/individual/individualStore.js +27 -19
  11. package/build/features/app/password/passwordStore.js +12 -8
  12. package/build/features/app/tax/taxStore.js +14 -9
  13. package/build/features/bank/Bank.js +2 -3
  14. package/build/features/bank/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +5 -0
  15. package/build/features/bank/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +9 -0
  16. package/build/features/bank/screens/ResetPasswordSuccess/index.d.ts +3 -0
  17. package/build/features/bank/screens/ResetPasswordSuccess/index.js +2 -0
  18. package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +9 -13
  19. package/build/features/business/Business.js +2 -3
  20. package/build/features/business/screens/Activities/Activities.js +1 -1
  21. package/build/features/business/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +5 -0
  22. package/build/features/business/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +9 -0
  23. package/build/features/business/screens/ResetPasswordSuccess/index.d.ts +3 -0
  24. package/build/features/business/screens/ResetPasswordSuccess/index.js +2 -0
  25. package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +9 -13
  26. package/build/features/connect/screens/Merchant/validation.js +4 -2
  27. package/build/features/connect/screens/Mobile/Mobile.js +1 -1
  28. package/build/features/connect/screens/Mobile/MobileNumber.js +1 -1
  29. package/build/features/connect/screens/NID/IDNumber.js +1 -1
  30. package/build/features/connect/screens/NID/NID.js +1 -1
  31. package/build/features/featuresScreens.js +15 -5
  32. package/build/features/individual/Individual.js +2 -3
  33. package/build/features/individual/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +5 -0
  34. package/build/features/individual/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +9 -0
  35. package/build/features/individual/screens/ResetPasswordSuccess/index.d.ts +3 -0
  36. package/build/features/individual/screens/ResetPasswordSuccess/index.js +2 -0
  37. package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +9 -13
  38. package/build/features/password/Password.js +2 -3
  39. package/build/features/password/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +5 -0
  40. package/build/features/password/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +9 -0
  41. package/build/features/password/screens/ResetPasswordSuccess/index.d.ts +3 -0
  42. package/build/features/password/screens/ResetPasswordSuccess/index.js +2 -0
  43. package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +9 -13
  44. package/build/features/shared/Button/FlowsButtons.js +3 -6
  45. package/build/features/shared/Button/SuccessButton.js +14 -0
  46. package/build/features/tax/Tax.js +2 -3
  47. package/build/features/tax/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +5 -0
  48. package/build/features/tax/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +9 -0
  49. package/build/features/tax/screens/ResetPasswordSuccess/index.d.ts +3 -0
  50. package/build/features/tax/screens/ResetPasswordSuccess/index.js +2 -0
  51. package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +9 -13
  52. package/build/utils/string.js +2 -1
  53. package/package.json +1 -1
@@ -50,7 +50,7 @@ import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
50
50
  import API from '../../../api';
51
51
  import { FlowsTypes } from '../../../@types';
52
52
  import { hasKey } from '../../../utils';
53
- import { handleNextScreenStep } from '../../../app/settings';
53
+ import { handleNextScreenStep, handleCurrentActiveScreen } from '../../../app/settings';
54
54
  import { TAX_STEP_NAMES } from '../../../constants';
55
55
  export var verifyLeadToken = createAsyncThunk('taxVerifyLeadToken', function (token, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
56
56
  var payload, data, leadResponse, _a, steps, entity, hasTaxCompleted;
@@ -65,24 +65,28 @@ export var verifyLeadToken = createAsyncThunk('taxVerifyLeadToken', function (to
65
65
  case 1:
66
66
  data = (_b.sent()).data;
67
67
  leadResponse = undefined;
68
- if (!(!(data === null || data === void 0 ? void 0 : data.errors) && !(data === null || data === void 0 ? void 0 : data.mw_error))) return [3, 5];
68
+ if (!(!(data === null || data === void 0 ? void 0 : data.errors) && !(data === null || data === void 0 ? void 0 : data.mw_error))) return [3, 6];
69
69
  return [4, API.leadService.retrieveLead(data === null || data === void 0 ? void 0 : data.id)];
70
70
  case 2:
71
71
  leadResponse = _b.sent();
72
72
  _a = leadResponse.data, steps = _a.steps, entity = _a.entity;
73
73
  hasTaxCompleted = hasKey(steps, TAX_STEP_NAMES.TAX_SUCCESS);
74
- if (!hasTaxCompleted) return [3, 4];
75
- return [4, thunkApi.dispatch(retrieveEntityInfo(entity === null || entity === void 0 ? void 0 : entity.id))];
74
+ if (!(data.step_name === TAX_STEP_NAMES.PHONE_AUTH)) return [3, 3];
75
+ thunkApi.dispatch(handleCurrentActiveScreen('TAX_VERIFY_STEP'));
76
+ return [3, 6];
76
77
  case 3:
78
+ if (!hasTaxCompleted) return [3, 5];
79
+ return [4, thunkApi.dispatch(retrieveEntityInfo(entity === null || entity === void 0 ? void 0 : entity.id))];
80
+ case 4:
77
81
  _b.sent();
78
82
  thunkApi.dispatch(handleNextScreenStep('TAX_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
79
- return [3, 5];
80
- case 4:
83
+ return [3, 6];
84
+ case 5:
81
85
  if (data.step_name === TAX_STEP_NAMES.TAX_INFO) {
82
86
  thunkApi.dispatch(handleNextScreenStep('TAX_TAX_DETAILS_STEP'));
83
87
  }
84
- _b.label = 5;
85
- case 5: return [2, { data: data, leadData: leadResponse === null || leadResponse === void 0 ? void 0 : leadResponse.data, token: token }];
88
+ _b.label = 6;
89
+ case 6: return [2, { data: data, leadData: leadResponse === null || leadResponse === void 0 ? void 0 : leadResponse.data, token: token }];
86
90
  }
87
91
  });
88
92
  }); });
@@ -159,7 +163,8 @@ export var updateTaxInfo = createAsyncThunk('updateTaxInfo', function (params, t
159
163
  requestBody = {
160
164
  id: (_c = (_b = tax.data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.entity) === null || _c === void 0 ? void 0 : _c.id,
161
165
  vat_id: params.vatId,
162
- step_name: TAX_STEP_NAMES.TAX_INFO
166
+ step_name: TAX_STEP_NAMES.TAX_INFO,
167
+ is_vat_acknowledged: params.confirmPolicy
163
168
  };
164
169
  return [4, API.entityService.updateEntityInfo(requestBody)];
165
170
  case 1:
@@ -36,11 +36,10 @@ var Bank = memo(function (props) {
36
36
  var verifyToken = function () {
37
37
  var token = getParameterByName('token');
38
38
  var lang = getParameterByName('lang');
39
+ if (lang)
40
+ dispatch(handleLanguage(lang));
39
41
  if (!token)
40
42
  throw new Error('Auth token is not found!');
41
- if (!lang)
42
- throw new Error('Language is not found!');
43
- dispatch(handleLanguage(lang));
44
43
  dispatch(verifyLeadToken(token));
45
44
  };
46
45
  useEffect(function () {
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ export interface ResetPasswordSuccessProps {
3
+ }
4
+ declare const _default: React.MemoExoticComponent<({}: ResetPasswordSuccessProps) => JSX.Element>;
5
+ export default _default;
@@ -0,0 +1,9 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from 'react';
3
+ import { useTranslation } from 'react-i18next';
4
+ import SuccessScreen from '../../../shared/SuccessScreen';
5
+ var ResetPasswordSuccess = function (_a) {
6
+ var t = useTranslation().t;
7
+ return (_jsx(SuccessScreen, { title: t("reset_password_success_title"), description: t("reset_password_success_description"), showEmailProviders: true }));
8
+ };
9
+ export default React.memo(ResetPasswordSuccess);
@@ -0,0 +1,3 @@
1
+ import ResetPasswordSuccess, { ResetPasswordSuccessProps } from './ResetPasswordSuccess';
2
+ export type { ResetPasswordSuccessProps };
3
+ export default ResetPasswordSuccess;
@@ -0,0 +1,2 @@
1
+ import ResetPasswordSuccess from './ResetPasswordSuccess';
2
+ export default ResetPasswordSuccess;
@@ -10,13 +10,13 @@ var __assign = (this && this.__assign) || function () {
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
12
  import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
13
- import React, { memo, useEffect, useState } from 'react';
13
+ import { memo, useEffect, useState } from 'react';
14
14
  import { useTranslation } from 'react-i18next';
15
15
  import { styled } from '@mui/material/styles';
16
16
  import { FlowsButtons } from '../../../shared/Button';
17
17
  import { ICONS_NAMES, PASSWORD_OPERATION_TYPE } from '../../../../constants';
18
18
  import { useAppSelector, useLanguage } from '../../../../hooks';
19
- import { allAreTruthy, getResetFlowUrl, showLastFour } from '../../../../utils';
19
+ import { getResetFlowUrl, showLastFour } from '../../../../utils';
20
20
  import { bankSelector } from '../../../app/bank/bankStore';
21
21
  import Box from '@mui/material/Box';
22
22
  import Text from '../../../../components/Text';
@@ -47,19 +47,20 @@ var SuccessWithFlowButtons = function () {
47
47
  var _a, _b, _c;
48
48
  var t = useTranslation().t;
49
49
  var isAr = useLanguage().isAr;
50
- var _d = React.useState(false), isAcceptance = _d[0], setIsAcceptance = _d[1];
51
- var _e = React.useState(false), isPayout = _e[0], setIsPayout = _e[1];
52
50
  var data = useAppSelector(bankSelector).data;
53
- var _f = data.verify.responseBody || {}, flows = _f.flows, nameObj = _f.name, entity = _f.entity, brand = _f.brand, bank = _f.bank_account;
54
- var _g = useState([]), buttons = _g[0], setButtons = _g[1];
51
+ var _d = data.verify.responseBody || {}, flows = _d.flows, nameObj = _d.name, entity = _d.entity, brand = _d.brand, bank = _d.bank_account, merchant = _d.merchant, identification_id = _d.identification_id;
52
+ var _e = useState([]), buttons = _e[0], setButtons = _e[1];
55
53
  var username = ((nameObj === null || nameObj === void 0 ? void 0 : nameObj.first) || '') + ' ' + ((nameObj === null || nameObj === void 0 ? void 0 : nameObj.last) || '');
56
54
  var licenseNumber = ((_a = entity === null || entity === void 0 ? void 0 : entity.license) === null || _a === void 0 ? void 0 : _a.number) || '';
57
55
  var bankName = (bank === null || bank === void 0 ? void 0 : bank.name) || t('bank');
58
56
  var iban = showLastFour((bank === null || bank === void 0 ? void 0 : bank.iban) || '');
59
57
  var taxID = (entity === null || entity === void 0 ? void 0 : entity.tax_number) || '';
60
58
  var brandName = (isAr ? (_b = brand === null || brand === void 0 ? void 0 : brand.name) === null || _b === void 0 ? void 0 : _b.ar : (_c = brand === null || brand === void 0 ? void 0 : brand.name) === null || _c === void 0 ? void 0 : _c.en) || '';
59
+ var isAcceptance = merchant === null || merchant === void 0 ? void 0 : merchant.is_acceptance_allowed;
60
+ var isPayout = merchant === null || merchant === void 0 ? void 0 : merchant.is_payout_allowed;
61
+ var maskedId = !!identification_id ? " ".concat(t('masking_symbols')).concat(identification_id) : '';
61
62
  var settings = useAppSelector(settingsSelector);
62
- var _h = data.verify.responseBody || { contact: {}, id: '' }, contact = _h.contact, id = _h.id;
63
+ var _f = data.verify.responseBody || { contact: {}, id: '' }, contact = _f.contact, id = _f.id;
63
64
  var email = (contact || { email: '' }).email;
64
65
  var url = getResetFlowUrl('/password', settings.data.language, PASSWORD_OPERATION_TYPE.RESET_PASSWORD, id);
65
66
  var reMapFlowData = function (flows) {
@@ -71,15 +72,13 @@ var SuccessWithFlowButtons = function () {
71
72
  var name = _a.name, url = _a.url, status = _a.status;
72
73
  var type = status === 'initiated' ? 'pending' : 'completed';
73
74
  var title = t("".concat(name, "_flow_").concat(type), {
74
- individual_name: username.toLowerCase(),
75
+ individual_name: username.toLowerCase() + maskedId,
75
76
  business_type: brandName,
76
77
  license_number: t('masking_symbols') + showLastFour(licenseNumber),
77
78
  bank_name: bankName,
78
79
  iban: t('masking_symbols') + iban,
79
80
  tax_id: t('masking_symbols') + showLastFour(taxID)
80
81
  });
81
- if ("business_flow_completed" === "".concat(name, "_flow_").concat(type))
82
- setIsAcceptance(true);
83
82
  var isCompleted = status === 'completed' && name !== 'password';
84
83
  var isIndividual = name === 'individual';
85
84
  var src = isCompleted ? "".concat(name, "_green_icon") : "".concat(name, "_filled_icon");
@@ -96,9 +95,6 @@ var SuccessWithFlowButtons = function () {
96
95
  };
97
96
  });
98
97
  setButtons(mappedFlows);
99
- var isAllCompleted = allAreTruthy(flows, 'completed', 'status', 'password');
100
- if (isAllCompleted)
101
- setIsPayout(true);
102
98
  };
103
99
  useEffect(function () {
104
100
  if ((flows === null || flows === void 0 ? void 0 : flows.length) > 0)
@@ -36,11 +36,10 @@ var Business = memo(function (props) {
36
36
  var verifyToken = function () {
37
37
  var token = getParameterByName('token');
38
38
  var lang = getParameterByName('lang');
39
+ if (lang)
40
+ dispatch(handleLanguage(lang));
39
41
  if (!token)
40
42
  throw new Error('Auth token is not found!');
41
- if (!lang)
42
- throw new Error('Language is not found!');
43
- dispatch(handleLanguage(lang));
44
43
  dispatch(verifyLeadToken(token));
45
44
  };
46
45
  useEffect(function () {
@@ -72,6 +72,6 @@ var Activities = function () {
72
72
  anchorEl ? setAnchorEl(false) : setAnchorEl(true);
73
73
  };
74
74
  var disabled = !methods.formState.isValid || !!error;
75
- return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsxs(Collapse, __assign({ in: !collapse }, { children: [_jsx(ActivitiesList, { onListOpen: function () { return handleMenuClick(); }, onListClose: function () { return handleMenuClick(); } }), _jsx(Collapse, __assign({ in: !anchorEl }, { children: _jsx(SalesChannels, {}) }))] })), _jsx(Collapse, __assign({ in: !anchorEl }, { children: _jsx(OperationStartDate, { onDateClicked: handleCollapseOpenClose }) })), _jsx(Collapse, __assign({ in: !collapse && !anchorEl }, { children: _jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, isAr: isAr, disabled: disabled, loading: loading, error: t(error || '') }, { children: t('next') })) }))] })) })) }));
75
+ return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsxs(Collapse, __assign({ in: !collapse }, { children: [_jsx(ActivitiesList, { onListOpen: function () { return handleMenuClick(); }, onListClose: function () { return handleMenuClick(); } }), _jsx(Collapse, __assign({ in: !anchorEl }, { children: _jsx(SalesChannels, {}) }))] })), _jsx(Collapse, __assign({ in: !anchorEl }, { children: _jsx(OperationStartDate, { onDateClicked: handleCollapseOpenClose }) })), _jsx(Collapse, __assign({ in: !collapse && !anchorEl }, { children: _jsx(Button, __assign({ disableBack: true, onBackClicked: function () { return onBack(); }, isAr: isAr, disabled: disabled, loading: loading, error: t(error || '') }, { children: t('next') })) }))] })) })) }));
76
76
  };
77
77
  export default Activities;
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ export interface ResetPasswordSuccessProps {
3
+ }
4
+ declare const _default: React.MemoExoticComponent<({}: ResetPasswordSuccessProps) => JSX.Element>;
5
+ export default _default;
@@ -0,0 +1,9 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from 'react';
3
+ import { useTranslation } from 'react-i18next';
4
+ import SuccessScreen from '../../../shared/SuccessScreen';
5
+ var ResetPasswordSuccess = function (_a) {
6
+ var t = useTranslation().t;
7
+ return (_jsx(SuccessScreen, { title: t("reset_password_success_title"), description: t("reset_password_success_description"), showEmailProviders: true }));
8
+ };
9
+ export default React.memo(ResetPasswordSuccess);
@@ -0,0 +1,3 @@
1
+ import ResetPasswordSuccess, { ResetPasswordSuccessProps } from './ResetPasswordSuccess';
2
+ export type { ResetPasswordSuccessProps };
3
+ export default ResetPasswordSuccess;
@@ -0,0 +1,2 @@
1
+ import ResetPasswordSuccess from './ResetPasswordSuccess';
2
+ export default ResetPasswordSuccess;
@@ -10,14 +10,14 @@ var __assign = (this && this.__assign) || function () {
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
12
  import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
13
- import React, { memo, useEffect, useState } from 'react';
13
+ import { memo, useEffect, useState } from 'react';
14
14
  import { useTranslation } from 'react-i18next';
15
15
  import { styled } from '@mui/material/styles';
16
16
  import { FlowsButtons } from '../../../shared/Button';
17
17
  import { ICONS_NAMES, PASSWORD_OPERATION_TYPE } from '../../../../constants';
18
18
  import { useAppSelector, useLanguage } from '../../../../hooks';
19
19
  import { businessSelector } from '../../../app/business/businessStore';
20
- import { allAreTruthy, getResetFlowUrl, showLastFour } from '../../../../utils';
20
+ import { getResetFlowUrl, showLastFour } from '../../../../utils';
21
21
  import Box from '@mui/material/Box';
22
22
  import Text from '../../../../components/Text';
23
23
  import Container from '../../../shared/Containers/ScreenContainer';
@@ -47,19 +47,20 @@ var SuccessWithFlowButtons = function () {
47
47
  var _a, _b, _c;
48
48
  var t = useTranslation().t;
49
49
  var isAr = useLanguage().isAr;
50
- var _d = React.useState(false), isAcceptance = _d[0], setIsAcceptance = _d[1];
51
- var _e = React.useState(false), isPayout = _e[0], setIsPayout = _e[1];
52
50
  var data = useAppSelector(businessSelector).data;
53
- var _f = data.verify.responseBody || {}, flows = _f.flows, nameObj = _f.name, entity = _f.entity, brand = _f.brand, bank = _f.bank_account;
54
- var _g = useState([]), buttons = _g[0], setButtons = _g[1];
51
+ var _d = data.verify.responseBody || {}, flows = _d.flows, nameObj = _d.name, entity = _d.entity, brand = _d.brand, bank = _d.bank_account, merchant = _d.merchant, identification_id = _d.identification_id;
52
+ var _e = useState([]), buttons = _e[0], setButtons = _e[1];
55
53
  var username = ((nameObj === null || nameObj === void 0 ? void 0 : nameObj.first) || '') + ' ' + ((nameObj === null || nameObj === void 0 ? void 0 : nameObj.last) || '');
56
54
  var licenseNumber = ((_a = entity === null || entity === void 0 ? void 0 : entity.license) === null || _a === void 0 ? void 0 : _a.number) || '';
57
55
  var bankName = (bank === null || bank === void 0 ? void 0 : bank.bank_name) || t('bank');
58
56
  var iban = showLastFour((bank === null || bank === void 0 ? void 0 : bank.iban) || '');
59
57
  var taxID = (entity === null || entity === void 0 ? void 0 : entity.tax_number) || '';
60
58
  var brandName = (isAr ? (_b = brand === null || brand === void 0 ? void 0 : brand.name) === null || _b === void 0 ? void 0 : _b.ar : (_c = brand === null || brand === void 0 ? void 0 : brand.name) === null || _c === void 0 ? void 0 : _c.en) || '';
59
+ var isAcceptance = merchant === null || merchant === void 0 ? void 0 : merchant.is_acceptance_allowed;
60
+ var isPayout = merchant === null || merchant === void 0 ? void 0 : merchant.is_payout_allowed;
61
+ var maskedId = !!identification_id ? " ".concat(t('masking_symbols')).concat(identification_id) : '';
61
62
  var settings = useAppSelector(settingsSelector);
62
- var _h = data.verify.responseBody || { contact: {}, id: '' }, contact = _h.contact, id = _h.id;
63
+ var _f = data.verify.responseBody || { contact: {}, id: '' }, contact = _f.contact, id = _f.id;
63
64
  var email = (contact || { email: '' }).email;
64
65
  var url = getResetFlowUrl('/password', settings.data.language, PASSWORD_OPERATION_TYPE.RESET_PASSWORD, id);
65
66
  var reMapFlowData = function (flows) {
@@ -71,15 +72,13 @@ var SuccessWithFlowButtons = function () {
71
72
  var name = _a.name, url = _a.url, status = _a.status;
72
73
  var type = status === 'initiated' ? 'pending' : 'completed';
73
74
  var title = t("".concat(name, "_flow_").concat(type), {
74
- individual_name: username.toLowerCase(),
75
+ individual_name: username.toLowerCase() + maskedId,
75
76
  business_type: brandName,
76
77
  license_number: t('masking_symbols') + showLastFour(licenseNumber),
77
78
  bank_name: bankName,
78
79
  iban: t('masking_symbols') + iban,
79
80
  tax_id: t('masking_symbols') + showLastFour(taxID)
80
81
  });
81
- if ("business_flow_completed" === "".concat(name, "_flow_").concat(type))
82
- setIsAcceptance(true);
83
82
  var isCompleted = status === 'completed' && name !== 'password';
84
83
  var isIndividual = name === 'individual';
85
84
  var src = isCompleted ? "".concat(name, "_green_icon") : "".concat(name, "_filled_icon");
@@ -96,9 +95,6 @@ var SuccessWithFlowButtons = function () {
96
95
  };
97
96
  });
98
97
  setButtons(mappedFlows);
99
- var isAllCompleted = allAreTruthy(flows, 'completed', 'status', 'password');
100
- if (isAllCompleted)
101
- setIsPayout(true);
102
98
  };
103
99
  useEffect(function () {
104
100
  if ((flows === null || flows === void 0 ? void 0 : flows.length) > 0)
@@ -1,4 +1,4 @@
1
- import { REGEX_WEBSITE } from '../../../../constants';
1
+ import { REGEX_WEBSITE, REGEX_BRAND_NAME } from '../../../../constants';
2
2
  import * as yup from 'yup';
3
3
  export var ValidationOptions;
4
4
  (function (ValidationOptions) {
@@ -17,7 +17,9 @@ export var MerchantValidationSchema = function (userType) {
17
17
  var length = (value === null || value === void 0 ? void 0 : value.length) || 0;
18
18
  if (length === 0)
19
19
  return true;
20
- return length < 3 ? this.createError({ message: 'enter_brand_name_english_chars_numbers_space' }) : true;
20
+ return !(value === null || value === void 0 ? void 0 : value.match(REGEX_BRAND_NAME))
21
+ ? this.createError({ message: 'enter_brand_name_english_chars_numbers_space' })
22
+ : true;
21
23
  }
22
24
  })
23
25
  .required(''),
@@ -107,6 +107,6 @@ var Mobile = function (_a) {
107
107
  var disabled = !methods.formState.isValid || !!error;
108
108
  var title = t('join_our_community');
109
109
  var subTitle = t('ide_terms_and_conditions_description');
110
- return (_jsxs(ScreenContainer, { children: [(title || subTitle) && _jsx(MIDTitle, { show: !listActive, title: title, description: subTitle }), _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(InputsContainerStyled, { children: _jsx(MobileNumber, { show: !isBusinessListActive, countries: settingsStore.data.countries, onListOpen: function () { return handleMenuListClick(ListType.CountryCodeList); }, onListClose: function () { return handleMenuListClick(); } }) }), _jsxs(Collapse, __assign({ in: !listActive }, { children: [_jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, isAr: isAr, disableBack: true, disabled: disabled || settingsStore.loading, loading: loading, error: t(error || '') }, { children: t('next') })), _jsxs(OrBoxStyled, { children: [_jsx(DividerStyled, {}), _jsx(TextStyled, { children: t('or') }), _jsx(DividerStyled, {})] }), _jsx(AbsherButton, __assign({ disabled: settingsStore.loading || loading, onClick: function () { return onBack(); } }, { children: t('absher_button_label') }))] }))] })) }))] }));
110
+ return (_jsxs(ScreenContainer, { children: [(title || subTitle) && _jsx(MIDTitle, { show: !listActive, title: title, description: subTitle }), _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(InputsContainerStyled, { children: _jsx(MobileNumber, { show: !isBusinessListActive, countries: settingsStore.data.countries, onListOpen: function () { return handleMenuListClick(ListType.CountryCodeList); }, onListClose: function () { return handleMenuListClick(); } }) }), _jsxs(Collapse, __assign({ in: !listActive }, { children: [_jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, isAr: isAr, disableBack: true, disabled: disabled || settingsStore.loading, loading: loading, error: t(error || '') }, { children: t('next') })), _jsxs(Collapse, __assign({ in: !methods.formState.isValid }, { children: [_jsxs(OrBoxStyled, { children: [_jsx(DividerStyled, {}), _jsx(TextStyled, { children: t('or') }), _jsx(DividerStyled, {})] }), _jsx(AbsherButton, __assign({ disabled: settingsStore.loading || loading, onClick: function () { return onBack(); } }, { children: t('absher_button_label') }))] }))] }))] })) }))] }));
111
111
  };
112
112
  export default React.memo(Mobile);
@@ -147,7 +147,7 @@ var MobileNumber = React.forwardRef(function (_a, ref) {
147
147
  });
148
148
  setCountries(filteredCountries);
149
149
  };
150
- return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, __assign({ ref: ref }, { children: [_jsx(LabelContainerStyled, { children: _jsx(InputLabelStyled, { children: t('signup_enter_mobile') }) }), _jsx(InputStyled, { inputProps: { maxLength: requiredLen }, type: 'tel', readOnly: !!anchorEl, required: true, onClick: onCloseCountryList, onChange: onPhoneNumberChange, onEnterPressed: function (e) { return loading && e.preventDefault(); }, value: !!anchorEl ? countryName : mobileValue, startAdornment: _jsxs(CountryCodeStyled, __assign({ onClick: function () { return toggleCountryList(); } }, { children: ["+".concat(countryCodeValue === null || countryCodeValue === void 0 ? void 0 : countryCodeValue.idd_prefix), !anchorEl && _jsx(ExpandIconStyled, { anchorEl: !!anchorEl })] })), endAdornment: !!anchorEl ? (_jsx(ExpandIconStyled, { onClick: function () { return toggleCountryList(); }, anchorEl: !!anchorEl })) : !error && mobileValue ? (_jsx(CheckIcon, {})) : (mobileValue && _jsx(ClearIcon, { onClick: clearMobileNumber })), placeholder: "".concat(isSA ? '5' : '0', "00000000"), warningType: 'alert', warningMessage: !anchorEl ? error && t(error, { length: requiredLen, number: '05|5' }) : undefined }), _jsxs(Collapse, __assign({ in: !!anchorEl }, { children: [_jsx(Search, { onSearchValue: handleSearch }), _jsx(SimpleList, { searchKeyPath: 'name.english', list: countriesCode, onSelectItem: onSelectItem, renderItem: function (item) {
150
+ return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, __assign({ ref: ref, sx: { minHeight: mobileValue ? '133px' : '0px' } }, { children: [_jsx(LabelContainerStyled, { children: _jsx(InputLabelStyled, { children: t('signup_enter_mobile') }) }), _jsx(InputStyled, { inputProps: { maxLength: requiredLen }, type: 'tel', readOnly: !!anchorEl, required: true, onClick: onCloseCountryList, onChange: onPhoneNumberChange, onEnterPressed: function (e) { return loading && e.preventDefault(); }, value: !!anchorEl ? countryName : mobileValue, startAdornment: _jsxs(CountryCodeStyled, __assign({ onClick: function () { return toggleCountryList(); } }, { children: ["+".concat(countryCodeValue === null || countryCodeValue === void 0 ? void 0 : countryCodeValue.idd_prefix), !anchorEl && _jsx(ExpandIconStyled, { anchorEl: !!anchorEl })] })), endAdornment: !!anchorEl ? (_jsx(ExpandIconStyled, { onClick: function () { return toggleCountryList(); }, anchorEl: !!anchorEl })) : !error && mobileValue ? (_jsx(CheckIcon, {})) : (mobileValue && _jsx(ClearIcon, { onClick: clearMobileNumber })), placeholder: "".concat(isSA ? '5' : '0', "00000000"), warningType: 'alert', warningMessage: !anchorEl ? error && t(error, { length: requiredLen, number: '05|5' }) : undefined }), _jsxs(Collapse, __assign({ in: !!anchorEl }, { children: [_jsx(Search, { onSearchValue: handleSearch }), _jsx(SimpleList, { searchKeyPath: 'name.english', list: countriesCode, onSelectItem: onSelectItem, renderItem: function (item) {
151
151
  return (_jsxs(_Fragment, { children: [_jsxs(CountryItemContainer, { children: [_jsxs(CountryCodeText, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.idd_prefix) === (countryCodeValue === null || countryCodeValue === void 0 ? void 0 : countryCodeValue.idd_prefix) }, { children: ["+", item.idd_prefix] })), _jsx(CountryNameText, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.idd_prefix) === (countryCodeValue === null || countryCodeValue === void 0 ? void 0 : countryCodeValue.idd_prefix) }, { children: isAr ? item.name.arabic : item.name.english }))] }), item.idd_prefix === (countryCodeValue === null || countryCodeValue === void 0 ? void 0 : countryCodeValue.idd_prefix) && _jsx(CheckIcon, {})] }));
152
152
  } })] }))] })) })));
153
153
  });
@@ -55,6 +55,6 @@ var IDNumber = React.forwardRef(function (_a, ref) {
55
55
  };
56
56
  var nidValue = nidControl.field.value;
57
57
  var error = (_b = nidControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
58
- return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ ref: ref }, { children: [_jsx(LabelContainerStyled, { children: _jsx(InputLabelStyled, { children: t('enter_national_id') }) }), _jsx(Input, { dir: 'ltr', type: 'tel', inputProps: { maxLength: ID_NUMBER_LENGTH }, onChange: handleIdChange, value: nidValue, endAdornment: !error && nidValue ? _jsx(CheckIcon, {}) : nidValue && _jsx(ClearIcon, { onClick: clearIdNumber }), placeholder: '0000000000', warningType: 'alert', warningMessage: error && t(error, { number: '1' }), required: true })] })) })));
58
+ return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ ref: ref }, { children: [_jsx(LabelContainerStyled, { children: _jsx(InputLabelStyled, { children: t('enter_national_id') }) }), _jsx(Input, { dir: 'ltr', type: 'tel', inputProps: { maxLength: ID_NUMBER_LENGTH }, onChange: handleIdChange, value: nidValue, endAdornment: !error && nidValue ? _jsx(CheckIcon, {}) : nidValue && _jsx(ClearIcon, { onClick: clearIdNumber }), placeholder: t('national_id_placeholder'), warningType: 'alert', warningMessage: error && t(error, { number: '1' }), required: true })] })) })));
59
59
  });
60
60
  export default React.memo(IDNumber);
@@ -85,6 +85,6 @@ var NID = function (_a) {
85
85
  dispatch(handlePrevScreenStep('CONNECT_MOBILE_STEP'));
86
86
  };
87
87
  var disabled = !methods.formState.isValid || !!error;
88
- return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(Collapse, __assign({ in: !collapse }, { children: _jsx(IDNumber, { show: !collapse }) })), _jsx(DOB, { onDateClicked: handleCollapseOpenClose }), _jsxs(Collapse, __assign({ in: !collapse }, { children: [_jsx(Button, __assign({ loading: loading, isAr: isAr, disableBack: true, disabled: disabled || settingsStore.loading, error: t(error || '') }, { children: t('next') })), _jsxs(OrBoxStyled, { children: [_jsx(DividerStyled, {}), _jsx(TextStyled, { children: t('or') }), _jsx(DividerStyled, {})] }), _jsx(MobileButton, __assign({ onClick: function () { return onBack(); }, disabled: loading || settingsStore.loading }, { children: t('mobile_button_label') }))] }))] })) })) }));
88
+ return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(Collapse, __assign({ in: !collapse }, { children: _jsx(IDNumber, { show: !collapse }) })), _jsx(DOB, { onDateClicked: handleCollapseOpenClose }), _jsxs(Collapse, __assign({ in: !collapse }, { children: [_jsx(Button, __assign({ loading: loading, isAr: isAr, disableBack: true, disabled: disabled || settingsStore.loading, error: t(error || '') }, { children: t('next') })), _jsxs(Collapse, __assign({ in: !methods.formState.isValid }, { children: [_jsxs(OrBoxStyled, { children: [_jsx(DividerStyled, {}), _jsx(TextStyled, { children: t('or') }), _jsx(DividerStyled, {})] }), _jsx(MobileButton, __assign({ onClick: function () { return onBack(); }, disabled: loading || settingsStore.loading }, { children: t('mobile_button_label') }))] }))] }))] })) })) }));
89
89
  };
90
90
  export default React.memo(NID);
@@ -12,23 +12,28 @@ import BusinessTypePage from './business/screens/BusinessType';
12
12
  import ActivitiesPage from './business/screens/Activities';
13
13
  import SuccessPage from './business/screens/Success';
14
14
  import SuccessWithFlowButtonsPage from './business/screens/SuccessWithFlowButtons';
15
+ import ResetPasswordSuccessPage from './business/screens/ResetPasswordSuccess';
15
16
  import PasswordVerifyPage from './password/screens/Verify';
16
17
  import CreatePasswordPage from './password/screens/CreatePassword';
17
18
  import PasswordOTPPage from './password/screens/OTP';
18
19
  import SuccessPasswordPage from './password/screens/Success';
19
20
  import PasswordSuccessWithFlowPage from './password/screens/SuccessWithFlowButtons';
21
+ import PasswordResetPasswordSuccessPage from './password/screens/ResetPasswordSuccess';
20
22
  import IndividualVerifyPage from './individual/screens/Verify';
21
23
  import AdditionalIndividualInfoPage from './individual/screens/AdditionalIndividualInfo';
22
24
  import SuccessOwnerPage from './individual/screens/Success';
23
25
  import IndividualSuccessWithFlowPage from './individual/screens/SuccessWithFlowButtons';
26
+ import IndividualResetPasswordSuccessPage from './individual/screens/ResetPasswordSuccess';
24
27
  import BankVerifyPage from './bank/screens/Verify';
25
28
  import BankDetailsPage from './bank/screens/BankDetails';
26
29
  import BankSuccessPage from './bank/screens/Success';
27
30
  import BankSuccessWithFlowPage from './bank/screens/SuccessWithFlowButtons';
31
+ import BankResetPasswordSuccessPage from './bank/screens/ResetPasswordSuccess';
28
32
  import TaxVerifyPage from './tax/screens/Verify';
29
33
  import TaxDetailsPage from './tax/screens/TaxDetails';
30
34
  import TaxSuccessPage from './tax/screens/Success';
31
35
  import TaxSuccessWithFlowPage from './tax/screens/SuccessWithFlowButtons';
36
+ import TaxResetPasswordSuccessPage from './tax/screens/ResetPasswordSuccess';
32
37
  export var connectFeatureScreens = [
33
38
  {
34
39
  name: 'CONNECT_NID_STEP',
@@ -81,7 +86,8 @@ export var businessFeatureScreens = [
81
86
  element: CustomersPage
82
87
  },
83
88
  { name: 'BUSINESS_SUCCESS_STEP', element: SuccessPage },
84
- { name: 'BUSINESS_SUCCESS_FOUR_FLOWS_BUTTONS_STEP', element: SuccessWithFlowButtonsPage }
89
+ { name: 'BUSINESS_SUCCESS_FOUR_FLOWS_BUTTONS_STEP', element: SuccessWithFlowButtonsPage },
90
+ { name: 'BUSINESS_RESET_PASSWORD_SUCCESS', element: ResetPasswordSuccessPage }
85
91
  ];
86
92
  export var passwordFeatureScreens = [
87
93
  {
@@ -103,7 +109,8 @@ export var passwordFeatureScreens = [
103
109
  {
104
110
  name: 'PASSWORD_SUCCESS_FOUR_FLOWS_BUTTONS_STEP',
105
111
  element: PasswordSuccessWithFlowPage
106
- }
112
+ },
113
+ { name: 'PASSWORD_RESET_PASSWORD_SUCCESS', element: PasswordResetPasswordSuccessPage }
107
114
  ];
108
115
  export var individualFeatureScreens = [
109
116
  {
@@ -121,7 +128,8 @@ export var individualFeatureScreens = [
121
128
  {
122
129
  name: 'INDIVIDUAL_SUCCESS_FOUR_FLOWS_BUTTONS_STEP',
123
130
  element: IndividualSuccessWithFlowPage
124
- }
131
+ },
132
+ { name: 'INDIVIDUAL_RESET_PASSWORD_SUCCESS', element: IndividualResetPasswordSuccessPage }
125
133
  ];
126
134
  export var bankFeatureScreens = [
127
135
  {
@@ -139,7 +147,8 @@ export var bankFeatureScreens = [
139
147
  {
140
148
  name: 'BANK_SUCCESS_FOUR_FLOWS_BUTTONS_STEP',
141
149
  element: BankSuccessWithFlowPage
142
- }
150
+ },
151
+ { name: 'BANK_RESET_PASSWORD_SUCCESS', element: BankResetPasswordSuccessPage }
143
152
  ];
144
153
  export var taxFeatureScreens = [
145
154
  {
@@ -157,5 +166,6 @@ export var taxFeatureScreens = [
157
166
  {
158
167
  name: 'TAX_SUCCESS_FOUR_FLOWS_BUTTONS_STEP',
159
168
  element: TaxSuccessWithFlowPage
160
- }
169
+ },
170
+ { name: 'TAX_RESET_PASSWORD_SUCCESS', element: TaxResetPasswordSuccessPage }
161
171
  ];
@@ -36,11 +36,10 @@ var Individual = memo(function (props) {
36
36
  var verifyToken = function () {
37
37
  var token = getParameterByName('token');
38
38
  var lang = getParameterByName('lang');
39
+ if (lang)
40
+ dispatch(handleLanguage(lang));
39
41
  if (!token)
40
42
  throw new Error('Auth token is not found!');
41
- if (!lang)
42
- throw new Error('Language is not found!');
43
- dispatch(handleLanguage(lang));
44
43
  dispatch(verifyLeadToken(token));
45
44
  };
46
45
  useEffect(function () {
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ export interface ResetPasswordSuccessProps {
3
+ }
4
+ declare const _default: React.MemoExoticComponent<({}: ResetPasswordSuccessProps) => JSX.Element>;
5
+ export default _default;
@@ -0,0 +1,9 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from 'react';
3
+ import { useTranslation } from 'react-i18next';
4
+ import SuccessScreen from '../../../shared/SuccessScreen';
5
+ var ResetPasswordSuccess = function (_a) {
6
+ var t = useTranslation().t;
7
+ return (_jsx(SuccessScreen, { title: t("reset_password_success_title"), description: t("reset_password_success_description"), showEmailProviders: true }));
8
+ };
9
+ export default React.memo(ResetPasswordSuccess);
@@ -0,0 +1,3 @@
1
+ import ResetPasswordSuccess, { ResetPasswordSuccessProps } from './ResetPasswordSuccess';
2
+ export type { ResetPasswordSuccessProps };
3
+ export default ResetPasswordSuccess;
@@ -0,0 +1,2 @@
1
+ import ResetPasswordSuccess from './ResetPasswordSuccess';
2
+ export default ResetPasswordSuccess;
@@ -10,13 +10,13 @@ var __assign = (this && this.__assign) || function () {
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
12
  import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
13
- import React, { memo, useEffect, useState } from 'react';
13
+ import { memo, useEffect, useState } from 'react';
14
14
  import { useTranslation } from 'react-i18next';
15
15
  import { styled } from '@mui/material/styles';
16
16
  import { FlowsButtons } from '../../../shared/Button';
17
17
  import { ICONS_NAMES, PASSWORD_OPERATION_TYPE } from '../../../../constants';
18
18
  import { useAppSelector, useLanguage } from '../../../../hooks';
19
- import { allAreTruthy, getResetFlowUrl, showLastFour } from '../../../../utils';
19
+ import { getResetFlowUrl, showLastFour } from '../../../../utils';
20
20
  import { individualSelector } from '../../../app/individual/individualStore';
21
21
  import Box from '@mui/material/Box';
22
22
  import Text from '../../../../components/Text';
@@ -47,19 +47,20 @@ var SuccessWithFlowButtons = function () {
47
47
  var _a, _b, _c;
48
48
  var t = useTranslation().t;
49
49
  var isAr = useLanguage().isAr;
50
- var _d = React.useState(false), isAcceptance = _d[0], setIsAcceptance = _d[1];
51
- var _e = React.useState(false), isPayout = _e[0], setIsPayout = _e[1];
52
50
  var data = useAppSelector(individualSelector).data;
53
- var _f = data.verify.responseBody || {}, flows = _f.flows, nameObj = _f.name, entity = _f.entity, brand = _f.brand, bank = _f.bank_account;
54
- var _g = useState([]), buttons = _g[0], setButtons = _g[1];
51
+ var _d = data.verify.responseBody || {}, flows = _d.flows, nameObj = _d.name, entity = _d.entity, brand = _d.brand, bank = _d.bank_account, merchant = _d.merchant, identification_id = _d.identification_id;
52
+ var _e = useState([]), buttons = _e[0], setButtons = _e[1];
55
53
  var username = ((nameObj === null || nameObj === void 0 ? void 0 : nameObj.first) || '') + ' ' + ((nameObj === null || nameObj === void 0 ? void 0 : nameObj.last) || '');
56
54
  var licenseNumber = ((_a = entity === null || entity === void 0 ? void 0 : entity.license) === null || _a === void 0 ? void 0 : _a.number) || '';
57
55
  var bankName = (bank === null || bank === void 0 ? void 0 : bank.bank_name) || t('bank');
58
56
  var iban = showLastFour((bank === null || bank === void 0 ? void 0 : bank.iban) || '');
59
57
  var taxID = (entity === null || entity === void 0 ? void 0 : entity.tax_number) || '';
60
58
  var brandName = (isAr ? (_b = brand === null || brand === void 0 ? void 0 : brand.name) === null || _b === void 0 ? void 0 : _b.ar : (_c = brand === null || brand === void 0 ? void 0 : brand.name) === null || _c === void 0 ? void 0 : _c.en) || '';
59
+ var isAcceptance = merchant === null || merchant === void 0 ? void 0 : merchant.is_acceptance_allowed;
60
+ var isPayout = merchant === null || merchant === void 0 ? void 0 : merchant.is_payout_allowed;
61
+ var maskedId = !!identification_id ? " ".concat(t('masking_symbols')).concat(identification_id) : '';
61
62
  var settings = useAppSelector(settingsSelector);
62
- var _h = data.verify.responseBody || { contact: {}, id: '' }, contact = _h.contact, id = _h.id;
63
+ var _f = data.verify.responseBody || { contact: {}, id: '' }, contact = _f.contact, id = _f.id;
63
64
  var email = (contact || { email: '' }).email;
64
65
  var url = getResetFlowUrl('/password', settings.data.language, PASSWORD_OPERATION_TYPE.RESET_PASSWORD, id);
65
66
  var reMapFlowData = function (flows) {
@@ -71,15 +72,13 @@ var SuccessWithFlowButtons = function () {
71
72
  var name = _a.name, url = _a.url, status = _a.status;
72
73
  var type = status === 'initiated' ? 'pending' : 'completed';
73
74
  var title = t("".concat(name, "_flow_").concat(type), {
74
- individual_name: username.toLowerCase(),
75
+ individual_name: username.toLowerCase() + maskedId,
75
76
  business_type: brandName,
76
77
  license_number: t('masking_symbols') + showLastFour(licenseNumber),
77
78
  bank_name: bankName,
78
79
  iban: t('masking_symbols') + iban,
79
80
  tax_id: t('masking_symbols') + showLastFour(taxID)
80
81
  });
81
- if ("business_flow_completed" === "".concat(name, "_flow_").concat(type))
82
- setIsAcceptance(true);
83
82
  var isCompleted = status === 'completed' && name !== 'password';
84
83
  var isIndividual = name === 'individual';
85
84
  var src = isCompleted ? "".concat(name, "_green_icon") : "".concat(name, "_filled_icon");
@@ -96,9 +95,6 @@ var SuccessWithFlowButtons = function () {
96
95
  };
97
96
  });
98
97
  setButtons(mappedFlows);
99
- var isAllCompleted = allAreTruthy(flows, 'completed', 'status', 'password');
100
- if (isAllCompleted)
101
- setIsPayout(true);
102
98
  };
103
99
  useEffect(function () {
104
100
  if ((flows === null || flows === void 0 ? void 0 : flows.length) > 0)
@@ -38,11 +38,10 @@ var Password = memo(function (props) {
38
38
  var lang = getParameterByName('lang');
39
39
  var operationType = getParameterByName('operation_type');
40
40
  var leadId = getParameterByName('lead_id') || '';
41
+ if (lang)
42
+ dispatch(handleLanguage(lang));
41
43
  if (!token)
42
44
  throw new Error('Auth token is not found!');
43
- if (!lang)
44
- throw new Error('Language is not found!');
45
- dispatch(handleLanguage(lang));
46
45
  if (operationType === PASSWORD_OPERATION_TYPE.RESET_PASSWORD) {
47
46
  dispatch(verifyOperationToken({ token: token, leadId: leadId }));
48
47
  return;
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ export interface ResetPasswordSuccessProps {
3
+ }
4
+ declare const _default: React.MemoExoticComponent<({}: ResetPasswordSuccessProps) => JSX.Element>;
5
+ export default _default;
@@ -0,0 +1,9 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from 'react';
3
+ import { useTranslation } from 'react-i18next';
4
+ import SuccessScreen from '../../../shared/SuccessScreen';
5
+ var ResetPasswordSuccess = function (_a) {
6
+ var t = useTranslation().t;
7
+ return (_jsx(SuccessScreen, { title: t("reset_password_success_title"), description: t("reset_password_success_description"), showEmailProviders: true }));
8
+ };
9
+ export default React.memo(ResetPasswordSuccess);
@@ -0,0 +1,3 @@
1
+ import ResetPasswordSuccess, { ResetPasswordSuccessProps } from './ResetPasswordSuccess';
2
+ export type { ResetPasswordSuccessProps };
3
+ export default ResetPasswordSuccess;
@@ -0,0 +1,2 @@
1
+ import ResetPasswordSuccess from './ResetPasswordSuccess';
2
+ export default ResetPasswordSuccess;