@propel-nsl/propel-react-native-sdk 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/fonts/Lexend-Black.ttf +0 -0
- package/assets/fonts/Lexend-Bold.ttf +0 -0
- package/assets/fonts/Lexend-ExtraBold.ttf +0 -0
- package/assets/fonts/Lexend-ExtraLight.ttf +0 -0
- package/assets/fonts/Lexend-Light.ttf +0 -0
- package/assets/fonts/Lexend-Medium.ttf +0 -0
- package/assets/fonts/Lexend-Regular.ttf +0 -0
- package/assets/fonts/Lexend-SemiBold.ttf +0 -0
- package/assets/fonts/Lexend-Thin.ttf +0 -0
- package/assets/images/HomeGoods.png +0 -0
- package/assets/images/accessories.png +0 -0
- package/assets/images/amazon.png +0 -0
- package/assets/images/apnaClubLogo.png +0 -0
- package/assets/images/apparel.png +0 -0
- package/assets/images/backgroundblue.png +0 -0
- package/assets/images/bannerCard.png +0 -0
- package/assets/images/bottomWave.png +0 -0
- package/assets/images/coin_1_1.png +0 -0
- package/assets/images/flipkart.png +0 -0
- package/assets/images/frame_1171278967.png +0 -0
- package/assets/images/gift.png +0 -0
- package/assets/images/herobanner.png +0 -0
- package/assets/images/hinduPencilsLogo.png +0 -0
- package/assets/images/icons/addwhiteicon.png +0 -0
- package/assets/images/icons/arrow-back.png +0 -0
- package/assets/images/icons/arrowgreen.png +0 -0
- package/assets/images/icons/arrowred.png +0 -0
- package/assets/images/icons/arrowright.png +0 -0
- package/assets/images/icons/arrowup.png +0 -0
- package/assets/images/icons/blackarrowdown.png +0 -0
- package/assets/images/icons/blackarrowup.png +0 -0
- package/assets/images/icons/blackcross.png +0 -0
- package/assets/images/icons/call.png +0 -0
- package/assets/images/icons/camera.png +0 -0
- package/assets/images/icons/cart.png +0 -0
- package/assets/images/icons/chat.png +0 -0
- package/assets/images/icons/circleblack.png +0 -0
- package/assets/images/icons/copy.png +0 -0
- package/assets/images/icons/cross.png +0 -0
- package/assets/images/icons/delete.png +0 -0
- package/assets/images/icons/delivery.png +0 -0
- package/assets/images/icons/eVoucher.png +0 -0
- package/assets/images/icons/editIcon.png +0 -0
- package/assets/images/icons/email.png +0 -0
- package/assets/images/icons/eye.png +0 -0
- package/assets/images/icons/faq.png +0 -0
- package/assets/images/icons/filtericon.png +0 -0
- package/assets/images/icons/greyDownArrow.png +0 -0
- package/assets/images/icons/help.png +0 -0
- package/assets/images/icons/home.png +0 -0
- package/assets/images/icons/homeinactive.png +0 -0
- package/assets/images/icons/i_blackicon.png +0 -0
- package/assets/images/icons/i_icon.png +0 -0
- package/assets/images/icons/location.png +0 -0
- package/assets/images/icons/logout.png +0 -0
- package/assets/images/icons/minus.png +0 -0
- package/assets/images/icons/myOrders.png +0 -0
- package/assets/images/icons/orders.png +0 -0
- package/assets/images/icons/pencillogo.png +0 -0
- package/assets/images/icons/pending.png +0 -0
- package/assets/images/icons/plus.png +0 -0
- package/assets/images/icons/redCross.png +0 -0
- package/assets/images/icons/redCrossicon.png +0 -0
- package/assets/images/icons/redWarningicon.png +0 -0
- package/assets/images/icons/redeem.png +0 -0
- package/assets/images/icons/redeemactive.png +0 -0
- package/assets/images/icons/redemptionHistory.png +0 -0
- package/assets/images/icons/redhelpicon.png +0 -0
- package/assets/images/icons/search.png +0 -0
- package/assets/images/icons/stopwatch.png +0 -0
- package/assets/images/icons/successTick.gif +0 -0
- package/assets/images/icons/tick.png +0 -0
- package/assets/images/icons/tnc.png +0 -0
- package/assets/images/icons/user.png +0 -0
- package/assets/images/icons/userredicon.png +0 -0
- package/assets/images/icons/wavecorner.png +0 -0
- package/assets/images/logo.png +0 -0
- package/assets/images/myntra_copy.png +0 -0
- package/assets/images/nike.png +0 -0
- package/assets/images/oq3p0u0_1.png +0 -0
- package/assets/images/profileicon.png +0 -0
- package/assets/images/topWave.png +0 -0
- package/assets/images/zagglePropelLogo.png +0 -0
- package/index.ts +23 -0
- package/lib/index.ts +25 -0
- package/package.json +70 -0
- package/src/PropelSDKScreen.tsx +98 -0
- package/src/SDKApp.tsx +540 -0
- package/src/bridge/SDKBridge.ts +104 -0
- package/src/bridge/index.ts +3 -0
- package/src/components/SDKBackHandler.tsx +187 -0
- package/src/components/SDKProfile.tsx +87 -0
- package/src/components/SDKProfileWrapper.tsx +51 -0
- package/src/constants.ts +10 -0
- package/src/contexts/SDKContext.tsx +72 -0
- package/src/hooks/useSDKBackNavigation.ts +61 -0
- package/src/navigation/SDKMainTabNavigator.tsx +315 -0
- package/src/navigation/SDKNavigator.tsx +41 -0
- package/src/redux/store.ts +32 -0
- package/src/screens/Dashboard/index.tsx +531 -0
- package/src/screens/Dashboard/styles.ts +512 -0
- package/src/screens/DeliveryAddress/index.tsx +221 -0
- package/src/screens/DeliveryAddress/styles.ts +122 -0
- package/src/screens/E-Vouchers/index.tsx +157 -0
- package/src/screens/E-Vouchers/styles.ts +106 -0
- package/src/screens/Faq/Faq.constants.ts +164 -0
- package/src/screens/Faq/index.tsx +114 -0
- package/src/screens/Faq/styles.ts +131 -0
- package/src/screens/Help/index.tsx +128 -0
- package/src/screens/Help/styles.ts +121 -0
- package/src/screens/Login/index.tsx +215 -0
- package/src/screens/Login/styles.ts +134 -0
- package/src/screens/MyCart/MyCart.constants.ts +13 -0
- package/src/screens/MyCart/index.tsx +318 -0
- package/src/screens/MyCart/styles.ts +249 -0
- package/src/screens/MyOrders/index.tsx +87 -0
- package/src/screens/MyOrders/styles.ts +281 -0
- package/src/screens/MyProfile/index.tsx +72 -0
- package/src/screens/MyProfile/styles.ts +47 -0
- package/src/screens/NewDeliveryAddress/index.tsx +360 -0
- package/src/screens/NewDeliveryAddress/styles.ts +68 -0
- package/src/screens/Onboarding/index.tsx +57 -0
- package/src/screens/Onboarding/styles.ts +60 -0
- package/src/screens/OrdersDetails/index.tsx +333 -0
- package/src/screens/OrdersDetails/styles.ts +262 -0
- package/src/screens/OtpVerification/index.tsx +283 -0
- package/src/screens/OtpVerification/styles.ts +197 -0
- package/src/screens/PaymentMethod/index.tsx +389 -0
- package/src/screens/PaymentMethod/styles.ts +246 -0
- package/src/screens/PointsLog/index.tsx +286 -0
- package/src/screens/PointsLog/styles.ts +156 -0
- package/src/screens/ProductDetails/index.tsx +682 -0
- package/src/screens/ProductDetails/styles.ts +372 -0
- package/src/screens/Profile/index.tsx +368 -0
- package/src/screens/Profile/styles.ts +158 -0
- package/src/screens/RedemptionHistory/RedemptionHistory.constants.ts +4 -0
- package/src/screens/RedemptionHistory/index.tsx +304 -0
- package/src/screens/RedemptionHistory/styles.ts +84 -0
- package/src/screens/Reedem/index.tsx +345 -0
- package/src/screens/Reedem/styles.ts +269 -0
- package/src/screens/TnC/TnC.constants.ts +169 -0
- package/src/screens/TnC/index.tsx +83 -0
- package/src/screens/TnC/styles.ts +88 -0
- package/src/screens/TransactionSuccessful/index.tsx +77 -0
- package/src/screens/TransactionSuccessful/styles.ts +77 -0
- package/src/screens/Verification/index.tsx +58 -0
- package/src/screens/Verification/styles.ts +74 -0
- package/src/screens/index.ts +23 -0
- package/src/types/index.ts +46 -0
- package/src-app/components/AmountBreakDownModal/index.tsx +86 -0
- package/src-app/components/AmountBreakDownModal/styles.ts +110 -0
- package/src-app/components/BottomNavIcons.tsx +125 -0
- package/src-app/components/Button.tsx +120 -0
- package/src-app/components/Card.tsx +47 -0
- package/src-app/components/ConfirmPopup/ConfirmPopup.constants.ts +25 -0
- package/src-app/components/ConfirmPopup/index.tsx +48 -0
- package/src-app/components/ConfirmPopup/styles.ts +167 -0
- package/src-app/components/CustomButton/index.tsx +67 -0
- package/src-app/components/CustomButton/styles.ts +44 -0
- package/src-app/components/CustomCard/index.tsx +221 -0
- package/src-app/components/CustomCard/styles.ts +184 -0
- package/src-app/components/CustomError/index.tsx +54 -0
- package/src-app/components/CustomError/styles.ts +41 -0
- package/src-app/components/CustomImage/index.tsx +37 -0
- package/src-app/components/CustomImage/styles.ts +5 -0
- package/src-app/components/CustomLoader/index.tsx +45 -0
- package/src-app/components/CustomLoader/styles.ts +35 -0
- package/src-app/components/CustomMessagePopUp/index.tsx +51 -0
- package/src-app/components/CustomMessagePopUp/styles.ts +74 -0
- package/src-app/components/CustomProductCard/index.tsx +13 -0
- package/src-app/components/CustomProductCard/styles.ts +5 -0
- package/src-app/components/FilterModal.tsx +372 -0
- package/src-app/components/Footer/index.tsx +23 -0
- package/src-app/components/Footer/styles.ts +37 -0
- package/src-app/components/Icon.tsx +80 -0
- package/src-app/components/Logout/index.tsx +82 -0
- package/src-app/components/Logout/styles.ts +116 -0
- package/src-app/components/MobileHeader.tsx +141 -0
- package/src-app/components/NoDataFound/index.tsx +18 -0
- package/src-app/components/NoDataFound/styles.ts +26 -0
- package/src-app/components/OTPModal.tsx +747 -0
- package/src-app/components/ProfileField.tsx +47 -0
- package/src-app/components/QuantityModal/index.tsx +113 -0
- package/src-app/components/QuantityModal/styles.ts +84 -0
- package/src-app/components/TabBarIcons.tsx +110 -0
- package/src-app/components/TextInput.tsx +79 -0
- package/src-app/components/ToastConfig.tsx +60 -0
- package/src-app/components/index.ts +18 -0
- package/src-app/config/env.ts +22 -0
- package/src-app/constants/Fonts.ts +12 -0
- package/src-app/constants/Formatter.ts +39 -0
- package/src-app/constants/HtmlSanitization.ts +46 -0
- package/src-app/constants/Images.ts +81 -0
- package/src-app/constants/Labels.ts +8 -0
- package/src-app/constants/Messages.ts +108 -0
- package/src-app/constants/Routes.ts +17 -0
- package/src-app/constants/Scaling.ts +5 -0
- package/src-app/constants/Text.ts +8 -0
- package/src-app/constants/offSets.ts +18 -0
- package/src-app/hooks/useAppDispatch.ts +4 -0
- package/src-app/hooks/useAppSelector.ts +4 -0
- package/src-app/hooks/useBackHandler.ts +47 -0
- package/src-app/hooks/useScreenBackHandler.ts +91 -0
- package/src-app/navigation/AppNavigator.tsx +34 -0
- package/src-app/navigation/MainTabNavigator.tsx +294 -0
- package/src-app/redux/authSaga.ts +605 -0
- package/src-app/redux/authSlice.ts +754 -0
- package/src-app/redux/rootSaga.ts +6 -0
- package/src-app/redux/store.ts +25 -0
- package/src-app/services/api.ts +14 -0
- package/src-app/services/endpoints.ts +33 -0
- package/src-app/services/index.ts +574 -0
- package/src-app/services/sdkCredentials.ts +44 -0
- package/src-app/styles/colors.ts +85 -0
- package/src-app/styles/shared.ts +112 -0
- package/src-app/types/authTypes.ts +155 -0
- package/src-app/types/navigation.ts +99 -0
- package/src-app/utils/Validation.ts +48 -0
- package/src-app/utils/filterPins.ts +29 -0
- package/src-app/utils/navigationUtils.ts +43 -0
- package/src-app/utils/useHardwareBack.ts +21 -0
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View, Text, TouchableOpacity, StyleSheet, Platform, StatusBar } from 'react-native';
|
|
3
|
+
// Safe area on iOS is handled natively by PropelSDKViewController (safeAreaLayoutGuide)
|
|
4
|
+
import { typography } from '../styles/shared';
|
|
5
|
+
import FontFamily from '../constants/Fonts';
|
|
6
|
+
import CustomImage from './CustomImage';
|
|
7
|
+
import Images from '../constants/Images';
|
|
8
|
+
import { VSCALE, SCALE, MSCALE } from '../constants/Scaling';
|
|
9
|
+
import { colors } from '../styles/colors';
|
|
10
|
+
|
|
11
|
+
interface MobileHeaderProps {
|
|
12
|
+
title?: string;
|
|
13
|
+
icon?: number | { uri: string };
|
|
14
|
+
showBack?: boolean;
|
|
15
|
+
onBack?: () => void;
|
|
16
|
+
disableSafeAreaPadding?: boolean;
|
|
17
|
+
iconPress? : () => void
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const MobileHeader: React.FC<MobileHeaderProps> = ({
|
|
21
|
+
title,
|
|
22
|
+
showBack = false,
|
|
23
|
+
onBack,
|
|
24
|
+
disableSafeAreaPadding = false,
|
|
25
|
+
icon,
|
|
26
|
+
iconPress
|
|
27
|
+
}) => {
|
|
28
|
+
// On iOS, the native PropelSDKViewController constrains the RN view below the safe area,
|
|
29
|
+
// so no top padding is needed here. On Android, use StatusBar.currentHeight.
|
|
30
|
+
const androidPadding = disableSafeAreaPadding
|
|
31
|
+
? StatusBar.currentHeight || 0
|
|
32
|
+
: (StatusBar.currentHeight || 0) + 20;
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<View
|
|
36
|
+
style={[
|
|
37
|
+
styles.container,
|
|
38
|
+
Platform.OS === 'android' && { paddingTop: androidPadding },
|
|
39
|
+
]}
|
|
40
|
+
>
|
|
41
|
+
{(showBack || title) && (
|
|
42
|
+
<View style={styles.header}>
|
|
43
|
+
{showBack && (
|
|
44
|
+
<TouchableOpacity onPress={onBack} style={styles.backButton}>
|
|
45
|
+
<CustomImage
|
|
46
|
+
source={Images.arrowBack}
|
|
47
|
+
imgStyle={styles.backIcon}
|
|
48
|
+
/>
|
|
49
|
+
</TouchableOpacity>
|
|
50
|
+
)}
|
|
51
|
+
{title && (
|
|
52
|
+
<Text style={[styles.title, showBack && styles.titleWithBack]}>
|
|
53
|
+
{title}
|
|
54
|
+
</Text>
|
|
55
|
+
)}
|
|
56
|
+
{icon && (
|
|
57
|
+
<TouchableOpacity activeOpacity={0.7} onPress={iconPress} style={styles.backButton}>
|
|
58
|
+
<CustomImage source={icon} imgStyle={styles.imgStyle} />
|
|
59
|
+
</TouchableOpacity>
|
|
60
|
+
)}
|
|
61
|
+
</View>
|
|
62
|
+
)}
|
|
63
|
+
</View>
|
|
64
|
+
);
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
const styles = StyleSheet.create({
|
|
68
|
+
container: {
|
|
69
|
+
backgroundColor: colors.background,
|
|
70
|
+
paddingHorizontal: SCALE(16),
|
|
71
|
+
// paddingBottom: VSCALE(8),
|
|
72
|
+
},
|
|
73
|
+
statusBar: {
|
|
74
|
+
flexDirection: 'row',
|
|
75
|
+
justifyContent: 'space-between',
|
|
76
|
+
alignItems: 'center',
|
|
77
|
+
marginBottom: VSCALE(12),
|
|
78
|
+
},
|
|
79
|
+
statusIcons: {
|
|
80
|
+
flexDirection: 'row',
|
|
81
|
+
alignItems: 'center',
|
|
82
|
+
gap: SCALE(8),
|
|
83
|
+
},
|
|
84
|
+
signalBars: {
|
|
85
|
+
flexDirection: 'row',
|
|
86
|
+
alignItems: 'flex-end',
|
|
87
|
+
gap: SCALE(2),
|
|
88
|
+
},
|
|
89
|
+
bar: {
|
|
90
|
+
width: SCALE(3),
|
|
91
|
+
backgroundColor: colors.onSurface,
|
|
92
|
+
borderRadius: SCALE(1),
|
|
93
|
+
},
|
|
94
|
+
battery: {
|
|
95
|
+
width: SCALE(24),
|
|
96
|
+
height: VSCALE(12),
|
|
97
|
+
borderWidth: SCALE(1),
|
|
98
|
+
borderColor: colors.onSurface,
|
|
99
|
+
borderRadius: SCALE(2),
|
|
100
|
+
padding: SCALE(1),
|
|
101
|
+
},
|
|
102
|
+
batteryLevel: {
|
|
103
|
+
flex: 0.8,
|
|
104
|
+
backgroundColor: colors.onSurface,
|
|
105
|
+
borderRadius: SCALE(1),
|
|
106
|
+
},
|
|
107
|
+
header: {
|
|
108
|
+
flexDirection: 'row',
|
|
109
|
+
alignItems: 'center',
|
|
110
|
+
justifyContent: 'space-between',
|
|
111
|
+
},
|
|
112
|
+
backButton: {
|
|
113
|
+
padding: SCALE(10),
|
|
114
|
+
minWidth: SCALE(44),
|
|
115
|
+
minHeight: VSCALE(44),
|
|
116
|
+
justifyContent: 'center' as const,
|
|
117
|
+
},
|
|
118
|
+
title: {
|
|
119
|
+
...typography.h3,
|
|
120
|
+
color: colors.onSurface,
|
|
121
|
+
textAlign: 'center',
|
|
122
|
+
flex: 1,
|
|
123
|
+
fontFamily: FontFamily.LEXEND_REGULAR,
|
|
124
|
+
fontSize: MSCALE(16),
|
|
125
|
+
},
|
|
126
|
+
titleWithBack: {
|
|
127
|
+
marginRight: SCALE(32),
|
|
128
|
+
},
|
|
129
|
+
backIcon: {
|
|
130
|
+
height: VSCALE(18),
|
|
131
|
+
width: SCALE(20),
|
|
132
|
+
resizeMode: 'contain',
|
|
133
|
+
},
|
|
134
|
+
imgStyle: {
|
|
135
|
+
height: VSCALE(24),
|
|
136
|
+
width: SCALE(24),
|
|
137
|
+
resizeMode: 'contain',
|
|
138
|
+
},
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
export default MobileHeader;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { View, Text } from 'react-native';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import styles from './styles';
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
containerstyle?: object;
|
|
7
|
+
}
|
|
8
|
+
const NoDataFound: React.FC<Props> = ({ containerstyle }) => {
|
|
9
|
+
return (
|
|
10
|
+
<View style={[styles.container, containerstyle]}>
|
|
11
|
+
<View style={styles.content}>
|
|
12
|
+
<Text style={styles.text}>No Data Found</Text>
|
|
13
|
+
</View>
|
|
14
|
+
</View>
|
|
15
|
+
);
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export default NoDataFound;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native';
|
|
2
|
+
import FontFamily from '../../constants/Fonts';
|
|
3
|
+
import { VSCALE } from '../../constants/Scaling';
|
|
4
|
+
|
|
5
|
+
const styles = StyleSheet.create({
|
|
6
|
+
container: {
|
|
7
|
+
flex: 1,
|
|
8
|
+
justifyContent: 'center',
|
|
9
|
+
alignItems: 'center',
|
|
10
|
+
paddingVertical: VSCALE(40),
|
|
11
|
+
},
|
|
12
|
+
content: {
|
|
13
|
+
padding: VSCALE(20),
|
|
14
|
+
alignItems: 'center',
|
|
15
|
+
justifyContent: 'center',
|
|
16
|
+
},
|
|
17
|
+
text: {
|
|
18
|
+
fontSize: VSCALE(16),
|
|
19
|
+
color: '#1F2937',
|
|
20
|
+
fontWeight: '500',
|
|
21
|
+
fontFamily: FontFamily.LEXEND_MEDIUM,
|
|
22
|
+
textAlign: 'center',
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
export default styles;
|