boxpay-checkout-reactnative-sdk 1.0.11-beta → 1.0.11-beta3
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/lib/module/components/checkboxContainer.js +1 -1
- package/lib/module/components/header.js +1 -1
- package/lib/module/components/header.js.map +1 -1
- package/lib/module/components/paymentSelector.js +1 -1
- package/lib/module/components/paymentSelector.js.map +1 -1
- package/lib/module/components/paymentSuccess.js +2 -7
- package/lib/module/components/paymentSuccess.js.map +1 -1
- package/lib/module/components/savedCardComponent.js +1 -1
- package/lib/module/components/savedCardComponent.js.map +1 -1
- package/lib/module/components/subscriptionRow.js +33 -0
- package/lib/module/components/subscriptionRow.js.map +1 -0
- package/lib/module/interface.js +1 -0
- package/lib/module/interface.js.map +1 -1
- package/lib/module/screens/addressScreen.js +11 -60
- package/lib/module/screens/addressScreen.js.map +1 -1
- package/lib/module/screens/cardScreen.js +488 -447
- package/lib/module/screens/cardScreen.js.map +1 -1
- package/lib/module/screens/emiScreen.js +2 -6
- package/lib/module/screens/emiScreen.js.map +1 -1
- package/lib/module/screens/instantOfferList.js +2 -6
- package/lib/module/screens/instantOfferList.js.map +1 -1
- package/lib/module/screens/mainScreen.js +50 -2
- package/lib/module/screens/mainScreen.js.map +1 -1
- package/lib/module/screens/netBankingScreen.js +2 -6
- package/lib/module/screens/netBankingScreen.js.map +1 -1
- package/lib/module/screens/upiScreen.js +2 -6
- package/lib/module/screens/upiScreen.js.map +1 -1
- package/lib/module/screens/walletScreen.js +2 -6
- package/lib/module/screens/walletScreen.js.map +1 -1
- package/lib/module/sdk-version.json +1 -1
- package/lib/module/sharedContext/checkoutDetailsHandler.js +8 -2
- package/lib/module/sharedContext/checkoutDetailsHandler.js.map +1 -1
- package/lib/module/sharedContext/getTextInputTheme.js +15 -0
- package/lib/module/sharedContext/getTextInputTheme.js.map +1 -0
- package/lib/module/styles/indexStyles.js +1 -1
- package/lib/module/styles/indexStyles.js.map +1 -1
- package/lib/module/styles/screens/bnplScreenStyles.js +2 -3
- package/lib/module/styles/screens/bnplScreenStyles.js.map +1 -1
- package/lib/module/styles/screens/cardScreenStyles.js +9 -4
- package/lib/module/styles/screens/cardScreenStyles.js.map +1 -1
- package/lib/module/styles/screens/netBankingScreenStyles.js +2 -3
- package/lib/module/styles/screens/netBankingScreenStyles.js.map +1 -1
- package/lib/module/styles/screens/walletScreenStyles.js +2 -3
- package/lib/module/styles/screens/walletScreenStyles.js.map +1 -1
- package/lib/module/utility.js +16 -0
- package/lib/module/utility.js.map +1 -1
- package/lib/typescript/src/components/subscriptionRow.d.ts +9 -0
- package/lib/typescript/src/components/subscriptionRow.d.ts.map +1 -0
- package/lib/typescript/src/interface.d.ts +26 -2
- package/lib/typescript/src/interface.d.ts.map +1 -1
- package/lib/typescript/src/screens/addressScreen.d.ts.map +1 -1
- package/lib/typescript/src/screens/cardScreen.d.ts +1 -1
- package/lib/typescript/src/screens/cardScreen.d.ts.map +1 -1
- package/lib/typescript/src/screens/emiScreen.d.ts.map +1 -1
- package/lib/typescript/src/screens/instantOfferList.d.ts.map +1 -1
- package/lib/typescript/src/screens/mainScreen.d.ts.map +1 -1
- package/lib/typescript/src/screens/netBankingScreen.d.ts.map +1 -1
- package/lib/typescript/src/screens/upiScreen.d.ts.map +1 -1
- package/lib/typescript/src/screens/walletScreen.d.ts.map +1 -1
- package/lib/typescript/src/sharedContext/checkoutDetailsHandler.d.ts.map +1 -1
- package/lib/typescript/src/sharedContext/getTextInputTheme.d.ts +7 -0
- package/lib/typescript/src/sharedContext/getTextInputTheme.d.ts.map +1 -0
- package/lib/typescript/src/styles/indexStyles.d.ts +1 -1
- package/lib/typescript/src/styles/screens/bnplScreenStyles.d.ts +1 -2
- package/lib/typescript/src/styles/screens/bnplScreenStyles.d.ts.map +1 -1
- package/lib/typescript/src/styles/screens/cardScreenStyles.d.ts +8 -3
- package/lib/typescript/src/styles/screens/cardScreenStyles.d.ts.map +1 -1
- package/lib/typescript/src/styles/screens/netBankingScreenStyles.d.ts +1 -2
- package/lib/typescript/src/styles/screens/netBankingScreenStyles.d.ts.map +1 -1
- package/lib/typescript/src/styles/screens/walletScreenStyles.d.ts +1 -2
- package/lib/typescript/src/styles/screens/walletScreenStyles.d.ts.map +1 -1
- package/lib/typescript/src/utility.d.ts +2 -0
- package/lib/typescript/src/utility.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/components/checkboxContainer.tsx +1 -1
- package/src/components/header.tsx +1 -1
- package/src/components/paymentSelector.tsx +1 -1
- package/src/components/paymentSuccess.tsx +3 -5
- package/src/components/savedCardComponent.tsx +1 -1
- package/src/components/subscriptionRow.tsx +19 -0
- package/src/interface.ts +24 -2
- package/src/screens/addressScreen.tsx +11 -60
- package/src/screens/cardScreen.tsx +188 -124
- package/src/screens/emiScreen.tsx +2 -6
- package/src/screens/instantOfferList.tsx +2 -6
- package/src/screens/mainScreen.tsx +54 -3
- package/src/screens/netBankingScreen.tsx +2 -6
- package/src/screens/upiScreen.tsx +2 -6
- package/src/screens/walletScreen.tsx +2 -6
- package/src/sdk-version.json +1 -1
- package/src/sharedContext/checkoutDetailsHandler.ts +8 -2
- package/src/sharedContext/getTextInputTheme.ts +12 -0
- package/src/styles/indexStyles.ts +1 -1
- package/src/styles/screens/bnplScreenStyles.ts +2 -3
- package/src/styles/screens/cardScreenStyles.ts +3 -4
- package/src/styles/screens/netBankingScreenStyles.ts +2 -3
- package/src/styles/screens/walletScreenStyles.ts +2 -3
- package/src/utility.ts +24 -1
|
@@ -18,6 +18,7 @@ import { formatTime, height, width } from '../utility';
|
|
|
18
18
|
import upiPostRequest from '../postRequest/upiPostRequest';
|
|
19
19
|
import { handlePaymentResponse } from '../sharedContext/handlePaymentResponseHandler';
|
|
20
20
|
import callUIAnalytics from '../postRequest/callUIAnalytics';
|
|
21
|
+
import { getTextInputTheme } from '../sharedContext/getTextInputTheme';
|
|
21
22
|
|
|
22
23
|
interface UpiScreenProps {
|
|
23
24
|
handleUpiPayment: (selectedIntent: string) => void;
|
|
@@ -447,12 +448,7 @@ const UpiScreen: React.FC<UpiScreenProps> = ({
|
|
|
447
448
|
onChangeText={(it) => {
|
|
448
449
|
handleTextChange(it);
|
|
449
450
|
}}
|
|
450
|
-
theme={
|
|
451
|
-
colors: {
|
|
452
|
-
primary: '#2D2B32',
|
|
453
|
-
outline: '#E6E6E6',
|
|
454
|
-
},
|
|
455
|
-
}}
|
|
451
|
+
theme={getTextInputTheme()}
|
|
456
452
|
style={[styles.textInput, {fontFamily: checkoutDetails.fontFamily.regular,}]}
|
|
457
453
|
error={upiCollectError}
|
|
458
454
|
right={
|
|
@@ -26,6 +26,7 @@ import styles from '../styles/screens/walletScreenStyles';
|
|
|
26
26
|
import type { CheckoutStackParamList } from '../navigation';
|
|
27
27
|
import type { NavigationProp, RouteProp } from '@react-navigation/native';
|
|
28
28
|
import { setUserDataHandlerToDefault } from '../sharedContext/userdataHandler';
|
|
29
|
+
import { getTextInputTheme } from '../sharedContext/getTextInputTheme';
|
|
29
30
|
|
|
30
31
|
type WalletScreenRouteProp = RouteProp<CheckoutStackParamList, 'WalletScreen'>;
|
|
31
32
|
type WalletScreenNavigationProp = NavigationProp<CheckoutStackParamList, 'WalletScreen'>;
|
|
@@ -276,12 +277,7 @@ const WalletScreen = ({ navigation, route }: Props) => {
|
|
|
276
277
|
onChangeText={(it) => {
|
|
277
278
|
handleSearchTextChange(it);
|
|
278
279
|
}}
|
|
279
|
-
theme={
|
|
280
|
-
colors: {
|
|
281
|
-
primary: '#2D2B32',
|
|
282
|
-
outline: '#E6E6E6',
|
|
283
|
-
},
|
|
284
|
-
}}
|
|
280
|
+
theme={getTextInputTheme()}
|
|
285
281
|
style={[styles.textFieldStyle, {fontFamily: checkoutDetails.fontFamily.regular,}]}
|
|
286
282
|
left={
|
|
287
283
|
<TextInput.Icon
|
package/src/sdk-version.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{ "version": "1.0.11-
|
|
1
|
+
{ "version": "1.0.11-beta3" }
|
|
@@ -13,6 +13,8 @@ export let checkoutDetailsHandler: CheckoutDetailsHandler = {
|
|
|
13
13
|
fontFamily : {},
|
|
14
14
|
ctaBorderRadius:0,
|
|
15
15
|
buttonColor: '#1CA672',
|
|
16
|
+
textInputFieldFocusedOutlineColor : "#2D2B32",
|
|
17
|
+
textInputFieldUnFocusedOutlineColor: "#ADACB0",
|
|
16
18
|
buttonTextColor:'white',
|
|
17
19
|
headerColor : 'white',
|
|
18
20
|
headerTextColor:'#363840',
|
|
@@ -46,7 +48,8 @@ export let checkoutDetailsHandler: CheckoutDetailsHandler = {
|
|
|
46
48
|
isUPIOtmQRMethodEnabled : false,
|
|
47
49
|
isOrderItemDetailsVisible : true,
|
|
48
50
|
isSICheckboxVisible : false,
|
|
49
|
-
isSubscriptionCheckout : false
|
|
51
|
+
isSubscriptionCheckout : false,
|
|
52
|
+
subscriptionDetails : null
|
|
50
53
|
},
|
|
51
54
|
};
|
|
52
55
|
|
|
@@ -64,6 +67,8 @@ export const setCheckOutDetailsHandlerToDefault = () => {
|
|
|
64
67
|
fontFamily : {},
|
|
65
68
|
ctaBorderRadius:0,
|
|
66
69
|
buttonColor: '',
|
|
70
|
+
textInputFieldFocusedOutlineColor : "",
|
|
71
|
+
textInputFieldUnFocusedOutlineColor: "",
|
|
67
72
|
buttonTextColor:'',
|
|
68
73
|
headerColor : '',
|
|
69
74
|
headerTextColor:'',
|
|
@@ -97,7 +102,8 @@ export const setCheckOutDetailsHandlerToDefault = () => {
|
|
|
97
102
|
isUPIOtmQRMethodEnabled: false,
|
|
98
103
|
isOrderItemDetailsVisible : true,
|
|
99
104
|
isSICheckboxVisible : false,
|
|
100
|
-
isSubscriptionCheckout : false
|
|
105
|
+
isSubscriptionCheckout : false,
|
|
106
|
+
subscriptionDetails : null
|
|
101
107
|
},
|
|
102
108
|
};
|
|
103
109
|
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { checkoutDetailsHandler } from "./checkoutDetailsHandler";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
export const getTextInputTheme = () => {
|
|
5
|
+
const { checkoutDetails } = checkoutDetailsHandler;
|
|
6
|
+
return {
|
|
7
|
+
colors: {
|
|
8
|
+
primary: checkoutDetails.textInputFieldFocusedOutlineColor,
|
|
9
|
+
outline: checkoutDetails.textInputFieldUnFocusedOutlineColor,
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
};
|
|
@@ -53,12 +53,11 @@ const styles = StyleSheet.create({
|
|
|
53
53
|
},
|
|
54
54
|
bottomText : {
|
|
55
55
|
fontSize: 12,
|
|
56
|
-
color: '#888888'
|
|
57
|
-
marginBottom: 13,
|
|
56
|
+
color: '#888888'
|
|
58
57
|
},
|
|
59
58
|
bottomContainer : {
|
|
60
59
|
justifyContent: 'center',
|
|
61
|
-
alignItems: '
|
|
60
|
+
alignItems: 'center',
|
|
62
61
|
backgroundColor: '#F5F6FB',
|
|
63
62
|
flexDirection: 'row',
|
|
64
63
|
},
|
|
@@ -15,6 +15,7 @@ const styles = StyleSheet.create({
|
|
|
15
15
|
paddingTop: 14,
|
|
16
16
|
paddingBottom: 12,
|
|
17
17
|
},
|
|
18
|
+
subscriptionContainer : {backgroundColor:'#EFF3FA', marginHorizontal : 16, marginTop : 10, borderRadius : 6, paddingBottom : 4},
|
|
18
19
|
buttonText: {
|
|
19
20
|
color: 'white',
|
|
20
21
|
fontSize: 16,
|
|
@@ -77,7 +78,6 @@ const styles = StyleSheet.create({
|
|
|
77
78
|
errorText : {
|
|
78
79
|
color: '#B3261E',
|
|
79
80
|
fontSize: 12,
|
|
80
|
-
marginHorizontal: 16,
|
|
81
81
|
marginTop: 4,
|
|
82
82
|
},
|
|
83
83
|
expiryCvvContainer : {
|
|
@@ -143,13 +143,12 @@ const styles = StyleSheet.create({
|
|
|
143
143
|
},
|
|
144
144
|
footerContainer : {
|
|
145
145
|
justifyContent: 'center',
|
|
146
|
-
alignItems: '
|
|
146
|
+
alignItems: 'center',
|
|
147
147
|
flexDirection: 'row',
|
|
148
148
|
},
|
|
149
149
|
footerText : {
|
|
150
150
|
fontSize: 12,
|
|
151
|
-
color: '#888888'
|
|
152
|
-
marginBottom: 13,
|
|
151
|
+
color: '#888888'
|
|
153
152
|
},
|
|
154
153
|
footerImage : { height: 50, width: 50 },
|
|
155
154
|
})
|
|
@@ -61,14 +61,13 @@ const styles = StyleSheet.create({
|
|
|
61
61
|
},
|
|
62
62
|
footerContainer : {
|
|
63
63
|
justifyContent: 'center',
|
|
64
|
-
alignItems: '
|
|
64
|
+
alignItems: 'center',
|
|
65
65
|
backgroundColor: '#F5F6FB',
|
|
66
66
|
flexDirection: 'row',
|
|
67
67
|
},
|
|
68
68
|
footerTextStyle : {
|
|
69
69
|
fontSize: 12,
|
|
70
|
-
color: '#888888'
|
|
71
|
-
marginBottom: 13,
|
|
70
|
+
color: '#888888'
|
|
72
71
|
},
|
|
73
72
|
footerIcon : { height: 50, width: 50 },
|
|
74
73
|
webViewContainer : {
|
|
@@ -48,14 +48,13 @@ const styles = StyleSheet.create({
|
|
|
48
48
|
},
|
|
49
49
|
bottomContainer : {
|
|
50
50
|
justifyContent: 'center',
|
|
51
|
-
alignItems: '
|
|
51
|
+
alignItems: 'center',
|
|
52
52
|
backgroundColor: '#F5F6FB',
|
|
53
53
|
flexDirection: 'row',
|
|
54
54
|
},
|
|
55
55
|
bottomText : {
|
|
56
56
|
fontSize: 12,
|
|
57
|
-
color: '#888888'
|
|
58
|
-
marginBottom: 13,
|
|
57
|
+
color: '#888888'
|
|
59
58
|
},
|
|
60
59
|
bottomImage : {
|
|
61
60
|
height: 50, width: 50
|
package/src/utility.ts
CHANGED
|
@@ -198,4 +198,27 @@ export const getPhoneNumberCodeAndCountryName = (countryCodeRef : string) : Coun
|
|
|
198
198
|
const countryDataJson = countryData as Record<string, CountryDetails>;
|
|
199
199
|
return countryDataJson[countryCodeRef];
|
|
200
200
|
|
|
201
|
-
}
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
export const formatDate = (dateStr: string) => {
|
|
204
|
+
const [datePart] = dateStr.split(' '); // "28/08/2027"
|
|
205
|
+
if (!datePart) return '';
|
|
206
|
+
const [day, month, year] = datePart.split('/');
|
|
207
|
+
|
|
208
|
+
const months = [
|
|
209
|
+
'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
|
|
210
|
+
'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'
|
|
211
|
+
];
|
|
212
|
+
|
|
213
|
+
return `${day}-${months[Number(month) - 1]}-${year}`;
|
|
214
|
+
};
|
|
215
|
+
|
|
216
|
+
export const isEmpty = (value: unknown): boolean => {
|
|
217
|
+
if (value === null || value === undefined) return true;
|
|
218
|
+
if (typeof value === 'string') return value.trim() === '';
|
|
219
|
+
if (typeof value === 'number') return isNaN(value);
|
|
220
|
+
if (typeof value === 'boolean') return false;
|
|
221
|
+
if (Array.isArray(value)) return value.length === 0;
|
|
222
|
+
if (typeof value === 'object') return Object.keys(value).length === 0;
|
|
223
|
+
return false;
|
|
224
|
+
};
|