@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,326 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
const react_1 = __importStar(require("react"));
|
|
40
|
+
const react_native_1 = require("react-native");
|
|
41
|
+
const Ionicons_1 = __importDefault(require("react-native-vector-icons/Ionicons"));
|
|
42
|
+
const base64Images_1 = require("../constants/strings/base64Images");
|
|
43
|
+
const ThemeContext_1 = require("../theme/ThemeContext");
|
|
44
|
+
const theme_1 = require("../theme");
|
|
45
|
+
const TextFieldWithLabel = ({ label, value, onChangeText, placeholder, placeholderColor, editable = true, error, success, required = false, testID, variant = 'text', maxLength, multiline = false, numberOfLines = 1, secureTextEntry = false, keyboardType = 'default', autoCapitalize = 'sentences', options = [], onDropdownSelect, isDropdownOpen, onDropdownToggle, onDatePress, dateFormat = 'DD/MM/YYYY', leftIcon, rightIcon, onRightIconPress, containerStyle, inputStyle, labelStyle, validator, validateOnBlur = false, validateOnChange = false, keepWhiteBackground = false, onFocus, onBlur, textInputRef, returnKeyType, onSubmitEditing, }) => {
|
|
46
|
+
const colors = (0, ThemeContext_1.useColors)();
|
|
47
|
+
const typography = (0, ThemeContext_1.useTypography)();
|
|
48
|
+
const { themeName } = (0, ThemeContext_1.useTheme)();
|
|
49
|
+
const styles = react_1.default.useMemo(() => createStyles(colors, typography, themeName), [colors, typography, themeName]);
|
|
50
|
+
const [internalDropdownOpen, setInternalDropdownOpen] = (0, react_1.useState)(false);
|
|
51
|
+
const isDropdownOpenState = isDropdownOpen !== undefined ? isDropdownOpen : internalDropdownOpen;
|
|
52
|
+
const [internalError, setInternalError] = (0, react_1.useState)('');
|
|
53
|
+
const [isFocused, setIsFocused] = (0, react_1.useState)(false);
|
|
54
|
+
// Validation logic
|
|
55
|
+
const validateField = (text) => {
|
|
56
|
+
if (validator) {
|
|
57
|
+
const validationError = validator(text);
|
|
58
|
+
setInternalError(validationError || '');
|
|
59
|
+
return validationError;
|
|
60
|
+
}
|
|
61
|
+
return null;
|
|
62
|
+
};
|
|
63
|
+
// Handle text change with validation
|
|
64
|
+
const handleTextChange = (text) => {
|
|
65
|
+
onChangeText(text);
|
|
66
|
+
if (validateOnChange) {
|
|
67
|
+
validateField(text);
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
// Handle blur with validation
|
|
71
|
+
const handleBlur = () => {
|
|
72
|
+
setIsFocused(false);
|
|
73
|
+
if (validateOnBlur) {
|
|
74
|
+
validateField(value);
|
|
75
|
+
}
|
|
76
|
+
onBlur === null || onBlur === void 0 ? void 0 : onBlur(); // Call the onBlur callback if provided
|
|
77
|
+
};
|
|
78
|
+
// Handle focus
|
|
79
|
+
const handleFocus = () => {
|
|
80
|
+
setIsFocused(true);
|
|
81
|
+
setInternalError(''); // Clear internal errors on focus
|
|
82
|
+
onFocus === null || onFocus === void 0 ? void 0 : onFocus(); // Call the onFocus callback if provided
|
|
83
|
+
};
|
|
84
|
+
// Determine border styling
|
|
85
|
+
const getBorderStyle = () => {
|
|
86
|
+
const displayError = error || internalError;
|
|
87
|
+
if (displayError) {
|
|
88
|
+
return { borderColor: colors.error, borderWidth: 1 };
|
|
89
|
+
}
|
|
90
|
+
if (success) {
|
|
91
|
+
return { borderColor: colors.success, borderWidth: 1 };
|
|
92
|
+
}
|
|
93
|
+
if (isFocused) {
|
|
94
|
+
return { borderColor: colors.primary, borderWidth: 1 };
|
|
95
|
+
}
|
|
96
|
+
if (themeName === 'dark') {
|
|
97
|
+
return {
|
|
98
|
+
borderColor: colors.inputBorder,
|
|
99
|
+
borderWidth: 1
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
return {
|
|
103
|
+
borderColor: (0, theme_1.getBorderColor)({ colors }, 0.36),
|
|
104
|
+
borderWidth: 0.5
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
// Render label with required indicator
|
|
108
|
+
const renderLabel = () => (react_1.default.createElement(react_native_1.Text, { style: [styles.label, labelStyle] },
|
|
109
|
+
label,
|
|
110
|
+
required && react_1.default.createElement(react_native_1.Text, { style: styles.requiredIndicator }, " *")));
|
|
111
|
+
// Render validation message
|
|
112
|
+
const renderValidationMessage = () => {
|
|
113
|
+
const displayError = error || internalError;
|
|
114
|
+
const message = displayError || success;
|
|
115
|
+
if (!message)
|
|
116
|
+
return null;
|
|
117
|
+
const isError = !!displayError;
|
|
118
|
+
const iconName = isError ? 'warning' : 'checkmark-circle';
|
|
119
|
+
const iconColor = isError ? colors.error : colors.success;
|
|
120
|
+
const textColor = isError ? colors.error : colors.success;
|
|
121
|
+
return (react_1.default.createElement(react_native_1.View, { style: styles.validationContainer },
|
|
122
|
+
react_1.default.createElement(Ionicons_1.default, { name: iconName, size: 16, color: iconColor, style: styles.validationIcon }),
|
|
123
|
+
react_1.default.createElement(react_native_1.Text, { style: [styles.validationText, { color: textColor }] }, message)));
|
|
124
|
+
};
|
|
125
|
+
// Render text input
|
|
126
|
+
const renderTextInput = () => (react_1.default.createElement(react_native_1.View, { style: [
|
|
127
|
+
styles.inputContainer,
|
|
128
|
+
getBorderStyle(),
|
|
129
|
+
!editable && !keepWhiteBackground && styles.disabledInputContainer,
|
|
130
|
+
containerStyle
|
|
131
|
+
] },
|
|
132
|
+
leftIcon && (react_1.default.createElement(Ionicons_1.default, { name: leftIcon, size: 20, color: colors.textLight, style: styles.leftIcon })),
|
|
133
|
+
react_1.default.createElement(react_native_1.TextInput, { ref: textInputRef, style: [
|
|
134
|
+
styles.textInput,
|
|
135
|
+
!editable && styles.disabledTextInput,
|
|
136
|
+
inputStyle
|
|
137
|
+
], placeholder: placeholder, placeholderTextColor: placeholderColor || (themeName === 'dark' ? colors.placeholderColor : 'rgba(0,32,34,0.2)'), value: value, onChangeText: handleTextChange, onFocus: handleFocus, onBlur: handleBlur, editable: editable, maxLength: maxLength, multiline: multiline, numberOfLines: numberOfLines, secureTextEntry: secureTextEntry, keyboardType: keyboardType, autoCapitalize: autoCapitalize, testID: testID, textAlignVertical: multiline ? 'top' : 'center', returnKeyType: returnKeyType || (react_native_1.Platform.OS === 'ios' && (keyboardType === 'numeric' || variant === 'numeric') ? 'done' : 'default'), blurOnSubmit: react_native_1.Platform.OS === 'ios', onSubmitEditing: onSubmitEditing }),
|
|
138
|
+
rightIcon && (react_1.default.createElement(react_native_1.TouchableOpacity, { onPress: onRightIconPress, style: styles.rightIconContainer },
|
|
139
|
+
react_1.default.createElement(Ionicons_1.default, { name: rightIcon, size: 20, color: colors.textLight }))),
|
|
140
|
+
success && !error && !internalError && (react_1.default.createElement(react_native_1.View, { style: styles.successIcon },
|
|
141
|
+
react_1.default.createElement(Ionicons_1.default, { name: "checkmark", size: 16, color: "white" })))));
|
|
142
|
+
// Render dropdown
|
|
143
|
+
const renderDropdown = () => (react_1.default.createElement(react_native_1.View, { style: [
|
|
144
|
+
styles.inputContainer,
|
|
145
|
+
getBorderStyle(),
|
|
146
|
+
!editable && !keepWhiteBackground && styles.disabledInputContainer,
|
|
147
|
+
containerStyle
|
|
148
|
+
] },
|
|
149
|
+
react_1.default.createElement(react_native_1.TouchableOpacity, { style: styles.dropdownTouchable, onPress: () => {
|
|
150
|
+
if (onDropdownToggle) {
|
|
151
|
+
onDropdownToggle();
|
|
152
|
+
}
|
|
153
|
+
else {
|
|
154
|
+
setInternalDropdownOpen(!internalDropdownOpen);
|
|
155
|
+
}
|
|
156
|
+
}, disabled: !editable },
|
|
157
|
+
react_1.default.createElement(react_native_1.Text, { style: [
|
|
158
|
+
styles.dropdownText,
|
|
159
|
+
!value && [styles.placeholderText, placeholderColor ? { color: placeholderColor } : null],
|
|
160
|
+
!editable && styles.disabledTextInput
|
|
161
|
+
] }, value || placeholder),
|
|
162
|
+
react_1.default.createElement(react_native_1.Image, { source: { uri: base64Images_1.base64Images.dropdown }, style: [styles.icon, isDropdownOpenState ? { transform: [{ rotate: '180deg' }] } : null], resizeMode: "contain" })),
|
|
163
|
+
isDropdownOpenState && !onDropdownToggle && (react_1.default.createElement(react_native_1.View, { style: styles.dropdownOptions }, options.map((option) => (react_1.default.createElement(react_native_1.TouchableOpacity, { key: option, style: styles.dropdownOption, onPress: () => {
|
|
164
|
+
onDropdownSelect === null || onDropdownSelect === void 0 ? void 0 : onDropdownSelect(option);
|
|
165
|
+
onChangeText(option);
|
|
166
|
+
setInternalDropdownOpen(false);
|
|
167
|
+
} },
|
|
168
|
+
react_1.default.createElement(react_native_1.Text, { style: styles.dropdownOptionText }, option))))))));
|
|
169
|
+
// Render date field
|
|
170
|
+
const renderDateField = () => (react_1.default.createElement(react_native_1.TouchableOpacity, { style: [
|
|
171
|
+
styles.inputContainer,
|
|
172
|
+
getBorderStyle(),
|
|
173
|
+
!editable && !keepWhiteBackground && styles.disabledInputContainer,
|
|
174
|
+
containerStyle
|
|
175
|
+
], onPress: onDatePress ? onDatePress : undefined, activeOpacity: onDatePress ? 0.7 : 1, disabled: !onDatePress },
|
|
176
|
+
react_1.default.createElement(react_native_1.TextInput, { ref: textInputRef, style: [
|
|
177
|
+
styles.textInput,
|
|
178
|
+
!editable && styles.disabledTextInput,
|
|
179
|
+
inputStyle
|
|
180
|
+
], placeholder: placeholder || dateFormat, placeholderTextColor: placeholderColor || (themeName === 'dark' ? colors.placeholderColor : 'rgba(0,32,34,0.2)'), value: value, onChangeText: handleTextChange, onFocus: handleFocus, onBlur: handleBlur, editable: editable, maxLength: 10, keyboardType: "numeric", testID: testID, returnKeyType: returnKeyType || (react_native_1.Platform.OS === 'ios' ? 'done' : 'default'), blurOnSubmit: react_native_1.Platform.OS === 'ios', onSubmitEditing: onSubmitEditing, pointerEvents: "none" }),
|
|
181
|
+
react_1.default.createElement(react_native_1.View, { style: styles.dateIconContainer, pointerEvents: "none" },
|
|
182
|
+
react_1.default.createElement(react_native_1.Image, { source: { uri: base64Images_1.base64Images.calendar }, style: styles.icon, resizeMode: "contain" }))));
|
|
183
|
+
// Render appropriate input based on variant
|
|
184
|
+
const renderInput = () => {
|
|
185
|
+
switch (variant) {
|
|
186
|
+
case 'dropdown':
|
|
187
|
+
return renderDropdown();
|
|
188
|
+
case 'date':
|
|
189
|
+
return renderDateField();
|
|
190
|
+
case 'numeric':
|
|
191
|
+
return renderTextInput();
|
|
192
|
+
case 'email':
|
|
193
|
+
return renderTextInput();
|
|
194
|
+
case 'phone':
|
|
195
|
+
return renderTextInput();
|
|
196
|
+
default:
|
|
197
|
+
return renderTextInput();
|
|
198
|
+
}
|
|
199
|
+
};
|
|
200
|
+
return (react_1.default.createElement(react_native_1.View, { style: styles.fieldContainer },
|
|
201
|
+
renderLabel(),
|
|
202
|
+
renderInput(),
|
|
203
|
+
renderValidationMessage()));
|
|
204
|
+
};
|
|
205
|
+
const createStyles = (colors, typography, themeName) => react_native_1.StyleSheet.create({
|
|
206
|
+
fieldContainer: {
|
|
207
|
+
marginBottom: 26,
|
|
208
|
+
},
|
|
209
|
+
label: {
|
|
210
|
+
fontSize: 12,
|
|
211
|
+
color: themeName === 'dark' ? colors.labelColor : colors.textLight,
|
|
212
|
+
marginBottom: 8,
|
|
213
|
+
fontWeight: '400',
|
|
214
|
+
},
|
|
215
|
+
requiredIndicator: {
|
|
216
|
+
color: colors.error,
|
|
217
|
+
},
|
|
218
|
+
inputContainer: {
|
|
219
|
+
flexDirection: 'row',
|
|
220
|
+
alignItems: 'center',
|
|
221
|
+
borderRadius: themeName === 'dark' ? 5 : 25,
|
|
222
|
+
backgroundColor: themeName === 'dark' ? colors.inputBackground : 'white',
|
|
223
|
+
minHeight: 50,
|
|
224
|
+
paddingHorizontal: 16,
|
|
225
|
+
position: 'relative',
|
|
226
|
+
borderWidth: themeName === 'dark' ? 1 : 0,
|
|
227
|
+
borderColor: themeName === 'dark' ? colors.inputBorder : 'transparent',
|
|
228
|
+
},
|
|
229
|
+
disabledInputContainer: {
|
|
230
|
+
backgroundColor: '#f5f5f5',
|
|
231
|
+
},
|
|
232
|
+
textInput: {
|
|
233
|
+
fontSize: 14,
|
|
234
|
+
color: colors.text,
|
|
235
|
+
fontWeight: '600',
|
|
236
|
+
flex: 1,
|
|
237
|
+
paddingVertical: 0,
|
|
238
|
+
height: '100%',
|
|
239
|
+
},
|
|
240
|
+
disabledTextInput: {
|
|
241
|
+
color: '#000000',
|
|
242
|
+
},
|
|
243
|
+
leftIcon: {
|
|
244
|
+
marginRight: 12,
|
|
245
|
+
},
|
|
246
|
+
rightIconContainer: {
|
|
247
|
+
marginLeft: 12,
|
|
248
|
+
padding: 4,
|
|
249
|
+
},
|
|
250
|
+
icon: {
|
|
251
|
+
width: 20,
|
|
252
|
+
height: 20,
|
|
253
|
+
tintColor: colors.textLight,
|
|
254
|
+
},
|
|
255
|
+
successIcon: {
|
|
256
|
+
position: 'absolute',
|
|
257
|
+
right: 16,
|
|
258
|
+
width: 16,
|
|
259
|
+
height: 16,
|
|
260
|
+
borderRadius: 8,
|
|
261
|
+
backgroundColor: colors.success,
|
|
262
|
+
alignItems: 'center',
|
|
263
|
+
justifyContent: 'center',
|
|
264
|
+
},
|
|
265
|
+
dropdownTouchable: {
|
|
266
|
+
flex: 1,
|
|
267
|
+
flexDirection: 'row',
|
|
268
|
+
alignItems: 'center',
|
|
269
|
+
justifyContent: 'space-between',
|
|
270
|
+
paddingVertical: 12,
|
|
271
|
+
},
|
|
272
|
+
dropdownText: {
|
|
273
|
+
fontSize: 14,
|
|
274
|
+
color: colors.text,
|
|
275
|
+
fontWeight: 'bold',
|
|
276
|
+
flex: 1,
|
|
277
|
+
},
|
|
278
|
+
placeholderText: {
|
|
279
|
+
color: themeName === 'dark' ? colors.placeholderColor : 'rgba(0,32,34,0.2)',
|
|
280
|
+
},
|
|
281
|
+
dropdownOptions: {
|
|
282
|
+
position: 'absolute',
|
|
283
|
+
top: '100%',
|
|
284
|
+
left: 0,
|
|
285
|
+
right: 0,
|
|
286
|
+
backgroundColor: themeName === 'dark' ? colors.inputBackground : 'white',
|
|
287
|
+
borderWidth: themeName === 'dark' ? 1 : 0.5,
|
|
288
|
+
borderColor: themeName === 'dark' ? '#ffffff' : colors.border,
|
|
289
|
+
borderRadius: 8,
|
|
290
|
+
marginTop: 4,
|
|
291
|
+
zIndex: 1000,
|
|
292
|
+
elevation: 5,
|
|
293
|
+
shadowColor: '#000',
|
|
294
|
+
shadowOffset: {
|
|
295
|
+
width: 0,
|
|
296
|
+
height: 2,
|
|
297
|
+
},
|
|
298
|
+
shadowOpacity: 0.1,
|
|
299
|
+
shadowRadius: 4,
|
|
300
|
+
},
|
|
301
|
+
dropdownOption: {
|
|
302
|
+
paddingHorizontal: 16,
|
|
303
|
+
paddingVertical: 12,
|
|
304
|
+
borderBottomWidth: 1,
|
|
305
|
+
borderBottomColor: colors.border,
|
|
306
|
+
},
|
|
307
|
+
dropdownOptionText: {
|
|
308
|
+
fontSize: 14,
|
|
309
|
+
color: colors.text,
|
|
310
|
+
fontWeight: 'bold',
|
|
311
|
+
},
|
|
312
|
+
dateIconContainer: {
|
|
313
|
+
marginLeft: 12,
|
|
314
|
+
padding: 4,
|
|
315
|
+
},
|
|
316
|
+
validationContainer: {
|
|
317
|
+
flexDirection: 'row',
|
|
318
|
+
alignItems: 'center',
|
|
319
|
+
marginTop: 8,
|
|
320
|
+
},
|
|
321
|
+
validationIcon: {
|
|
322
|
+
marginRight: 6,
|
|
323
|
+
},
|
|
324
|
+
validationText: Object.assign(Object.assign({}, typography.styles.bodySmall), { fontWeight: '500', flex: 1 }),
|
|
325
|
+
});
|
|
326
|
+
exports.default = TextFieldWithLabel;
|
|
@@ -0,0 +1,45 @@
|
|
|
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 ThemeContext_1 = require("../theme/ThemeContext");
|
|
9
|
+
const theme_1 = require("../theme");
|
|
10
|
+
const TrustBox = ({ title1, title2, style }) => {
|
|
11
|
+
const colors = (0, ThemeContext_1.useColors)();
|
|
12
|
+
const typography = (0, ThemeContext_1.useTypography)();
|
|
13
|
+
const { themeName } = (0, ThemeContext_1.useTheme)();
|
|
14
|
+
const styles = createStyles(colors, typography, themeName);
|
|
15
|
+
return (react_1.default.createElement(react_native_1.View, { style: [styles.container, style] },
|
|
16
|
+
react_1.default.createElement(react_native_1.View, { style: styles.textColumn },
|
|
17
|
+
react_1.default.createElement(react_native_1.Text, { style: styles.titleLight }, title1),
|
|
18
|
+
react_1.default.createElement(react_native_1.Text, { style: styles.title }, title2))));
|
|
19
|
+
};
|
|
20
|
+
const createStyles = (colors, typography, themeName) => react_native_1.StyleSheet.create({
|
|
21
|
+
container: {
|
|
22
|
+
flex: 1,
|
|
23
|
+
backgroundColor: themeName === 'dark' ? colors.inputBackground : 'transparent',
|
|
24
|
+
padding: 8,
|
|
25
|
+
borderRadius: 5,
|
|
26
|
+
borderWidth: 0.5,
|
|
27
|
+
borderColor: themeName === 'dark' ? colors.inputBorder : (0, theme_1.getBorderColor)({ colors }, 0.36),
|
|
28
|
+
flexDirection: 'row',
|
|
29
|
+
alignItems: 'center',
|
|
30
|
+
},
|
|
31
|
+
dot: {
|
|
32
|
+
width: 32,
|
|
33
|
+
height: 32,
|
|
34
|
+
borderRadius: 25,
|
|
35
|
+
backgroundColor: themeName === 'dark' ? colors.background : 'rgba(0,235,180,0.1)',
|
|
36
|
+
marginRight: 10,
|
|
37
|
+
},
|
|
38
|
+
textColumn: {
|
|
39
|
+
flexDirection: 'column',
|
|
40
|
+
flex: 1,
|
|
41
|
+
},
|
|
42
|
+
titleLight: Object.assign(Object.assign({}, typography.styles.bodyMedium), { color: themeName === 'dark' ? '#C4CDD3' : colors.textLight, marginBottom: 0 }),
|
|
43
|
+
title: Object.assign(Object.assign({}, typography.styles.bodyMedium), { color: themeName === 'dark' ? colors.labelColor : colors.textLight, marginBottom: 0 }),
|
|
44
|
+
});
|
|
45
|
+
exports.default = TrustBox;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface ValidationErrorAlertProps {
|
|
2
|
+
errors: string[];
|
|
3
|
+
onCancel: () => void;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Show validation error alert with option to cancel FD booking
|
|
7
|
+
*/
|
|
8
|
+
export declare const showValidationErrorAlert: (errors: string[], onCancelFDBooking: () => void) => void;
|
|
9
|
+
/**
|
|
10
|
+
* Utility function to validate and show error if needed
|
|
11
|
+
*/
|
|
12
|
+
export declare const validateAndProceed: (appData: any, requiredFields: Array<{
|
|
13
|
+
field: string;
|
|
14
|
+
label: string;
|
|
15
|
+
}>, onCancelFDBooking: () => void) => boolean;
|
|
16
|
+
declare const _default: {
|
|
17
|
+
showValidationErrorAlert: (errors: string[], onCancelFDBooking: () => void) => void;
|
|
18
|
+
validateAndProceed: (appData: any, requiredFields: Array<{
|
|
19
|
+
field: string;
|
|
20
|
+
label: string;
|
|
21
|
+
}>, onCancelFDBooking: () => void) => boolean;
|
|
22
|
+
};
|
|
23
|
+
export default _default;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateAndProceed = exports.showValidationErrorAlert = void 0;
|
|
4
|
+
const react_native_1 = require("react-native");
|
|
5
|
+
/**
|
|
6
|
+
* Show validation error alert with option to cancel FD booking
|
|
7
|
+
*/
|
|
8
|
+
const showValidationErrorAlert = (errors, onCancelFDBooking) => {
|
|
9
|
+
const errorMessage = errors.length > 0
|
|
10
|
+
? `The following required information is missing from the main app:\n\n${errors.join('\n')}\n\nPlease provide all required user information to proceed with FD booking.`
|
|
11
|
+
: 'Required user information is missing from the main app.';
|
|
12
|
+
react_native_1.Alert.alert('Cannot Proceed with FD Booking', errorMessage, [
|
|
13
|
+
{
|
|
14
|
+
text: 'Cancel FD Booking',
|
|
15
|
+
onPress: onCancelFDBooking,
|
|
16
|
+
style: 'cancel',
|
|
17
|
+
},
|
|
18
|
+
], { cancelable: false });
|
|
19
|
+
};
|
|
20
|
+
exports.showValidationErrorAlert = showValidationErrorAlert;
|
|
21
|
+
/**
|
|
22
|
+
* Utility function to validate and show error if needed
|
|
23
|
+
*/
|
|
24
|
+
const validateAndProceed = (appData, requiredFields, onCancelFDBooking) => {
|
|
25
|
+
const missingFields = [];
|
|
26
|
+
requiredFields.forEach(({ field, label }) => {
|
|
27
|
+
const value = appData === null || appData === void 0 ? void 0 : appData[field];
|
|
28
|
+
if (!value || (typeof value === 'string' && !value.trim())) {
|
|
29
|
+
missingFields.push(label);
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
if (missingFields.length > 0) {
|
|
33
|
+
(0, exports.showValidationErrorAlert)(missingFields, onCancelFDBooking);
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
return true;
|
|
37
|
+
};
|
|
38
|
+
exports.validateAndProceed = validateAndProceed;
|
|
39
|
+
exports.default = { showValidationErrorAlert: exports.showValidationErrorAlert, validateAndProceed: exports.validateAndProceed };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type MessageType = 'error' | 'success' | 'loading';
|
|
3
|
+
export interface ValidationMessageProps {
|
|
4
|
+
type: MessageType;
|
|
5
|
+
message: string;
|
|
6
|
+
visible?: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare const ValidationMessage: React.FC<ValidationMessageProps>;
|
|
9
|
+
export default ValidationMessage;
|
|
@@ -0,0 +1,98 @@
|
|
|
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 base64Images_1 = require("../constants/strings/base64Images");
|
|
10
|
+
const ThemeContext_1 = require("../theme/ThemeContext");
|
|
11
|
+
const ValidationMessage = ({ type, message, visible = true, }) => {
|
|
12
|
+
const colors = (0, ThemeContext_1.useColors)();
|
|
13
|
+
const styles = createStyles(colors);
|
|
14
|
+
if (!visible || !message)
|
|
15
|
+
return null;
|
|
16
|
+
const getIconName = () => {
|
|
17
|
+
switch (type) {
|
|
18
|
+
case 'error':
|
|
19
|
+
return 'warning';
|
|
20
|
+
case 'success':
|
|
21
|
+
return 'checkmark-circle';
|
|
22
|
+
case 'loading':
|
|
23
|
+
return 'time';
|
|
24
|
+
default:
|
|
25
|
+
return 'information-circle';
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
const getIconColor = () => {
|
|
29
|
+
switch (type) {
|
|
30
|
+
case 'error':
|
|
31
|
+
return colors.error;
|
|
32
|
+
case 'success':
|
|
33
|
+
return colors.success;
|
|
34
|
+
case 'loading':
|
|
35
|
+
return colors.primary;
|
|
36
|
+
default:
|
|
37
|
+
return colors.textLight;
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
const getTextStyle = () => {
|
|
41
|
+
switch (type) {
|
|
42
|
+
case 'error':
|
|
43
|
+
return styles.errorText;
|
|
44
|
+
case 'success':
|
|
45
|
+
return styles.successText;
|
|
46
|
+
case 'loading':
|
|
47
|
+
return styles.loadingText;
|
|
48
|
+
default:
|
|
49
|
+
return styles.defaultText;
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
return (react_1.default.createElement(react_native_1.View, { style: [styles.container, type === 'loading' && styles.loadingContainer] },
|
|
53
|
+
type === 'success' ? (react_1.default.createElement(react_native_1.Image, { source: { uri: base64Images_1.base64Images.greenTick }, style: styles.imageIcon, resizeMode: "contain" })) : type === 'error' ? (react_1.default.createElement(react_native_1.Image, { source: { uri: base64Images_1.base64Images.error }, style: styles.imageIcon, resizeMode: "contain" })) : (react_1.default.createElement(Ionicons_1.default, { name: getIconName(), size: 16, color: getIconColor(), style: styles.icon })),
|
|
54
|
+
react_1.default.createElement(react_native_1.Text, { style: getTextStyle() }, message)));
|
|
55
|
+
};
|
|
56
|
+
const createStyles = (colors) => react_native_1.StyleSheet.create({
|
|
57
|
+
container: {
|
|
58
|
+
flexDirection: 'row',
|
|
59
|
+
alignItems: 'center',
|
|
60
|
+
marginTop: -8,
|
|
61
|
+
marginBottom: 16,
|
|
62
|
+
},
|
|
63
|
+
loadingContainer: {
|
|
64
|
+
justifyContent: 'center',
|
|
65
|
+
},
|
|
66
|
+
icon: {
|
|
67
|
+
marginRight: 6,
|
|
68
|
+
},
|
|
69
|
+
imageIcon: {
|
|
70
|
+
width: 16,
|
|
71
|
+
height: 16,
|
|
72
|
+
marginRight: 6,
|
|
73
|
+
},
|
|
74
|
+
errorText: {
|
|
75
|
+
fontSize: 12,
|
|
76
|
+
color: colors.error,
|
|
77
|
+
fontWeight: '500',
|
|
78
|
+
flex: 1,
|
|
79
|
+
},
|
|
80
|
+
successText: {
|
|
81
|
+
fontSize: 12,
|
|
82
|
+
color: colors.success,
|
|
83
|
+
fontWeight: '500',
|
|
84
|
+
flex: 1,
|
|
85
|
+
},
|
|
86
|
+
loadingText: {
|
|
87
|
+
fontSize: 12,
|
|
88
|
+
color: colors.primary,
|
|
89
|
+
fontWeight: '500',
|
|
90
|
+
},
|
|
91
|
+
defaultText: {
|
|
92
|
+
fontSize: 12,
|
|
93
|
+
color: colors.textLight,
|
|
94
|
+
fontWeight: '500',
|
|
95
|
+
flex: 1,
|
|
96
|
+
},
|
|
97
|
+
});
|
|
98
|
+
exports.default = ValidationMessage;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export { default as Header } from './Header';
|
|
2
|
+
export { default as ActiveFDCard } from './ActiveFDCard';
|
|
3
|
+
export { default as FDCard } from './FDCard';
|
|
4
|
+
export { default as PendingFDBottomSheet } from './PendingFDBottomSheet';
|
|
5
|
+
export { default as AmountInput } from './AmountInput';
|
|
6
|
+
export { default as DropdownSelector } from './DropdownSelector';
|
|
7
|
+
export { default as InterestRateCard } from './InterestRateCard';
|
|
8
|
+
export { default as CheckboxOption } from './CheckboxOption';
|
|
9
|
+
export { default as TrustBox } from './TrustBox';
|
|
10
|
+
export { default as FAQItem } from './FAQItem';
|
|
11
|
+
export { default as CompanyHeader } from './CompanyHeader';
|
|
12
|
+
export { default as InfoBox } from './InfoBox';
|
|
13
|
+
export { default as AadhaarInput } from './AadhaarInput';
|
|
14
|
+
export { default as OTPInput } from './OTPInput';
|
|
15
|
+
export { default as ValidationMessage } from './ValidationMessage';
|
|
16
|
+
export { default as ActionButton } from './ActionButton';
|
|
17
|
+
export { default as ScreenHeader } from './ScreenHeader';
|
|
18
|
+
export { default as TextFieldWithLabel } from './TextFieldWithLabel';
|
|
19
|
+
export type { TextFieldWithLabelProps, BaseTextFieldProps } from './TextFieldWithLabel';
|
|
20
|
+
export { default as PaymentDetailsCard } from './PaymentDetailsCard';
|
|
21
|
+
export type { PaymentDetailsCardProps } from './PaymentDetailsCard';
|
|
22
|
+
export { default as FormDropdown } from './FormDropdown';
|
|
23
|
+
export type { FormDropdownProps } from './FormDropdown';
|
|
24
|
+
export { default as FormSection } from './FormSection';
|
|
25
|
+
export type { FormSectionProps } from './FormSection';
|
|
26
|
+
export { default as StatusDisplay } from './StatusDisplay';
|
|
27
|
+
export type { StatusDisplayProps } from './StatusDisplay';
|
|
28
|
+
export { default as LoadingIndicator } from './LoadingIndicator';
|
|
29
|
+
export type { LoadingIndicatorProps } from './LoadingIndicator';
|
|
30
|
+
export { default as ErrorDisplay } from './ErrorDisplay';
|
|
31
|
+
export type { ErrorDisplayProps } from './ErrorDisplay';
|
|
32
|
+
export { default as EmptyState } from './EmptyState';
|
|
33
|
+
export type { EmptyStateProps } from './EmptyState';
|
|
34
|
+
export { default as IFSCSearchResultCard } from './IFSCSearchResultCard';
|
|
35
|
+
export type { IFSCSearchResultCardProps } from './IFSCSearchResultCard';
|
|
@@ -0,0 +1,64 @@
|
|
|
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
|
+
exports.IFSCSearchResultCard = exports.EmptyState = exports.ErrorDisplay = exports.LoadingIndicator = exports.StatusDisplay = exports.FormSection = exports.FormDropdown = exports.PaymentDetailsCard = exports.TextFieldWithLabel = exports.ScreenHeader = exports.ActionButton = exports.ValidationMessage = exports.OTPInput = exports.AadhaarInput = exports.InfoBox = exports.CompanyHeader = exports.FAQItem = exports.TrustBox = exports.CheckboxOption = exports.InterestRateCard = exports.DropdownSelector = exports.AmountInput = exports.PendingFDBottomSheet = exports.FDCard = exports.ActiveFDCard = exports.Header = void 0;
|
|
7
|
+
var Header_1 = require("./Header");
|
|
8
|
+
Object.defineProperty(exports, "Header", { enumerable: true, get: function () { return __importDefault(Header_1).default; } });
|
|
9
|
+
var ActiveFDCard_1 = require("./ActiveFDCard");
|
|
10
|
+
Object.defineProperty(exports, "ActiveFDCard", { enumerable: true, get: function () { return __importDefault(ActiveFDCard_1).default; } });
|
|
11
|
+
var FDCard_1 = require("./FDCard");
|
|
12
|
+
Object.defineProperty(exports, "FDCard", { enumerable: true, get: function () { return __importDefault(FDCard_1).default; } });
|
|
13
|
+
var PendingFDBottomSheet_1 = require("./PendingFDBottomSheet");
|
|
14
|
+
Object.defineProperty(exports, "PendingFDBottomSheet", { enumerable: true, get: function () { return __importDefault(PendingFDBottomSheet_1).default; } });
|
|
15
|
+
var AmountInput_1 = require("./AmountInput");
|
|
16
|
+
Object.defineProperty(exports, "AmountInput", { enumerable: true, get: function () { return __importDefault(AmountInput_1).default; } });
|
|
17
|
+
var DropdownSelector_1 = require("./DropdownSelector");
|
|
18
|
+
Object.defineProperty(exports, "DropdownSelector", { enumerable: true, get: function () { return __importDefault(DropdownSelector_1).default; } });
|
|
19
|
+
var InterestRateCard_1 = require("./InterestRateCard");
|
|
20
|
+
Object.defineProperty(exports, "InterestRateCard", { enumerable: true, get: function () { return __importDefault(InterestRateCard_1).default; } });
|
|
21
|
+
var CheckboxOption_1 = require("./CheckboxOption");
|
|
22
|
+
Object.defineProperty(exports, "CheckboxOption", { enumerable: true, get: function () { return __importDefault(CheckboxOption_1).default; } });
|
|
23
|
+
var TrustBox_1 = require("./TrustBox");
|
|
24
|
+
Object.defineProperty(exports, "TrustBox", { enumerable: true, get: function () { return __importDefault(TrustBox_1).default; } });
|
|
25
|
+
var FAQItem_1 = require("./FAQItem");
|
|
26
|
+
Object.defineProperty(exports, "FAQItem", { enumerable: true, get: function () { return __importDefault(FAQItem_1).default; } });
|
|
27
|
+
var CompanyHeader_1 = require("./CompanyHeader");
|
|
28
|
+
Object.defineProperty(exports, "CompanyHeader", { enumerable: true, get: function () { return __importDefault(CompanyHeader_1).default; } });
|
|
29
|
+
var InfoBox_1 = require("./InfoBox");
|
|
30
|
+
Object.defineProperty(exports, "InfoBox", { enumerable: true, get: function () { return __importDefault(InfoBox_1).default; } });
|
|
31
|
+
// New Aadhaar Verification Components
|
|
32
|
+
var AadhaarInput_1 = require("./AadhaarInput");
|
|
33
|
+
Object.defineProperty(exports, "AadhaarInput", { enumerable: true, get: function () { return __importDefault(AadhaarInput_1).default; } });
|
|
34
|
+
var OTPInput_1 = require("./OTPInput");
|
|
35
|
+
Object.defineProperty(exports, "OTPInput", { enumerable: true, get: function () { return __importDefault(OTPInput_1).default; } });
|
|
36
|
+
var ValidationMessage_1 = require("./ValidationMessage");
|
|
37
|
+
Object.defineProperty(exports, "ValidationMessage", { enumerable: true, get: function () { return __importDefault(ValidationMessage_1).default; } });
|
|
38
|
+
var ActionButton_1 = require("./ActionButton");
|
|
39
|
+
Object.defineProperty(exports, "ActionButton", { enumerable: true, get: function () { return __importDefault(ActionButton_1).default; } });
|
|
40
|
+
var ScreenHeader_1 = require("./ScreenHeader");
|
|
41
|
+
Object.defineProperty(exports, "ScreenHeader", { enumerable: true, get: function () { return __importDefault(ScreenHeader_1).default; } });
|
|
42
|
+
// Reusable Form Components
|
|
43
|
+
var TextFieldWithLabel_1 = require("./TextFieldWithLabel");
|
|
44
|
+
Object.defineProperty(exports, "TextFieldWithLabel", { enumerable: true, get: function () { return __importDefault(TextFieldWithLabel_1).default; } });
|
|
45
|
+
// Payment Components
|
|
46
|
+
var PaymentDetailsCard_1 = require("./PaymentDetailsCard");
|
|
47
|
+
Object.defineProperty(exports, "PaymentDetailsCard", { enumerable: true, get: function () { return __importDefault(PaymentDetailsCard_1).default; } });
|
|
48
|
+
// Form Components
|
|
49
|
+
var FormDropdown_1 = require("./FormDropdown");
|
|
50
|
+
Object.defineProperty(exports, "FormDropdown", { enumerable: true, get: function () { return __importDefault(FormDropdown_1).default; } });
|
|
51
|
+
var FormSection_1 = require("./FormSection");
|
|
52
|
+
Object.defineProperty(exports, "FormSection", { enumerable: true, get: function () { return __importDefault(FormSection_1).default; } });
|
|
53
|
+
// Status and Display Components
|
|
54
|
+
var StatusDisplay_1 = require("./StatusDisplay");
|
|
55
|
+
Object.defineProperty(exports, "StatusDisplay", { enumerable: true, get: function () { return __importDefault(StatusDisplay_1).default; } });
|
|
56
|
+
var LoadingIndicator_1 = require("./LoadingIndicator");
|
|
57
|
+
Object.defineProperty(exports, "LoadingIndicator", { enumerable: true, get: function () { return __importDefault(LoadingIndicator_1).default; } });
|
|
58
|
+
var ErrorDisplay_1 = require("./ErrorDisplay");
|
|
59
|
+
Object.defineProperty(exports, "ErrorDisplay", { enumerable: true, get: function () { return __importDefault(ErrorDisplay_1).default; } });
|
|
60
|
+
var EmptyState_1 = require("./EmptyState");
|
|
61
|
+
Object.defineProperty(exports, "EmptyState", { enumerable: true, get: function () { return __importDefault(EmptyState_1).default; } });
|
|
62
|
+
// IFSC Search Components
|
|
63
|
+
var IFSCSearchResultCard_1 = require("./IFSCSearchResultCard");
|
|
64
|
+
Object.defineProperty(exports, "IFSCSearchResultCard", { enumerable: true, get: function () { return __importDefault(IFSCSearchResultCard_1).default; } });
|