@tap-payments/auth-jsconnect 1.0.90-test → 1.0.94-test
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +58 -52
- package/build/@types/app.d.ts +9 -0
- package/build/@types/app.js +9 -0
- package/build/@types/form.d.ts +2 -0
- package/build/api/account.js +1 -1
- package/build/api/auth.js +1 -1
- package/build/api/availabilityServices.js +1 -1
- package/build/api/axios.d.ts +2 -0
- package/build/api/axios.js +4 -2
- package/build/api/country.js +1 -1
- package/build/api/data.js +1 -1
- package/build/api/entity.js +1 -1
- package/build/api/firebase.js +1 -1
- package/build/api/individual.js +1 -1
- package/build/api/ip.js +1 -1
- package/build/api/lead.js +1 -1
- package/build/api/operator.js +1 -1
- package/build/app/rootReducer.d.ts +6 -7
- package/build/app/rootReducer.js +7 -9
- package/build/app/settings.d.ts +9 -3
- package/build/app/settings.js +42 -6
- package/build/app/store.d.ts +0 -2
- package/build/components/AnimationFlow/BottomSheet.js +1 -1
- package/build/components/AnimationFlow/Dialog.js +2 -2
- package/build/components/AnimationFlow/Loader.js +1 -1
- package/build/components/DatePicker/DatePicker.js +3 -3
- package/build/components/DatePicker/customStyle.css +86 -0
- package/build/components/Footer/Footer.d.ts +0 -2
- package/build/components/Footer/Footer.js +3 -4
- package/build/components/Input/Input.js +2 -2
- package/build/components/OTPTimer/OTPTimer.js +1 -1
- package/build/components/Providers/ThemeProvider.d.ts +1 -1
- package/build/components/SimpleList/SimpleList.js +1 -1
- package/build/components/SocialMediaGroup/SocialMediaGroup.d.ts +1 -1
- package/build/components/SocialMediaGroup/SocialMediaGroup.js +2 -2
- package/build/constants/app.d.ts +1 -2
- package/build/constants/app.js +1 -9
- package/build/features/app/bank/bankStore.d.ts +6 -2
- package/build/features/app/bank/bankStore.js +42 -5
- package/build/features/app/business/businessStore.d.ts +8 -10
- package/build/features/app/business/businessStore.js +42 -44
- package/build/features/app/connect/connectStore.d.ts +3 -8
- package/build/features/app/connect/connectStore.js +27 -61
- package/build/features/app/individual/individualStore.d.ts +7 -8
- package/build/features/app/individual/individualStore.js +53 -48
- package/build/features/app/password/passwordStore.d.ts +6 -2
- package/build/features/app/password/passwordStore.js +41 -5
- package/build/features/app/tax/taxStore.d.ts +6 -2
- package/build/features/app/tax/taxStore.js +43 -6
- package/build/features/bank/Bank.d.ts +1 -1
- package/build/features/bank/Bank.js +13 -12
- package/build/features/bank/screens/BankDetails/BankDetails.js +10 -9
- package/build/features/bank/screens/BankDetails/BankName.js +8 -8
- package/build/features/bank/screens/BankDetails/Beneficiary.js +7 -7
- package/build/features/bank/screens/BankDetails/ConfirmPolicy.d.ts +3 -0
- package/build/features/bank/screens/BankDetails/ConfirmPolicy.js +67 -0
- package/build/features/bank/screens/BankDetails/IBAN.js +8 -8
- package/build/features/bank/screens/BankDetails/validation.d.ts +3 -0
- package/build/features/bank/screens/BankDetails/validation.js +3 -2
- package/build/features/bank/screens/Success/Success.js +3 -3
- package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +10 -10
- package/build/features/bank/screens/Verify/OTPInput.d.ts +3 -1
- package/build/features/bank/screens/Verify/OTPInput.js +8 -3
- package/build/features/bank/screens/Verify/Verify.js +12 -11
- package/build/features/business/Business.d.ts +1 -1
- package/build/features/business/Business.js +13 -15
- package/build/features/business/screens/Activities/Activities.js +7 -7
- package/build/features/business/screens/Activities/ActivitiesList.d.ts +1 -1
- package/build/features/business/screens/Activities/ActivitiesList.js +9 -9
- package/build/features/business/screens/Activities/OperationStartDate.js +2 -2
- package/build/features/business/screens/Activities/SalesChannels.d.ts +1 -1
- package/build/features/business/screens/Activities/SalesChannels.js +7 -7
- package/build/features/business/screens/BusinessType/BusinessType.js +8 -8
- package/build/features/business/screens/BusinessType/LicenseList.js +10 -10
- package/build/features/business/screens/BusinessType/LicenseNumber.js +8 -8
- package/build/features/business/screens/BusinessType/SelectType.js +6 -6
- package/build/features/business/screens/BusinessType/validation.js +2 -2
- package/build/features/business/screens/Customers/CustomerLocations.d.ts +1 -1
- package/build/features/business/screens/Customers/CustomerLocations.js +8 -8
- package/build/features/business/screens/Customers/Customers.js +8 -8
- package/build/features/business/screens/Customers/ExpectedCustomers.js +6 -6
- package/build/features/business/screens/Customers/ExpectedSalesRange.js +7 -7
- package/build/features/business/screens/Customers/RefundPolicy.d.ts +2 -2
- package/build/features/business/screens/Customers/RefundPolicy.js +7 -7
- package/build/features/business/screens/Customers/TransactionPolicy.js +5 -5
- package/build/features/business/screens/IDBOD/DOB.js +5 -5
- package/build/features/business/screens/IDBOD/ID.js +6 -6
- package/build/features/business/screens/IDBOD/IDBOD.js +6 -6
- package/build/features/business/screens/OTP/OTP.js +9 -9
- package/build/features/business/screens/OTP/OTPInput.js +4 -4
- package/build/features/business/screens/Success/Success.js +3 -3
- package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +10 -9
- package/build/features/business/screens/Verify/OTPInput.d.ts +3 -1
- package/build/features/business/screens/Verify/OTPInput.js +8 -3
- package/build/features/business/screens/Verify/Verify.js +12 -11
- package/build/features/connect/Connect.d.ts +1 -1
- package/build/features/connect/Connect.js +14 -16
- package/build/features/connect/screens/Individual/Email.js +7 -7
- package/build/features/connect/screens/Individual/Individual.js +9 -9
- package/build/features/connect/screens/Individual/MobileNumber.d.ts +1 -1
- package/build/features/connect/screens/Individual/MobileNumber.js +11 -11
- package/build/features/connect/screens/Individual/Name.js +6 -6
- package/build/features/connect/screens/Individual/validation.js +1 -1
- package/build/features/connect/screens/Merchant/BrandList.d.ts +1 -1
- package/build/features/connect/screens/Merchant/BrandList.js +8 -8
- package/build/features/connect/screens/Merchant/BrandName.js +12 -11
- package/build/features/connect/screens/Merchant/Merchant.js +7 -7
- package/build/features/connect/screens/Merchant/SocialMedia.js +9 -9
- package/build/features/connect/screens/Merchant/TAC.js +7 -7
- package/build/features/connect/screens/Merchant/validation.js +1 -1
- package/build/features/connect/screens/Mobile/Mobile.js +10 -10
- package/build/features/connect/screens/Mobile/MobileNumber.d.ts +1 -1
- package/build/features/connect/screens/Mobile/MobileNumber.js +12 -12
- package/build/features/connect/screens/Mobile/Title.js +2 -2
- package/build/features/connect/screens/NID/DOB.js +5 -5
- package/build/features/connect/screens/NID/IDNumber.js +8 -8
- package/build/features/connect/screens/NID/NID.js +9 -9
- package/build/features/connect/screens/OTP/OTP.js +9 -9
- package/build/features/connect/screens/OTP/OTPInput.js +4 -4
- package/build/features/connect/screens/ThankYou/ThankYou.js +3 -3
- package/build/features/featuresScreens.d.ts +1 -2
- package/build/features/featuresScreens.js +30 -37
- package/build/features/individual/Individual.d.ts +1 -1
- package/build/features/individual/Individual.js +13 -15
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +11 -9
- package/build/features/individual/screens/AdditionalIndividualInfo/EmployerLocation.d.ts +1 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/EmployerLocation.js +8 -8
- package/build/features/individual/screens/AdditionalIndividualInfo/EmployerName.js +6 -6
- package/build/features/individual/screens/AdditionalIndividualInfo/InfluencerSwitch.js +6 -6
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.d.ts +1 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +9 -9
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.js +6 -6
- package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.d.ts +1 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.js +8 -8
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.d.ts +1 -1
- package/build/features/individual/screens/ShowIndividualInfo/ShowOwnerInfo.js +6 -6
- package/build/features/individual/screens/ShowIndividualInfo/info.js +1 -1
- package/build/features/individual/screens/Success/Success.js +3 -3
- package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +10 -10
- package/build/features/individual/screens/Verify/OTPInput.d.ts +3 -1
- package/build/features/individual/screens/Verify/OTPInput.js +8 -3
- package/build/features/individual/screens/Verify/Verify.js +12 -11
- package/build/features/password/Password.d.ts +1 -1
- package/build/features/password/Password.js +13 -12
- package/build/features/password/screens/CreatePassword/ConditionText.js +1 -1
- package/build/features/password/screens/CreatePassword/ConfirmPassword.js +3 -3
- package/build/features/password/screens/CreatePassword/CreatePassword.js +7 -7
- package/build/features/password/screens/CreatePassword/Password.js +6 -6
- package/build/features/password/screens/Success/Success.js +3 -3
- package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +10 -10
- package/build/features/password/screens/Verify/OTPInput.d.ts +3 -1
- package/build/features/password/screens/Verify/OTPInput.js +8 -3
- package/build/features/password/screens/Verify/Verify.js +12 -11
- package/build/features/shared/AcceptancePayouts/AcceptancePayouts.js +4 -4
- package/build/features/shared/Background/Background.js +3 -2
- package/build/features/shared/Background/LogoBackground.d.ts +1 -4
- package/build/features/shared/Background/LogoBackground.js +8 -39
- package/build/features/shared/Button/AbsherButton.d.ts +2 -3
- package/build/features/shared/Button/AbsherButton.js +7 -12
- package/build/features/shared/Button/Button.d.ts +1 -1
- package/build/features/shared/Button/Button.js +7 -7
- package/build/features/shared/Button/EmailProvidersButtons.d.ts +1 -1
- package/build/features/shared/Button/EmailProvidersButtons.js +4 -3
- package/build/features/shared/Button/FlowsButtons.d.ts +5 -2
- package/build/features/shared/Button/FlowsButtons.js +14 -9
- package/build/features/shared/Button/MobileButton.d.ts +2 -3
- package/build/features/shared/Button/MobileButton.js +7 -12
- package/build/features/shared/Button/SuccessButton.js +1 -1
- package/build/features/shared/Footer/Footer.js +5 -6
- package/build/features/shared/Input/Input.d.ts +1 -1
- package/build/features/shared/Input/Input.js +2 -2
- package/build/features/shared/OTP/OTP.d.ts +3 -2
- package/build/features/shared/OTP/OTP.js +13 -5
- package/build/features/shared/Search/Search.js +1 -1
- package/build/features/shared/SearchIcon/SearchIcon.js +2 -2
- package/build/features/shared/SuccessScreen/SuccessScreen.js +5 -5
- package/build/features/tax/Tax.d.ts +1 -1
- package/build/features/tax/Tax.js +13 -12
- package/build/features/tax/screens/Success/Success.js +3 -3
- package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +10 -10
- package/build/features/tax/screens/TaxDetails/ConfirmPolicy.d.ts +3 -0
- package/build/features/tax/screens/TaxDetails/ConfirmPolicy.js +66 -0
- package/build/features/tax/screens/TaxDetails/TaxDetails.js +11 -8
- package/build/features/tax/screens/TaxDetails/VATId.js +18 -7
- package/build/features/tax/screens/TaxDetails/validation.d.ts +3 -0
- package/build/features/tax/screens/TaxDetails/validation.js +2 -1
- package/build/features/tax/screens/Verify/OTPInput.d.ts +3 -1
- package/build/features/tax/screens/Verify/OTPInput.js +8 -3
- package/build/features/tax/screens/Verify/Verify.js +12 -11
- package/build/hooks/index.d.ts +1 -0
- package/build/hooks/index.js +1 -0
- package/build/hooks/useAppConfig.d.ts +1 -1
- package/build/hooks/useAppConfig.js +7 -4
- package/build/hooks/useAppDispatch.d.ts +0 -1
- package/build/hooks/useAppSelector.d.ts +1 -1
- package/build/hooks/useAppTheme.d.ts +1 -1
- package/build/hooks/useAppTheme.js +3 -3
- package/build/hooks/useErrorListener.d.ts +1 -1
- package/build/hooks/useErrorListener.js +5 -7
- package/build/hooks/useLanguage.js +1 -1
- package/build/hooks/useRedirectionListener.js +1 -1
- package/build/hooks/useStepStartedListener.d.ts +1 -0
- package/build/hooks/useStepStartedListener.js +10 -0
- package/build/i18n.js +1 -1
- package/build/index.css +135 -0
- package/build/index.d.ts +8 -9
- package/build/index.js +8 -11
- package/build/theme/theme.d.ts +1 -1
- package/build/utils/locale.d.ts +1 -1
- package/build/utils/locale.js +1 -1
- package/build/utils/rsa.js +1 -1
- package/build/utils/string.d.ts +2 -1
- package/build/utils/string.js +22 -3
- package/package.json +127 -127
- package/build/features/Landing/Landing.d.ts +0 -7
- package/build/features/Landing/Landing.js +0 -55
- package/build/features/Landing/index.d.ts +0 -1
- package/build/features/Landing/index.js +0 -1
- package/build/features/Landing/screens/VerifyAndRedirect/VerifyAndRedirect.d.ts +0 -5
- package/build/features/Landing/screens/VerifyAndRedirect/VerifyAndRedirect.js +0 -41
- package/build/features/Landing/screens/VerifyAndRedirect/index.d.ts +0 -2
- package/build/features/Landing/screens/VerifyAndRedirect/index.js +0 -2
- package/build/features/app/landing/landingStore.d.ts +0 -22
- package/build/features/app/landing/landingStore.js +0 -103
package/README.md
CHANGED
|
@@ -59,9 +59,6 @@ const App = () => {
|
|
|
59
59
|
onStepCompleted={(name, data) => {
|
|
60
60
|
console.log(name, data)
|
|
61
61
|
}}
|
|
62
|
-
onStepError={(name, error) => {
|
|
63
|
-
console.log(name, error)
|
|
64
|
-
}}
|
|
65
62
|
onStepStarted={(name) => {
|
|
66
63
|
console.log(name)
|
|
67
64
|
}}
|
|
@@ -86,42 +83,51 @@ const App = () => {
|
|
|
86
83
|
<body>
|
|
87
84
|
<div id="root"></div>
|
|
88
85
|
<script>
|
|
89
|
-
const { renderConnectLib } = window.TapAuth
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
86
|
+
const { renderConnectLib, unmountConnectLib } = window.TapAuth
|
|
87
|
+
const startConnect = () => {
|
|
88
|
+
renderConnectLib(
|
|
89
|
+
{
|
|
90
|
+
open: true,
|
|
91
|
+
merchantDomain: window.location.origin,
|
|
92
|
+
publicKey: "pk_test_lat64TEDSvHrUOYAxVRe28PQ",
|
|
93
|
+
appInfo: {
|
|
94
|
+
identifier: "tap_connect_demo",
|
|
95
|
+
name: "Tap Connect Demo",
|
|
96
|
+
version: "V2.0.0"
|
|
97
|
+
},
|
|
98
|
+
businessCountryCode: "SA",
|
|
99
|
+
language: "en",
|
|
100
|
+
onError: (error) => {
|
|
101
|
+
alert(JSON.stringify({ error }))
|
|
102
|
+
},
|
|
103
|
+
onFlowCompleted: (data) => {
|
|
104
|
+
console.log(data)
|
|
105
|
+
},
|
|
106
|
+
onReady: () => {
|
|
107
|
+
console.log("ready!")
|
|
108
|
+
},
|
|
109
|
+
onStepCompleted: (name, data) => {
|
|
110
|
+
console.log(name, data)
|
|
111
|
+
},
|
|
112
|
+
onStepError: (name, error) => {
|
|
113
|
+
console.log(name, error)
|
|
114
|
+
},
|
|
115
|
+
onStepStarted: (name) => {
|
|
116
|
+
console.log(name)
|
|
117
|
+
},
|
|
118
|
+
scope: []
|
|
113
119
|
},
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
"root"
|
|
123
|
-
)
|
|
120
|
+
|
|
121
|
+
"root"
|
|
122
|
+
)
|
|
123
|
+
}
|
|
124
|
+
const stopConnect = () => {
|
|
125
|
+
unmountConnectLib("root")
|
|
126
|
+
}
|
|
127
|
+
|
|
124
128
|
</script>
|
|
129
|
+
<button onclick="startConnect()">Start</button>
|
|
130
|
+
<button onclick="stopConnect()">Stop</button>
|
|
125
131
|
</body>
|
|
126
132
|
</html>
|
|
127
133
|
```
|
|
@@ -129,6 +135,7 @@ const App = () => {
|
|
|
129
135
|
```
|
|
130
136
|
|
|
131
137
|
## Connect
|
|
138
|
+
- Help our merchants to create a account with Tap Payments
|
|
132
139
|
|
|
133
140
|
## Business
|
|
134
141
|
|
|
@@ -144,18 +151,17 @@ const App = () => {
|
|
|
144
151
|
|
|
145
152
|
## Properties
|
|
146
153
|
|
|
147
|
-
| name
|
|
148
|
-
|
|
|
149
|
-
| open `required`
|
|
150
|
-
| merchantDomain `required` |
|
|
151
|
-
| publicKey `required` |
|
|
152
|
-
| appInfo `required`
|
|
153
|
-
| businessCountryCode `required` |
|
|
154
|
-
| language `required` |
|
|
155
|
-
| onError `required`
|
|
156
|
-
| onFlowCompleted `required`
|
|
157
|
-
| onReady `required`
|
|
158
|
-
|
|
|
159
|
-
|
|
|
160
|
-
|
|
|
161
|
-
| scope `required` | UnsupportedMediaType |
|
|
154
|
+
| name | description |
|
|
155
|
+
| ----------------------------------------- | ----------------------------------------------------------------------- |
|
|
156
|
+
| open `required` - `boolean` | open/close the library |
|
|
157
|
+
| merchantDomain `required` - `string` | domain name `https://expamle.com` |
|
|
158
|
+
| publicKey `required` - `string` | merchant public key |
|
|
159
|
+
| appInfo `required` | it's an object from type `AppInfo` |
|
|
160
|
+
| businessCountryCode `required` - `string` | merchant country code and it should be the ISO2 of the country |
|
|
161
|
+
| language `required` - `string` | it can be `en`or `ar` |
|
|
162
|
+
| onError `required` - `function` | callback function will call in case of any error happened |
|
|
163
|
+
| onFlowCompleted `required` - `function` | callback function will called after completing the flow |
|
|
164
|
+
| onReady `required` - `function` | callback function will call after loading library configuration |
|
|
165
|
+
| onStepError `required` - `function` | callback function will call in case if any error happened in the screen |
|
|
166
|
+
| onStepStarted `required` - `function` | callback function will call in the begging of each step |
|
|
167
|
+
| scope `required` - `array` | it's an array include merchant scope |
|
package/build/@types/app.d.ts
CHANGED
|
@@ -102,6 +102,7 @@ interface LibCallbacks {
|
|
|
102
102
|
onError: (err: any) => void;
|
|
103
103
|
onStepCompleted?: (name: string, info: any) => void;
|
|
104
104
|
onReady?: () => void;
|
|
105
|
+
onStepStarted?: (name: string) => void;
|
|
105
106
|
}
|
|
106
107
|
export interface LibConfig extends LibCallbacks {
|
|
107
108
|
publicKey: string;
|
|
@@ -174,4 +175,12 @@ export declare type BrandInfo = {
|
|
|
174
175
|
website: string;
|
|
175
176
|
social: Array<string>;
|
|
176
177
|
};
|
|
178
|
+
export declare enum FlowsTypes {
|
|
179
|
+
CONNECT = "connect",
|
|
180
|
+
BANK = "bank",
|
|
181
|
+
BUSINESS = "business",
|
|
182
|
+
INDIVIDUAL = "individual",
|
|
183
|
+
PASSWORD = "password",
|
|
184
|
+
TAX = "tax"
|
|
185
|
+
}
|
|
177
186
|
export {};
|
package/build/@types/app.js
CHANGED
|
@@ -9,3 +9,12 @@ export var BusinessType;
|
|
|
9
9
|
BusinessType["CR"] = "company";
|
|
10
10
|
BusinessType["FL"] = "freelancer";
|
|
11
11
|
})(BusinessType || (BusinessType = {}));
|
|
12
|
+
export var FlowsTypes;
|
|
13
|
+
(function (FlowsTypes) {
|
|
14
|
+
FlowsTypes["CONNECT"] = "connect";
|
|
15
|
+
FlowsTypes["BANK"] = "bank";
|
|
16
|
+
FlowsTypes["BUSINESS"] = "business";
|
|
17
|
+
FlowsTypes["INDIVIDUAL"] = "individual";
|
|
18
|
+
FlowsTypes["PASSWORD"] = "password";
|
|
19
|
+
FlowsTypes["TAX"] = "tax";
|
|
20
|
+
})(FlowsTypes || (FlowsTypes = {}));
|
package/build/@types/form.d.ts
CHANGED
|
@@ -49,9 +49,11 @@ export declare type BankFormValues = {
|
|
|
49
49
|
iban: string;
|
|
50
50
|
beneficiaryName: string;
|
|
51
51
|
bankName: string;
|
|
52
|
+
confirmPolicy: boolean;
|
|
52
53
|
};
|
|
53
54
|
export declare type TaxFormValues = {
|
|
54
55
|
vatId: string;
|
|
56
|
+
confirmPolicy: false;
|
|
55
57
|
};
|
|
56
58
|
export declare type IndividualExtraFormValues = {
|
|
57
59
|
sourceIncome: SourceOfIncome | undefined;
|
package/build/api/account.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import instance from './axios';
|
|
2
|
-
import { ENDPOINT_PATHS } from '
|
|
2
|
+
import { ENDPOINT_PATHS } from '../constants';
|
|
3
3
|
var createAccount = function (data, config) {
|
|
4
4
|
return instance.post("".concat(ENDPOINT_PATHS.CREATE_ACCOUNT, "/").concat(data.lead_id), data, config);
|
|
5
5
|
};
|
package/build/api/auth.js
CHANGED
package/build/api/axios.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { CancelTokenSource } from 'axios';
|
|
1
2
|
declare const instance: import("axios").AxiosInstance;
|
|
2
3
|
export declare const setAxiosGlobalHeaders: (headers: Record<string, string>) => void;
|
|
3
4
|
export declare const removeAxiosGlobalHeaders: (arr: Array<string>) => void;
|
|
5
|
+
export type { CancelTokenSource };
|
|
4
6
|
export default instance;
|
package/build/api/axios.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import axios from 'axios';
|
|
2
2
|
import { get, set } from 'lodash-es';
|
|
3
|
-
import { ENCRYPTION_FLAG } from '
|
|
4
|
-
import { encryptString } from '
|
|
3
|
+
import { ENCRYPTION_FLAG } from '../constants';
|
|
4
|
+
import { encryptString } from '../utils';
|
|
5
5
|
var instance = axios.create({
|
|
6
6
|
headers: {
|
|
7
7
|
'Content-Type': 'application/json',
|
|
@@ -33,11 +33,13 @@ var encryptionContractTransformer = function (config) {
|
|
|
33
33
|
export var setAxiosGlobalHeaders = function (headers) {
|
|
34
34
|
Object.keys(headers).forEach(function (key) {
|
|
35
35
|
instance.defaults.headers.common[key] = headers[key];
|
|
36
|
+
axios.defaults.headers.common[key] = headers[key];
|
|
36
37
|
});
|
|
37
38
|
};
|
|
38
39
|
export var removeAxiosGlobalHeaders = function (arr) {
|
|
39
40
|
arr.forEach(function (key) {
|
|
40
41
|
delete instance.defaults.headers.common[key];
|
|
42
|
+
delete axios.defaults.headers.common[key];
|
|
41
43
|
});
|
|
42
44
|
};
|
|
43
45
|
export default instance;
|
package/build/api/country.js
CHANGED
package/build/api/data.js
CHANGED
package/build/api/entity.js
CHANGED
|
@@ -9,7 +9,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
9
9
|
}
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
|
-
import { ENDPOINT_PATHS } from '
|
|
12
|
+
import { ENDPOINT_PATHS } from '../constants';
|
|
13
13
|
import instance from './axios';
|
|
14
14
|
var retrieveEntityInfo = function (entity_id, config) {
|
|
15
15
|
return instance.get("".concat(ENDPOINT_PATHS.ENTITY, "/").concat(entity_id), config);
|
package/build/api/firebase.js
CHANGED
package/build/api/individual.js
CHANGED
package/build/api/ip.js
CHANGED
package/build/api/lead.js
CHANGED
package/build/api/operator.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
declare const rootReducer: {
|
|
2
2
|
settings: import("redux").Reducer<import("./settings").SettingsState, import("redux").AnyAction>;
|
|
3
|
-
connect: import("redux").Reducer<import("
|
|
4
|
-
business: import("redux").Reducer<import("
|
|
5
|
-
bank: import("redux").Reducer<import("
|
|
6
|
-
tax: import("redux").Reducer<import("
|
|
7
|
-
individual: import("redux").Reducer<import("
|
|
8
|
-
password: import("redux").Reducer<import("
|
|
9
|
-
landing: import("redux").Reducer<import("@features/app/landing/landingStore").LandingState, import("redux").AnyAction>;
|
|
3
|
+
connect: import("redux").Reducer<import("../features/app/connect/connectStore").ConnectState, import("redux").AnyAction>;
|
|
4
|
+
business: import("redux").Reducer<import("../features/app/business/businessStore").BusinessState, import("redux").AnyAction>;
|
|
5
|
+
bank: import("redux").Reducer<import("../features/app/bank/bankStore").BankState, import("redux").AnyAction>;
|
|
6
|
+
tax: import("redux").Reducer<import("../features/app/tax/taxStore").TaxState, import("redux").AnyAction>;
|
|
7
|
+
individual: import("redux").Reducer<import("../features/app/individual/individualStore").IndividualState, import("redux").AnyAction>;
|
|
8
|
+
password: import("redux").Reducer<import("../features/app/password/passwordStore").PasswordState, import("redux").AnyAction>;
|
|
10
9
|
};
|
|
11
10
|
export default rootReducer;
|
package/build/app/rootReducer.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import settings from './settings';
|
|
2
|
-
import connect from '
|
|
3
|
-
import business from '
|
|
4
|
-
import bank from '
|
|
5
|
-
import tax from '
|
|
6
|
-
import individual from '
|
|
7
|
-
import password from '
|
|
8
|
-
import landing from '@features/app/landing/landingStore';
|
|
2
|
+
import connect from '../features/app/connect/connectStore';
|
|
3
|
+
import business from '../features/app/business/businessStore';
|
|
4
|
+
import bank from '../features/app/bank/bankStore';
|
|
5
|
+
import tax from '../features/app/tax/taxStore';
|
|
6
|
+
import individual from '../features/app/individual/individualStore';
|
|
7
|
+
import password from '../features/app/password/passwordStore';
|
|
9
8
|
var rootReducer = {
|
|
10
9
|
settings: settings,
|
|
11
10
|
connect: connect,
|
|
@@ -13,7 +12,6 @@ var rootReducer = {
|
|
|
13
12
|
bank: bank,
|
|
14
13
|
tax: tax,
|
|
15
14
|
individual: individual,
|
|
16
|
-
password: password
|
|
17
|
-
landing: landing
|
|
15
|
+
password: password
|
|
18
16
|
};
|
|
19
17
|
export default rootReducer;
|
package/build/app/settings.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import { RootState } from '
|
|
2
|
-
import { ActionState, LanguageMode, SharedState, ThemeMode, ScreenStepNavigation, DeviceInfo, AppInfo, LibConfig } from '
|
|
3
|
-
import { ValidateOperatorBody } from '
|
|
1
|
+
import { RootState } from './store';
|
|
2
|
+
import { ActionState, LanguageMode, SharedState, ThemeMode, ScreenStepNavigation, DeviceInfo, AppInfo, LibConfig, CountryCode } from '../@types';
|
|
3
|
+
import { ValidateOperatorBody } from '../api';
|
|
4
|
+
export declare const getCountries: import("@reduxjs/toolkit").AsyncThunk<{
|
|
5
|
+
businessCountry: any;
|
|
6
|
+
countries: any;
|
|
7
|
+
}, void, {}>;
|
|
4
8
|
export declare const getClientIp: import("@reduxjs/toolkit").AsyncThunk<any, void, {}>;
|
|
5
9
|
export declare const getBrowserFingerPrint: import("@reduxjs/toolkit").AsyncThunk<{
|
|
6
10
|
fingerPrint: import("@fingerprintjs/fingerprintjs").GetResult;
|
|
@@ -20,6 +24,8 @@ export interface SettingsData {
|
|
|
20
24
|
appConfig: LibConfig;
|
|
21
25
|
open: boolean;
|
|
22
26
|
isTapOrigin: boolean;
|
|
27
|
+
businessCountry: CountryCode;
|
|
28
|
+
countries: Array<CountryCode>;
|
|
23
29
|
}
|
|
24
30
|
export interface SettingsState extends SharedState<SettingsData> {
|
|
25
31
|
}
|
package/build/app/settings.js
CHANGED
|
@@ -36,11 +36,30 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
36
36
|
};
|
|
37
37
|
var _a;
|
|
38
38
|
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
39
|
-
import { getStoredData, storeData, isArray, findItem, getBrowserInfo, getFingerPrint } from '
|
|
40
|
-
import { DefaultDeviceInfo, LOCAL_STORAGE_KEYS } from '
|
|
41
|
-
import i18n from '
|
|
42
|
-
import { updateLocale } from '
|
|
43
|
-
import API from '
|
|
39
|
+
import { getStoredData, storeData, isArray, findItem, getBrowserInfo, getFingerPrint } from '../utils';
|
|
40
|
+
import { defaultCountry, DefaultDeviceInfo, LOCAL_STORAGE_KEYS } from '../constants';
|
|
41
|
+
import i18n from '../i18n';
|
|
42
|
+
import { updateLocale } from '../utils/locale';
|
|
43
|
+
import API from '../api';
|
|
44
|
+
export var getCountries = createAsyncThunk('getCountries', function (_, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
45
|
+
var settings, countriesBody, countries, businessCountry;
|
|
46
|
+
return __generator(this, function (_a) {
|
|
47
|
+
switch (_a.label) {
|
|
48
|
+
case 0:
|
|
49
|
+
settings = thunkApi.getState().settings;
|
|
50
|
+
return [4, API.countryService.getAllCountries()];
|
|
51
|
+
case 1:
|
|
52
|
+
countriesBody = (_a.sent()).data;
|
|
53
|
+
countries = ((countriesBody === null || countriesBody === void 0 ? void 0 : countriesBody.list) || [])
|
|
54
|
+
.slice()
|
|
55
|
+
.sort(function (cOne, cTwo) { return cOne.name.english.localeCompare(cTwo.name.english); });
|
|
56
|
+
businessCountry = countries.find(function (country) {
|
|
57
|
+
return [country.iso2, country.iso3].includes(settings.data.appConfig.businessCountryCode.toUpperCase());
|
|
58
|
+
});
|
|
59
|
+
return [2, { businessCountry: businessCountry, countries: countries }];
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
}); });
|
|
44
63
|
export var getClientIp = createAsyncThunk('getClientIp', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
45
64
|
var data;
|
|
46
65
|
return __generator(this, function (_a) {
|
|
@@ -98,7 +117,9 @@ var initialState = {
|
|
|
98
117
|
featureScreensNavigation: [],
|
|
99
118
|
activeScreen: {},
|
|
100
119
|
deviceInfo: DefaultDeviceInfo,
|
|
101
|
-
appConfig: {}
|
|
120
|
+
appConfig: {},
|
|
121
|
+
businessCountry: defaultCountry,
|
|
122
|
+
countries: []
|
|
102
123
|
}
|
|
103
124
|
};
|
|
104
125
|
export var settingsSlice = createSlice({
|
|
@@ -187,6 +208,21 @@ export var settingsSlice = createSlice({
|
|
|
187
208
|
},
|
|
188
209
|
extraReducers: function (builder) {
|
|
189
210
|
builder
|
|
211
|
+
.addCase(getCountries.fulfilled, function (state, action) {
|
|
212
|
+
state.error = null;
|
|
213
|
+
state.loading = false;
|
|
214
|
+
var _a = action.payload, countries = _a.countries, businessCountry = _a.businessCountry;
|
|
215
|
+
state.data.countries = countries;
|
|
216
|
+
state.data.businessCountry = businessCountry || defaultCountry;
|
|
217
|
+
})
|
|
218
|
+
.addCase(getCountries.pending, function (state) {
|
|
219
|
+
state.error = null;
|
|
220
|
+
state.loading = true;
|
|
221
|
+
})
|
|
222
|
+
.addCase(getCountries.rejected, function (state, action) {
|
|
223
|
+
state.error = action.error.message;
|
|
224
|
+
state.loading = false;
|
|
225
|
+
})
|
|
190
226
|
.addCase(getClientIp.pending, function (state) {
|
|
191
227
|
state.error = null;
|
|
192
228
|
state.loading = true;
|
package/build/app/store.d.ts
CHANGED
|
@@ -7,7 +7,6 @@ export declare const store: import("@reduxjs/toolkit").EnhancedStore<{
|
|
|
7
7
|
tax: import("../features/app/tax/taxStore").TaxState;
|
|
8
8
|
individual: import("../features/app/individual/individualStore").IndividualState;
|
|
9
9
|
password: import("../features/app/password/passwordStore").PasswordState;
|
|
10
|
-
landing: import("../features/app/landing/landingStore").LandingState;
|
|
11
10
|
}, import("redux").AnyAction, import("@reduxjs/toolkit").MiddlewareArray<[import("redux-thunk").ThunkMiddleware<{
|
|
12
11
|
settings: import("./settings").SettingsState;
|
|
13
12
|
connect: import("../features/app/connect/connectStore").ConnectState;
|
|
@@ -16,7 +15,6 @@ export declare const store: import("@reduxjs/toolkit").EnhancedStore<{
|
|
|
16
15
|
tax: import("../features/app/tax/taxStore").TaxState;
|
|
17
16
|
individual: import("../features/app/individual/individualStore").IndividualState;
|
|
18
17
|
password: import("../features/app/password/passwordStore").PasswordState;
|
|
19
|
-
landing: import("../features/app/landing/landingStore").LandingState;
|
|
20
18
|
}, import("redux").AnyAction, undefined>]>>;
|
|
21
19
|
export declare type AppDispatch = typeof store.dispatch;
|
|
22
20
|
export declare type RootState = ReturnType<typeof store.getState>;
|
|
@@ -62,7 +62,7 @@ var BottomSheetComponent = function (_a) {
|
|
|
62
62
|
var open = _a.open, children = _a.children, rest = __rest(_a, ["open", "children"]);
|
|
63
63
|
var getMinHeight = function (maxHeight) {
|
|
64
64
|
var element = document.getElementById('main-feature-container');
|
|
65
|
-
var height = element ? element.clientHeight
|
|
65
|
+
var height = element ? element.clientHeight : 0;
|
|
66
66
|
return height || maxHeight * 0.7;
|
|
67
67
|
};
|
|
68
68
|
return (_jsx(BottomSheetStyled, __assign({ open: open, snapPoints: function (_a) {
|
|
@@ -27,8 +27,8 @@ import DialogContent from '@mui/material/DialogContent';
|
|
|
27
27
|
import Paper from '@mui/material/Paper';
|
|
28
28
|
import Box from '@mui/material/Box';
|
|
29
29
|
import { styled } from '@mui/material/styles';
|
|
30
|
-
import { ICONS_NAMES } from '
|
|
31
|
-
import { useLanguage } from '
|
|
30
|
+
import { ICONS_NAMES } from '../../constants';
|
|
31
|
+
import { useLanguage } from '../../hooks';
|
|
32
32
|
import Slide from '../Slide';
|
|
33
33
|
import LogoBadge from '../LogoBadge';
|
|
34
34
|
import Icon from '../Icon';
|
|
@@ -12,5 +12,5 @@ var BoxStyled = styled(Box)(function () { return ({
|
|
|
12
12
|
zIndex: 2
|
|
13
13
|
}); });
|
|
14
14
|
export default function FlowLoading() {
|
|
15
|
-
return (_jsx(BoxStyled, { children: _jsx(Loader, { svgStyle: { width: 60, height: 60 }, innerColor: 'white', outerColor: 'white', toggleAnimation: true }) }));
|
|
15
|
+
return (_jsx(BoxStyled, { children: _jsx(Loader, { style: { width: 60, height: 60 }, svgStyle: { width: 60, height: 60 }, innerColor: 'white', outerColor: 'white', toggleAnimation: true }) }));
|
|
16
16
|
}
|
|
@@ -27,10 +27,10 @@ import 'react-calendar/dist/Calendar.css';
|
|
|
27
27
|
import Box from '@mui/material/Box';
|
|
28
28
|
import { styled } from '@mui/material/styles';
|
|
29
29
|
import Divider from '@mui/material/Divider';
|
|
30
|
-
import Collapse from '
|
|
31
|
-
import ExpandIcon from '
|
|
30
|
+
import Collapse from '../Collapse';
|
|
31
|
+
import ExpandIcon from '../ExpandIcon';
|
|
32
32
|
import CalendarTodayOutlined from '@mui/icons-material/CalendarTodayOutlined';
|
|
33
|
-
import { scrollDown, scrollUp } from '
|
|
33
|
+
import { scrollDown, scrollUp } from '../../utils';
|
|
34
34
|
import Input from '../Input';
|
|
35
35
|
import Text from '../Text';
|
|
36
36
|
import './customStyle.css';
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
.date_picker_input {
|
|
2
|
+
cursor: pointer;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.react-calendar {
|
|
6
|
+
width: 100%;
|
|
7
|
+
border: none;
|
|
8
|
+
padding: 15px 0px 15px 0px;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.react-calendar__navigation {
|
|
12
|
+
display: flex;
|
|
13
|
+
position: relative;
|
|
14
|
+
}
|
|
15
|
+
.react-calendar__navigation__label__labelText {
|
|
16
|
+
font-family: 'Lato', 'Roboto';
|
|
17
|
+
}
|
|
18
|
+
.react-calendar__navigation button:enabled:hover,
|
|
19
|
+
.react-calendar__navigation button:enabled:focus {
|
|
20
|
+
background-color: #ffffff;
|
|
21
|
+
}
|
|
22
|
+
.react-calendar__navigation__prev-button {
|
|
23
|
+
top: 20px;
|
|
24
|
+
left: 86px;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.react-calendar__navigation__next-button {
|
|
28
|
+
top: 0px;
|
|
29
|
+
left: 86px;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.react-calendar__navigation__prev2-button {
|
|
33
|
+
top: 20px;
|
|
34
|
+
right: 13px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.react-calendar__navigation__next2-button {
|
|
38
|
+
top: 0px;
|
|
39
|
+
right: 13px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.react-calendar__navigation__arrow {
|
|
43
|
+
background-color: transparent !important;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
abbr[title] {
|
|
47
|
+
text-decoration: none;
|
|
48
|
+
font-weight: 400;
|
|
49
|
+
color: #abaeb6;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.react-calendar__tile {
|
|
53
|
+
transition: all 0.5s ease;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.react-calendar__tile:enabled:hover,
|
|
57
|
+
.react-calendar__tile:enabled:focus {
|
|
58
|
+
background-color: transparent;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.react-calendar__tile:enabled:hover {
|
|
62
|
+
background: radial-gradient(circle closest-side, #fafafa 0%, #fafafa 98%, rgba(0, 0, 0, 0) 100%);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.react-calendar__month-view__days__day--weekend,
|
|
66
|
+
.react-calendar__tile {
|
|
67
|
+
color: #3a4154;
|
|
68
|
+
}
|
|
69
|
+
.react-calendar__tile--hasActive {
|
|
70
|
+
background: radial-gradient(circle closest-side, #fafafa 0%, #fafafa 98%, rgba(0, 0, 0, 0) 100%);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.react-calendar__tile--active,
|
|
74
|
+
.react-calendar__tile--active:enabled:hover,
|
|
75
|
+
.react-calendar__tile--active:enabled:focus {
|
|
76
|
+
background-color: transparent;
|
|
77
|
+
background: radial-gradient(circle closest-side, #3a4154 0%, #3a4154 98%, rgba(0, 0, 0, 0) 100%);
|
|
78
|
+
color: #ffffff;
|
|
79
|
+
}
|
|
80
|
+
.react-calendar__tile--now {
|
|
81
|
+
background-color: transparent;
|
|
82
|
+
}
|
|
83
|
+
.react-calendar__navigation button:disabled {
|
|
84
|
+
background-color: #ffffff;
|
|
85
|
+
color: #3a4154;
|
|
86
|
+
}
|
|
@@ -2,7 +2,6 @@ import * as React from 'react';
|
|
|
2
2
|
import { BoxProps } from '@mui/material/Box';
|
|
3
3
|
export interface FooterProps extends BoxProps {
|
|
4
4
|
onSwitchLanguage: () => void;
|
|
5
|
-
followUsTitle?: string;
|
|
6
5
|
language?: string;
|
|
7
6
|
countryName: string;
|
|
8
7
|
countryFlag: string;
|
|
@@ -10,7 +9,6 @@ export interface FooterProps extends BoxProps {
|
|
|
10
9
|
declare const _default: React.MemoExoticComponent<{
|
|
11
10
|
({ language, countryName, countryFlag, onSwitchLanguage, ...rest }: FooterProps): JSX.Element;
|
|
12
11
|
defaultProps: {
|
|
13
|
-
followUsTitle: string;
|
|
14
12
|
language: string;
|
|
15
13
|
};
|
|
16
14
|
}>;
|
|
@@ -23,10 +23,10 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
23
23
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
24
|
import * as React from 'react';
|
|
25
25
|
import { styled } from '@mui/material/styles';
|
|
26
|
-
import Text from '
|
|
26
|
+
import Text from '../Text';
|
|
27
27
|
import Box from '@mui/material/Box';
|
|
28
|
-
import Icon from '
|
|
29
|
-
import { useLanguage } from '
|
|
28
|
+
import Icon from '../Icon';
|
|
29
|
+
import { useLanguage } from '../../hooks';
|
|
30
30
|
var FooterStyled = styled(Box)(function (_a) {
|
|
31
31
|
var theme = _a.theme;
|
|
32
32
|
return (__assign(__assign({ direction: theme.direction, display: 'flex', margin: theme.spacing(1.5), color: theme.palette.background.paper }, theme.typography.caption), { alignItems: 'center', justifyContent: 'center', position: 'relative', bottom: 0, marginBottom: theme.spacing(-3.75) }));
|
|
@@ -57,7 +57,6 @@ var FooterComponent = function (_a) {
|
|
|
57
57
|
return (_jsxs(FooterStyled, __assign({}, rest, { children: [_jsx(IconStyled, { src: countryFlag }), _jsxs(TextStyled, { children: [" ", countryName, " "] }), _jsx(TextStyled, { children: " | " }), _jsx(LanguageTextStyled, __assign({ isAr: isAr, onClick: onSwitchLanguage }, { children: language }))] })));
|
|
58
58
|
};
|
|
59
59
|
FooterComponent.defaultProps = {
|
|
60
|
-
followUsTitle: 'follow_us',
|
|
61
60
|
language: 'language'
|
|
62
61
|
};
|
|
63
62
|
export default React.memo(FooterComponent);
|