@jescon-technologies/react-native-ui-kit 0.0.4 → 0.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 (178) hide show
  1. package/index.d.ts +66 -0
  2. package/index.js +3 -7
  3. package/package.json +3 -2
  4. package/src/Alerts/AAlert.js +4 -4
  5. package/src/Alerts/AAlertIOS.js +3 -3
  6. package/src/{common → Common}/NetworkServiceCall.js +1 -1
  7. package/src/CommonStyle/CommonTheme.js +11 -0
  8. package/src/CommonStyle/ComponentFunctions.js +632 -0
  9. package/src/CommonStyle/PopupStyle.js +146 -0
  10. package/src/CommonStyle/commonStyle.js +93 -0
  11. package/src/CommonStyle/componentStyle.js +545 -0
  12. package/src/CommonStyle/optionListStyles.js +175 -0
  13. package/src/Components/ByProductPage.js +200 -0
  14. package/src/Components/CDropDownListNew.js +153 -0
  15. package/src/Components/CSupplierList.js +88 -0
  16. package/src/Components/CVerificationCard.js +2822 -0
  17. package/src/Components/CustomButton.js +67 -0
  18. package/src/Components/CustomCard.js +127 -0
  19. package/src/Components/CustomTextInput.js +47 -0
  20. package/src/Components/EquipmentPage.js +313 -0
  21. package/src/Components/FilterInput.Copy.js +723 -0
  22. package/src/Components/FilterInput.js +569 -0
  23. package/src/Components/HSubHeading.js +68 -0
  24. package/src/Components/HeaderCard.js +40 -0
  25. package/src/Components/MoreOptionsScreen.js +251 -0
  26. package/src/Components/NonSwipableProductCard.js +226 -0
  27. package/src/Components/NonSwipableSupplierCard.js +348 -0
  28. package/src/Components/ProductCard.js +1336 -0
  29. package/src/Components/QualityProductCard.js +1059 -0
  30. package/src/Components/RateProductCard.js +1452 -0
  31. package/src/Components/RawMaterial.js +261 -0
  32. package/src/Components/SDropDownEdited.js +549 -0
  33. package/src/Components/SDropDownNew.js +529 -0
  34. package/src/Components/SHelpDescription.js +147 -0
  35. package/src/Components/STextInputNew.js +510 -0
  36. package/src/Components/SearchProductCard.js +470 -0
  37. package/src/Components/StageByProduct.js +199 -0
  38. package/src/Components/SupplierCard.js +243 -0
  39. package/src/Components/SupplierInvoiceCard.js +405 -0
  40. package/src/Components/SwipableSupplierCard.js +136 -0
  41. package/src/Components/TagTemplate.js +74 -0
  42. package/src/Components/WrappedComponent.js +25 -0
  43. package/src/Custom/CBooking.js +944 -0
  44. package/src/Custom/CBookingPostpone.js +1822 -0
  45. package/src/Custom/CCalendar.js +560 -0
  46. package/src/Custom/CCard.js +880 -0
  47. package/src/Custom/CDetailCard.js +205 -0
  48. package/src/Custom/CHelpImage.js +52 -0
  49. package/src/Custom/CReport.js +569 -0
  50. package/src/Custom/CScrollView.js +73 -0
  51. package/src/Custom/CSignature.js +112 -0
  52. package/src/Custom/CSliderMenu.js +339 -0
  53. package/src/Custom/CSupplierCard.js +99 -0
  54. package/src/Custom/CTemplateCard.js +438 -0
  55. package/src/Custom/CTokenAllocation.js +1402 -0
  56. package/src/Custom/CTokenListOverlay.js +122 -0
  57. package/src/Custom/CWardStatus.js +444 -0
  58. package/src/Custom/Charts/CBarChart.js +218 -0
  59. package/src/Custom/Charts/CDashBoardList.js +133 -0
  60. package/src/Custom/Charts/CDashBoardTable.js +172 -0
  61. package/src/Custom/Charts/CLineChart.js +193 -0
  62. package/src/Custom/Charts/CPieChart.js +186 -0
  63. package/src/Custom/Loader.js +182 -0
  64. package/src/Custom/OUserView.js +1121 -0
  65. package/src/Custom/PreviewDosage.js +115 -0
  66. package/src/Custom/SearchLoader.js +32 -0
  67. package/src/Custom/TableComponent/CActivityTable.js +707 -0
  68. package/src/Custom/TableComponent/CMoreButtonTable.js +197 -0
  69. package/src/Custom/TableComponent/CTable.js +185 -0
  70. package/src/Custom/TableComponent/CTextBody.js +40 -0
  71. package/src/Custom/TableComponent/CTextHeader.js +17 -0
  72. package/src/Custom/TableComponent/PreviewPrescriptionNew.js +1011 -0
  73. package/src/Custom/TableComponent/SDropdownTable.js +491 -0
  74. package/src/Custom/TableComponent/TagTable.js +1200 -0
  75. package/src/CustomComponents/CAddColumn.js +140 -0
  76. package/src/CustomComponents/CAssessmentDelete.js +307 -0
  77. package/src/CustomComponents/CAwesomeButton.js +83 -0
  78. package/src/CustomComponents/CAwesomeMoreButton.js +54 -0
  79. package/src/CustomComponents/CBackHandler.js +273 -0
  80. package/src/CustomComponents/CCalendar.js +243 -0
  81. package/src/CustomComponents/CCommentOverlay.js +202 -0
  82. package/src/CustomComponents/CComments.js +162 -0
  83. package/src/CustomComponents/CContainerView.js +24 -0
  84. package/src/CustomComponents/CCustomTextInput.js +336 -0
  85. package/src/CustomComponents/CDetailView.js +40 -0
  86. package/src/CustomComponents/CDropDownList.js +153 -0
  87. package/src/CustomComponents/CDropdownSelect.js +555 -0
  88. package/src/CustomComponents/CFooterView.js +42 -0
  89. package/src/CustomComponents/CImagePickerSave.js +316 -0
  90. package/src/CustomComponents/CModalOverlay.js +91 -0
  91. package/src/CustomComponents/CNetworkStatus.js +327 -0
  92. package/src/CustomComponents/CNotesInstructions.js +1000 -0
  93. package/src/CustomComponents/COverlay.js +81 -0
  94. package/src/CustomComponents/CRemarks.js +176 -0
  95. package/src/CustomComponents/CRowAdd.js +143 -0
  96. package/src/CustomComponents/CSummaryDropDown.js +327 -0
  97. package/src/CustomComponents/CText.js +9 -0
  98. package/src/CustomComponents/CVectorIcon.js +34 -0
  99. package/src/CustomComponents/HtmlContentViewer.js +65 -0
  100. package/src/CustomComponents/PdfContentViewer.js +90 -0
  101. package/src/CustomComponents/SDropDownDosage.js +1087 -0
  102. package/src/CustomComponents/SwipableProductCard.js +246 -0
  103. package/src/CustomComponents/SwipableProductImageCard.js +254 -0
  104. package/src/CustomComponents/WorkOrderDetails.js +1216 -0
  105. package/src/CustomComponents/WorkOrderDetailsPage.js +1213 -0
  106. package/src/HOC/ConfirmOverlay.js +2 -2
  107. package/src/HOC/HMoreButton.js +1 -1
  108. package/src/HOC/HNatureHeading.js +1 -1
  109. package/src/HOC/HShadowButton.js +1 -1
  110. package/src/HOC/HShadowCountButton.js +1 -1
  111. package/src/Json/Chart.json +818 -0
  112. package/src/Json/Consultation.json +622 -0
  113. package/src/Json/CreditBill.json +490 -0
  114. package/src/Json/Dropdown.json +216 -0
  115. package/src/Json/DropdownConsultation.json +228 -0
  116. package/src/Json/DynamicReports.json +623 -0
  117. package/src/Json/Footer.json +79 -0
  118. package/src/Media/AudioScreen.js +2 -7
  119. package/src/Media/CCaptureImageWithoutEdit.js +1 -1
  120. package/src/Media/CImageGallery.js +2 -2
  121. package/src/Media/CSingleImage.js +2 -2
  122. package/src/Media/CVideoPlay.js +1 -1
  123. package/src/Media/DocumentScreen.js +2 -7
  124. package/src/Media/DrawingScreen.js +2 -6
  125. package/src/Media/ImageScreen.js +2 -6
  126. package/src/Media/RecordAudio.js +1 -1
  127. package/src/Media/VideoScreen.js +2 -7
  128. package/src/Navigation/PageNavigation.js +224 -0
  129. package/src/Navigation/useFocusEffect.js +2 -0
  130. package/src/Navigation/useFocusEffect.native.js +1 -0
  131. package/src/Navigation/useFocusEffect.web.js +1 -0
  132. package/src/Navigation/useIsFocused.js +1 -0
  133. package/src/Navigation/useIsFocused.native.js +1 -0
  134. package/src/Navigation/useIsFocused.web.js +1 -0
  135. package/src/Navigation/useNavigation.js +2 -0
  136. package/src/Navigation/useNavigation.native.js +1 -0
  137. package/src/Navigation/useNavigation.web.js +1 -0
  138. package/src/Screens/CMedications.js +528 -0
  139. package/src/Screens/CWebViewGallery.js +203 -0
  140. package/src/Screens/ChartScan.js +279 -0
  141. package/src/Screens/ChartScreenNew.js +1579 -0
  142. package/src/Screens/Consultation.js +1500 -0
  143. package/src/Screens/Dashboard.js +778 -0
  144. package/src/Screens/FileExplorer.js +288 -0
  145. package/src/Screens/Footer.js +340 -0
  146. package/src/Screens/ForgotPassword.js +288 -0
  147. package/src/Screens/HeaderBlock.js +353 -0
  148. package/src/Screens/Login.js +328 -0
  149. package/src/Screens/Notification.js +149 -0
  150. package/src/Screens/OcrScreen.js +20 -0
  151. package/src/Screens/PdfPreview.js +507 -0
  152. package/src/Screens/RegistrationDetails.js +467 -0
  153. package/src/Screens/SearchScreen.js +582 -0
  154. package/src/Screens/Splash.js +788 -0
  155. package/src/Screens/SwipeLeftView.js +1867 -0
  156. package/src/StaticComponents/SDatePickerLabel.js +1 -1
  157. package/src/StaticComponents/SDatePickerNew.js +1 -1
  158. package/src/StaticComponents/SDateTimePickerNew.js +2 -2
  159. package/src/StaticComponents/SDropDownGenerate.js +3 -3
  160. package/src/StaticComponents/SDropDownHoc.js +4 -4
  161. package/src/StaticComponents/SDropDownIcon.js +1 -1
  162. package/src/StaticComponents/SMenuBox.js +2 -2
  163. package/src/StaticComponents/SSearch.js +2 -2
  164. package/src/StaticComponents/STextInput.js +1 -1
  165. package/src/StaticComponents/STimePicker.js +1 -1
  166. package/src/StaticComponents/STimingDropDownNew.js +2 -6
  167. package/src/StaticComponents/STimingSwitch.js +1 -1
  168. package/src/layout/CContainerView.js +1 -1
  169. package/src/layout/CDetailView.js +3 -3
  170. package/src/layout/HeaderBlock.js +5 -5
  171. package/src/layout/INVLoginLayout.js +3 -4
  172. package/src/layout/Loader.js +2 -2
  173. package/src/HOC/HAbsolute.js +0 -56
  174. package/src/HOC/HDiscontinue.js +0 -105
  175. package/src/HOC/HOverlay.js +0 -99
  176. package/src/layout/FooterBlock.js +0 -821
  177. /package/src/{common → Common}/ErrorBoundary.tsx +0 -0
  178. /package/src/{common → Common}/Icons.js +0 -0
@@ -0,0 +1,491 @@
1
+ import React, { useState, useEffect, useContext } from 'react';
2
+ import { TouchableOpacity, StyleSheet, View, Dimensions, Text, Image, TextInput, ScrollView, FlatList, Platform } from 'react-native';
3
+ import FontAwesome5 from 'react-native-vector-icons/FontAwesome5';
4
+ import ComponentStyles, { height, normalize } from '../../CommonStyle/componentStyle';
5
+ import Overlay from 'react-native-modal-overlay';
6
+ import popupStyles, {
7
+ getListviewItem,
8
+ getListviewItemText,
9
+ } from '../../CommonStyle/PopupStyle';
10
+ import { APIURL } from '../../Common/apiConstants';
11
+ import SearchLoader from '../../Custom/SearchLoader';
12
+ import AntDesign from 'react-native-vector-icons/AntDesign';
13
+ import SAlphabet from '../../StaticComponents/SAlphabet';
14
+ import Icons from '../../Common/Icons';
15
+ // import COutsidePrescription from "../../Classification/Prescription/COutsidePrescription";
16
+ import { ValueCheck } from '../../CommonStyle/ComponentFunctions';
17
+ import EmrResponseComponentContext from '../../Handlers/emrResponseComponentContext';
18
+ import { Global } from '../../Common/Global';
19
+ import HOCIcons from '../../HOC/HOCIcons';
20
+ import { useNavigation } from '@react-navigation/native';
21
+ var searchResult = [];
22
+ var tempvalue = [];
23
+ var ValueString = null;
24
+ const SDropdownTable = (props) => {
25
+
26
+ const navigation = useNavigation();
27
+ const { responseJSON, setResponseJSON } = useContext(EmrResponseComponentContext);
28
+ const [MedicineData, setMedicineData] = useState();
29
+ const [isdropdownshow, setDropdownShow] = useState(false);
30
+ const [searchData, setSearchData] = useState('');
31
+ const [isLoading, setIsLoading] = useState(true);
32
+ const [alphaFilter, setAlphaFilter] = useState(false);
33
+ const [selectedValue, setSelectedValue] = useState(props.value);
34
+ const [displayData, setDisplayData] = useState([]);
35
+ const [filterPurpose, setFilterPurpose] = useState([]);
36
+ // console.log("display Texttttttttttttttttttttttttt", JSON.stringify(filterPurpose))
37
+ const [stage, setStage] = useState(false);
38
+ const [alphaindex, setAlphaIndex] = useState();
39
+ // const [dropdowndata, setDropDownData] = useState(props.dropdowndata)
40
+ const dropdowndata = props.dropdowndata;
41
+
42
+ function getOverlayScreenContainer() {
43
+ return ({
44
+ // paddingVertical:normalize(5),
45
+ flexDirection: 'row',
46
+ // margin: 10,
47
+ // backgroundColor:'blue',
48
+ marginHorizontal: 10,
49
+ // height: Dimensions.get('window').height * 0.045
50
+ });
51
+ }
52
+
53
+ function FetchDropdownList(key) {
54
+ setSearchData('');
55
+ setIsLoading(true);
56
+ setDropdownShow(true);
57
+ console.log('BUTTTTOOONNNNN APIIIIIIIIIIIIIIIIII', JSON.stringify(APIURL + props.dropdownapi));
58
+ NetworkServiceCall('get', APIURL + props.dropdownapi, '')
59
+ .then(function (response) {
60
+ searchResult = response;
61
+ setDisplayData(response.data.data);
62
+ setIsLoading(false);
63
+ });
64
+ }
65
+
66
+ function FetchList() {
67
+ setSearchData('');
68
+ setIsLoading(true);
69
+ setDropdownShow(true);
70
+ searchResult = { 'httpstatus': 200 };
71
+ setDisplayData(props.dropdownarray);
72
+ setIsLoading(false);
73
+ }
74
+
75
+ function FetchOutsideMeds() {
76
+ setMedicineData(props.medicineData);
77
+ setDropdownShow(true);
78
+ // setIsLoading(false)
79
+ // console.log("ppppppppppppppppppppppppppppp", JSON.stringify(props.medicineData))
80
+ }
81
+
82
+ function selection(item, changevalue, keycode) {
83
+ let dataset = {
84
+ 'content': ValueCheck(item.content) ? item.content : '',
85
+ 'datavalue': item.datavalue,
86
+ 'displayvalue': item.displayvalue,
87
+ 'timingdescription': item.datavalue == 'D' ? 1 : item.datavalue == 'W' ? 2 : item.datavalue == 'M' ? 3 : item.datavalue == 'Y' ? 4 : 1,
88
+ 'key': keycode,
89
+ };
90
+ // console.log("RRRRRRRRRRRRRRRRRRRRR", dataset)
91
+ // setDropDownData(item.displayvalue)
92
+ props.onChangeData(dataset);
93
+ props.refreshCount(1);
94
+ props.singlelinepreview != undefined ? props.singlelinepreview(1) : null;
95
+ props.editStatus(1);
96
+ setDropdownShow(false);
97
+ }
98
+
99
+ function DropdownLayout() {
100
+ return (
101
+ <View style={layoutstyles.overlay_screen_container}>
102
+ <View style={{ alignItems: 'center' }}>
103
+ <Text style={{ fontSize: normalize(13), fontWeight: 'bold', color: Global.AppTheme.primary_color }}>{ValueCheck(props.heading) ? props.heading : ValueCheck(responseJSON) && ValueCheck(responseJSON.consultationEdit) && ValueCheck(responseJSON.consultationEdit.heading) ? responseJSON.consultationEdit.heading : 'SELECT OPTION '}</Text>
104
+ </View>
105
+ <View style={getOverlayScreenContainer()}>
106
+ <View
107
+ style={[ComponentStyles.searchTextbox_View,
108
+ layoutstyles.overlay_searchTextbox_View,
109
+ ]}
110
+ >
111
+ <View style={layoutstyles.textinput_view}>
112
+ <TextInput
113
+ style={[ComponentStyles.searchTextbox]}
114
+ editable={true}
115
+ autoCapitalize={'characters'}
116
+ value={searchData}
117
+ onChangeText={text => setSearchData(text)}
118
+ secureTextEntry={false}
119
+ keyboardType={'default'}
120
+ placeholder="Search"
121
+ />
122
+ </View>
123
+ <Image style={[ComponentStyles.searchIcon]}
124
+ source={{ uri: 'https://i.ibb.co/j8ywYpJ/search.png' }}
125
+ />
126
+ </View>
127
+ </View>
128
+
129
+ <View style={getOverlayScreenChildcontainer()}>
130
+ {GetDropdown(alphaFilter ? filterPurpose : displayData)}
131
+ </View>
132
+ </View>
133
+ );
134
+ }
135
+
136
+ function getOverlayChildrenWrapperStyle() {
137
+ return ({
138
+ position: 'absolute',
139
+ bottom: 0,
140
+ top: Dimensions.get('screen').height * 0.17,
141
+ width: Dimensions.get('screen').width,
142
+ borderRadius: 20,
143
+ borderWidth: 2,
144
+ borderColor: '#e0e0e0',
145
+ paddingHorizontal: normalize(5),
146
+ });
147
+ }
148
+
149
+ function getOverlayScreenChildlistContainer() {
150
+ return {
151
+ width: '90%',
152
+ // height: Dimensions.get('window').height * 0.37,
153
+ marginBottom: Dimensions.get('window').height * 0.01,
154
+ marginTop: Dimensions.get('window').height * 0.01,
155
+ };
156
+ }
157
+
158
+ // const OverlayHOCComponent = COverlay(CLongPressTable);
159
+
160
+ return (
161
+ <View>
162
+ {props.type == undefined ?
163
+ <TouchableOpacity
164
+ onPress={() => props.editable == true ? props.outsidemeds == true ? FetchOutsideMeds() : FetchDropdownList() : FetchList()}
165
+ // onLongPress={() => props.LongPress ? setStage(true) : null}
166
+ disabled={props.multiformat != undefined ? props.multiformat : false}
167
+ style={{
168
+ borderWidth: 1,
169
+ borderColor: props.columntype != undefined ? props.columntype ? '#f99090' : '#9ef79e' : 'lightgrey',
170
+ // elevation: 3,
171
+ paddingLeft: 2,
172
+ width: props.widthArr,
173
+ alignItems: 'center',
174
+ backgroundColor: ValueCheck(props.bgColor) ? props.bgColor : '#fff',
175
+ marginHorizontal: normalize(2),
176
+ height: props.height != undefined ? Dimensions.get('screen').height * props.height : Dimensions.get('screen').height * 0.055,
177
+ flexDirection: 'row',
178
+ borderRadius: 5,
179
+ marginHorizontal: normalize(2),
180
+ marginVertical: props.height != undefined ? 0 : normalize(2),
181
+ }}
182
+ >
183
+
184
+ {props.iconName ?
185
+ <View style={{ width: normalize(22) }}>
186
+ <Icons.FontAwesome5 name={props.iconName} color=
187
+ {props.flagData == 1 ? props.outsidemeds != undefined && props.outsidemeds != null && props.outsidemeds ? 'red' : Global.AppTheme.primary_color : props.outsidemeds != undefined && props.outsidemeds != null && props.outsidemeds ? 'red' : Global.AppTheme.primary_color}
188
+ size={normalize(15)} />
189
+ </View> : null}
190
+
191
+ <View style={{ position: 'absolute', bottom: 0, right: 3, width: normalize(130) }}>
192
+ <Text numberOfLines={1} adjustsFontSizeToFit style={{ fontSize: normalize(9), fontWeight: 'bold', color: 'blue' }} >
193
+ {props.cornerKey != null && props.cornerKey != undefined && typeof props.cornerKey === 'string' ? (props.cornerKey).toUpperCase() : ''}</Text>
194
+ </View>
195
+ <View>
196
+ <Text adjustsFontSizeToFit numberOfLines={2} style={{ fontSize: normalize(11), alignSelf: 'flex-start', fontWeight: 'bold', width: normalize(100) }} >
197
+ {dropdowndata != null && dropdowndata != undefined ? dropdowndata : ''}
198
+ {/* {getDropDownData(dropdowndata)} */}
199
+ </Text>
200
+ </View>
201
+ </TouchableOpacity> : null}
202
+
203
+ {props.type != undefined && props.type == 2 ?
204
+ <TouchableOpacity
205
+ onPress={() => props.editable == true ? props.outsidemeds == true ? FetchOutsideMeds() : FetchDropdownList() : FetchList()}
206
+ // onLongPress={() => props.LongPress ? setStage(true) : null}
207
+ disabled={props.multiformat != undefined ? props.multiformat : false}
208
+ style={{
209
+ flexDirection: 'row', paddingHorizontal: normalize(5), alignItems: 'center',
210
+ }}
211
+ >
212
+ {props.iconName ?
213
+ <View style={{}}>
214
+ <Icons.FontAwesome5 name={props.iconName} color=
215
+ {props.flagData == 1 ? props.outsidemeds != undefined && props.outsidemeds != null && props.outsidemeds ? 'red' : Global.AppTheme.primary_color : props.outsidemeds != undefined && props.outsidemeds != null && props.outsidemeds ? 'red' : Global.AppTheme.primary_color}
216
+ size={normalize(20)}
217
+ style={{ paddingHorizontal: normalize(5), transform: [{ rotate: '45deg' }] }} />
218
+ </View> : null}
219
+
220
+
221
+ <View style={{ paddingLeft: normalize(5) }}>
222
+ <View>
223
+ <Text adjustsFontSizeToFit style={{ fontSize: normalize(14), alignSelf: 'flex-start', fontWeight: 'bold', color: ValueCheck(props.bgColor) ? props.bgColor : Global.AppTheme.primary_color }} >
224
+ {dropdowndata != null && dropdowndata != undefined ? dropdowndata : ''}
225
+ </Text>
226
+ </View>
227
+
228
+ <View style={{}}>
229
+ <Text style={{ fontSize: normalize(9), fontWeight: 'bold', color: 'blue' }} >
230
+ {props.cornerKey != null && props.cornerKey != undefined && typeof props.cornerKey === 'string' ? (props.cornerKey).toUpperCase() : ''}
231
+ </Text>
232
+ </View>
233
+ </View>
234
+ </TouchableOpacity> : null}
235
+
236
+ {props.type != undefined && props.type == 3 ?
237
+ <View style={{ flexDirection: 'column' }}>
238
+ <View style={{ flexDirection: 'row', paddingVertical: normalize(0), alignItems: 'center' }}>
239
+ {/* <Icons.MaterialCommunityIcons name={"clock-time-eight"} color={"black"} size={normalize(15)} /> */}
240
+ <Text style={{
241
+ fontSize: normalize(11),
242
+ // color: 'black',
243
+ // fontStyle: 'italic',
244
+ fontWeight: Platform.OS == 'ios' ? '300' : '325',
245
+ color: Global.AppTheme.primary_color,
246
+ }}> {props.typeText}
247
+ </Text>
248
+ </View>
249
+
250
+ <TouchableOpacity
251
+ onPress={() => props.editable == true ? props.outsidemeds == true ? FetchOutsideMeds() : FetchDropdownList() : FetchList()}
252
+ // onLongPress={() => props.LongPress ? setStage(true) : null}
253
+ disabled={props.multiformat != undefined ? props.multiformat : false}
254
+ style={{
255
+ width: Dimensions.get('screen').width * 0.24, alignItems: 'center',
256
+ backgroundColor: 'white',
257
+ alignSelf: 'center',
258
+ flexDirection: 'row', borderColor: 'lightgrey',
259
+ borderWidth: 1, borderRadius: 5, padding: 5, elevation: 3,
260
+ height: normalize(30), marginHorizontal: normalize(2),
261
+ }}
262
+ >
263
+ <View style={{ position: 'absolute', bottom: 0, right: 3, width: normalize(130) }}>
264
+ <Text numberOfLines={1} style={{ fontSize: normalize(9), fontWeight: 'bold' }} >
265
+ {props.cornerKey != null && props.cornerKey != undefined && typeof props.cornerKey === 'string' ? (props.cornerKey).toUpperCase() : ''}</Text>
266
+ </View>
267
+ <View>
268
+ <Text style={{ fontSize: normalize(12), paddingLeft: 3, fontWeight: 'bold' }} >
269
+ {dropdowndata != null && dropdowndata != undefined ? dropdowndata : ''}
270
+ {/* {getDropDownData(dropdowndata)} */}
271
+ </Text>
272
+ </View>
273
+ </TouchableOpacity>
274
+ </View> : null}
275
+
276
+ {props.patientservicenewoption ?
277
+ <TouchableOpacity
278
+ onPress={() => {
279
+ navigation.navigate('CPatientServiceInvestigation', { data: props.medicineData, medicineindex: props.medicineindex });
280
+ }}
281
+ style={{
282
+ borderWidth: 0,
283
+ borderColor: 'red',
284
+ position: 'absolute',
285
+ right: 0,
286
+ height: '100%',
287
+ justifyContent: 'center',
288
+ alignItems: 'center',
289
+ }}
290
+ >
291
+ <HOCIcons.Icons
292
+ icongroup={2}
293
+ name={'list-alt'}
294
+ color={Global.AppTheme.primary_color}
295
+ size={normalize(25)}
296
+ style={{
297
+ marginHorizontal: normalize(5),
298
+ }}
299
+ />
300
+ </TouchableOpacity>
301
+ : null}
302
+
303
+
304
+ {isdropdownshow ?
305
+ <Overlay visible={true}
306
+ onClose={() => setDropdownShow(false)}
307
+ closeOnTouchOutside
308
+ animationType="fadeInUp"
309
+ containerStyle={{ backgroundColor: 'transparent' }}
310
+ childrenWrapperStyle={getOverlayChildrenWrapperStyle()}
311
+ animationDuration={500}
312
+ >
313
+
314
+ <View style={{ position: 'absolute', right: 14, top: 5, marginTop: normalize(5) }}>
315
+ <TouchableOpacity
316
+ onPress={() => setDropdownShow(false)}
317
+ >
318
+ <Icons.FontAwesome5 name={'angle-double-down'} size={normalize(20)} color={Global.AppTheme.primary_color} />
319
+ </TouchableOpacity>
320
+ </View>
321
+ {!isLoading ?
322
+ searchResult.httpstatus == 200 ?
323
+ DropdownLayout()
324
+ :
325
+ <View>
326
+ <Text style={[ComponentStyles.no_data_found_text]}>No Result Found</Text>
327
+ </View>
328
+ :
329
+ props.outsidemeds == true ?
330
+ <View>
331
+ {/* <Text style={{ alignSelf: 'center' }}>Edit Content</Text> */}
332
+ {/* <COutsidePrescription
333
+ type={2}
334
+ data={MedicineData}
335
+ callBackFromOP={val => (val == undefined ? null : props.callBackFromOP != undefined ? (props.callBackFromOP(val)
336
+ // setDropDownData(val.medicinename)
337
+ ) : null)}
338
+ visibility={val => (val == undefined ? null : setDropdownShow(false))}
339
+ callBack={val => (val == undefined ? null : props.outSideMeds != undefined ? props.outSideMeds(val) : null)}
340
+ /> */}
341
+ </View>
342
+ :
343
+ <View style={{
344
+ flex: 1, width: '100%', justifyContent: 'center',
345
+ backgroundColor: 'transparent', borderRadius: 10,
346
+ }}>
347
+ <SearchLoader />
348
+ </View>
349
+ }
350
+ </Overlay>
351
+ : null}
352
+
353
+ {stage ?
354
+ <OverlayHOCComponent
355
+ visibility={val => (val == undefined ? null : setStage(val))}
356
+ xyz={val => (val == undefined ? null :
357
+ setStage(false)
358
+ // setDropDownData(val.displayvalue)
359
+ )}
360
+ value={props.cornerKey}
361
+ data={props.medicineData}
362
+ // onselect={val => (val == undefined ? null : onSelect(val))}
363
+ // data={searchResult != null && searchResult != undefined && searchResult.length > 0 ? searchResult : null}
364
+ /> : null}
365
+ </View>
366
+ );
367
+
368
+ function GetDropdown(data) {
369
+ const newDropDownData = data != undefined ? data.filter(function (item) {
370
+ const dataItem1 = item.displayvalue ? item.displayvalue.toUpperCase() : ''.toUpperCase();
371
+ const dataItem2 = item.content != undefined ? item.content.toUpperCase() : ''.toUpperCase();
372
+ const dataItem = dataItem1 + dataItem2;
373
+ const textData = searchData.toUpperCase();
374
+ return dataItem.indexOf(textData) > -1;
375
+ }) : null;
376
+ return (
377
+ <View style={layoutstyles.overlay_screen_listview_container}>
378
+ <View style={getOverlayScreenChildlistContainer()}>
379
+ <FlatList
380
+ data={newDropDownData}
381
+ renderItem={renderItem}
382
+ keyboardShouldPersistTaps="handled"
383
+ initialNumToRender={10}
384
+ maxToRenderPerBatch={20}
385
+ keyExtractor={item => item.datavalue}
386
+ />
387
+ </View>
388
+
389
+ <View style={{
390
+ // height: Dimensions.get('window').height * 0.37,
391
+ marginBottom: Dimensions.get('window').height * 0.01,
392
+ }}>
393
+ <FlatList
394
+ data={['#', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']}
395
+ renderItem={renderAlphabet}
396
+ keyboardShouldPersistTaps="handled"
397
+ style={{ paddingBottom: 20 }}
398
+ contentContainerStyle={{ alignItems: 'center' }}
399
+ keyExtractor={item => item}
400
+ />
401
+ </View>
402
+ </View>
403
+ );
404
+ }
405
+
406
+ function renderAlphabet({ index, item }) {
407
+ return (
408
+ <TouchableOpacity style={{
409
+ width: normalize(40), alignItems: 'center', paddingVertical: 2, borderRadius: normalize(40) / 2,
410
+ backgroundColor: index == alphaindex ? 'blue' : 'white',
411
+ }}
412
+ onPress={() => getAlphabetData(item, index)}>
413
+ <Text style={{
414
+ color: index == alphaindex ? 'white' : 'black',
415
+ fontWeight: index == alphaindex ? 'bold' : 'normal',
416
+ }}>{item}</Text>
417
+ </TouchableOpacity>
418
+ );
419
+ }
420
+
421
+ function getAlphabetData(alpha, index) {
422
+ var filter = displayData.filter(value => value.displayvalue != undefined ? (value.displayvalue).charAt(0) == alpha : '');
423
+ setAlphaIndex(index);
424
+ setFilterPurpose(filter);
425
+ index == 0 ? setSearchData('') : setSearchData(alpha);
426
+ index == 0 ? setAlphaFilter(false) : setAlphaFilter(true);
427
+ }
428
+
429
+ function renderItem(data) {
430
+ return (
431
+ <TouchableOpacity
432
+ style={getListviewItem()}
433
+ onPress={() => selection(data.item, data.item.selected, props.keycode)}
434
+ activeOpacity={0.5}
435
+ >
436
+ <View style={{ flexDirection: 'row', alignItems: 'center' }}>
437
+ <Icons.FontAwesome name="dot-circle-o" color={Global.AppTheme.primary_color} size={normalize(12)}
438
+ style={{ paddingRight: normalize(5), paddingLeft: normalize(4) }} />
439
+ <Text style={selectedValue != null && selectedValue != undefined ? selectedValue == item.datavalue ? getListviewItemText(true) : getListviewItemText(false) : (getListviewItemText(false), { color: data.item.color && data.item.color != null && data.item.color != undefined ? data.item.color : 'black', fontSize: normalize(14) })}>
440
+ {data.item.displayvalue}
441
+ </Text>
442
+ </View>
443
+
444
+ {data.item.content != undefined ?
445
+ <Text style={{ fontSize: normalize(11), fontWeight: 'bold', color: 'blue', paddingRight: normalize(5), alignSelf: 'flex-end' }}>{data.item.content}</Text> : null}
446
+ </TouchableOpacity>
447
+ );
448
+ }
449
+
450
+ function getOverlayScreenChildcontainer() {
451
+ return (
452
+ {
453
+ // height: Dimensions.get('window').height * 0.7,
454
+ // backgroundColor:'red',
455
+ flex: 1,
456
+ marginBottom: Dimensions.get('window').height * 0.01,
457
+ // marginTop: Dimensions.get('window').height * 0.01
458
+ }
459
+ );
460
+ }
461
+ };
462
+
463
+ const layoutstyles = StyleSheet.create({
464
+ lefticon_container: {
465
+ marginLeft: '2%',
466
+ },
467
+ textinput_view: {
468
+ flex: 1,
469
+ paddingLeft: '1%',
470
+ },
471
+ overlay_screen_listview_container: {
472
+ flexDirection: 'row',
473
+ justifyContent: 'space-between',
474
+ marginBottom: 5,
475
+ },
476
+ overlay_searchTextbox_View: {
477
+ width: '96%',
478
+
479
+ },
480
+ overlay_screen_heading_text: {
481
+ ...ComponentStyles.popup_heading,
482
+ width: '100%',
483
+ },
484
+ overlay_screen_container: {
485
+ width: '100%',
486
+ flex: 1,
487
+ // backgroundColor:'yellow'
488
+ },
489
+ });
490
+
491
+ export default SDropdownTable;