@finspringinnovations/fixeddepositsdk 1.0.1 → 1.0.3
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/components/PendingFDBottomSheet.js +27 -18
- package/lib/config/appDataConfig.js +3 -2
- package/lib/constants/strings/fd.d.ts +2 -2
- package/lib/constants/strings/fd.js +2 -2
- package/lib/navigation/RootNavigator.js +121 -131
- package/lib/screens/FDCalculator.js +1 -1
- package/lib/screens/FDList.js +61 -34
- package/lib/screens/PaymentStatus.js +13 -0
- package/lib/screens/ReviewKYC.js +2 -1
- package/package.json +50 -50
- package/src/components/PendingFDBottomSheet.tsx +151 -123
- package/src/config/appDataConfig.ts +245 -242
- package/src/constants/strings/fd.ts +2 -2
- package/src/navigation/RootNavigator.tsx +186 -153
- package/src/screens/FDCalculator.tsx +3 -3
- package/src/screens/FDList.tsx +61 -35
- package/src/screens/PaymentStatus.tsx +16 -4
- package/src/screens/ReviewKYC.tsx +1 -0
|
@@ -301,6 +301,10 @@ const PaymentStatus = ({ onRetry, onContinue, status, transactionId, fdData }) =
|
|
|
301
301
|
}
|
|
302
302
|
}
|
|
303
303
|
};
|
|
304
|
+
// Back button: navigate to FDList for all statuses
|
|
305
|
+
const handleNavigateToFDList = () => {
|
|
306
|
+
(0, helpers_1.navigate)('FDList');
|
|
307
|
+
};
|
|
304
308
|
// Disable hardware back button on PaymentStatus screen
|
|
305
309
|
(0, react_1.useEffect)(() => {
|
|
306
310
|
if (react_native_1.Platform.OS !== 'android')
|
|
@@ -315,6 +319,8 @@ const PaymentStatus = ({ onRetry, onContinue, status, transactionId, fdData }) =
|
|
|
315
319
|
return (react_1.default.createElement(SafeAreaWrapper_1.default, { includeTop: true, bottomPadding: 0, statusBarColor: "#000000", statusBarStyle: "light-content" },
|
|
316
320
|
react_native_1.Platform.OS === 'ios' && react_1.default.createElement(react_native_1.StatusBar, { barStyle: "light-content" }),
|
|
317
321
|
react_1.default.createElement(react_native_1.View, { style: styles.container },
|
|
322
|
+
react_1.default.createElement(react_native_1.TouchableOpacity, { onPress: handleNavigateToFDList, style: styles.backIconBtn },
|
|
323
|
+
react_1.default.createElement(Ionicons_1.default, { name: "arrow-back", size: 24, color: colors.text })),
|
|
318
324
|
react_1.default.createElement(react_native_1.ScrollView, { showsVerticalScrollIndicator: false, contentContainerStyle: styles.scrollContent },
|
|
319
325
|
react_1.default.createElement(react_native_1.View, { style: styles.iconContainer },
|
|
320
326
|
react_1.default.createElement(react_native_1.View, { style: styles.iconCircleOuter },
|
|
@@ -346,6 +352,13 @@ const createStyles = (colors, typography, status) => {
|
|
|
346
352
|
flex: 1,
|
|
347
353
|
backgroundColor: colors.background,
|
|
348
354
|
},
|
|
355
|
+
backIconBtn: {
|
|
356
|
+
position: 'absolute',
|
|
357
|
+
top: 16,
|
|
358
|
+
left: 16,
|
|
359
|
+
zIndex: 10,
|
|
360
|
+
padding: 8,
|
|
361
|
+
},
|
|
349
362
|
headerTitle: {
|
|
350
363
|
fontSize: 14,
|
|
351
364
|
fontWeight: '600',
|
package/lib/screens/ReviewKYC.js
CHANGED
|
@@ -631,7 +631,8 @@ const ReviewKYC = ({ onGoBack, onContinue, initialData, }) => {
|
|
|
631
631
|
] }, kycData.useExistingAddress ? (react_1.default.createElement(react_native_1.Image, { source: { uri: (themeName === 'dark') ? base64Images_1.base64Images.checkBoxDark : base64Images_1.base64Images.filledCheckBox }, resizeMode: "cover", width: 20, height: 20 })) : ((themeName === 'dark') ? (react_1.default.createElement(react_native_1.Image, { source: { uri: base64Images_1.base64Images.unCheckBoxDark }, resizeMode: "cover", width: 20, height: 20 })) : null))),
|
|
632
632
|
react_1.default.createElement(react_native_1.Text, { style: styles.checkboxText }, "For existing customers, we'll use the address from our records. For new customers, the address from your Aadhar card will be used. To update, please raise a service request with valid address proof.")))))),
|
|
633
633
|
react_1.default.createElement(ActionButton_1.default, { title: "Continue", onPress: handleContinue, disabled: !kycData.useExistingAddress || isLoadingPanRapid || !validateForm(), loading: isLoadingPanRapid }),
|
|
634
|
-
isLoadingPanRapid && (react_1.default.createElement(react_native_1.View, { style: styles.loadingOverlay, pointerEvents: "auto" }
|
|
634
|
+
isLoadingPanRapid && (react_1.default.createElement(react_native_1.View, { style: styles.loadingOverlay, pointerEvents: "auto" },
|
|
635
|
+
react_1.default.createElement(react_native_1.ActivityIndicator, { size: "large", color: colors.primary }))),
|
|
635
636
|
isGoingBack && (react_1.default.createElement(react_native_1.View, { style: styles.loadingOverlay, pointerEvents: "auto" },
|
|
636
637
|
react_1.default.createElement(react_native_1.ActivityIndicator, { size: "large", color: colors.primary })))));
|
|
637
638
|
};
|
package/package.json
CHANGED
|
@@ -1,51 +1,51 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
2
|
+
"name": "@finspringinnovations/fixeddepositsdk",
|
|
3
|
+
"version": "1.0.3",
|
|
4
|
+
"description": "FD SDK for React Native applications",
|
|
5
|
+
"main": "lib/index.js",
|
|
6
|
+
"types": "lib/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"lib",
|
|
9
|
+
"src",
|
|
10
|
+
"README.md"
|
|
11
|
+
],
|
|
12
|
+
"scripts": {
|
|
13
|
+
"build": "tsc",
|
|
14
|
+
"clean": "rm -rf lib",
|
|
15
|
+
"prepublishOnly": "yarn clean && yarn build",
|
|
16
|
+
"lint": "eslint src --ext .ts,.tsx"
|
|
17
|
+
},
|
|
18
|
+
"keywords": [
|
|
19
|
+
"react-native",
|
|
20
|
+
"sdk",
|
|
21
|
+
"typescript",
|
|
22
|
+
"android",
|
|
23
|
+
"ios",
|
|
24
|
+
"fd"
|
|
25
|
+
],
|
|
26
|
+
"peerDependencies": {
|
|
27
|
+
"@finspringinnovations/mahindrafdsdk": ">=1.0.0",
|
|
28
|
+
"@finspringinnovations/shriramfdsdk": ">=1.0.0",
|
|
29
|
+
"react": ">=16.8.0",
|
|
30
|
+
"react-native": ">=0.60.0"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@types/react": "^18.2.0",
|
|
34
|
+
"@types/react-native": "^0.72.0",
|
|
35
|
+
"@typescript-eslint/eslint-plugin": "^6.0.0",
|
|
36
|
+
"@typescript-eslint/parser": "^6.0.0",
|
|
37
|
+
"eslint": "^8.0.0",
|
|
38
|
+
"typescript": "^5.0.0"
|
|
39
|
+
},
|
|
40
|
+
"repository": {
|
|
41
|
+
"type": "git",
|
|
42
|
+
"url": "git+https://github.com/your-org/my-sdks.git",
|
|
43
|
+
"directory": "packages/fdsdk"
|
|
44
|
+
},
|
|
45
|
+
"license": "MIT",
|
|
46
|
+
"react-native": "src/index.tsx",
|
|
47
|
+
"dependencies": {
|
|
48
|
+
"@finspringinnovations/mahindrafdsdk": "^1.0.1",
|
|
49
|
+
"@finspringinnovations/shriramfdsdk": "^1.0.1"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
Image,
|
|
12
12
|
Platform,
|
|
13
13
|
} from 'react-native';
|
|
14
|
-
|
|
14
|
+
|
|
15
15
|
import ActiveFDCard from './ActiveFDCard';
|
|
16
16
|
import ActionButton from './ActionButton';
|
|
17
17
|
import { useColors, useTypography, useSpacing, useTheme } from '../theme/ThemeContext';
|
|
@@ -54,28 +54,22 @@ const PendingFDBottomSheet: React.FC<PendingFDBottomSheetProps> = ({
|
|
|
54
54
|
const typography = useTypography();
|
|
55
55
|
const spacing = useSpacing();
|
|
56
56
|
const { themeName } = useTheme();
|
|
57
|
+
|
|
57
58
|
const styles = createStyles(colors, typography, spacing, themeName);
|
|
58
59
|
|
|
59
60
|
return (
|
|
60
|
-
<Modal
|
|
61
|
-
visible={visible}
|
|
62
|
-
transparent
|
|
63
|
-
animationType="slide"
|
|
64
|
-
onRequestClose={onClose}
|
|
65
|
-
>
|
|
61
|
+
<Modal visible={visible} transparent animationType="slide" onRequestClose={onClose}>
|
|
66
62
|
<View style={styles.overlay}>
|
|
67
63
|
<View style={styles.bottomSheet}>
|
|
68
|
-
<SafeAreaView
|
|
64
|
+
<SafeAreaView>
|
|
69
65
|
{/* Header */}
|
|
70
66
|
<View style={styles.header}>
|
|
71
67
|
<View style={styles.headerContent}>
|
|
72
68
|
<Text style={styles.title}>
|
|
73
69
|
Please Wait! You also have a pending journey with progress saved:
|
|
74
70
|
</Text>
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
onPress={onClose}
|
|
78
|
-
>
|
|
71
|
+
|
|
72
|
+
<TouchableOpacity style={styles.closeButton} onPress={onClose}>
|
|
79
73
|
<Image
|
|
80
74
|
source={{ uri: base64Images.cross }}
|
|
81
75
|
style={{ width: 14, height: 14 }}
|
|
@@ -85,11 +79,10 @@ const PendingFDBottomSheet: React.FC<PendingFDBottomSheetProps> = ({
|
|
|
85
79
|
</View>
|
|
86
80
|
</View>
|
|
87
81
|
|
|
88
|
-
{/*
|
|
82
|
+
{/* Content */}
|
|
89
83
|
<View style={styles.content}>
|
|
90
84
|
<Text style={styles.sectionTitle}>Pending FDs</Text>
|
|
91
85
|
|
|
92
|
-
{/* Active FD Card */}
|
|
93
86
|
<ActiveFDCard
|
|
94
87
|
name={pendingFDData.name}
|
|
95
88
|
invested={pendingFDData.invested}
|
|
@@ -99,9 +92,14 @@ const PendingFDBottomSheet: React.FC<PendingFDBottomSheetProps> = ({
|
|
|
99
92
|
logoType={pendingFDData.logoType}
|
|
100
93
|
/>
|
|
101
94
|
|
|
102
|
-
{
|
|
95
|
+
<View style={{ height: 24 }} />
|
|
96
|
+
|
|
97
|
+
{/* Book New */}
|
|
103
98
|
<TouchableOpacity
|
|
104
|
-
style={[
|
|
99
|
+
style={[
|
|
100
|
+
styles.bookNewButton,
|
|
101
|
+
isBookingNewLoading && styles.disabledButton,
|
|
102
|
+
]}
|
|
105
103
|
onPress={onBookNew}
|
|
106
104
|
disabled={isBookingNewLoading}
|
|
107
105
|
>
|
|
@@ -119,21 +117,21 @@ const PendingFDBottomSheet: React.FC<PendingFDBottomSheetProps> = ({
|
|
|
119
117
|
)}
|
|
120
118
|
</TouchableOpacity>
|
|
121
119
|
|
|
122
|
-
{
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
onPress={onContinue}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
120
|
+
{/* Footer */}
|
|
121
|
+
<View style={styles.footer}>
|
|
122
|
+
{themeName === 'dark' ? (
|
|
123
|
+
<ActionButton
|
|
124
|
+
title="Continue"
|
|
125
|
+
onPress={onContinue}
|
|
126
|
+
variant="primary"
|
|
127
|
+
style={styles.continueButtonWrapper}
|
|
128
|
+
/>
|
|
129
|
+
) : (
|
|
130
|
+
<TouchableOpacity style={styles.continueButton} onPress={onContinue}>
|
|
131
|
+
<Text style={styles.continueButtonText}>Continue</Text>
|
|
132
|
+
</TouchableOpacity>
|
|
133
|
+
)}
|
|
134
|
+
</View>
|
|
137
135
|
</View>
|
|
138
136
|
</SafeAreaView>
|
|
139
137
|
</View>
|
|
@@ -142,96 +140,126 @@ const PendingFDBottomSheet: React.FC<PendingFDBottomSheetProps> = ({
|
|
|
142
140
|
);
|
|
143
141
|
};
|
|
144
142
|
|
|
145
|
-
const createStyles = (
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
143
|
+
const createStyles = (
|
|
144
|
+
colors: ColorScheme,
|
|
145
|
+
typography: any,
|
|
146
|
+
spacing: any,
|
|
147
|
+
themeName: string
|
|
148
|
+
) =>
|
|
149
|
+
StyleSheet.create({
|
|
150
|
+
overlay: {
|
|
151
|
+
flex: 1,
|
|
152
|
+
backgroundColor: 'rgba(0,0,0,0.5)',
|
|
153
|
+
justifyContent: 'flex-end',
|
|
154
|
+
},
|
|
155
|
+
|
|
156
|
+
bottomSheet: {
|
|
157
|
+
padding: spacing.sm,
|
|
158
|
+
backgroundColor: themeName === 'dark' ? colors.background : 'white',
|
|
159
|
+
borderTopLeftRadius: 20,
|
|
160
|
+
borderTopRightRadius: 20,
|
|
161
|
+
borderWidth: themeName === 'dark' ? 1 : 0,
|
|
162
|
+
borderColor: themeName === 'dark' ? '#ffffff' : 'transparent',
|
|
163
|
+
maxHeight: Dimensions.get('window').height * 0.8,
|
|
164
|
+
},
|
|
165
|
+
|
|
166
|
+
header: {
|
|
167
|
+
paddingHorizontal: spacing.lg,
|
|
168
|
+
paddingTop: spacing.md,
|
|
169
|
+
paddingBottom: spacing.sm,
|
|
170
|
+
},
|
|
171
|
+
|
|
172
|
+
headerContent: {
|
|
173
|
+
flexDirection: 'row',
|
|
174
|
+
justifyContent: 'space-between',
|
|
175
|
+
alignItems: 'flex-start',
|
|
176
|
+
},
|
|
177
|
+
|
|
178
|
+
title: {
|
|
179
|
+
fontSize: 15,
|
|
180
|
+
fontWeight: '500',
|
|
181
|
+
color: themeName === 'dark' ? colors.labelColor : '#333',
|
|
182
|
+
flex: 1,
|
|
183
|
+
marginRight: spacing.md,
|
|
184
|
+
lineHeight: 24,
|
|
185
|
+
},
|
|
186
|
+
|
|
187
|
+
closeButton: {
|
|
188
|
+
width: 32,
|
|
189
|
+
height: 32,
|
|
190
|
+
borderRadius: 16,
|
|
191
|
+
backgroundColor: '#f5f5f5',
|
|
192
|
+
justifyContent: 'center',
|
|
193
|
+
alignItems: 'center',
|
|
194
|
+
},
|
|
195
|
+
|
|
196
|
+
content: {
|
|
197
|
+
paddingHorizontal: spacing.lg,
|
|
198
|
+
paddingTop: spacing.lg,
|
|
199
|
+
paddingBottom: Platform.OS === 'ios' ? 20 : spacing.lg,
|
|
200
|
+
},
|
|
201
|
+
|
|
202
|
+
sectionTitle: {
|
|
203
|
+
...typography.styles.h4,
|
|
204
|
+
color: themeName === 'dark' ? colors.labelColor : '#333',
|
|
205
|
+
marginBottom: spacing.md,
|
|
206
|
+
},
|
|
207
|
+
|
|
208
|
+
bookNewButton: {
|
|
209
|
+
marginTop: spacing.xl,
|
|
210
|
+
marginBottom: spacing.xl,
|
|
211
|
+
alignItems: 'center',
|
|
212
|
+
justifyContent: 'center',
|
|
213
|
+
paddingVertical: 12,
|
|
214
|
+
paddingHorizontal: spacing.lg,
|
|
215
|
+
borderWidth: 1,
|
|
216
|
+
borderColor: themeName === 'dark' ? colors.labelColor : '#333',
|
|
217
|
+
borderRadius: themeName === 'dark' ? 10 : 30,
|
|
218
|
+
width: 330,
|
|
219
|
+
alignSelf: 'center',
|
|
220
|
+
},
|
|
221
|
+
|
|
222
|
+
bookNewText: {
|
|
223
|
+
...typography.styles.buttonSmall,
|
|
224
|
+
color: themeName === 'dark' ? colors.labelColor : '#000',
|
|
225
|
+
// fontWeight: '500',
|
|
226
|
+
// fontSize: 14,
|
|
227
|
+
// fontFamily: 'poppins.medium',
|
|
228
|
+
},
|
|
229
|
+
|
|
230
|
+
disabledButton: {
|
|
231
|
+
opacity: 0.6,
|
|
232
|
+
},
|
|
233
|
+
|
|
234
|
+
loadingContainer: {
|
|
235
|
+
flexDirection: 'row',
|
|
236
|
+
alignItems: 'center',
|
|
237
|
+
justifyContent: 'center',
|
|
238
|
+
},
|
|
239
|
+
|
|
240
|
+
footer: {
|
|
241
|
+
paddingTop: spacing.sm,
|
|
242
|
+
},
|
|
243
|
+
|
|
244
|
+
continueButtonWrapper: {
|
|
245
|
+
marginBottom: Platform.OS === 'ios' ? spacing.lg + 20 : spacing.lg,
|
|
246
|
+
},
|
|
247
|
+
|
|
248
|
+
continueButton: {
|
|
249
|
+
height: 50,
|
|
250
|
+
backgroundColor: '#007AFF',
|
|
251
|
+
borderRadius: 25,
|
|
252
|
+
alignItems: 'center',
|
|
253
|
+
justifyContent: 'center',
|
|
254
|
+
marginBottom: Platform.OS === 'ios' ? spacing.lg + 20 : spacing.lg,
|
|
255
|
+
},
|
|
256
|
+
|
|
257
|
+
continueButtonText: {
|
|
258
|
+
...typography.styles.button,
|
|
259
|
+
color: '#fff',
|
|
260
|
+
fontWeight: '600',
|
|
261
|
+
fontSize: 16,
|
|
262
|
+
},
|
|
263
|
+
});
|
|
236
264
|
|
|
237
|
-
export default PendingFDBottomSheet;
|
|
265
|
+
export default PendingFDBottomSheet;
|