@tap-payments/auth-jsconnect 2.10.0-development → 2.10.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 (167) hide show
  1. package/README.md +2 -2
  2. package/build/@types/app.d.ts +1 -0
  3. package/build/@types/form.d.ts +2 -0
  4. package/build/@types/index.d.ts +0 -1
  5. package/build/@types/index.js +0 -1
  6. package/build/api/auth.d.ts +1 -9
  7. package/build/api/entity.d.ts +3 -0
  8. package/build/api/index.d.ts +1 -8
  9. package/build/api/index.js +1 -3
  10. package/build/api/lead.d.ts +1 -0
  11. package/build/app/rootReducer.d.ts +0 -1
  12. package/build/app/rootReducer.js +1 -3
  13. package/build/app/settings.js +1 -2
  14. package/build/app/store.d.ts +0 -2
  15. package/build/assets/currencies/AEDSymbol.d.ts +7 -0
  16. package/build/assets/currencies/AEDSymbol.js +28 -0
  17. package/build/assets/currencies/index.d.ts +2 -2
  18. package/build/assets/currencies/index.js +2 -2
  19. package/build/assets/currencies/utils.js +3 -1
  20. package/build/assets/locales/ar.json +48 -12
  21. package/build/assets/locales/en.json +51 -40
  22. package/build/components/TextWithCurrency/TextWithCurrency.js +1 -1
  23. package/build/components/Tooltip/Tooltip.js +1 -1
  24. package/build/constants/api.d.ts +1 -0
  25. package/build/constants/api.js +2 -0
  26. package/build/constants/app.d.ts +12 -11
  27. package/build/constants/app.js +8 -112
  28. package/build/constants/assets.d.ts +7 -6
  29. package/build/constants/assets.js +118 -111
  30. package/build/constants/dummy.js +27 -20
  31. package/build/constants/flows.d.ts +0 -14
  32. package/build/constants/flows.js +0 -14
  33. package/build/constants/validation.d.ts +1 -1
  34. package/build/constants/validation.js +1 -1
  35. package/build/features/app/business/businessStore.js +15 -10
  36. package/build/features/app/connectExpress/connectExpressStore.js +19 -4
  37. package/build/features/app/individual/individualStore.js +1 -0
  38. package/build/features/auth/Auth.d.ts +1 -1
  39. package/build/features/auth/screens/AuthenticationList/EntityList.js +2 -2
  40. package/build/features/business/screens/BusinessType/BusinessType.js +13 -2
  41. package/build/features/business/screens/BusinessType/EntityLicenseList.js +11 -5
  42. package/build/features/business/screens/BusinessType/LicenseList.js +15 -7
  43. package/build/features/business/screens/BusinessType/UnifiedNumber.d.ts +35 -0
  44. package/build/features/business/screens/BusinessType/UnifiedNumber.js +84 -0
  45. package/build/features/business/screens/BusinessType/validation.d.ts +6 -3
  46. package/build/features/business/screens/BusinessType/validation.js +31 -10
  47. package/build/features/connectExpress/screens/AuthenticationList/EntityList.js +2 -2
  48. package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.js +1 -0
  49. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.js +23 -7
  50. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseNumber.js +2 -2
  51. package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.js +1 -1
  52. package/build/features/connectExpress/screens/CollectBusinessInfo/UnifiedNumber.d.ts +36 -0
  53. package/build/features/connectExpress/screens/CollectBusinessInfo/UnifiedNumber.js +81 -0
  54. package/build/features/connectExpress/screens/CollectBusinessInfo/validation.d.ts +6 -3
  55. package/build/features/connectExpress/screens/CollectBusinessInfo/validation.js +57 -21
  56. package/build/features/entity/screens/EntityName/EntityName.js +2 -1
  57. package/build/features/entity/screens/EntityName/UnifiedNumber.js +2 -2
  58. package/build/features/entity/screens/EntityName/validation.d.ts +3 -3
  59. package/build/features/entity/screens/EntityName/validation.js +14 -3
  60. package/build/features/featuresScreens.d.ts +0 -1
  61. package/build/features/featuresScreens.js +0 -62
  62. package/build/features/shared/Button/Button.js +1 -1
  63. package/build/features/shared/Button/FlowsButtons.js +1 -2
  64. package/build/features/shared/SuccessScreen/SuccessScreen.d.ts +1 -3
  65. package/build/features/shared/SuccessScreen/SuccessScreen.js +2 -2
  66. package/build/hooks/useAppConfig.js +1 -1
  67. package/build/hooks/useAppDispatch.d.ts +0 -1
  68. package/build/index.d.ts +2 -3
  69. package/build/index.js +2 -4
  70. package/build/theme/palette.js +0 -12
  71. package/build/theme/typography.js +0 -4
  72. package/build/utils/common.d.ts +1 -1
  73. package/build/utils/common.js +5 -6
  74. package/build/utils/string.d.ts +1 -1
  75. package/build/utils/string.js +3 -1
  76. package/build/utils/validation.js +1 -1
  77. package/package.json +2 -2
  78. package/build/@types/terminal.d.ts +0 -116
  79. package/build/@types/terminal.js +0 -1
  80. package/build/api/terminal.d.ts +0 -23
  81. package/build/api/terminal.js +0 -60
  82. package/build/components/DeviceCard/DeviceCard.d.ts +0 -18
  83. package/build/components/DeviceCard/DeviceCard.js +0 -103
  84. package/build/components/DeviceCard/index.d.ts +0 -3
  85. package/build/components/DeviceCard/index.js +0 -2
  86. package/build/features/app/terminal/terminalStore.d.ts +0 -106
  87. package/build/features/app/terminal/terminalStore.js +0 -635
  88. package/build/features/shared/PushNotification/PushNotification.d.ts +0 -11
  89. package/build/features/shared/PushNotification/PushNotification.js +0 -34
  90. package/build/features/shared/PushNotification/index.d.ts +0 -2
  91. package/build/features/shared/PushNotification/index.js +0 -2
  92. package/build/features/terminal/Terminal.d.ts +0 -14
  93. package/build/features/terminal/Terminal.js +0 -95
  94. package/build/features/terminal/index.d.ts +0 -1
  95. package/build/features/terminal/index.js +0 -1
  96. package/build/features/terminal/screens/LinkNewTerminal/LinkNewTerminal.d.ts +0 -3
  97. package/build/features/terminal/screens/LinkNewTerminal/LinkNewTerminal.js +0 -68
  98. package/build/features/terminal/screens/LinkNewTerminal/index.d.ts +0 -2
  99. package/build/features/terminal/screens/LinkNewTerminal/index.js +0 -2
  100. package/build/features/terminal/screens/LinkNewTerminal/styles.d.ts +0 -10
  101. package/build/features/terminal/screens/LinkNewTerminal/styles.js +0 -28
  102. package/build/features/terminal/screens/LinkedSuccess/LinkedSuccess.d.ts +0 -3
  103. package/build/features/terminal/screens/LinkedSuccess/LinkedSuccess.js +0 -50
  104. package/build/features/terminal/screens/LinkedSuccess/index.d.ts +0 -2
  105. package/build/features/terminal/screens/LinkedSuccess/index.js +0 -2
  106. package/build/features/terminal/screens/LinkedTerminalInfo/LinkedTerminalInfo.d.ts +0 -3
  107. package/build/features/terminal/screens/LinkedTerminalInfo/LinkedTerminalInfo.js +0 -50
  108. package/build/features/terminal/screens/LinkedTerminalInfo/index.d.ts +0 -2
  109. package/build/features/terminal/screens/LinkedTerminalInfo/index.js +0 -2
  110. package/build/features/terminal/screens/Loading/Loading.d.ts +0 -4
  111. package/build/features/terminal/screens/Loading/Loading.js +0 -10
  112. package/build/features/terminal/screens/Loading/index.d.ts +0 -2
  113. package/build/features/terminal/screens/Loading/index.js +0 -2
  114. package/build/features/terminal/screens/NoTerminalLinked/NoTerminalLinked.d.ts +0 -3
  115. package/build/features/terminal/screens/NoTerminalLinked/NoTerminalLinked.js +0 -57
  116. package/build/features/terminal/screens/NoTerminalLinked/index.d.ts +0 -2
  117. package/build/features/terminal/screens/NoTerminalLinked/index.js +0 -2
  118. package/build/features/terminal/screens/NoTerminalLinked/styles.d.ts +0 -36
  119. package/build/features/terminal/screens/NoTerminalLinked/styles.js +0 -34
  120. package/build/features/terminal/screens/OperatorError/OperatorError.d.ts +0 -5
  121. package/build/features/terminal/screens/OperatorError/OperatorError.js +0 -9
  122. package/build/features/terminal/screens/OperatorError/index.d.ts +0 -2
  123. package/build/features/terminal/screens/OperatorError/index.js +0 -2
  124. package/build/features/terminal/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +0 -3
  125. package/build/features/terminal/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +0 -21
  126. package/build/features/terminal/screens/ResetPasswordSuccess/index.d.ts +0 -2
  127. package/build/features/terminal/screens/ResetPasswordSuccess/index.js +0 -2
  128. package/build/features/terminal/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +0 -3
  129. package/build/features/terminal/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +0 -31
  130. package/build/features/terminal/screens/SuccessWithFlowButtons/index.d.ts +0 -2
  131. package/build/features/terminal/screens/SuccessWithFlowButtons/index.js +0 -2
  132. package/build/features/terminal/screens/TerminalDeviceList/DeviceList.d.ts +0 -9
  133. package/build/features/terminal/screens/TerminalDeviceList/DeviceList.js +0 -20
  134. package/build/features/terminal/screens/TerminalDeviceList/Header.d.ts +0 -6
  135. package/build/features/terminal/screens/TerminalDeviceList/Header.js +0 -23
  136. package/build/features/terminal/screens/TerminalDeviceList/TerminalDeviceList.d.ts +0 -3
  137. package/build/features/terminal/screens/TerminalDeviceList/TerminalDeviceList.js +0 -129
  138. package/build/features/terminal/screens/TerminalDeviceList/index.d.ts +0 -2
  139. package/build/features/terminal/screens/TerminalDeviceList/index.js +0 -2
  140. package/build/features/terminal/screens/TerminalDeviceList/styles.d.ts +0 -71
  141. package/build/features/terminal/screens/TerminalDeviceList/styles.js +0 -56
  142. package/build/features/terminal/screens/UnlinkedSuccess/UnlinkedSuccess.d.ts +0 -3
  143. package/build/features/terminal/screens/UnlinkedSuccess/UnlinkedSuccess.js +0 -52
  144. package/build/features/terminal/screens/UnlinkedSuccess/index.d.ts +0 -2
  145. package/build/features/terminal/screens/UnlinkedSuccess/index.js +0 -2
  146. package/build/features/terminal/screens/UnlinkedTerminalInfo/TerminalList.d.ts +0 -9
  147. package/build/features/terminal/screens/UnlinkedTerminalInfo/TerminalList.js +0 -16
  148. package/build/features/terminal/screens/UnlinkedTerminalInfo/UnlinkedTerminalInfo.d.ts +0 -3
  149. package/build/features/terminal/screens/UnlinkedTerminalInfo/UnlinkedTerminalInfo.js +0 -94
  150. package/build/features/terminal/screens/UnlinkedTerminalInfo/index.d.ts +0 -2
  151. package/build/features/terminal/screens/UnlinkedTerminalInfo/index.js +0 -2
  152. package/build/features/terminal/screens/UnlinkedTerminalInfo/styles.d.ts +0 -74
  153. package/build/features/terminal/screens/UnlinkedTerminalInfo/styles.js +0 -98
  154. package/build/features/terminal/screens/Verify/OTPInput.d.ts +0 -7
  155. package/build/features/terminal/screens/Verify/OTPInput.js +0 -51
  156. package/build/features/terminal/screens/Verify/Verify.d.ts +0 -5
  157. package/build/features/terminal/screens/Verify/Verify.js +0 -85
  158. package/build/features/terminal/screens/Verify/index.d.ts +0 -2
  159. package/build/features/terminal/screens/Verify/index.js +0 -2
  160. package/build/features/terminal/screens/Verify/validation.d.ts +0 -8
  161. package/build/features/terminal/screens/Verify/validation.js +0 -4
  162. package/build/features/terminal/screens/shared/index.d.ts +0 -2
  163. package/build/features/terminal/screens/shared/index.js +0 -2
  164. package/build/features/terminal/screens/shared/styles.d.ts +0 -72
  165. package/build/features/terminal/screens/shared/styles.js +0 -50
  166. package/build/features/terminal/screens/shared/utils.d.ts +0 -7
  167. package/build/features/terminal/screens/shared/utils.js +0 -24
@@ -0,0 +1,81 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
+ import * as React from 'react';
14
+ import { useTranslation } from 'react-i18next';
15
+ import { useController, useFormContext } from 'react-hook-form';
16
+ import { alpha, styled } from '@mui/material/styles';
17
+ import InfoIcon from '@mui/icons-material/Info';
18
+ import Box from '@mui/material/Box';
19
+ import InfoOutlinedIcon from '@mui/icons-material/InfoOutlined';
20
+ import { useAppDispatch, useAppSelector } from '../../../../hooks';
21
+ import { removeAllCharsFromNumber } from '../../../../utils';
22
+ import Collapse from '../../../../components/Collapse';
23
+ import Tooltip from '../../../../components/Tooltip';
24
+ import Text from '../../../../components/Text';
25
+ import { ScreenContainer } from '../../../shared/Containers';
26
+ import Input from '../../../shared/Input';
27
+ import { clearError, connectExpressSelector } from '../../../app/connectExpress/connectExpressStore';
28
+ import { EndAdornment } from '../../../shared/EndAdornment';
29
+ var LabelContainerStyled = styled(Box)(function (_a) {
30
+ var theme = _a.theme;
31
+ return ({
32
+ display: 'flex',
33
+ justifyContent: 'space-between',
34
+ padding: theme.spacing(0, 2.5, 1, 2.5)
35
+ });
36
+ });
37
+ var InputLabelStyled = styled(Text)(function (_a) {
38
+ var theme = _a.theme;
39
+ return (__assign(__assign({ color: alpha(theme.palette.text.primary, 0.6), fontWeight: theme.typography.fontWeightMedium }, theme.typography.caption), { lineHeight: theme.spacing(2.5) }));
40
+ });
41
+ export var InfoIconStyled = styled(InfoIcon)(function (_a) {
42
+ var theme = _a.theme;
43
+ return ({
44
+ width: theme.spacing(2.75),
45
+ height: theme.spacing(2.125),
46
+ cursor: 'pointer',
47
+ color: alpha(theme.palette.text.primary, 0.4),
48
+ display: 'inline-flex'
49
+ });
50
+ });
51
+ export var InfoOutlinedIconStyled = styled(InfoOutlinedIcon)(function (_a) {
52
+ var theme = _a.theme;
53
+ return ({
54
+ width: theme.spacing(2.75),
55
+ height: theme.spacing(2.125),
56
+ cursor: 'pointer',
57
+ color: alpha(theme.palette.text.primary, 0.4),
58
+ display: 'inline-flex'
59
+ });
60
+ });
61
+ var UnifiedNumber = function (_a) {
62
+ var _b;
63
+ var show = _a.show, readOnly = _a.readOnly, isVerified = _a.isVerified;
64
+ var t = useTranslation().t;
65
+ var bckError = useAppSelector(connectExpressSelector).error;
66
+ var control = useFormContext().control;
67
+ var dispatch = useAppDispatch();
68
+ var _c = React.useState(false), hovered = _c[0], setHovered = _c[1];
69
+ var handleChange = function (_a) {
70
+ var target = _a.target;
71
+ if (bckError)
72
+ dispatch(clearError());
73
+ var value = removeAllCharsFromNumber(target.value);
74
+ unifiedNumberControl.field.onChange(value);
75
+ };
76
+ var unifiedNumberControl = useController({ control: control, name: 'unifiedNumber' });
77
+ var unifiedNumberValue = unifiedNumberControl.field.value || '';
78
+ var error = (_b = unifiedNumberControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
79
+ return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { mb: 2.5 } }, { children: [_jsxs(LabelContainerStyled, { children: [_jsx(InputLabelStyled, { children: t('v1_company_unified_number_label') }), _jsx(Tooltip, __assign({ title: t('v1_company_unified_number_description'), onMouseOver: function () { return setHovered(true); }, onMouseLeave: function () { return setHovered(false); }, onTouchStartCapture: function () { return setHovered(true); } }, { children: hovered ? _jsx(InfoIconStyled, {}) : _jsx(InfoOutlinedIconStyled, {}) }))] }), _jsx(Input, { readOnly: readOnly, onChange: handleChange, value: unifiedNumberValue, sx: { '& .MuiInputBase-input': { cursor: 'auto' } }, placeholder: t('v1_company_unified_number_hint'), warningType: 'alert', warningMessage: error && t(error), endAdornment: _jsx(EndAdornment, { value: unifiedNumberValue, isVerified: isVerified }) })] })) })));
80
+ };
81
+ export default React.memo(UnifiedNumber);
@@ -15,15 +15,18 @@ export declare const OtherThanKWOrSABusinessDataSchema: (isLeadIdPassed: boolean
15
15
  export declare const BusinessDataSchema: (isLeadIdPassed: boolean) => yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
16
16
  brandName: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
17
17
  selectedLicense: any;
18
- licenseNumber: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
18
+ unifiedNumber: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
19
+ licenseNumber: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
19
20
  }>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
20
21
  brandName: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
21
22
  selectedLicense: any;
22
- licenseNumber: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
23
+ unifiedNumber: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
24
+ licenseNumber: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
23
25
  }>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
24
26
  brandName: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
25
27
  selectedLicense: any;
26
- licenseNumber: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
28
+ unifiedNumber: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
29
+ licenseNumber: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
27
30
  }>>>;
28
31
  export declare const KWBusinessDataSchema: (isLeadIdPassed: boolean) => yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
29
32
  brandName: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
@@ -1,5 +1,5 @@
1
1
  import * as yup from 'yup';
2
- import { KW_MIN_LICENSE_LENGTH, FL_MIN_LICENSE_LENGTH, CR_MIN_LICENSE_LENGTH, BRAND_NAME_MAX_LENGTH } from '../../../../constants';
2
+ import { KW_MIN_LICENSE_LENGTH, FL_MIN_LICENSE_LENGTH, BRAND_NAME_MAX_LENGTH, UNIFIED_NUMBER_MIN_LENGTH } from '../../../../constants';
3
3
  import { BusinessType } from '../../../../@types';
4
4
  var objectElements = {
5
5
  legal_name: yup.object().shape({
@@ -7,7 +7,7 @@ var objectElements = {
7
7
  en: yup.string()
8
8
  }),
9
9
  license: yup.object().shape({
10
- number: yup.string()
10
+ number: yup.string().nullable()
11
11
  }),
12
12
  type: yup.string()
13
13
  };
@@ -94,22 +94,40 @@ export var BusinessDataSchema = function (isLeadIdPassed) {
94
94
  })
95
95
  .required('enter_brand_name_english_chars_numbers_space'),
96
96
  selectedLicense: yup.object().shape(objectElements).required(''),
97
- licenseNumber: yup
98
- .string()
99
- .test({
97
+ unifiedNumber: yup.string().test({
98
+ name: 'unifiedNumber',
99
+ message: '',
100
100
  test: function (value) {
101
+ var _a;
101
102
  var selectedLicense = this.parent.selectedLicense;
102
- var isCR = (selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.type) === BusinessType.CR;
103
+ var isFL = (selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.type) === BusinessType.FL;
103
104
  var length = (value === null || value === void 0 ? void 0 : value.length) || 0;
105
+ if (!((_a = selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.type) === null || _a === void 0 ? void 0 : _a.length))
106
+ return false;
107
+ if (isFL || length >= UNIFIED_NUMBER_MIN_LENGTH)
108
+ return true;
104
109
  if (length === 0)
110
+ return this.createError({ message: '' });
111
+ return this.createError({ message: 'unified_number_required' });
112
+ }
113
+ }),
114
+ licenseNumber: yup.string().test({
115
+ name: 'licenseNumber',
116
+ message: '',
117
+ test: function (value) {
118
+ var _a;
119
+ var selectedLicense = this.parent.selectedLicense;
120
+ var isCR = (selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.type) === BusinessType.CR;
121
+ var length = (value === null || value === void 0 ? void 0 : value.length) || 0;
122
+ if (!((_a = selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.type) === null || _a === void 0 ? void 0 : _a.length))
123
+ return false;
124
+ if (isCR || length >= FL_MIN_LICENSE_LENGTH)
105
125
  return true;
106
- if (isCR) {
107
- return length >= CR_MIN_LICENSE_LENGTH ? true : this.createError({ message: 'cr_max_length' });
108
- }
109
- return length >= FL_MIN_LICENSE_LENGTH ? true : this.createError({ message: 'fl_max_length' });
126
+ if (length === 0)
127
+ return this.createError({ message: '' });
128
+ return this.createError({ message: 'fl_max_length' });
110
129
  }
111
- })
112
- .required(''),
130
+ }),
113
131
  termAndConditionChecked: yup.boolean().isTrue('check_terms_cond').required('check_terms_cond')
114
132
  });
115
133
  }
@@ -127,22 +145,40 @@ export var BusinessDataSchema = function (isLeadIdPassed) {
127
145
  })
128
146
  .required('enter_brand_name_english_chars_numbers_space'),
129
147
  selectedLicense: yup.object().shape(objectElements).required(''),
130
- licenseNumber: yup
131
- .string()
132
- .test({
148
+ unifiedNumber: yup.string().test({
149
+ name: 'unifiedNumber',
150
+ message: '',
133
151
  test: function (value) {
152
+ var _a;
134
153
  var selectedLicense = this.parent.selectedLicense;
135
- var isCR = (selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.type) === BusinessType.CR;
154
+ var isFL = (selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.type) === BusinessType.FL;
136
155
  var length = (value === null || value === void 0 ? void 0 : value.length) || 0;
156
+ if (!((_a = selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.type) === null || _a === void 0 ? void 0 : _a.length))
157
+ return false;
158
+ if (isFL || length >= UNIFIED_NUMBER_MIN_LENGTH)
159
+ return true;
137
160
  if (length === 0)
161
+ return this.createError({ message: '' });
162
+ return this.createError({ message: 'unified_number_required' });
163
+ }
164
+ }),
165
+ licenseNumber: yup.string().test({
166
+ name: 'licenseNumber',
167
+ message: '',
168
+ test: function (value) {
169
+ var _a;
170
+ var selectedLicense = this.parent.selectedLicense;
171
+ var isCR = (selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.type) === BusinessType.CR;
172
+ var length = (value === null || value === void 0 ? void 0 : value.length) || 0;
173
+ if (!((_a = selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.type) === null || _a === void 0 ? void 0 : _a.length))
174
+ return false;
175
+ if (isCR || length >= FL_MIN_LICENSE_LENGTH)
138
176
  return true;
139
- if (isCR) {
140
- return length >= CR_MIN_LICENSE_LENGTH ? true : this.createError({ message: 'cr_max_length' });
141
- }
142
- return length >= FL_MIN_LICENSE_LENGTH ? true : this.createError({ message: 'fl_max_length' });
177
+ if (length === 0)
178
+ return this.createError({ message: '' });
179
+ return this.createError({ message: 'fl_max_length' });
143
180
  }
144
181
  })
145
- .required('')
146
182
  });
147
183
  };
148
184
  export var KWBusinessDataSchema = function (isLeadIdPassed) {
@@ -155,8 +155,9 @@ var EntityName = function (_a) {
155
155
  }, [methods.formState.isValid]);
156
156
  var disabled = !methods.formState.isValid || uploading || uploadingArticle;
157
157
  var showLicenseNumber = isKWCountry ? isCR : true;
158
+ var showExpiryDate = isSACountry ? !isCR : true;
158
159
  var showUnifiedNumber = isSACountry ? isCR : false;
159
160
  var disableBack = settingsData.appConfig.mode === 'content';
160
- return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(Collapse, __assign({ in: !expiryAnchorEl && !issueAnchorEl && !entityTypeAnchorEl }, { children: _jsx(LegalName, { readOnly: readOnly['legalName'] || (noneEditable['legal_name.en'] && noneEditable['legal_name.ar']), isVerified: isLegalNameVerified }) })), _jsx(Collapse, __assign({ in: !expiryAnchorEl && !issueAnchorEl }, { children: _jsx(EntityTypeList, { readOnly: readOnly['entityType'] || noneEditable['type'], onListOpen: function () { return handleEntityOpenClose(true); }, onListClose: function () { return handleEntityOpenClose(false); }, isVerified: isEntityTypeVerified }) })), _jsxs(Collapse, __assign({ in: !expiryAnchorEl && !issueAnchorEl && !entityTypeAnchorEl }, { children: [_jsx(LicenseNumber, { show: showLicenseNumber, readOnly: readOnly['licenseNumber'] || noneEditable['license.number'], isVerified: isLicenseNumberVerified }), _jsx(UnifiedNumber, { show: showUnifiedNumber, readOnly: readOnly['unifiedNumber'] || noneEditable['license.additional_info'], isVerified: isUnifiedNumberVerified })] })), _jsx(Collapse, __assign({ in: !expiryAnchorEl && !entityTypeAnchorEl }, { children: _jsx(IssuingDate, { onDateClicked: handleIssueDateOpenClose, readOnly: readOnly['issuingDate'] || noneEditable['license.issuing_date'], isVerified: isIssuingDateVerified }) })), _jsx(Collapse, __assign({ in: !issueAnchorEl && !entityTypeAnchorEl }, { children: _jsx(ExpiryDate, { onDateClicked: handleExpiryDateOpenClose, readOnly: readOnly['expiryDate'] || noneEditable['license.expiry_date'], isVerified: isExpiryDateVerified }) })), _jsxs(Collapse, __assign({ in: !expiryAnchorEl && !issueAnchorEl && !entityTypeAnchorEl }, { children: [_jsx(LicenseCertificate, { defaultFiles: defaultCertificateFiles, show: isSACountry ? false : !isKWCountry || isCR, readOnly: readOnly['certificateId'] || noneEditable['documents'] }), _jsx(Article, { defaultFile: defaultArticleFile, show: !isSACountry, readOnly: readOnly['articleId'] || noneEditable['AOA_file_id'], isVerified: isArticleIdVerified })] })), _jsx(Collapse, __assign({ in: !expiryAnchorEl && !issueAnchorEl && !entityTypeAnchorEl }, { children: _jsx(Button, __assign({ disableBack: disableBack, onBackClicked: function () { return onBack(); }, disabled: disabled, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('next') })) }))] })) })) }));
161
+ return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(Collapse, __assign({ in: !expiryAnchorEl && !issueAnchorEl && !entityTypeAnchorEl }, { children: _jsx(LegalName, { readOnly: readOnly['legalName'] || (noneEditable['legal_name.en'] && noneEditable['legal_name.ar']), isVerified: isLegalNameVerified }) })), _jsx(Collapse, __assign({ in: !expiryAnchorEl && !issueAnchorEl }, { children: _jsx(EntityTypeList, { readOnly: readOnly['entityType'] || noneEditable['type'], onListOpen: function () { return handleEntityOpenClose(true); }, onListClose: function () { return handleEntityOpenClose(false); }, isVerified: isEntityTypeVerified }) })), _jsxs(Collapse, __assign({ in: !expiryAnchorEl && !issueAnchorEl && !entityTypeAnchorEl }, { children: [_jsx(UnifiedNumber, { show: showUnifiedNumber, readOnly: readOnly['unifiedNumber'] || noneEditable['license.additional_info'], isVerified: isUnifiedNumberVerified }), _jsx(LicenseNumber, { show: showLicenseNumber, readOnly: readOnly['licenseNumber'] || noneEditable['license.number'], isVerified: isLicenseNumberVerified })] })), _jsx(Collapse, __assign({ in: !expiryAnchorEl && !entityTypeAnchorEl }, { children: _jsx(IssuingDate, { onDateClicked: handleIssueDateOpenClose, readOnly: readOnly['issuingDate'] || noneEditable['license.issuing_date'], isVerified: isIssuingDateVerified }) })), _jsx(Collapse, __assign({ in: !issueAnchorEl && !entityTypeAnchorEl && showExpiryDate }, { children: _jsx(ExpiryDate, { onDateClicked: handleExpiryDateOpenClose, readOnly: readOnly['expiryDate'] || noneEditable['license.expiry_date'], isVerified: isExpiryDateVerified }) })), _jsxs(Collapse, __assign({ in: !expiryAnchorEl && !issueAnchorEl && !entityTypeAnchorEl }, { children: [_jsx(LicenseCertificate, { defaultFiles: defaultCertificateFiles, show: isSACountry ? false : !isKWCountry || isCR, readOnly: readOnly['certificateId'] || noneEditable['documents'] }), _jsx(Article, { defaultFile: defaultArticleFile, show: !isSACountry, readOnly: readOnly['articleId'] || noneEditable['AOA_file_id'], isVerified: isArticleIdVerified })] })), _jsx(Collapse, __assign({ in: !expiryAnchorEl && !issueAnchorEl && !entityTypeAnchorEl }, { children: _jsx(Button, __assign({ disableBack: disableBack, onBackClicked: function () { return onBack(); }, disabled: disabled, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('next') })) }))] })) })) }));
161
162
  };
162
163
  export default EntityName;
@@ -14,7 +14,7 @@ import * as React from 'react';
14
14
  import { useTranslation } from 'react-i18next';
15
15
  import { useController, useFormContext } from 'react-hook-form';
16
16
  import { useAppDispatch, useAppSelector } from '../../../../hooks';
17
- import { removeAllOtherThanCharsAndNumber } from '../../../../utils';
17
+ import { removeAllCharsFromNumber } from '../../../../utils';
18
18
  import Collapse from '../../../../components/Collapse';
19
19
  import { ScreenContainer } from '../../../shared/Containers';
20
20
  import Input from '../../../shared/Input';
@@ -31,7 +31,7 @@ var UnifiedNumber = function (_a) {
31
31
  var target = _a.target;
32
32
  if (bckError)
33
33
  dispatch(clearError());
34
- var value = removeAllOtherThanCharsAndNumber(target.value);
34
+ var value = removeAllCharsFromNumber(target.value);
35
35
  unifiedNumberControl.field.onChange(value);
36
36
  };
37
37
  var unifiedNumberControl = useController({ control: control, name: 'unifiedNumber' });
@@ -6,7 +6,7 @@ export declare const EntityNameValidationSchema: () => yup.ObjectSchema<import("
6
6
  licenseNumber: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
7
7
  unifiedNumber: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
8
8
  issuingDate: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
9
- expiryDate: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
9
+ expiryDate: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
10
10
  certificateId: yup.ArraySchema<yup.AnySchema<any, any, any>, import("yup/lib/types").AnyObject, any[] | undefined, any[] | undefined>;
11
11
  articleId: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
12
12
  }>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
@@ -16,7 +16,7 @@ export declare const EntityNameValidationSchema: () => yup.ObjectSchema<import("
16
16
  licenseNumber: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
17
17
  unifiedNumber: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
18
18
  issuingDate: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
19
- expiryDate: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
19
+ expiryDate: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
20
20
  certificateId: yup.ArraySchema<yup.AnySchema<any, any, any>, import("yup/lib/types").AnyObject, any[] | undefined, any[] | undefined>;
21
21
  articleId: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
22
22
  }>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
@@ -26,7 +26,7 @@ export declare const EntityNameValidationSchema: () => yup.ObjectSchema<import("
26
26
  licenseNumber: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
27
27
  unifiedNumber: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
28
28
  issuingDate: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
29
- expiryDate: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
29
+ expiryDate: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
30
30
  certificateId: yup.ArraySchema<yup.AnySchema<any, any, any>, import("yup/lib/types").AnyObject, any[] | undefined, any[] | undefined>;
31
31
  articleId: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
32
32
  }>>>;
@@ -1,6 +1,6 @@
1
1
  import * as yup from 'yup';
2
2
  import { BusinessType } from '../../../../@types';
3
- import { KW_MIN_LICENSE_LENGTH, CR_MIN_LICENSE_LENGTH, FL_MIN_LICENSE_LENGTH } from '../../../../constants';
3
+ import { KW_MIN_LICENSE_LENGTH, CR_MIN_LICENSE_LENGTH, FL_MIN_LICENSE_LENGTH, UNIFIED_NUMBER_MIN_LENGTH } from '../../../../constants';
4
4
  export var EntityNameValidationSchema = function () {
5
5
  return yup.object().shape({
6
6
  legalName: yup
@@ -32,9 +32,20 @@ export var EntityNameValidationSchema = function () {
32
32
  }
33
33
  })
34
34
  .required(''),
35
- unifiedNumber: yup.string().optional(),
35
+ unifiedNumber: yup.string().test({
36
+ name: 'unifiedNumber',
37
+ message: '',
38
+ test: function (value) {
39
+ var length = (value === null || value === void 0 ? void 0 : value.length) || 0;
40
+ if (length >= UNIFIED_NUMBER_MIN_LENGTH)
41
+ return true;
42
+ if (length === 0)
43
+ return this.createError({ message: '' });
44
+ return this.createError({ message: 'unified_number_required' });
45
+ }
46
+ }),
36
47
  issuingDate: yup.string().required('choose_any_issuing_date'),
37
- expiryDate: yup.string().required('choose_any_expiry_date'),
48
+ expiryDate: yup.string().optional(),
38
49
  certificateId: yup.array().optional(),
39
50
  articleId: yup.string().optional()
40
51
  });
@@ -12,4 +12,3 @@ export declare const entityFeatureScreens: Array<FeatureScreenStep>;
12
12
  export declare const brandFeatureScreens: Array<FeatureScreenStep>;
13
13
  export declare const boardFeatureScreens: Array<FeatureScreenStep>;
14
14
  export declare const kycFeatureScreens: Array<FeatureScreenStep>;
15
- export declare const terminalFeatureScreens: Array<FeatureScreenStep>;
@@ -141,18 +141,6 @@ import KycOperatorErrorPage from './kyc/screens/OperatorError';
141
141
  import KycSuccessPage from './kyc/screens/Success';
142
142
  import KycTermsPage from './kyc/screens/Terms';
143
143
  import KycUsersPage from './kyc/screens/Users';
144
- import TerminalLoadingPage from './terminal/screens/Loading';
145
- import TerminalOperatorErrorPage from './terminal/screens/OperatorError';
146
- import TerminalVerifyPage from './terminal/screens/Verify';
147
- import NoTerminalLinkedPage from './terminal/screens/NoTerminalLinked';
148
- import TerminalDeviceListPage from './terminal/screens/TerminalDeviceList';
149
- import LinkNewTerminalPage from './terminal/screens/LinkNewTerminal';
150
- import LinkedTerminalInfoPage from './terminal/screens/LinkedTerminalInfo';
151
- import UnlinkedTerminalInfoPage from './terminal/screens/UnlinkedTerminalInfo';
152
- import LinkedSuccessPage from './terminal/screens/LinkedSuccess';
153
- import UnlinkedSuccessPage from './terminal/screens/UnlinkedSuccess';
154
- import TerminalBoardPage from './terminal/screens/SuccessWithFlowButtons';
155
- import TerminalResetPasswordSuccessPage from './terminal/screens/ResetPasswordSuccess';
156
144
  export var connectFeatureScreens = [
157
145
  {
158
146
  name: 'CONNECT_BUSINESS_COUNTRY_STEP',
@@ -717,53 +705,3 @@ export var kycFeatureScreens = [
717
705
  element: KycSuccessPage
718
706
  }
719
707
  ];
720
- export var terminalFeatureScreens = [
721
- {
722
- name: CONNECT_FLOWS.terminal.loadingData,
723
- element: TerminalLoadingPage
724
- },
725
- {
726
- name: CONNECT_FLOWS.terminal.operatorError,
727
- element: TerminalOperatorErrorPage
728
- },
729
- {
730
- name: CONNECT_FLOWS.terminal.verify,
731
- element: TerminalVerifyPage
732
- },
733
- {
734
- name: CONNECT_FLOWS.terminal.noTerminalLinked,
735
- element: NoTerminalLinkedPage
736
- },
737
- {
738
- name: CONNECT_FLOWS.terminal.terminalList,
739
- element: TerminalDeviceListPage
740
- },
741
- {
742
- name: CONNECT_FLOWS.terminal.terminalLinkNew,
743
- element: LinkNewTerminalPage
744
- },
745
- {
746
- name: CONNECT_FLOWS.terminal.linkedTerminalInfo,
747
- element: LinkedTerminalInfoPage
748
- },
749
- {
750
- name: CONNECT_FLOWS.terminal.unlinkedTerminalInfo,
751
- element: UnlinkedTerminalInfoPage
752
- },
753
- {
754
- name: CONNECT_FLOWS.terminal.terminalLinkedSuccess,
755
- element: LinkedSuccessPage
756
- },
757
- {
758
- name: CONNECT_FLOWS.terminal.terminalUnlinkedSuccess,
759
- element: UnlinkedSuccessPage
760
- },
761
- {
762
- name: CONNECT_FLOWS.terminal.board,
763
- element: TerminalBoardPage
764
- },
765
- {
766
- name: CONNECT_FLOWS.terminal.resetPassword,
767
- element: TerminalResetPasswordSuccessPage
768
- }
769
- ];
@@ -112,5 +112,5 @@ export default function CustomButton(_a) {
112
112
  }, 500);
113
113
  };
114
114
  }, []);
115
- return (_jsxs(Fragment, { children: [_jsx(Collapse, __assign({ in: !!error && !hideError }, { children: _jsx(Warning, __assign({ sx: { mb: 1 }, warningType: 'error' }, { children: error })) })), _jsxs(ButtonBoxStyled, __assign({ sx: sx }, { children: [isBackEnabled && (_jsx(BackButtonStyled, __assign({ isAr: isAr, type: 'reset', startIcon: _jsx(BackIconStyled, { isAr: isAr, src: ICONS_NAMES.WHITE_ARROW }) }, props, { onClick: function () { return onBackClicked === null || onBackClicked === void 0 ? void 0 : onBackClicked(); } }))), _jsx(ButtonStyled, __assign({ disabled: disabled, isLoading: btnLoading, type: !btnLoading ? 'submit' : 'button', isBack: isBackEnabled, endIcon: btnLoading === false ? !disableNextIcon && _jsx(IconStyled, { isAr: isAr, src: ICONS_NAMES.WHITE_ARROW }) : undefined }, props, { children: !btnLoading ? (_jsxs(Text, __assign({ sx: { marginInlineEnd: isBackEnabled ? '-24px' : '-15px' } }, { children: [" ", children] }))) : (_jsx(Loader, { innerColor: 'white', outerColor: 'white', size: 15, toggleAnimation: !!btnLoading })) }))] }))] }));
115
+ return (_jsxs(Fragment, { children: [_jsx(Collapse, __assign({ in: !!error && !hideError }, { children: _jsx(Warning, __assign({ sx: { mb: 1 }, warningType: 'error' }, { children: error })) })), _jsxs(ButtonBoxStyled, __assign({ sx: sx }, { children: [isBackEnabled && (_jsx(BackButtonStyled, __assign({ onClick: function () { return onBackClicked === null || onBackClicked === void 0 ? void 0 : onBackClicked(); }, isAr: isAr, type: 'reset', startIcon: _jsx(BackIconStyled, { isAr: isAr, src: ICONS_NAMES.WHITE_ARROW }) }, props))), _jsx(ButtonStyled, __assign({ disabled: disabled, isLoading: btnLoading, type: !btnLoading ? 'submit' : 'button', isBack: isBackEnabled, endIcon: btnLoading === false ? !disableNextIcon && _jsx(IconStyled, { isAr: isAr, src: ICONS_NAMES.WHITE_ARROW }) : undefined }, props, { children: !btnLoading ? (_jsxs(Text, __assign({ sx: { marginInlineEnd: isBackEnabled ? '-24px' : '-15px' } }, { children: [" ", children] }))) : (_jsx(Loader, { innerColor: 'white', outerColor: 'white', size: 15, toggleAnimation: !!btnLoading })) }))] }))] }));
116
116
  }
@@ -163,7 +163,6 @@ export default function FlowsButtons(_a) {
163
163
  var isAr = useLanguage().isAr;
164
164
  var t = useTranslation().t;
165
165
  var onRedirect = function (item) {
166
- var _a;
167
166
  if (!item.href)
168
167
  return;
169
168
  var name = item.name === FlowsTypes.BANK ? 'Wallet' : capitalize(item.name);
@@ -181,7 +180,7 @@ export default function FlowsButtons(_a) {
181
180
  return;
182
181
  }
183
182
  if (typeof settingsData.appConfig.onBoardButtonClick === 'function') {
184
- settingsData.appConfig.onBoardButtonClick({ name: item.name, token: item.token, countryCode: (_a = settingsData.businessCountry) === null || _a === void 0 ? void 0 : _a.iso2 });
183
+ settingsData.appConfig.onBoardButtonClick({ name: item.name, token: item.token });
185
184
  return;
186
185
  }
187
186
  dispatch(handleOpen(false));
@@ -1,4 +1,3 @@
1
- import { SxProps, Theme } from '@mui/material/styles';
2
1
  import * as React from 'react';
3
2
  export interface ThankYouProps {
4
3
  title?: string;
@@ -10,7 +9,6 @@ export interface ThankYouProps {
10
9
  description?: string | React.ReactElement;
11
10
  enableBack?: boolean;
12
11
  onBack?: () => void;
13
- sx?: SxProps<Theme>;
14
12
  }
15
- declare const _default: React.MemoExoticComponent<({ title, description, showEmailProviders, onSuccess, successTitle, loading, error, enableBack, onBack, sx }: ThankYouProps) => JSX.Element>;
13
+ declare const _default: React.MemoExoticComponent<({ title, description, showEmailProviders, onSuccess, successTitle, loading, error, enableBack, onBack }: ThankYouProps) => JSX.Element>;
16
14
  export default _default;
@@ -55,9 +55,9 @@ var IconStyled = styled(Icon)(function (_a) {
55
55
  _b);
56
56
  });
57
57
  var ThankYou = function (_a) {
58
- var title = _a.title, description = _a.description, showEmailProviders = _a.showEmailProviders, onSuccess = _a.onSuccess, successTitle = _a.successTitle, loading = _a.loading, error = _a.error, enableBack = _a.enableBack, onBack = _a.onBack, sx = _a.sx;
58
+ var title = _a.title, description = _a.description, showEmailProviders = _a.showEmailProviders, onSuccess = _a.onSuccess, successTitle = _a.successTitle, loading = _a.loading, error = _a.error, enableBack = _a.enableBack, onBack = _a.onBack;
59
59
  var t = useTranslation().t;
60
60
  var isAr = useLanguage().isAr;
61
- return (_jsxs(ContainerStyled, __assign({ sx: sx }, { children: [_jsx(IconStyled, { src: ICONS_NAMES.SUCCESS_GIF, alt: 'loading...' }), _jsxs(TitleStyled, { children: [title, " "] }), description && _jsx(DescriptionStyled, { children: description }), showEmailProviders && (_jsx(MailBoxStyled, { children: _jsx(EmailProvidersButton, { gmail: { title: t('gmail_btn_open_title'), href: 'https://mail.google.com/mail/u/0/#inbox' }, outlook: { title: t('outlook_btn_open_title'), href: 'https://outlook.live.com/mail/0/' }, apple: { title: t('apple_btn_open_title'), href: 'mailto:' }, mail: { title: t('mail_btn_open_title'), href: 'mailto:' } }) })), onSuccess && !showEmailProviders && (_jsx(MailBoxStyled, { children: _jsx(SuccessButton, __assign({ onClick: onSuccess, disableBack: true, disableNextIcon: true, disabled: loading, isAr: isAr, loading: loading, error: t(error || '') }, { children: t(successTitle || '') })) })), enableBack && (_jsx(Button, __assign({ sx: { mb: 1.5, mt: 0 }, onClick: function () { return onBack === null || onBack === void 0 ? void 0 : onBack(); }, variant: 'text' }, { children: t('back') })))] })));
61
+ return (_jsxs(ContainerStyled, { children: [_jsx(IconStyled, { src: ICONS_NAMES.SUCCESS_GIF, alt: 'loading...' }), _jsxs(TitleStyled, { children: [title, " "] }), description && _jsx(DescriptionStyled, { children: description }), showEmailProviders && (_jsx(MailBoxStyled, { children: _jsx(EmailProvidersButton, { gmail: { title: t('gmail_btn_open_title'), href: 'https://mail.google.com/mail/u/0/#inbox' }, outlook: { title: t('outlook_btn_open_title'), href: 'https://outlook.live.com/mail/0/' }, apple: { title: t('apple_btn_open_title'), href: 'mailto:' }, mail: { title: t('mail_btn_open_title'), href: 'mailto:' } }) })), onSuccess && !showEmailProviders && (_jsx(MailBoxStyled, { children: _jsx(SuccessButton, __assign({ onClick: onSuccess, disableBack: true, disableNextIcon: true, disabled: loading, isAr: isAr, loading: loading, error: t(error || '') }, { children: t(successTitle || '') })) })), enableBack && (_jsx(Button, __assign({ sx: { mb: 1.5, mt: 0 }, onClick: function () { return onBack === null || onBack === void 0 ? void 0 : onBack(); }, variant: 'text' }, { children: t('back') })))] }));
62
62
  };
63
63
  export default React.memo(ThankYou);
@@ -48,7 +48,7 @@ export var useAppConfig = function (_a) {
48
48
  if (!disableSettingFetching && !configToken)
49
49
  removeRequestHeaders();
50
50
  checkDomain();
51
- setBaseUrl(publicKey, rest.businessCountryCode);
51
+ setBaseUrl(publicKey, rest.region);
52
52
  setAppConfig();
53
53
  if (typeof boardMaturity === 'boolean')
54
54
  dispatch(handelBoardMaturity(boardMaturity));
@@ -13,5 +13,4 @@ export declare const useAppDispatch: () => import("redux-thunk").ThunkDispatch<{
13
13
  auth: import("../features/app/auth/authStore").AuthState;
14
14
  board: import("../features/app/board/boardStore").BoardState;
15
15
  kyc: import("../features/app/kyc/kycStore").KYCDataState;
16
- terminal: import("../features/app/terminal/terminalStore").TerminalDataState;
17
16
  }, undefined, import("redux").AnyAction> & import("redux").Dispatch<import("redux").AnyAction>;
package/build/index.d.ts CHANGED
@@ -13,6 +13,5 @@ import { EntityElement, EntityLibProps } from './features/entity';
13
13
  import { BrandElement, BrandLibProps } from './features/brand';
14
14
  import { BoardLibProps, BoardElement } from './features/board';
15
15
  import { KYCLibProps, KYCElement } from './features/kyc';
16
- import { TerminalLibProps, TerminalElement } from './features/terminal';
17
- export type { ConnectLibProps, ConnectExpressLibProps, AuthLibProps, BusinessLibProps, PasswordLibProps, IndividualLibProps, BankLibProps, TaxLibProps, EntityLibProps, BrandLibProps, SignInLibProps, BoardLibProps, KYCLibProps, TerminalLibProps };
18
- export { ConnectElement, ConnectExpressElement, AuthElement, BusinessElement, PasswordElement, IndividualElement, BankElement, TaxElement, EntityElement, BrandElement, SignInElement, BoardElement, KYCElement, TerminalElement };
16
+ export type { ConnectLibProps, ConnectExpressLibProps, AuthLibProps, BusinessLibProps, PasswordLibProps, IndividualLibProps, BankLibProps, TaxLibProps, EntityLibProps, BrandLibProps, SignInLibProps, BoardLibProps, KYCLibProps };
17
+ export { ConnectElement, ConnectExpressElement, AuthElement, BusinessElement, PasswordElement, IndividualElement, BankElement, TaxElement, EntityElement, BrandElement, SignInElement, BoardElement, KYCElement };
package/build/index.js CHANGED
@@ -13,8 +13,7 @@ import { EntityElement, renderEntityLib } from './features/entity';
13
13
  import { BrandElement, renderBrandLib } from './features/brand';
14
14
  import { BoardElement, renderBoardLib } from './features/board';
15
15
  import { KYCElement, renderKYCLib } from './features/kyc';
16
- import { TerminalElement, renderTerminalLib } from './features/terminal';
17
- export { ConnectElement, ConnectExpressElement, AuthElement, BusinessElement, PasswordElement, IndividualElement, BankElement, TaxElement, EntityElement, BrandElement, SignInElement, BoardElement, KYCElement, TerminalElement };
16
+ export { ConnectElement, ConnectExpressElement, AuthElement, BusinessElement, PasswordElement, IndividualElement, BankElement, TaxElement, EntityElement, BrandElement, SignInElement, BoardElement, KYCElement };
18
17
  window['TapAuth'] = {
19
18
  renderConnectLib: renderConnectLib,
20
19
  renderConnectExpressLib: renderConnectExpressLib,
@@ -28,7 +27,6 @@ window['TapAuth'] = {
28
27
  renderBrandLib: renderBrandLib,
29
28
  renderSignInLib: renderSignInLib,
30
29
  renderBoardLib: renderBoardLib,
31
- renderKYCLib: renderKYCLib,
32
- renderTerminalLib: renderTerminalLib
30
+ renderKYCLib: renderKYCLib
33
31
  };
34
32
  console.log("TapAuth version: ".concat(require('../package.json').version));
@@ -48,18 +48,6 @@ export var lightPalette = {
48
48
  main: '#808592',
49
49
  light: '#EAECEF',
50
50
  dark: '#3B4152'
51
- },
52
- components: {
53
- deviceCard: {
54
- title: '#20232B',
55
- statusText: '#1F222A80',
56
- statusBackground: ' #F0F0F0',
57
- deviceInfoBackground: 'linear-gradient(127.37deg, rgba(255, 255, 255, 0.6) 59.07%, rgba(255, 255, 255, 0.444) 100.12%);',
58
- border: '#e8ecf2'
59
- },
60
- toastDeviceSelectorDropdown: {
61
- border: '#f2f2f2'
62
- }
63
51
  }
64
52
  };
65
53
  export var darkPalette = {
@@ -5,7 +5,6 @@ export var typography = {
5
5
  fontWeightLight: 300,
6
6
  fontWeightRegular: 400,
7
7
  fontWeightMedium: 500,
8
- fontWeightSemiBold: 600,
9
8
  fontWeightBold: 700,
10
9
  allVariants: {
11
10
  fontFamily: '"Lato", "Tajawal", "Roboto"',
@@ -20,7 +19,6 @@ export var typography = {
20
19
  h2: { fontSize: '3rem' },
21
20
  h3: { fontSize: '2.5rem' },
22
21
  h4: { fontSize: '2rem' },
23
- h4_small: { fontSize: '1.625rem' },
24
22
  h5: { fontSize: '1.5rem' },
25
23
  h6: { fontSize: '1.25rem' },
26
24
  subtitle1: { fontSize: '1.125rem' },
@@ -28,8 +26,6 @@ export var typography = {
28
26
  body1: { fontSize: '1rem' },
29
27
  body2: { fontSize: '0.875rem' },
30
28
  button: { fontSize: '0.875rem' },
31
- button_small: { fontSize: '0.813rem' },
32
29
  caption: { fontSize: '0.75rem' },
33
- caption_small: { fontSize: '0.625rem' },
34
30
  overline: { fontSize: '0.5rem' }
35
31
  };
@@ -1,6 +1,6 @@
1
1
  export declare const sleep: (milliseconds?: number) => Promise<unknown>;
2
2
  export declare const dangerousMessage: (message: string, callBack?: Function) => void;
3
- export declare const setBaseUrl: (publicKey: string, countryCode?: string) => void;
3
+ export declare const setBaseUrl: (publicKey: string, region?: string) => void;
4
4
  export declare const updateLocationUrlWithCountry: (countryIso2: string) => void;
5
5
  export declare const openConnect: (pk: string, countryCode?: string) => void;
6
6
  export declare function getMetaData(): Record<string, string> | undefined;
@@ -1,5 +1,5 @@
1
1
  import { axiosInstance } from '../api';
2
- import { ENDPOINT_PATHS, CONNECT_DEV_URL, CONNECT_PROD_URL } from '../constants';
2
+ import { ENDPOINT_PATHS, CONNECT_SANDBOX_URL, CONNECT_PROD_URL } from '../constants';
3
3
  import { objectHasValues } from './object';
4
4
  import { isSA } from './string';
5
5
  export var sleep = function (milliseconds) {
@@ -12,14 +12,13 @@ export var dangerousMessage = function (message, callBack) {
12
12
  }
13
13
  callBack === null || callBack === void 0 ? void 0 : callBack({ message: message });
14
14
  };
15
- export var setBaseUrl = function (publicKey, countryCode) {
16
- if (countryCode === void 0) { countryCode = ''; }
15
+ export var setBaseUrl = function (publicKey, region) {
17
16
  var isProd = publicKey.includes('pk_live');
18
17
  if (isProd) {
19
- axiosInstance.defaults.baseURL = isSA(countryCode) ? ENDPOINT_PATHS.PRODUCTION_BASE_URL_SA : ENDPOINT_PATHS.PRODUCTION_BASE_URL;
18
+ axiosInstance.defaults.baseURL = isSA(region) ? ENDPOINT_PATHS.PRODUCTION_BASE_URL_SA : ENDPOINT_PATHS.PRODUCTION_BASE_URL;
20
19
  return;
21
20
  }
22
- axiosInstance.defaults.baseURL = ENDPOINT_PATHS.DEV_BASE_URL;
21
+ axiosInstance.defaults.baseURL = ENDPOINT_PATHS.SANDBOX_BASE_URL;
23
22
  };
24
23
  export var updateLocationUrlWithCountry = function (countryIso2) {
25
24
  var country = countryIso2.toLowerCase();
@@ -38,7 +37,7 @@ export var updateLocationUrlWithCountry = function (countryIso2) {
38
37
  window.history.replaceState({}, '', newUrl);
39
38
  };
40
39
  export var openConnect = function (pk, countryCode) {
41
- var newUrl = new URL(pk.includes('pk_live') ? CONNECT_PROD_URL : CONNECT_DEV_URL);
40
+ var newUrl = new URL(pk.includes('pk_live') ? CONNECT_PROD_URL : CONNECT_SANDBOX_URL);
42
41
  if (countryCode) {
43
42
  newUrl.pathname = "/".concat(countryCode.toLowerCase());
44
43
  }
@@ -46,7 +46,7 @@ export declare const getBaseUrl: () => string;
46
46
  export declare const getScreenNameBasedOnFlow: (flow: string, isAuthorizedUser?: boolean, isOtherThanSAOrKWCountry?: boolean) => "CONNECT_NID_STEP" | "" | "BUSINESS_BUSINESS_TYPE_STEP" | "INDIVIDUAL_PERSONAL_INDIVIDUAL_INFO_STEP" | "INDIVIDUAL_LIST_STEP" | "PASSWORD_CREATE_PASSWORD_STEP" | "BANK_BANK_DETAILS_STEP" | "TAX_TAX_DETAILS_STEP" | "ENTITY_NAME_STEP" | "BRAND_INFO_STEP";
47
47
  export declare const getEighteenYearsAgo: () => string;
48
48
  export declare const isKW: (flag: string) => boolean;
49
- export declare const isSA: (flag: string) => boolean;
49
+ export declare const isSA: (flag: string | undefined) => boolean;
50
50
  export declare const isOtherThanKWOrSA: (flag: string) => boolean;
51
51
  export declare const isKWOrSA: (flag: string) => boolean;
52
52
  export declare const isLinkedIn: (flag: string) => boolean;
@@ -214,7 +214,9 @@ export var isKW = function (flag) {
214
214
  return ['kw', 'kwd'].includes(flag === null || flag === void 0 ? void 0 : flag.toLowerCase());
215
215
  };
216
216
  export var isSA = function (flag) {
217
- return ['sa', 'sau'].includes(flag === null || flag === void 0 ? void 0 : flag.toLowerCase());
217
+ if (!flag)
218
+ return false;
219
+ return ['sa', 'sau'].includes(flag.toLowerCase());
218
220
  };
219
221
  export var isOtherThanKWOrSA = function (flag) {
220
222
  return !isKW(flag) && !isSA(flag);