@jescon-technologies/react-native-ui-kit 0.0.1 → 0.0.2
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/index.js +70 -0
- package/package.json +26 -3
- package/src/Alerts/AAlert.js +1 -1
- package/src/HOC/ConfirmOverlay.js +192 -0
- package/src/HOC/HAbsolute.js +56 -0
- package/src/HOC/HDiscontinue.js +105 -0
- package/src/HOC/HHeading.js +70 -0
- package/src/HOC/HMoreButton.js +88 -0
- package/src/HOC/HNatureHeading.js +402 -0
- package/src/HOC/HOCIcons.js +80 -0
- package/src/HOC/HOverlay.js +99 -0
- package/src/HOC/HOverlayCentered.js +140 -0
- package/src/HOC/HShadowButton.js +45 -0
- package/src/HOC/HShadowCountButton.js +82 -0
- package/src/HOC/OptionOverlay.js +48 -0
- package/src/Media/AudioScreen.js +347 -0
- package/src/Media/BarcodeScan.js +145 -0
- package/src/Media/CAudioPlay.js +228 -0
- package/src/Media/CCaptureImageWithoutEdit.js +330 -0
- package/src/Media/CImageGallery.js +289 -0
- package/src/Media/CImageZoom.js +82 -0
- package/src/Media/CSingleImage.js +391 -0
- package/src/Media/CSketchCanvas.js +76 -0
- package/src/Media/CVideoPlay.js +31 -0
- package/src/Media/DocumentScreen.js +367 -0
- package/src/Media/DrawingScreen.js +582 -0
- package/src/Media/ImageScreen.js +313 -0
- package/src/Media/RecordAudio.js +250 -0
- package/src/Media/RecordVideo.js +223 -0
- package/src/Media/VideoScreen.js +383 -0
- package/src/StaticComponents/SAlphabet.js +47 -0
- package/src/StaticComponents/SCheckBox.js +42 -0
- package/src/StaticComponents/SDatePicker.js +208 -0
- package/src/StaticComponents/SDatePickerLabel.js +253 -0
- package/src/StaticComponents/SDatePickerNew.js +258 -0
- package/src/StaticComponents/SDateTimePickerNew.js +381 -0
- package/src/StaticComponents/SDropDownGenerate.js +450 -0
- package/src/StaticComponents/SDropDownHoc.js +636 -0
- package/src/StaticComponents/SDropDownIcon.js +500 -0
- package/src/StaticComponents/SMenuBox.js +131 -0
- package/src/StaticComponents/SOverlay.js +177 -0
- package/src/StaticComponents/SOverlayTextInput.js +109 -0
- package/src/StaticComponents/SSearch.js +438 -0
- package/src/StaticComponents/SSearchBar.js +53 -0
- package/src/StaticComponents/SSpeedDial.js +303 -0
- package/src/StaticComponents/STextInput.js +289 -0
- package/src/StaticComponents/STextInputProps.js +36 -0
- package/src/StaticComponents/STimePicker.js +171 -0
- package/src/StaticComponents/STimingDropDownNew.js +1589 -0
- package/src/StaticComponents/STimingSwitch.js +34 -0
- package/src/layout/CContainerView.js +21 -0
- package/src/layout/CDetailView.js +81 -0
- package/src/layout/FooterBlock.js +0 -3
- package/src/layout/HeaderBlock.js +353 -0
- package/src/index.js +0 -15
- package/src/screens/ForgotPassword.js +0 -346
- package/src/screens/Login.js +0 -328
- package/src/screens/Splash.js +0 -788
- /package/src/{components → layout}/Loader.js +0 -0
package/index.js
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
// Alerts
|
|
2
|
+
export { default as AAlert } from './src/Alerts/AAlert';
|
|
3
|
+
export { default as AAlertIOS } from './src/Alerts/AAlertIOS';
|
|
4
|
+
export { default as ABlink } from './src/Alerts/ABlink';
|
|
5
|
+
|
|
6
|
+
// Common
|
|
7
|
+
export { default as ErrorBoundary } from './src/common/ErrorBoundary';
|
|
8
|
+
export { default as Icons } from './src/common/Icons'
|
|
9
|
+
export { default as NetworkServiceCall } from './src/common/NetworkServiceCall';
|
|
10
|
+
|
|
11
|
+
// HOC (Higher Order Components)
|
|
12
|
+
export { default as ConfirmOverlay } from './src/HOC/ConfirmOverlay';
|
|
13
|
+
export { default as HAbsolute } from './src/HOC/HAbsolute';
|
|
14
|
+
export { default as HDiscontinue } from './src/HOC/HDiscontinue';
|
|
15
|
+
export { default as HHeading } from './src/HOC/HHeading';
|
|
16
|
+
export { default as HMoreButton } from './src/HOC/HMoreButton';
|
|
17
|
+
export { default as HNatureHeading } from './src/HOC/HNatureHeading';
|
|
18
|
+
export { default as HOCIcons } from './src/HOC/HOCIcons';
|
|
19
|
+
export { default as HOverlay } from './src/HOC/HOverlay';
|
|
20
|
+
export { default as HOverlayCentered } from './src/HOC/HOverlayCentered';
|
|
21
|
+
export { default as HShadowButton } from './src/HOC/HShadowButton';
|
|
22
|
+
export { default as HShadowCountButton } from './src/HOC/HShadowCountButton';
|
|
23
|
+
export { default as OptionOverlay } from './src/HOC/OptionOverlay';
|
|
24
|
+
|
|
25
|
+
// Layout
|
|
26
|
+
export { default as CContainerView } from './src/layout/CContainerView';
|
|
27
|
+
export { default as CDetailView } from './src/layout/CDetailView';
|
|
28
|
+
export { default as FooterBlock } from './src/layout/FooterBlock';
|
|
29
|
+
export { default as HeaderBlock } from './src/layout/HeaderBlock';
|
|
30
|
+
export { default as INVLoginLayout } from './src/layout/INVLoginLayout';
|
|
31
|
+
export { default as Loader } from './src/layout/Loader';
|
|
32
|
+
|
|
33
|
+
// Media
|
|
34
|
+
export { default as AudioScreen } from './src/Media/AudioScreen';
|
|
35
|
+
export { default as BarcodeScan } from './src/Media/BarcodeScan';
|
|
36
|
+
export { default as CAudioPlay } from './src/Media/CAudioPlay';
|
|
37
|
+
export { default as CCaptureImageWithoutEdit } from './src/Media/CCaptureImageWithoutEdit';
|
|
38
|
+
export { default as CImageGallery } from './src/Media/CImageGallery';
|
|
39
|
+
export { default as CImageZoom } from './src/Media/CImageZoom';
|
|
40
|
+
export { default as CSingleImage } from './src/Media/CSingleImage';
|
|
41
|
+
export { default as CSketchCanvas } from './src/Media/CSketchCanvas';
|
|
42
|
+
export { default as CVideoPlay } from './src/Media/CVideoPlay';
|
|
43
|
+
export { default as DocumentScreen } from './src/Media/DocumentScreen';
|
|
44
|
+
export { default as DrawingScreen } from './src/Media/DrawingScreen';
|
|
45
|
+
export { default as ImageScreen } from './src/Media/ImageScreen';
|
|
46
|
+
export { default as RecordAudio } from './src/Media/RecordAudio';
|
|
47
|
+
export { default as RecordVideo } from './src/Media/RecordVideo';
|
|
48
|
+
export { default as VideoScreen } from './src/Media/VideoScreen';
|
|
49
|
+
|
|
50
|
+
// Static Components
|
|
51
|
+
export { default as SAlphabet } from './src/StaticComponents/SAlphabet';
|
|
52
|
+
export { default as SCheckBox } from './src/StaticComponents/SCheckBox';
|
|
53
|
+
export { default as SDatePicker } from './src/StaticComponents/SDatePicker';
|
|
54
|
+
export { default as SDatePickerLabel } from './src/StaticComponents/SDatePickerLabel';
|
|
55
|
+
export { default as SDatePickerNew } from './src/StaticComponents/SDatePickerNew';
|
|
56
|
+
export { default as SDateTimePickerNew } from './src/StaticComponents/SDateTimePickerNew';
|
|
57
|
+
export { default as SDropDownGenerate } from './src/StaticComponents/SDropDownGenerate';
|
|
58
|
+
export { default as SDropDownHoc } from './src/StaticComponents/SDropDownHoc';
|
|
59
|
+
export { default as SDropDownIcon } from './src/StaticComponents/SDropDownIcon';
|
|
60
|
+
export { default as SMenuBox } from './src/StaticComponents/SMenuBox';
|
|
61
|
+
export { default as SOverlay } from './src/StaticComponents/SOverlay';
|
|
62
|
+
export { default as SOverlayTextInput } from './src/StaticComponents/SOverlayTextInput';
|
|
63
|
+
export { default as SSearch } from './src/StaticComponents/SSearch';
|
|
64
|
+
export { default as SSearchBar } from './src/StaticComponents/SSearchBar';
|
|
65
|
+
export { default as SSpeedDial } from './src/StaticComponents/SSpeedDial';
|
|
66
|
+
export { default as STextInput } from './src/StaticComponents/STextInput';
|
|
67
|
+
export { default as STextInputProps } from './src/StaticComponents/STextInputProps';
|
|
68
|
+
export { default as STimePicker } from './src/StaticComponents/STimePicker';
|
|
69
|
+
export { default as STimingDropDownNew } from './src/StaticComponents/STimingDropDownNew';
|
|
70
|
+
export { default as STimingSwitch } from './src/StaticComponents/STimingSwitch';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jescon-technologies/react-native-ui-kit",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"description": "A React Native module for Jescon Technologies that provides react-native-ui-kit",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -20,6 +20,29 @@
|
|
|
20
20
|
"bugs": {
|
|
21
21
|
"url": "https://github.com/dpraful/react-native-ui-kit/issues"
|
|
22
22
|
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"axios": "^1.4.0",
|
|
25
|
+
"moment": "^2.29.4",
|
|
26
|
+
"react-native-modal-overlay": "^1.2.0",
|
|
27
|
+
"react-native-svg": "^13.9.0",
|
|
28
|
+
"@react-native-community/datetimepicker": "^7.0.0",
|
|
29
|
+
"@react-native-community/slider": "^4.4.0",
|
|
30
|
+
"@shopify/flash-list": "^1.6.0",
|
|
31
|
+
"@terrylinla/react-native-sketch-canvas": "^0.8.0",
|
|
32
|
+
"react-native-audio": "^4.4.0",
|
|
33
|
+
"react-native-blob-util": "^0.17.0",
|
|
34
|
+
"react-native-document-picker": "^9.0.0",
|
|
35
|
+
"react-native-fast-image": "^8.6.0",
|
|
36
|
+
"react-native-photo-editor": "^0.1.0",
|
|
37
|
+
"react-native-sound": "^0.11.0",
|
|
38
|
+
"react-native-stopwatch-timer": "^0.0.5",
|
|
39
|
+
"react-native-vision-camera": "^2.16.0",
|
|
40
|
+
"rn-fetch-blob": "^0.12.0",
|
|
41
|
+
"react-native-video-controls": "^2.8.0",
|
|
42
|
+
"react-native-snap-carousel": "^3.9.0",
|
|
43
|
+
"react-native-image-pan-zoom": "^2.1.12",
|
|
44
|
+
"prop-types": "^15.8.0"
|
|
45
|
+
},
|
|
23
46
|
"peerDependencies": {
|
|
24
47
|
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
|
25
48
|
"react-native": ">=0.60.0",
|
|
@@ -27,8 +50,8 @@
|
|
|
27
50
|
"react-native-geolocation-service": "^5.0.0",
|
|
28
51
|
"react-native-image-resizer": "^1.0.0",
|
|
29
52
|
"@react-navigation/native": "^6.0.0",
|
|
30
|
-
"
|
|
31
|
-
"react-native-
|
|
53
|
+
"react-native-fs": "^2.20.0",
|
|
54
|
+
"react-native-elements": "^3.4.0"
|
|
32
55
|
},
|
|
33
56
|
"devDependencies": {
|
|
34
57
|
"react": "^18.0.0",
|
package/src/Alerts/AAlert.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useState, memo, useEffect } from 'react';
|
|
2
2
|
import { View, Dimensions, Text, TouchableOpacity, StyleSheet, TextInput, Platform, Image } from 'react-native';
|
|
3
3
|
import { Global } from '../Common/Global';
|
|
4
|
-
import Icons from '../
|
|
4
|
+
import Icons from '../common/Icons';
|
|
5
5
|
import { ValueCheck } from '../CommonStyle/ComponentFunctions';
|
|
6
6
|
import { normalize } from '../CommonStyle/componentStyle';
|
|
7
7
|
import CModalOverlay from '../CustomComponents/CModalOverlay';
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
View,
|
|
4
|
+
Dimensions,
|
|
5
|
+
Text,
|
|
6
|
+
TouchableOpacity,
|
|
7
|
+
StyleSheet,
|
|
8
|
+
Platform,
|
|
9
|
+
} from 'react-native';
|
|
10
|
+
import { normalize } from '../CommonStyle/componentStyle';
|
|
11
|
+
import { Global } from '../Common/Global';
|
|
12
|
+
import Svg, { Rect, Defs, LinearGradient, Stop } from 'react-native-svg';
|
|
13
|
+
import HOCIcons from '../HOC/HOCIcons';
|
|
14
|
+
import CModalOverlay from '../CustomComponents/CModalOverlay';
|
|
15
|
+
|
|
16
|
+
export default function ConfirmOverlay(props) {
|
|
17
|
+
const [overlay, setOverlay] = useState(true);
|
|
18
|
+
|
|
19
|
+
function getPopupContainerStyle() {
|
|
20
|
+
return Platform.OS === 'ios'
|
|
21
|
+
? { ...styles.overlayStyle, top: normalize(60) }
|
|
22
|
+
: { ...styles.overlayStyle, bottom: 0 };
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const closeOverlay = () => {
|
|
26
|
+
setOverlay(false);
|
|
27
|
+
props.saveHandler && props.saveHandler(false);
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
<CModalOverlay
|
|
32
|
+
visible={overlay}
|
|
33
|
+
onClose={closeOverlay}
|
|
34
|
+
animationType="fadeInUp"
|
|
35
|
+
animationDuration={500}
|
|
36
|
+
closeOnTouchOutside
|
|
37
|
+
containerStyle={styles.container}
|
|
38
|
+
childrenWrapperStyle={getPopupContainerStyle()}>
|
|
39
|
+
|
|
40
|
+
<View style={styles.wrapper}>
|
|
41
|
+
|
|
42
|
+
{/* ICON + MESSAGE */}
|
|
43
|
+
<View style={styles.content}>
|
|
44
|
+
<HOCIcons.Icons
|
|
45
|
+
icongroup={5}
|
|
46
|
+
name="exclamation-triangle"
|
|
47
|
+
size={normalize(70)}
|
|
48
|
+
color="#7575ed"
|
|
49
|
+
style={styles.icon}
|
|
50
|
+
/>
|
|
51
|
+
|
|
52
|
+
<Text style={styles.message}>
|
|
53
|
+
{props.confirmtext || 'Are you sure ?'}
|
|
54
|
+
</Text>
|
|
55
|
+
</View>
|
|
56
|
+
|
|
57
|
+
{/* BUTTONS */}
|
|
58
|
+
<View style={styles.buttonRow}>
|
|
59
|
+
|
|
60
|
+
{/* YES BUTTON */}
|
|
61
|
+
<TouchableOpacity
|
|
62
|
+
style={styles.confirmButton}
|
|
63
|
+
onPress={() => {
|
|
64
|
+
setOverlay(false);
|
|
65
|
+
props.callback && props.callback(true);
|
|
66
|
+
props.saveHandler && props.saveHandler(false);
|
|
67
|
+
}}>
|
|
68
|
+
|
|
69
|
+
<Svg height="100%" width="100%">
|
|
70
|
+
<Defs>
|
|
71
|
+
<LinearGradient id="grad" x1="0" y1="0" x2="1" y2="0">
|
|
72
|
+
<Stop offset="0" stopColor="#2f3ec1" stopOpacity="1" />
|
|
73
|
+
<Stop
|
|
74
|
+
offset="1"
|
|
75
|
+
stopColor={Global.AppTheme.primary_color}
|
|
76
|
+
stopOpacity="1"
|
|
77
|
+
/>
|
|
78
|
+
</LinearGradient>
|
|
79
|
+
</Defs>
|
|
80
|
+
|
|
81
|
+
<Rect
|
|
82
|
+
x="0"
|
|
83
|
+
y="0"
|
|
84
|
+
width="100%"
|
|
85
|
+
height={normalize(35)}
|
|
86
|
+
fill="url(#grad)"
|
|
87
|
+
rx="5"
|
|
88
|
+
/>
|
|
89
|
+
</Svg>
|
|
90
|
+
|
|
91
|
+
<Text style={styles.confirmButtonText}>YES</Text>
|
|
92
|
+
|
|
93
|
+
</TouchableOpacity>
|
|
94
|
+
|
|
95
|
+
{/* NO BUTTON */}
|
|
96
|
+
<TouchableOpacity
|
|
97
|
+
style={styles.cancelButton}
|
|
98
|
+
onPress={() => {
|
|
99
|
+
setOverlay(false);
|
|
100
|
+
props.cancelcallback && props.cancelcallback(true);
|
|
101
|
+
props.saveHandler && props.saveHandler(false);
|
|
102
|
+
}}>
|
|
103
|
+
|
|
104
|
+
<Text style={styles.cancelButtonText}>NO</Text>
|
|
105
|
+
|
|
106
|
+
</TouchableOpacity>
|
|
107
|
+
|
|
108
|
+
</View>
|
|
109
|
+
|
|
110
|
+
</View>
|
|
111
|
+
|
|
112
|
+
</CModalOverlay>
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
const styles = StyleSheet.create({
|
|
117
|
+
container: {
|
|
118
|
+
width: '100%',
|
|
119
|
+
backgroundColor: 'rgba(97, 97, 97, 0)',
|
|
120
|
+
},
|
|
121
|
+
|
|
122
|
+
overlayStyle: {
|
|
123
|
+
position: 'absolute',
|
|
124
|
+
width: Dimensions.get('window').width,
|
|
125
|
+
height: Dimensions.get('window').height * 0.28,
|
|
126
|
+
borderTopLeftRadius: 15,
|
|
127
|
+
borderTopRightRadius: 15,
|
|
128
|
+
borderWidth: 2,
|
|
129
|
+
borderColor: 'darkblue',
|
|
130
|
+
backgroundColor: '#fff',
|
|
131
|
+
},
|
|
132
|
+
|
|
133
|
+
wrapper: {
|
|
134
|
+
marginTop: normalize(-10),
|
|
135
|
+
width: Dimensions.get('window').width - 10,
|
|
136
|
+
flex: 1,
|
|
137
|
+
borderRadius: normalize(17),
|
|
138
|
+
},
|
|
139
|
+
|
|
140
|
+
content: {
|
|
141
|
+
alignItems: 'center',
|
|
142
|
+
flex: 1,
|
|
143
|
+
},
|
|
144
|
+
|
|
145
|
+
icon: {
|
|
146
|
+
textAlign: 'center',
|
|
147
|
+
marginVertical: normalize(10),
|
|
148
|
+
opacity: 0.6,
|
|
149
|
+
},
|
|
150
|
+
|
|
151
|
+
message: {
|
|
152
|
+
color: 'black',
|
|
153
|
+
fontSize: normalize(14),
|
|
154
|
+
fontWeight: '400',
|
|
155
|
+
textAlign: 'center',
|
|
156
|
+
marginHorizontal: normalize(10),
|
|
157
|
+
},
|
|
158
|
+
|
|
159
|
+
buttonRow: {
|
|
160
|
+
flexDirection: 'row',
|
|
161
|
+
width: '100%',
|
|
162
|
+
justifyContent: 'space-evenly',
|
|
163
|
+
marginBottom: normalize(10),
|
|
164
|
+
},
|
|
165
|
+
|
|
166
|
+
cancelButton: {
|
|
167
|
+
backgroundColor: '#d2d2d2',
|
|
168
|
+
borderRadius: 5,
|
|
169
|
+
width: '45%',
|
|
170
|
+
justifyContent: 'center',
|
|
171
|
+
alignItems: 'center',
|
|
172
|
+
height: normalize(35),
|
|
173
|
+
},
|
|
174
|
+
|
|
175
|
+
cancelButtonText: {
|
|
176
|
+
fontSize: normalize(12),
|
|
177
|
+
color: 'black',
|
|
178
|
+
},
|
|
179
|
+
|
|
180
|
+
confirmButton: {
|
|
181
|
+
width: '45%',
|
|
182
|
+
justifyContent: 'center',
|
|
183
|
+
alignItems: 'center',
|
|
184
|
+
height: normalize(35),
|
|
185
|
+
},
|
|
186
|
+
|
|
187
|
+
confirmButtonText: {
|
|
188
|
+
fontSize: normalize(12),
|
|
189
|
+
color: '#fff',
|
|
190
|
+
position: 'absolute',
|
|
191
|
+
},
|
|
192
|
+
});
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import React, { useContext, useState } from 'react';
|
|
2
|
+
import { View, Text, Dimensions, TouchableOpacity ,ScrollView} from 'react-native';
|
|
3
|
+
import ABlink from '../Alerts/ABlink';
|
|
4
|
+
import { Global } from '../Common/Global';
|
|
5
|
+
import Icons from '../Common/Icons';
|
|
6
|
+
import { ArrayCheck, ValueCheck } from '../CommonStyle/ComponentFunctions';
|
|
7
|
+
import { normalize } from '../CommonStyle/componentStyle';
|
|
8
|
+
import EmrResponseComponentContext from '../Handlers/emrResponseComponentContext';
|
|
9
|
+
|
|
10
|
+
export default function HAbsolute(props) {
|
|
11
|
+
const { responseJSON, setResponseJSON } = useContext(EmrResponseComponentContext);
|
|
12
|
+
const [isShow, setIsShow] = useState(true);
|
|
13
|
+
// console.log("Response consultation edittttttttttt", JSON.stringify(responseJSON))
|
|
14
|
+
return (
|
|
15
|
+
<View style={{ position: 'absolute', backgroundColor: 'transparent', top: Dimensions.get('screen').height * 0.1, zIndex: 1 }}>
|
|
16
|
+
|
|
17
|
+
{ValueCheck(responseJSON) && ValueCheck(responseJSON.consultationEdit) && ArrayCheck(responseJSON.consultationEdit.moreButton) ?
|
|
18
|
+
<TouchableOpacity
|
|
19
|
+
onPress={() => setIsShow(!isShow)}
|
|
20
|
+
style={{ flexDirection: 'row', backgroundColor: '#fff', alignItems: 'center', justifyContent: 'space-evenly' }}>
|
|
21
|
+
{isShow ? <Text adjustsFontSizeToFit numberOfLines={1} style={{ fontSize: normalize(9), fontWeight: 'bold' }}>{'CLOSE'}</Text> : null}
|
|
22
|
+
<ABlink>
|
|
23
|
+
<Icons.FontAwesome name={isShow ? 'close' : 'hand-o-right'} color={Global.AppTheme.primary_color} size={normalize(15)} />
|
|
24
|
+
</ABlink>
|
|
25
|
+
</TouchableOpacity> : null}
|
|
26
|
+
|
|
27
|
+
{isShow && ValueCheck(responseJSON) && ValueCheck(responseJSON.consultationEdit) ?
|
|
28
|
+
<View style={{ maxHeight: Dimensions.get('screen').height * 0.57, backgroundColor: '#fff', flexDirection: 'row-reverse' }}>
|
|
29
|
+
|
|
30
|
+
<View
|
|
31
|
+
style={{ flexDirection: 'column', alignItems: 'center', paddingHorizontal: normalize(3), justifyContent: 'center'}}>
|
|
32
|
+
<Icons.FontAwesome5 name={responseJSON.consultationEdit.iconname} color={Global.AppTheme.primary_color} size={normalize(15)} style={{ paddingRight: normalize(0) }} />
|
|
33
|
+
<Text style={{ width: normalize(10), fontSize: normalize(12), fontWeight: 'bold'}}>{responseJSON.consultationEdit.heading}</Text>
|
|
34
|
+
</View>
|
|
35
|
+
|
|
36
|
+
<ScrollView showsVerticalScrollIndicator={false}>
|
|
37
|
+
{ArrayCheck(responseJSON.consultationEdit.moreButton) ? responseJSON.consultationEdit.moreButton.map((iconsFoot, i) => {
|
|
38
|
+
return (
|
|
39
|
+
<TouchableOpacity key={i}
|
|
40
|
+
onPress={() => props.callBack != undefined ? props.callBack(iconsFoot) : null}
|
|
41
|
+
style={{
|
|
42
|
+
backgroundColor: iconsFoot.color, alignItems: 'center', width: normalize(45), marginLeft: normalize(0),
|
|
43
|
+
padding: normalize(3), paddingVertical: normalize(7), borderRadius: normalize(4), borderWidth: 1, borderColor: 'grey',
|
|
44
|
+
}}>
|
|
45
|
+
<View style={{ alignItems: 'center', justifyContent: 'center' }}>
|
|
46
|
+
<Icons.FontAwesome5 name={iconsFoot.iconname} size={normalize(20)} color={Global.AppTheme.primary_color} style={{}} />
|
|
47
|
+
<Text adjustsFontSizeToFit numberOfLines={1} style={{ fontSize: normalize(10), fontWeight: 'bold' }}>{iconsFoot.name}</Text>
|
|
48
|
+
</View>
|
|
49
|
+
</TouchableOpacity>
|
|
50
|
+
);
|
|
51
|
+
}) : null}
|
|
52
|
+
</ScrollView>
|
|
53
|
+
</View> : null}
|
|
54
|
+
</View>
|
|
55
|
+
);
|
|
56
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { View, Text, Dimensions } from 'react-native';
|
|
2
|
+
import React, { useState, useContext } from 'react';
|
|
3
|
+
import { normalize } from '../CommonStyle/componentStyle';
|
|
4
|
+
import STextInput from '../StaticComponents/STextInput';
|
|
5
|
+
import { Global } from '../Common/Global';
|
|
6
|
+
import { ValueCheck } from '../CommonStyle/ComponentFunctions';
|
|
7
|
+
import EmrResponseComponentContext from '../Handlers/emrResponseComponentContext';
|
|
8
|
+
import SDropDownNew from '../StaticComponents/SDropDownNew';
|
|
9
|
+
import Loader from '../Custom/Loader';
|
|
10
|
+
import Dropdown from '../Json/Dropdown.json';
|
|
11
|
+
|
|
12
|
+
export default function HDiscontinue(props) {
|
|
13
|
+
const { responseJSON, setResponseJSON } = useContext(EmrResponseComponentContext);
|
|
14
|
+
const [data, setData] = useState(props.data);
|
|
15
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
16
|
+
const [refresh, setRefresh] = useState(0);
|
|
17
|
+
// console.log("M JJJJ LLLLLL MMMMM NNNNNNNNNNNNNNN", JSON.stringify(data))
|
|
18
|
+
|
|
19
|
+
return (
|
|
20
|
+
<View style={{ flex: 1, paddingHorizontal: normalize(2), marginTop: normalize(2) }}>
|
|
21
|
+
<View style={{ alignItems: 'center' }}>
|
|
22
|
+
<Text style={{ fontSize: normalize(10), fontWeight: 'bold', color: Global.AppTheme.primary_color }}>
|
|
23
|
+
{ValueCheck(responseJSON) && ValueCheck(responseJSON.consultationEdit) && ValueCheck(responseJSON.consultationEdit.heading) ? responseJSON.consultationEdit.heading + ' STATUS' : 'STATUS'}</Text>
|
|
24
|
+
</View>
|
|
25
|
+
|
|
26
|
+
<View style={{ paddingHorizontal: normalize(8), marginTop: normalize(-5) }}>
|
|
27
|
+
<Text style={{ fontSize: normalize(12), paddingHorizontal: 5 }}>Status</Text>
|
|
28
|
+
<SDropDownNew
|
|
29
|
+
dropdowndata={getDropDownCode(ValueCheck(data.statuscode)
|
|
30
|
+
? data.statuscode
|
|
31
|
+
: 'B')}
|
|
32
|
+
onChangeData={val =>
|
|
33
|
+
val == undefined ? null : getStatusCode(val)}
|
|
34
|
+
editable={false}
|
|
35
|
+
dropdownarray={Dropdown.DDStatusNature}
|
|
36
|
+
widthArr={Dimensions.get('screen').width * 0.8}
|
|
37
|
+
iconName={'info'}
|
|
38
|
+
refreshCount={val =>
|
|
39
|
+
val == undefined ? null : console.log('Refresh')
|
|
40
|
+
}
|
|
41
|
+
/>
|
|
42
|
+
</View>
|
|
43
|
+
|
|
44
|
+
{ValueCheck(props.type) && props.type == 1 && data.statuscode == 'S' ?
|
|
45
|
+
<View style={{ paddingHorizontal: normalize(8), marginTop: normalize(5) }}>
|
|
46
|
+
<Text style={{ fontSize: normalize(12), paddingHorizontal: 5 }}>Substitution</Text>
|
|
47
|
+
<SDropDownNew
|
|
48
|
+
dropdownapi={"emr/emrcommonget/rndddaconsultationaddparameter 20,''"}
|
|
49
|
+
dropdowndata={''}
|
|
50
|
+
onChangeData={val =>
|
|
51
|
+
val == undefined ? null : (data.hosumrcode = val.datavalue,
|
|
52
|
+
data.assignedstatusname = val.displayvalue,
|
|
53
|
+
data.content = val.content)}
|
|
54
|
+
editable={true}
|
|
55
|
+
widthArr={Dimensions.get('screen').width * 0.8}
|
|
56
|
+
iconName={'file'}
|
|
57
|
+
refreshCount={val =>
|
|
58
|
+
val == undefined ? null : console.log('Refresh')
|
|
59
|
+
}
|
|
60
|
+
/>
|
|
61
|
+
</View> : null}
|
|
62
|
+
|
|
63
|
+
<View style={{ paddingHorizontal: normalize(5), marginTop: normalize(-3) }}>
|
|
64
|
+
<STextInput
|
|
65
|
+
data={{
|
|
66
|
+
value: data.statusreason != undefined
|
|
67
|
+
&& data.statusreason != null ? data.statusreason : '',
|
|
68
|
+
itemwidth: Dimensions.get('screen').width * 0.726,
|
|
69
|
+
displaytext: 'Reason',
|
|
70
|
+
validation: 2,
|
|
71
|
+
}}
|
|
72
|
+
callBack={val => (val == undefined ? null : (data.statusreason = val))} />
|
|
73
|
+
</View>
|
|
74
|
+
|
|
75
|
+
{isLoading ?
|
|
76
|
+
<Loader displaytext={true} />
|
|
77
|
+
: null}
|
|
78
|
+
</View>
|
|
79
|
+
);
|
|
80
|
+
|
|
81
|
+
function getStatusCode(val) {
|
|
82
|
+
if (val.datavalue == 'S') {
|
|
83
|
+
data.hosumrcode = 0;
|
|
84
|
+
data.content = '';
|
|
85
|
+
data.statusremarks = data.assignedstatusname + ' SUBSTITUTED.';
|
|
86
|
+
data.assignedstatusname = '';
|
|
87
|
+
}
|
|
88
|
+
data.statuscode = val.datavalue;
|
|
89
|
+
data.status = val.displayvalue;
|
|
90
|
+
setRefresh(refresh + 1);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
function getDropDownCode(details) {
|
|
94
|
+
let dropdownvaluenew;
|
|
95
|
+
Dropdown.DDStatusNature != null
|
|
96
|
+
? Dropdown.DDStatusNature.map(val => {
|
|
97
|
+
if (val.datavalue == details) {
|
|
98
|
+
dropdownvaluenew = val.displayvalue;
|
|
99
|
+
}
|
|
100
|
+
})
|
|
101
|
+
: null;
|
|
102
|
+
return dropdownvaluenew;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import React, { memo } from 'react';
|
|
2
|
+
import { View, TouchableOpacity, Text } from 'react-native';
|
|
3
|
+
import FontAwesome5 from 'react-native-vector-icons/FontAwesome5';
|
|
4
|
+
import { normalize } from '../CommonStyle/componentStyle';
|
|
5
|
+
import CText from '../CustomComponents/CText';
|
|
6
|
+
import HOCIcons from './HOCIcons';
|
|
7
|
+
|
|
8
|
+
function HHeading(props) {
|
|
9
|
+
|
|
10
|
+
const styles = props.styles != undefined ? props.styles : {
|
|
11
|
+
'iconname': 'file',
|
|
12
|
+
'bgcolor': '#f2efef',
|
|
13
|
+
'iconsize': 18,
|
|
14
|
+
'iconcolor': 'black',
|
|
15
|
+
'displaytext': 'Testing',
|
|
16
|
+
'textsize': 15,
|
|
17
|
+
'textcolor': 'darkblue',
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
<TouchableOpacity
|
|
22
|
+
// onPress={() => props?.callBack(true)}
|
|
23
|
+
style={{
|
|
24
|
+
backgroundColor: styles.bgcolor != undefined ? styles.bgcolor : '#f2efef',
|
|
25
|
+
paddingVertical: 3,
|
|
26
|
+
paddingHorizontal: 6,
|
|
27
|
+
marginTop: 3,
|
|
28
|
+
marginBottom: 2,
|
|
29
|
+
display: 'flex',
|
|
30
|
+
flexDirection: 'row',
|
|
31
|
+
alignItems: 'center',
|
|
32
|
+
justifyContent: 'center',
|
|
33
|
+
elevation: 5,
|
|
34
|
+
borderWidth: 0.5,
|
|
35
|
+
borderColor: 'lightgrey',
|
|
36
|
+
width: '99%',
|
|
37
|
+
alignSelf: 'center',
|
|
38
|
+
}}>
|
|
39
|
+
<TouchableOpacity
|
|
40
|
+
onPress={() => props.Expand != undefined ? props.Expand(1) : null}
|
|
41
|
+
disabled={props.Expand != undefined ? false : true}
|
|
42
|
+
style={{ width: normalize(30), alignItems: 'center', marginRight: 5 }}
|
|
43
|
+
>
|
|
44
|
+
<HOCIcons.Icons
|
|
45
|
+
icongroup={styles.icongroup ? styles.icongroup : 5}
|
|
46
|
+
name={styles.iconname}
|
|
47
|
+
color={styles.iconcolor}
|
|
48
|
+
size={normalize(styles.iconsize)}
|
|
49
|
+
/>
|
|
50
|
+
</TouchableOpacity>
|
|
51
|
+
|
|
52
|
+
<Text
|
|
53
|
+
style={{
|
|
54
|
+
textShadowRadius: 2,
|
|
55
|
+
fontSize: normalize(styles.textsize),
|
|
56
|
+
fontWeight: 'bold',
|
|
57
|
+
color: styles.textcolor,
|
|
58
|
+
flex: 1,
|
|
59
|
+
}}>
|
|
60
|
+
{styles.displaytext}
|
|
61
|
+
</Text>
|
|
62
|
+
|
|
63
|
+
<View style={{ flexDirection: 'row', width: normalize(60), justifyContent: 'space-around' }}>
|
|
64
|
+
{props.children}
|
|
65
|
+
</View>
|
|
66
|
+
</TouchableOpacity>
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export default memo(HHeading);
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
import CText from '../CustomComponents/CText';
|
|
4
|
+
import {
|
|
5
|
+
Menu,
|
|
6
|
+
MenuOptions,
|
|
7
|
+
MenuOption,
|
|
8
|
+
MenuTrigger,
|
|
9
|
+
} from 'react-native-popup-menu';
|
|
10
|
+
import { normalize } from '../CommonStyle/componentStyle';
|
|
11
|
+
import Icons from '../Common/Icons';
|
|
12
|
+
import { Global } from '../Common/Global';
|
|
13
|
+
|
|
14
|
+
export default function HMoreButton(props) {
|
|
15
|
+
const styles = props.styles != undefined ? props.styles : {
|
|
16
|
+
'iconname': 'dots-horizontal-circle',
|
|
17
|
+
'iconsize': 25,
|
|
18
|
+
'iconcolor': 'black',
|
|
19
|
+
'displaytext': 'More',
|
|
20
|
+
'textsize': 9,
|
|
21
|
+
'textcolor': Global.AppTheme.primary_color,
|
|
22
|
+
};
|
|
23
|
+
const MoreArray = props.moreButtonArray != undefined ? props.moreButtonArray : [];
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
MoreArray.length > 0 ?
|
|
27
|
+
<Menu>
|
|
28
|
+
<MenuTrigger style={{ width: normalize(45), alignItems: 'center', justifyContent: 'center' }}>
|
|
29
|
+
<Icons.MaterialCommunityIcons
|
|
30
|
+
name={styles.iconname}
|
|
31
|
+
// color={styles.iconcolor}
|
|
32
|
+
color={Global.AppTheme.primary_color}
|
|
33
|
+
size={normalize(styles.iconsize)}
|
|
34
|
+
/>
|
|
35
|
+
|
|
36
|
+
{styles.displaytext != undefined ?
|
|
37
|
+
<CText
|
|
38
|
+
style={{
|
|
39
|
+
color: 'red',
|
|
40
|
+
fontSize: normalize(styles.textsize),
|
|
41
|
+
}}>
|
|
42
|
+
{styles.displaytext}
|
|
43
|
+
</CText> : null}
|
|
44
|
+
</MenuTrigger>
|
|
45
|
+
|
|
46
|
+
{MoreArray.length > 0 ?
|
|
47
|
+
<MenuOptions
|
|
48
|
+
customStyles={{
|
|
49
|
+
optionsContainer: { width: '35%' },
|
|
50
|
+
optionText: {},
|
|
51
|
+
}}>
|
|
52
|
+
<View>
|
|
53
|
+
{MoreArray.map((params, key) => {
|
|
54
|
+
return (
|
|
55
|
+
<MenuOption
|
|
56
|
+
key={key}
|
|
57
|
+
onSelect={() => props.callBack != undefined ? props.callBack(params) : null}
|
|
58
|
+
style={{ flexDirection: 'row', alignItems: 'center' }}>
|
|
59
|
+
<Icons.FontAwesome5
|
|
60
|
+
name={params.iconname}
|
|
61
|
+
color={Global.AppTheme.primary_color}
|
|
62
|
+
size={normalize(20)}
|
|
63
|
+
style={{ width: normalize(25) }}
|
|
64
|
+
/>
|
|
65
|
+
<CText adjustsFontSizeToFit
|
|
66
|
+
style={{
|
|
67
|
+
fontSize: normalize(12),
|
|
68
|
+
fontWeight: '600',
|
|
69
|
+
marginLeft: '2%',
|
|
70
|
+
width: '75%',
|
|
71
|
+
|
|
72
|
+
}}>
|
|
73
|
+
{params.name}
|
|
74
|
+
</CText>
|
|
75
|
+
</MenuOption>
|
|
76
|
+
);
|
|
77
|
+
})}
|
|
78
|
+
</View>
|
|
79
|
+
</MenuOptions> : null}
|
|
80
|
+
</Menu> : null
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
{/* <HMoreButton
|
|
86
|
+
moreButtonArray={[{ "iconname": "eye-dropper", "function": 1, "displaytext": "Lab Results" },
|
|
87
|
+
{ "iconname": "chart-line", "function": 3, "displaytext": "Patient Chart" }]}
|
|
88
|
+
callBack={val => (val == undefined ? null : console.log(val))} /> */}
|