@jescon-technologies/react-native-ui-kit 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +70 -0
- package/package.json +26 -3
- package/src/Alerts/AAlert.js +1 -1
- package/src/HOC/ConfirmOverlay.js +192 -0
- package/src/HOC/HAbsolute.js +56 -0
- package/src/HOC/HDiscontinue.js +105 -0
- package/src/HOC/HHeading.js +70 -0
- package/src/HOC/HMoreButton.js +88 -0
- package/src/HOC/HNatureHeading.js +402 -0
- package/src/HOC/HOCIcons.js +80 -0
- package/src/HOC/HOverlay.js +99 -0
- package/src/HOC/HOverlayCentered.js +140 -0
- package/src/HOC/HShadowButton.js +45 -0
- package/src/HOC/HShadowCountButton.js +82 -0
- package/src/HOC/OptionOverlay.js +48 -0
- package/src/Media/AudioScreen.js +347 -0
- package/src/Media/BarcodeScan.js +145 -0
- package/src/Media/CAudioPlay.js +228 -0
- package/src/Media/CCaptureImageWithoutEdit.js +330 -0
- package/src/Media/CImageGallery.js +289 -0
- package/src/Media/CImageZoom.js +82 -0
- package/src/Media/CSingleImage.js +391 -0
- package/src/Media/CSketchCanvas.js +76 -0
- package/src/Media/CVideoPlay.js +31 -0
- package/src/Media/DocumentScreen.js +367 -0
- package/src/Media/DrawingScreen.js +582 -0
- package/src/Media/ImageScreen.js +313 -0
- package/src/Media/RecordAudio.js +250 -0
- package/src/Media/RecordVideo.js +223 -0
- package/src/Media/VideoScreen.js +383 -0
- package/src/StaticComponents/SAlphabet.js +47 -0
- package/src/StaticComponents/SCheckBox.js +42 -0
- package/src/StaticComponents/SDatePicker.js +208 -0
- package/src/StaticComponents/SDatePickerLabel.js +253 -0
- package/src/StaticComponents/SDatePickerNew.js +258 -0
- package/src/StaticComponents/SDateTimePickerNew.js +381 -0
- package/src/StaticComponents/SDropDownGenerate.js +450 -0
- package/src/StaticComponents/SDropDownHoc.js +636 -0
- package/src/StaticComponents/SDropDownIcon.js +500 -0
- package/src/StaticComponents/SMenuBox.js +131 -0
- package/src/StaticComponents/SOverlay.js +177 -0
- package/src/StaticComponents/SOverlayTextInput.js +109 -0
- package/src/StaticComponents/SSearch.js +438 -0
- package/src/StaticComponents/SSearchBar.js +53 -0
- package/src/StaticComponents/SSpeedDial.js +303 -0
- package/src/StaticComponents/STextInput.js +289 -0
- package/src/StaticComponents/STextInputProps.js +36 -0
- package/src/StaticComponents/STimePicker.js +171 -0
- package/src/StaticComponents/STimingDropDownNew.js +1589 -0
- package/src/StaticComponents/STimingSwitch.js +34 -0
- package/src/layout/CContainerView.js +21 -0
- package/src/layout/CDetailView.js +81 -0
- package/src/layout/FooterBlock.js +0 -3
- package/src/layout/HeaderBlock.js +353 -0
- package/src/index.js +0 -15
- package/src/screens/ForgotPassword.js +0 -346
- package/src/screens/Login.js +0 -328
- package/src/screens/Splash.js +0 -788
- /package/src/{components → layout}/Loader.js +0 -0
|
@@ -0,0 +1,438 @@
|
|
|
1
|
+
import React, { useState, useEffect, useRef } from 'react';
|
|
2
|
+
import { View, Text, TextInput, TouchableOpacity, FlatList, Image, Dimensions, StyleSheet, Keyboard } from 'react-native';
|
|
3
|
+
import { APIURL } from '../Common/apiConstants';
|
|
4
|
+
import { Global } from '../Common/Global';
|
|
5
|
+
import Icons from '../Common/Icons';
|
|
6
|
+
import NetworkServiceCall from '../Common/NetworkServiceCall';
|
|
7
|
+
import { ArrayCheck, ValueCheck, getLoading, isNU, isNUQZ, notifyMessage } from '../CommonStyle/ComponentFunctions';
|
|
8
|
+
import { normalize } from '../CommonStyle/componentStyle';
|
|
9
|
+
import CAwesomeButton from '../CustomComponents/CAwesomeButton';
|
|
10
|
+
import CCommentOverlay from '../CustomComponents/CCommentOverlay';
|
|
11
|
+
import Loader from '../Custom/Loader';
|
|
12
|
+
|
|
13
|
+
export default function SSearch(props) {
|
|
14
|
+
const [dropdowndata, setDropDownData] = useState([]);
|
|
15
|
+
const [CommentOverlay, setCommentOverlay] = useState(false);
|
|
16
|
+
const [CommentOverlayData, setCommentOverlayData] = useState({
|
|
17
|
+
'code': 0,
|
|
18
|
+
'displaytext': '',
|
|
19
|
+
'displayheading': '',
|
|
20
|
+
});
|
|
21
|
+
const textInputRef = useRef(null);
|
|
22
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
23
|
+
const [refresh, setRefresh] = useState(0);
|
|
24
|
+
|
|
25
|
+
useEffect(() => {
|
|
26
|
+
ValueCheck(props.editable) ? FetchDropdownList() : FetchList();
|
|
27
|
+
}, []);
|
|
28
|
+
|
|
29
|
+
function FetchDropdownList() {
|
|
30
|
+
let buttonapi = APIURL + props.dropdownapi;
|
|
31
|
+
console.log('Searchbarlink___________________', 'get', buttonapi);
|
|
32
|
+
NetworkServiceCall('get', buttonapi, '')
|
|
33
|
+
.then(function (response) {
|
|
34
|
+
if (response.data.data != null && response.data.data != undefined) {
|
|
35
|
+
setDropDownData(response.data.data);
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
setDropDownData([]);
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function FetchList() {
|
|
44
|
+
setDropDownData(props.dropdownarray);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function saveDataConsultation(blockData, textdata, comments) {
|
|
48
|
+
console.log('saveDataConsultation', blockData, textdata);
|
|
49
|
+
|
|
50
|
+
setIsLoading(true);
|
|
51
|
+
let output = {
|
|
52
|
+
'groups': {
|
|
53
|
+
'procedurename': 'hosumrconsultationactivity1',
|
|
54
|
+
'hosuconsultant': Global.userData.hosuconsultant,
|
|
55
|
+
'consultationstatus': blockData,
|
|
56
|
+
'consultationremarks': isNU(comments) ? comments : '',
|
|
57
|
+
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
let buttonapi = APIURL + 'commondelete/RnCommonDelete';
|
|
62
|
+
console.log('output', output, buttonapi);
|
|
63
|
+
|
|
64
|
+
NetworkServiceCall('post', buttonapi, output)
|
|
65
|
+
.then(function (response) {
|
|
66
|
+
console.log('response of saved.....', JSON.stringify(response));
|
|
67
|
+
if (response.httpstatus == 200) {
|
|
68
|
+
Global.userData.consultationstatus = blockData; //started
|
|
69
|
+
setRefresh(refresh + 1);
|
|
70
|
+
props.onRefresh(true);
|
|
71
|
+
notifyMessage(textdata);
|
|
72
|
+
setIsLoading(false);
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
notifyMessage('Data not saved', 2);
|
|
76
|
+
setIsLoading(false);
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
getLoading(v => setIsLoading(false));
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
return (
|
|
83
|
+
<View style={{ marginTop: normalize(3), borderWidth: 0 }}>
|
|
84
|
+
|
|
85
|
+
{ArrayCheck(dropdowndata) ?
|
|
86
|
+
<View style={{ flexDirection: 'row', flexWrap: 'wrap', justifyContent: 'space-evenly',borderWidth:0 }}>
|
|
87
|
+
{(dropdowndata).map((item, i) => {
|
|
88
|
+
return (
|
|
89
|
+
<TouchableOpacity key={i}
|
|
90
|
+
style={{
|
|
91
|
+
flexDirection: 'column',
|
|
92
|
+
alignItems: 'center',
|
|
93
|
+
borderRadius: 10,
|
|
94
|
+
backgroundColor: '#fff', // item.selected ? '#d7ffbc' : '#fff',
|
|
95
|
+
elevation: 2,
|
|
96
|
+
borderColor: 'lightblue',
|
|
97
|
+
borderWidth: 0.5,
|
|
98
|
+
padding: normalize(3),
|
|
99
|
+
paddingHorizontal: normalize(5),
|
|
100
|
+
marginLeft: normalize(3),
|
|
101
|
+
marginTop: normalize(3),
|
|
102
|
+
marginBottom: normalize(3),
|
|
103
|
+
}}
|
|
104
|
+
onPress={() => getSelection(item)}
|
|
105
|
+
>
|
|
106
|
+
<Icons.FontAwesome
|
|
107
|
+
name={ValueCheck(item.iconname) ? item.iconname : 'dot-circle-o'}
|
|
108
|
+
color={Global.AppTheme.primary_color} size={normalize(20)}
|
|
109
|
+
style={{
|
|
110
|
+
paddingRight: normalize(4),
|
|
111
|
+
paddingLeft: normalize(4),
|
|
112
|
+
}}
|
|
113
|
+
/>
|
|
114
|
+
<Text adjustsFontSizeToFit style={{
|
|
115
|
+
fontSize: normalize(7),
|
|
116
|
+
fontWeight: item.selected ? '800' : 'normal',
|
|
117
|
+
color: Global.AppTheme.primary_color,
|
|
118
|
+
}}>
|
|
119
|
+
{item.displayvalue}
|
|
120
|
+
</Text>
|
|
121
|
+
</TouchableOpacity>
|
|
122
|
+
);
|
|
123
|
+
})}
|
|
124
|
+
</View> : null}
|
|
125
|
+
|
|
126
|
+
<View style={{ flexDirection: 'row', alignItems: 'center', justifyContent: 'center' }}>
|
|
127
|
+
|
|
128
|
+
{props.consultationbuttons ?
|
|
129
|
+
<View style={{ justifyContent: 'center', alignItems: 'center' }}>
|
|
130
|
+
<CAwesomeButton
|
|
131
|
+
callback={(k) => {
|
|
132
|
+
if (!isNUQZ(Global.userData.consultationstatus)) { //start
|
|
133
|
+
saveDataConsultation(1, 'Consultation Started.');
|
|
134
|
+
}
|
|
135
|
+
else if (Global.userData.consultationstatus == 1) { //start
|
|
136
|
+
setCommentOverlayData(
|
|
137
|
+
{
|
|
138
|
+
'code': 2,
|
|
139
|
+
'displaytext': 'Consultation Paused',
|
|
140
|
+
'displayheading': 'PAUSE REASON',
|
|
141
|
+
});
|
|
142
|
+
setCommentOverlay(true);
|
|
143
|
+
}
|
|
144
|
+
else if (Global.userData.consultationstatus == 2) {
|
|
145
|
+
saveDataConsultation(3, 'Consultation Resumed.');
|
|
146
|
+
}
|
|
147
|
+
else if (Global.userData.consultationstatus == 3) {
|
|
148
|
+
setCommentOverlayData(
|
|
149
|
+
{
|
|
150
|
+
'code': 2,
|
|
151
|
+
'displaytext': 'Consultation Paused',
|
|
152
|
+
'displayheading': 'PAUSE REASON',
|
|
153
|
+
});
|
|
154
|
+
setCommentOverlay(true);
|
|
155
|
+
}
|
|
156
|
+
else if (Global.userData.consultationstatus == 4) {
|
|
157
|
+
saveDataConsultation(1, 'Consultation Started.');
|
|
158
|
+
}
|
|
159
|
+
}}
|
|
160
|
+
buttonstyle={{
|
|
161
|
+
'borderRadius': 100,
|
|
162
|
+
'borderWidth': 0.5,
|
|
163
|
+
'height': normalize(30),
|
|
164
|
+
'width': normalize(29),
|
|
165
|
+
'backgroundColor': (Global.userData.consultationstatus == 0) ? 'darkgreen' : (Global.userData.consultationstatus == 1) ? '#ff8119' : (Global.userData.consultationstatus == 2) ? 'darkblue' : (Global.userData.consultationstatus == 3) ? '#ff8119' : 'green',
|
|
166
|
+
// 'backgroundColor': ValueCheck(blockData.item.bookingstatus) ? "#7a1241" : Global.AppTheme.primary_color,
|
|
167
|
+
'paddingHorizontal': 0,
|
|
168
|
+
'raiseLevel': 3,
|
|
169
|
+
'paddingBottom': 0,
|
|
170
|
+
'borderColor': 'grey',
|
|
171
|
+
'paddingTop': 0,
|
|
172
|
+
'style': {
|
|
173
|
+
padding: 0,
|
|
174
|
+
marginHorizontal: 2,
|
|
175
|
+
},
|
|
176
|
+
}}
|
|
177
|
+
viewstyle={{
|
|
178
|
+
borderWidth: 0,
|
|
179
|
+
borderRadius: 0,
|
|
180
|
+
justifyContent: 'center',
|
|
181
|
+
alignItems: 'center',
|
|
182
|
+
}}
|
|
183
|
+
icon={{
|
|
184
|
+
'icongroup': 5,
|
|
185
|
+
'name': 'user-md',
|
|
186
|
+
'color': 'white',
|
|
187
|
+
'size': normalize(18),
|
|
188
|
+
'style': {
|
|
189
|
+
textAlign: 'center',
|
|
190
|
+
},
|
|
191
|
+
}}
|
|
192
|
+
// text={{
|
|
193
|
+
// fontSize: normalize(6),
|
|
194
|
+
// fontWeight: 'bold',
|
|
195
|
+
// color: 'white',
|
|
196
|
+
// textAlign: 'center',
|
|
197
|
+
// textShadowColor: 'black',
|
|
198
|
+
// textShadowRadius: 1,
|
|
199
|
+
// textShadowOffset: { width: 1, height: 1 },
|
|
200
|
+
// }}
|
|
201
|
+
displaytext={'start'}
|
|
202
|
+
/>
|
|
203
|
+
<Text style={{ fontSize: normalize(8), color: 'black', fontWeight: 'bold' }} >{(Global.userData.consultationstatus == 0) ? 'START' : (Global.userData.consultationstatus == 1) ? 'PAUSE' : (Global.userData.consultationstatus == 2) ? 'RESUME' : (Global.userData.consultationstatus == 3) ? 'PAUSE' : 'START'}</Text>
|
|
204
|
+
</View>
|
|
205
|
+
: null}
|
|
206
|
+
|
|
207
|
+
{ValueCheck(props.onChangeText) ? <View
|
|
208
|
+
style={{
|
|
209
|
+
flexDirection: 'row',
|
|
210
|
+
borderWidth: 0,
|
|
211
|
+
borderColor: 'black',
|
|
212
|
+
justifyContent: 'flex-start',
|
|
213
|
+
alignItems: 'flex-start',
|
|
214
|
+
borderRadius: 50,
|
|
215
|
+
width: props.consultationbuttons ? '65%' : ValueCheck(props.onSearch) ? '85%' : '95%',
|
|
216
|
+
marginHorizontal: normalize(5),
|
|
217
|
+
marginBottom: Dimensions.get('window').height * 0.003,
|
|
218
|
+
height: normalize(35),
|
|
219
|
+
backgroundColor: '#f1f3f6',
|
|
220
|
+
marginTop: 0,
|
|
221
|
+
padding: 5,
|
|
222
|
+
alignItems: 'center',
|
|
223
|
+
}} >
|
|
224
|
+
|
|
225
|
+
<View style={{ flex: 1, paddingLeft: '1%', width: '70%' }}>
|
|
226
|
+
<TextInput
|
|
227
|
+
ref={textInputRef}
|
|
228
|
+
style={{
|
|
229
|
+
color: 'black',
|
|
230
|
+
width: '100%',
|
|
231
|
+
marginLeft: '1%',
|
|
232
|
+
marginRight: '1%',
|
|
233
|
+
fontWeight: 'bold',
|
|
234
|
+
fontSize: normalize(18),
|
|
235
|
+
textAlign: 'justify',
|
|
236
|
+
padding: 0, height: '100%', marginBottom: -(Dimensions.get('window').height * 0.003),
|
|
237
|
+
}}
|
|
238
|
+
editable={true}
|
|
239
|
+
blurOnSubmit={true}
|
|
240
|
+
keyboardType="default"
|
|
241
|
+
placeholder={'Search...'}
|
|
242
|
+
placeholderTextColor={'lightblue'}
|
|
243
|
+
autoCapitalize={'characters'}
|
|
244
|
+
{...props}
|
|
245
|
+
/>
|
|
246
|
+
</View>
|
|
247
|
+
{/* <TouchableOpacity
|
|
248
|
+
onPress={() => getVisibility()}
|
|
249
|
+
// hitSlop={{ right: 5, left: 5, top: 5, bottom: 5 }}
|
|
250
|
+
style={{ borderWidth: 0, marginRight: normalize(5) }}>
|
|
251
|
+
<Icons.MaterialCommunityIcons name="close" color={Global.AppTheme.primary_color} size={normalize(20)} />
|
|
252
|
+
</TouchableOpacity> */}
|
|
253
|
+
{ValueCheck(props.onBarCodeScan) ?
|
|
254
|
+
<View style={{
|
|
255
|
+
borderWidth: 0,
|
|
256
|
+
paddingRight: '1%', alignItems: 'flex-end',
|
|
257
|
+
}}>
|
|
258
|
+
<TouchableOpacity style={{
|
|
259
|
+
width: '80%', alignItems: 'flex-end',
|
|
260
|
+
}}
|
|
261
|
+
onPress={() => ValueCheck(props.onBarCodeScan) ? props.onBarCodeScan(true) : null}>
|
|
262
|
+
<Image style={{ width: 30, height: 32 }}
|
|
263
|
+
source={{uri: `${APIURL}file/getCommonFile/image/barcode2.png`}}
|
|
264
|
+
/>
|
|
265
|
+
</TouchableOpacity>
|
|
266
|
+
</View> : null}
|
|
267
|
+
|
|
268
|
+
</View> : null}
|
|
269
|
+
|
|
270
|
+
{ValueCheck(props.onSearch) ?
|
|
271
|
+
<TouchableOpacity style={{}}
|
|
272
|
+
onPress={() => ValueCheck(props.onSearch) ? props.onSearch(true) : null}
|
|
273
|
+
>
|
|
274
|
+
<Icons.FontAwesome5 name={'search'} color={'black'} size={normalize(23)} />
|
|
275
|
+
</TouchableOpacity> : null}
|
|
276
|
+
|
|
277
|
+
{props.consultationbuttons ?
|
|
278
|
+
<View style={{ justifyContent: 'center', alignItems: 'center' }}>
|
|
279
|
+
<CAwesomeButton
|
|
280
|
+
callback={(k) => {
|
|
281
|
+
console.log('CAwesomeButton completed');
|
|
282
|
+
setCommentOverlayData(
|
|
283
|
+
{
|
|
284
|
+
'code': 4,
|
|
285
|
+
'displaytext': 'Consultation Completed',
|
|
286
|
+
'displayheading': 'COMPLETION REASON',
|
|
287
|
+
});
|
|
288
|
+
setCommentOverlay(true);
|
|
289
|
+
}}
|
|
290
|
+
buttonstyle={{
|
|
291
|
+
'borderRadius': 100,
|
|
292
|
+
'borderWidth': 0.5,
|
|
293
|
+
'height': normalize(30),
|
|
294
|
+
'width': normalize(29),
|
|
295
|
+
'backgroundColor': 'darkred',
|
|
296
|
+
// 'backgroundColor': ValueCheck(blockData.item.bookingstatus) ? "#7a1241" : Global.AppTheme.primary_color,
|
|
297
|
+
'paddingHorizontal': 0,
|
|
298
|
+
'raiseLevel': 3,
|
|
299
|
+
'paddingBottom': 0,
|
|
300
|
+
'borderColor': 'grey',
|
|
301
|
+
'paddingTop': 0,
|
|
302
|
+
'style': {
|
|
303
|
+
padding: 0,
|
|
304
|
+
marginHorizontal: 2,
|
|
305
|
+
},
|
|
306
|
+
}}
|
|
307
|
+
viewstyle={{
|
|
308
|
+
borderWidth: 0,
|
|
309
|
+
borderRadius: 0,
|
|
310
|
+
justifyContent: 'center',
|
|
311
|
+
alignItems: 'center',
|
|
312
|
+
}}
|
|
313
|
+
icon={{
|
|
314
|
+
'icongroup': 3,
|
|
315
|
+
'name': 'account-multiple-check',
|
|
316
|
+
'color': 'white',
|
|
317
|
+
'size': normalize(19),
|
|
318
|
+
'style': {
|
|
319
|
+
textAlign: 'center',
|
|
320
|
+
},
|
|
321
|
+
}}
|
|
322
|
+
// text={{
|
|
323
|
+
// fontSize: normalize(6),
|
|
324
|
+
// fontWeight: 'bold',
|
|
325
|
+
// color: 'white',
|
|
326
|
+
// textAlign: 'center',
|
|
327
|
+
// textShadowColor: 'black',
|
|
328
|
+
// textShadowRadius: 1,
|
|
329
|
+
// textShadowOffset: { width: 1, height: 1 },
|
|
330
|
+
// }}
|
|
331
|
+
displaytext={'COMPLETE'}
|
|
332
|
+
/>
|
|
333
|
+
<Text style={{ fontSize: normalize(8), color: 'black', fontWeight: 'bold' }}>COMPLETE</Text>
|
|
334
|
+
</View>
|
|
335
|
+
: null}
|
|
336
|
+
</View>
|
|
337
|
+
{CommentOverlay && isNU(CommentOverlayData) && isNU(CommentOverlayData.displaytext) ?
|
|
338
|
+
<CCommentOverlay
|
|
339
|
+
disabled={false}
|
|
340
|
+
icon={{
|
|
341
|
+
'name': 'badge-account',
|
|
342
|
+
'icongroup': 3,
|
|
343
|
+
'size': normalize(15),
|
|
344
|
+
'style': {
|
|
345
|
+
marginHorizontal: normalize(10),
|
|
346
|
+
},
|
|
347
|
+
}}
|
|
348
|
+
footericon={{
|
|
349
|
+
'name': 'user-md',
|
|
350
|
+
'icongroup': 5,
|
|
351
|
+
'color': Global.AppTheme.primary_color,
|
|
352
|
+
'size': normalize(25),
|
|
353
|
+
'style': {
|
|
354
|
+
marginHorizontal: normalize(10),
|
|
355
|
+
},
|
|
356
|
+
}}
|
|
357
|
+
footerbuttontext={'SAVE'}
|
|
358
|
+
heading={isNU(CommentOverlayData) && isNU(CommentOverlayData.displayheading) ? CommentOverlayData.displayheading : ''}
|
|
359
|
+
overlaystyle={{
|
|
360
|
+
borderRadius: 10,
|
|
361
|
+
height: Dimensions.get('window').height * 0.38,
|
|
362
|
+
borderWidth: 0,
|
|
363
|
+
borderColor: 'darkblue',
|
|
364
|
+
alignSelf: 'center',
|
|
365
|
+
width: Dimensions.get('screen').width * 1,
|
|
366
|
+
alignItems: 'center',
|
|
367
|
+
justifyContent: 'flex-start',
|
|
368
|
+
padding: 0,
|
|
369
|
+
backgroundColor: 'transparent',
|
|
370
|
+
position: 'absolute',
|
|
371
|
+
bottom: 0,
|
|
372
|
+
|
|
373
|
+
// position: 'absolute',
|
|
374
|
+
// bottom: 0,
|
|
375
|
+
// top: Dimensions.get('screen').height * 0.5,
|
|
376
|
+
// width: Dimensions.get('screen').width,
|
|
377
|
+
// borderRadius: 20,
|
|
378
|
+
// borderWidth: 2,
|
|
379
|
+
// borderColor: '#e0e0e0',
|
|
380
|
+
// paddingHorizontal: normalize(5),
|
|
381
|
+
}}
|
|
382
|
+
data={''}
|
|
383
|
+
callback={val => {
|
|
384
|
+
// console.log('callback from overlay');
|
|
385
|
+
|
|
386
|
+
}}
|
|
387
|
+
onsavecallback={val => {
|
|
388
|
+
setCommentOverlay(false);
|
|
389
|
+
saveDataConsultation(CommentOverlayData.code, CommentOverlayData.displaytext, val);
|
|
390
|
+
// console.log('callback from overlay');
|
|
391
|
+
|
|
392
|
+
}}
|
|
393
|
+
|
|
394
|
+
OverlayClose={val => {
|
|
395
|
+
console.log('callback from OverlayClose');
|
|
396
|
+
setCommentOverlay(false);
|
|
397
|
+
}}
|
|
398
|
+
|
|
399
|
+
/>
|
|
400
|
+
|
|
401
|
+
: null}
|
|
402
|
+
{isLoading ? <Loader displaytext={true} /> : null}
|
|
403
|
+
</View >
|
|
404
|
+
);
|
|
405
|
+
|
|
406
|
+
function getVisibility() {
|
|
407
|
+
if (ArrayCheck(dropdowndata)) {
|
|
408
|
+
dropdowndata.map((item) => item.selected = false);
|
|
409
|
+
Keyboard.dismiss();
|
|
410
|
+
}
|
|
411
|
+
setRefresh(refresh + 1);
|
|
412
|
+
ValueCheck(props.visibility) ? props.visibility(false) : null;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
function getSelection(params) {
|
|
416
|
+
if (ArrayCheck(dropdowndata)) {
|
|
417
|
+
dropdowndata.map((item) => item.selected = false);
|
|
418
|
+
}
|
|
419
|
+
params.selected = !params.selected;
|
|
420
|
+
ValueCheck(props.onChangeData) ? props.onChangeData(params) : null;
|
|
421
|
+
if (textInputRef.current) {
|
|
422
|
+
textInputRef.current.focus();
|
|
423
|
+
}
|
|
424
|
+
setRefresh(refresh + 1);
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
const styles = StyleSheet.create({
|
|
429
|
+
barcode_icon_view: {
|
|
430
|
+
paddingRight: '1%', width: '20%', alignItems: 'flex-end',
|
|
431
|
+
},
|
|
432
|
+
barcode_icon_inner_view: {
|
|
433
|
+
width: '80%', alignItems: 'flex-end',
|
|
434
|
+
},
|
|
435
|
+
barcode_icon: {
|
|
436
|
+
width: 30, height: 32,
|
|
437
|
+
},
|
|
438
|
+
});
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TextInput, View, StyleSheet, Image,TouchableOpacity } from 'react-native';
|
|
3
|
+
import { ValueCheck } from '../CommonStyle/ComponentFunctions';
|
|
4
|
+
import ComponentStyles from '../CommonStyle/componentStyle';
|
|
5
|
+
|
|
6
|
+
const SSearchBar = (props) => {
|
|
7
|
+
const [localSearchData, setLocalSearchData] = React.useState('');
|
|
8
|
+
return (
|
|
9
|
+
<View
|
|
10
|
+
style={[ComponentStyles.searchTextbox_View,
|
|
11
|
+
layoutstyles.overlay_searchTextbox_View,
|
|
12
|
+
]}
|
|
13
|
+
>
|
|
14
|
+
<View style={layoutstyles.textinput_view}>
|
|
15
|
+
<TextInput
|
|
16
|
+
style={[ComponentStyles.searchTextbox]}
|
|
17
|
+
editable={true}
|
|
18
|
+
autoCapitalize={'characters'}
|
|
19
|
+
keyboardType={'default'}
|
|
20
|
+
placeholder="Search"
|
|
21
|
+
value={localSearchData}
|
|
22
|
+
onChangeText={(text) => {
|
|
23
|
+
setLocalSearchData(text);
|
|
24
|
+
props.onChangeText(text);
|
|
25
|
+
}}
|
|
26
|
+
/>
|
|
27
|
+
</View>
|
|
28
|
+
|
|
29
|
+
<TouchableOpacity
|
|
30
|
+
disabled={ValueCheck(props.callBack) ? false : true}
|
|
31
|
+
onPress={() => props.callBack(true)} >
|
|
32
|
+
<Image style={[ComponentStyles.searchIcon]}
|
|
33
|
+
source={{ uri: 'https://i.ibb.co/j8ywYpJ/search.png' }}
|
|
34
|
+
/>
|
|
35
|
+
</TouchableOpacity>
|
|
36
|
+
|
|
37
|
+
</View>
|
|
38
|
+
);
|
|
39
|
+
};
|
|
40
|
+
export default SSearchBar;
|
|
41
|
+
|
|
42
|
+
const layoutstyles = StyleSheet.create({
|
|
43
|
+
overlay_searchTextbox_View: {
|
|
44
|
+
width: '93%',
|
|
45
|
+
alignSelf: 'center',
|
|
46
|
+
justifyContent: 'center',
|
|
47
|
+
|
|
48
|
+
},
|
|
49
|
+
textinput_view: {
|
|
50
|
+
flex: 1,
|
|
51
|
+
paddingLeft: '1%',
|
|
52
|
+
},
|
|
53
|
+
});
|