@finspringinnovations/fixeddepositsdk 1.0.2 → 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/package.json CHANGED
@@ -1,51 +1,51 @@
1
1
  {
2
- "name": "@finspringinnovations/fixeddepositsdk",
3
- "version": "1.0.2",
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
- }
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
- 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;