@tap-payments/auth-jsconnect 1.0.5 → 1.0.8
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 +61 -3
- package/build/@types/app.js +5 -0
- package/build/app/settings.d.ts +3 -3
- package/build/app/settings.js +26 -11
- package/build/assets/locales/ar.json +51 -3
- package/build/assets/locales/en.json +50 -2
- package/build/components/AnimationFlow/BottomSheet.js +1 -1
- package/build/components/AnimationFlow/Dialog.js +7 -22
- package/build/components/Footer/Footer.js +1 -1
- package/build/components/Loader/Loader.js +12 -11
- package/build/components/OTPField/OTPField.js +3 -23
- package/build/components/OTPTimer/OTPTimer.d.ts +4 -3
- package/build/components/OTPTimer/OTPTimer.js +19 -6
- package/build/components/Providers/ThemeProvider.js +3 -2
- package/build/components/SimpleList/SimpleList.d.ts +1 -1
- package/build/components/SimpleList/SimpleList.js +2 -5
- package/build/components/Warning/Warning.js +2 -18
- package/build/constants/app.d.ts +9 -0
- package/build/constants/app.js +112 -2
- package/build/constants/assets.d.ts +4 -0
- package/build/constants/assets.js +4 -0
- package/build/constants/dummy.d.ts +103 -0
- package/build/constants/dummy.js +219 -0
- package/build/constants/validation.d.ts +4 -0
- package/build/constants/validation.js +4 -0
- package/build/features/bank/Bank.d.ts +6 -0
- package/build/features/bank/Bank.js +48 -0
- package/build/features/bank/index.d.ts +1 -0
- package/build/features/bank/index.js +1 -0
- package/build/features/bank/screens/BankDetails/BankDetails.d.ts +5 -0
- package/build/features/bank/screens/BankDetails/BankDetails.js +57 -0
- package/build/features/bank/screens/BankDetails/BankName.d.ts +3 -0
- package/build/features/bank/screens/BankDetails/BankName.js +27 -0
- package/build/features/bank/screens/BankDetails/Beneficiary.d.ts +5 -0
- package/build/features/bank/screens/BankDetails/Beneficiary.js +34 -0
- package/build/features/bank/screens/BankDetails/IBAN.d.ts +5 -0
- package/build/features/bank/screens/BankDetails/IBAN.js +35 -0
- package/build/features/bank/screens/BankDetails/index.d.ts +3 -0
- package/build/features/bank/screens/BankDetails/index.js +2 -0
- package/build/features/bank/screens/BankDetails/validation.d.ts +14 -0
- package/build/features/bank/screens/BankDetails/validation.js +9 -0
- package/build/features/business/Business.d.ts +6 -0
- package/build/features/business/Business.js +61 -0
- package/build/features/business/index.d.ts +1 -0
- package/build/features/business/index.js +1 -1
- package/build/features/business/screens/Activities/Activities.d.ts +5 -0
- package/build/features/business/screens/Activities/Activities.js +83 -0
- package/build/features/business/screens/Activities/ActivitiesList.d.ts +70 -0
- package/build/features/business/screens/Activities/ActivitiesList.js +136 -0
- package/build/features/business/screens/Activities/SalesChannels.d.ts +5 -0
- package/build/features/business/screens/Activities/SalesChannels.js +107 -0
- package/build/features/business/screens/Activities/index.d.ts +3 -0
- package/build/features/business/screens/Activities/index.js +2 -0
- package/build/features/business/screens/Activities/validation.d.ts +119 -0
- package/build/features/business/screens/Activities/validation.js +17 -0
- package/build/features/business/screens/BusinessType/BusinessType.d.ts +12 -0
- package/build/features/business/screens/BusinessType/BusinessType.js +85 -0
- package/build/features/business/screens/BusinessType/CRNumber.d.ts +6 -0
- package/build/features/business/screens/BusinessType/CRNumber.js +40 -0
- package/build/features/business/screens/BusinessType/CompanyLicense.d.ts +11 -0
- package/build/features/business/screens/BusinessType/CompanyLicense.js +109 -0
- package/build/features/business/screens/BusinessType/FLNumber.d.ts +6 -0
- package/build/features/business/screens/BusinessType/FLNumber.js +40 -0
- package/build/features/business/screens/BusinessType/FreelanceLicense.d.ts +11 -0
- package/build/features/business/screens/BusinessType/FreelanceLicense.js +112 -0
- package/build/features/business/screens/BusinessType/SelectType.d.ts +8 -0
- package/build/features/business/screens/BusinessType/SelectType.js +106 -0
- package/build/features/business/screens/BusinessType/Switch.d.ts +7 -0
- package/build/features/business/screens/BusinessType/Switch.js +35 -0
- package/build/features/business/screens/BusinessType/index.d.ts +3 -0
- package/build/features/business/screens/BusinessType/index.js +2 -0
- package/build/features/business/screens/BusinessType/validation.d.ts +15 -0
- package/build/features/business/screens/BusinessType/validation.js +14 -0
- package/build/features/business/screens/Confirm/Confirm.d.ts +5 -0
- package/build/features/business/screens/Confirm/Confirm.js +53 -0
- package/build/features/business/screens/Confirm/index.d.ts +3 -0
- package/build/features/business/screens/Confirm/index.js +2 -0
- package/build/features/business/screens/Customers/CustomerLocations.d.ts +92 -0
- package/build/features/business/screens/Customers/CustomerLocations.js +122 -0
- package/build/features/business/screens/Customers/Customers.d.ts +5 -0
- package/build/features/business/screens/Customers/Customers.js +92 -0
- package/build/features/business/screens/Customers/ExpectedCustomers.d.ts +7 -0
- package/build/features/business/screens/Customers/ExpectedCustomers.js +78 -0
- package/build/features/business/screens/Customers/ExpectedSalesRange.d.ts +7 -0
- package/build/features/business/screens/Customers/ExpectedSalesRange.js +74 -0
- package/build/features/business/screens/Customers/RefundPolicy.d.ts +44 -0
- package/build/features/business/screens/Customers/RefundPolicy.js +86 -0
- package/build/features/business/screens/Customers/TransactionPolicy.d.ts +3 -0
- package/build/features/business/screens/Customers/TransactionPolicy.js +37 -0
- package/build/features/business/screens/Customers/index.d.ts +3 -0
- package/build/features/business/screens/Customers/index.js +2 -0
- package/build/features/business/screens/Customers/validation.d.ts +20 -0
- package/build/features/business/screens/Customers/validation.js +8 -0
- package/build/features/business/screens/IDBOD/DOB.js +8 -8
- package/build/features/business/screens/IDBOD/ID.js +8 -7
- package/build/features/business/screens/IDBOD/IDBOD.js +5 -6
- package/build/features/business/screens/OTP/OTP.d.ts +11 -0
- package/build/features/business/screens/OTP/OTP.js +112 -0
- package/build/features/business/screens/OTP/OTPInput.d.ts +5 -0
- package/build/features/business/screens/OTP/OTPInput.js +51 -0
- package/build/features/{connect → business}/screens/OTP/OTPTimer.d.ts +0 -0
- package/build/features/business/screens/OTP/OTPTimer.js +20 -0
- package/build/features/business/screens/OTP/index.d.ts +3 -0
- package/build/features/business/screens/OTP/index.js +2 -0
- package/build/features/business/screens/OTP/validation.d.ts +8 -0
- package/build/features/business/screens/OTP/validation.js +4 -0
- package/build/features/business/screens/Success/Success.d.ts +5 -0
- package/build/features/business/screens/Success/Success.js +15 -0
- package/build/features/business/screens/Success/index.d.ts +3 -0
- package/build/features/business/screens/Success/index.js +2 -0
- package/build/features/business/screens/VerifyNumber/OTPInput.d.ts +6 -0
- package/build/features/business/screens/VerifyNumber/OTPInput.js +68 -0
- package/build/features/business/screens/VerifyNumber/OTPTimer.d.ts +5 -0
- package/build/features/business/screens/VerifyNumber/OTPTimer.js +20 -0
- package/build/features/business/screens/VerifyNumber/VerifyNumber.d.ts +13 -0
- package/build/features/business/screens/VerifyNumber/VerifyNumber.js +119 -0
- package/build/features/business/screens/VerifyNumber/index.d.ts +3 -0
- package/build/features/business/screens/VerifyNumber/index.js +2 -0
- package/build/features/business/screens/VerifyNumber/validation.d.ts +8 -0
- package/build/features/business/screens/VerifyNumber/validation.js +4 -0
- package/build/features/connect/Connect.js +6 -18
- package/build/features/connect/screens/Individual/Email.d.ts +1 -1
- package/build/features/connect/screens/Individual/Email.js +6 -31
- package/build/features/connect/screens/Individual/Individual.js +7 -16
- package/build/features/connect/screens/Individual/Name.d.ts +1 -1
- package/build/features/connect/screens/Individual/Name.js +7 -34
- package/build/features/connect/screens/MID/BusinessCountry.js +5 -40
- package/build/features/connect/screens/MID/IDNumber.js +13 -28
- package/build/features/connect/screens/MID/MID.js +6 -43
- package/build/features/connect/screens/MID/MobileNumber.js +22 -41
- package/build/features/connect/screens/Merchant/BrandName.js +5 -31
- package/build/features/connect/screens/Merchant/Merchant.js +6 -50
- package/build/features/connect/screens/Merchant/SocialMedia.js +3 -11
- package/build/features/connect/screens/Merchant/TAC.js +4 -13
- package/build/features/connect/screens/OTP/OTP.js +17 -61
- package/build/features/connect/screens/OTP/OTPInput.js +8 -21
- package/build/features/connect/screens/Password/Password.js +12 -49
- package/build/features/connect/screens/Password/PasswordInput.js +16 -51
- package/build/features/connect/screens/ThankYou/ThankYou.js +4 -65
- package/build/features/featuresScreens.d.ts +5 -0
- package/build/features/featuresScreens.js +78 -7
- package/build/features/owner/Owner.d.ts +6 -0
- package/build/features/owner/Owner.js +50 -0
- package/build/features/owner/index.d.ts +1 -0
- package/build/features/owner/index.js +1 -0
- package/build/features/owner/screens/ShowOwnerInfo/ShowOwnerInfo.d.ts +19 -0
- package/build/features/owner/screens/ShowOwnerInfo/ShowOwnerInfo.js +52 -0
- package/build/features/owner/screens/ShowOwnerInfo/index.d.ts +3 -0
- package/build/features/owner/screens/ShowOwnerInfo/index.js +2 -0
- package/build/features/owner/screens/ShowOwnerInfo/info.d.ts +7 -0
- package/build/features/owner/screens/ShowOwnerInfo/info.js +28 -0
- package/build/features/password/Password.d.ts +6 -0
- package/build/features/password/Password.js +50 -0
- package/build/features/password/index.d.ts +1 -0
- package/build/features/password/index.js +1 -0
- package/build/features/password/screens/CreatePassword/ConditionText.d.ts +7 -0
- package/build/features/password/screens/CreatePassword/ConditionText.js +23 -0
- package/build/features/password/screens/CreatePassword/ConfirmPassword.d.ts +5 -0
- package/build/features/password/screens/CreatePassword/ConfirmPassword.js +27 -0
- package/build/features/password/screens/CreatePassword/CreatePassword.d.ts +5 -0
- package/build/features/password/screens/CreatePassword/CreatePassword.js +51 -0
- package/build/features/password/screens/CreatePassword/Password.d.ts +5 -0
- package/build/features/password/screens/CreatePassword/Password.js +75 -0
- package/build/features/password/screens/CreatePassword/PasswordBar.d.ts +7 -0
- package/build/features/password/screens/CreatePassword/PasswordBar.js +29 -0
- package/build/features/password/screens/CreatePassword/index.d.ts +3 -0
- package/build/features/password/screens/CreatePassword/index.js +2 -0
- package/build/features/password/screens/CreatePassword/validation.d.ts +11 -0
- package/build/features/password/screens/CreatePassword/validation.js +8 -0
- package/build/features/shared/Button/Button.d.ts +8 -0
- package/build/features/shared/Button/Button.js +47 -0
- package/build/features/shared/Button/index.d.ts +2 -0
- package/build/features/shared/Button/index.js +2 -0
- package/build/features/shared/CheckIcon/CheckIcon.d.ts +2 -0
- package/build/features/shared/CheckIcon/CheckIcon.js +14 -0
- package/build/features/shared/CheckIcon/index.d.ts +2 -0
- package/build/features/shared/CheckIcon/index.js +2 -0
- package/build/features/shared/ClearIcon/ClearIcon.d.ts +6 -0
- package/build/features/shared/ClearIcon/ClearIcon.js +26 -0
- package/build/features/shared/ClearIcon/index.d.ts +2 -0
- package/build/features/shared/ClearIcon/index.js +2 -0
- package/build/features/shared/Containers/FeatureContainer.d.ts +4 -0
- package/build/features/shared/Containers/FeatureContainer.js +33 -0
- package/build/features/shared/Containers/ScreenContainer.d.ts +4 -0
- package/build/features/shared/Containers/ScreenContainer.js +28 -0
- package/build/features/shared/Containers/index.d.ts +3 -0
- package/build/features/shared/Containers/index.js +3 -0
- package/build/features/shared/ExpandIcon/ExpandIcon.d.ts +7 -0
- package/build/features/shared/ExpandIcon/ExpandIcon.js +24 -0
- package/build/features/shared/ExpandIcon/index.d.ts +2 -0
- package/build/features/shared/ExpandIcon/index.js +2 -0
- package/build/features/shared/Footer/Footer.d.ts +2 -0
- package/build/features/shared/Footer/Footer.js +16 -0
- package/build/features/shared/Footer/index.d.ts +2 -0
- package/build/features/shared/Footer/index.js +2 -0
- package/build/features/shared/Input/Input.d.ts +27 -0
- package/build/features/shared/Input/Input.js +59 -0
- package/build/features/shared/Input/index.d.ts +2 -0
- package/build/features/shared/Input/index.js +2 -0
- package/build/features/shared/OTP/OTP.d.ts +9 -0
- package/build/features/shared/OTP/OTP.js +85 -0
- package/build/features/shared/OTP/index.d.ts +2 -0
- package/build/features/shared/OTP/index.js +2 -0
- package/build/features/shared/PasswordIcon/PasswordIcon.d.ts +8 -0
- package/build/features/shared/PasswordIcon/PasswordIcon.js +37 -0
- package/build/features/shared/PasswordIcon/index.d.ts +2 -0
- package/build/features/shared/PasswordIcon/index.js +2 -0
- package/build/features/shared/SuccessScreen/SuccessScreen.d.ts +7 -0
- package/build/features/shared/SuccessScreen/SuccessScreen.js +54 -0
- package/build/features/shared/SuccessScreen/index.d.ts +2 -0
- package/build/features/shared/SuccessScreen/index.js +2 -0
- package/build/features/tax/Tax.d.ts +6 -0
- package/build/features/tax/Tax.js +50 -0
- package/build/features/tax/index.d.ts +1 -0
- package/build/features/tax/index.js +1 -0
- package/build/features/tax/screens/TaxDetails/TaxDetails.d.ts +5 -0
- package/build/features/tax/screens/TaxDetails/TaxDetails.js +45 -0
- package/build/features/tax/screens/TaxDetails/VATId.d.ts +3 -0
- package/build/features/tax/screens/TaxDetails/VATId.js +27 -0
- package/build/features/tax/screens/TaxDetails/index.d.ts +3 -0
- package/build/features/tax/screens/TaxDetails/index.js +2 -0
- package/build/features/tax/screens/TaxDetails/validation.d.ts +8 -0
- package/build/features/tax/screens/TaxDetails/validation.js +4 -0
- package/build/hooks/index.d.ts +1 -0
- package/build/hooks/index.js +1 -0
- package/build/hooks/useContainerDimensions.d.ts +4 -0
- package/build/hooks/useContainerDimensions.js +21 -0
- package/build/index.css +1 -1
- package/build/index.d.ts +7 -2
- package/build/index.js +17 -2
- package/build/theme/palette.js +10 -4
- package/build/theme/typography.js +2 -2
- package/build/utils/array.d.ts +3 -1
- package/build/utils/array.js +7 -3
- package/build/utils/string.d.ts +2 -0
- package/build/utils/string.js +11 -0
- package/build/utils/validation.d.ts +6 -0
- package/build/utils/validation.js +19 -1
- package/package.json +1 -1
- package/build/features/connect/Footer.d.ts +0 -4
- package/build/features/connect/Footer.js +0 -16
- package/build/features/connect/screens/OTP/OTPTimer.js +0 -35
package/build/constants/app.js
CHANGED
|
@@ -4,7 +4,11 @@ export var LOCAL_STORAGE_KEYS = {
|
|
|
4
4
|
};
|
|
5
5
|
export var EXTERNAL_LINKS = {
|
|
6
6
|
TOS_EN: 'https://www.tap.company/sa/en/terms-conditions',
|
|
7
|
-
TOS_AR: 'https://www.tap.company/sa/ar/terms-conditions'
|
|
7
|
+
TOS_AR: 'https://www.tap.company/sa/ar/terms-conditions',
|
|
8
|
+
REFUND_EN: 'https://www.tap.company/sa/en/terms-conditions',
|
|
9
|
+
REFUND_AR: 'https://www.tap.company/sa/ar/terms-conditions',
|
|
10
|
+
TRANSACTION_EN: 'https://www.tap.company/sa/en/terms-conditions',
|
|
11
|
+
TRANSACTION_AR: 'https://www.tap.company/sa/ar/terms-conditions'
|
|
8
12
|
};
|
|
9
13
|
export var CONNECT_SCREENS_NAVIGATION = [
|
|
10
14
|
{
|
|
@@ -15,7 +19,7 @@ export var CONNECT_SCREENS_NAVIGATION = [
|
|
|
15
19
|
},
|
|
16
20
|
{
|
|
17
21
|
name: 'CONNECT_OTP_STEP',
|
|
18
|
-
next: 'CONNECT_INDIVIDUAL_STEP',
|
|
22
|
+
next: ['CONNECT_INDIVIDUAL_STEP', 'CONNECT_PASSWORD_STEP'],
|
|
19
23
|
prev: 'CONNECT_MID_STEP',
|
|
20
24
|
order: 2
|
|
21
25
|
},
|
|
@@ -25,6 +29,12 @@ export var CONNECT_SCREENS_NAVIGATION = [
|
|
|
25
29
|
prev: 'CONNECT_OTP_STEP',
|
|
26
30
|
order: 3
|
|
27
31
|
},
|
|
32
|
+
{
|
|
33
|
+
name: 'CONNECT_PASSWORD_STEP',
|
|
34
|
+
next: 'CONNECT_MERCHANT_INFO_STEP',
|
|
35
|
+
prev: 'CONNECT_OTP_STEP',
|
|
36
|
+
order: 3
|
|
37
|
+
},
|
|
28
38
|
{
|
|
29
39
|
name: 'CONNECT_MERCHANT_INFO_STEP',
|
|
30
40
|
next: 'CONNECT_THANK_YOU_STEP',
|
|
@@ -38,3 +48,103 @@ export var CONNECT_SCREENS_NAVIGATION = [
|
|
|
38
48
|
order: 5
|
|
39
49
|
}
|
|
40
50
|
];
|
|
51
|
+
export var BUSINESS_SCREENS_NAVIGATION = [
|
|
52
|
+
{
|
|
53
|
+
name: 'BUSINESS_VERIFY_NUMBER_STEP',
|
|
54
|
+
next: ['BUSINESS_IDBOD_STEP', 'BUSINESS_BUSINESS_TYPE_STEP'],
|
|
55
|
+
prev: '',
|
|
56
|
+
order: 1
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: 'BUSINESS_IDBOD_STEP',
|
|
60
|
+
next: 'BUSINESS_OTP_STEP',
|
|
61
|
+
prev: 'BUSINESS_VERIFY_NUMBER_STEP',
|
|
62
|
+
order: 2
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
name: 'BUSINESS_OTP_STEP',
|
|
66
|
+
next: 'BUSINESS_BUSINESS_TYPE_STEP',
|
|
67
|
+
prev: 'BUSINESS_IDBOD_STEP',
|
|
68
|
+
order: 3
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
name: 'BUSINESS_BUSINESS_TYPE_STEP',
|
|
72
|
+
next: 'BUSINESS_CONFIRM_STEP',
|
|
73
|
+
prev: 'BUSINESS_OTP_STEP',
|
|
74
|
+
order: 2
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
name: 'BUSINESS_CONFIRM_STEP',
|
|
78
|
+
next: 'BUSINESS_ACTIVITIES_STEP',
|
|
79
|
+
prev: 'BUSINESS_BUSINESS_TYPE_STEP',
|
|
80
|
+
order: 3
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
name: 'BUSINESS_ACTIVITIES_STEP',
|
|
84
|
+
next: 'BUSINESS_CUSTOMERS_STEP',
|
|
85
|
+
prev: 'BUSINESS_BUSINESS_TYPE_STEP',
|
|
86
|
+
order: 4
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
name: 'BUSINESS_CUSTOMERS_STEP',
|
|
90
|
+
next: 'BUSINESS_SUCCESS_STEP',
|
|
91
|
+
prev: 'BUSINESS_ACTIVITIES_STEP',
|
|
92
|
+
order: 5
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
name: 'BUSINESS_SUCCESS_STEP',
|
|
96
|
+
next: '',
|
|
97
|
+
prev: 'BUSINESS_CUSTOMERS_STEP',
|
|
98
|
+
order: 6
|
|
99
|
+
}
|
|
100
|
+
];
|
|
101
|
+
export var OWNER_SCREENS_NAVIGATION = [
|
|
102
|
+
{
|
|
103
|
+
name: 'OWNER_SHOW_OWNER_INFO_STEP',
|
|
104
|
+
next: 'OWNER_ADDITIONAL_OWNER_INFO_STEP',
|
|
105
|
+
prev: '',
|
|
106
|
+
order: 1
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
name: 'OWNER_ADDITIONAL_OWNER_INFO_STEP',
|
|
110
|
+
next: '',
|
|
111
|
+
prev: 'OWNER_SHOW_OWNER_INFO_STEP',
|
|
112
|
+
order: 2
|
|
113
|
+
}
|
|
114
|
+
];
|
|
115
|
+
export var PASSWORD_SCREENS_NAVIGATION = [
|
|
116
|
+
{
|
|
117
|
+
name: 'PASSWORD_NEW_PASSWORD_STEP',
|
|
118
|
+
next: '',
|
|
119
|
+
prev: '',
|
|
120
|
+
order: 1
|
|
121
|
+
}
|
|
122
|
+
];
|
|
123
|
+
export var BANK_SCREENS_NAVIGATION = [
|
|
124
|
+
{
|
|
125
|
+
name: 'BANK_DETAILS_STEP',
|
|
126
|
+
next: 'BANK_DETAILS_SUCCESS_STEP',
|
|
127
|
+
prev: '',
|
|
128
|
+
order: 1
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
name: 'BANK_DETAILS_SUCCESS_STEP',
|
|
132
|
+
next: '',
|
|
133
|
+
prev: 'BANK_DETAILS_STEP',
|
|
134
|
+
order: 2
|
|
135
|
+
}
|
|
136
|
+
];
|
|
137
|
+
export var TAX_SCREENS_NAVIGATION = [
|
|
138
|
+
{
|
|
139
|
+
name: 'TAX_DETAILS_STEP',
|
|
140
|
+
next: 'TAX_DETAILS_SUCCESS_STEP',
|
|
141
|
+
prev: '',
|
|
142
|
+
order: 1
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
name: 'TAX_DETAILS_SUCCESS_STEP',
|
|
146
|
+
next: '',
|
|
147
|
+
prev: 'TAX_DETAILS_STEP',
|
|
148
|
+
order: 2
|
|
149
|
+
}
|
|
150
|
+
];
|
|
@@ -20,6 +20,10 @@ export declare const ICONS_NAMES: {
|
|
|
20
20
|
TWITTER_ICON: string;
|
|
21
21
|
TWITTER_ACTIVE_ICON: string;
|
|
22
22
|
INSTAGRAM_ICON: string;
|
|
23
|
+
FL_ICON: string;
|
|
24
|
+
FL_ACTIVE_ICON: string;
|
|
25
|
+
CR_ICON: string;
|
|
26
|
+
CR_ACTIVE_ICON: string;
|
|
23
27
|
INSTAGRAM_ACTIVE_ICON: string;
|
|
24
28
|
TAP_EN: string;
|
|
25
29
|
TAP_AR: string;
|
|
@@ -20,6 +20,10 @@ export var ICONS_NAMES = {
|
|
|
20
20
|
TWITTER_ICON: ICONS_FULL_PATH + '/twitter' + ICONS_EXTENSION,
|
|
21
21
|
TWITTER_ACTIVE_ICON: ICONS_FULL_PATH + '/twitter-active' + ICONS_EXTENSION,
|
|
22
22
|
INSTAGRAM_ICON: ICONS_FULL_PATH + '/Insta' + ICONS_EXTENSION,
|
|
23
|
+
FL_ICON: ICONS_FULL_PATH + '/fl' + ICONS_EXTENSION,
|
|
24
|
+
FL_ACTIVE_ICON: ICONS_FULL_PATH + '/fl_active' + ICONS_EXTENSION,
|
|
25
|
+
CR_ICON: ICONS_FULL_PATH + '/cr' + ICONS_EXTENSION,
|
|
26
|
+
CR_ACTIVE_ICON: ICONS_FULL_PATH + '/cr_active' + ICONS_EXTENSION,
|
|
23
27
|
INSTAGRAM_ACTIVE_ICON: ICONS_FULL_PATH + '/Insta-active' + ICONS_EXTENSION,
|
|
24
28
|
TAP_EN: 'https://tap-connecet.b-cdn.net/imgs/tapEN' + ICONS_EXTENSION,
|
|
25
29
|
TAP_AR: 'https://tap-connecet.b-cdn.net/imgs/tapAR' + ICONS_EXTENSION,
|
|
@@ -1,3 +1,34 @@
|
|
|
1
|
+
export declare const OTHER_FL_LICENSE: {
|
|
2
|
+
number: string;
|
|
3
|
+
status: string;
|
|
4
|
+
canceled_at: string;
|
|
5
|
+
license_specialities: {
|
|
6
|
+
speciality: {
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
name_en: string;
|
|
10
|
+
category: {
|
|
11
|
+
id: string;
|
|
12
|
+
name: string;
|
|
13
|
+
name_en: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
}[];
|
|
17
|
+
};
|
|
18
|
+
export declare const OTHER_CR_LICENSE: {
|
|
19
|
+
crName: string;
|
|
20
|
+
crNumber: string;
|
|
21
|
+
crEntityNumber: string;
|
|
22
|
+
isMain: string;
|
|
23
|
+
businessType: {
|
|
24
|
+
id: number;
|
|
25
|
+
name: string;
|
|
26
|
+
};
|
|
27
|
+
relation: {
|
|
28
|
+
id: number;
|
|
29
|
+
name: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
1
32
|
export declare const defaultCountry: {
|
|
2
33
|
created: number;
|
|
3
34
|
updated: number;
|
|
@@ -233,3 +264,75 @@ export declare const SOCIAL_MEDIA_LINKS: {
|
|
|
233
264
|
linkedin: string;
|
|
234
265
|
instagram: string;
|
|
235
266
|
};
|
|
267
|
+
export declare const CUSTOMER_LOCATIONS: {
|
|
268
|
+
id: number;
|
|
269
|
+
name: string;
|
|
270
|
+
nameAR: string;
|
|
271
|
+
}[];
|
|
272
|
+
export declare const EXPECTED_CUSTOMERS: {
|
|
273
|
+
id: number;
|
|
274
|
+
name: string;
|
|
275
|
+
nameAR: string;
|
|
276
|
+
}[];
|
|
277
|
+
export declare const EXPECTED_SALES_RANGE: {
|
|
278
|
+
id: number;
|
|
279
|
+
name: string;
|
|
280
|
+
nameAR: string;
|
|
281
|
+
}[];
|
|
282
|
+
export declare const FL_LIST: ({
|
|
283
|
+
number: string;
|
|
284
|
+
status: string;
|
|
285
|
+
license_specialities: {
|
|
286
|
+
speciality: {
|
|
287
|
+
id: string;
|
|
288
|
+
name: string;
|
|
289
|
+
name_en: string;
|
|
290
|
+
category: {
|
|
291
|
+
id: string;
|
|
292
|
+
name: string;
|
|
293
|
+
name_en: string;
|
|
294
|
+
};
|
|
295
|
+
};
|
|
296
|
+
}[];
|
|
297
|
+
canceled_at: string;
|
|
298
|
+
} | {
|
|
299
|
+
number: string;
|
|
300
|
+
status: string;
|
|
301
|
+
license_specialities: {
|
|
302
|
+
speciality: {
|
|
303
|
+
id: string;
|
|
304
|
+
name: string;
|
|
305
|
+
name_en: string;
|
|
306
|
+
category: {
|
|
307
|
+
id: string;
|
|
308
|
+
name: string;
|
|
309
|
+
name_en: string;
|
|
310
|
+
};
|
|
311
|
+
};
|
|
312
|
+
}[];
|
|
313
|
+
canceled_at?: undefined;
|
|
314
|
+
})[];
|
|
315
|
+
export declare const CR_LIST: {
|
|
316
|
+
crName: string;
|
|
317
|
+
crNumber: string;
|
|
318
|
+
crEntityNumber: string;
|
|
319
|
+
isMain: string;
|
|
320
|
+
businessType: {
|
|
321
|
+
id: number;
|
|
322
|
+
name: string;
|
|
323
|
+
};
|
|
324
|
+
relation: {
|
|
325
|
+
id: number;
|
|
326
|
+
name: string;
|
|
327
|
+
};
|
|
328
|
+
}[];
|
|
329
|
+
export declare const ACTIVITIES: {
|
|
330
|
+
id: number;
|
|
331
|
+
name: string;
|
|
332
|
+
nameEn: string;
|
|
333
|
+
}[];
|
|
334
|
+
export declare const SALES_CHANNELS: {
|
|
335
|
+
id: number;
|
|
336
|
+
nameEn: string;
|
|
337
|
+
name: string;
|
|
338
|
+
}[];
|
package/build/constants/dummy.js
CHANGED
|
@@ -1,3 +1,36 @@
|
|
|
1
|
+
export var OTHER_FL_LICENSE = {
|
|
2
|
+
number: 'other',
|
|
3
|
+
status: 'other',
|
|
4
|
+
canceled_at: '',
|
|
5
|
+
license_specialities: [
|
|
6
|
+
{
|
|
7
|
+
speciality: {
|
|
8
|
+
id: '',
|
|
9
|
+
name: 'other',
|
|
10
|
+
name_en: 'other',
|
|
11
|
+
category: {
|
|
12
|
+
id: '',
|
|
13
|
+
name: 'other',
|
|
14
|
+
name_en: 'other'
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
};
|
|
20
|
+
export var OTHER_CR_LICENSE = {
|
|
21
|
+
crName: 'other',
|
|
22
|
+
crNumber: 'other',
|
|
23
|
+
crEntityNumber: 'other',
|
|
24
|
+
isMain: '',
|
|
25
|
+
businessType: {
|
|
26
|
+
id: 0,
|
|
27
|
+
name: ''
|
|
28
|
+
},
|
|
29
|
+
relation: {
|
|
30
|
+
id: 0,
|
|
31
|
+
name: ''
|
|
32
|
+
}
|
|
33
|
+
};
|
|
1
34
|
export var defaultCountry = {
|
|
2
35
|
created: 1577690965000,
|
|
3
36
|
updated: 1577691209000,
|
|
@@ -6205,3 +6238,189 @@ export var SOCIAL_MEDIA_LINKS = {
|
|
|
6205
6238
|
linkedin: 'https://www.linkedin.com/company/tappayments/mycompany/',
|
|
6206
6239
|
instagram: 'https://www.instagram.com/tappayments/'
|
|
6207
6240
|
};
|
|
6241
|
+
export var CUSTOMER_LOCATIONS = [
|
|
6242
|
+
{ id: 1, name: 'Local', nameAR: 'محلي' },
|
|
6243
|
+
{ id: 2, name: 'Regional', nameAR: 'إقليمي' },
|
|
6244
|
+
{ id: 3, name: 'Global', nameAR: 'عالمي' }
|
|
6245
|
+
];
|
|
6246
|
+
export var EXPECTED_CUSTOMERS = [
|
|
6247
|
+
{ id: 1, name: '0 customers', nameAR: '0 عميل' },
|
|
6248
|
+
{ id: 2, name: '1,000 customers', nameAR: '1,000 عميل' },
|
|
6249
|
+
{ id: 3, name: '5,000 customers', nameAR: '5,000 عميل' },
|
|
6250
|
+
{ id: 4, name: '10,000 customers', nameAR: '10,000 عميل' },
|
|
6251
|
+
{ id: 5, name: '50,000 customers', nameAR: '50,000 عميل' },
|
|
6252
|
+
{ id: 6, name: '100,000 customers', nameAR: '100,000 عميل' },
|
|
6253
|
+
{ id: 7, name: 'more than 200,000 customers', nameAR: 'اكثر من 200,000 عميل' }
|
|
6254
|
+
];
|
|
6255
|
+
export var EXPECTED_SALES_RANGE = [
|
|
6256
|
+
{ id: 1, name: '0-500,000', nameAR: '0 إلى 500 الف' },
|
|
6257
|
+
{ id: 2, name: '500,001-3M', nameAR: '500 ألف إلى 3 مليون' },
|
|
6258
|
+
{ id: 3, name: '3M – 6M', nameAR: '3 مليون إلى 6 مليون' },
|
|
6259
|
+
{ id: 4, name: '6M - 15M', nameAR: '6 مليون إلى 15 مليون' },
|
|
6260
|
+
{ id: 5, name: '15 M- 40M', nameAR: '15 مليون إلى 40 مليون' },
|
|
6261
|
+
{ id: 6, name: '40M – 200M', nameAR: '40 مليون إلى 200 مليون' },
|
|
6262
|
+
{ id: 7, name: 'higher than 200M', nameAR: ' اكثر من 200 مليون' }
|
|
6263
|
+
];
|
|
6264
|
+
export var FL_LIST = [
|
|
6265
|
+
{
|
|
6266
|
+
number: '14d26e62',
|
|
6267
|
+
status: 'canceled',
|
|
6268
|
+
license_specialities: [
|
|
6269
|
+
{
|
|
6270
|
+
speciality: {
|
|
6271
|
+
id: '71',
|
|
6272
|
+
name: 'برمجة وتطوير المواقع الالكترونية',
|
|
6273
|
+
name_en: 'Websites Programming and Developing',
|
|
6274
|
+
category: {
|
|
6275
|
+
id: '6',
|
|
6276
|
+
name: 'تطوير تطبيقات الجوال والويب',
|
|
6277
|
+
name_en: 'Web, Mobile & Software '
|
|
6278
|
+
}
|
|
6279
|
+
}
|
|
6280
|
+
}
|
|
6281
|
+
],
|
|
6282
|
+
canceled_at: '2021-09-02'
|
|
6283
|
+
},
|
|
6284
|
+
{
|
|
6285
|
+
number: '3dd7be74',
|
|
6286
|
+
status: 'rejected',
|
|
6287
|
+
license_specialities: [
|
|
6288
|
+
{
|
|
6289
|
+
speciality: {
|
|
6290
|
+
id: '71',
|
|
6291
|
+
name: 'برمجة وتطوير المواقع الالكترونية',
|
|
6292
|
+
name_en: 'Websites Programming and Developing',
|
|
6293
|
+
category: {
|
|
6294
|
+
id: '6',
|
|
6295
|
+
name: 'تطوير تطبيقات الجوال والويب',
|
|
6296
|
+
name_en: 'Web, Mobile & Software '
|
|
6297
|
+
}
|
|
6298
|
+
}
|
|
6299
|
+
}
|
|
6300
|
+
]
|
|
6301
|
+
},
|
|
6302
|
+
{
|
|
6303
|
+
number: '3dd7be44',
|
|
6304
|
+
status: 'rejected',
|
|
6305
|
+
license_specialities: [
|
|
6306
|
+
{
|
|
6307
|
+
speciality: {
|
|
6308
|
+
id: '71',
|
|
6309
|
+
name: 'برمجة وتطوير المواقع الالكترونية',
|
|
6310
|
+
name_en: 'Programming and Developing',
|
|
6311
|
+
category: {
|
|
6312
|
+
id: '6',
|
|
6313
|
+
name: 'تطوير تطبيقات الجوال والويب',
|
|
6314
|
+
name_en: 'Web, Mobile & Software '
|
|
6315
|
+
}
|
|
6316
|
+
}
|
|
6317
|
+
}
|
|
6318
|
+
]
|
|
6319
|
+
}
|
|
6320
|
+
];
|
|
6321
|
+
export var CR_LIST = [
|
|
6322
|
+
{
|
|
6323
|
+
crName: 'مؤسسة ناصر محمد عبدالرحمن السالم للتجارة',
|
|
6324
|
+
crNumber: '1010651287',
|
|
6325
|
+
crEntityNumber: '7017825428',
|
|
6326
|
+
isMain: 'true',
|
|
6327
|
+
businessType: {
|
|
6328
|
+
id: 101,
|
|
6329
|
+
name: 'مؤســـسة فـــردية'
|
|
6330
|
+
},
|
|
6331
|
+
relation: {
|
|
6332
|
+
id: 1,
|
|
6333
|
+
name: 'مالك المؤسسة'
|
|
6334
|
+
}
|
|
6335
|
+
},
|
|
6336
|
+
{
|
|
6337
|
+
crName: 'مؤسسة ناصر محمد عبدالرحمن السالم للتجارة',
|
|
6338
|
+
crNumber: '2010651287',
|
|
6339
|
+
crEntityNumber: '7017825428',
|
|
6340
|
+
isMain: 'true',
|
|
6341
|
+
businessType: {
|
|
6342
|
+
id: 101,
|
|
6343
|
+
name: 'مؤســـسة فـــردية'
|
|
6344
|
+
},
|
|
6345
|
+
relation: {
|
|
6346
|
+
id: 1,
|
|
6347
|
+
name: 'مالك المؤسسة'
|
|
6348
|
+
}
|
|
6349
|
+
},
|
|
6350
|
+
{
|
|
6351
|
+
crName: 'مؤسسة ناصر محمد عبدالرحمن السالم للتجارة',
|
|
6352
|
+
crNumber: '3010651287',
|
|
6353
|
+
crEntityNumber: '7017825428',
|
|
6354
|
+
isMain: 'true',
|
|
6355
|
+
businessType: {
|
|
6356
|
+
id: 101,
|
|
6357
|
+
name: 'مؤســـسة فـــردية'
|
|
6358
|
+
},
|
|
6359
|
+
relation: {
|
|
6360
|
+
id: 1,
|
|
6361
|
+
name: 'مالك المؤسسة'
|
|
6362
|
+
}
|
|
6363
|
+
},
|
|
6364
|
+
{
|
|
6365
|
+
crName: 'مؤسسة ناصر محمد عبدالرحمن السالم للتجارة',
|
|
6366
|
+
crNumber: '1010551287',
|
|
6367
|
+
crEntityNumber: '7017825428',
|
|
6368
|
+
isMain: 'true',
|
|
6369
|
+
businessType: {
|
|
6370
|
+
id: 101,
|
|
6371
|
+
name: 'مؤســـسة فـــردية'
|
|
6372
|
+
},
|
|
6373
|
+
relation: {
|
|
6374
|
+
id: 1,
|
|
6375
|
+
name: 'مالك المؤسسة'
|
|
6376
|
+
}
|
|
6377
|
+
},
|
|
6378
|
+
{
|
|
6379
|
+
crName: 'مؤسسة ناصر محمد عبدالرحمن السالم للتجارة',
|
|
6380
|
+
crNumber: '3010631287',
|
|
6381
|
+
crEntityNumber: '7017825428',
|
|
6382
|
+
isMain: 'true',
|
|
6383
|
+
businessType: {
|
|
6384
|
+
id: 101,
|
|
6385
|
+
name: 'مؤســـسة فـــردية'
|
|
6386
|
+
},
|
|
6387
|
+
relation: {
|
|
6388
|
+
id: 1,
|
|
6389
|
+
name: 'مالك المؤسسة'
|
|
6390
|
+
}
|
|
6391
|
+
}
|
|
6392
|
+
];
|
|
6393
|
+
export var ACTIVITIES = [
|
|
6394
|
+
{
|
|
6395
|
+
id: 477222,
|
|
6396
|
+
name: 'نشاط 1',
|
|
6397
|
+
nameEn: 'Repair and maintenance of motorways, streets, roads, other vehicular and pedestrian ways'
|
|
6398
|
+
},
|
|
6399
|
+
{
|
|
6400
|
+
id: 477223,
|
|
6401
|
+
name: 'نشاط 2',
|
|
6402
|
+
nameEn: 'Repair and maintenance of water distribution stations, networks and main lines'
|
|
6403
|
+
},
|
|
6404
|
+
{
|
|
6405
|
+
id: 477224,
|
|
6406
|
+
name: 'نشاط 3',
|
|
6407
|
+
nameEn: 'Repair and maintenance of sewer systems, sewage disposal plants and pumping station'
|
|
6408
|
+
},
|
|
6409
|
+
{
|
|
6410
|
+
id: 477225,
|
|
6411
|
+
name: 'نشاط 3',
|
|
6412
|
+
nameEn: 'Repair and maintenance of power plants'
|
|
6413
|
+
},
|
|
6414
|
+
{
|
|
6415
|
+
id: 477226,
|
|
6416
|
+
name: 'نشاط 3',
|
|
6417
|
+
nameEn: 'Demolition or wrecking of buildings and other structures'
|
|
6418
|
+
}
|
|
6419
|
+
];
|
|
6420
|
+
export var SALES_CHANNELS = [
|
|
6421
|
+
{ id: 1, nameEn: 'Website', name: 'موقع' },
|
|
6422
|
+
{ id: 2, nameEn: 'Mobile app', name: 'تطبيق' },
|
|
6423
|
+
{ id: 3, nameEn: 'Physical Store', name: 'متجر' },
|
|
6424
|
+
{ id: 4, nameEn: 'Social Media', name: 'مواقع تواصل اجتماعي' },
|
|
6425
|
+
{ id: 5, nameEn: 'Call Center', name: 'مركز اتصال' }
|
|
6426
|
+
];
|
|
@@ -1,2 +1,6 @@
|
|
|
1
1
|
export declare const ID_NUMBER_LENGTH = 10;
|
|
2
2
|
export declare const DEFAULT_TIMER_VALUE = 59;
|
|
3
|
+
export declare const VAT_ID_LENGTH = 15;
|
|
4
|
+
export declare const MAX_IBAN_VALUE = 34;
|
|
5
|
+
export declare const FL_NUMBER_LENGTH = 8;
|
|
6
|
+
export declare const CR_NUMBER_LENGTH = 10;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface BankLibProps {
|
|
3
|
+
}
|
|
4
|
+
export declare function BankLib(props: BankLibProps): JSX.Element;
|
|
5
|
+
export declare function renderBankLib(config: BankLibProps, elementId: string): void;
|
|
6
|
+
export declare function unmountBankLib(elementId: string): void;
|
|
@@ -0,0 +1,48 @@
|
|
|
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 } from "react/jsx-runtime";
|
|
13
|
+
import React, { memo, useEffect } from 'react';
|
|
14
|
+
import { useAppTheme, useAppDispatch, useAppSelector } from '../../hooks';
|
|
15
|
+
import { handleActiveFlowScreens, settingsSelector } from '../../app/settings';
|
|
16
|
+
import AnimationFlow from '../../components/AnimationFlow';
|
|
17
|
+
import { store } from '../../app/store';
|
|
18
|
+
import { ReduxProvider, ThemeProvider } from '../../components/Providers';
|
|
19
|
+
import Collapse from '../../components/Collapse';
|
|
20
|
+
import { reactElement } from '../../utils';
|
|
21
|
+
import { BANK_SCREENS_NAVIGATION } from '../../constants';
|
|
22
|
+
import { bankFeatureScreens } from '../featuresScreens';
|
|
23
|
+
import CustomFooter from '../shared/Footer';
|
|
24
|
+
import { FeatureContainer } from '../shared/Containers';
|
|
25
|
+
var Bank = memo(function (props) {
|
|
26
|
+
var open = React.useState(true)[0];
|
|
27
|
+
var theme = useAppTheme().theme;
|
|
28
|
+
var dispatch = useAppDispatch();
|
|
29
|
+
var data = useAppSelector(settingsSelector).data;
|
|
30
|
+
var activeScreen = data.activeScreen;
|
|
31
|
+
useEffect(function () {
|
|
32
|
+
dispatch(handleActiveFlowScreens(BANK_SCREENS_NAVIGATION));
|
|
33
|
+
}, []);
|
|
34
|
+
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(AnimationFlow, __assign({ open: open, breakpoint: 'sm', footer: _jsx(CustomFooter, {}) }, { children: _jsx(FeatureContainer, { children: bankFeatureScreens.map(function (_a, index) {
|
|
35
|
+
var Element = _a.element, name = _a.name;
|
|
36
|
+
var isActive = activeScreen.name === name;
|
|
37
|
+
return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 600, exit: 400, appear: 600 } }, { children: _jsx(Element, {}) }), index));
|
|
38
|
+
}) }) })) })));
|
|
39
|
+
});
|
|
40
|
+
export function BankLib(props) {
|
|
41
|
+
return (_jsx(ReduxProvider, __assign({ store: store }, { children: _jsx(Bank, __assign({}, props)) })));
|
|
42
|
+
}
|
|
43
|
+
export function renderBankLib(config, elementId) {
|
|
44
|
+
reactElement(elementId).render(_jsx(BankLib, __assign({}, config)));
|
|
45
|
+
}
|
|
46
|
+
export function unmountBankLib(elementId) {
|
|
47
|
+
reactElement(elementId).unmount();
|
|
48
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Bank';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Bank';
|
|
@@ -0,0 +1,57 @@
|
|
|
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 { ScreenContainer } from '../../../shared/Containers';
|
|
14
|
+
import Beneficiary from './Beneficiary';
|
|
15
|
+
import IBAN from './IBAN';
|
|
16
|
+
import BankName from './BankName';
|
|
17
|
+
import Button from '../../../shared/Button';
|
|
18
|
+
import { useAppDispatch } from '../../../../hooks';
|
|
19
|
+
import { handleNextScreenStep } from '../../../../app/settings';
|
|
20
|
+
import { BankValidation } from './validation';
|
|
21
|
+
import { useTranslation } from 'react-i18next';
|
|
22
|
+
import { useForm, FormProvider } from 'react-hook-form';
|
|
23
|
+
import { yupResolver } from '@hookform/resolvers/yup';
|
|
24
|
+
import { useLanguage } from '../../../../hooks';
|
|
25
|
+
import { styled } from '@mui/material/styles';
|
|
26
|
+
import Form from '../../../../components/Form';
|
|
27
|
+
var FormStyled = styled(Form)(function () { return ({
|
|
28
|
+
display: 'flex',
|
|
29
|
+
flexDirection: 'column',
|
|
30
|
+
overflow: 'hidden'
|
|
31
|
+
}); });
|
|
32
|
+
var ButtonStyled = styled(Button)(function (_a) {
|
|
33
|
+
var theme = _a.theme;
|
|
34
|
+
return ({
|
|
35
|
+
marginBlockStart: theme.spacing(1)
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
var BankDetails = function () {
|
|
39
|
+
var dispatch = useAppDispatch();
|
|
40
|
+
var methods = useForm({
|
|
41
|
+
resolver: yupResolver(BankValidation),
|
|
42
|
+
defaultValues: {
|
|
43
|
+
iban: '',
|
|
44
|
+
beneficiaryName: '',
|
|
45
|
+
bankName: 'National Bank'
|
|
46
|
+
},
|
|
47
|
+
mode: 'onChange'
|
|
48
|
+
});
|
|
49
|
+
var onSubmit = function (data) {
|
|
50
|
+
console.log('data', data);
|
|
51
|
+
dispatch(handleNextScreenStep());
|
|
52
|
+
};
|
|
53
|
+
var t = useTranslation().t;
|
|
54
|
+
var isAr = useLanguage().isAr;
|
|
55
|
+
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(IBAN, {}), _jsx(Beneficiary, {}), _jsx(BankName, {}), _jsx(ButtonStyled, __assign({ disabled: !methods.formState.isValid, isAr: isAr }, { children: t('confirm') }))] })) })) }));
|
|
56
|
+
};
|
|
57
|
+
export default BankDetails;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { ScreenContainer } from '../../../shared/Containers';
|
|
3
|
+
import Input from '../../../shared/Input';
|
|
4
|
+
import { useTranslation } from 'react-i18next';
|
|
5
|
+
import { useController, useFormContext } from 'react-hook-form';
|
|
6
|
+
import { styled } from '@mui/material/styles';
|
|
7
|
+
import ClearIcon from '../../../shared/ClearIcon';
|
|
8
|
+
import CheckIcon from '../../../shared/CheckIcon';
|
|
9
|
+
var FeatureStyled = styled(ScreenContainer)(function (_a) {
|
|
10
|
+
var theme = _a.theme;
|
|
11
|
+
return ({
|
|
12
|
+
marginBlockEnd: theme.spacing(3)
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
var BankName = function () {
|
|
16
|
+
var _a;
|
|
17
|
+
var t = useTranslation().t;
|
|
18
|
+
var control = useFormContext().control;
|
|
19
|
+
var bankNameControl = useController({ name: 'bankName', control: control });
|
|
20
|
+
var bankNameValue = bankNameControl.field.value;
|
|
21
|
+
var hasError = !!((_a = bankNameControl.fieldState.error) === null || _a === void 0 ? void 0 : _a.message);
|
|
22
|
+
var clearValue = function () {
|
|
23
|
+
bankNameControl.field.onChange('');
|
|
24
|
+
};
|
|
25
|
+
return (_jsx(FeatureStyled, { children: _jsx(Input, { label: t('bank_name_label'), placeholder: t('bank_name_label'), value: bankNameValue, required: true, endAdornment: !hasError && bankNameValue ? _jsx(CheckIcon, {}) : bankNameValue && _jsx(ClearIcon, { onClick: clearValue }) }) }));
|
|
26
|
+
};
|
|
27
|
+
export default BankName;
|