@finspringinnovations/fixeddepositsdk 1.0.2 → 1.0.4

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.
Files changed (50) hide show
  1. package/lib/api/customerApi.js +1 -0
  2. package/lib/api/fdApi.d.ts +401 -1
  3. package/lib/api/fdApi.js +24 -2
  4. package/lib/components/PendingFDBottomSheet.js +27 -18
  5. package/lib/config/appDataConfig.js +3 -2
  6. package/lib/config/workflowConstants.d.ts +40 -30
  7. package/lib/config/workflowConstants.js +35 -24
  8. package/lib/constants/strings/fd.d.ts +2 -2
  9. package/lib/constants/strings/fd.js +2 -2
  10. package/lib/navigation/RootNavigator.js +167 -196
  11. package/lib/navigation/types.d.ts +4 -1
  12. package/lib/navigation/workflowNavigator.d.ts +1 -1
  13. package/lib/navigation/workflowNavigator.js +107 -26
  14. package/lib/screens/AadhaarVerification.js +1 -11
  15. package/lib/screens/AddBankAccount.js +1 -11
  16. package/lib/screens/BankDetail.js +1 -11
  17. package/lib/screens/Employee.js +1 -11
  18. package/lib/screens/FDCalculator.js +2 -12
  19. package/lib/screens/FDList.js +531 -417
  20. package/lib/screens/FindIFSC.js +1 -11
  21. package/lib/screens/NomineeDetail.js +12 -22
  22. package/lib/screens/PayNow.js +1 -11
  23. package/lib/screens/Payment.js +2 -11
  24. package/lib/screens/PaymentStatus.js +24 -21
  25. package/lib/screens/ReviewKYC.js +3 -12
  26. package/lib/types/workflowTypes.d.ts +1 -1
  27. package/package.json +50 -50
  28. package/src/api/customerApi.ts +1 -0
  29. package/src/api/fdApi.ts +28 -1
  30. package/src/components/PendingFDBottomSheet.tsx +151 -123
  31. package/src/config/appDataConfig.ts +245 -242
  32. package/src/config/workflowConstants.ts +51 -39
  33. package/src/constants/strings/bank.ts +80 -80
  34. package/src/constants/strings/fd.ts +2 -2
  35. package/src/navigation/RootNavigator.tsx +667 -651
  36. package/src/navigation/types.ts +4 -1
  37. package/src/navigation/workflowNavigator.ts +170 -107
  38. package/src/screens/AadhaarVerification.tsx +1 -15
  39. package/src/screens/AddBankAccount.tsx +2 -16
  40. package/src/screens/BankDetail.tsx +1 -15
  41. package/src/screens/Employee.tsx +1 -15
  42. package/src/screens/FDCalculator.tsx +4 -18
  43. package/src/screens/FDList.tsx +2311 -2170
  44. package/src/screens/FindIFSC.tsx +2 -16
  45. package/src/screens/NomineeDetail.tsx +762 -775
  46. package/src/screens/PayNow.tsx +2 -16
  47. package/src/screens/Payment.tsx +190 -203
  48. package/src/screens/PaymentStatus.tsx +574 -576
  49. package/src/screens/ReviewKYC.tsx +2 -15
  50. package/src/types/workflowTypes.ts +1 -10
@@ -11,7 +11,7 @@ import {
11
11
  Image,
12
12
  Platform,
13
13
  } from 'react-native';
14
- import Icon from 'react-native-vector-icons/Ionicons';
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 style={styles.safeArea}>
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
- <TouchableOpacity
76
- style={styles.closeButton}
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
- {/* Pending FDs Section */}
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
- {/* Action Buttons */}
95
+ <View style={{ height: 24 }} />
96
+
97
+ {/* Book New */}
103
98
  <TouchableOpacity
104
- style={[styles.bookNewButton, isBookingNewLoading && styles.disabledButton]}
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
- {themeName === 'dark' ? (
123
- <ActionButton
124
- title="Continue"
125
- onPress={onContinue}
126
- variant="primary"
127
- style={styles.continueButtonWrapper}
128
- />
129
- ) : (
130
- <TouchableOpacity
131
- style={styles.continueButton}
132
- onPress={onContinue}
133
- >
134
- <Text style={styles.continueButtonText}>Continue</Text>
135
- </TouchableOpacity>
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 = (colors: ColorScheme, typography: any, spacing: any, themeName: string) => StyleSheet.create({
146
- overlay: {
147
- flex: 1,
148
- backgroundColor: 'rgba(0, 0, 0, 0.5)',
149
- justifyContent: 'flex-end',
150
- },
151
- bottomSheet: {
152
- padding: spacing.sm,
153
- backgroundColor: themeName === 'dark' ? colors.background : 'white',
154
- borderTopLeftRadius: 20,
155
- borderTopRightRadius: 20,
156
- borderWidth: themeName === 'dark' ? 1 : 0,
157
- borderColor: themeName === 'dark' ? '#ffffff' : 'transparent',
158
- maxHeight: Dimensions.get('window').height * 0.8,
159
- minHeight: Platform.OS === 'ios' ? 430 : 400,
160
- },
161
- safeArea: {
162
- flex: 1,
163
- },
164
- header: {
165
- paddingHorizontal: spacing.lg,
166
- paddingTop: spacing.md,
167
- paddingBottom: spacing.sm,
168
- },
169
- headerContent: {
170
- flexDirection: 'row',
171
- justifyContent: 'space-between',
172
- alignItems: 'flex-start',
173
- },
174
- title: {
175
- fontSize: 17,
176
- fontWeight: '500',
177
- color: themeName === 'dark' ? colors.labelColor : '#333',
178
- flex: 1,
179
- marginRight: spacing.md,
180
- lineHeight: 24,
181
- },
182
- closeButton: {
183
- width: 32,
184
- height: 32,
185
- borderRadius: 16,
186
- backgroundColor: '#f5f5f5',
187
- justifyContent: 'center',
188
- alignItems: 'center',
189
- },
190
- content: {
191
- flex: 1,
192
- paddingHorizontal: spacing.lg,
193
- paddingTop: spacing.lg,
194
- paddingBottom: Platform.OS === 'ios' ? 20 : 0,
195
- },
196
- sectionTitle: {
197
- ...typography.styles.h3,
198
- color: themeName === 'dark' ? colors.labelColor : '#333',
199
- marginBottom: spacing.md,
200
- },
201
- bookNewButton: {
202
- marginTop: spacing.xxxl,
203
- marginBottom: spacing.xxxl,
204
- alignItems: 'center',
205
- },
206
- bookNewText: {
207
- ...typography.styles.body2,
208
- color: themeName === 'dark' ? colors.labelColor : '#000000',
209
- },
210
- disabledButton: {
211
- opacity: 0.6,
212
- },
213
- loadingContainer: {
214
- flexDirection: 'row',
215
- alignItems: 'center',
216
- justifyContent: 'center',
217
- },
218
- continueButtonWrapper: {
219
- marginBottom: Platform.OS === 'ios' ? spacing.lg + 20 : spacing.lg,
220
- },
221
- continueButton: {
222
- height: 50,
223
- backgroundColor: '#007AFF',
224
- borderRadius: 25,
225
- paddingHorizontal: spacing.lg,
226
- alignItems: 'center',
227
- justifyContent: 'center',
228
- marginBottom: Platform.OS === 'ios' ? spacing.lg + 20 : spacing.lg,
229
- },
230
- continueButtonText: {
231
- ...typography.styles.button,
232
- color: 'white',
233
- fontWeight: '600',
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;