@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,122 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const react_1 = __importDefault(require("react"));
|
|
7
|
+
const react_native_1 = require("react-native");
|
|
8
|
+
const ActiveFDCard_1 = __importDefault(require("./ActiveFDCard"));
|
|
9
|
+
const ActionButton_1 = __importDefault(require("./ActionButton"));
|
|
10
|
+
const ThemeContext_1 = require("../theme/ThemeContext");
|
|
11
|
+
const base64Images_1 = require("../constants/strings/base64Images");
|
|
12
|
+
const PendingFDBottomSheet = ({ visible, onClose, onContinue, onBookNew, pendingFDData = {
|
|
13
|
+
name: 'Shriram Finance Ltd',
|
|
14
|
+
invested: 5000,
|
|
15
|
+
value: 5038,
|
|
16
|
+
returns: 7.53,
|
|
17
|
+
maturityDate: 'Nov 2024',
|
|
18
|
+
}, isBookingNewLoading = false, }) => {
|
|
19
|
+
const colors = (0, ThemeContext_1.useColors)();
|
|
20
|
+
const typography = (0, ThemeContext_1.useTypography)();
|
|
21
|
+
const spacing = (0, ThemeContext_1.useSpacing)();
|
|
22
|
+
const { themeName } = (0, ThemeContext_1.useTheme)();
|
|
23
|
+
const styles = createStyles(colors, typography, spacing, themeName);
|
|
24
|
+
return (react_1.default.createElement(react_native_1.Modal, { visible: visible, transparent: true, animationType: "slide", onRequestClose: onClose },
|
|
25
|
+
react_1.default.createElement(react_native_1.View, { style: styles.overlay },
|
|
26
|
+
react_1.default.createElement(react_native_1.View, { style: styles.bottomSheet },
|
|
27
|
+
react_1.default.createElement(react_native_1.SafeAreaView, { style: styles.safeArea },
|
|
28
|
+
react_1.default.createElement(react_native_1.View, { style: styles.header },
|
|
29
|
+
react_1.default.createElement(react_native_1.View, { style: styles.headerContent },
|
|
30
|
+
react_1.default.createElement(react_native_1.Text, { style: styles.title }, "Please Wait! You also have a pending journey with progress saved:"),
|
|
31
|
+
react_1.default.createElement(react_native_1.TouchableOpacity, { style: styles.closeButton, onPress: onClose },
|
|
32
|
+
react_1.default.createElement(react_native_1.Image, { source: { uri: base64Images_1.base64Images.cross }, style: { width: 14, height: 14 }, resizeMode: "contain" })))),
|
|
33
|
+
react_1.default.createElement(react_native_1.View, { style: styles.content },
|
|
34
|
+
react_1.default.createElement(react_native_1.Text, { style: styles.sectionTitle }, "Pending FDs"),
|
|
35
|
+
react_1.default.createElement(ActiveFDCard_1.default, { name: pendingFDData.name, invested: pendingFDData.invested, value: pendingFDData.value, returns: pendingFDData.returns, maturityDate: pendingFDData.maturityDate }),
|
|
36
|
+
react_1.default.createElement(react_native_1.TouchableOpacity, { style: [styles.bookNewButton, isBookingNewLoading && styles.disabledButton], onPress: onBookNew, disabled: isBookingNewLoading }, isBookingNewLoading ? (react_1.default.createElement(react_native_1.View, { style: styles.loadingContainer },
|
|
37
|
+
react_1.default.createElement(react_native_1.ActivityIndicator, { size: "small", color: colors.primary }),
|
|
38
|
+
react_1.default.createElement(react_native_1.Text, { style: [styles.bookNewText, { marginLeft: spacing.sm }] }, "Terminating workflow..."))) : (react_1.default.createElement(react_native_1.Text, { style: styles.bookNewText }, "No, I want to book a new FD"))),
|
|
39
|
+
themeName === 'dark' ? (react_1.default.createElement(ActionButton_1.default, { title: "Continue", onPress: onContinue, variant: "primary", style: styles.continueButtonWrapper })) : (react_1.default.createElement(react_native_1.TouchableOpacity, { style: styles.continueButton, onPress: onContinue },
|
|
40
|
+
react_1.default.createElement(react_native_1.Text, { style: styles.continueButtonText }, "Continue")))))))));
|
|
41
|
+
};
|
|
42
|
+
const createStyles = (colors, typography, spacing, themeName) => react_native_1.StyleSheet.create({
|
|
43
|
+
overlay: {
|
|
44
|
+
flex: 1,
|
|
45
|
+
backgroundColor: 'rgba(0, 0, 0, 0.5)',
|
|
46
|
+
justifyContent: 'flex-end',
|
|
47
|
+
},
|
|
48
|
+
bottomSheet: {
|
|
49
|
+
padding: spacing.sm,
|
|
50
|
+
backgroundColor: themeName === 'dark' ? colors.background : 'white',
|
|
51
|
+
borderTopLeftRadius: 20,
|
|
52
|
+
borderTopRightRadius: 20,
|
|
53
|
+
borderWidth: themeName === 'dark' ? 1 : 0,
|
|
54
|
+
borderColor: themeName === 'dark' ? '#ffffff' : 'transparent',
|
|
55
|
+
maxHeight: react_native_1.Dimensions.get('window').height * 0.8,
|
|
56
|
+
minHeight: react_native_1.Platform.OS === 'ios' ? 430 : 400,
|
|
57
|
+
},
|
|
58
|
+
safeArea: {
|
|
59
|
+
flex: 1,
|
|
60
|
+
},
|
|
61
|
+
header: {
|
|
62
|
+
paddingHorizontal: spacing.lg,
|
|
63
|
+
paddingTop: spacing.md,
|
|
64
|
+
paddingBottom: spacing.sm,
|
|
65
|
+
},
|
|
66
|
+
headerContent: {
|
|
67
|
+
flexDirection: 'row',
|
|
68
|
+
justifyContent: 'space-between',
|
|
69
|
+
alignItems: 'flex-start',
|
|
70
|
+
},
|
|
71
|
+
title: {
|
|
72
|
+
fontSize: 17,
|
|
73
|
+
fontWeight: '500',
|
|
74
|
+
color: themeName === 'dark' ? colors.labelColor : '#333',
|
|
75
|
+
flex: 1,
|
|
76
|
+
marginRight: spacing.md,
|
|
77
|
+
lineHeight: 24,
|
|
78
|
+
},
|
|
79
|
+
closeButton: {
|
|
80
|
+
width: 32,
|
|
81
|
+
height: 32,
|
|
82
|
+
borderRadius: 16,
|
|
83
|
+
backgroundColor: '#f5f5f5',
|
|
84
|
+
justifyContent: 'center',
|
|
85
|
+
alignItems: 'center',
|
|
86
|
+
},
|
|
87
|
+
content: {
|
|
88
|
+
flex: 1,
|
|
89
|
+
paddingHorizontal: spacing.lg,
|
|
90
|
+
paddingTop: spacing.lg,
|
|
91
|
+
paddingBottom: react_native_1.Platform.OS === 'ios' ? 20 : 0,
|
|
92
|
+
},
|
|
93
|
+
sectionTitle: Object.assign(Object.assign({}, typography.styles.h3), { color: themeName === 'dark' ? colors.labelColor : '#333', marginBottom: spacing.md }),
|
|
94
|
+
bookNewButton: {
|
|
95
|
+
marginTop: spacing.xxxl,
|
|
96
|
+
marginBottom: spacing.xxxl,
|
|
97
|
+
alignItems: 'center',
|
|
98
|
+
},
|
|
99
|
+
bookNewText: Object.assign(Object.assign({}, typography.styles.body2), { color: themeName === 'dark' ? colors.labelColor : '#000000' }),
|
|
100
|
+
disabledButton: {
|
|
101
|
+
opacity: 0.6,
|
|
102
|
+
},
|
|
103
|
+
loadingContainer: {
|
|
104
|
+
flexDirection: 'row',
|
|
105
|
+
alignItems: 'center',
|
|
106
|
+
justifyContent: 'center',
|
|
107
|
+
},
|
|
108
|
+
continueButtonWrapper: {
|
|
109
|
+
marginBottom: react_native_1.Platform.OS === 'ios' ? spacing.lg + 20 : spacing.lg,
|
|
110
|
+
},
|
|
111
|
+
continueButton: {
|
|
112
|
+
height: 50,
|
|
113
|
+
backgroundColor: '#007AFF',
|
|
114
|
+
borderRadius: 25,
|
|
115
|
+
paddingHorizontal: spacing.lg,
|
|
116
|
+
alignItems: 'center',
|
|
117
|
+
justifyContent: 'center',
|
|
118
|
+
marginBottom: react_native_1.Platform.OS === 'ios' ? spacing.lg + 20 : spacing.lg,
|
|
119
|
+
},
|
|
120
|
+
continueButtonText: Object.assign(Object.assign({}, typography.styles.button), { color: 'white', fontWeight: '600' }),
|
|
121
|
+
});
|
|
122
|
+
exports.default = PendingFDBottomSheet;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ViewStyle } from 'react-native';
|
|
3
|
+
interface SafeAreaWrapperProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
style?: ViewStyle;
|
|
6
|
+
includeTop?: boolean;
|
|
7
|
+
includeBottom?: boolean;
|
|
8
|
+
bottomPadding?: number;
|
|
9
|
+
statusBarColor?: string;
|
|
10
|
+
statusBarStyle?: 'default' | 'light-content' | 'dark-content';
|
|
11
|
+
}
|
|
12
|
+
declare const SafeAreaWrapper: React.FC<SafeAreaWrapperProps>;
|
|
13
|
+
export default SafeAreaWrapper;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const react_1 = __importDefault(require("react"));
|
|
7
|
+
const react_native_1 = require("react-native");
|
|
8
|
+
const react_native_safe_area_context_1 = require("react-native-safe-area-context");
|
|
9
|
+
const ThemeContext_1 = require("../theme/ThemeContext");
|
|
10
|
+
const SafeAreaWrapper = ({ children, style, includeTop = true, includeBottom = true, bottomPadding = 20, statusBarColor, statusBarStyle, }) => {
|
|
11
|
+
const insets = (0, react_native_safe_area_context_1.useSafeAreaInsets)();
|
|
12
|
+
const colors = (0, ThemeContext_1.useColors)();
|
|
13
|
+
const { themeName } = (0, ThemeContext_1.useTheme)();
|
|
14
|
+
// Determine status bar style based on theme if not explicitly provided
|
|
15
|
+
// Use light-content for dark backgrounds (black or very dark colors)
|
|
16
|
+
const defaultStatusBarStyle = colors.background === '#000000'
|
|
17
|
+
? 'light-content'
|
|
18
|
+
: 'dark-content';
|
|
19
|
+
const finalStatusBarStyle = statusBarStyle || defaultStatusBarStyle;
|
|
20
|
+
const finalStatusBarColor = statusBarColor || colors.background;
|
|
21
|
+
const containerStyle = [
|
|
22
|
+
styles.container,
|
|
23
|
+
{
|
|
24
|
+
backgroundColor: colors.background,
|
|
25
|
+
paddingTop: includeTop ? insets.top : 0,
|
|
26
|
+
paddingBottom: includeBottom ? insets.bottom + bottomPadding : 0,
|
|
27
|
+
borderBottomWidth: react_native_1.StyleSheet.hairlineWidth,
|
|
28
|
+
borderBottomColor: themeName === 'dark' ? '#000000' : '#ffffff',
|
|
29
|
+
},
|
|
30
|
+
style,
|
|
31
|
+
];
|
|
32
|
+
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
33
|
+
react_1.default.createElement(react_native_1.StatusBar, { backgroundColor: finalStatusBarColor, barStyle: finalStatusBarStyle, translucent: false }),
|
|
34
|
+
react_1.default.createElement(react_native_1.View, { style: containerStyle }, children)));
|
|
35
|
+
};
|
|
36
|
+
const styles = react_native_1.StyleSheet.create({
|
|
37
|
+
container: {
|
|
38
|
+
flex: 1,
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
exports.default = SafeAreaWrapper;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ScreenHeaderProps {
|
|
3
|
+
title: string;
|
|
4
|
+
onGoBack?: () => void;
|
|
5
|
+
showBackButton?: boolean;
|
|
6
|
+
rightComponent?: React.ReactNode;
|
|
7
|
+
backgroundColor?: string;
|
|
8
|
+
textColor?: string;
|
|
9
|
+
}
|
|
10
|
+
declare const ScreenHeader: React.FC<ScreenHeaderProps>;
|
|
11
|
+
export default ScreenHeader;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const react_1 = __importDefault(require("react"));
|
|
7
|
+
const react_native_1 = require("react-native");
|
|
8
|
+
const base64Images_1 = require("../constants/strings/base64Images");
|
|
9
|
+
const ThemeContext_1 = require("../theme/ThemeContext");
|
|
10
|
+
const ScreenHeader = ({ title, onGoBack, showBackButton = true, rightComponent, backgroundColor, textColor = 'white', }) => {
|
|
11
|
+
const colors = (0, ThemeContext_1.useColors)();
|
|
12
|
+
const typography = (0, ThemeContext_1.useTypography)();
|
|
13
|
+
const styles = createStyles(colors, typography, backgroundColor, textColor);
|
|
14
|
+
return (react_1.default.createElement(react_native_1.View, { style: styles.header },
|
|
15
|
+
showBackButton ? (react_1.default.createElement(react_native_1.TouchableOpacity, { onPress: onGoBack, style: styles.backButton },
|
|
16
|
+
react_1.default.createElement(react_native_1.Image, { source: { uri: base64Images_1.base64Images.backArrow }, style: [styles.backIcon, { tintColor: textColor }], resizeMode: "contain" }))) : (react_1.default.createElement(react_native_1.View, { style: styles.backButton })),
|
|
17
|
+
react_1.default.createElement(react_native_1.Text, { style: styles.headerTitle }, title),
|
|
18
|
+
react_1.default.createElement(react_native_1.View, { style: styles.rightContainer }, rightComponent || react_1.default.createElement(react_native_1.View, { style: styles.placeholder }))));
|
|
19
|
+
};
|
|
20
|
+
const createStyles = (colors, typography, backgroundColor, textColor) => react_native_1.StyleSheet.create({
|
|
21
|
+
header: {
|
|
22
|
+
flexDirection: 'row',
|
|
23
|
+
alignItems: 'center',
|
|
24
|
+
justifyContent: 'space-between',
|
|
25
|
+
paddingHorizontal: 16,
|
|
26
|
+
paddingVertical: 16,
|
|
27
|
+
backgroundColor: backgroundColor || colors.primary,
|
|
28
|
+
},
|
|
29
|
+
backButton: {
|
|
30
|
+
padding: 8,
|
|
31
|
+
minWidth: 40,
|
|
32
|
+
},
|
|
33
|
+
backIcon: {
|
|
34
|
+
width: 24,
|
|
35
|
+
height: 24,
|
|
36
|
+
},
|
|
37
|
+
headerTitle: Object.assign(Object.assign({}, typography.styles.h3), { color: textColor || 'white', fontWeight: '600', flex: 1, textAlign: 'center' }),
|
|
38
|
+
rightContainer: {
|
|
39
|
+
minWidth: 40,
|
|
40
|
+
alignItems: 'flex-end',
|
|
41
|
+
},
|
|
42
|
+
placeholder: {
|
|
43
|
+
width: 40,
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
exports.default = ScreenHeader;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface StatusDisplayProps {
|
|
3
|
+
status: 'success' | 'error' | 'warning' | 'info';
|
|
4
|
+
title: string;
|
|
5
|
+
subtitle?: string;
|
|
6
|
+
iconName?: string;
|
|
7
|
+
iconSize?: number;
|
|
8
|
+
showIcon?: boolean;
|
|
9
|
+
containerStyle?: object;
|
|
10
|
+
titleStyle?: object;
|
|
11
|
+
subtitleStyle?: object;
|
|
12
|
+
iconContainerStyle?: object;
|
|
13
|
+
}
|
|
14
|
+
declare const StatusDisplay: React.FC<StatusDisplayProps>;
|
|
15
|
+
export default StatusDisplay;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const react_1 = __importDefault(require("react"));
|
|
7
|
+
const react_native_1 = require("react-native");
|
|
8
|
+
const Ionicons_1 = __importDefault(require("react-native-vector-icons/Ionicons"));
|
|
9
|
+
const ThemeContext_1 = require("../theme/ThemeContext");
|
|
10
|
+
const StatusDisplay = ({ status, title, subtitle, iconName, iconSize = 48, showIcon = true, containerStyle, titleStyle, subtitleStyle, iconContainerStyle, }) => {
|
|
11
|
+
const colors = (0, ThemeContext_1.useColors)();
|
|
12
|
+
const typography = (0, ThemeContext_1.useTypography)();
|
|
13
|
+
const styles = createStyles(colors, typography, status);
|
|
14
|
+
const getStatusConfig = () => {
|
|
15
|
+
switch (status) {
|
|
16
|
+
case 'success':
|
|
17
|
+
return {
|
|
18
|
+
icon: iconName || 'checkmark',
|
|
19
|
+
color: '#4CAF50',
|
|
20
|
+
bgColor: 'rgba(76, 175, 80, 0.1)',
|
|
21
|
+
innerBgColor: 'rgba(76, 175, 80, 0.2)',
|
|
22
|
+
};
|
|
23
|
+
case 'error':
|
|
24
|
+
return {
|
|
25
|
+
icon: iconName || 'alert',
|
|
26
|
+
color: '#F44336',
|
|
27
|
+
bgColor: 'rgba(244, 67, 54, 0.1)',
|
|
28
|
+
innerBgColor: 'rgba(244, 67, 54, 0.2)',
|
|
29
|
+
};
|
|
30
|
+
case 'warning':
|
|
31
|
+
return {
|
|
32
|
+
icon: iconName || 'warning',
|
|
33
|
+
color: '#FF9800',
|
|
34
|
+
bgColor: 'rgba(255, 152, 0, 0.1)',
|
|
35
|
+
innerBgColor: 'rgba(255, 152, 0, 0.2)',
|
|
36
|
+
};
|
|
37
|
+
case 'info':
|
|
38
|
+
return {
|
|
39
|
+
icon: iconName || 'information',
|
|
40
|
+
color: '#2196F3',
|
|
41
|
+
bgColor: 'rgba(33, 150, 243, 0.1)',
|
|
42
|
+
innerBgColor: 'rgba(33, 150, 243, 0.2)',
|
|
43
|
+
};
|
|
44
|
+
default:
|
|
45
|
+
return {
|
|
46
|
+
icon: iconName || 'information',
|
|
47
|
+
color: '#2196F3',
|
|
48
|
+
bgColor: 'rgba(33, 150, 243, 0.1)',
|
|
49
|
+
innerBgColor: 'rgba(33, 150, 243, 0.2)',
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
const statusConfig = getStatusConfig();
|
|
54
|
+
return (react_1.default.createElement(react_native_1.View, { style: [styles.container, containerStyle] },
|
|
55
|
+
showIcon && (react_1.default.createElement(react_native_1.View, { style: [styles.iconContainer, iconContainerStyle] },
|
|
56
|
+
react_1.default.createElement(react_native_1.View, { style: [styles.iconCircleOuter, { backgroundColor: statusConfig.bgColor }] },
|
|
57
|
+
react_1.default.createElement(react_native_1.View, { style: [styles.iconCircleInner, { backgroundColor: statusConfig.innerBgColor }] },
|
|
58
|
+
react_1.default.createElement(Ionicons_1.default, { name: statusConfig.icon, size: iconSize, color: statusConfig.color }))))),
|
|
59
|
+
react_1.default.createElement(react_native_1.Text, { style: [styles.title, titleStyle] }, title),
|
|
60
|
+
subtitle && (react_1.default.createElement(react_native_1.Text, { style: [styles.subtitle, subtitleStyle] }, subtitle))));
|
|
61
|
+
};
|
|
62
|
+
const createStyles = (colors, typography, status) => react_native_1.StyleSheet.create({
|
|
63
|
+
container: {
|
|
64
|
+
alignItems: 'center',
|
|
65
|
+
paddingVertical: 20,
|
|
66
|
+
},
|
|
67
|
+
iconContainer: {
|
|
68
|
+
alignItems: 'center',
|
|
69
|
+
marginBottom: 24,
|
|
70
|
+
},
|
|
71
|
+
iconCircleOuter: {
|
|
72
|
+
width: 120,
|
|
73
|
+
height: 120,
|
|
74
|
+
borderRadius: 60,
|
|
75
|
+
alignItems: 'center',
|
|
76
|
+
justifyContent: 'center',
|
|
77
|
+
},
|
|
78
|
+
iconCircleInner: {
|
|
79
|
+
width: 60,
|
|
80
|
+
height: 60,
|
|
81
|
+
borderRadius: 30,
|
|
82
|
+
alignItems: 'center',
|
|
83
|
+
justifyContent: 'center',
|
|
84
|
+
},
|
|
85
|
+
title: Object.assign(Object.assign({}, typography.styles.h1), { color: colors.text, textAlign: 'center', marginBottom: 8, letterSpacing: 0.5 }),
|
|
86
|
+
subtitle: Object.assign(Object.assign({}, typography.styles.bodyMedium), { color: colors.textLight, textAlign: 'center', lineHeight: 20 }),
|
|
87
|
+
});
|
|
88
|
+
exports.default = StatusDisplay;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TextInput } from 'react-native';
|
|
3
|
+
export interface BaseTextFieldProps {
|
|
4
|
+
label: string;
|
|
5
|
+
value: string;
|
|
6
|
+
onChangeText: (text: string) => void;
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
placeholderColor?: string;
|
|
9
|
+
editable?: boolean;
|
|
10
|
+
error?: string;
|
|
11
|
+
success?: string;
|
|
12
|
+
required?: boolean;
|
|
13
|
+
testID?: string;
|
|
14
|
+
keepWhiteBackground?: boolean;
|
|
15
|
+
onFocus?: () => void;
|
|
16
|
+
onBlur?: () => void;
|
|
17
|
+
textInputRef?: React.RefObject<TextInput>;
|
|
18
|
+
}
|
|
19
|
+
export interface TextFieldWithLabelProps extends BaseTextFieldProps {
|
|
20
|
+
variant?: 'text' | 'dropdown' | 'date' | 'numeric' | 'email' | 'phone';
|
|
21
|
+
maxLength?: number;
|
|
22
|
+
multiline?: boolean;
|
|
23
|
+
numberOfLines?: number;
|
|
24
|
+
secureTextEntry?: boolean;
|
|
25
|
+
keyboardType?: 'default' | 'numeric' | 'email-address' | 'phone-pad';
|
|
26
|
+
autoCapitalize?: 'none' | 'sentences' | 'words' | 'characters';
|
|
27
|
+
options?: string[];
|
|
28
|
+
onDropdownSelect?: (option: string) => void;
|
|
29
|
+
isDropdownOpen?: boolean;
|
|
30
|
+
onDropdownToggle?: () => void;
|
|
31
|
+
onDatePress?: () => void;
|
|
32
|
+
dateFormat?: string;
|
|
33
|
+
leftIcon?: string;
|
|
34
|
+
rightIcon?: string;
|
|
35
|
+
onRightIconPress?: () => void;
|
|
36
|
+
containerStyle?: object;
|
|
37
|
+
inputStyle?: object;
|
|
38
|
+
labelStyle?: object;
|
|
39
|
+
validator?: (value: string) => string | null;
|
|
40
|
+
validateOnBlur?: boolean;
|
|
41
|
+
validateOnChange?: boolean;
|
|
42
|
+
returnKeyType?: 'done' | 'go' | 'next' | 'search' | 'send' | 'default';
|
|
43
|
+
onSubmitEditing?: () => void;
|
|
44
|
+
}
|
|
45
|
+
declare const TextFieldWithLabel: React.FC<TextFieldWithLabelProps>;
|
|
46
|
+
export default TextFieldWithLabel;
|