@jescon-technologies/react-native-ui-kit 0.0.6 → 0.0.7

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 (205) hide show
  1. package/dist/Common/ErrorBoundary.d.ts +15 -0
  2. package/dist/Common/ErrorBoundary.d.ts.map +1 -0
  3. package/dist/Common/ErrorBoundary.js +64 -0
  4. package/dist/Common/ErrorBoundary.js.map +1 -0
  5. package/dist/index.d.ts +3 -0
  6. package/dist/index.d.ts.map +1 -0
  7. package/dist/index.js +8 -0
  8. package/dist/index.js.map +1 -0
  9. package/dist/src/Common/ErrorBoundary.d.ts +15 -0
  10. package/dist/src/Common/ErrorBoundary.d.ts.map +1 -0
  11. package/dist/src/Common/ErrorBoundary.js +64 -0
  12. package/dist/src/Common/ErrorBoundary.js.map +1 -0
  13. package/package.json +17 -5
  14. package/.gitattributes +0 -2
  15. package/index.d.ts +0 -66
  16. package/index.js +0 -66
  17. package/src/Alerts/AAlert.js +0 -137
  18. package/src/Alerts/AAlertIOS.js +0 -97
  19. package/src/Alerts/ABlink.js +0 -40
  20. package/src/Common/ErrorBoundary.tsx +0 -73
  21. package/src/Common/Icons.js +0 -49
  22. package/src/Common/NetworkServiceCall.js +0 -265
  23. package/src/CommonStyle/CommonTheme.js +0 -11
  24. package/src/CommonStyle/ComponentFunctions.js +0 -632
  25. package/src/CommonStyle/PopupStyle.js +0 -146
  26. package/src/CommonStyle/commonStyle.js +0 -93
  27. package/src/CommonStyle/componentStyle.js +0 -545
  28. package/src/CommonStyle/optionListStyles.js +0 -175
  29. package/src/Components/ByProductPage.js +0 -200
  30. package/src/Components/CDropDownListNew.js +0 -153
  31. package/src/Components/CSupplierList.js +0 -88
  32. package/src/Components/CVerificationCard.js +0 -2822
  33. package/src/Components/CustomButton.js +0 -67
  34. package/src/Components/CustomCard.js +0 -127
  35. package/src/Components/CustomTextInput.js +0 -47
  36. package/src/Components/EquipmentPage.js +0 -313
  37. package/src/Components/FilterInput.Copy.js +0 -723
  38. package/src/Components/FilterInput.js +0 -569
  39. package/src/Components/HSubHeading.js +0 -68
  40. package/src/Components/HeaderCard.js +0 -40
  41. package/src/Components/MoreOptionsScreen.js +0 -251
  42. package/src/Components/NonSwipableProductCard.js +0 -226
  43. package/src/Components/NonSwipableSupplierCard.js +0 -348
  44. package/src/Components/ProductCard.js +0 -1336
  45. package/src/Components/QualityProductCard.js +0 -1059
  46. package/src/Components/RateProductCard.js +0 -1452
  47. package/src/Components/RawMaterial.js +0 -261
  48. package/src/Components/SDropDownEdited.js +0 -549
  49. package/src/Components/SDropDownNew.js +0 -529
  50. package/src/Components/SHelpDescription.js +0 -147
  51. package/src/Components/STextInputNew.js +0 -510
  52. package/src/Components/SearchProductCard.js +0 -470
  53. package/src/Components/StageByProduct.js +0 -199
  54. package/src/Components/SupplierCard.js +0 -243
  55. package/src/Components/SupplierInvoiceCard.js +0 -405
  56. package/src/Components/SwipableSupplierCard.js +0 -136
  57. package/src/Components/TagTemplate.js +0 -74
  58. package/src/Components/WrappedComponent.js +0 -25
  59. package/src/Custom/CBooking.js +0 -944
  60. package/src/Custom/CBookingPostpone.js +0 -1822
  61. package/src/Custom/CCalendar.js +0 -560
  62. package/src/Custom/CCard.js +0 -880
  63. package/src/Custom/CDetailCard.js +0 -205
  64. package/src/Custom/CHelpImage.js +0 -52
  65. package/src/Custom/CReport.js +0 -569
  66. package/src/Custom/CScrollView.js +0 -73
  67. package/src/Custom/CSignature.js +0 -112
  68. package/src/Custom/CSliderMenu.js +0 -339
  69. package/src/Custom/CSupplierCard.js +0 -99
  70. package/src/Custom/CTemplateCard.js +0 -438
  71. package/src/Custom/CTokenAllocation.js +0 -1402
  72. package/src/Custom/CTokenListOverlay.js +0 -122
  73. package/src/Custom/CWardStatus.js +0 -444
  74. package/src/Custom/Charts/CBarChart.js +0 -218
  75. package/src/Custom/Charts/CDashBoardList.js +0 -133
  76. package/src/Custom/Charts/CDashBoardTable.js +0 -172
  77. package/src/Custom/Charts/CLineChart.js +0 -193
  78. package/src/Custom/Charts/CPieChart.js +0 -186
  79. package/src/Custom/Loader.js +0 -182
  80. package/src/Custom/OUserView.js +0 -1121
  81. package/src/Custom/PreviewDosage.js +0 -115
  82. package/src/Custom/SearchLoader.js +0 -32
  83. package/src/Custom/TableComponent/CActivityTable.js +0 -707
  84. package/src/Custom/TableComponent/CMoreButtonTable.js +0 -197
  85. package/src/Custom/TableComponent/CTable.js +0 -185
  86. package/src/Custom/TableComponent/CTextBody.js +0 -40
  87. package/src/Custom/TableComponent/CTextHeader.js +0 -17
  88. package/src/Custom/TableComponent/PreviewPrescriptionNew.js +0 -1011
  89. package/src/Custom/TableComponent/SDropdownTable.js +0 -491
  90. package/src/Custom/TableComponent/TagTable.js +0 -1200
  91. package/src/CustomComponents/CAddColumn.js +0 -140
  92. package/src/CustomComponents/CAssessmentDelete.js +0 -307
  93. package/src/CustomComponents/CAwesomeButton.js +0 -83
  94. package/src/CustomComponents/CAwesomeMoreButton.js +0 -54
  95. package/src/CustomComponents/CBackHandler.js +0 -273
  96. package/src/CustomComponents/CCalendar.js +0 -243
  97. package/src/CustomComponents/CCommentOverlay.js +0 -202
  98. package/src/CustomComponents/CComments.js +0 -162
  99. package/src/CustomComponents/CContainerView.js +0 -24
  100. package/src/CustomComponents/CCustomTextInput.js +0 -336
  101. package/src/CustomComponents/CDetailView.js +0 -40
  102. package/src/CustomComponents/CDropDownList.js +0 -153
  103. package/src/CustomComponents/CDropdownSelect.js +0 -555
  104. package/src/CustomComponents/CFooterView.js +0 -42
  105. package/src/CustomComponents/CImagePickerSave.js +0 -316
  106. package/src/CustomComponents/CModalOverlay.js +0 -91
  107. package/src/CustomComponents/CNetworkStatus.js +0 -327
  108. package/src/CustomComponents/CNotesInstructions.js +0 -1000
  109. package/src/CustomComponents/COverlay.js +0 -81
  110. package/src/CustomComponents/CRemarks.js +0 -176
  111. package/src/CustomComponents/CRowAdd.js +0 -143
  112. package/src/CustomComponents/CSummaryDropDown.js +0 -327
  113. package/src/CustomComponents/CText.js +0 -9
  114. package/src/CustomComponents/CVectorIcon.js +0 -34
  115. package/src/CustomComponents/HtmlContentViewer.js +0 -65
  116. package/src/CustomComponents/PdfContentViewer.js +0 -90
  117. package/src/CustomComponents/SDropDownDosage.js +0 -1087
  118. package/src/CustomComponents/SwipableProductCard.js +0 -246
  119. package/src/CustomComponents/SwipableProductImageCard.js +0 -254
  120. package/src/CustomComponents/WorkOrderDetails.js +0 -1216
  121. package/src/CustomComponents/WorkOrderDetailsPage.js +0 -1213
  122. package/src/HOC/ConfirmOverlay.js +0 -192
  123. package/src/HOC/HHeading.js +0 -70
  124. package/src/HOC/HMoreButton.js +0 -88
  125. package/src/HOC/HNatureHeading.js +0 -402
  126. package/src/HOC/HOCIcons.js +0 -80
  127. package/src/HOC/HOverlayCentered.js +0 -140
  128. package/src/HOC/HShadowButton.js +0 -45
  129. package/src/HOC/HShadowCountButton.js +0 -82
  130. package/src/HOC/OptionOverlay.js +0 -48
  131. package/src/Json/Chart.json +0 -818
  132. package/src/Json/Consultation.json +0 -622
  133. package/src/Json/CreditBill.json +0 -490
  134. package/src/Json/Dropdown.json +0 -216
  135. package/src/Json/DropdownConsultation.json +0 -228
  136. package/src/Json/DynamicReports.json +0 -623
  137. package/src/Json/Footer.json +0 -79
  138. package/src/Media/AudioScreen.js +0 -342
  139. package/src/Media/BarcodeScan.js +0 -145
  140. package/src/Media/CAudioPlay.js +0 -228
  141. package/src/Media/CCaptureImageWithoutEdit.js +0 -330
  142. package/src/Media/CImageGallery.js +0 -289
  143. package/src/Media/CImageZoom.js +0 -82
  144. package/src/Media/CSingleImage.js +0 -391
  145. package/src/Media/CSketchCanvas.js +0 -76
  146. package/src/Media/CVideoPlay.js +0 -31
  147. package/src/Media/DocumentScreen.js +0 -362
  148. package/src/Media/DrawingScreen.js +0 -578
  149. package/src/Media/ImageScreen.js +0 -309
  150. package/src/Media/RecordAudio.js +0 -250
  151. package/src/Media/RecordVideo.js +0 -223
  152. package/src/Media/VideoScreen.js +0 -378
  153. package/src/Navigation/PageNavigation.js +0 -224
  154. package/src/Navigation/useFocusEffect.js +0 -2
  155. package/src/Navigation/useFocusEffect.native.js +0 -1
  156. package/src/Navigation/useFocusEffect.web.js +0 -1
  157. package/src/Navigation/useIsFocused.js +0 -1
  158. package/src/Navigation/useIsFocused.native.js +0 -1
  159. package/src/Navigation/useIsFocused.web.js +0 -1
  160. package/src/Navigation/useNavigation.js +0 -2
  161. package/src/Navigation/useNavigation.native.js +0 -1
  162. package/src/Navigation/useNavigation.web.js +0 -1
  163. package/src/Screens/CMedications.js +0 -528
  164. package/src/Screens/CWebViewGallery.js +0 -203
  165. package/src/Screens/ChartScan.js +0 -279
  166. package/src/Screens/ChartScreenNew.js +0 -1579
  167. package/src/Screens/Consultation.js +0 -1500
  168. package/src/Screens/Dashboard.js +0 -778
  169. package/src/Screens/FileExplorer.js +0 -288
  170. package/src/Screens/Footer.js +0 -340
  171. package/src/Screens/ForgotPassword.js +0 -288
  172. package/src/Screens/HeaderBlock.js +0 -353
  173. package/src/Screens/Login.js +0 -328
  174. package/src/Screens/Notification.js +0 -149
  175. package/src/Screens/OcrScreen.js +0 -20
  176. package/src/Screens/PdfPreview.js +0 -507
  177. package/src/Screens/RegistrationDetails.js +0 -467
  178. package/src/Screens/SearchScreen.js +0 -582
  179. package/src/Screens/Splash.js +0 -788
  180. package/src/Screens/SwipeLeftView.js +0 -1867
  181. package/src/StaticComponents/SAlphabet.js +0 -47
  182. package/src/StaticComponents/SCheckBox.js +0 -42
  183. package/src/StaticComponents/SDatePicker.js +0 -208
  184. package/src/StaticComponents/SDatePickerLabel.js +0 -253
  185. package/src/StaticComponents/SDatePickerNew.js +0 -258
  186. package/src/StaticComponents/SDateTimePickerNew.js +0 -381
  187. package/src/StaticComponents/SDropDownGenerate.js +0 -450
  188. package/src/StaticComponents/SDropDownHoc.js +0 -636
  189. package/src/StaticComponents/SDropDownIcon.js +0 -500
  190. package/src/StaticComponents/SMenuBox.js +0 -131
  191. package/src/StaticComponents/SOverlay.js +0 -177
  192. package/src/StaticComponents/SOverlayTextInput.js +0 -109
  193. package/src/StaticComponents/SSearch.js +0 -438
  194. package/src/StaticComponents/SSearchBar.js +0 -53
  195. package/src/StaticComponents/SSpeedDial.js +0 -303
  196. package/src/StaticComponents/STextInput.js +0 -289
  197. package/src/StaticComponents/STextInputProps.js +0 -36
  198. package/src/StaticComponents/STimePicker.js +0 -171
  199. package/src/StaticComponents/STimingDropDownNew.js +0 -1585
  200. package/src/StaticComponents/STimingSwitch.js +0 -34
  201. package/src/layout/CContainerView.js +0 -21
  202. package/src/layout/CDetailView.js +0 -81
  203. package/src/layout/HeaderBlock.js +0 -353
  204. package/src/layout/INVLoginLayout.js +0 -657
  205. package/src/layout/Loader.js +0 -176
@@ -1,529 +0,0 @@
1
- //dddddddddddddddddddddddddddddddddddddddddddddddd
2
- import React, { useState, useEffect, useRef } from 'react';
3
- import { TouchableOpacity, StyleSheet, View, Dimensions, Text, Image, TextInput, FlatList, ScrollView } from 'react-native';
4
- import FontAwesome5 from 'react-native-vector-icons/FontAwesome5';
5
- import ComponentStyles, { normalize } from '../CommonStyle/componentStyle';
6
- import {
7
- getListviewItem,
8
- getListviewItemText,
9
- } from '../CommonStyle/PopupStyle';
10
- import { APIURL } from '../../../../../src/Common/apiConstants';
11
- import AntDesign from 'react-native-vector-icons/AntDesign';
12
- import Icons, { MaterialCommunityIcons } from '../Common/Icons';
13
- import { NetworkServiceCall } from '@jescon-technologies/react-native-ui-kit';
14
- import SearchLoader from '../Custom/SearchLoader';
15
- import { isBNU, isBNUL, isNU, isNUL } from '../CommonStyle/ComponentFunctions';
16
- import { Global } from '../../../../../src/Common/Global';
17
- import { Menu, MenuOptions, MenuTrigger } from 'react-native-popup-menu';
18
- import HOCIcons from '../HOC/HOCIcons';
19
- import SHelpDescription from './SHelpDescription';
20
- import CModalOverlay from '../CustomComponents/CModalOverlay';
21
-
22
- var searchResult = [];
23
- var tempvalue = [];
24
- var ValueString = null;
25
- const SDropDownNew = (props) => {
26
- const [isdropdownshow, setDropdownShow] = useState(false);
27
- const [searchData, setSearchData] = useState('');
28
- const [isLoading, setIsLoading] = useState(true);
29
- const [selectedValue, setSelectedValue] = useState(props.value);
30
- const [displayData, setDisplayData] = useState([]);
31
- const [stage, setStage] = useState(false);
32
- const [refresh, setRefresh] = useState(0);
33
- const [filterPurpose, setFilterPurpose] = useState([]);
34
- const [alphaFilter, setAlphaFilter] = useState(false);
35
- const [dropdowndata, setDropDownData] = useState(props.dropdowndata);
36
- const dynamicMenuRef = useRef(null);
37
- const [data, setData] = useState(props.data ? props.data : null);
38
-
39
- useEffect(() => {
40
- setDropDownData(props.dropdowndata);
41
- }, [props.dropdowndata]);
42
-
43
- useEffect(() => {
44
- setData(props.data ? props.data : null);
45
- }, [props.data]);
46
-
47
- useEffect(() => {
48
- isBNU(props.overlay) && props.overlay == true ? FetchDropdownList() : null;
49
- }, [props.overlay]);
50
-
51
- function getOverlayScreenContainer() {
52
- return ({
53
- flexDirection: 'row',
54
- margin: 10,
55
- });
56
- }
57
-
58
- useEffect(() => {
59
- setAlphaFilter(false);
60
- });
61
-
62
- function FetchDropdownList(key) {
63
- const updatedApiUrl = props.dropdownPort ? '' : APIURL;
64
- setSearchData('');
65
- setIsLoading(true);
66
- setDropdownShow(true);
67
- // console.log("SDROPDOWNLINK___________________", "get", APIURL + props.dropdownapi, "")
68
- NetworkServiceCall('get', updatedApiUrl + props.dropdownapi, '')
69
- .then(function (response) {
70
- console.log('updatedUrl', updatedApiUrl + props.dropdownapi);
71
- // console.log('Responseeeeeeeeeeeeeeeeeeeeeeeeee', JSON.stringify(response.data.data))
72
- // console.log("SDROPDOWN_________________DATA___________", response)
73
- searchResult = response;
74
- if (response.data.data != null && response.data.data != undefined) {
75
-
76
- // console.log('arrayyyyyyyyyyyyyyy', JSON.stringify(props.multidropdownarray))
77
- if (props.iconOnly && props.multiselect) {
78
- if (isBNUL(props.multidropdownarray) && isBNUL(response.data.data)) {
79
-
80
- var results = response.data.data.map((item) => {
81
- // Find the matching `xxx` object from `props.multidropdownarray`
82
- const matchingXxx = props.multidropdownarray.find((xxx) => item.datavalue === xxx.datavalue);
83
-
84
- // If a match is found, update `item` with all properties from `matchingXxx`
85
- if (matchingXxx) {
86
- return { ...item, ...matchingXxx }; // Merge properties of `item` and `matchingXxx`
87
- }
88
-
89
- // If no match is found, return the original `item`
90
- return item;
91
- });
92
-
93
- }
94
- else {
95
- var results = response.data.data;
96
- }
97
-
98
-
99
-
100
- console.log('response.data.data #################', JSON.stringify(results));
101
- setDisplayData(results);
102
- setIsLoading(false);
103
-
104
-
105
-
106
- }
107
- else {
108
- if (props.selectedval != undefined && props.selectedval != null && props.selectedval.length > 0) {
109
-
110
-
111
- var results = response.data.data.map((item) => {
112
-
113
-
114
-
115
- props.selectedval.map((xxx) => {
116
- if (item.datavalue == xxx) {
117
- item.selected = true;
118
- }
119
- });
120
- });
121
- }
122
-
123
- console.log('response.data.data #################', JSON.stringify(results));
124
- setDisplayData(response.data.data);
125
- setIsLoading(false);
126
-
127
-
128
- }
129
-
130
-
131
-
132
-
133
-
134
- }
135
- else {
136
- searchResult = [];
137
- setDisplayData([]);
138
- setIsLoading(false);
139
- }
140
- });
141
- }
142
-
143
- function FetchList() {
144
- setSearchData('');
145
- setIsLoading(true);
146
- setDropdownShow(true);
147
- searchResult = { 'httpstatus': 200 };
148
- setDisplayData(props.dropdownarray);
149
- setIsLoading(false);
150
- }
151
-
152
- function selection(item, changevalue, keycode) {
153
- console.log('DROP DOWN DETAILCODE-----------------------', item);
154
- let dataset = {
155
- ...item,
156
- // "datavalue": item.datavalue,
157
- // "displayvalue": item.displayvalue,
158
- // "detailcode": item.detailcode,
159
- // "color": item.color,
160
- // "searchparam": item.searchparam,
161
- // "jasperfilename":item.jasperfilename,
162
- // "reporttype":item.reporttype,
163
- // "key": keycode,
164
- // "item": item
165
- };
166
- setDropDownData(item.displayvalue);
167
- props.onChangeData(dataset);
168
- props.refreshCount(1);
169
- // props.editStatus(1)
170
- setDropdownShow(false);
171
- if (props.setOverlay) {
172
- props.setOverlay(false);
173
- }
174
- }
175
-
176
- function DropdownLayout() {
177
- return (
178
- <View style={layoutstyles.overlay_screen_container}>
179
- <View style={{ alignItems: 'center' }}>
180
- <Text style={{ fontSize: normalize(12), fontWeight: 'bold', color: 'darkblue' }}>{isNU(data) && data.displaytext != undefined ? data.displaytext.toUpperCase() : ' SELECT OPTION '}</Text>
181
- </View>
182
- <View style={getOverlayScreenChildcontainer()}>
183
- {GetDropdown(alphaFilter ? filterPurpose : displayData)}
184
- </View>
185
-
186
- {props.multiselect != undefined && props.multiselect
187
- ?
188
- <View style={{ justifyContent: 'center', alignItems: 'center', flexDirection: 'row', gap: normalize(5) }}>
189
- <TouchableOpacity style={{ justifyContent: 'center', borderRadius: 10, alignItems: 'center', paddingHorizontal: normalize(0) }}
190
- onPress={() => getMultiSelect(false)}
191
- >
192
- <View style={{
193
- flexDirection: 'column',
194
- backgroundColor: '#f7f4f4', borderRadius: 10,
195
- paddingHorizontal: normalize(15),
196
- paddingVertical: normalize(5),
197
- alignItems: 'center',
198
- }}>
199
- <AntDesign name="select1"
200
- color={'#094485'} size={normalize(20)} />
201
-
202
- <Text
203
- style={{
204
- fontSize: normalize(11),
205
- color: '#094485',
206
- fontWeight: 'bold',
207
- }}>
208
- {' '}
209
- Select
210
- </Text>
211
- </View>
212
- </TouchableOpacity>
213
- <TouchableOpacity style={{ justifyContent: 'center', borderRadius: 10, alignItems: 'center', paddingHorizontal: normalize(0) }}
214
- onPress={() => getMultiSelect(true)}
215
- >
216
- <View style={{
217
- flexDirection: 'column',
218
- backgroundColor: '#f7f4f4', borderRadius: 10,
219
- paddingHorizontal: normalize(15),
220
- paddingVertical: normalize(5),
221
- alignItems: 'center',
222
- }}>
223
- <AntDesign name="sync"
224
- color={'#094485'} size={normalize(20)} />
225
-
226
- <Text
227
- style={{
228
- fontSize: normalize(11),
229
- color: '#094485',
230
- fontWeight: 'bold',
231
- }}>
232
- {' '}
233
- Reset
234
- </Text>
235
- </View>
236
- </TouchableOpacity>
237
- </View> : null}
238
- </View>
239
- );
240
- }
241
-
242
- function getMultiSelect(reset) {
243
- let filterArray;
244
- let display;
245
- // console.log('DISPLAYDATA @@@@@@@@@@@@@@@@', displayData)
246
- if (reset == false) {
247
- filterArray = displayData.filter((element) => element.selected == true);
248
- display = filterArray != undefined &&
249
- filterArray.length > 0 ? filterArray.map((item) => item.displayvalue) : null;
250
- setDropDownData(display?.join());
251
- } else {
252
- filterArray = [];
253
- }
254
-
255
- props.onChangeData(filterArray);
256
- setDropdownShow(false);
257
- if (props.setOverlay) {
258
- props.setOverlay(false);
259
- }
260
- }
261
-
262
- function getOverlayChildrenWrapperStyle() {
263
- return ({
264
- position: 'absolute',
265
- bottom: 0,
266
- top: Dimensions.get('screen').height * 0.17,
267
- width: Dimensions.get('screen').width,
268
- borderRadius: 20,
269
- borderWidth: 2,
270
- borderColor: '#e0e0e0',
271
- paddingHorizontal: normalize(5),
272
- });
273
- }
274
-
275
- return (
276
- <View style={{ width: props.widthArr ? props.widthArr : '100%', borderWidth: 0 ,marginVertical: normalize(5)}}>
277
- {isNU(data) && data.displaytext != undefined && props.iconOnly == undefined ?
278
- <Text style={{ fontSize: normalize(11), color: 'black', paddingHorizontal: normalize(5), height: normalize(15) }}>
279
- {data.required == true ?
280
- <Text style={{ color: 'red', fontSize: normalize(13), fontWeight: 'bold' }}>* </Text> : null}
281
- {data.displaytext}
282
- </Text> : null}
283
- {/* <Text>DDDDDDDDDDDDDD</Text> */}
284
-
285
- <TouchableOpacity
286
- onPress={() => (Global.HelpId = props.columnid, props.editable ? FetchDropdownList() : FetchList())}
287
- disabled={props.disabled ? props.disabled : false}
288
- // onLongPress={() => props.LongPress ? setStage(true) : null}
289
- style={{
290
- borderWidth: props.borderWidth ? 0 : 1, borderColor: 'lightgrey'
291
- , paddingLeft: 2, alignItems: 'center', paddingRight: 15, elevation: 0,
292
- backgroundColor: props.backgroundColor != undefined ? props.backgroundColor : '#fff',
293
- height: props.heightArr ? props.heightArr : Dimensions.get('screen').height * 0.040,
294
- flexDirection: 'row', borderRadius: props.borderRadiusArr ? props.borderRadiusArr : 5,
295
- borderColor: props.borderArr ? props.borderArr : 'lightgrey',
296
- }}
297
-
298
- >
299
-
300
-
301
- {props.iconOnly == undefined && props.iconName != undefined || props.icon != undefined ?
302
-
303
- <Menu ref={dynamicMenuRef}>
304
- <MenuTrigger
305
- disabled={false}
306
- customStyles={{ triggerWrapper: { borderWidth: 0, borderRadius: 10, elevation: 0 } }}
307
- >
308
- <TouchableOpacity disabled={true} style={{ width: normalize(22), paddingLeft: normalize(3) }}>
309
- {props.iconName != undefined ? <FontAwesome5 name={props.iconName} color=
310
- {props.flagData == 1 ? 'darkblue' : '#094485'}
311
- size={props.iconSize != undefined ? normalize(props.iconSize) : normalize(15)} /> : null}
312
- {props.icon != undefined ?
313
- <MaterialCommunityIcons name={props.icon} color=
314
- {props.flagData == 1 ? 'darkblue' : '#094485'}
315
- size={normalize(20)} /> : null}
316
-
317
- </TouchableOpacity>
318
- </MenuTrigger>
319
- <MenuOptions optionsContainerStyle={{ marginTop: normalize(25), marginLeft: 0, width: props.widthArr }}>
320
- {props.columnid != undefined ? <SHelpDescription column={props.columnid != undefined ? props.columnid : 0} /> : null}
321
- </MenuOptions>
322
- </Menu>
323
- : null}
324
- {props.iconOnly != true ?
325
- <View style={{ position: 'absolute', bottom: 0, right: 3 }}>
326
- <Text adjustsFontSizeToFit numberOfLines={3}
327
- style={{ fontSize: props.fontSize ? props.fontSize : normalize(11), alignSelf: 'flex-start', fontWeight: 'bold', width: parseFloat(props.widthArr) - normalize(10) + '%' }} >
328
- {props.cornerKey != null && props.cornerKey != undefined && typeof props.cornerKey === 'string' ? props.cornerKey : ''}</Text>
329
- </View>
330
- : null}
331
- {props.iconOnly != true ?
332
- <View style={{ alignItems: 'center', paddingRight: normalize(5.2), width: props.iconclose ? '88%' : '100%' }}>
333
- <Text adjustsFontSizeToFit numberOfLines={3} style={{ fontSize: props.fontSize ? props.fontSize : normalize(11), alignSelf: 'flex-start', fontWeight: 'bold', marginHorizontal: normalize(4), color: props.fontcolor ? props.fontcolor : 'black', width: '95%', borderWidth: 0 }} >
334
- {dropdowndata != null && dropdowndata != undefined ? dropdowndata : props.value}
335
- {/* {getDropDownData(dropdowndata)} */}
336
- </Text>
337
- </View>
338
- : null}
339
- {isBNU(dropdowndata) && props.iconclose ?
340
- <TouchableOpacity
341
- disabled={props.disabled != null && props.disabled != undefined && props.disabled == true ? true : false}
342
- onPress={() => {
343
- setDropDownData(''),
344
- props.iconclosecallback(true);
345
- }}
346
- >
347
- <HOCIcons.Icons
348
- icongroup={3}
349
- name={'close-circle'}
350
- size={normalize(25)}
351
- color={'darkblue'}
352
- style={{ color: 'darkblue' }}
353
- />
354
- </TouchableOpacity>
355
- : null}
356
- {props.iconName != undefined && props.iconOnly == true ?
357
- <FontAwesome5 name={props.iconName} color=
358
- {props.flagData == 1 ? 'darkblue' : '#094485'}
359
- size={props.iconsize} /> : null}
360
- {props.icon != undefined && props.iconOnly == true ?
361
- <MaterialCommunityIcons name={props.icon} color=
362
- {props.flagData == 1 ? 'darkblue' : '#094485'}
363
- size={props.iconsize} /> : null}
364
-
365
- {isdropdownshow ?
366
- <CModalOverlay visible={true}
367
- onClose={() => {
368
- setDropdownShow(false);
369
- if (props.setOverlay) {
370
- props.setOverlay(false);
371
- }
372
- }}
373
- closeOnTouchOutside
374
- animationType="zoomIn"
375
- containerStyle={{ backgroundColor: 'transparent' }}
376
- childrenWrapperStyle={getOverlayChildrenWrapperStyle()}
377
- animationDuration={500}
378
- >
379
-
380
- <TouchableOpacity style={{ position: 'absolute', right: 0, zIndex: 1, marginTop: normalize(5) }}
381
- onPress={() => {
382
- setDropdownShow(false);
383
- if (props.setOverlay) {
384
- props.setOverlay(false);
385
- }
386
- }}
387
- >
388
- <FontAwesome5 name={'angle-double-down'}
389
- color={'#094485'} size={normalize(20)} />
390
- </TouchableOpacity>
391
-
392
- <View style={getOverlayScreenContainer()}>
393
- <View style={[ComponentStyles.searchTextbox_View, layoutstyles.overlay_searchTextbox_View]}>
394
- <View style={layoutstyles.textinput_view}>
395
- <TextInput
396
- style={[ComponentStyles.searchTextbox]}
397
- editable={true}
398
- autoCapitalize={'characters'}
399
- value={searchData}
400
- onChangeText={text => setSearchData(text)}
401
- secureTextEntry={false}
402
- keyboardType={'default'}
403
- placeholder="Search"
404
- />
405
-
406
- </View>
407
- <Image style={[ComponentStyles.searchIcon]}
408
- source={{ uri: 'https://i.ibb.co/j8ywYpJ/search.png' }}
409
- />
410
-
411
- </View>
412
- </View>
413
- {!isLoading ?
414
- searchResult.httpstatus == 200 ?
415
- DropdownLayout()
416
- :
417
- <View>
418
- <Text style={[ComponentStyles.no_data_found_text]}>No Result Found</Text>
419
- </View>
420
- :
421
- <View style={{
422
- flex: 1, width: '100%', justifyContent: 'center',
423
- backgroundColor: 'transparent', borderRadius: 10,
424
- }}>
425
- <SearchLoader />
426
- </View>}
427
- </CModalOverlay>
428
- : null}
429
-
430
- {stage ?
431
- <OverlayHOCComponent
432
- visibility={val => (val == undefined ? null : setStage(val))}
433
- xyz={val => (val == undefined ? null : setDropDownData(val.displayvalue, setStage(false)))}
434
- value={props.cornerKey}
435
- // onselect={val => (val == undefined ? null : onSelect(val))}
436
- // data={searchResult != null && searchResult != undefined && searchResult.length > 0 ? searchResult : null}
437
- /> : null}
438
-
439
- </TouchableOpacity>
440
- </View>
441
-
442
- );
443
-
444
- function GetDropdown(data) {
445
-
446
- const newDropDownData = data != null && data != undefined ? data.filter(function (item) {
447
- const dataItem = item.displayvalue ? item.displayvalue.toUpperCase() : ''.toUpperCase();
448
- const textData = searchData.toUpperCase();
449
- return dataItem.indexOf(textData) > -1;
450
- }) : null;
451
-
452
- return (
453
- <View style={{ flexDirection: 'row', flex: 1, width: '100%' }}>
454
- <FlatList
455
- data={newDropDownData}
456
- renderItem={renderItem}
457
- initialNumToRender={150}
458
- maxToRenderPerBatch={200}
459
- keyExtractor={(item, index) => 'key' + index}
460
- style={{ flex: 1, width: '85%' }}
461
- contentContainerStyle={{ flexGrow: 1 }}
462
- scrollEnabled={true}
463
- nestedScrollEnabled={true}
464
- />
465
- </View>
466
- );
467
- }
468
-
469
- function multiselect(item, keycode) {
470
- item.selected = !item.selected;
471
- setRefresh(refresh + 1);
472
- }
473
- function renderItem(data) {
474
- // console.log("________________________________________",data)
475
- return (
476
- <TouchableOpacity
477
- style={[getListviewItem(data.item.selected), { flexDirection: 'row', alignItems: 'center' }]}
478
- onPress={() => props.multiselect != undefined ? multiselect(data.item, props.keycode) : selection(data.item, data.item.selected, props.keycode)}
479
- activeOpacity={0.5}
480
- >
481
- <Icons.FontAwesome name="dot-circle-o" color="darkblue" size={normalize(12)}
482
- style={{ paddingHorizontal: normalize(2), paddingLeft: normalize(4) }} />
483
- <Text style={selectedValue != null && selectedValue != undefined ? selectedValue == item.datavalue ? getListviewItemText(true) : getListviewItemText(false) : getListviewItemText(false)}>
484
- {data.item.displayvalue}
485
- </Text>
486
- </TouchableOpacity>
487
- );
488
- }
489
-
490
- function getOverlayScreenChildcontainer() {
491
- return (
492
- {
493
- flex: 1,
494
- minHeight: Dimensions.get('window').height * 0.5,
495
- maxHeight: Dimensions.get('window').height * 0.75,
496
- marginBottom: Dimensions.get('window').height * 0.01,
497
- marginTop: Dimensions.get('window').height * 0.01,
498
- }
499
- );
500
- }
501
- };
502
-
503
- const layoutstyles = StyleSheet.create({
504
- lefticon_container: {
505
- marginLeft: '2%',
506
- },
507
- textinput_view: {
508
- flex: 1,
509
- paddingLeft: '1%',
510
- },
511
- overlay_screen_listview_container: {
512
- justifyContent: 'center',
513
- marginBottom: 10,
514
- },
515
- overlay_searchTextbox_View: {
516
- width: '96%',
517
-
518
- },
519
- overlay_screen_heading_text: {
520
- ...ComponentStyles.popup_heading,
521
- width: '100%',
522
- },
523
- overlay_screen_container: {
524
- width: '100%',
525
- flex: 1,
526
- },
527
- });
528
-
529
- export default SDropDownNew;
@@ -1,147 +0,0 @@
1
- import React, { useState, useEffect } from 'react';
2
- import { TouchableOpacity, View, Text, Dimensions } from 'react-native';
3
- import { normalize } from '../CommonStyle/componentStyle';
4
- import { getLoading, isNU, isNUL, isNUQ, notifyMessage } from '../CommonStyle/ComponentFunctions';
5
- import { APIURL } from '../../../../../src/Common/apiConstants';
6
- import { NetworkServiceCall } from '@jescon-technologies/react-native-ui-kit';
7
- import { Global } from '../../../../../src/Common/Global';
8
-
9
- const SHelpDescription = (props) => {
10
- const [data, setData] = useState();
11
- const [isLoading, setIsLoading] = useState(false);
12
- const [visibility, setVisibility] = useState(false);
13
-
14
- console.log('kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk', props);
15
- useEffect(() => {
16
- getData(props.column != undefined ? props.column : 1);
17
- }, []);
18
-
19
- function getData(column) {
20
- setVisibility(false);
21
- setIsLoading(true);
22
- // let buttonapi = APIURL + Global.PatientDetails.detailapi
23
- let buttonapi = APIURL + 'commonhis/his/rnhrenhelpdescription ' + column;
24
- // let buttonapi = APIURL + "commonhis/his/rnhrenbiodatasegregation_03112023" + " " + props.suoptiondetail + "," + code
25
- console.log('>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>', buttonapi);
26
- NetworkServiceCall('get', buttonapi)
27
- .then(function (response) {
28
- if (response.httpstatus == 200) {
29
- console.log('hhhhhhhhhhhhhhhhh',response.data.data);
30
- // notifyMessage(isNUQ(response.data.data)&& isNUQ( response.data.data[0].helpfor)&&isNUQ(response.data.data[0].helpmessage ) ? response.data.data[0].helpfor + " :- "+ response.data.data[0].helpmessage : "Please select column for help")
31
- setData(response.data.data[0]);
32
- setTimeout(() => {
33
- setVisibility(true);
34
- });
35
- Global.HelpId = 0;
36
- // setResponseJSON(response.data.data[0])
37
- // setData(response.data.bioarray)
38
- setIsLoading(false);
39
-
40
- } else {
41
- notifyMessage('Please select valid column for help ', 4);
42
- setIsLoading(false);
43
- // console.log("RESPONSEEEEEEEEEEE FROM CONSULTATTION22222222", JSON.stringify(response.data.data[0]))
44
-
45
- }
46
- });
47
- getLoading(v => setIsLoading(false));
48
- }
49
-
50
-
51
- return (
52
- // <View style={{ marginHorizontal: normalize(3), marginVertical: normalize(2) }}>
53
- // {/* <Menu style={{ borderRadius: 0, borderWidth: 0 }}>
54
- // <MenuTrigger
55
- // disabled={false}
56
- // // customStyles={{ triggerWrapper: { borderWidth: 0, backgroundColor: '#ffffffff', borderRadius: 10, elevation: 0 } }}
57
- // > */}
58
- // <View>
59
- // <TouchableOpacity
60
- // onPress={()=> getData(1)}
61
- // // disabled={true}
62
- // style={{
63
- // borderWidth: 1,
64
- // borderColor: 'lightgrey',
65
- // borderRadius: 10,
66
- // alignItems: 'center',
67
- // justifyContent: 'flex-start',
68
- // height: normalize(25),
69
- // flexDirection: 'row',
70
- // backgroundColor: '#ffffff',
71
- // // width: Dimensions.get('screen').width * 0.08,
72
- // // minWidth: normalize(100),
73
- // // maxWidth: Dimensions.get('screen').width * 0.278
74
- // }}>
75
- // <HOCIcons.Icons
76
- // icongroup={11}
77
- // name={'help-with-circle'}
78
- // color={'darkblue'}
79
- // size={normalize(18)}
80
- // style={{ marginHorizontal: normalize(3), borderWidth: 0 }}
81
- // />
82
- // {/* <Text
83
- // adjustsFontSizeToFit
84
- // style={{
85
- // borderWidth: 0,
86
- // width: '80%',
87
- // fontSize: normalize(8),
88
- // fontWeight: 'bold',
89
- // color: '#000000',
90
- // alignItems: 'center',
91
- // textAlign: 'center',
92
- // justifyContent: 'center',
93
- // }}>help</Text> */}
94
- // </TouchableOpacity>
95
- // </View>
96
- // {/* </MenuTrigger>
97
- // <MenuOptions
98
- // optionsContainerStyle={{ marginTop: normalize(30) }}
99
- // customStyles={{
100
- // optionsContainer: {
101
- // shadowColor: '#000000ff',
102
- // shadowRadius: 10,
103
- // borderRadius: 5,
104
- // borderWidth: 0.5,
105
- // borderColor: 'lightgrey',
106
- // elevation: 3,
107
- // width: Dimensions.get('screen').width * 0.28
108
- // },
109
- // optionText: {},
110
- // }}>
111
- // <Text>HELP</Text>
112
- // </MenuOptions>
113
- // </Menu> */}
114
- // {/* <Text style={{ position: 'absolute', color: '#000000', fontSize: normalize(6), fontWeight: 'normal', top: normalize(-1), left: normalize(5), backgroundColor: 'white' }}>{params.displaytext}</Text> */}
115
- // </View>
116
- // <TouchableOpacity onPress={() => getData(Global.HelpId)}
117
- // style={{ alignItems: 'center' }}
118
- // >
119
- // <HOCIcons.Icons
120
- // icongroup={data.group != undefined ? data.group : 3}
121
- // name={data.name ? data.name : 'help-circle'}
122
- // color={data.color ? data.color : 'darkblue'}
123
- // size={data.size ? data.size : normalize(25)}
124
- // style={{ marginHorizontal: normalize(3), borderWidth: 0 }}
125
- // />
126
- // <Text
127
- // adjustsFontSizeToFit
128
- // style={{
129
- // borderWidth: 0,
130
- // width: '80%',
131
- // fontSize: normalize(10),
132
- // fontWeight: 'bold',
133
- // color: '#000000',
134
- // alignItems: 'center',
135
- // textAlign: 'center',
136
- // justifyContent: 'center',
137
- // }}>help</Text>
138
-
139
-
140
- // </TouchableOpacity>
141
- <View style={{padding:normalize(5),borderWidth:0,borderColor:'lightblue',backgroundColor:'lightgrey',width:props.width ? props.width : '100%'}}>
142
- {isNU(data) ? <Text style={{color:'black',fontStyle:'italic',fontSize:normalize(11),fontWeight:'bold'}}>{data.helpmessage != undefined ? data.helpmessage : 'help not setuped for current column'}</Text> : null}
143
-
144
- </View>
145
- );
146
- };
147
- export default SHelpDescription;