@tap-payments/auth-jsconnect 2.10.11-development → 2.10.11
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.
- package/build/@types/app.d.ts +2 -2
- package/build/@types/app.js +0 -1
- package/build/@types/form.d.ts +4 -2
- package/build/@types/index.d.ts +0 -1
- package/build/@types/index.js +0 -1
- package/build/api/account.d.ts +2 -2
- package/build/api/account.js +7 -4
- package/build/api/auth.d.ts +2 -10
- package/build/api/auth.js +7 -3
- package/build/api/axios.d.ts +1 -1
- package/build/api/entity.d.ts +3 -0
- package/build/api/headers.d.ts +5 -0
- package/build/api/headers.js +3 -0
- package/build/api/index.d.ts +5 -11
- package/build/api/index.js +1 -3
- package/build/api/lead.d.ts +1 -0
- package/build/api/operator.d.ts +1 -1
- package/build/api/operator.js +5 -2
- package/build/app/rootReducer.d.ts +0 -1
- package/build/app/rootReducer.js +1 -3
- package/build/app/settings.js +1 -2
- package/build/app/store.d.ts +0 -2
- package/build/assets/currencies/AEDSymbol.js +1 -1
- package/build/assets/currencies/SARSymbol.js +1 -1
- package/build/assets/locales/ar.json +14 -5
- package/build/assets/locales/en.json +17 -7
- package/build/components/OTPTimer/OTPTimer.d.ts +1 -2
- package/build/components/OTPTimer/OTPTimer.js +4 -4
- package/build/components/Tooltip/Tooltip.js +1 -1
- package/build/constants/api.d.ts +2 -0
- package/build/constants/api.js +4 -0
- package/build/constants/app.d.ts +12 -12
- package/build/constants/app.js +98 -129
- package/build/constants/flows.d.ts +0 -15
- package/build/constants/flows.js +0 -15
- package/build/constants/validation.d.ts +1 -1
- package/build/constants/validation.js +1 -1
- package/build/features/app/auth/authStore.js +64 -54
- package/build/features/app/bank/bankStore.js +24 -20
- package/build/features/app/board/boardStore.js +11 -7
- package/build/features/app/brand/brandStore.js +22 -18
- package/build/features/app/business/businessStore.js +45 -36
- package/build/features/app/connect/connectStore.d.ts +6 -5
- package/build/features/app/connect/connectStore.js +48 -31
- package/build/features/app/connectExpress/connectExpressStore.d.ts +6 -5
- package/build/features/app/connectExpress/connectExpressStore.js +61 -20
- package/build/features/app/entity/entityStore.js +21 -17
- package/build/features/app/individual/individualStore.js +34 -28
- package/build/features/app/password/passwordStore.js +44 -46
- package/build/features/app/signIn/signInStore.js +12 -16
- package/build/features/app/tax/taxStore.js +20 -16
- package/build/features/auth/Auth.d.ts +1 -1
- package/build/features/auth/screens/AuthenticationList/AuthenticationList.js +10 -7
- package/build/features/auth/screens/AuthenticationList/EntityLicenseType.d.ts +4 -1
- package/build/features/auth/screens/AuthenticationList/EntityLicenseType.js +6 -4
- package/build/features/auth/screens/AuthenticationList/EntityList.js +11 -3
- package/build/features/brand/screens/BrandActivities/RefundPolicy.d.ts +1 -1
- package/build/features/business/screens/BusinessType/BusinessType.js +15 -5
- package/build/features/business/screens/BusinessType/EntityLicenseList.js +11 -5
- package/build/features/business/screens/BusinessType/LicenseList.js +20 -12
- package/build/features/business/screens/BusinessType/UnifiedNumber.d.ts +35 -0
- package/build/features/business/screens/BusinessType/UnifiedNumber.js +84 -0
- package/build/features/business/screens/BusinessType/validation.d.ts +6 -3
- package/build/features/business/screens/BusinessType/validation.js +31 -10
- package/build/features/business/screens/Customers/RefundPolicy.d.ts +1 -1
- package/build/features/connectExpress/screens/AuthenticationList/AuthenticationList.js +10 -10
- package/build/features/connectExpress/screens/AuthenticationList/EntityLicenseType.d.ts +4 -1
- package/build/features/connectExpress/screens/AuthenticationList/EntityLicenseType.js +6 -4
- package/build/features/connectExpress/screens/AuthenticationList/EntityList.js +11 -3
- package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.js +1 -0
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.js +27 -16
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseNumber.js +2 -2
- package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.js +1 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/UnifiedNumber.d.ts +36 -0
- package/build/features/connectExpress/screens/CollectBusinessInfo/UnifiedNumber.js +81 -0
- package/build/features/connectExpress/screens/CollectBusinessInfo/validation.d.ts +6 -3
- package/build/features/connectExpress/screens/CollectBusinessInfo/validation.js +57 -21
- package/build/features/connectExpress/screens/Mobile/Mobile.js +7 -6
- package/build/features/entity/screens/EntityName/EntityName.js +16 -15
- package/build/features/entity/screens/EntityName/UnifiedNumber.js +2 -2
- package/build/features/entity/screens/EntityName/validation.d.ts +50 -48
- package/build/features/entity/screens/EntityName/validation.js +100 -85
- package/build/features/featuresScreens.d.ts +0 -1
- package/build/features/featuresScreens.js +55 -67
- package/build/features/shared/Button/Button.js +1 -1
- package/build/features/shared/Button/FlowsButtons.js +1 -1
- package/build/features/shared/OTPVerifySecurityError/OTPVerifySecurityError.js +9 -0
- package/build/features/shared/OTPVerifySecurityError/index.d.ts +2 -0
- package/build/features/shared/OTPVerifySecurityError/index.js +2 -0
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +2 -2
- package/build/features/shared/SuccessScreen/SuccessScreen.d.ts +1 -3
- package/build/features/shared/SuccessScreen/SuccessScreen.js +2 -2
- package/build/hooks/useAppConfig.js +1 -1
- package/build/hooks/useAppDispatch.d.ts +0 -1
- package/build/index.d.ts +2 -3
- package/build/index.js +2 -4
- package/build/theme/palette.js +0 -12
- package/build/theme/typography.js +0 -4
- package/build/utils/common.d.ts +1 -1
- package/build/utils/common.js +14 -8
- package/build/utils/error.d.ts +2 -0
- package/build/utils/error.js +6 -0
- package/build/utils/string.d.ts +3 -3
- package/build/utils/string.js +5 -11
- package/build/utils/validation.js +1 -1
- package/package.json +3 -3
- package/build/@types/terminal.d.ts +0 -116
- package/build/@types/terminal.js +0 -1
- package/build/api/terminal.d.ts +0 -28
- package/build/api/terminal.js +0 -45
- package/build/components/DeviceCard/DeviceCard.d.ts +0 -18
- package/build/components/DeviceCard/DeviceCard.js +0 -103
- package/build/components/DeviceCard/index.d.ts +0 -3
- package/build/components/DeviceCard/index.js +0 -2
- package/build/features/app/terminal/terminalStore.d.ts +0 -109
- package/build/features/app/terminal/terminalStore.js +0 -673
- package/build/features/shared/PushNotification/PushNotification.d.ts +0 -11
- package/build/features/shared/PushNotification/PushNotification.js +0 -34
- package/build/features/shared/PushNotification/index.d.ts +0 -2
- package/build/features/shared/PushNotification/index.js +0 -2
- package/build/features/terminal/Terminal.d.ts +0 -14
- package/build/features/terminal/Terminal.js +0 -95
- package/build/features/terminal/index.d.ts +0 -1
- package/build/features/terminal/index.js +0 -1
- package/build/features/terminal/screens/LinkNewTerminal/LinkNewTerminal.js +0 -69
- package/build/features/terminal/screens/LinkNewTerminal/index.d.ts +0 -2
- package/build/features/terminal/screens/LinkNewTerminal/index.js +0 -2
- package/build/features/terminal/screens/LinkNewTerminal/styles.d.ts +0 -10
- package/build/features/terminal/screens/LinkNewTerminal/styles.js +0 -28
- package/build/features/terminal/screens/LinkedSuccess/LinkedSuccess.d.ts +0 -3
- package/build/features/terminal/screens/LinkedSuccess/LinkedSuccess.js +0 -51
- package/build/features/terminal/screens/LinkedSuccess/index.d.ts +0 -2
- package/build/features/terminal/screens/LinkedSuccess/index.js +0 -2
- package/build/features/terminal/screens/LinkedTerminalInfo/LinkedTerminalInfo.d.ts +0 -3
- package/build/features/terminal/screens/LinkedTerminalInfo/LinkedTerminalInfo.js +0 -50
- package/build/features/terminal/screens/LinkedTerminalInfo/index.d.ts +0 -2
- package/build/features/terminal/screens/LinkedTerminalInfo/index.js +0 -2
- package/build/features/terminal/screens/Loading/Loading.d.ts +0 -4
- package/build/features/terminal/screens/Loading/Loading.js +0 -10
- package/build/features/terminal/screens/Loading/index.d.ts +0 -2
- package/build/features/terminal/screens/Loading/index.js +0 -2
- package/build/features/terminal/screens/NoTerminalDeviceLinked/NoTerminalDeviceLinked.d.ts +0 -3
- package/build/features/terminal/screens/NoTerminalDeviceLinked/NoTerminalDeviceLinked.js +0 -56
- package/build/features/terminal/screens/NoTerminalDeviceLinked/index.d.ts +0 -2
- package/build/features/terminal/screens/NoTerminalDeviceLinked/index.js +0 -2
- package/build/features/terminal/screens/NoTerminalDeviceLinked/styles.d.ts +0 -36
- package/build/features/terminal/screens/NoTerminalDeviceLinked/styles.js +0 -34
- package/build/features/terminal/screens/OperatorError/OperatorError.d.ts +0 -5
- package/build/features/terminal/screens/OperatorError/OperatorError.js +0 -9
- package/build/features/terminal/screens/OperatorError/index.d.ts +0 -2
- package/build/features/terminal/screens/OperatorError/index.js +0 -2
- package/build/features/terminal/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +0 -3
- package/build/features/terminal/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +0 -21
- package/build/features/terminal/screens/ResetPasswordSuccess/index.d.ts +0 -2
- package/build/features/terminal/screens/ResetPasswordSuccess/index.js +0 -2
- package/build/features/terminal/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +0 -3
- package/build/features/terminal/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +0 -31
- package/build/features/terminal/screens/SuccessWithFlowButtons/index.d.ts +0 -2
- package/build/features/terminal/screens/SuccessWithFlowButtons/index.js +0 -2
- package/build/features/terminal/screens/TerminalDeviceList/DeviceList.d.ts +0 -9
- package/build/features/terminal/screens/TerminalDeviceList/DeviceList.js +0 -20
- package/build/features/terminal/screens/TerminalDeviceList/TerminalDeviceList.d.ts +0 -3
- package/build/features/terminal/screens/TerminalDeviceList/TerminalDeviceList.js +0 -144
- package/build/features/terminal/screens/TerminalDeviceList/index.d.ts +0 -2
- package/build/features/terminal/screens/TerminalDeviceList/index.js +0 -2
- package/build/features/terminal/screens/TerminalDeviceList/styles.d.ts +0 -9
- package/build/features/terminal/screens/TerminalDeviceList/styles.js +0 -13
- package/build/features/terminal/screens/TerminalListPage/TerminalListPage.d.ts +0 -3
- package/build/features/terminal/screens/TerminalListPage/TerminalListPage.js +0 -42
- package/build/features/terminal/screens/TerminalListPage/index.d.ts +0 -2
- package/build/features/terminal/screens/TerminalListPage/index.js +0 -2
- package/build/features/terminal/screens/UnlinkedSuccess/UnlinkedSuccess.d.ts +0 -3
- package/build/features/terminal/screens/UnlinkedSuccess/UnlinkedSuccess.js +0 -53
- package/build/features/terminal/screens/UnlinkedSuccess/index.d.ts +0 -2
- package/build/features/terminal/screens/UnlinkedSuccess/index.js +0 -2
- package/build/features/terminal/screens/UnlinkedTerminalInfo/UnlinkedTerminalInfo.d.ts +0 -3
- package/build/features/terminal/screens/UnlinkedTerminalInfo/UnlinkedTerminalInfo.js +0 -98
- package/build/features/terminal/screens/UnlinkedTerminalInfo/index.d.ts +0 -2
- package/build/features/terminal/screens/UnlinkedTerminalInfo/index.js +0 -2
- package/build/features/terminal/screens/UnlinkedTerminalInfo/styles.d.ts +0 -26
- package/build/features/terminal/screens/UnlinkedTerminalInfo/styles.js +0 -30
- package/build/features/terminal/screens/Verify/OTPInput.d.ts +0 -7
- package/build/features/terminal/screens/Verify/OTPInput.js +0 -51
- package/build/features/terminal/screens/Verify/Verify.d.ts +0 -5
- package/build/features/terminal/screens/Verify/Verify.js +0 -85
- package/build/features/terminal/screens/Verify/index.d.ts +0 -2
- package/build/features/terminal/screens/Verify/index.js +0 -2
- package/build/features/terminal/screens/Verify/validation.d.ts +0 -8
- package/build/features/terminal/screens/Verify/validation.js +0 -4
- package/build/features/terminal/screens/shared/Header.d.ts +0 -10
- package/build/features/terminal/screens/shared/Header.js +0 -30
- package/build/features/terminal/screens/shared/TerminalList.d.ts +0 -11
- package/build/features/terminal/screens/shared/TerminalList.js +0 -25
- package/build/features/terminal/screens/shared/index.d.ts +0 -5
- package/build/features/terminal/screens/shared/index.js +0 -5
- package/build/features/terminal/screens/shared/styles.d.ts +0 -196
- package/build/features/terminal/screens/shared/styles.js +0 -155
- package/build/features/terminal/screens/shared/utils.d.ts +0 -7
- package/build/features/terminal/screens/shared/utils.js +0 -24
- /package/build/features/{terminal/screens/LinkNewTerminal/LinkNewTerminal.d.ts → shared/OTPVerifySecurityError/OTPVerifySecurityError.d.ts} +0 -0
|
@@ -1,67 +1,56 @@
|
|
|
1
1
|
import * as yup from 'yup';
|
|
2
2
|
import { BusinessType } from '../../../../@types';
|
|
3
|
-
import { KW_MIN_LICENSE_LENGTH,
|
|
4
|
-
export var EntityNameValidationSchema = function () {
|
|
3
|
+
import { KW_MIN_LICENSE_LENGTH, UNIFIED_NUMBER_MIN_LENGTH } from '../../../../constants';
|
|
4
|
+
export var EntityNameValidationSchema = function (noneEditable) {
|
|
5
5
|
return yup.object().shape({
|
|
6
|
-
legalName:
|
|
7
|
-
.string()
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
6
|
+
legalName: noneEditable['legal_name.en'] && noneEditable['legal_name.ar']
|
|
7
|
+
? yup.string().optional()
|
|
8
|
+
: yup
|
|
9
|
+
.string()
|
|
10
|
+
.required('')
|
|
11
|
+
.test({
|
|
12
|
+
test: function (value) {
|
|
13
|
+
var length = (value === null || value === void 0 ? void 0 : value.length) || 0;
|
|
14
|
+
if (length === 0)
|
|
15
|
+
return true;
|
|
16
|
+
return length >= 3 ? true : this.createError({ message: 'enter_legal_name_min_three_chars' });
|
|
17
|
+
}
|
|
18
|
+
}),
|
|
17
19
|
licenseType: yup.string().optional(),
|
|
18
|
-
entityType: yup.string().required('entity_type_required'),
|
|
19
|
-
licenseNumber: yup
|
|
20
|
-
|
|
21
|
-
.
|
|
22
|
-
|
|
23
|
-
var
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
if (length === 0)
|
|
27
|
-
return true;
|
|
28
|
-
if (isCR) {
|
|
29
|
-
return length >= CR_MIN_LICENSE_LENGTH ? true : this.createError({ message: 'cr_max_length' });
|
|
20
|
+
entityType: noneEditable['type'] ? yup.string().optional() : yup.string().required('entity_type_required'),
|
|
21
|
+
licenseNumber: yup.string().optional(),
|
|
22
|
+
unifiedNumber: noneEditable['license.additional_info']
|
|
23
|
+
? yup.string().optional()
|
|
24
|
+
: yup.string().when('licenseType', function (licenseType) {
|
|
25
|
+
var isCR = licenseType === BusinessType.CR;
|
|
26
|
+
if (!isCR) {
|
|
27
|
+
return yup.string().optional();
|
|
30
28
|
}
|
|
31
|
-
return
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
29
|
+
return yup
|
|
30
|
+
.string()
|
|
31
|
+
.required('')
|
|
32
|
+
.test({
|
|
33
|
+
test: function (value) {
|
|
34
|
+
var length = (value === null || value === void 0 ? void 0 : value.length) || 0;
|
|
35
|
+
if (length >= UNIFIED_NUMBER_MIN_LENGTH)
|
|
36
|
+
return true;
|
|
37
|
+
if (length === 0)
|
|
38
|
+
return this.createError({ message: '' });
|
|
39
|
+
return this.createError({ message: 'unified_number_required' });
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
}),
|
|
43
|
+
issuingDate: noneEditable['license.issuing_date'] ? yup.string().optional() : yup.string().required('choose_any_issuing_date'),
|
|
44
|
+
expiryDate: yup.string().optional(),
|
|
38
45
|
certificateId: yup.array().optional(),
|
|
39
46
|
articleId: yup.string().optional()
|
|
40
47
|
});
|
|
41
48
|
};
|
|
42
|
-
export var EntityNameKWValidationSchema = function () {
|
|
49
|
+
export var EntityNameKWValidationSchema = function (noneEditable) {
|
|
43
50
|
return yup.object().shape({
|
|
44
|
-
legalName:
|
|
45
|
-
.string()
|
|
46
|
-
|
|
47
|
-
.test({
|
|
48
|
-
test: function (value) {
|
|
49
|
-
var length = (value === null || value === void 0 ? void 0 : value.length) || 0;
|
|
50
|
-
if (length === 0)
|
|
51
|
-
return true;
|
|
52
|
-
return length >= 3 ? true : this.createError({ message: 'enter_legal_name_min_three_chars' });
|
|
53
|
-
}
|
|
54
|
-
}),
|
|
55
|
-
licenseType: yup.string().optional(),
|
|
56
|
-
entityType: yup.string().required('entity_type_required'),
|
|
57
|
-
licenseNumber: yup
|
|
58
|
-
.string()
|
|
59
|
-
.when('licenseType', function (licenseType) {
|
|
60
|
-
var isCR = licenseType === BusinessType.CR;
|
|
61
|
-
if (!isCR) {
|
|
62
|
-
return yup.string().optional();
|
|
63
|
-
}
|
|
64
|
-
return yup
|
|
51
|
+
legalName: noneEditable['legal_name.en'] && noneEditable['legal_name.ar']
|
|
52
|
+
? yup.string().optional()
|
|
53
|
+
: yup
|
|
65
54
|
.string()
|
|
66
55
|
.required('')
|
|
67
56
|
.test({
|
|
@@ -69,37 +58,44 @@ export var EntityNameKWValidationSchema = function () {
|
|
|
69
58
|
var length = (value === null || value === void 0 ? void 0 : value.length) || 0;
|
|
70
59
|
if (length === 0)
|
|
71
60
|
return true;
|
|
72
|
-
return length >=
|
|
61
|
+
return length >= 3 ? true : this.createError({ message: 'enter_legal_name_min_three_chars' });
|
|
62
|
+
}
|
|
63
|
+
}),
|
|
64
|
+
licenseType: yup.string().optional(),
|
|
65
|
+
entityType: noneEditable['type'] ? yup.string().optional() : yup.string().required('entity_type_required'),
|
|
66
|
+
licenseNumber: noneEditable['license.number']
|
|
67
|
+
? yup.string().optional()
|
|
68
|
+
: yup
|
|
69
|
+
.string()
|
|
70
|
+
.when('licenseType', function (licenseType) {
|
|
71
|
+
var isCR = licenseType === BusinessType.CR;
|
|
72
|
+
if (!isCR) {
|
|
73
|
+
return yup.string().optional();
|
|
73
74
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
75
|
+
return yup
|
|
76
|
+
.string()
|
|
77
|
+
.required('')
|
|
78
|
+
.test({
|
|
79
|
+
test: function (value) {
|
|
80
|
+
var length = (value === null || value === void 0 ? void 0 : value.length) || 0;
|
|
81
|
+
if (length === 0)
|
|
82
|
+
return true;
|
|
83
|
+
return length >= KW_MIN_LICENSE_LENGTH ? true : this.createError({ message: 'cr_kw_max_length' });
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
})
|
|
87
|
+
.required(''),
|
|
88
|
+
issuingDate: noneEditable['license.issuing_date'] ? yup.string().optional() : yup.string().required('choose_any_issuing_date'),
|
|
89
|
+
expiryDate: noneEditable['license.expiry_date'] ? yup.string().optional() : yup.string().required('choose_any_expiry_date'),
|
|
79
90
|
certificateId: yup.array().optional(),
|
|
80
91
|
articleId: yup.string().optional()
|
|
81
92
|
});
|
|
82
93
|
};
|
|
83
|
-
export var EntityNameOtherCountryValidationSchema = function () {
|
|
94
|
+
export var EntityNameOtherCountryValidationSchema = function (noneEditable) {
|
|
84
95
|
return yup.object().shape({
|
|
85
|
-
legalName:
|
|
86
|
-
.string()
|
|
87
|
-
|
|
88
|
-
.test({
|
|
89
|
-
test: function (value) {
|
|
90
|
-
var length = (value === null || value === void 0 ? void 0 : value.length) || 0;
|
|
91
|
-
if (length === 0)
|
|
92
|
-
return true;
|
|
93
|
-
return length >= 3 ? true : this.createError({ message: 'enter_legal_name_min_three_chars' });
|
|
94
|
-
}
|
|
95
|
-
}),
|
|
96
|
-
licenseType: yup.string().optional(),
|
|
97
|
-
entityType: yup.string().required('entity_type_required'),
|
|
98
|
-
licenseNumber: yup
|
|
99
|
-
.string()
|
|
100
|
-
.when('licenseType', function (licenseType) {
|
|
101
|
-
var isCR = licenseType === BusinessType.CR;
|
|
102
|
-
return yup
|
|
96
|
+
legalName: noneEditable['legal_name.en'] && noneEditable['legal_name.ar']
|
|
97
|
+
? yup.string().optional()
|
|
98
|
+
: yup
|
|
103
99
|
.string()
|
|
104
100
|
.required('')
|
|
105
101
|
.test({
|
|
@@ -107,13 +103,32 @@ export var EntityNameOtherCountryValidationSchema = function () {
|
|
|
107
103
|
var length = (value === null || value === void 0 ? void 0 : value.length) || 0;
|
|
108
104
|
if (length === 0)
|
|
109
105
|
return true;
|
|
110
|
-
return length >=
|
|
106
|
+
return length >= 3 ? true : this.createError({ message: 'enter_legal_name_min_three_chars' });
|
|
111
107
|
}
|
|
112
|
-
})
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
108
|
+
}),
|
|
109
|
+
licenseType: yup.string().optional(),
|
|
110
|
+
entityType: noneEditable['type'] ? yup.string().optional() : yup.string().required('entity_type_required'),
|
|
111
|
+
licenseNumber: noneEditable['license.number']
|
|
112
|
+
? yup.string().optional()
|
|
113
|
+
: yup
|
|
114
|
+
.string()
|
|
115
|
+
.when('licenseType', function (licenseType) {
|
|
116
|
+
var isCR = licenseType === BusinessType.CR;
|
|
117
|
+
return yup
|
|
118
|
+
.string()
|
|
119
|
+
.required('')
|
|
120
|
+
.test({
|
|
121
|
+
test: function (value) {
|
|
122
|
+
var length = (value === null || value === void 0 ? void 0 : value.length) || 0;
|
|
123
|
+
if (length === 0)
|
|
124
|
+
return true;
|
|
125
|
+
return length >= KW_MIN_LICENSE_LENGTH ? true : this.createError({ message: isCR ? 'cr_kw_max_length' : 'fl_max_length' });
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
})
|
|
129
|
+
.required(''),
|
|
130
|
+
issuingDate: noneEditable['license.issuing_date'] ? yup.string().optional() : yup.string().required('choose_any_issuing_date'),
|
|
131
|
+
expiryDate: noneEditable['license.expiry_date'] ? yup.string().optional() : yup.string().required('choose_any_expiry_date'),
|
|
117
132
|
certificateId: yup.array().optional(),
|
|
118
133
|
articleId: yup.string().optional()
|
|
119
134
|
});
|
|
@@ -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>;
|
|
@@ -13,6 +13,7 @@ import ConnectOTPScreen from './connect/screens/OTP';
|
|
|
13
13
|
import ThankYouScreen from './connect/screens/ThankYou';
|
|
14
14
|
import OperatorError from './connect/screens/OperatorError';
|
|
15
15
|
import CollectMobileOwnership from './connect/screens/MobileOwnership';
|
|
16
|
+
import OTPVerifySecurityError from './shared/OTPVerifySecurityError';
|
|
16
17
|
import ConnectExpressBusinessCountry from './connectExpress/screens/BusinessCountry/BusinessCountry';
|
|
17
18
|
import ConnectExpressMobileScreen from './connectExpress/screens/Mobile';
|
|
18
19
|
import ConnectExpressNIDScreen from './connectExpress/screens/NID';
|
|
@@ -37,6 +38,7 @@ import ConnectExpressAuthMerchantScreen from './connectExpress/screens/AuthMerch
|
|
|
37
38
|
import ConnectExpressAuthAccountCreatedLoaderScreen from './connectExpress/screens/AccountCreatedLoader';
|
|
38
39
|
import ConnectExpressOperatorError from './connectExpress/screens/OperatorError';
|
|
39
40
|
import ConnectExpressCollectMobileOwnership from './connectExpress/screens/MobileOwnership';
|
|
41
|
+
import ConnectExpressOTPVerifySecurityError from './shared/OTPVerifySecurityError';
|
|
40
42
|
import AuthBusinessCountry from './auth/screens/BusinessCountry/BusinessCountry';
|
|
41
43
|
import AuthSwitchScreen from './auth/screens/AuthSwitch';
|
|
42
44
|
import AuthMobileScreen from './auth/screens/Mobile';
|
|
@@ -58,6 +60,7 @@ import AuthEmailSentScreen from './auth/screens/EmailSent';
|
|
|
58
60
|
import AuthMigratingDataScreen from './auth/screens/MigratingData';
|
|
59
61
|
import AuthOperatorError from './auth/screens/OperatorError';
|
|
60
62
|
import AuthPasscodeScreen from './auth/screens/Passcode';
|
|
63
|
+
import AuthOTPVerifySecurityError from './shared/OTPVerifySecurityError';
|
|
61
64
|
import CustomersPage from './business/screens/Customers';
|
|
62
65
|
import IDBODPage from './business/screens/IDBOD';
|
|
63
66
|
import BusinessVerifyPage from './business/screens/Verify';
|
|
@@ -73,6 +76,7 @@ import BusVerifyPACIScreen from './business/screens/VerifyPACI';
|
|
|
73
76
|
import BrandVerifyScreen from './business/screens/BrandDetails';
|
|
74
77
|
import BusinessOperatorError from './business/screens/OperatorError';
|
|
75
78
|
import BusinessCollectMobileOwnership from './business/screens/MobileOwnership';
|
|
79
|
+
import BusinessOTPVerifySecurityError from './shared/OTPVerifySecurityError';
|
|
76
80
|
import PasswordVerifyPage from './password/screens/Verify';
|
|
77
81
|
import CreatePasswordPage from './password/screens/CreatePassword';
|
|
78
82
|
import PasswordDataLoadingPage from './password/screens/PrepareDataLoading';
|
|
@@ -81,6 +85,7 @@ import SuccessPasswordPage from './password/screens/Success';
|
|
|
81
85
|
import PasswordSuccessWithFlowPage from './password/screens/SuccessWithFlowButtons';
|
|
82
86
|
import PasswordResetPasswordSuccessPage from './password/screens/ResetPasswordSuccess';
|
|
83
87
|
import PasswordOperatorError from './password/screens/OperatorError';
|
|
88
|
+
import PasswordOTPVerifySecurityError from './shared/OTPVerifySecurityError';
|
|
84
89
|
import IndividualVerifyPage from './individual/screens/Verify';
|
|
85
90
|
import IndividualPhoneInfoPage from './individual/screens/IndividualPhoneInfo';
|
|
86
91
|
import IndividualListPage from './individual/screens/IndividualList';
|
|
@@ -91,6 +96,7 @@ import IndividualSuccessWithFlowPage from './individual/screens/SuccessWithFlowB
|
|
|
91
96
|
import IndividualResetPasswordSuccessPage from './individual/screens/ResetPasswordSuccess';
|
|
92
97
|
import IndividualDataLoadingPage from './individual/screens/PrepareDataLoading';
|
|
93
98
|
import IndividualOperatorError from './individual/screens/OperatorError';
|
|
99
|
+
import IndividualOTPVerifySecurityError from './shared/OTPVerifySecurityError';
|
|
94
100
|
import BankVerifyPage from './bank/screens/Verify';
|
|
95
101
|
import BankDetailsPage from './bank/screens/BankDetails';
|
|
96
102
|
import BankSuccessPage from './bank/screens/Success';
|
|
@@ -98,6 +104,7 @@ import BankSuccessWithFlowPage from './bank/screens/SuccessWithFlowButtons';
|
|
|
98
104
|
import BankResetPasswordSuccessPage from './bank/screens/ResetPasswordSuccess';
|
|
99
105
|
import BankDataLoadingPage from './bank/screens/PrepareDataLoading';
|
|
100
106
|
import BankOperatorError from './bank/screens/OperatorError';
|
|
107
|
+
import BankOTPVerifySecurityError from './shared/OTPVerifySecurityError';
|
|
101
108
|
import TaxVerifyPage from './tax/screens/Verify';
|
|
102
109
|
import TaxDetailsPage from './tax/screens/TaxDetails';
|
|
103
110
|
import TaxSuccessPage from './tax/screens/Success';
|
|
@@ -105,6 +112,7 @@ import TaxSuccessWithFlowPage from './tax/screens/SuccessWithFlowButtons';
|
|
|
105
112
|
import TaxResetPasswordSuccessPage from './tax/screens/ResetPasswordSuccess';
|
|
106
113
|
import TaxDataLoadingPage from './tax/screens/PrepareDataLoading';
|
|
107
114
|
import TaxOperatorError from './tax/screens/OperatorError';
|
|
115
|
+
import TaxOTPVerifySecurityError from './shared/OTPVerifySecurityError';
|
|
108
116
|
import SignInMobilePage from './signIn/screens/Mobile';
|
|
109
117
|
import SignInEmailPage from './signIn/screens/Email';
|
|
110
118
|
import SignInOTPPage from './signIn/screens/OTP';
|
|
@@ -118,6 +126,7 @@ import EntitySuccessWithFlowPage from './entity/screens/SuccessWithFlowButtons';
|
|
|
118
126
|
import EntityResetPasswordSuccessPage from './entity/screens/ResetPasswordSuccess';
|
|
119
127
|
import EntityDataLoadingPage from './entity/screens/PrepareDataLoading';
|
|
120
128
|
import EntityOperatorError from './entity/screens/OperatorError';
|
|
129
|
+
import EntityOTPVerifySecurityError from './shared/OTPVerifySecurityError';
|
|
121
130
|
import BrandVerifyPage from './brand/screens/Verify';
|
|
122
131
|
import BrandInfoPage from './brand/screens/BrandInfo';
|
|
123
132
|
import BrandSegmentPage from './brand/screens/BrandSegmentInfo';
|
|
@@ -127,11 +136,13 @@ import BrandSuccessWithFlowPage from './brand/screens/SuccessWithFlowButtons';
|
|
|
127
136
|
import BrandResetPasswordSuccessPage from './brand/screens/ResetPasswordSuccess';
|
|
128
137
|
import BrandDataLoadingPage from './brand/screens/PrepareDataLoading';
|
|
129
138
|
import BrandOperatorError from './brand/screens/OperatorError';
|
|
139
|
+
import BrandOTPVerifySecurityError from './shared/OTPVerifySecurityError';
|
|
130
140
|
import BoardVerifyPage from './board/screens/Verify';
|
|
131
141
|
import BoardSuccessWithFlowPage from './board/screens/SuccessWithFlowButtons';
|
|
132
142
|
import BoardResetPasswordSuccessPage from './board/screens/ResetPasswordSuccess';
|
|
133
143
|
import BoardDataLoadingPage from './board/screens/PrepareDataLoading';
|
|
134
144
|
import BoardOperatorError from './board/screens/OperatorError';
|
|
145
|
+
import BoardOTPVerifySecurityError from './shared/OTPVerifySecurityError';
|
|
135
146
|
import KycLoadingPage from './kyc/screens/Loading';
|
|
136
147
|
import KycTokenErrorPage from './kyc/screens/TokenError';
|
|
137
148
|
import KycAlreadySubmittedPage from './kyc/screens/AlreadySubmitted';
|
|
@@ -141,19 +152,6 @@ import KycOperatorErrorPage from './kyc/screens/OperatorError';
|
|
|
141
152
|
import KycSuccessPage from './kyc/screens/Success';
|
|
142
153
|
import KycTermsPage from './kyc/screens/Terms';
|
|
143
154
|
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 NoTerminalDeviceLinkedPage from './terminal/screens/NoTerminalDeviceLinked';
|
|
148
|
-
import TerminalDeviceListPage from './terminal/screens/TerminalDeviceList';
|
|
149
|
-
import TerminalListPage from './terminal/screens/TerminalListPage';
|
|
150
|
-
import LinkNewTerminalPage from './terminal/screens/LinkNewTerminal';
|
|
151
|
-
import LinkedTerminalInfoPage from './terminal/screens/LinkedTerminalInfo';
|
|
152
|
-
import UnlinkedTerminalInfoPage from './terminal/screens/UnlinkedTerminalInfo';
|
|
153
|
-
import LinkedSuccessPage from './terminal/screens/LinkedSuccess';
|
|
154
|
-
import UnlinkedSuccessPage from './terminal/screens/UnlinkedSuccess';
|
|
155
|
-
import TerminalBoardPage from './terminal/screens/SuccessWithFlowButtons';
|
|
156
|
-
import TerminalResetPasswordSuccessPage from './terminal/screens/ResetPasswordSuccess';
|
|
157
155
|
export var connectFeatureScreens = [
|
|
158
156
|
{
|
|
159
157
|
name: 'CONNECT_BUSINESS_COUNTRY_STEP',
|
|
@@ -210,6 +208,10 @@ export var connectFeatureScreens = [
|
|
|
210
208
|
{
|
|
211
209
|
name: 'CONNECT_MOBILE_OWNERSHIP',
|
|
212
210
|
element: CollectMobileOwnership
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
name: 'CONNECT_OTP_VERIFY_SECURITY_ERROR_STEP',
|
|
214
|
+
element: OTPVerifySecurityError
|
|
213
215
|
}
|
|
214
216
|
];
|
|
215
217
|
export var connectExpressFeatureScreens = [
|
|
@@ -308,6 +310,10 @@ export var connectExpressFeatureScreens = [
|
|
|
308
310
|
{
|
|
309
311
|
name: 'COLLECT_MOBILE_OWNERSHIP',
|
|
310
312
|
element: ConnectExpressCollectMobileOwnership
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
name: 'CONNECT_EXPRESS_OTP_VERIFY_SECURITY_ERROR_STEP',
|
|
316
|
+
element: ConnectExpressOTPVerifySecurityError
|
|
311
317
|
}
|
|
312
318
|
];
|
|
313
319
|
export var authFeatureScreens = [
|
|
@@ -394,6 +400,10 @@ export var authFeatureScreens = [
|
|
|
394
400
|
{
|
|
395
401
|
name: 'AUTH_OPERATOR_ERROR_STEP',
|
|
396
402
|
element: AuthOperatorError
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
name: 'AUTH_OTP_VERIFY_SECURITY_ERROR_STEP',
|
|
406
|
+
element: AuthOTPVerifySecurityError
|
|
397
407
|
}
|
|
398
408
|
];
|
|
399
409
|
export var businessFeatureScreens = [
|
|
@@ -444,6 +454,10 @@ export var businessFeatureScreens = [
|
|
|
444
454
|
{
|
|
445
455
|
name: 'BUSINESS_MOBILE_OWNERSHIP',
|
|
446
456
|
element: BusinessCollectMobileOwnership
|
|
457
|
+
},
|
|
458
|
+
{
|
|
459
|
+
name: 'BUSINESS_OTP_VERIFY_SECURITY_ERROR_STEP',
|
|
460
|
+
element: BusinessOTPVerifySecurityError
|
|
447
461
|
}
|
|
448
462
|
];
|
|
449
463
|
export var passwordFeatureScreens = [
|
|
@@ -475,6 +489,10 @@ export var passwordFeatureScreens = [
|
|
|
475
489
|
{
|
|
476
490
|
name: 'PASSWORD_OPERATOR_ERROR_STEP',
|
|
477
491
|
element: PasswordOperatorError
|
|
492
|
+
},
|
|
493
|
+
{
|
|
494
|
+
name: 'PASSWORD_OTP_VERIFY_SECURITY_ERROR_STEP',
|
|
495
|
+
element: PasswordOTPVerifySecurityError
|
|
478
496
|
}
|
|
479
497
|
];
|
|
480
498
|
export var individualFeatureScreens = [
|
|
@@ -514,6 +532,10 @@ export var individualFeatureScreens = [
|
|
|
514
532
|
{
|
|
515
533
|
name: 'INDIVIDUAL_OPERATOR_ERROR_STEP',
|
|
516
534
|
element: IndividualOperatorError
|
|
535
|
+
},
|
|
536
|
+
{
|
|
537
|
+
name: 'INDIVIDUAL_OTP_VERIFY_SECURITY_ERROR_STEP',
|
|
538
|
+
element: IndividualOTPVerifySecurityError
|
|
517
539
|
}
|
|
518
540
|
];
|
|
519
541
|
export var bankFeatureScreens = [
|
|
@@ -541,6 +563,10 @@ export var bankFeatureScreens = [
|
|
|
541
563
|
{
|
|
542
564
|
name: 'BANK_OPERATOR_ERROR_STEP',
|
|
543
565
|
element: BankOperatorError
|
|
566
|
+
},
|
|
567
|
+
{
|
|
568
|
+
name: 'BANK_OTP_VERIFY_SECURITY_ERROR_STEP',
|
|
569
|
+
element: BankOTPVerifySecurityError
|
|
544
570
|
}
|
|
545
571
|
];
|
|
546
572
|
export var taxFeatureScreens = [
|
|
@@ -568,6 +594,10 @@ export var taxFeatureScreens = [
|
|
|
568
594
|
{
|
|
569
595
|
name: 'TAX_OPERATOR_ERROR_STEP',
|
|
570
596
|
element: TaxOperatorError
|
|
597
|
+
},
|
|
598
|
+
{
|
|
599
|
+
name: 'TAX_OTP_VERIFY_SECURITY_ERROR_STEP',
|
|
600
|
+
element: TaxOTPVerifySecurityError
|
|
571
601
|
}
|
|
572
602
|
];
|
|
573
603
|
export var signInFeatureScreens = [
|
|
@@ -621,6 +651,10 @@ export var entityFeatureScreens = [
|
|
|
621
651
|
{
|
|
622
652
|
name: 'ENTITY_OPERATOR_ERROR_STEP',
|
|
623
653
|
element: EntityOperatorError
|
|
654
|
+
},
|
|
655
|
+
{
|
|
656
|
+
name: 'ENTITY_OTP_VERIFY_SECURITY_ERROR_STEP',
|
|
657
|
+
element: EntityOTPVerifySecurityError
|
|
624
658
|
}
|
|
625
659
|
];
|
|
626
660
|
export var brandFeatureScreens = [
|
|
@@ -656,6 +690,10 @@ export var brandFeatureScreens = [
|
|
|
656
690
|
{
|
|
657
691
|
name: 'BRAND_OPERATOR_ERROR_STEP',
|
|
658
692
|
element: BrandOperatorError
|
|
693
|
+
},
|
|
694
|
+
{
|
|
695
|
+
name: 'BRAND_OTP_VERIFY_SECURITY_ERROR_STEP',
|
|
696
|
+
element: BrandOTPVerifySecurityError
|
|
659
697
|
}
|
|
660
698
|
];
|
|
661
699
|
export var boardFeatureScreens = [
|
|
@@ -678,6 +716,10 @@ export var boardFeatureScreens = [
|
|
|
678
716
|
{
|
|
679
717
|
name: 'BOARD_OPERATOR_ERROR_STEP',
|
|
680
718
|
element: BoardOperatorError
|
|
719
|
+
},
|
|
720
|
+
{
|
|
721
|
+
name: 'BOARD_OTP_VERIFY_SECURITY_ERROR_STEP',
|
|
722
|
+
element: BoardOTPVerifySecurityError
|
|
681
723
|
}
|
|
682
724
|
];
|
|
683
725
|
export var kycFeatureScreens = [
|
|
@@ -718,57 +760,3 @@ export var kycFeatureScreens = [
|
|
|
718
760
|
element: KycSuccessPage
|
|
719
761
|
}
|
|
720
762
|
];
|
|
721
|
-
export var terminalFeatureScreens = [
|
|
722
|
-
{
|
|
723
|
-
name: CONNECT_FLOWS.terminal.loadingData,
|
|
724
|
-
element: TerminalLoadingPage
|
|
725
|
-
},
|
|
726
|
-
{
|
|
727
|
-
name: CONNECT_FLOWS.terminal.operatorError,
|
|
728
|
-
element: TerminalOperatorErrorPage
|
|
729
|
-
},
|
|
730
|
-
{
|
|
731
|
-
name: CONNECT_FLOWS.terminal.verify,
|
|
732
|
-
element: TerminalVerifyPage
|
|
733
|
-
},
|
|
734
|
-
{
|
|
735
|
-
name: CONNECT_FLOWS.terminal.noTerminalLinked,
|
|
736
|
-
element: NoTerminalDeviceLinkedPage
|
|
737
|
-
},
|
|
738
|
-
{
|
|
739
|
-
name: CONNECT_FLOWS.terminal.terminalDeviceList,
|
|
740
|
-
element: TerminalDeviceListPage
|
|
741
|
-
},
|
|
742
|
-
{
|
|
743
|
-
name: CONNECT_FLOWS.terminal.terminalLinkNew,
|
|
744
|
-
element: LinkNewTerminalPage
|
|
745
|
-
},
|
|
746
|
-
{
|
|
747
|
-
name: CONNECT_FLOWS.terminal.terminalList,
|
|
748
|
-
element: TerminalListPage
|
|
749
|
-
},
|
|
750
|
-
{
|
|
751
|
-
name: CONNECT_FLOWS.terminal.linkedTerminalInfo,
|
|
752
|
-
element: LinkedTerminalInfoPage
|
|
753
|
-
},
|
|
754
|
-
{
|
|
755
|
-
name: CONNECT_FLOWS.terminal.unlinkedTerminalInfo,
|
|
756
|
-
element: UnlinkedTerminalInfoPage
|
|
757
|
-
},
|
|
758
|
-
{
|
|
759
|
-
name: CONNECT_FLOWS.terminal.terminalLinkedSuccess,
|
|
760
|
-
element: LinkedSuccessPage
|
|
761
|
-
},
|
|
762
|
-
{
|
|
763
|
-
name: CONNECT_FLOWS.terminal.terminalUnlinkedSuccess,
|
|
764
|
-
element: UnlinkedSuccessPage
|
|
765
|
-
},
|
|
766
|
-
{
|
|
767
|
-
name: CONNECT_FLOWS.terminal.board,
|
|
768
|
-
element: TerminalBoardPage
|
|
769
|
-
},
|
|
770
|
-
{
|
|
771
|
-
name: CONNECT_FLOWS.terminal.resetPassword,
|
|
772
|
-
element: TerminalResetPasswordSuccessPage
|
|
773
|
-
}
|
|
774
|
-
];
|
|
@@ -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
|
|
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
|
}
|
|
@@ -242,6 +242,6 @@ export default function FlowsButtons(_a) {
|
|
|
242
242
|
onResetPassword();
|
|
243
243
|
else
|
|
244
244
|
onRedirect({ title: title, href: href, src: src, hoverSrc: hoverSrc, isCompleted: isCompleted, name: name, status: status, token: token });
|
|
245
|
-
} }, { children: _jsx(ButtonStyled, __assign({ variant: 'outlined', disabled: isResetPassword(name, status) && loading, isCompleted: isCompleted, hasUrl: !!href, sx: __assign({ mb: isLast ? 2.5 : 1.8 }, sx), endIcon: isResetPassword(name, status) && loading ? (_jsx(_Fragment, {})) : isCompleted ? (_jsx(CheckIconStyled, {})) : (_jsxs("div", __assign({ style: { display: 'flex', alignItems: 'center' } }, { children: [name !== 'password' &&
|
|
245
|
+
} }, { children: _jsx(ButtonStyled, __assign({ variant: 'outlined', disabled: isResetPassword(name, status) && loading, isCompleted: isCompleted, hasUrl: !!href, sx: __assign({ mb: isLast ? 2.5 : 1.8 }, sx), endIcon: isResetPassword(name, status) && loading ? (_jsx(_Fragment, {})) : isCompleted ? (_jsx(CheckIconStyled, {})) : (_jsxs("div", __assign({ style: { display: 'flex', alignItems: 'center' } }, { children: [name !== 'password' && _jsx(Dot, { completed: ['complete', 'completed', 'reviewed'].includes(status === null || status === void 0 ? void 0 : status.toLowerCase()) }), _jsx(Image, { sx: { height: 15, transform: isAr ? 'scale(-1)' : 'scale(1)', marginInlineStart: 0 }, src: ICONS_NAMES.Arrow_filled_right_icon })] }))), startIcon: isResetPassword(name, status) && loading ? (_jsx(_Fragment, {})) : isBrand(name) ? (_jsx(_Fragment, { children: _jsx(BrandImage, { children: _jsx(BrandNameStyled, { children: brandName }) }) })) : (_jsx(Image, { src: src, alt: title })), type: 'button' }, { children: title })) }), idx));
|
|
246
246
|
}), onClose && (_jsx(SharedButton, __assign({ sx: { mt: 2.5, ml: 0, mr: 0 }, isAr: isAr, disableBack: true, loading: storeLoading, onClick: onClose }, { children: t('close_and_complete_later') })))] }));
|
|
247
247
|
}
|
|
@@ -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 GenericError from '../../shared/GenericError';
|
|
5
|
+
var OTPVerifySecurityError = function () {
|
|
6
|
+
var t = useTranslation().t;
|
|
7
|
+
return _jsx(GenericError, { error: t('something_went_wrong'), errorTitle: t('oops') });
|
|
8
|
+
};
|
|
9
|
+
export default React.memo(OTPVerifySecurityError);
|
|
@@ -72,8 +72,7 @@ var SuccessFlowButtons = function (_a) {
|
|
|
72
72
|
{ name: 'entity', status: entity === null || entity === void 0 ? void 0 : entity.data_state },
|
|
73
73
|
{ name: 'bank', status: bank === null || bank === void 0 ? void 0 : bank.data_state },
|
|
74
74
|
{ name: 'tax', status: entity === null || entity === void 0 ? void 0 : entity.tax_data_state },
|
|
75
|
-
{ name: 'individual', status: individuals === null || individuals === void 0 ? void 0 : individuals.data_state }
|
|
76
|
-
{ name: 'terminal', status: '' }
|
|
75
|
+
{ name: 'individual', status: individuals === null || individuals === void 0 ? void 0 : individuals.data_state }
|
|
77
76
|
];
|
|
78
77
|
var reMapFlowData = function (flows) {
|
|
79
78
|
if (flows === void 0) { flows = []; }
|
|
@@ -118,6 +117,7 @@ var SuccessFlowButtons = function (_a) {
|
|
|
118
117
|
}, [flows, isAr]);
|
|
119
118
|
useEffect(function () {
|
|
120
119
|
var _a, _b;
|
|
120
|
+
console.log('status', status);
|
|
121
121
|
if ((status === null || status === void 0 ? void 0 : status.toLocaleLowerCase()) === 'complete') {
|
|
122
122
|
(_b = (_a = settings.data.appConfig).onBoardCompleted) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
123
123
|
}
|
|
@@ -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
|
|
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
|
|
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,
|
|
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.
|
|
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
|
-
|
|
17
|
-
export
|
|
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 };
|