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

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