@finspringinnovations/fdsdk 0.0.1
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/README.md +184 -0
- package/lib/api/applicationApi.d.ts +1 -0
- package/lib/api/applicationApi.js +11 -0
- package/lib/api/bankApi.d.ts +352 -0
- package/lib/api/bankApi.js +54 -0
- package/lib/api/baseApi.d.ts +8 -0
- package/lib/api/baseApi.js +456 -0
- package/lib/api/customerApi.d.ts +855 -0
- package/lib/api/customerApi.js +213 -0
- package/lib/api/fdApi.d.ts +979 -0
- package/lib/api/fdApi.js +112 -0
- package/lib/api/fdCalculatorApi.d.ts +179 -0
- package/lib/api/fdCalculatorApi.js +36 -0
- package/lib/api/index.d.ts +14 -0
- package/lib/api/index.js +45 -0
- package/lib/api/interestRateApi.d.ts +585 -0
- package/lib/api/interestRateApi.js +101 -0
- package/lib/api/kycApi.d.ts +486 -0
- package/lib/api/kycApi.js +71 -0
- package/lib/api/masterDataApi.d.ts +158 -0
- package/lib/api/masterDataApi.js +32 -0
- package/lib/api/nomineeApi.d.ts +325 -0
- package/lib/api/nomineeApi.js +46 -0
- package/lib/api/onboardingApi.d.ts +192 -0
- package/lib/api/onboardingApi.js +41 -0
- package/lib/api/panApi.d.ts +0 -0
- package/lib/api/panApi.js +23 -0
- package/lib/api/paymentApi.d.ts +325 -0
- package/lib/api/paymentApi.js +46 -0
- package/lib/api/workflowApi.d.ts +654 -0
- package/lib/api/workflowApi.js +90 -0
- package/lib/assets/images/images.d.ts +4 -0
- package/lib/assets/images/images.js +10 -0
- package/lib/components/AadhaarInput.d.ts +13 -0
- package/lib/components/AadhaarInput.js +47 -0
- package/lib/components/ActionButton.d.ts +12 -0
- package/lib/components/ActionButton.js +87 -0
- package/lib/components/ActiveFDCard.d.ts +16 -0
- package/lib/components/ActiveFDCard.js +95 -0
- package/lib/components/AmountInput.d.ts +20 -0
- package/lib/components/AmountInput.js +144 -0
- package/lib/components/CheckboxOption.d.ts +11 -0
- package/lib/components/CheckboxOption.js +41 -0
- package/lib/components/CompanyHeader.d.ts +7 -0
- package/lib/components/CompanyHeader.js +57 -0
- package/lib/components/DropdownSelector.d.ts +9 -0
- package/lib/components/DropdownSelector.js +49 -0
- package/lib/components/EmptyState.d.ts +17 -0
- package/lib/components/EmptyState.js +44 -0
- package/lib/components/ErrorDisplay.d.ts +17 -0
- package/lib/components/ErrorDisplay.js +69 -0
- package/lib/components/FAQItem.d.ts +9 -0
- package/lib/components/FAQItem.js +52 -0
- package/lib/components/FDCard.d.ts +21 -0
- package/lib/components/FDCard.js +96 -0
- package/lib/components/FormDropdown.d.ts +18 -0
- package/lib/components/FormDropdown.js +155 -0
- package/lib/components/FormSection.d.ts +14 -0
- package/lib/components/FormSection.js +38 -0
- package/lib/components/Header.d.ts +14 -0
- package/lib/components/Header.js +52 -0
- package/lib/components/IFSCSearchResultCard.d.ts +13 -0
- package/lib/components/IFSCSearchResultCard.js +70 -0
- package/lib/components/InfoBox.d.ts +8 -0
- package/lib/components/InfoBox.js +39 -0
- package/lib/components/InterestRateCard.d.ts +8 -0
- package/lib/components/InterestRateCard.js +46 -0
- package/lib/components/LoadingIndicator.d.ts +12 -0
- package/lib/components/LoadingIndicator.js +30 -0
- package/lib/components/OTPInput.d.ts +17 -0
- package/lib/components/OTPInput.js +144 -0
- package/lib/components/PaymentDetailsCard.d.ts +20 -0
- package/lib/components/PaymentDetailsCard.js +68 -0
- package/lib/components/PendingFDBottomSheet.d.ts +18 -0
- package/lib/components/PendingFDBottomSheet.js +122 -0
- package/lib/components/SafeAreaWrapper.d.ts +13 -0
- package/lib/components/SafeAreaWrapper.js +41 -0
- package/lib/components/ScreenHeader.d.ts +11 -0
- package/lib/components/ScreenHeader.js +46 -0
- package/lib/components/StatusDisplay.d.ts +15 -0
- package/lib/components/StatusDisplay.js +88 -0
- package/lib/components/TextFieldWithLabel.d.ts +46 -0
- package/lib/components/TextFieldWithLabel.js +326 -0
- package/lib/components/TrustBox.d.ts +8 -0
- package/lib/components/TrustBox.js +45 -0
- package/lib/components/ValidationErrorAlert.d.ts +23 -0
- package/lib/components/ValidationErrorAlert.js +39 -0
- package/lib/components/ValidationMessage.d.ts +9 -0
- package/lib/components/ValidationMessage.js +98 -0
- package/lib/components/index.d.ts +35 -0
- package/lib/components/index.js +64 -0
- package/lib/config/apiConfig.d.ts +34 -0
- package/lib/config/apiConfig.js +158 -0
- package/lib/config/appDataConfig.d.ts +114 -0
- package/lib/config/appDataConfig.js +264 -0
- package/lib/config/encryptionConfig.d.ts +21 -0
- package/lib/config/encryptionConfig.js +61 -0
- package/lib/config/workflowConstants.d.ts +37 -0
- package/lib/config/workflowConstants.js +38 -0
- package/lib/constants/strings/bank.d.ts +72 -0
- package/lib/constants/strings/bank.js +86 -0
- package/lib/constants/strings/base64Images.d.ts +25 -0
- package/lib/constants/strings/base64Images.js +28 -0
- package/lib/constants/strings/common.d.ts +53 -0
- package/lib/constants/strings/common.js +62 -0
- package/lib/constants/strings/employee.d.ts +61 -0
- package/lib/constants/strings/employee.js +77 -0
- package/lib/constants/strings/faq.d.ts +14 -0
- package/lib/constants/strings/faq.js +20 -0
- package/lib/constants/strings/fd.d.ts +122 -0
- package/lib/constants/strings/fd.js +151 -0
- package/lib/constants/strings/home.d.ts +49 -0
- package/lib/constants/strings/home.js +62 -0
- package/lib/constants/strings/index.d.ts +16 -0
- package/lib/constants/strings/index.js +44 -0
- package/lib/constants/strings/kyc.d.ts +80 -0
- package/lib/constants/strings/kyc.js +94 -0
- package/lib/constants/strings/nominee.d.ts +64 -0
- package/lib/constants/strings/nominee.js +81 -0
- package/lib/hooks/useAuth.d.ts +25 -0
- package/lib/hooks/useAuth.js +39 -0
- package/lib/hooks/useFDData.d.ts +11 -0
- package/lib/hooks/useFDData.js +40 -0
- package/lib/index.d.ts +69 -0
- package/lib/index.js +182 -0
- package/lib/navigation/RootNavigator.d.ts +8 -0
- package/lib/navigation/RootNavigator.js +205 -0
- package/lib/navigation/SimpleNavigator.d.ts +11 -0
- package/lib/navigation/SimpleNavigator.js +107 -0
- package/lib/navigation/helpers.d.ts +11 -0
- package/lib/navigation/helpers.js +83 -0
- package/lib/navigation/index.d.ts +15 -0
- package/lib/navigation/index.js +42 -0
- package/lib/navigation/types.d.ts +113 -0
- package/lib/navigation/types.js +2 -0
- package/lib/navigation/workflowNavigator.d.ts +22 -0
- package/lib/navigation/workflowNavigator.js +104 -0
- package/lib/providers/ApiProvider.d.ts +7 -0
- package/lib/providers/ApiProvider.js +34 -0
- package/lib/providers/MasterDataProvider.d.ts +10 -0
- package/lib/providers/MasterDataProvider.js +54 -0
- package/lib/screens/AadhaarVerification.d.ts +7 -0
- package/lib/screens/AadhaarVerification.js +627 -0
- package/lib/screens/AddBankAccount.d.ts +22 -0
- package/lib/screens/AddBankAccount.js +381 -0
- package/lib/screens/BankDetail.d.ts +16 -0
- package/lib/screens/BankDetail.js +596 -0
- package/lib/screens/BookFD.d.ts +0 -0
- package/lib/screens/BookFD.js +315 -0
- package/lib/screens/Employee.d.ts +18 -0
- package/lib/screens/Employee.js +594 -0
- package/lib/screens/FDCalculator.d.ts +18 -0
- package/lib/screens/FDCalculator.js +759 -0
- package/lib/screens/FDList.d.ts +27 -0
- package/lib/screens/FDList.js +1008 -0
- package/lib/screens/FindIFSC.d.ts +16 -0
- package/lib/screens/FindIFSC.js +248 -0
- package/lib/screens/Home.d.ts +0 -0
- package/lib/screens/Home.js +143 -0
- package/lib/screens/NomineeDetail.d.ts +17 -0
- package/lib/screens/NomineeDetail.js +592 -0
- package/lib/screens/PayNow.d.ts +14 -0
- package/lib/screens/PayNow.js +230 -0
- package/lib/screens/Payment.d.ts +11 -0
- package/lib/screens/Payment.js +191 -0
- package/lib/screens/PaymentStatus.d.ts +16 -0
- package/lib/screens/PaymentStatus.js +397 -0
- package/lib/screens/ReviewKYC.d.ts +21 -0
- package/lib/screens/ReviewKYC.js +660 -0
- package/lib/state/paymentSession.d.ts +8 -0
- package/lib/state/paymentSession.js +13 -0
- package/lib/store/fdListSelectedSlice.d.ts +21 -0
- package/lib/store/fdListSelectedSlice.js +26 -0
- package/lib/store/hooks.d.ts +8 -0
- package/lib/store/hooks.js +31 -0
- package/lib/store/index.d.ts +3 -0
- package/lib/store/index.js +8 -0
- package/lib/store/onboardingSlice.d.ts +12 -0
- package/lib/store/onboardingSlice.js +32 -0
- package/lib/store/store.d.ts +13 -0
- package/lib/store/store.js +33 -0
- package/lib/theme/ThemeContext.d.ts +210 -0
- package/lib/theme/ThemeContext.js +90 -0
- package/lib/theme/colors.d.ts +80 -0
- package/lib/theme/colors.js +85 -0
- package/lib/theme/index.d.ts +34 -0
- package/lib/theme/index.js +69 -0
- package/lib/theme/shadows.d.ts +53 -0
- package/lib/theme/shadows.js +58 -0
- package/lib/theme/typography.d.ts +134 -0
- package/lib/theme/typography.js +143 -0
- package/lib/types/dataTypes.d.ts +34 -0
- package/lib/types/dataTypes.js +2 -0
- package/lib/types/workflowTypes.d.ts +2 -0
- package/lib/types/workflowTypes.js +2 -0
- package/lib/utils/apiLogger.d.ts +48 -0
- package/lib/utils/apiLogger.js +105 -0
- package/lib/utils/encryption.d.ts +28 -0
- package/lib/utils/encryption.js +113 -0
- package/lib/utils/getFDData.d.ts +48 -0
- package/lib/utils/getFDData.js +154 -0
- package/lib/utils/globalData.d.ts +2 -0
- package/lib/utils/globalData.js +10 -0
- package/package.json +76 -0
- package/src/api/applicationApi.ts +12 -0
- package/src/api/bankApi.ts +42 -0
- package/src/api/baseApi.ts +513 -0
- package/src/api/customerApi.ts +291 -0
- package/src/api/fdApi.ts +150 -0
- package/src/api/fdCalculatorApi.ts +41 -0
- package/src/api/index.ts +29 -0
- package/src/api/interestRateApi.ts +143 -0
- package/src/api/kycApi.ts +63 -0
- package/src/api/masterDataApi.ts +34 -0
- package/src/api/nomineeApi.ts +34 -0
- package/src/api/onboardingApi.ts +64 -0
- package/src/api/panApi.ts +25 -0
- package/src/api/paymentApi.ts +34 -0
- package/src/api/workflowApi.ts +94 -0
- package/src/assets/images/arrow-filled.png +0 -0
- package/src/assets/images/arrow-left.png +0 -0
- package/src/assets/images/backicon.png +0 -0
- package/src/assets/images/calendar.png +0 -0
- package/src/assets/images/chevron-down.png +0 -0
- package/src/assets/images/chevron-down@2x.png +0 -0
- package/src/assets/images/chevron-down@3x.png +0 -0
- package/src/assets/images/images.js +8 -0
- package/src/components/AadhaarInput.tsx +91 -0
- package/src/components/ActionButton.tsx +129 -0
- package/src/components/ActiveFDCard.tsx +158 -0
- package/src/components/AmountInput.tsx +217 -0
- package/src/components/CheckboxOption.tsx +93 -0
- package/src/components/CompanyHeader.tsx +78 -0
- package/src/components/DropdownSelector.tsx +77 -0
- package/src/components/EmptyState.tsx +109 -0
- package/src/components/ErrorDisplay.tsx +135 -0
- package/src/components/FAQItem.tsx +90 -0
- package/src/components/FDCard.tsx +165 -0
- package/src/components/FormDropdown.tsx +214 -0
- package/src/components/FormSection.tsx +86 -0
- package/src/components/Header.tsx +110 -0
- package/src/components/IFSCSearchResultCard.tsx +139 -0
- package/src/components/InfoBox.tsx +55 -0
- package/src/components/InterestRateCard.tsx +77 -0
- package/src/components/LoadingIndicator.tsx +63 -0
- package/src/components/OTPInput.tsx +213 -0
- package/src/components/PaymentDetailsCard.tsx +120 -0
- package/src/components/PendingFDBottomSheet.tsx +235 -0
- package/src/components/README.md +210 -0
- package/src/components/SafeAreaWrapper.tsx +68 -0
- package/src/components/ScreenHeader.tsx +83 -0
- package/src/components/StatusDisplay.tsx +139 -0
- package/src/components/TextFieldWithLabel.tsx +502 -0
- package/src/components/TrustBox.tsx +63 -0
- package/src/components/ValidationErrorAlert.tsx +57 -0
- package/src/components/ValidationMessage.tsx +134 -0
- package/src/components/index.tsx +47 -0
- package/src/config/apiConfig.ts +217 -0
- package/src/config/appDataConfig.ts +279 -0
- package/src/config/encryptionConfig.ts +65 -0
- package/src/config/workflowConstants.ts +43 -0
- package/src/constants/strings/README.md +146 -0
- package/src/constants/strings/bank.ts +92 -0
- package/src/constants/strings/base64Images.ts +29 -0
- package/src/constants/strings/common.ts +63 -0
- package/src/constants/strings/employee.ts +85 -0
- package/src/constants/strings/faq.ts +23 -0
- package/src/constants/strings/fd.ts +172 -0
- package/src/constants/strings/home.ts +67 -0
- package/src/constants/strings/index.ts +21 -0
- package/src/constants/strings/kyc.ts +100 -0
- package/src/constants/strings/nominee.ts +90 -0
- package/src/hooks/useAuth.ts +42 -0
- package/src/hooks/useFDData.ts +48 -0
- package/src/index.tsx +173 -0
- package/src/navigation/RootNavigator.tsx +352 -0
- package/src/navigation/SimpleNavigator.tsx +107 -0
- package/src/navigation/helpers.ts +85 -0
- package/src/navigation/index.tsx +81 -0
- package/src/navigation/types.ts +124 -0
- package/src/navigation/workflowNavigator.ts +131 -0
- package/src/providers/ApiProvider.tsx +43 -0
- package/src/providers/MasterDataProvider.tsx +30 -0
- package/src/screens/AadhaarVerification.tsx +809 -0
- package/src/screens/AddBankAccount.tsx +541 -0
- package/src/screens/BankDetail.tsx +826 -0
- package/src/screens/BookFD.tsx +330 -0
- package/src/screens/Employee.tsx +822 -0
- package/src/screens/FDCalculator.tsx +987 -0
- package/src/screens/FDList.tsx +1284 -0
- package/src/screens/FindIFSC.tsx +332 -0
- package/src/screens/Home.tsx +152 -0
- package/src/screens/NomineeDetail.tsx +800 -0
- package/src/screens/PayNow.tsx +282 -0
- package/src/screens/Payment.tsx +224 -0
- package/src/screens/PaymentStatus.tsx +561 -0
- package/src/screens/ReviewKYC.tsx +956 -0
- package/src/state/paymentSession.ts +13 -0
- package/src/store/fdListSelectedSlice.ts +42 -0
- package/src/store/hooks.ts +27 -0
- package/src/store/index.ts +3 -0
- package/src/store/onboardingSlice.ts +37 -0
- package/src/store/store.ts +35 -0
- package/src/theme/ThemeContext.tsx +82 -0
- package/src/theme/colors.ts +90 -0
- package/src/theme/index.ts +64 -0
- package/src/theme/shadows.ts +61 -0
- package/src/theme/typography.ts +151 -0
- package/src/types/dataTypes.ts +37 -0
- package/src/types/env.d.ts +93 -0
- package/src/types/workflowTypes.ts +12 -0
- package/src/utils/apiLogger.ts +166 -0
- package/src/utils/encryption.ts +159 -0
- package/src/utils/getFDData.ts +175 -0
- package/src/utils/globalData.ts +7 -0
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
View,
|
|
4
|
+
Text,
|
|
5
|
+
StyleSheet,
|
|
6
|
+
Platform,
|
|
7
|
+
} from 'react-native';
|
|
8
|
+
import { useColors, useTypography, useSpacing, useShadows, useTheme } from '../theme/ThemeContext';
|
|
9
|
+
import { getBorderColor } from '../theme';
|
|
10
|
+
import type { ColorScheme, ThemeName } from '../theme';
|
|
11
|
+
|
|
12
|
+
// Enable Fast Refresh for this module
|
|
13
|
+
if (__DEV__) {
|
|
14
|
+
// @ts-ignore
|
|
15
|
+
module.hot?.accept();
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
interface ActiveFDCardProps {
|
|
19
|
+
name: string;
|
|
20
|
+
invested: number;
|
|
21
|
+
value: number;
|
|
22
|
+
returns: number;
|
|
23
|
+
maturityDate: string;
|
|
24
|
+
customStyles?: {
|
|
25
|
+
container?: object;
|
|
26
|
+
name?: object;
|
|
27
|
+
amount?: object;
|
|
28
|
+
returns?: object;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const ActiveFDCard: React.FC<ActiveFDCardProps> = ({
|
|
33
|
+
name,
|
|
34
|
+
invested,
|
|
35
|
+
value,
|
|
36
|
+
returns,
|
|
37
|
+
maturityDate,
|
|
38
|
+
customStyles = {},
|
|
39
|
+
}) => {
|
|
40
|
+
const colors = useColors();
|
|
41
|
+
const typography = useTypography();
|
|
42
|
+
const spacing = useSpacing();
|
|
43
|
+
const shadows = useShadows();
|
|
44
|
+
const { themeName } = useTheme();
|
|
45
|
+
|
|
46
|
+
const styles = createStyles(colors, typography, spacing, shadows, themeName);
|
|
47
|
+
|
|
48
|
+
const formatCurrency = (amount: number) => {
|
|
49
|
+
return amount.toLocaleString('en-IN');
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
return (
|
|
53
|
+
<View style={[styles.activeFDCard, customStyles.container]}>
|
|
54
|
+
<View style={styles.activeFDHeader}>
|
|
55
|
+
<Text style={[styles.activeFDName, customStyles.name]}>{name}</Text>
|
|
56
|
+
<View style={styles.maturityContainer}>
|
|
57
|
+
<Text style={styles.maturityLabel}>Maturity Date</Text>
|
|
58
|
+
<Text style={styles.maturityDate}>{maturityDate}</Text>
|
|
59
|
+
</View>
|
|
60
|
+
</View>
|
|
61
|
+
|
|
62
|
+
<View style={styles.activeFDDetails}>
|
|
63
|
+
<View style={styles.activeFDLeft}>
|
|
64
|
+
<Text style={styles.activeFDLabel}>Invested</Text>
|
|
65
|
+
<Text style={[styles.activeFDAmount, customStyles.amount]}>
|
|
66
|
+
₹ {formatCurrency(invested)}
|
|
67
|
+
</Text>
|
|
68
|
+
</View>
|
|
69
|
+
<View style={styles.activeFDRight}>
|
|
70
|
+
<Text style={styles.activeFDLabel}>Value</Text>
|
|
71
|
+
<Text style={[styles.activeFDAmount, customStyles.amount]}>
|
|
72
|
+
₹ {formatCurrency(value)}
|
|
73
|
+
</Text>
|
|
74
|
+
<Text style={[styles.activeFDReturns, customStyles.returns]}>
|
|
75
|
+
{returns}%
|
|
76
|
+
</Text>
|
|
77
|
+
</View>
|
|
78
|
+
</View>
|
|
79
|
+
</View>
|
|
80
|
+
);
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
const createStyles = (colors: ColorScheme, typography: any, spacing: any, shadows: any, themeName: ThemeName) => StyleSheet.create({
|
|
84
|
+
activeFDCard: {
|
|
85
|
+
backgroundColor: colors.surface,
|
|
86
|
+
borderRadius: 4, // Reduced corner radius
|
|
87
|
+
padding: spacing.md,
|
|
88
|
+
borderWidth: themeName === 'dark' ? 1 : 0.5, // Same as FDCard
|
|
89
|
+
borderColor: themeName === 'dark' ? colors.border : getBorderColor({ colors } as any, 0.36), // Same as FDCard
|
|
90
|
+
shadowColor: '#000000',
|
|
91
|
+
shadowOffset: {
|
|
92
|
+
width: 0,
|
|
93
|
+
height: 2,
|
|
94
|
+
},
|
|
95
|
+
shadowOpacity: 0.1, // 10% shadow spread
|
|
96
|
+
shadowRadius: 4,
|
|
97
|
+
elevation: 3,
|
|
98
|
+
},
|
|
99
|
+
activeFDHeader: {
|
|
100
|
+
marginTop: -8,
|
|
101
|
+
flexDirection: 'row',
|
|
102
|
+
justifyContent: 'space-between',
|
|
103
|
+
alignItems: 'center', // Changed to center for vertical alignment
|
|
104
|
+
marginBottom: spacing.sm, // Reduced from lg to sm to decrease card height
|
|
105
|
+
},
|
|
106
|
+
activeFDName: {
|
|
107
|
+
...typography.styles.text14Medium, // 14px font size
|
|
108
|
+
fontWeight: '600',
|
|
109
|
+
color: colors.text,
|
|
110
|
+
flex: 1,
|
|
111
|
+
lineHeight: Platform.OS === 'ios' ? (typography.styles.text14Medium?.lineHeight ?? 14) + 3 : typography.styles.text14Medium?.lineHeight,
|
|
112
|
+
},
|
|
113
|
+
maturityContainer: {
|
|
114
|
+
alignItems: 'flex-end',
|
|
115
|
+
},
|
|
116
|
+
maturityLabel: {
|
|
117
|
+
...typography.styles.text10Regular, // 10px for label
|
|
118
|
+
color: colors.textSecondary,
|
|
119
|
+
marginBottom: 3,
|
|
120
|
+
marginTop: 2,
|
|
121
|
+
},
|
|
122
|
+
maturityDate: {
|
|
123
|
+
...typography.styles.text10Regular, // 10px for value
|
|
124
|
+
color: colors.tabSelected,
|
|
125
|
+
},
|
|
126
|
+
activeFDDetails: {
|
|
127
|
+
flexDirection: 'row',
|
|
128
|
+
justifyContent: 'space-between',
|
|
129
|
+
},
|
|
130
|
+
activeFDLeft: {
|
|
131
|
+
flex: 1,
|
|
132
|
+
marginRight: 10, // Increased right spacing by 10px
|
|
133
|
+
},
|
|
134
|
+
activeFDRight: {
|
|
135
|
+
alignItems: 'flex-end',
|
|
136
|
+
marginLeft: 10, // Increased left spacing by 10px
|
|
137
|
+
},
|
|
138
|
+
activeFDLabel: {
|
|
139
|
+
...typography.styles.text12Regular, // 12px for label
|
|
140
|
+
color: colors.textSecondary,
|
|
141
|
+
marginBottom: spacing.xs + 3,
|
|
142
|
+
lineHeight: Platform.OS === 'ios' ? (typography.styles.text12Regular?.lineHeight ?? 12) + 3 : typography.styles.text12Regular?.lineHeight,
|
|
143
|
+
},
|
|
144
|
+
activeFDAmount: {
|
|
145
|
+
...typography.styles.text14Medium, // 14px for value
|
|
146
|
+
fontWeight: '600',
|
|
147
|
+
color: colors.text,
|
|
148
|
+
marginBottom: spacing.xs + 2,
|
|
149
|
+
lineHeight: Platform.OS === 'ios' ? (typography.styles.text14Medium?.lineHeight ?? 14) + 3 : typography.styles.text14Medium?.lineHeight,
|
|
150
|
+
},
|
|
151
|
+
activeFDReturns: {
|
|
152
|
+
...typography.styles.text14Medium, // 14px for value
|
|
153
|
+
color: colors.success,
|
|
154
|
+
marginTop: 2,
|
|
155
|
+
},
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
export default ActiveFDCard;
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View, Text, TextInput, StyleSheet, Image, Platform } from 'react-native';
|
|
3
|
+
import Icon from 'react-native-vector-icons/Ionicons';
|
|
4
|
+
import { base64Images } from '../constants/strings/base64Images';
|
|
5
|
+
import { useColors, useTypography, useTheme } from '../theme/ThemeContext';
|
|
6
|
+
import { getBorderColor } from '../theme';
|
|
7
|
+
|
|
8
|
+
interface AmountInputProps {
|
|
9
|
+
label: string;
|
|
10
|
+
value: string;
|
|
11
|
+
onChangeText: (text: string) => void;
|
|
12
|
+
onBlur?: () => void;
|
|
13
|
+
onFocus?: () => void;
|
|
14
|
+
placeholder?: string;
|
|
15
|
+
noteText?: string;
|
|
16
|
+
minMaxText?: string;
|
|
17
|
+
errorMessage?: string;
|
|
18
|
+
inputRef?: React.RefObject<TextInput>;
|
|
19
|
+
selection?: { start: number; end: number };
|
|
20
|
+
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const AmountInput: React.FC<AmountInputProps> = ({
|
|
24
|
+
label,
|
|
25
|
+
value,
|
|
26
|
+
onChangeText,
|
|
27
|
+
onBlur,
|
|
28
|
+
onFocus,
|
|
29
|
+
placeholder = '25,000',
|
|
30
|
+
noteText,
|
|
31
|
+
minMaxText,
|
|
32
|
+
errorMessage,
|
|
33
|
+
selection,
|
|
34
|
+
}) => {
|
|
35
|
+
const colors = useColors();
|
|
36
|
+
const typography = useTypography();
|
|
37
|
+
const { themeName } = useTheme();
|
|
38
|
+
const styles = createStyles(colors, typography, themeName);
|
|
39
|
+
|
|
40
|
+
// Handle text changes to filter invalid data (including pasted content)
|
|
41
|
+
const handleTextChange = (text: string) => {
|
|
42
|
+
// Remove all non-numeric characters
|
|
43
|
+
let cleanedText = text.replace(/[^0-9]/g, '');
|
|
44
|
+
|
|
45
|
+
// Remove leading zeros (but keep single zero if that's all there is)
|
|
46
|
+
if (cleanedText.length > 1) {
|
|
47
|
+
cleanedText = cleanedText.replace(/^0+/, '');
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// If all zeros were removed, set to empty string
|
|
51
|
+
if (cleanedText === '') {
|
|
52
|
+
cleanedText = '';
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// Only call onChangeText if the text has changed (to avoid infinite loops)
|
|
56
|
+
if (cleanedText !== value) {
|
|
57
|
+
onChangeText(cleanedText);
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
return (
|
|
62
|
+
<View>
|
|
63
|
+
<Text style={styles.label}>{label}</Text>
|
|
64
|
+
<View style={styles.inputContainer}>
|
|
65
|
+
<TextInput
|
|
66
|
+
style={styles.currencyInput}
|
|
67
|
+
value="₹"
|
|
68
|
+
editable={false}
|
|
69
|
+
/>
|
|
70
|
+
<TextInput
|
|
71
|
+
style={styles.amountInput}
|
|
72
|
+
keyboardType="number-pad"
|
|
73
|
+
value={value}
|
|
74
|
+
onChangeText={handleTextChange}
|
|
75
|
+
onFocus={onFocus}
|
|
76
|
+
onBlur={onBlur}
|
|
77
|
+
placeholder={placeholder}
|
|
78
|
+
placeholderTextColor='#9ca9b0'
|
|
79
|
+
returnKeyType={Platform.OS === 'ios' ? 'done' : 'default'}
|
|
80
|
+
blurOnSubmit={Platform.OS === 'ios'}
|
|
81
|
+
selection={selection}
|
|
82
|
+
/>
|
|
83
|
+
</View>
|
|
84
|
+
{errorMessage && (
|
|
85
|
+
<View style={styles.errorContainer}>
|
|
86
|
+
<Image
|
|
87
|
+
source={{ uri: base64Images.error }}
|
|
88
|
+
style={{ width: 16, height: 16, marginRight: 6 }}
|
|
89
|
+
resizeMode="contain"
|
|
90
|
+
/>
|
|
91
|
+
<Text style={styles.errorText}>{errorMessage}</Text>
|
|
92
|
+
</View>
|
|
93
|
+
)}
|
|
94
|
+
{noteText && (
|
|
95
|
+
<View style={styles.noteRow}>
|
|
96
|
+
<Icon name="information-circle-outline" size={14} color={themeName === 'dark' ? colors.labelColor : colors.textLight} style={styles.noteIcon} />
|
|
97
|
+
<Text style={styles.noteText}>{noteText}</Text>
|
|
98
|
+
</View>
|
|
99
|
+
)}
|
|
100
|
+
{minMaxText && (
|
|
101
|
+
<View style={styles.limitContainer}>
|
|
102
|
+
<Text style={styles.limitLabel}>Min: </Text>
|
|
103
|
+
<Text style={styles.limitValue}>₹5 K</Text>
|
|
104
|
+
<Text style={styles.limitSeparator}> | </Text>
|
|
105
|
+
<Text style={styles.limitLabel}>Max: </Text>
|
|
106
|
+
<Text style={styles.limitValue}>₹5 Cr</Text>
|
|
107
|
+
</View>
|
|
108
|
+
)}
|
|
109
|
+
</View>
|
|
110
|
+
);
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
const createStyles = (colors: any, typography: any, themeName: string) => StyleSheet.create({
|
|
114
|
+
textviewspace: {
|
|
115
|
+
marginLeft: 10,
|
|
116
|
+
},
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
label: {
|
|
120
|
+
...typography.styles.bodyMedium,
|
|
121
|
+
fontWeight: '600',
|
|
122
|
+
marginTop: 25,
|
|
123
|
+
marginBottom: 8,
|
|
124
|
+
color: themeName === 'dark' ? colors.labelColor : colors.text,
|
|
125
|
+
},
|
|
126
|
+
inputContainer: {
|
|
127
|
+
flexDirection: 'row',
|
|
128
|
+
alignItems: 'center',
|
|
129
|
+
justifyContent: 'space-between',
|
|
130
|
+
backgroundColor: themeName === 'dark' ? colors.background : "white",
|
|
131
|
+
height: 48,
|
|
132
|
+
paddingHorizontal: 0,
|
|
133
|
+
gap: 12,
|
|
134
|
+
|
|
135
|
+
},
|
|
136
|
+
currencyInput: {
|
|
137
|
+
width: 50,
|
|
138
|
+
textAlign: 'center',
|
|
139
|
+
fontSize: 14,
|
|
140
|
+
color: colors.text,
|
|
141
|
+
borderWidth: themeName === 'dark' ? 1 : 0.5,
|
|
142
|
+
borderRadius: 4,
|
|
143
|
+
borderColor: themeName === 'dark' ? colors.inputBorder : getBorderColor({ colors } as any, 0.36),
|
|
144
|
+
height: '100%',
|
|
145
|
+
paddingVertical: 0,
|
|
146
|
+
backgroundColor: themeName === 'dark' ? colors.inputBackground : colors.surface
|
|
147
|
+
|
|
148
|
+
},
|
|
149
|
+
amountInput: {
|
|
150
|
+
flex: 1,
|
|
151
|
+
fontSize: 14,
|
|
152
|
+
color: colors.text,
|
|
153
|
+
paddingHorizontal: 16,
|
|
154
|
+
height: '100%',
|
|
155
|
+
marginLeft: 0,
|
|
156
|
+
borderColor: themeName === 'dark' ? colors.inputBorder : getBorderColor({ colors } as any, 0.36),
|
|
157
|
+
borderWidth: themeName === 'dark' ? 1 : 0.5,
|
|
158
|
+
borderRadius: 4,
|
|
159
|
+
backgroundColor: themeName === 'dark' ? colors.inputBackground : colors.surface
|
|
160
|
+
|
|
161
|
+
},
|
|
162
|
+
noteRow: {
|
|
163
|
+
flexDirection: 'row',
|
|
164
|
+
alignItems: 'flex-start',
|
|
165
|
+
marginTop: 8,
|
|
166
|
+
},
|
|
167
|
+
noteIcon: {
|
|
168
|
+
marginRight: 6,
|
|
169
|
+
marginTop: 1,
|
|
170
|
+
},
|
|
171
|
+
noteText: {
|
|
172
|
+
fontSize: 11,
|
|
173
|
+
color: themeName === 'dark' ? colors.labelColor : colors.textLight,
|
|
174
|
+
flex: 1,
|
|
175
|
+
},
|
|
176
|
+
limitText: {
|
|
177
|
+
fontSize: 14,
|
|
178
|
+
color: themeName === 'dark' ? colors.labelColor : colors.textLight,
|
|
179
|
+
marginTop: 10,
|
|
180
|
+
marginBottom: 1,
|
|
181
|
+
},
|
|
182
|
+
limitContainer: {
|
|
183
|
+
flexDirection: 'row',
|
|
184
|
+
alignItems: 'center',
|
|
185
|
+
marginTop: 10,
|
|
186
|
+
marginBottom: 1,
|
|
187
|
+
},
|
|
188
|
+
limitLabel: {
|
|
189
|
+
fontSize: 12,
|
|
190
|
+
color: themeName === 'dark' ? colors.labelColor : '#000000', // White for dark theme, black for others
|
|
191
|
+
fontWeight: '400',
|
|
192
|
+
},
|
|
193
|
+
limitValue: {
|
|
194
|
+
fontSize: 14,
|
|
195
|
+
color: themeName === 'dark' ? colors.labelColor : colors.textLight, // White for dark theme
|
|
196
|
+
},
|
|
197
|
+
limitSeparator: {
|
|
198
|
+
fontSize: 14,
|
|
199
|
+
color: themeName === 'dark' ? colors.labelColor : colors.textLight, // White for dark theme
|
|
200
|
+
},
|
|
201
|
+
errorContainer: {
|
|
202
|
+
flexDirection: 'row',
|
|
203
|
+
alignItems: 'center',
|
|
204
|
+
marginTop: 8,
|
|
205
|
+
},
|
|
206
|
+
errorIcon: {
|
|
207
|
+
marginRight: 6,
|
|
208
|
+
},
|
|
209
|
+
errorText: {
|
|
210
|
+
fontSize: 12,
|
|
211
|
+
color: colors.error || '#FF0000',
|
|
212
|
+
fontWeight: '500',
|
|
213
|
+
flex: 1,
|
|
214
|
+
},
|
|
215
|
+
});
|
|
216
|
+
|
|
217
|
+
export default AmountInput;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TouchableOpacity, View, Text, StyleSheet, Image } from 'react-native';
|
|
3
|
+
import Icon from 'react-native-vector-icons/Ionicons';
|
|
4
|
+
import { useColors, useTypography, useTheme } from '../theme/ThemeContext';
|
|
5
|
+
import { base64Images } from '../constants/strings/base64Images';
|
|
6
|
+
|
|
7
|
+
interface CheckboxOptionProps {
|
|
8
|
+
label: string;
|
|
9
|
+
checked: boolean;
|
|
10
|
+
onPress: () => void;
|
|
11
|
+
numberOfLines?: number;
|
|
12
|
+
containerStyle?: object;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const CheckboxOption: React.FC<CheckboxOptionProps> = ({
|
|
17
|
+
label,
|
|
18
|
+
checked,
|
|
19
|
+
onPress,
|
|
20
|
+
numberOfLines,
|
|
21
|
+
containerStyle,
|
|
22
|
+
disabled = false,
|
|
23
|
+
}) => {
|
|
24
|
+
const colors = useColors();
|
|
25
|
+
const typography = useTypography();
|
|
26
|
+
const { themeName } = useTheme();
|
|
27
|
+
const styles = createStyles(colors, typography, themeName);
|
|
28
|
+
|
|
29
|
+
return (
|
|
30
|
+
<TouchableOpacity
|
|
31
|
+
style={[styles.container, containerStyle]}
|
|
32
|
+
onPress={onPress}
|
|
33
|
+
disabled={disabled}
|
|
34
|
+
activeOpacity={disabled ? 1 : 0.7}
|
|
35
|
+
>
|
|
36
|
+
<View style={[styles.checkbox, checked && styles.checkboxChecked]}>
|
|
37
|
+
{themeName === 'dark' ? (
|
|
38
|
+
<Image
|
|
39
|
+
source={{ uri: checked ? base64Images.checkBoxDark : base64Images.unCheckBoxDark }}
|
|
40
|
+
resizeMode="cover"
|
|
41
|
+
width={20}
|
|
42
|
+
height={20}
|
|
43
|
+
/>
|
|
44
|
+
) : (
|
|
45
|
+
checked ? (
|
|
46
|
+
<Image
|
|
47
|
+
source={{ uri: base64Images.filledCheckBox }}
|
|
48
|
+
resizeMode="cover"
|
|
49
|
+
width={20}
|
|
50
|
+
height={20}
|
|
51
|
+
/>
|
|
52
|
+
) : null
|
|
53
|
+
)}
|
|
54
|
+
</View>
|
|
55
|
+
<Text
|
|
56
|
+
style={styles.label}
|
|
57
|
+
numberOfLines={numberOfLines}
|
|
58
|
+
ellipsizeMode="tail"
|
|
59
|
+
>
|
|
60
|
+
{label}
|
|
61
|
+
</Text>
|
|
62
|
+
</TouchableOpacity>
|
|
63
|
+
);
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
const createStyles = (colors: any, typography: any, themeName: string) => StyleSheet.create({
|
|
67
|
+
container: {
|
|
68
|
+
flexDirection: 'row',
|
|
69
|
+
alignItems: 'center',
|
|
70
|
+
paddingVertical: 0,
|
|
71
|
+
},
|
|
72
|
+
checkbox: {
|
|
73
|
+
width: 18,
|
|
74
|
+
height: 18,
|
|
75
|
+
borderRadius: 3,
|
|
76
|
+
borderWidth: 1.5,
|
|
77
|
+
borderColor: themeName === 'dark' ? colors.tabSelected : colors.primary,
|
|
78
|
+
marginRight: 12,
|
|
79
|
+
alignItems: 'center',
|
|
80
|
+
justifyContent: 'center',
|
|
81
|
+
},
|
|
82
|
+
checkboxChecked: {
|
|
83
|
+
// backgroundColor: colors.tabSelected,
|
|
84
|
+
borderColor: colors.tabSelected,
|
|
85
|
+
},
|
|
86
|
+
label: {
|
|
87
|
+
...typography.styles.bodyMedium,
|
|
88
|
+
color: colors.text,
|
|
89
|
+
flex: 1,
|
|
90
|
+
},
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
export default CheckboxOption;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View, Text, StyleSheet, Image } from 'react-native';
|
|
3
|
+
import { useColors, useTypography } from '../theme/ThemeContext';
|
|
4
|
+
import { base64Images } from '../constants/strings/base64Images';
|
|
5
|
+
|
|
6
|
+
interface CompanyHeaderProps {
|
|
7
|
+
companyName: string;
|
|
8
|
+
rating: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const CompanyHeader: React.FC<CompanyHeaderProps> = ({ companyName, rating }) => {
|
|
12
|
+
const colors = useColors();
|
|
13
|
+
const typography = useTypography();
|
|
14
|
+
const styles = createStyles(colors, typography);
|
|
15
|
+
|
|
16
|
+
return (
|
|
17
|
+
<View style={styles.wrapper}>
|
|
18
|
+
<View style={styles.card}>
|
|
19
|
+
<View style={styles.innerBorder}>
|
|
20
|
+
<Image
|
|
21
|
+
source={{ uri: base64Images.shriramLogo }}
|
|
22
|
+
style={styles.logo}
|
|
23
|
+
resizeMode="contain"
|
|
24
|
+
/>
|
|
25
|
+
<View style={styles.info}>
|
|
26
|
+
<Text style={styles.name}>{companyName}</Text>
|
|
27
|
+
<Text style={styles.rating}>{rating}</Text>
|
|
28
|
+
</View>
|
|
29
|
+
</View>
|
|
30
|
+
</View>
|
|
31
|
+
</View>
|
|
32
|
+
);
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const createStyles = (colors: any, typography: any) => StyleSheet.create({
|
|
36
|
+
wrapper: {
|
|
37
|
+
paddingHorizontal: 2,
|
|
38
|
+
paddingTop: 12,
|
|
39
|
+
paddingBottom: 8,
|
|
40
|
+
},
|
|
41
|
+
card: {
|
|
42
|
+
backgroundColor: '#0B2940',
|
|
43
|
+
borderRadius: 24,
|
|
44
|
+
padding: 4,
|
|
45
|
+
borderWidth: 1,
|
|
46
|
+
borderColor: '#124061',
|
|
47
|
+
shadowColor: '#000',
|
|
48
|
+
shadowOpacity: 0.2,
|
|
49
|
+
shadowOffset: { width: 0, height: 4 },
|
|
50
|
+
shadowRadius: 12,
|
|
51
|
+
elevation: 4,
|
|
52
|
+
},
|
|
53
|
+
innerBorder: {
|
|
54
|
+
borderRadius: 20,
|
|
55
|
+
padding: 16,
|
|
56
|
+
flexDirection: 'row',
|
|
57
|
+
alignItems: 'center',
|
|
58
|
+
},
|
|
59
|
+
logo: {
|
|
60
|
+
width: 45,
|
|
61
|
+
height: 45,
|
|
62
|
+
marginRight: 12,
|
|
63
|
+
},
|
|
64
|
+
info: {
|
|
65
|
+
flex: 1,
|
|
66
|
+
},
|
|
67
|
+
name: {
|
|
68
|
+
...typography.styles.h2,
|
|
69
|
+
color: '#FFFFFF',
|
|
70
|
+
marginBottom: 6,
|
|
71
|
+
},
|
|
72
|
+
rating: {
|
|
73
|
+
...typography.styles.text14Medium,
|
|
74
|
+
color: '#BFD5F6',
|
|
75
|
+
},
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
export default CompanyHeader;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TouchableOpacity, Text, StyleSheet, Image, View } from 'react-native';
|
|
3
|
+
import { base64Images } from '../constants/strings/base64Images';
|
|
4
|
+
import { useColors, useTypography, useTheme } from '../theme/ThemeContext';
|
|
5
|
+
import { getBorderColor } from '../theme';
|
|
6
|
+
|
|
7
|
+
interface DropdownSelectorProps {
|
|
8
|
+
label: string;
|
|
9
|
+
value: string;
|
|
10
|
+
onPress?: () => void;
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const DropdownSelector: React.FC<DropdownSelectorProps> = ({
|
|
15
|
+
label,
|
|
16
|
+
value,
|
|
17
|
+
onPress,
|
|
18
|
+
placeholder,
|
|
19
|
+
}) => {
|
|
20
|
+
const colors = useColors();
|
|
21
|
+
const typography = useTypography();
|
|
22
|
+
const { themeName } = useTheme();
|
|
23
|
+
const styles = createStyles(colors, typography, themeName);
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<>
|
|
27
|
+
<Text style={styles.label}>{label}</Text>
|
|
28
|
+
<TouchableOpacity style={styles.dropdown} onPress={onPress}>
|
|
29
|
+
<Text style={[styles.dropdownText, !value && styles.placeholderText]}>
|
|
30
|
+
{value || placeholder || 'Select'}
|
|
31
|
+
</Text>
|
|
32
|
+
<Image
|
|
33
|
+
source={{ uri: base64Images.dropdown }}
|
|
34
|
+
style={styles.icon}
|
|
35
|
+
resizeMode="contain"
|
|
36
|
+
/>
|
|
37
|
+
</TouchableOpacity>
|
|
38
|
+
</>
|
|
39
|
+
);
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
const createStyles = (colors: any, typography: any, themeName: string) => StyleSheet.create({
|
|
43
|
+
label: {
|
|
44
|
+
...typography.styles.bodyMedium,
|
|
45
|
+
fontWeight: '600',
|
|
46
|
+
marginTop: 25,
|
|
47
|
+
marginBottom: 8,
|
|
48
|
+
fontSize: 16,
|
|
49
|
+
color: themeName === 'dark' ? colors.labelColor : colors.text,
|
|
50
|
+
},
|
|
51
|
+
dropdown: {
|
|
52
|
+
borderWidth: 0.5,
|
|
53
|
+
borderColor: themeName === 'dark' ? colors.inputBorder : getBorderColor({ colors } as any, 0.36),
|
|
54
|
+
borderRadius: 4,
|
|
55
|
+
paddingHorizontal: 16,
|
|
56
|
+
height: 48,
|
|
57
|
+
marginTop: 8,
|
|
58
|
+
flexDirection: 'row',
|
|
59
|
+
justifyContent: 'space-between',
|
|
60
|
+
alignItems: 'center',
|
|
61
|
+
backgroundColor: themeName === 'dark' ? colors.inputBackground : colors.surface,
|
|
62
|
+
},
|
|
63
|
+
dropdownText: {
|
|
64
|
+
fontSize: 14,
|
|
65
|
+
color: colors.text,
|
|
66
|
+
},
|
|
67
|
+
placeholderText: {
|
|
68
|
+
color: colors.placeholderColor,
|
|
69
|
+
},
|
|
70
|
+
icon: {
|
|
71
|
+
width: 20,
|
|
72
|
+
height: 20,
|
|
73
|
+
tintColor: colors.textLight,
|
|
74
|
+
},
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
export default DropdownSelector;
|