@tap-payments/auth-jsconnect 2.0.2 → 2.0.5

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 (124) hide show
  1. package/build/@types/app.d.ts +5 -0
  2. package/build/@types/form.d.ts +4 -1
  3. package/build/api/auth.d.ts +20 -3
  4. package/build/api/axios.js +8 -9
  5. package/build/api/data.d.ts +1 -0
  6. package/build/api/data.js +9 -2
  7. package/build/api/entity.d.ts +13 -1
  8. package/build/api/entity.js +20 -2
  9. package/build/api/index.d.ts +7 -4
  10. package/build/api/lead.d.ts +3 -1
  11. package/build/api/lead.js +14 -2
  12. package/build/assets/locales/ar.json +4 -1
  13. package/build/assets/locales/en.json +4 -1
  14. package/build/components/AnimationFlow/AnimationFlow.d.ts +2 -1
  15. package/build/components/AnimationFlow/AnimationFlow.js +2 -2
  16. package/build/components/AnimationFlow/BottomSheet.d.ts +2 -1
  17. package/build/components/AnimationFlow/BottomSheet.js +16 -4
  18. package/build/components/FileInput/DragAndDrop.d.ts +7 -0
  19. package/build/components/FileInput/DragAndDrop.js +39 -0
  20. package/build/components/FileInput/UploadInput.d.ts +7 -0
  21. package/build/components/FileInput/UploadInput.js +38 -0
  22. package/build/components/FileInput/index.d.ts +3 -0
  23. package/build/components/FileInput/index.js +3 -0
  24. package/build/constants/api.d.ts +3 -1
  25. package/build/constants/api.js +7 -3
  26. package/build/constants/app.d.ts +5 -0
  27. package/build/constants/app.js +55 -9
  28. package/build/constants/assets.d.ts +1 -0
  29. package/build/constants/assets.js +1 -0
  30. package/build/constants/validation.d.ts +2 -0
  31. package/build/constants/validation.js +2 -0
  32. package/build/features/app/bank/bankStore.d.ts +1 -0
  33. package/build/features/app/bank/bankStore.js +59 -18
  34. package/build/features/app/business/businessStore.d.ts +3 -5
  35. package/build/features/app/business/businessStore.js +149 -50
  36. package/build/features/app/connect/connectStore.d.ts +5 -10
  37. package/build/features/app/connect/connectStore.js +135 -41
  38. package/build/features/app/individual/individualStore.d.ts +3 -2
  39. package/build/features/app/individual/individualStore.js +50 -37
  40. package/build/features/app/password/passwordStore.d.ts +32 -1
  41. package/build/features/app/password/passwordStore.js +197 -14
  42. package/build/features/app/tax/taxStore.js +19 -12
  43. package/build/features/bank/Bank.js +3 -4
  44. package/build/features/bank/screens/BankDetails/BankDetails.js +2 -1
  45. package/build/features/bank/screens/BankDetails/BankStatement.d.ts +3 -0
  46. package/build/features/bank/screens/BankDetails/BankStatement.js +38 -0
  47. package/build/features/bank/screens/BankDetails/validation.d.ts +3 -0
  48. package/build/features/bank/screens/BankDetails/validation.js +1 -0
  49. package/build/features/bank/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +5 -0
  50. package/build/features/bank/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +9 -0
  51. package/build/features/bank/screens/ResetPasswordSuccess/index.d.ts +3 -0
  52. package/build/features/bank/screens/ResetPasswordSuccess/index.js +2 -0
  53. package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +23 -15
  54. package/build/features/business/Business.js +3 -4
  55. package/build/features/business/screens/Activities/Activities.js +2 -1
  56. package/build/features/business/screens/Activities/LicenseName.d.ts +5 -0
  57. package/build/features/business/screens/Activities/LicenseName.js +30 -0
  58. package/build/features/business/screens/IDBOD/IDBOD.js +1 -1
  59. package/build/features/business/screens/OTP/OTPInput.js +3 -9
  60. package/build/features/business/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +5 -0
  61. package/build/features/business/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +9 -0
  62. package/build/features/business/screens/ResetPasswordSuccess/index.d.ts +3 -0
  63. package/build/features/business/screens/ResetPasswordSuccess/index.js +2 -0
  64. package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +24 -17
  65. package/build/features/connect/Connect.js +1 -1
  66. package/build/features/connect/screens/Merchant/BrandList.js +1 -5
  67. package/build/features/connect/screens/Merchant/Merchant.js +10 -8
  68. package/build/features/connect/screens/Merchant/validation.js +4 -2
  69. package/build/features/connect/screens/Mobile/Mobile.js +2 -2
  70. package/build/features/connect/screens/Mobile/MobileNumber.js +1 -1
  71. package/build/features/connect/screens/NID/IDNumber.js +1 -1
  72. package/build/features/connect/screens/NID/NID.js +2 -2
  73. package/build/features/connect/screens/OTP/OTPInput.js +3 -13
  74. package/build/features/featuresScreens.js +20 -5
  75. package/build/features/individual/Individual.js +3 -4
  76. package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +7 -1
  77. package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.d.ts +10 -0
  78. package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.js +89 -0
  79. package/build/features/individual/screens/AdditionalIndividualInfo/validation.d.ts +3 -0
  80. package/build/features/individual/screens/AdditionalIndividualInfo/validation.js +1 -0
  81. package/build/features/individual/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +5 -0
  82. package/build/features/individual/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +9 -0
  83. package/build/features/individual/screens/ResetPasswordSuccess/index.d.ts +3 -0
  84. package/build/features/individual/screens/ResetPasswordSuccess/index.js +2 -0
  85. package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +23 -15
  86. package/build/features/password/Password.js +11 -6
  87. package/build/features/password/screens/CreatePassword/CreatePassword.js +9 -2
  88. package/build/features/password/screens/OTP/OTP.d.ts +8 -0
  89. package/build/features/password/screens/OTP/OTP.js +78 -0
  90. package/build/features/password/screens/OTP/OTPInput.d.ts +5 -0
  91. package/build/features/password/screens/OTP/OTPInput.js +46 -0
  92. package/build/features/password/screens/OTP/index.d.ts +3 -0
  93. package/build/features/password/screens/OTP/index.js +2 -0
  94. package/build/features/password/screens/OTP/validation.d.ts +8 -0
  95. package/build/features/password/screens/OTP/validation.js +4 -0
  96. package/build/features/password/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +5 -0
  97. package/build/features/password/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +9 -0
  98. package/build/features/password/screens/ResetPasswordSuccess/index.d.ts +3 -0
  99. package/build/features/password/screens/ResetPasswordSuccess/index.js +2 -0
  100. package/build/features/password/screens/Success/Success.js +8 -2
  101. package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +24 -16
  102. package/build/features/password/screens/Verify/OTPInput.d.ts +2 -2
  103. package/build/features/password/screens/Verify/OTPInput.js +1 -1
  104. package/build/features/shared/Button/Button.js +1 -1
  105. package/build/features/shared/Button/FlowsButtons.d.ts +8 -2
  106. package/build/features/shared/Button/FlowsButtons.js +90 -6
  107. package/build/features/shared/Button/SuccessButton.js +31 -13
  108. package/build/features/shared/UploadFile/UploadFile.d.ts +21 -0
  109. package/build/features/shared/UploadFile/UploadFile.js +77 -0
  110. package/build/features/shared/UploadFile/index.d.ts +2 -0
  111. package/build/features/shared/UploadFile/index.js +2 -0
  112. package/build/features/tax/Tax.js +3 -4
  113. package/build/features/tax/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +5 -0
  114. package/build/features/tax/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +9 -0
  115. package/build/features/tax/screens/ResetPasswordSuccess/index.d.ts +3 -0
  116. package/build/features/tax/screens/ResetPasswordSuccess/index.js +2 -0
  117. package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +23 -15
  118. package/build/hooks/useAppTheme.js +3 -2
  119. package/build/index.css +4 -0
  120. package/build/theme/theme.d.ts +1 -1
  121. package/build/theme/theme.js +1 -2
  122. package/build/utils/string.d.ts +1 -0
  123. package/build/utils/string.js +6 -1
  124. package/package.json +2 -1
@@ -0,0 +1,77 @@
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 React from 'react';
14
+ import { styled } from '@mui/material/styles';
15
+ import { ScreenContainer } from '../../shared/Containers';
16
+ import Box from '@mui/material/Box';
17
+ import { InputLabelStyled } from '../../shared/Input/Input';
18
+ import Mandatory from '../../shared/Mandatory';
19
+ import { DragAndDrop, UploadInput } from '../../../components/FileInput';
20
+ import Collapse from '../../../components/Collapse';
21
+ import Warning from '../../../components/Warning';
22
+ import Icon from '../../../components/Icon';
23
+ import { ICONS_NAMES } from '../../../constants';
24
+ import { useTranslation } from 'react-i18next';
25
+ import Loader from '../../../components/Loader';
26
+ var FeatureStyled = styled(ScreenContainer)(function (_a) {
27
+ var theme = _a.theme;
28
+ return ({
29
+ marginBlockStart: theme.spacing(0)
30
+ });
31
+ });
32
+ var LabelContainerStyled = styled(Box)(function (_a) {
33
+ var theme = _a.theme;
34
+ return ({
35
+ display: 'flex',
36
+ justifyContent: 'flex-start',
37
+ padding: theme.spacing(0, 2.5, 1.25, 2.5)
38
+ });
39
+ });
40
+ var BoxStyled = styled(Box)(function (_a) {
41
+ var theme = _a.theme;
42
+ return (__assign(__assign({ direction: theme.direction }, theme.typography.subtitle2), { color: theme.palette.primary.main, fontWeight: theme.typography.fontWeightBold, background: theme.palette.background.default, padding: theme.spacing(1.5, 2.5, 1.5), width: '85%' }));
43
+ });
44
+ var UploadBoxStyled = styled(Box)(function (_a) {
45
+ var theme = _a.theme;
46
+ return (__assign(__assign({}, theme.typography.caption), { background: theme.palette.primary.main, color: theme.palette.common.white, fontWeight: theme.typography.fontWeightRegular, padding: theme.spacing(0.75, 1.75, 0), cursor: 'pointer', width: '15%', display: 'flex', justifyContent: 'center' }));
47
+ });
48
+ var IconStyled = styled(Icon)(function (_a) {
49
+ var theme = _a.theme;
50
+ return ({
51
+ marginBlockStart: theme.spacing(0),
52
+ width: theme.spacing(3.5),
53
+ height: theme.spacing(3.5)
54
+ });
55
+ });
56
+ export var InputContainerStyled = styled(Box)(function (_a) {
57
+ var theme = _a.theme;
58
+ return ({
59
+ display: 'flex',
60
+ width: '100%'
61
+ });
62
+ });
63
+ var UploadFile = function (_a) {
64
+ var label = _a.label, required = _a.required, dragTitle = _a.dragTitle, uploadTitle = _a.uploadTitle, loading = _a.loading, error = _a.error, onFileUploaded = _a.onFileUploaded, onReset = _a.onReset;
65
+ var _b = React.useState(''), fileName = _b[0], setFileName = _b[1];
66
+ var t = useTranslation().t;
67
+ var handleFileChange = function (file) {
68
+ setFileName(file === null || file === void 0 ? void 0 : file.name);
69
+ onFileUploaded === null || onFileUploaded === void 0 ? void 0 : onFileUploaded(file);
70
+ };
71
+ var handleReset = function () {
72
+ setFileName('');
73
+ onReset === null || onReset === void 0 ? void 0 : onReset();
74
+ };
75
+ return (_jsxs(FeatureStyled, { children: [_jsxs(LabelContainerStyled, { children: [_jsx(InputLabelStyled, { children: label }), required && _jsx(Mandatory, {})] }), _jsx(Collapse, __assign({ in: !fileName }, { children: _jsxs(InputContainerStyled, { children: [_jsx(DragAndDrop, { title: dragTitle, onSuccess: handleFileChange }), _jsx(UploadInput, { title: uploadTitle, onChange: handleFileChange })] }) })), _jsx(Collapse, __assign({ in: !!fileName }, { children: _jsxs(InputContainerStyled, { children: [_jsx(BoxStyled, { children: loading ? t('loading_bank_statement') : fileName }), _jsxs(UploadBoxStyled, __assign({ onClick: handleReset }, { children: [_jsx(Collapse, __assign({ in: !loading }, { children: _jsx(IconStyled, { src: ICONS_NAMES.DELETE_ICON }) })), _jsx(Collapse, __assign({ in: loading }, { children: _jsx(Loader, { innerColor: 'white', outerColor: 'white', toggleAnimation: true, style: { width: 30, height: 30 }, svgStyle: { width: 30, height: 30 } }) }))] }))] }) })), _jsx(Collapse, __assign({ in: !!error, timeout: 400 }, { children: _jsx(Warning, __assign({ warningType: 'alert' }, { children: error })) }))] }));
76
+ };
77
+ export default UploadFile;
@@ -0,0 +1,2 @@
1
+ import UploadFile from './UploadFile';
2
+ export default UploadFile;
@@ -0,0 +1,2 @@
1
+ import UploadFile from './UploadFile';
2
+ export default UploadFile;
@@ -36,18 +36,17 @@ var Tax = 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 () {
47
46
  if (!loading)
48
47
  verifyToken();
49
48
  }, [loading]);
50
- return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ isTapOrigin: isTapOrigin, loading: loading || customLoading }, { children: _jsx(AnimationFlow, __assign({ isTapOrigin: isTapOrigin, open: open, error: error, loading: loading || customLoading, breakpoint: 'sm', footer: _jsx(CustomFooter, {}) }, { children: _jsx(FeatureContainer, { children: taxFeatureScreens.map(function (_a, index) {
49
+ return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ isTapOrigin: isTapOrigin, loading: loading || customLoading }, { children: _jsx(AnimationFlow, __assign({ isTapOrigin: isTapOrigin, open: open, error: error, loading: loading || customLoading, breakpoint: 'sm', footer: _jsx(CustomFooter, {}), screenId: activeScreen.name }, { children: _jsx(FeatureContainer, { children: taxFeatureScreens.map(function (_a, index) {
51
50
  var Element = _a.element, name = _a.name;
52
51
  var isActive = activeScreen.name === name;
53
52
  return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
@@ -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,18 +10,19 @@ 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
- import { ICONS_NAMES } from '../../../../constants';
17
+ import { ICONS_NAMES, PASSWORD_OPERATION_TYPE } from '../../../../constants';
18
18
  import { useAppSelector, useLanguage } from '../../../../hooks';
19
- import { allAreTruthy, showLastFour } from '../../../../utils';
19
+ import { getResetFlowUrl, showLastFour } from '../../../../utils';
20
20
  import { taxSelector } from '../../../app/tax/taxStore';
21
21
  import Box from '@mui/material/Box';
22
22
  import Text from '../../../../components/Text';
23
23
  import Container from '../../../shared/Containers/ScreenContainer';
24
24
  import AcceptancePayouts from '../../../shared/AcceptancePayouts';
25
+ import { settingsSelector } from '../../../../app/settings';
25
26
  var TitleStyled = styled(Text)(function (_a) {
26
27
  var _b;
27
28
  var theme = _a.theme;
@@ -46,39 +47,45 @@ var SuccessWithFlowButtons = function () {
46
47
  var _a, _b, _c;
47
48
  var t = useTranslation().t;
48
49
  var isAr = useLanguage().isAr;
49
- var _d = React.useState(false), isAcceptance = _d[0], setIsAcceptance = _d[1];
50
- var _e = React.useState(false), isPayout = _e[0], setIsPayout = _e[1];
51
50
  var data = useAppSelector(taxSelector).data;
52
- var _f = data.verify.responseBody || {}, flows = _f.flows, nameObj = _f.name, entity = _f.entity, brand = _f.brand, bank = _f.bank_account;
53
- 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];
54
53
  var username = ((nameObj === null || nameObj === void 0 ? void 0 : nameObj.first) || '') + ' ' + ((nameObj === null || nameObj === void 0 ? void 0 : nameObj.last) || '');
55
54
  var licenseNumber = ((_a = entity === null || entity === void 0 ? void 0 : entity.license) === null || _a === void 0 ? void 0 : _a.number) || '';
56
55
  var bankName = (bank === null || bank === void 0 ? void 0 : bank.bank_name) || t('bank');
57
56
  var iban = showLastFour((bank === null || bank === void 0 ? void 0 : bank.iban) || '');
58
57
  var taxID = (entity === null || entity === void 0 ? void 0 : entity.tax_number) || '';
59
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) : '';
62
+ var settings = useAppSelector(settingsSelector);
63
+ var _f = data.verify.responseBody || { contact: {}, id: '' }, contact = _f.contact, id = _f.id;
64
+ var email = (contact || { email: '' }).email;
65
+ var url = getResetFlowUrl('/password', settings.data.language, PASSWORD_OPERATION_TYPE.RESET_PASSWORD, id);
60
66
  var reMapFlowData = function (flows) {
61
67
  if (flows === void 0) { flows = []; }
62
68
  var images = ICONS_NAMES;
63
- var mappedFlows = flows.map(function (_a) {
69
+ var mappedFlows = flows
70
+ .filter(function (item) { return item.name; })
71
+ .map(function (_a) {
64
72
  var name = _a.name, url = _a.url, status = _a.status;
65
73
  var type = status === 'initiated' ? 'pending' : 'completed';
66
74
  var title = t("".concat(name, "_flow_").concat(type), {
67
- individual_name: username.toLowerCase(),
75
+ individual_name: username.toLowerCase() + maskedId,
68
76
  business_type: brandName,
69
77
  license_number: t('masking_symbols') + showLastFour(licenseNumber),
70
78
  bank_name: bankName,
71
79
  iban: t('masking_symbols') + iban,
72
80
  tax_id: t('masking_symbols') + showLastFour(taxID)
73
81
  });
74
- if ("business_flow_completed" === "".concat(name, "_flow_").concat(type))
75
- setIsAcceptance(true);
76
82
  var isCompleted = status === 'completed' && name !== 'password';
77
83
  var isIndividual = name === 'individual';
78
84
  var src = isCompleted ? "".concat(name, "_green_icon") : "".concat(name, "_filled_icon");
79
85
  var hoverSrc = "".concat(name, "_white_icon");
80
86
  return {
81
87
  name: name,
88
+ status: status,
82
89
  title: title,
83
90
  href: url,
84
91
  src: images[src],
@@ -88,14 +95,15 @@ var SuccessWithFlowButtons = function () {
88
95
  };
89
96
  });
90
97
  setButtons(mappedFlows);
91
- var isAllCompleted = allAreTruthy(flows, 'completed', 'status', 'password');
92
- if (isAllCompleted)
93
- setIsPayout(true);
94
98
  };
95
99
  useEffect(function () {
96
100
  if ((flows === null || flows === void 0 ? void 0 : flows.length) > 0)
97
101
  reMapFlowData(flows);
98
102
  }, [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, flowName: data.flowName }) })] }));
103
+ return (_jsxs(ContainerStyled, { children: [_jsxs(TitleStyled, { children: [t('account_details'), " "] }), _jsx(AcceptancePayouts, { showAcceptance: isAcceptance, showPayout: isPayout }), _jsx(ButtonGroupStyled, { children: _jsx(FlowsButtons, { buttons: buttons, data: {
104
+ flowName: data.flowName,
105
+ email: email,
106
+ emailUrl: url
107
+ } }) })] }));
100
108
  };
101
109
  export default memo(SuccessWithFlowButtons);
@@ -1,6 +1,7 @@
1
1
  import { useEffect, useState } from 'react';
2
2
  import { LanguageMode, DirectionMode } from '../@types';
3
3
  import { settingsSelector } from '../app/settings';
4
+ import { isMobile } from 'react-device-detect';
4
5
  import { useAppSelector } from './useAppSelector';
5
6
  import { appTheme } from '../theme';
6
7
  export var useAppTheme = function () {
@@ -8,7 +9,7 @@ export var useAppTheme = function () {
8
9
  var data = useAppSelector(settingsSelector).data;
9
10
  useEffect(function () {
10
11
  var dir = data.language === LanguageMode.AR ? DirectionMode.RTL : DirectionMode.LTR;
11
- setTheme(appTheme(data.skin, dir));
12
- }, [data.skin, data.language]);
12
+ setTheme(appTheme(data.skin, isMobile, dir));
13
+ }, [data.skin, data.language, isMobile]);
13
14
  return { theme: theme };
14
15
  };
package/build/index.css CHANGED
@@ -133,3 +133,7 @@ table {
133
133
  border-collapse: collapse;
134
134
  border-spacing: 0;
135
135
  }
136
+
137
+ * {
138
+ box-sizing: border-box;
139
+ }
@@ -1,2 +1,2 @@
1
1
  import { DirectionMode, ThemeMode } from '../@types';
2
- export declare const appTheme: (mode: ThemeMode, dir: DirectionMode) => import("@mui/material/styles").Theme;
2
+ export declare const appTheme: (mode: ThemeMode, isMobile: boolean, dir: DirectionMode) => import("@mui/material/styles").Theme;
@@ -3,8 +3,7 @@ import { typography } from './typography';
3
3
  import { darkPalette, lightPalette } from './palette';
4
4
  import { components } from './components';
5
5
  import { shadows } from './shadows';
6
- import { isMobile } from 'react-device-detect';
7
- export var appTheme = function (mode, dir) {
6
+ export var appTheme = function (mode, isMobile, dir) {
8
7
  return createTheme({
9
8
  palette: mode === 'dark' ? darkPalette : lightPalette,
10
9
  direction: dir,
@@ -11,6 +11,7 @@ export declare const convertNumbers2English: (str: string) => string;
11
11
  export declare const getParameterByName: (name: string) => string | null;
12
12
  export declare const getClientEmailUrl: () => string;
13
13
  export declare const getFlowUrl: (path: string, lang: string) => string;
14
+ export declare const getResetFlowUrl: (path: string, lang: string, operationType: string, leadId: string) => string;
14
15
  export declare const capitalizeTheFirstLetterOfEachWord: (words: string) => string;
15
16
  export declare const getRequestHeaders: (deviceInfo: DeviceInfo) => {
16
17
  al: string;
@@ -62,6 +62,10 @@ export var getFlowUrl = function (path, lang) {
62
62
  var origin = window.location.origin;
63
63
  return origin + path + "?lang=".concat(lang, "&token=");
64
64
  };
65
+ export var getResetFlowUrl = function (path, lang, operationType, leadId) {
66
+ var origin = window.location.origin;
67
+ return origin + path + "?lang=".concat(lang, "&operation_type=").concat(operationType, "&lead_id=").concat(leadId, "&token=");
68
+ };
65
69
  export var capitalizeTheFirstLetterOfEachWord = function (words) {
66
70
  var separateWord = words.toLowerCase().split(' ');
67
71
  for (var i = 0; i < separateWord.length; i++) {
@@ -71,6 +75,7 @@ export var capitalizeTheFirstLetterOfEachWord = function (words) {
71
75
  };
72
76
  export var getRequestHeaders = function (deviceInfo) {
73
77
  var app = deviceInfo.app, browser = deviceInfo.browser, connection = deviceInfo.connection, device = deviceInfo.device, source = deviceInfo.source;
78
+ console.log('bi:', browser.browser_id);
74
79
  return {
75
80
  al: encryptString(app.language || ''),
76
81
  at: encryptString(source || ''),
@@ -89,7 +94,7 @@ export var getRequestHeaders = function (deviceInfo) {
89
94
  bb: encryptString(''),
90
95
  bv: encryptString(browser.version || ''),
91
96
  bua: encryptString((browser.user_agent || '').substring(0, 80)),
92
- bi: encryptString(browser.browser_id || ''),
97
+ bi: browser.browser_id || '',
93
98
  ci: encryptString(connection.ip || ''),
94
99
  cm: encryptString(connection.mac || ''),
95
100
  l: encryptString((connection.latitude || 0).toString() + '-' + (connection.longitude || 0).toString())
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tap-payments/auth-jsconnect",
3
- "version": "2.0.2",
3
+ "version": "2.0.5",
4
4
  "description": "connect library, auth",
5
5
  "private": false,
6
6
  "main": "build/index.js",
@@ -94,6 +94,7 @@
94
94
  "react-calendar": "~3.7.0",
95
95
  "react-device-detect": "^2.2.2",
96
96
  "react-dom": "^18.2.0",
97
+ "react-dropzone": "^14.2.2",
97
98
  "react-hook-form": "^7.33.1",
98
99
  "react-i18next": "^11.18.1",
99
100
  "react-otp-input": "^2.4.0",