@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,86 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View, Text, StyleSheet } from 'react-native';
|
|
3
|
+
import { useColors, useTypography } from '../theme/ThemeContext';
|
|
4
|
+
|
|
5
|
+
export interface FormSectionProps {
|
|
6
|
+
title?: string;
|
|
7
|
+
subtitle?: string;
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
containerStyle?: object;
|
|
10
|
+
titleStyle?: object;
|
|
11
|
+
subtitleStyle?: object;
|
|
12
|
+
contentStyle?: object;
|
|
13
|
+
showDivider?: boolean;
|
|
14
|
+
dividerStyle?: object;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const FormSection: React.FC<FormSectionProps> = ({
|
|
18
|
+
title,
|
|
19
|
+
subtitle,
|
|
20
|
+
children,
|
|
21
|
+
containerStyle,
|
|
22
|
+
titleStyle,
|
|
23
|
+
subtitleStyle,
|
|
24
|
+
contentStyle,
|
|
25
|
+
showDivider = false,
|
|
26
|
+
dividerStyle,
|
|
27
|
+
}) => {
|
|
28
|
+
const colors = useColors();
|
|
29
|
+
const typography = useTypography();
|
|
30
|
+
const styles = createStyles(colors, typography);
|
|
31
|
+
|
|
32
|
+
return (
|
|
33
|
+
<View style={[styles.container, containerStyle]}>
|
|
34
|
+
{/* Section Header */}
|
|
35
|
+
{(title || subtitle) && (
|
|
36
|
+
<View style={styles.header}>
|
|
37
|
+
{title && (
|
|
38
|
+
<Text style={[styles.title, titleStyle]}>{title}</Text>
|
|
39
|
+
)}
|
|
40
|
+
{subtitle && (
|
|
41
|
+
<Text style={[styles.subtitle, subtitleStyle]}>{subtitle}</Text>
|
|
42
|
+
)}
|
|
43
|
+
</View>
|
|
44
|
+
)}
|
|
45
|
+
|
|
46
|
+
{/* Divider */}
|
|
47
|
+
{showDivider && (
|
|
48
|
+
<View style={[styles.divider, dividerStyle]} />
|
|
49
|
+
)}
|
|
50
|
+
|
|
51
|
+
{/* Content */}
|
|
52
|
+
<View style={[styles.content, contentStyle]}>
|
|
53
|
+
{children}
|
|
54
|
+
</View>
|
|
55
|
+
</View>
|
|
56
|
+
);
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
const createStyles = (colors: any, typography: any) => StyleSheet.create({
|
|
60
|
+
container: {
|
|
61
|
+
marginBottom: 24,
|
|
62
|
+
},
|
|
63
|
+
header: {
|
|
64
|
+
marginBottom: 16,
|
|
65
|
+
},
|
|
66
|
+
title: {
|
|
67
|
+
...typography.styles.h3,
|
|
68
|
+
color: colors.text,
|
|
69
|
+
marginBottom: 4,
|
|
70
|
+
},
|
|
71
|
+
subtitle: {
|
|
72
|
+
...typography.styles.bodyMedium,
|
|
73
|
+
color: colors.textLight,
|
|
74
|
+
lineHeight: 20,
|
|
75
|
+
},
|
|
76
|
+
divider: {
|
|
77
|
+
height: 1,
|
|
78
|
+
backgroundColor: colors.border + '20',
|
|
79
|
+
marginBottom: 16,
|
|
80
|
+
},
|
|
81
|
+
content: {
|
|
82
|
+
// Content styling can be customized via contentStyle prop
|
|
83
|
+
},
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
export default FormSection;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
View,
|
|
4
|
+
Text,
|
|
5
|
+
StyleSheet,
|
|
6
|
+
TouchableOpacity,
|
|
7
|
+
StatusBar,
|
|
8
|
+
Image,
|
|
9
|
+
Platform,
|
|
10
|
+
} from 'react-native';
|
|
11
|
+
import Icon from 'react-native-vector-icons/Ionicons';
|
|
12
|
+
import { useColors, useTypography, useSpacing, useTheme } from '../theme/ThemeContext';
|
|
13
|
+
import type { ColorScheme } from '../theme';
|
|
14
|
+
import { images } from '../assets/images/images';
|
|
15
|
+
import { base64Images } from '../constants/strings/base64Images';
|
|
16
|
+
import { platform } from 'os';
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
interface HeaderProps {
|
|
20
|
+
title: string;
|
|
21
|
+
onBackPress?: () => void;
|
|
22
|
+
backgroundColor?: string;
|
|
23
|
+
titleColor?: string;
|
|
24
|
+
customStyles?: {
|
|
25
|
+
container?: object;
|
|
26
|
+
title?: object;
|
|
27
|
+
backButton?: object;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const Header: React.FC<HeaderProps> = ({
|
|
32
|
+
title,
|
|
33
|
+
onBackPress,
|
|
34
|
+
backgroundColor,
|
|
35
|
+
titleColor,
|
|
36
|
+
customStyles = {},
|
|
37
|
+
}) => {
|
|
38
|
+
const colors = useColors();
|
|
39
|
+
const typography = useTypography();
|
|
40
|
+
const spacing = useSpacing();
|
|
41
|
+
const { themeName } = useTheme();
|
|
42
|
+
|
|
43
|
+
const styles = createStyles(colors, typography, spacing, themeName);
|
|
44
|
+
const headerBg = colors.headerBg;
|
|
45
|
+
const textColor = titleColor || (colors as any).headerText || colors.background;
|
|
46
|
+
|
|
47
|
+
const BackIcon = () => (
|
|
48
|
+
<Icon
|
|
49
|
+
name="arrow-back"
|
|
50
|
+
size={24}
|
|
51
|
+
color={textColor}
|
|
52
|
+
style={styles.backIcon}
|
|
53
|
+
/>
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
return (
|
|
57
|
+
<>
|
|
58
|
+
<View style={[styles.header, { backgroundColor: headerBg }, customStyles.container]}>
|
|
59
|
+
<TouchableOpacity
|
|
60
|
+
style={[styles.backButton, customStyles.backButton]}
|
|
61
|
+
onPress={onBackPress}
|
|
62
|
+
>
|
|
63
|
+
{/* <BackIcon /> */}
|
|
64
|
+
<Image
|
|
65
|
+
source={{ uri: base64Images.backArrow }}
|
|
66
|
+
style={[styles.backIcon, { tintColor: textColor }]}
|
|
67
|
+
resizeMode="contain"
|
|
68
|
+
width={24}
|
|
69
|
+
height={24}
|
|
70
|
+
/>
|
|
71
|
+
</TouchableOpacity>
|
|
72
|
+
<Text style={[styles.headerTitle, { color: textColor }, customStyles.title]}>
|
|
73
|
+
{title}
|
|
74
|
+
</Text>
|
|
75
|
+
</View>
|
|
76
|
+
</>
|
|
77
|
+
);
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
const isAndroid15OrHigher = Platform.OS === "android" && Platform.Version >= 15;
|
|
81
|
+
const createStyles = (colors: ColorScheme, typography: any, spacing: any, themeName: string) => StyleSheet.create({
|
|
82
|
+
header: {
|
|
83
|
+
height: Platform.OS === 'ios' ? 100 : isAndroid15OrHigher ? 80 : 70, // Set fixed height to 200px
|
|
84
|
+
paddingHorizontal: spacing.lg,
|
|
85
|
+
flexDirection: 'row',
|
|
86
|
+
alignItems: 'center', // Vertically center the content
|
|
87
|
+
justifyContent: 'flex-start', // Align content to the left
|
|
88
|
+
borderBottomWidth: themeName === 'dark' ? 1 : 0,
|
|
89
|
+
borderBottomColor: themeName === 'dark' ? colors.border : 'transparent',
|
|
90
|
+
},
|
|
91
|
+
backButton: {
|
|
92
|
+
marginTop: Platform.OS === 'ios' ? 30 : isAndroid15OrHigher ? 15 : 0,
|
|
93
|
+
marginRight: spacing.lg,
|
|
94
|
+
alignItems: 'center',
|
|
95
|
+
justifyContent: 'center',
|
|
96
|
+
},
|
|
97
|
+
backIcon: {
|
|
98
|
+
// Icon styling handled by Ionicons component
|
|
99
|
+
width: 24,
|
|
100
|
+
height: 24,
|
|
101
|
+
resizeMode: 'contain',
|
|
102
|
+
// backgroundColor: "red",
|
|
103
|
+
},
|
|
104
|
+
headerTitle: {
|
|
105
|
+
marginTop: Platform.OS === 'ios' ? 30 : isAndroid15OrHigher ? 15 : 0,
|
|
106
|
+
...typography.styles.h3,
|
|
107
|
+
},
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
export default Header;
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View, Text, TouchableOpacity, StyleSheet } from 'react-native';
|
|
3
|
+
import { useColors, useTypography, useTheme } from '../theme/ThemeContext';
|
|
4
|
+
|
|
5
|
+
export interface IFSCSearchResultCardProps {
|
|
6
|
+
bankName: string;
|
|
7
|
+
branchName: string;
|
|
8
|
+
ifscCode: string;
|
|
9
|
+
bankShortDesc?: string;
|
|
10
|
+
bankCode?: string;
|
|
11
|
+
onSelect: () => void;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
buttonTitle?: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const IFSCSearchResultCard: React.FC<IFSCSearchResultCardProps> = ({
|
|
17
|
+
bankName,
|
|
18
|
+
branchName,
|
|
19
|
+
ifscCode,
|
|
20
|
+
bankShortDesc,
|
|
21
|
+
bankCode,
|
|
22
|
+
onSelect,
|
|
23
|
+
disabled = false,
|
|
24
|
+
buttonTitle = 'Select',
|
|
25
|
+
}) => {
|
|
26
|
+
const colors = useColors();
|
|
27
|
+
const typography = useTypography();
|
|
28
|
+
const { themeName } = useTheme();
|
|
29
|
+
const styles = createStyles(colors, typography, themeName);
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<View style={styles.resultCard}>
|
|
33
|
+
<View style={styles.resultInfo}>
|
|
34
|
+
<View style={styles.bankHeader}>
|
|
35
|
+
<Text style={styles.bankName}>{bankName}</Text>
|
|
36
|
+
</View>
|
|
37
|
+
<Text style={styles.branchName}>{branchName}</Text>
|
|
38
|
+
<View style={styles.ifscContainer}>
|
|
39
|
+
<Text style={styles.ifscCode}>IFSC:</Text>
|
|
40
|
+
<Text style={styles.ifscValue}>{ifscCode}</Text>
|
|
41
|
+
</View>
|
|
42
|
+
{/* {bankCode && (
|
|
43
|
+
<View style={styles.bankCodeContainer}>
|
|
44
|
+
<Text style={styles.bankCodeLabel}>Bank Code:</Text>
|
|
45
|
+
<Text style={styles.bankCodeValue}>{bankCode}</Text>
|
|
46
|
+
</View>
|
|
47
|
+
)} */}
|
|
48
|
+
</View>
|
|
49
|
+
<TouchableOpacity
|
|
50
|
+
style={styles.selectButton}
|
|
51
|
+
onPress={onSelect}
|
|
52
|
+
activeOpacity={0.7}
|
|
53
|
+
disabled={disabled}
|
|
54
|
+
>
|
|
55
|
+
<Text style={styles.selectButtonText}>{buttonTitle}</Text>
|
|
56
|
+
</TouchableOpacity>
|
|
57
|
+
</View>
|
|
58
|
+
);
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
const createStyles = (colors: any, typography: any, themeName: string) => StyleSheet.create({
|
|
62
|
+
resultCard: {
|
|
63
|
+
borderRadius: 12,
|
|
64
|
+
padding: 1,
|
|
65
|
+
marginBottom: 16,
|
|
66
|
+
flexDirection: 'row',
|
|
67
|
+
justifyContent: 'space-between',
|
|
68
|
+
alignItems: 'center',
|
|
69
|
+
},
|
|
70
|
+
resultInfo: {
|
|
71
|
+
flex: 1,
|
|
72
|
+
marginRight: 12,
|
|
73
|
+
},
|
|
74
|
+
bankHeader: {
|
|
75
|
+
flexDirection: 'row',
|
|
76
|
+
alignItems: 'center',
|
|
77
|
+
marginBottom: 4,
|
|
78
|
+
},
|
|
79
|
+
bankName: {
|
|
80
|
+
...typography.styles.h3,
|
|
81
|
+
color: colors.text,
|
|
82
|
+
flex: 1,
|
|
83
|
+
},
|
|
84
|
+
bankShortDesc: {
|
|
85
|
+
...typography.styles.bodySmall,
|
|
86
|
+
color: colors.textLight,
|
|
87
|
+
marginLeft: 8,
|
|
88
|
+
},
|
|
89
|
+
branchName: {
|
|
90
|
+
...typography.styles.h3,
|
|
91
|
+
color: colors.text,
|
|
92
|
+
marginBottom: 4,
|
|
93
|
+
},
|
|
94
|
+
ifscContainer: {
|
|
95
|
+
flexDirection: 'row',
|
|
96
|
+
alignItems: 'center',
|
|
97
|
+
marginBottom: 4,
|
|
98
|
+
},
|
|
99
|
+
ifscCode: {
|
|
100
|
+
...typography.styles.h3,
|
|
101
|
+
color: colors.text,
|
|
102
|
+
marginRight: 8,
|
|
103
|
+
},
|
|
104
|
+
ifscValue: {
|
|
105
|
+
...typography.styles.h3,
|
|
106
|
+
fontWeight: typography.fontWeight.semiBold,
|
|
107
|
+
color: colors.text,
|
|
108
|
+
},
|
|
109
|
+
bankCodeContainer: {
|
|
110
|
+
flexDirection: 'row',
|
|
111
|
+
alignItems: 'center',
|
|
112
|
+
marginTop: 4,
|
|
113
|
+
},
|
|
114
|
+
bankCodeLabel: {
|
|
115
|
+
...typography.styles.bodySmall,
|
|
116
|
+
color: colors.textLight,
|
|
117
|
+
marginRight: 8,
|
|
118
|
+
},
|
|
119
|
+
bankCodeValue: {
|
|
120
|
+
...typography.styles.bodySmall,
|
|
121
|
+
fontWeight: typography.fontWeight.medium,
|
|
122
|
+
color: colors.text,
|
|
123
|
+
},
|
|
124
|
+
selectButton: {
|
|
125
|
+
backgroundColor: themeName === 'dark' ? colors.buttonBackground : colors.headerBg,
|
|
126
|
+
paddingHorizontal: 24,
|
|
127
|
+
paddingVertical: 10,
|
|
128
|
+
borderRadius: themeName === 'dark' ? 5 : 25,
|
|
129
|
+
minWidth: 80,
|
|
130
|
+
alignItems: 'center',
|
|
131
|
+
},
|
|
132
|
+
selectButtonText: {
|
|
133
|
+
color: themeName === 'dark' ? colors.buttonTextColor : 'white',
|
|
134
|
+
...typography.styles.bodyMedium,
|
|
135
|
+
fontWeight: typography.fontWeight.semiBold,
|
|
136
|
+
},
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
export default IFSCSearchResultCard;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View, Text, StyleSheet, Image } 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
|
+
|
|
7
|
+
interface InfoBoxProps {
|
|
8
|
+
message: string;
|
|
9
|
+
containerStyle?: any;
|
|
10
|
+
showNonStockIcon?: boolean;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const InfoBox: React.FC<InfoBoxProps> = ({ message, containerStyle, showNonStockIcon = false }) => {
|
|
14
|
+
const colors = useColors();
|
|
15
|
+
const typography = useTypography();
|
|
16
|
+
const { themeName } = useTheme();
|
|
17
|
+
const styles = createStyles(colors, typography);
|
|
18
|
+
|
|
19
|
+
return (
|
|
20
|
+
<View style={[styles.container, containerStyle]}>
|
|
21
|
+
{showNonStockIcon ? (
|
|
22
|
+
<Image source={{ uri: themeName === 'dark' ? base64Images.stockDark : base64Images.nonStock }} style={styles.imageIcon} resizeMode="contain" />
|
|
23
|
+
) : (
|
|
24
|
+
<Icon name="information-circle" size={16} color={colors.success} style={styles.icon} />
|
|
25
|
+
)}
|
|
26
|
+
<Text style={styles.text}>{message}</Text>
|
|
27
|
+
</View>
|
|
28
|
+
);
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const createStyles = (colors: any, typography: any) => StyleSheet.create({
|
|
32
|
+
container: {
|
|
33
|
+
backgroundColor: 'rgba(0,235,180,0.1)',
|
|
34
|
+
padding: 12,
|
|
35
|
+
borderRadius: 8,
|
|
36
|
+
marginTop: 16,
|
|
37
|
+
flexDirection: 'row',
|
|
38
|
+
alignItems: 'center',
|
|
39
|
+
},
|
|
40
|
+
icon: {
|
|
41
|
+
marginRight: 8,
|
|
42
|
+
},
|
|
43
|
+
imageIcon: {
|
|
44
|
+
width: 16,
|
|
45
|
+
height: 16,
|
|
46
|
+
marginRight: 8,
|
|
47
|
+
},
|
|
48
|
+
text: {
|
|
49
|
+
...typography.styles.bodyMedium,
|
|
50
|
+
color: colors.textLight,
|
|
51
|
+
flex: 1,
|
|
52
|
+
},
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
export default InfoBox;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View, Text, StyleSheet } from 'react-native';
|
|
3
|
+
import { useColors, useTypography, useTheme } from '../theme/ThemeContext';
|
|
4
|
+
|
|
5
|
+
interface InterestRateCardProps {
|
|
6
|
+
interestRate: string;
|
|
7
|
+
maturityAmount: string;
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const InterestRateCard: React.FC<InterestRateCardProps> = ({
|
|
12
|
+
interestRate,
|
|
13
|
+
maturityAmount,
|
|
14
|
+
children,
|
|
15
|
+
}) => {
|
|
16
|
+
const colors = useColors();
|
|
17
|
+
const typography = useTypography();
|
|
18
|
+
const { themeName } = useTheme();
|
|
19
|
+
const styles = createStyles(colors, typography, themeName);
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
<View style={styles.card}>
|
|
23
|
+
<View style={styles.row}>
|
|
24
|
+
<View style={styles.left}>
|
|
25
|
+
<Text style={styles.label}>Interest Rate</Text>
|
|
26
|
+
<Text style={styles.value}>{interestRate}</Text>
|
|
27
|
+
</View>
|
|
28
|
+
<View style={styles.right}>
|
|
29
|
+
|
|
30
|
+
<Text style={styles.label}>On Maturity</Text>
|
|
31
|
+
<Text style={styles.valueRight}>{maturityAmount}</Text>
|
|
32
|
+
|
|
33
|
+
</View>
|
|
34
|
+
|
|
35
|
+
</View>
|
|
36
|
+
{children}
|
|
37
|
+
|
|
38
|
+
</View>
|
|
39
|
+
);
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
const createStyles = (colors: any, typography: any, themeName: string) => StyleSheet.create({
|
|
43
|
+
card: {
|
|
44
|
+
backgroundColor: themeName === 'dark' ? colors.inputBackground : 'rgba(0,235,180,0.1)',
|
|
45
|
+
padding: 16,
|
|
46
|
+
borderRadius: 4,
|
|
47
|
+
marginTop: 25,
|
|
48
|
+
},
|
|
49
|
+
row: {
|
|
50
|
+
flexDirection: 'row',
|
|
51
|
+
justifyContent: 'space-between',
|
|
52
|
+
},
|
|
53
|
+
left: {
|
|
54
|
+
flex: 1,
|
|
55
|
+
},
|
|
56
|
+
right: {
|
|
57
|
+
flex: 1,
|
|
58
|
+
alignItems: 'flex-end',
|
|
59
|
+
},
|
|
60
|
+
label: {
|
|
61
|
+
...typography.styles.bodySmall,
|
|
62
|
+
color: themeName === 'dark' ? colors.labelColor : colors.textLight,
|
|
63
|
+
marginBottom: 4,
|
|
64
|
+
},
|
|
65
|
+
value: {
|
|
66
|
+
...typography.styles.bodyLarge,
|
|
67
|
+
fontWeight: '600',
|
|
68
|
+
color: colors.text,
|
|
69
|
+
},
|
|
70
|
+
valueRight: {
|
|
71
|
+
...typography.styles.bodyLarge,
|
|
72
|
+
fontWeight: '700',
|
|
73
|
+
color: colors.text,
|
|
74
|
+
},
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
export default InterestRateCard;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View, Text, StyleSheet, ActivityIndicator } from 'react-native';
|
|
3
|
+
import { useColors, useTypography } from '../theme/ThemeContext';
|
|
4
|
+
|
|
5
|
+
export interface LoadingIndicatorProps {
|
|
6
|
+
message?: string;
|
|
7
|
+
size?: 'small' | 'large';
|
|
8
|
+
color?: string;
|
|
9
|
+
containerStyle?: object;
|
|
10
|
+
messageStyle?: object;
|
|
11
|
+
showMessage?: boolean;
|
|
12
|
+
overlay?: boolean;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const LoadingIndicator: React.FC<LoadingIndicatorProps> = ({
|
|
16
|
+
message = 'Loading...',
|
|
17
|
+
size = 'large',
|
|
18
|
+
color,
|
|
19
|
+
containerStyle,
|
|
20
|
+
messageStyle,
|
|
21
|
+
showMessage = true,
|
|
22
|
+
overlay = false,
|
|
23
|
+
}) => {
|
|
24
|
+
const colors = useColors();
|
|
25
|
+
const typography = useTypography();
|
|
26
|
+
const styles = createStyles(colors, typography, overlay);
|
|
27
|
+
|
|
28
|
+
const indicatorColor = color || colors.primary;
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
<View style={[styles.container, containerStyle]}>
|
|
32
|
+
<ActivityIndicator size={size} color={indicatorColor} />
|
|
33
|
+
{showMessage && message && (
|
|
34
|
+
<Text style={[styles.message, messageStyle]}>{message}</Text>
|
|
35
|
+
)}
|
|
36
|
+
</View>
|
|
37
|
+
);
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
const createStyles = (colors: any, typography: any, overlay: boolean) => StyleSheet.create({
|
|
41
|
+
container: {
|
|
42
|
+
alignItems: 'center',
|
|
43
|
+
justifyContent: 'center',
|
|
44
|
+
padding: 20,
|
|
45
|
+
...(overlay && {
|
|
46
|
+
position: 'absolute',
|
|
47
|
+
top: 0,
|
|
48
|
+
left: 0,
|
|
49
|
+
right: 0,
|
|
50
|
+
bottom: 0,
|
|
51
|
+
backgroundColor: 'rgba(255, 255, 255, 0.9)',
|
|
52
|
+
zIndex: 1000,
|
|
53
|
+
}),
|
|
54
|
+
},
|
|
55
|
+
message: {
|
|
56
|
+
...typography.styles.bodyMedium,
|
|
57
|
+
color: colors.textLight,
|
|
58
|
+
marginTop: 12,
|
|
59
|
+
textAlign: 'center',
|
|
60
|
+
},
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
export default LoadingIndicator;
|