@airxpay/sdk-ui 1.0.5 → 1.0.6

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.
Files changed (40) hide show
  1. package/README.md +186 -216
  2. package/dist/api/merchant.d.ts +11 -0
  3. package/dist/api/{seller.js → merchant.js} +12 -3
  4. package/dist/components/common/FileUploader.d.ts +1 -1
  5. package/dist/components/common/StepIndicator.d.ts +1 -1
  6. package/dist/components/steps/BankDetails.d.ts +3 -3
  7. package/dist/components/steps/BankDetails.js +223 -162
  8. package/dist/components/steps/BasicDetailsForm.d.ts +3 -3
  9. package/dist/components/steps/BasicDetailsForm.js +143 -144
  10. package/dist/components/steps/KYCVerification.d.ts +3 -3
  11. package/dist/components/steps/KYCVerification.js +290 -123
  12. package/dist/components/steps/OnboardingComplete.d.ts +3 -3
  13. package/dist/components/steps/OnboardingComplete.js +112 -36
  14. package/dist/components/ui/MerchantOnboard/MerchantOnboarding.d.ts +4 -0
  15. package/dist/components/ui/{SellerOnboard/SellerOnboarding.js → MerchantOnboard/MerchantOnboarding.js} +121 -56
  16. package/dist/contexts/AirXPayProvider.d.ts +10 -10
  17. package/dist/contexts/AirXPayProvider.js +24 -92
  18. package/dist/hooks/{SellerOnboarding.js → MerchantOnboarding.js} +2 -2
  19. package/dist/hooks/useAirXPayReady.d.ts +6 -0
  20. package/dist/hooks/useAirXPayReady.js +27 -0
  21. package/dist/index.d.ts +7 -4
  22. package/dist/index.js +10 -9
  23. package/dist/sdk/airxpay.d.ts +1 -2
  24. package/dist/sdk/airxpay.js +2 -5
  25. package/dist/types/dev.js +1 -2
  26. package/dist/types/dev.ts +2 -2
  27. package/dist/types/{sellertypes.d.ts → merchantTypes.d.ts} +29 -14
  28. package/dist/types/merchantTypes.js +3 -0
  29. package/dist/types/merchantTypes.ts +94 -0
  30. package/dist/types/type.d.ts +4 -5
  31. package/dist/types/type.js +1 -0
  32. package/dist/types/type.ts +7 -5
  33. package/package.json +1 -1
  34. package/dist/api/seller.d.ts +0 -9
  35. package/dist/components/ui/SellerOnboard/SellerOnboarding.d.ts +0 -4
  36. package/dist/types/sellertypes.js +0 -4
  37. package/dist/types/sellertypes.ts +0 -85
  38. /package/dist/components/ui/{SellerOnboard → MerchantOnboard}/CustomSegmentedButtons.d.ts +0 -0
  39. /package/dist/components/ui/{SellerOnboard → MerchantOnboard}/CustomSegmentedButtons.js +0 -0
  40. /package/dist/hooks/{SellerOnboarding.d.ts → MerchantOnboarding.d.ts} +0 -0
@@ -48,7 +48,7 @@ const BasicDetailsForm = ({ initialData, onNext, errors, setErrors, }) => {
48
48
  const fadeAnim = (0, react_1.useRef)(new react_native_1.Animated.Value(0)).current;
49
49
  const slideAnim = (0, react_1.useRef)(new react_native_1.Animated.Value(50)).current;
50
50
  const scaleAnim = (0, react_1.useRef)(new react_native_1.Animated.Value(0.95)).current;
51
- const [formData, setFormData] = (0, react_1.useState)(Object.assign({ sellerName: '', sellerEmail: '', sellerPhone: '', businessName: '', businessType: 'individual', businessCategory: '', country: 'India', nationality: 'Indian', dob: '' }, initialData));
51
+ const [formData, setFormData] = (0, react_1.useState)(Object.assign({ merchantName: '', merchantEmail: '', merchantPhone: '', businessName: '', businessType: 'individual', businessCategory: '', country: 'India', nationality: 'Indian', dob: '' }, initialData));
52
52
  const [showDatePicker, setShowDatePicker] = (0, react_1.useState)(false);
53
53
  const [touched, setTouched] = (0, react_1.useState)({});
54
54
  const [focusedField, setFocusedField] = (0, react_1.useState)(null);
@@ -76,22 +76,25 @@ const BasicDetailsForm = ({ initialData, onNext, errors, setErrors, }) => {
76
76
  }, []);
77
77
  const validateField = (field, value) => {
78
78
  switch (field) {
79
- case 'sellerName':
79
+ case 'merchantName':
80
80
  if (!(value === null || value === void 0 ? void 0 : value.trim()))
81
- return 'Seller name is required';
81
+ return 'Merchant name is required';
82
82
  if (value.length < 2)
83
83
  return 'Name must be at least 2 characters';
84
84
  if (value.length > 50)
85
85
  return 'Name must be less than 50 characters';
86
+ if (!/^[a-zA-Z\s'-]+$/.test(value))
87
+ return 'Name contains invalid characters';
86
88
  return undefined;
87
- case 'sellerEmail':
89
+ case 'merchantEmail':
88
90
  if (!(value === null || value === void 0 ? void 0 : value.trim()))
89
91
  return 'Email is required';
90
- const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
92
+ // More comprehensive email regex
93
+ const emailRegex = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
91
94
  if (!emailRegex.test(value))
92
95
  return 'Invalid email format';
93
96
  return undefined;
94
- case 'sellerPhone':
97
+ case 'merchantPhone':
95
98
  if (value && !/^\d{10}$/.test(value.replace(/\D/g, ''))) {
96
99
  return 'Phone must be 10 digits';
97
100
  }
@@ -106,6 +109,10 @@ const BasicDetailsForm = ({ initialData, onNext, errors, setErrors, }) => {
106
109
  }
107
110
  };
108
111
  const handleChange = (field, value) => {
112
+ // Format phone number
113
+ if (field === 'merchantPhone') {
114
+ value = value.replace(/\D/g, '');
115
+ }
109
116
  setFormData(prev => (Object.assign(Object.assign({}, prev), { [field]: value })));
110
117
  // Validate on change
111
118
  const error = validateField(field, value);
@@ -145,7 +152,7 @@ const BasicDetailsForm = ({ initialData, onNext, errors, setErrors, }) => {
145
152
  };
146
153
  const validateForm = () => {
147
154
  const newErrors = {};
148
- const requiredFields = ['sellerName', 'sellerEmail'];
155
+ const requiredFields = ['merchantName', 'merchantEmail'];
149
156
  if (formData.businessType === 'company') {
150
157
  requiredFields.push('businessName');
151
158
  }
@@ -179,7 +186,7 @@ const BasicDetailsForm = ({ initialData, onNext, errors, setErrors, }) => {
179
186
  }
180
187
  };
181
188
  const isFormValid = () => {
182
- const requiredFields = ['sellerName', 'sellerEmail'];
189
+ const requiredFields = ['merchantName', 'merchantEmail'];
183
190
  if (formData.businessType === 'company') {
184
191
  requiredFields.push('businessName');
185
192
  }
@@ -190,17 +197,6 @@ const BasicDetailsForm = ({ initialData, onNext, errors, setErrors, }) => {
190
197
  });
191
198
  // Check if there are any errors
192
199
  const hasNoErrors = Object.keys(localErrors).length === 0;
193
- console.log('Form Valid Check:', {
194
- allRequiredFilled,
195
- hasNoErrors,
196
- localErrors,
197
- formData: {
198
- sellerName: formData.sellerName,
199
- sellerEmail: formData.sellerEmail,
200
- businessName: formData.businessName,
201
- businessType: formData.businessType
202
- }
203
- });
204
200
  return allRequiredFilled && hasNoErrors;
205
201
  };
206
202
  const businessCategories = [
@@ -215,7 +211,8 @@ const BasicDetailsForm = ({ initialData, onNext, errors, setErrors, }) => {
215
211
  'Food',
216
212
  'Other',
217
213
  ];
218
- return (<react_native_1.Animated.View style={[
214
+ return (<react_native_1.KeyboardAvoidingView style={{ flex: 1 }} behavior={react_native_1.Platform.OS === 'ios' ? 'padding' : undefined} keyboardVerticalOffset={react_native_1.Platform.OS === 'ios' ? 64 : 0}>
215
+ <react_native_1.Animated.View style={[
219
216
  styles.container,
220
217
  {
221
218
  opacity: fadeAnim,
@@ -225,166 +222,167 @@ const BasicDetailsForm = ({ initialData, onNext, errors, setErrors, }) => {
225
222
  ]
226
223
  }
227
224
  ]}>
228
- <expo_linear_gradient_1.LinearGradient colors={['#FFFFFF', '#F8F9FA']} style={styles.gradient}>
229
- <react_native_1.ScrollView showsVerticalScrollIndicator={false} contentContainerStyle={styles.scrollContent} keyboardShouldPersistTaps="handled">
230
- {/* Header Card */}
231
- <react_native_paper_1.Surface style={styles.headerCard}>
232
- <react_native_1.View style={styles.headerIcon}>
233
- <react_native_paper_1.IconButton icon="account-details" size={28} iconColor="#0066CC"/>
234
- </react_native_1.View>
235
- <react_native_1.View style={styles.headerText}>
236
- <react_native_paper_1.Title style={styles.title}>Basic Information</react_native_paper_1.Title>
237
- <react_native_1.Text style={styles.subtitle}>
238
- Tell us about yourself
239
- </react_native_1.Text>
240
- </react_native_1.View>
241
- </react_native_paper_1.Surface>
242
-
243
- {/* Form Card */}
244
- <react_native_paper_1.Surface style={styles.formCard}>
245
- {/* Compact Progress Steps */}
246
- <react_native_1.View style={styles.progressContainer}>
247
- <react_native_1.View style={styles.progressStep}>
248
- <expo_linear_gradient_1.LinearGradient colors={['#0066CC', '#0099FF']} style={styles.progressDot}/>
249
- <react_native_1.Text style={styles.progressTextActive}>Basic</react_native_1.Text>
225
+ <expo_linear_gradient_1.LinearGradient colors={['#FFFFFF', '#F8F9FA']} style={styles.gradient}>
226
+ <react_native_1.ScrollView showsVerticalScrollIndicator={false} contentContainerStyle={styles.scrollContent} keyboardShouldPersistTaps="handled" keyboardDismissMode="on-drag">
227
+ {/* Header Card */}
228
+ <react_native_paper_1.Surface style={styles.headerCard}>
229
+ <react_native_1.View style={styles.headerIcon}>
230
+ <react_native_paper_1.IconButton icon="account-details" size={28} iconColor="#0066CC"/>
250
231
  </react_native_1.View>
251
- <react_native_1.View style={styles.progressLine}/>
252
- <react_native_1.View style={styles.progressStep}>
253
- <react_native_1.View style={[styles.progressDot, styles.progressDotInactive]}/>
254
- <react_native_1.Text style={styles.progressText}>KYC</react_native_1.Text>
232
+ <react_native_1.View style={styles.headerText}>
233
+ <react_native_paper_1.Title style={styles.title}>Basic Information</react_native_paper_1.Title>
234
+ <react_native_1.Text style={styles.subtitle}>
235
+ Tell us about yourself
236
+ </react_native_1.Text>
255
237
  </react_native_1.View>
256
- <react_native_1.View style={styles.progressLine}/>
257
- <react_native_1.View style={styles.progressStep}>
258
- <react_native_1.View style={[styles.progressDot, styles.progressDotInactive]}/>
259
- <react_native_1.Text style={styles.progressText}>Bank</react_native_1.Text>
238
+ </react_native_paper_1.Surface>
239
+
240
+ {/* Form Card */}
241
+ <react_native_paper_1.Surface style={styles.formCard}>
242
+ {/* Compact Progress Steps */}
243
+ <react_native_1.View style={styles.progressContainer}>
244
+ <react_native_1.View style={styles.progressStep}>
245
+ <expo_linear_gradient_1.LinearGradient colors={['#0066CC', '#0099FF']} style={styles.progressDot}/>
246
+ <react_native_1.Text style={styles.progressTextActive}>Basic</react_native_1.Text>
247
+ </react_native_1.View>
248
+ <react_native_1.View style={styles.progressLine}/>
249
+ <react_native_1.View style={styles.progressStep}>
250
+ <react_native_1.View style={[styles.progressDot, styles.progressDotInactive]}/>
251
+ <react_native_1.Text style={styles.progressText}>KYC</react_native_1.Text>
252
+ </react_native_1.View>
253
+ <react_native_1.View style={styles.progressLine}/>
254
+ <react_native_1.View style={styles.progressStep}>
255
+ <react_native_1.View style={[styles.progressDot, styles.progressDotInactive]}/>
256
+ <react_native_1.Text style={styles.progressText}>Bank</react_native_1.Text>
257
+ </react_native_1.View>
260
258
  </react_native_1.View>
261
- </react_native_1.View>
262
259
 
263
- {/* Seller Name */}
264
- <react_native_1.View style={styles.fieldContainer}>
265
- <react_native_1.Text style={styles.label}>
266
- Full Name <react_native_1.Text style={styles.requiredStar}>*</react_native_1.Text>
267
- </react_native_1.Text>
268
- <react_native_paper_1.TextInput mode="outlined" value={formData.sellerName} onChangeText={(text) => handleChange('sellerName', text)} onBlur={() => handleBlur('sellerName')} onFocus={() => handleFocus('sellerName')} error={!!localErrors.sellerName} style={styles.input} outlineColor="#E5E7EB" activeOutlineColor="#0066CC" left={<react_native_paper_1.TextInput.Icon icon="account" color="#6B7280"/>} placeholder="John Doe" placeholderTextColor="#9CA3AF"/>
269
- {localErrors.sellerName && (<react_native_paper_1.HelperText type="error" style={styles.errorText}>
270
- {localErrors.sellerName}
271
- </react_native_paper_1.HelperText>)}
272
- </react_native_1.View>
260
+ {/* Merchant Name */}
261
+ <react_native_1.View style={styles.fieldContainer}>
262
+ <react_native_1.Text style={styles.label}>
263
+ Full Name <react_native_1.Text style={styles.requiredStar}>*</react_native_1.Text>
264
+ </react_native_1.Text>
265
+ <react_native_paper_1.TextInput mode="outlined" value={formData.merchantName} onChangeText={(text) => handleChange('merchantName', text)} onBlur={() => handleBlur('merchantName')} onFocus={() => handleFocus('merchantName')} error={!!localErrors.merchantName || !!errors.merchantName} style={styles.input} outlineColor="#E5E7EB" activeOutlineColor="#0066CC" left={<react_native_paper_1.TextInput.Icon icon="account" color="#6B7280"/>} placeholder="John Doe" placeholderTextColor="#9CA3AF"/>
266
+ {(localErrors.merchantName || errors.merchantName) && (<react_native_paper_1.HelperText type="error" style={styles.errorText}>
267
+ {localErrors.merchantName || errors.merchantName}
268
+ </react_native_paper_1.HelperText>)}
269
+ </react_native_1.View>
273
270
 
274
- {/* Email */}
275
- <react_native_1.View style={styles.fieldContainer}>
276
- <react_native_1.Text style={styles.label}>
277
- Email <react_native_1.Text style={styles.requiredStar}>*</react_native_1.Text>
278
- </react_native_1.Text>
279
- <react_native_paper_1.TextInput mode="outlined" value={formData.sellerEmail} onChangeText={(text) => handleChange('sellerEmail', text)} onBlur={() => handleBlur('sellerEmail')} onFocus={() => handleFocus('sellerEmail')} keyboardType="email-address" autoCapitalize="none" error={!!localErrors.sellerEmail} style={styles.input} outlineColor="#E5E7EB" activeOutlineColor="#0066CC" left={<react_native_paper_1.TextInput.Icon icon="email" color="#6B7280"/>} placeholder="john@example.com" placeholderTextColor="#9CA3AF"/>
280
- {localErrors.sellerEmail && (<react_native_paper_1.HelperText type="error" style={styles.errorText}>
281
- {localErrors.sellerEmail}
282
- </react_native_paper_1.HelperText>)}
283
- </react_native_1.View>
271
+ {/* Email */}
272
+ <react_native_1.View style={styles.fieldContainer}>
273
+ <react_native_1.Text style={styles.label}>
274
+ Email <react_native_1.Text style={styles.requiredStar}>*</react_native_1.Text>
275
+ </react_native_1.Text>
276
+ <react_native_paper_1.TextInput mode="outlined" value={formData.merchantEmail} onChangeText={(text) => handleChange('merchantEmail', text)} onBlur={() => handleBlur('merchantEmail')} onFocus={() => handleFocus('merchantEmail')} keyboardType="email-address" autoCapitalize="none" error={!!localErrors.merchantEmail || !!errors.merchantEmail} style={styles.input} outlineColor="#E5E7EB" activeOutlineColor="#0066CC" left={<react_native_paper_1.TextInput.Icon icon="email" color="#6B7280"/>} placeholder="john@example.com" placeholderTextColor="#9CA3AF"/>
277
+ {(localErrors.merchantEmail || errors.merchantEmail) && (<react_native_paper_1.HelperText type="error" style={styles.errorText}>
278
+ {localErrors.merchantEmail || errors.merchantEmail}
279
+ </react_native_paper_1.HelperText>)}
280
+ </react_native_1.View>
284
281
 
285
- {/* Phone */}
286
- <react_native_1.View style={styles.fieldContainer}>
287
- <react_native_1.Text style={styles.label}>Phone Number</react_native_1.Text>
288
- <react_native_paper_1.TextInput mode="outlined" value={formData.sellerPhone} onChangeText={(text) => handleChange('sellerPhone', text)} onBlur={() => handleBlur('sellerPhone')} onFocus={() => handleFocus('sellerPhone')} keyboardType="phone-pad" error={!!localErrors.sellerPhone} style={styles.input} outlineColor="#E5E7EB" activeOutlineColor="#0066CC" left={<react_native_paper_1.TextInput.Icon icon="phone" color="#6B7280"/>} placeholder="9876543210" placeholderTextColor="#9CA3AF"/>
289
- {localErrors.sellerPhone && (<react_native_paper_1.HelperText type="error" style={styles.errorText}>
290
- {localErrors.sellerPhone}
291
- </react_native_paper_1.HelperText>)}
292
- </react_native_1.View>
282
+ {/* Phone */}
283
+ <react_native_1.View style={styles.fieldContainer}>
284
+ <react_native_1.Text style={styles.label}>Phone Number</react_native_1.Text>
285
+ <react_native_paper_1.TextInput mode="outlined" value={formData.merchantPhone} onChangeText={(text) => handleChange('merchantPhone', text)} onBlur={() => handleBlur('merchantPhone')} onFocus={() => handleFocus('merchantPhone')} keyboardType="phone-pad" error={!!localErrors.merchantPhone} style={styles.input} outlineColor="#E5E7EB" activeOutlineColor="#0066CC" left={<react_native_paper_1.TextInput.Icon icon="phone" color="#6B7280"/>} placeholder="9876543210" placeholderTextColor="#9CA3AF" maxLength={10}/>
286
+ {localErrors.merchantPhone && (<react_native_paper_1.HelperText type="error" style={styles.errorText}>
287
+ {localErrors.merchantPhone}
288
+ </react_native_paper_1.HelperText>)}
289
+ </react_native_1.View>
293
290
 
294
- {/* Business Type - Compact Design */}
295
- <react_native_1.View style={styles.fieldContainer}>
296
- <react_native_1.Text style={styles.label}>
297
- Business Type <react_native_1.Text style={styles.requiredStar}>*</react_native_1.Text>
298
- </react_native_1.Text>
299
- <react_native_1.View style={styles.businessTypeContainer}>
300
- <react_native_1.TouchableOpacity style={[
291
+ {/* Business Type */}
292
+ <react_native_1.View style={styles.fieldContainer}>
293
+ <react_native_1.Text style={styles.label}>
294
+ Business Type <react_native_1.Text style={styles.requiredStar}>*</react_native_1.Text>
295
+ </react_native_1.Text>
296
+ <react_native_1.View style={styles.businessTypeContainer}>
297
+ <react_native_1.TouchableOpacity style={[
301
298
  styles.businessTypeButton,
302
299
  formData.businessType === 'individual' && styles.businessTypeButtonActive
303
300
  ]} onPress={() => handleChange('businessType', 'individual')}>
304
- <react_native_paper_1.IconButton icon="account" size={20} iconColor={formData.businessType === 'individual' ? '#0066CC' : '#6B7280'}/>
305
- <react_native_1.Text style={[
301
+ <react_native_paper_1.IconButton icon="account" size={20} iconColor={formData.businessType === 'individual' ? '#0066CC' : '#6B7280'}/>
302
+ <react_native_1.Text style={[
306
303
  styles.businessTypeText,
307
304
  formData.businessType === 'individual' && styles.businessTypeTextActive
308
305
  ]}>
309
- Individual
310
- </react_native_1.Text>
311
- </react_native_1.TouchableOpacity>
306
+ Individual
307
+ </react_native_1.Text>
308
+ </react_native_1.TouchableOpacity>
312
309
 
313
- <react_native_1.TouchableOpacity style={[
310
+ <react_native_1.TouchableOpacity style={[
314
311
  styles.businessTypeButton,
315
312
  formData.businessType === 'company' && styles.businessTypeButtonActive
316
313
  ]} onPress={() => handleChange('businessType', 'company')}>
317
- <react_native_paper_1.IconButton icon="office-building" size={20} iconColor={formData.businessType === 'company' ? '#0066CC' : '#6B7280'}/>
318
- <react_native_1.Text style={[
314
+ <react_native_paper_1.IconButton icon="office-building" size={20} iconColor={formData.businessType === 'company' ? '#0066CC' : '#6B7280'}/>
315
+ <react_native_1.Text style={[
319
316
  styles.businessTypeText,
320
317
  formData.businessType === 'company' && styles.businessTypeTextActive
321
318
  ]}>
322
- Company
323
- </react_native_1.Text>
324
- </react_native_1.TouchableOpacity>
319
+ Company
320
+ </react_native_1.Text>
321
+ </react_native_1.TouchableOpacity>
322
+ </react_native_1.View>
325
323
  </react_native_1.View>
326
- </react_native_1.View>
327
324
 
328
- {/* Business Name - Show only for company */}
329
- {formData.businessType === 'company' && (<react_native_1.View style={styles.fieldContainer}>
330
- <react_native_1.Text style={styles.label}>
331
- Business Name <react_native_1.Text style={styles.requiredStar}>*</react_native_1.Text>
332
- </react_native_1.Text>
333
- <react_native_paper_1.TextInput mode="outlined" value={formData.businessName} onChangeText={(text) => handleChange('businessName', text)} onBlur={() => handleBlur('businessName')} onFocus={() => handleFocus('businessName')} error={!!localErrors.businessName} style={styles.input} outlineColor="#E5E7EB" activeOutlineColor="#0066CC" left={<react_native_paper_1.TextInput.Icon icon="store" color="#6B7280"/>} placeholder="Your Company Name" placeholderTextColor="#9CA3AF"/>
334
- {localErrors.businessName && (<react_native_paper_1.HelperText type="error" style={styles.errorText}>
335
- {localErrors.businessName}
336
- </react_native_paper_1.HelperText>)}
337
- </react_native_1.View>)}
325
+ {/* Business Name - Show only for company */}
326
+ {formData.businessType === 'company' && (<react_native_1.View style={styles.fieldContainer}>
327
+ <react_native_1.Text style={styles.label}>
328
+ Business Name <react_native_1.Text style={styles.requiredStar}>*</react_native_1.Text>
329
+ </react_native_1.Text>
330
+ <react_native_paper_1.TextInput mode="outlined" value={formData.businessName} onChangeText={(text) => handleChange('businessName', text)} onBlur={() => handleBlur('businessName')} onFocus={() => handleFocus('businessName')} error={!!localErrors.businessName} style={styles.input} outlineColor="#E5E7EB" activeOutlineColor="#0066CC" left={<react_native_paper_1.TextInput.Icon icon="store" color="#6B7280"/>} placeholder="Your Company Name" placeholderTextColor="#9CA3AF"/>
331
+ {localErrors.businessName && (<react_native_paper_1.HelperText type="error" style={styles.errorText}>
332
+ {localErrors.businessName}
333
+ </react_native_paper_1.HelperText>)}
334
+ </react_native_1.View>)}
338
335
 
339
- {/* Business Category - Simplified */}
340
- <react_native_1.View style={styles.fieldContainer}>
341
- <react_native_1.Text style={styles.label}>Category</react_native_1.Text>
342
- <react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={false} style={styles.categoryScroll}>
343
- <react_native_1.View style={styles.categoryContainer}>
344
- {businessCategories.map((category) => (<react_native_paper_1.Chip key={category} selected={formData.businessCategory === category} onPress={() => handleChange('businessCategory', category)} style={[
336
+ {/* Business Category */}
337
+ <react_native_1.View style={styles.fieldContainer}>
338
+ <react_native_1.Text style={styles.label}>Category</react_native_1.Text>
339
+ <react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={false} style={styles.categoryScroll}>
340
+ <react_native_1.View style={styles.categoryContainer}>
341
+ {businessCategories.map((category) => (<react_native_paper_1.Chip key={category} selected={formData.businessCategory === category} onPress={() => handleChange('businessCategory', category)} style={[
345
342
  styles.categoryChip,
346
343
  formData.businessCategory === category && styles.categoryChipSelected
347
344
  ]} textStyle={formData.businessCategory === category && styles.categoryChipTextSelected} mode="outlined" compact>
348
- {category}
349
- </react_native_paper_1.Chip>))}
350
- </react_native_1.View>
351
- </react_native_1.ScrollView>
352
- </react_native_1.View>
345
+ {category}
346
+ </react_native_paper_1.Chip>))}
347
+ </react_native_1.View>
348
+ </react_native_1.ScrollView>
349
+ </react_native_1.View>
353
350
 
354
- {/* Country */}
355
- <react_native_1.View style={styles.fieldContainer}>
356
- <react_native_1.Text style={styles.label}>Country</react_native_1.Text>
357
- <CountryDropdown_1.default value={formData.country || 'India'} onChange={(country) => {
351
+ {/* Country */}
352
+ <react_native_1.View style={styles.fieldContainer}>
353
+ <react_native_1.Text style={styles.label}>Country</react_native_1.Text>
354
+ <CountryDropdown_1.default value={formData.country || 'India'} onChange={(country) => {
358
355
  handleChange('country', country);
359
356
  handleChange('nationality', country);
360
357
  }} label=""/>
361
- </react_native_1.View>
358
+ </react_native_1.View>
362
359
 
363
- {/* Date of Birth */}
364
- <react_native_1.View style={styles.fieldContainer}>
365
- <react_native_1.Text style={styles.label}>Date of Birth</react_native_1.Text>
366
- <react_native_1.TouchableOpacity onPress={() => setShowDatePicker(true)} activeOpacity={0.7}>
367
- <react_native_1.View pointerEvents="none">
368
- <react_native_paper_1.TextInput mode="outlined" value={formData.dob} style={styles.input} outlineColor="#E5E7EB" activeOutlineColor="#0066CC" left={<react_native_paper_1.TextInput.Icon icon="cake" color="#6B7280"/>} right={<react_native_paper_1.TextInput.Icon icon="calendar" color="#6B7280"/>} placeholder="DD/MM/YYYY" placeholderTextColor="#9CA3AF"/>
369
- </react_native_1.View>
370
- </react_native_1.TouchableOpacity>
371
- </react_native_1.View>
360
+ {/* Date of Birth */}
361
+ <react_native_1.View style={styles.fieldContainer}>
362
+ <react_native_1.Text style={styles.label}>Date of Birth</react_native_1.Text>
363
+ <react_native_1.TouchableOpacity onPress={() => setShowDatePicker(true)} activeOpacity={0.7}>
364
+ <react_native_1.View pointerEvents="none">
365
+ <react_native_paper_1.TextInput mode="outlined" value={formData.dob} style={styles.input} outlineColor="#E5E7EB" activeOutlineColor="#0066CC" left={<react_native_paper_1.TextInput.Icon icon="cake" color="#6B7280"/>} right={<react_native_paper_1.TextInput.Icon icon="calendar" color="#6B7280"/>} placeholder="DD/MM/YYYY" placeholderTextColor="#9CA3AF"/>
366
+ </react_native_1.View>
367
+ </react_native_1.TouchableOpacity>
368
+ </react_native_1.View>
372
369
 
373
- {/* Submit Button */}
374
- <react_native_1.Animated.View style={{ transform: [{ scale: scaleAnim }] }}>
375
- <react_native_paper_1.Button mode="contained" onPress={handleSubmit} disabled={!isFormValid()} style={[
370
+ {/* Submit Button */}
371
+ <react_native_1.Animated.View style={{ transform: [{ scale: scaleAnim }] }}>
372
+ <react_native_paper_1.Button mode="contained" onPress={handleSubmit} disabled={!isFormValid()} style={[
376
373
  styles.button,
377
374
  !isFormValid() && styles.buttonDisabled
378
375
  ]} labelStyle={styles.buttonLabel} contentStyle={styles.buttonContent}>
379
- Continue
380
- </react_native_paper_1.Button>
381
- </react_native_1.Animated.View>
376
+ Continue
377
+ </react_native_paper_1.Button>
378
+ </react_native_1.Animated.View>
382
379
 
383
- {showDatePicker && (<datetimepicker_1.default value={formData.dob ? new Date(formData.dob) : new Date()} mode="date" display={react_native_1.Platform.OS === 'ios' ? 'spinner' : 'default'} onChange={handleDateChange} maximumDate={new Date()}/>)}
384
- </react_native_paper_1.Surface>
385
- </react_native_1.ScrollView>
386
- </expo_linear_gradient_1.LinearGradient>
387
- </react_native_1.Animated.View>);
380
+ {showDatePicker && (<datetimepicker_1.default value={formData.dob ? new Date(formData.dob) : new Date()} mode="date" display={react_native_1.Platform.OS === 'ios' ? 'spinner' : 'default'} onChange={handleDateChange} maximumDate={new Date()}/>)}
381
+ </react_native_paper_1.Surface>
382
+ </react_native_1.ScrollView>
383
+ </expo_linear_gradient_1.LinearGradient>
384
+ </react_native_1.Animated.View>
385
+ </react_native_1.KeyboardAvoidingView>);
388
386
  };
389
387
  const styles = react_native_1.StyleSheet.create({
390
388
  container: {
@@ -396,6 +394,7 @@ const styles = react_native_1.StyleSheet.create({
396
394
  },
397
395
  scrollContent: {
398
396
  padding: 12,
397
+ paddingBottom: 24,
399
398
  },
400
399
  headerCard: {
401
400
  flexDirection: 'row',
@@ -1,10 +1,10 @@
1
1
  import React from 'react';
2
- import { Seller, Mode, KYCStatus } from '../../types/sellertypes';
2
+ import { Merchant, Mode, KYCStatus } from '../../types/merchantTypes';
3
3
  interface KYCVerificationProps {
4
- initialData: Partial<Seller>;
4
+ initialData: Partial<Merchant>;
5
5
  mode: Mode;
6
6
  kycStatus: KYCStatus;
7
- onNext: (data: Partial<Seller>) => void;
7
+ onNext: (data: Partial<Merchant>) => void;
8
8
  onBack: () => void;
9
9
  }
10
10
  declare const KYCVerification: React.FC<KYCVerificationProps>;