Merge branch 'rendering_engine' of github.cmd.navi-tech.in:medici/Address-Verification-App into ui-lib-aliasing
This commit is contained in:
14
App.tsx
14
App.tsx
@@ -1,14 +1,8 @@
|
||||
/**
|
||||
* Sample React Native App
|
||||
* https://github.com/facebook/react-native
|
||||
*
|
||||
* Generated with the TypeScript template
|
||||
* https://github.com/react-native-community/react-native-template-typescript
|
||||
*
|
||||
* @format
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import {SafeAreaView, View} from 'react-native';
|
||||
import data from './src/data/templateData.json';
|
||||
import userData from './src/data/userData.json';
|
||||
import RenderingEngine from './src/components/formRenderingEngine';
|
||||
import {Provider} from 'react-redux';
|
||||
import store, {persistor} from './src/store/store';
|
||||
import {PersistGate} from 'redux-persist/integration/react';
|
||||
|
||||
@@ -45,7 +45,7 @@ const ProtectedRouter = () => {
|
||||
<>
|
||||
<Stack.Screen
|
||||
name="Home"
|
||||
component={HomeScreen}
|
||||
component={AllCases}
|
||||
options={{
|
||||
header: () => null,
|
||||
}}
|
||||
|
||||
@@ -1,4 +1,11 @@
|
||||
import {Image, StyleSheet, Text, View} from 'react-native';
|
||||
import {
|
||||
Image,
|
||||
ImageBackground,
|
||||
Pressable,
|
||||
StyleSheet,
|
||||
Text,
|
||||
View,
|
||||
} from 'react-native';
|
||||
import React, {useEffect} from 'react';
|
||||
import {Control, Controller} from 'react-hook-form';
|
||||
import CameraClickPicture from '../../../../RN-UI-LIB/src/components/camera_click_picture/CameraClickPicture';
|
||||
@@ -9,6 +16,8 @@ import {useState} from 'react';
|
||||
import {useSelector} from 'react-redux';
|
||||
import {RootState} from '../../../store/store';
|
||||
import ErrorMessage from './ErrorMessage';
|
||||
import DeleteIcon from '../../../../RN-UI-LIB/src/Icons/DeleteIcon';
|
||||
import {COLORS} from '../../../../RN-UI-LIB/src/styles/colors';
|
||||
|
||||
interface IImageUpload {
|
||||
questionType: string;
|
||||
@@ -44,7 +53,7 @@ const ImageUpload: React.FC<IImageUpload> = props => {
|
||||
}
|
||||
return (
|
||||
<View style={[GenericStyles.mt12]}>
|
||||
<Text>
|
||||
<Text style={GenericStyles.mb12}>
|
||||
{question.text}{' '}
|
||||
{question.type === 'mandatory' && (
|
||||
<Text style={GenericStyles.redText}>*</Text>
|
||||
@@ -69,8 +78,13 @@ const ImageUpload: React.FC<IImageUpload> = props => {
|
||||
/>
|
||||
) : (
|
||||
<View>
|
||||
<Text onPress={() => setImage('')}>delete</Text>
|
||||
<Image style={styles.image} source={{uri: image}} />
|
||||
<ImageBackground style={styles.image} source={{uri: image}}>
|
||||
<Pressable
|
||||
onPress={() => setImage('')}
|
||||
style={styles.deleteButton}>
|
||||
<DeleteIcon />
|
||||
</Pressable>
|
||||
</ImageBackground>
|
||||
</View>
|
||||
)}
|
||||
<ErrorMessage show={error?.[sectionId]?.[questionId]} />
|
||||
@@ -86,6 +100,19 @@ const styles = StyleSheet.create({
|
||||
borderWidth: 1,
|
||||
borderColor: 'red',
|
||||
},
|
||||
deleteButton: {
|
||||
position: 'absolute',
|
||||
right: 8,
|
||||
top: 8,
|
||||
backgroundColor: COLORS.BACKGROUND.PRIMARY,
|
||||
height: 28,
|
||||
width: 28,
|
||||
borderRadius: 14,
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
borderWidth: 1,
|
||||
borderColor: COLORS.BORDER.PRIMARY,
|
||||
},
|
||||
});
|
||||
|
||||
export default ImageUpload;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import ArrowBackSolidIcon from '../../../RN-UI-LIB/src/Icons/ArrowBackSolidIcon';
|
||||
import React, {useState} from 'react';
|
||||
import {useForm} from 'react-hook-form';
|
||||
import {Pressable, ScrollView, StyleSheet, View} from 'react-native';
|
||||
@@ -178,11 +179,14 @@ const Widget = (props: any) => {
|
||||
paddingHorizontal: 16,
|
||||
}}>
|
||||
<View style={[GenericStyles.row]}>
|
||||
<Pressable onPress={()=> navigateToScreen('Home')}>
|
||||
<Pressable onPress={() => navigateToScreen('Home')}>
|
||||
<CloseIcon color="#ffffff" />
|
||||
</Pressable>
|
||||
<View style={{marginLeft: 16}}>
|
||||
<Heading type={'h5'} bold style={[GenericStyles.whiteText]}>
|
||||
<Heading
|
||||
type={'h5'}
|
||||
bold
|
||||
style={[GenericStyles.whiteText]}>
|
||||
Add feedback for Kunal
|
||||
</Heading>
|
||||
<Text light>Communication address</Text>
|
||||
@@ -229,9 +233,15 @@ const Widget = (props: any) => {
|
||||
GenericStyles.p16,
|
||||
styles.borderTop,
|
||||
]}>
|
||||
<Button title="Go Back" onPress={goBack} />
|
||||
<Button
|
||||
title={isLeaf ? 'Submit' : 'next'}
|
||||
variant={'secondary'}
|
||||
style={styles.fb45}
|
||||
title={'Back'}
|
||||
onPress={goBack}
|
||||
/>
|
||||
<Button
|
||||
style={styles.fb45}
|
||||
title={isLeaf ? 'Submit' : 'Next'}
|
||||
onPress={
|
||||
isLeaf
|
||||
? handleSubmit(handleSubmitJourney, onError)
|
||||
@@ -251,6 +261,9 @@ const styles = StyleSheet.create({
|
||||
borderTopColor: COLORS.BORDER.PRIMARY,
|
||||
borderTopWidth: 1,
|
||||
},
|
||||
fb45: {
|
||||
flexBasis: '45%',
|
||||
},
|
||||
});
|
||||
|
||||
export default Widget;
|
||||
|
||||
16
yarn.lock
16
yarn.lock
@@ -1378,7 +1378,7 @@
|
||||
resolved "https://registry.yarnpkg.com/@react-native-community/eslint-plugin/-/eslint-plugin-1.3.0.tgz#9e558170c106bbafaa1ef502bd8e6d4651012bf9"
|
||||
integrity sha512-+zDZ20NUnSWghj7Ku5aFphMzuM9JulqCW+aPXT6IfIXFbb8tzYTTOSeRFOtuekJ99ibW2fUCSsjuKNlwDIbHFg==
|
||||
|
||||
"@react-native-firebase/app@^16.4.6":
|
||||
"@react-native-firebase/app@16.4.6":
|
||||
version "16.4.6"
|
||||
resolved "https://registry.yarnpkg.com/@react-native-firebase/app/-/app-16.4.6.tgz#929a86894b401352259e21d4cb4dab1d37de2bc7"
|
||||
integrity sha512-rL/vhylwzj9ziKAqEOI6G3eIGiJRcI9dcM93+gG7pEv1mNBHKmhnuq9VPS8nR01qyI/PYWoKN6XecE0w7A7n4w==
|
||||
@@ -1387,7 +1387,7 @@
|
||||
opencollective-postinstall "^2.0.1"
|
||||
superstruct "^0.6.2"
|
||||
|
||||
"@react-native-firebase/database@^16.4.6":
|
||||
"@react-native-firebase/database@16.4.6":
|
||||
version "16.4.6"
|
||||
resolved "https://registry.yarnpkg.com/@react-native-firebase/database/-/database-16.4.6.tgz#261a041e79ca5f1cf4bd827def073e634659fd11"
|
||||
integrity sha512-vBKqANcCSOkfPUM7cNRIuoHm/RnHDOFzXnW1cZKqhHD4mU7t+GtJwB4yHtAvt0v2dU5e4Oqm8MitDPfMAJ6mcw==
|
||||
@@ -1429,7 +1429,7 @@
|
||||
resolved "https://registry.yarnpkg.com/@react-navigation/elements/-/elements-1.3.9.tgz#33e26d7ad655b012e024ef0a005a3f66201287f8"
|
||||
integrity sha512-V9aIZN19ufaKWlXT4UcM545tDiEt9DIQS+74pDgbnzoQcDypn0CvSqWopFhPACMdJatgmlZUuOrrMfTeNrBWgA==
|
||||
|
||||
"@react-navigation/native-stack@^6.9.4":
|
||||
"@react-navigation/native-stack@6.9.4":
|
||||
version "6.9.4"
|
||||
resolved "https://registry.yarnpkg.com/@react-navigation/native-stack/-/native-stack-6.9.4.tgz#d9cc26ad97afcee1c0e3fb092ae4c60f848b1572"
|
||||
integrity sha512-R40G2Zfo748hE4+we/TUAEClw53l0QdFDJ0q/9VS1moxgI4zUopdBxN5SmF32OMFfkedMRAT9J+aVbwgmdn7pA==
|
||||
@@ -1437,7 +1437,7 @@
|
||||
"@react-navigation/elements" "^1.3.9"
|
||||
warn-once "^0.1.0"
|
||||
|
||||
"@react-navigation/native@^6.0.16":
|
||||
"@react-navigation/native@6.0.16":
|
||||
version "6.0.16"
|
||||
resolved "https://registry.yarnpkg.com/@react-navigation/native/-/native-6.0.16.tgz#a37df62da9db912c91c53e2cdeadb954865a6a9b"
|
||||
integrity sha512-YVmzypkDppV/vAG+66KTJ2RFtPjhDTLLjgk8TNTCHG3pahq1q13zbnEPjqB42bU4kgL5SG17O4saErt1DJaWQg==
|
||||
@@ -2161,7 +2161,7 @@ axe-core@^4.4.3:
|
||||
resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.5.2.tgz#823fdf491ff717ac3c58a52631d4206930c1d9f7"
|
||||
integrity sha512-u2MVsXfew5HBvjsczCv+xlwdNnB1oQR9HlAcsejZttNjKKSkeDNVwB1vMThIUIFI9GoT57Vtk8iQLwqOfAkboA==
|
||||
|
||||
axios@^1.2.1:
|
||||
axios@1.2.1:
|
||||
version "1.2.1"
|
||||
resolved "https://registry.yarnpkg.com/axios/-/axios-1.2.1.tgz#44cf04a3c9f0c2252ebd85975361c026cb9f864a"
|
||||
integrity sha512-I88cFiGu9ryt/tfVEi4kX2SITsvDddTajXTOFmt2uK1ZVA8LytjtdeyefdQWEf5PU8w+4SSJDoYnggflB5tW4A==
|
||||
@@ -6314,7 +6314,7 @@ react-native-codegen@^0.70.6:
|
||||
jscodeshift "^0.13.1"
|
||||
nullthrows "^1.1.1"
|
||||
|
||||
react-native-device-info@^10.3.0:
|
||||
react-native-device-info@10.3.0:
|
||||
version "10.3.0"
|
||||
resolved "https://registry.yarnpkg.com/react-native-device-info/-/react-native-device-info-10.3.0.tgz#6bab64d84d3415dd00cc446c73ec5e2e61fddbe7"
|
||||
integrity sha512-/ziZN1sA1REbJTv5mQZ4tXggcTvSbct+u5kCaze8BmN//lbxcTvWsU6NQd4IihLt89VkbX+14IGc9sVApSxd/w==
|
||||
@@ -6334,12 +6334,12 @@ react-native-pager-view@6.1.2:
|
||||
resolved "https://registry.yarnpkg.com/react-native-pager-view/-/react-native-pager-view-6.1.2.tgz#3522079b9a9d6634ca5e8d153bc0b4d660254552"
|
||||
integrity sha512-qs2KSFc+7N7B+UZ6SG2sTvCkppagm5fVyRclv1KFKc7lDtrhXLzN59tXJw575LDP/dRJoXsNwqUAhZJdws6ABQ==
|
||||
|
||||
react-native-safe-area-context@^4.4.1:
|
||||
react-native-safe-area-context@4.4.1:
|
||||
version "4.4.1"
|
||||
resolved "https://registry.yarnpkg.com/react-native-safe-area-context/-/react-native-safe-area-context-4.4.1.tgz#239c60b8a9a80eac70a38a822b04c0f1d15ffc01"
|
||||
integrity sha512-N9XTjiuD73ZpVlejHrUWIFZc+6Z14co1K/p1IFMkImU7+avD69F3y+lhkqA2hN/+vljdZrBSiOwXPkuo43nFQA==
|
||||
|
||||
react-native-screens@^3.18.2:
|
||||
react-native-screens@3.18.2:
|
||||
version "3.18.2"
|
||||
resolved "https://registry.yarnpkg.com/react-native-screens/-/react-native-screens-3.18.2.tgz#d7ab2d145258d3db9fa630fa5379dc4474117866"
|
||||
integrity sha512-ANUEuvMUlsYJ1QKukEhzhfrvOUO9BVH9Nzg+6eWxpn3cfD/O83yPBOF8Mx6x5H/2+sMy+VS5x/chWOOo/U7QJw==
|
||||
|
||||
Reference in New Issue
Block a user