@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.
- package/index.d.ts +66 -0
- package/index.js +3 -7
- package/package.json +3 -2
- package/src/Alerts/AAlert.js +4 -4
- package/src/Alerts/AAlertIOS.js +3 -3
- package/src/{common → Common}/NetworkServiceCall.js +1 -1
- package/src/CommonStyle/CommonTheme.js +11 -0
- package/src/CommonStyle/ComponentFunctions.js +632 -0
- package/src/CommonStyle/PopupStyle.js +146 -0
- package/src/CommonStyle/commonStyle.js +93 -0
- package/src/CommonStyle/componentStyle.js +545 -0
- package/src/CommonStyle/optionListStyles.js +175 -0
- package/src/Components/ByProductPage.js +200 -0
- package/src/Components/CDropDownListNew.js +153 -0
- package/src/Components/CSupplierList.js +88 -0
- package/src/Components/CVerificationCard.js +2822 -0
- package/src/Components/CustomButton.js +67 -0
- package/src/Components/CustomCard.js +127 -0
- package/src/Components/CustomTextInput.js +47 -0
- package/src/Components/EquipmentPage.js +313 -0
- package/src/Components/FilterInput.Copy.js +723 -0
- package/src/Components/FilterInput.js +569 -0
- package/src/Components/HSubHeading.js +68 -0
- package/src/Components/HeaderCard.js +40 -0
- package/src/Components/MoreOptionsScreen.js +251 -0
- package/src/Components/NonSwipableProductCard.js +226 -0
- package/src/Components/NonSwipableSupplierCard.js +348 -0
- package/src/Components/ProductCard.js +1336 -0
- package/src/Components/QualityProductCard.js +1059 -0
- package/src/Components/RateProductCard.js +1452 -0
- package/src/Components/RawMaterial.js +261 -0
- package/src/Components/SDropDownEdited.js +549 -0
- package/src/Components/SDropDownNew.js +529 -0
- package/src/Components/SHelpDescription.js +147 -0
- package/src/Components/STextInputNew.js +510 -0
- package/src/Components/SearchProductCard.js +470 -0
- package/src/Components/StageByProduct.js +199 -0
- package/src/Components/SupplierCard.js +243 -0
- package/src/Components/SupplierInvoiceCard.js +405 -0
- package/src/Components/SwipableSupplierCard.js +136 -0
- package/src/Components/TagTemplate.js +74 -0
- package/src/Components/WrappedComponent.js +25 -0
- package/src/Custom/CBooking.js +944 -0
- package/src/Custom/CBookingPostpone.js +1822 -0
- package/src/Custom/CCalendar.js +560 -0
- package/src/Custom/CCard.js +880 -0
- package/src/Custom/CDetailCard.js +205 -0
- package/src/Custom/CHelpImage.js +52 -0
- package/src/Custom/CReport.js +569 -0
- package/src/Custom/CScrollView.js +73 -0
- package/src/Custom/CSignature.js +112 -0
- package/src/Custom/CSliderMenu.js +339 -0
- package/src/Custom/CSupplierCard.js +99 -0
- package/src/Custom/CTemplateCard.js +438 -0
- package/src/Custom/CTokenAllocation.js +1402 -0
- package/src/Custom/CTokenListOverlay.js +122 -0
- package/src/Custom/CWardStatus.js +444 -0
- package/src/Custom/Charts/CBarChart.js +218 -0
- package/src/Custom/Charts/CDashBoardList.js +133 -0
- package/src/Custom/Charts/CDashBoardTable.js +172 -0
- package/src/Custom/Charts/CLineChart.js +193 -0
- package/src/Custom/Charts/CPieChart.js +186 -0
- package/src/Custom/Loader.js +182 -0
- package/src/Custom/OUserView.js +1121 -0
- package/src/Custom/PreviewDosage.js +115 -0
- package/src/Custom/SearchLoader.js +32 -0
- package/src/Custom/TableComponent/CActivityTable.js +707 -0
- package/src/Custom/TableComponent/CMoreButtonTable.js +197 -0
- package/src/Custom/TableComponent/CTable.js +185 -0
- package/src/Custom/TableComponent/CTextBody.js +40 -0
- package/src/Custom/TableComponent/CTextHeader.js +17 -0
- package/src/Custom/TableComponent/PreviewPrescriptionNew.js +1011 -0
- package/src/Custom/TableComponent/SDropdownTable.js +491 -0
- package/src/Custom/TableComponent/TagTable.js +1200 -0
- package/src/CustomComponents/CAddColumn.js +140 -0
- package/src/CustomComponents/CAssessmentDelete.js +307 -0
- package/src/CustomComponents/CAwesomeButton.js +83 -0
- package/src/CustomComponents/CAwesomeMoreButton.js +54 -0
- package/src/CustomComponents/CBackHandler.js +273 -0
- package/src/CustomComponents/CCalendar.js +243 -0
- package/src/CustomComponents/CCommentOverlay.js +202 -0
- package/src/CustomComponents/CComments.js +162 -0
- package/src/CustomComponents/CContainerView.js +24 -0
- package/src/CustomComponents/CCustomTextInput.js +336 -0
- package/src/CustomComponents/CDetailView.js +40 -0
- package/src/CustomComponents/CDropDownList.js +153 -0
- package/src/CustomComponents/CDropdownSelect.js +555 -0
- package/src/CustomComponents/CFooterView.js +42 -0
- package/src/CustomComponents/CImagePickerSave.js +316 -0
- package/src/CustomComponents/CModalOverlay.js +91 -0
- package/src/CustomComponents/CNetworkStatus.js +327 -0
- package/src/CustomComponents/CNotesInstructions.js +1000 -0
- package/src/CustomComponents/COverlay.js +81 -0
- package/src/CustomComponents/CRemarks.js +176 -0
- package/src/CustomComponents/CRowAdd.js +143 -0
- package/src/CustomComponents/CSummaryDropDown.js +327 -0
- package/src/CustomComponents/CText.js +9 -0
- package/src/CustomComponents/CVectorIcon.js +34 -0
- package/src/CustomComponents/HtmlContentViewer.js +65 -0
- package/src/CustomComponents/PdfContentViewer.js +90 -0
- package/src/CustomComponents/SDropDownDosage.js +1087 -0
- package/src/CustomComponents/SwipableProductCard.js +246 -0
- package/src/CustomComponents/SwipableProductImageCard.js +254 -0
- package/src/CustomComponents/WorkOrderDetails.js +1216 -0
- package/src/CustomComponents/WorkOrderDetailsPage.js +1213 -0
- package/src/HOC/ConfirmOverlay.js +2 -2
- package/src/HOC/HMoreButton.js +1 -1
- package/src/HOC/HNatureHeading.js +1 -1
- package/src/HOC/HShadowButton.js +1 -1
- package/src/HOC/HShadowCountButton.js +1 -1
- package/src/Json/Chart.json +818 -0
- package/src/Json/Consultation.json +622 -0
- package/src/Json/CreditBill.json +490 -0
- package/src/Json/Dropdown.json +216 -0
- package/src/Json/DropdownConsultation.json +228 -0
- package/src/Json/DynamicReports.json +623 -0
- package/src/Json/Footer.json +79 -0
- package/src/Media/AudioScreen.js +2 -7
- package/src/Media/CCaptureImageWithoutEdit.js +1 -1
- package/src/Media/CImageGallery.js +2 -2
- package/src/Media/CSingleImage.js +2 -2
- package/src/Media/CVideoPlay.js +1 -1
- package/src/Media/DocumentScreen.js +2 -7
- package/src/Media/DrawingScreen.js +2 -6
- package/src/Media/ImageScreen.js +2 -6
- package/src/Media/RecordAudio.js +1 -1
- package/src/Media/VideoScreen.js +2 -7
- package/src/Navigation/PageNavigation.js +224 -0
- package/src/Navigation/useFocusEffect.js +2 -0
- package/src/Navigation/useFocusEffect.native.js +1 -0
- package/src/Navigation/useFocusEffect.web.js +1 -0
- package/src/Navigation/useIsFocused.js +1 -0
- package/src/Navigation/useIsFocused.native.js +1 -0
- package/src/Navigation/useIsFocused.web.js +1 -0
- package/src/Navigation/useNavigation.js +2 -0
- package/src/Navigation/useNavigation.native.js +1 -0
- package/src/Navigation/useNavigation.web.js +1 -0
- package/src/Screens/CMedications.js +528 -0
- package/src/Screens/CWebViewGallery.js +203 -0
- package/src/Screens/ChartScan.js +279 -0
- package/src/Screens/ChartScreenNew.js +1579 -0
- package/src/Screens/Consultation.js +1500 -0
- package/src/Screens/Dashboard.js +778 -0
- package/src/Screens/FileExplorer.js +288 -0
- package/src/Screens/Footer.js +340 -0
- package/src/Screens/ForgotPassword.js +288 -0
- package/src/Screens/HeaderBlock.js +353 -0
- package/src/Screens/Login.js +328 -0
- package/src/Screens/Notification.js +149 -0
- package/src/Screens/OcrScreen.js +20 -0
- package/src/Screens/PdfPreview.js +507 -0
- package/src/Screens/RegistrationDetails.js +467 -0
- package/src/Screens/SearchScreen.js +582 -0
- package/src/Screens/Splash.js +788 -0
- package/src/Screens/SwipeLeftView.js +1867 -0
- package/src/StaticComponents/SDatePickerLabel.js +1 -1
- package/src/StaticComponents/SDatePickerNew.js +1 -1
- package/src/StaticComponents/SDateTimePickerNew.js +2 -2
- package/src/StaticComponents/SDropDownGenerate.js +3 -3
- package/src/StaticComponents/SDropDownHoc.js +4 -4
- package/src/StaticComponents/SDropDownIcon.js +1 -1
- package/src/StaticComponents/SMenuBox.js +2 -2
- package/src/StaticComponents/SSearch.js +2 -2
- package/src/StaticComponents/STextInput.js +1 -1
- package/src/StaticComponents/STimePicker.js +1 -1
- package/src/StaticComponents/STimingDropDownNew.js +2 -6
- package/src/StaticComponents/STimingSwitch.js +1 -1
- package/src/layout/CContainerView.js +1 -1
- package/src/layout/CDetailView.js +3 -3
- package/src/layout/HeaderBlock.js +5 -5
- package/src/layout/INVLoginLayout.js +3 -4
- package/src/layout/Loader.js +2 -2
- package/src/HOC/HAbsolute.js +0 -56
- package/src/HOC/HDiscontinue.js +0 -105
- package/src/HOC/HOverlay.js +0 -99
- package/src/layout/FooterBlock.js +0 -821
- /package/src/{common → Common}/ErrorBoundary.tsx +0 -0
- /package/src/{common → Common}/Icons.js +0 -0
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import React, { useState, useEffect } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Text,
|
|
4
|
+
TextInput,
|
|
5
|
+
StyleSheet,
|
|
6
|
+
View,
|
|
7
|
+
Image,
|
|
8
|
+
TouchableOpacity,
|
|
9
|
+
ScrollView,
|
|
10
|
+
Dimensions,
|
|
11
|
+
FlatList,
|
|
12
|
+
TouchableWithoutFeedback,
|
|
13
|
+
Switch,
|
|
14
|
+
} from 'react-native';
|
|
15
|
+
import { colors } from '../CommonStyle/commonStyle';
|
|
16
|
+
import ComponentStyles, { normalize } from '../CommonStyle/componentStyle';
|
|
17
|
+
import { Icons } from '@jescon-technologies/react-native-ui-kit';;
|
|
18
|
+
import STimingSwitch from '../StaticComponents/STimingSwitch';
|
|
19
|
+
import { notifyMessage } from '../CommonStyle/ComponentFunctions';
|
|
20
|
+
import CAwesomeButton from './CAwesomeButton';
|
|
21
|
+
|
|
22
|
+
function CAddColumn(props) {
|
|
23
|
+
const [componentAccess, setComponentAccess] = useState(0);
|
|
24
|
+
const [parameterName, setParameterName] = useState('');
|
|
25
|
+
return (
|
|
26
|
+
<View style={{ flex: 1, width: '97%' }}>
|
|
27
|
+
<Text style={{ alignSelf: 'center', fontSize: normalize(10), fontWeight: 'bold', marginBottom: normalize(5), marginTop: normalize(-5) }}>{'Add Column'}</Text>
|
|
28
|
+
|
|
29
|
+
<View style={{ flex: 1, marginVertical: 0 }}>
|
|
30
|
+
<Text style={{ fontSize: normalize(11), paddingHorizontal: normalize(10) }}>Column name :</Text>
|
|
31
|
+
|
|
32
|
+
<View style={{ borderWidth: 1, height: normalize(35), borderRadius: 7, borderColor: 'lightgrey', backgroundColor: '#fff', elevation: 3 }}
|
|
33
|
+
>
|
|
34
|
+
<TextInput
|
|
35
|
+
numberOfLines={1}
|
|
36
|
+
keyboardType={'default'}
|
|
37
|
+
onChangeText={changevalue => setParameterName(changevalue)}
|
|
38
|
+
value={parameterName} />
|
|
39
|
+
|
|
40
|
+
</View>
|
|
41
|
+
|
|
42
|
+
<View style={{ borderWidth: 1, borderRadius: 7, borderColor: 'lightgrey', backgroundColor: '#fff', elevation: 3, paddingVertical: normalize(5), marginTop: normalize(5) }}>
|
|
43
|
+
<Text style={{ fontSize: normalize(11), paddingHorizontal: normalize(10) }}>Type of data:</Text>
|
|
44
|
+
<STimingSwitch
|
|
45
|
+
data={[{
|
|
46
|
+
'timingslot': 1,
|
|
47
|
+
'slotname': 'Date',
|
|
48
|
+
'selected': false,
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
'timingslot': 2,
|
|
52
|
+
'slotname': 'Value',
|
|
53
|
+
'selected': false,
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
'timingslot': 3,
|
|
57
|
+
'slotname': 'Question',
|
|
58
|
+
'selected': false,
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
'timingslot': 4,
|
|
62
|
+
'slotname': 'Remarks',
|
|
63
|
+
'selected': false,
|
|
64
|
+
}]}
|
|
65
|
+
callBack={val =>
|
|
66
|
+
val == undefined ? null :
|
|
67
|
+
setComponentAccess(val)} />
|
|
68
|
+
</View>
|
|
69
|
+
|
|
70
|
+
<View
|
|
71
|
+
style={{
|
|
72
|
+
position: 'absolute',
|
|
73
|
+
bottom: normalize(0),
|
|
74
|
+
width: '100%',
|
|
75
|
+
}}>
|
|
76
|
+
{/* <AwesomeButton
|
|
77
|
+
onPress={() => getAddColumn()}
|
|
78
|
+
borderRadius={10}
|
|
79
|
+
borderWidth={1}
|
|
80
|
+
height={normalize(40)}
|
|
81
|
+
width={normalize(55)}
|
|
82
|
+
backgroundColor={"#eaf2ff"}
|
|
83
|
+
paddingHorizontal={0}
|
|
84
|
+
raiseLevel={5}
|
|
85
|
+
paddingBottom={0}
|
|
86
|
+
borderColor={'white'}
|
|
87
|
+
paddingTop={0}>
|
|
88
|
+
|
|
89
|
+
<View style={{ alignItems: 'center', width: normalize(50) }} >
|
|
90
|
+
<Icons.FontAwesome5 name="save" color={"#094485"} size={normalize(20)} />
|
|
91
|
+
<Text numberOfLines={1} style={{ color: "#094485", fontSize: normalize(10) }}>Select</Text>
|
|
92
|
+
</View>
|
|
93
|
+
</AwesomeButton> */}
|
|
94
|
+
<CAwesomeButton
|
|
95
|
+
callback={() => {
|
|
96
|
+
getAddColumn();
|
|
97
|
+
}}
|
|
98
|
+
data={{
|
|
99
|
+
borderRadius: 10,
|
|
100
|
+
borderWidth: 0.5,
|
|
101
|
+
height: Dimensions.get('screen').height * 0.06,
|
|
102
|
+
width: Dimensions.get('screen').height * 0.06,
|
|
103
|
+
backgroundColor: '#f2f3ff',
|
|
104
|
+
paddingHorizontal: 0,
|
|
105
|
+
raiseLevel: 4,
|
|
106
|
+
paddingBottom: 0,
|
|
107
|
+
borderColor: 'white',
|
|
108
|
+
paddingTop: 0,
|
|
109
|
+
icongroup: 3,
|
|
110
|
+
name: 'file-document',
|
|
111
|
+
color: Global.AppTheme.primary_color,
|
|
112
|
+
size: normalize(25),
|
|
113
|
+
fontSize: normalize(6),
|
|
114
|
+
fontWeight: 'bold',
|
|
115
|
+
textAlign: 'center',
|
|
116
|
+
}}
|
|
117
|
+
/>
|
|
118
|
+
</View>
|
|
119
|
+
</View>
|
|
120
|
+
|
|
121
|
+
</View>
|
|
122
|
+
);
|
|
123
|
+
|
|
124
|
+
function getAddColumn(params) {
|
|
125
|
+
if (parameterName != '' && parameterName != undefined && componentAccess != 0) {
|
|
126
|
+
var call = {
|
|
127
|
+
'columnname': parameterName,
|
|
128
|
+
'columntype': componentAccess.timingslot,
|
|
129
|
+
};
|
|
130
|
+
props.callBack(call);
|
|
131
|
+
props.visibility(false);
|
|
132
|
+
} else {
|
|
133
|
+
notifyMessage('Please fill required coulmns', 3);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export default CAddColumn;
|
|
139
|
+
|
|
140
|
+
|
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
import React, { useContext, useState } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Text, TextInput, StyleSheet,
|
|
4
|
+
View, Image, TouchableOpacity, ScrollView, Dimensions, FlatList,
|
|
5
|
+
} from 'react-native';
|
|
6
|
+
// import { useDimensions } from '@react-native-community/hooks'
|
|
7
|
+
import ComponentStyles, { normalize } from '../CommonStyle/componentStyle';
|
|
8
|
+
import AntDesign from 'react-native-vector-icons/AntDesign';
|
|
9
|
+
import SAlphabet from '../StaticComponents/SAlphabet';
|
|
10
|
+
import SSearchBar from '../StaticComponents/SSearchBar';
|
|
11
|
+
import CAwesomeButton from './CAwesomeButton';
|
|
12
|
+
import { Global } from '../../../../../src/Common/Global';
|
|
13
|
+
import { Icons } from '@jescon-technologies/react-native-ui-kit';;
|
|
14
|
+
import { isBNUL, ValueCheck } from '../CommonStyle/ComponentFunctions';
|
|
15
|
+
import EmrResponseComponentContext from '../Handlers/emrResponseComponentContext';
|
|
16
|
+
|
|
17
|
+
export default function CAssessmentDelete(props) {
|
|
18
|
+
|
|
19
|
+
const { responseJSON, setResponseJSON } = useContext(EmrResponseComponentContext);
|
|
20
|
+
const [searchData, setSearchData] = useState('');
|
|
21
|
+
const [displayData, setDisplayData] = useState(props.data);
|
|
22
|
+
const { width, height } = Dimensions.get('window');
|
|
23
|
+
const [parameterName, setParameterName] = useState('');
|
|
24
|
+
const [alphaindex, setAlphaIndex] = useState();
|
|
25
|
+
const [tempString, settempString] = useState([]);
|
|
26
|
+
const [selected, setSelected] = useState(0);
|
|
27
|
+
const [filterPurpose, setFilterPurpose] = useState([]);
|
|
28
|
+
const [alphaFilter, setAlphaFilter] = useState(false);
|
|
29
|
+
|
|
30
|
+
function getOverlayScreenChildContainer() {
|
|
31
|
+
return (
|
|
32
|
+
{
|
|
33
|
+
// height: Dimensions.get('window').height * 0.47,
|
|
34
|
+
backgroundColor: '#fff',
|
|
35
|
+
flex: 1,
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function getOverlayScreenContainer() {
|
|
41
|
+
return ({
|
|
42
|
+
flexDirection: 'row',
|
|
43
|
+
margin: 10,
|
|
44
|
+
height: height * 0.045,
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function getOverlayScreenChildlistContainer() {
|
|
49
|
+
return {
|
|
50
|
+
// height: Dimensions.get('window').height * 0.37,
|
|
51
|
+
marginBottom: Dimensions.get('window').height * 0.01,
|
|
52
|
+
marginTop: Dimensions.get('window').height * 0.01,
|
|
53
|
+
flexDirection: 'row',
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function getAlphabetData(alpha, index) {
|
|
58
|
+
var filter = displayData.filter(value => (value.display != undefined ? value.display : '').charAt(0) == alpha);
|
|
59
|
+
setFilterPurpose(filter);
|
|
60
|
+
index == 0 ? setSearchData('') : setSearchData(alpha);
|
|
61
|
+
index == 0 ? setAlphaFilter(false) : setAlphaFilter(true);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function onSelect() {
|
|
65
|
+
//console.log("hhhhhhhhhh",JSON.stringify())
|
|
66
|
+
props.onselect(passDeleted(displayData));
|
|
67
|
+
// props.onselect(tempString);
|
|
68
|
+
//props.onselectdata(tempText);
|
|
69
|
+
|
|
70
|
+
}
|
|
71
|
+
function onSelectDelete() {
|
|
72
|
+
//console.log("hhhhhhhhhh",JSON.stringify())
|
|
73
|
+
props.onclose(false);
|
|
74
|
+
//props.onselectdata(tempText);
|
|
75
|
+
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function passDeleted(array) {
|
|
79
|
+
|
|
80
|
+
let prevcodearray = array.filter((i, k) => { return i.selected ? { ...i } : undefined; });
|
|
81
|
+
let prevcode = isBNUL(prevcodearray) ? prevcodearray : [];
|
|
82
|
+
return prevcode;
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function checkSelected(array) {
|
|
88
|
+
|
|
89
|
+
let prevcodearray = array.filter((i, k) => { return i.selected ? { ...i } : undefined; });
|
|
90
|
+
let prevcode = isBNUL(prevcodearray) ? true : false;
|
|
91
|
+
return prevcode;
|
|
92
|
+
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
function onSelectItem(datavalue, multiselect, i) {
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
if (multiselect == true) {
|
|
99
|
+
if (tempString.includes(datavalue)) {
|
|
100
|
+
|
|
101
|
+
datavalue.selected = !datavalue.selected;
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
setDisplayData(prevstate => {
|
|
105
|
+
const updatedData = [...prevstate];
|
|
106
|
+
updatedData[i] = {
|
|
107
|
+
...prevstate[i],
|
|
108
|
+
selected: !prevstate[i].selected,
|
|
109
|
+
};
|
|
110
|
+
return updatedData;
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
// setSelected(selected + 1);
|
|
116
|
+
// var index = tempString.indexOf(datavalue);
|
|
117
|
+
// if (index > -1) {
|
|
118
|
+
// tempString.splice(index, 1);
|
|
119
|
+
// }
|
|
120
|
+
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
|
|
124
|
+
setDisplayData(prevstate => {
|
|
125
|
+
const updatedData = [...prevstate];
|
|
126
|
+
updatedData[i] = {
|
|
127
|
+
...prevstate[i],
|
|
128
|
+
selected: !prevstate[i].selected,
|
|
129
|
+
};
|
|
130
|
+
return updatedData;
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
// datavalue.selected = !datavalue.selected;
|
|
134
|
+
// setSelected(selected + 1);
|
|
135
|
+
// tempString.push(datavalue);
|
|
136
|
+
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
function GetSearchData(data) {
|
|
143
|
+
const newDropDownData = data.filter(function (item) {
|
|
144
|
+
const dataItem = item.displayvalue ? item.displayvalue.toUpperCase() : ''.toUpperCase();
|
|
145
|
+
const textData = searchData.toUpperCase();
|
|
146
|
+
return dataItem.indexOf(textData) > -1;
|
|
147
|
+
});
|
|
148
|
+
return (
|
|
149
|
+
<View style={layoutstyles.overlay_screen_listview_container}>
|
|
150
|
+
<View style={getOverlayScreenChildlistContainer()}>
|
|
151
|
+
<ScrollView keyboardShouldPersistTaps="handled">
|
|
152
|
+
<View>
|
|
153
|
+
{newDropDownData != null && newDropDownData.length > 0
|
|
154
|
+
? newDropDownData.map((item, i) => {
|
|
155
|
+
return (
|
|
156
|
+
<View key={i}>
|
|
157
|
+
<TouchableOpacity
|
|
158
|
+
style={
|
|
159
|
+
{
|
|
160
|
+
borderColor: '#DCDEDD',
|
|
161
|
+
borderWidth: 1,
|
|
162
|
+
borderBottomWidth: 1,
|
|
163
|
+
width: '100%',
|
|
164
|
+
borderRadius: 7,
|
|
165
|
+
backgroundColor: item.selected ? 'lightblue' : 'transparent',
|
|
166
|
+
justifyContent: 'space-between',
|
|
167
|
+
}
|
|
168
|
+
// getListviewItem(item.selected, false)
|
|
169
|
+
}
|
|
170
|
+
// style={{
|
|
171
|
+
// borderColor: '#DCDEDD',
|
|
172
|
+
// borderWidth: 1,
|
|
173
|
+
// borderBottomWidth: 1,
|
|
174
|
+
// width: '100%',
|
|
175
|
+
// borderRadius: 7,
|
|
176
|
+
// backgroundColor: "white",
|
|
177
|
+
// justifyContent: 'space-between',
|
|
178
|
+
// }}
|
|
179
|
+
|
|
180
|
+
onPress={() => onSelectItem(item, true, i)}
|
|
181
|
+
activeOpacity={0.5}>
|
|
182
|
+
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
|
|
183
|
+
|
|
184
|
+
<Icons.FontAwesome name="dot-circle-o" color={Global.AppTheme.primary_color} size={normalize(15)}
|
|
185
|
+
style={{ paddingRight: normalize(5), paddingLeft: normalize(4) }} />
|
|
186
|
+
<Text style={
|
|
187
|
+
[
|
|
188
|
+
//getListviewItemText(item.selected),
|
|
189
|
+
{
|
|
190
|
+
margin: 2,
|
|
191
|
+
paddingLeft: 5,
|
|
192
|
+
fontWeight: 'normal',
|
|
193
|
+
color: 'black',
|
|
194
|
+
alignContent: 'center',
|
|
195
|
+
margin: Dimensions.get('window').height * 0.004,
|
|
196
|
+
alignItems: 'center',
|
|
197
|
+
textAlign: 'left',
|
|
198
|
+
fontSize: normalize(14),
|
|
199
|
+
},
|
|
200
|
+
]}>
|
|
201
|
+
{item.displayvalue}
|
|
202
|
+
</Text>
|
|
203
|
+
</View>
|
|
204
|
+
</TouchableOpacity>
|
|
205
|
+
</View>
|
|
206
|
+
);
|
|
207
|
+
})
|
|
208
|
+
: null}
|
|
209
|
+
</View>
|
|
210
|
+
</ScrollView>
|
|
211
|
+
|
|
212
|
+
<View>
|
|
213
|
+
<SAlphabet
|
|
214
|
+
callBack={val =>
|
|
215
|
+
val == undefined ? null : getAlphabetData(val.alpha, val.index)
|
|
216
|
+
} />
|
|
217
|
+
</View>
|
|
218
|
+
|
|
219
|
+
</View>
|
|
220
|
+
</View>
|
|
221
|
+
);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
return (
|
|
225
|
+
<View style={{ flex: 1 }}>
|
|
226
|
+
<Text
|
|
227
|
+
style={{
|
|
228
|
+
fontSize: normalize(12),
|
|
229
|
+
fontWeight: 'bold',
|
|
230
|
+
textAlign: 'center',
|
|
231
|
+
alignSelf: 'center',
|
|
232
|
+
}}>
|
|
233
|
+
{ValueCheck(responseJSON) && ValueCheck(responseJSON.consultationEdit) && ValueCheck(responseJSON.consultationEdit.heading) ? responseJSON.consultationEdit.heading + ' PARAMETER' : 'PARAMETER'}
|
|
234
|
+
</Text>
|
|
235
|
+
|
|
236
|
+
<View style={getOverlayScreenContainer()}>
|
|
237
|
+
<SSearchBar
|
|
238
|
+
onChangeText={val => setSearchData(val)} />
|
|
239
|
+
</View>
|
|
240
|
+
|
|
241
|
+
{displayData && displayData != null && displayData != undefined ?
|
|
242
|
+
<View
|
|
243
|
+
style={getOverlayScreenChildContainer()}
|
|
244
|
+
>
|
|
245
|
+
{GetSearchData(displayData)}
|
|
246
|
+
</View>
|
|
247
|
+
: null}
|
|
248
|
+
|
|
249
|
+
<View style={{
|
|
250
|
+
position: 'absolute', bottom: normalize(-10), width: '100%',
|
|
251
|
+
}}>
|
|
252
|
+
{checkSelected(displayData) ?
|
|
253
|
+
<CAwesomeButton
|
|
254
|
+
data={{
|
|
255
|
+
'displaytext': 'Delete',
|
|
256
|
+
'size': 10,
|
|
257
|
+
'iconname': 'trash',
|
|
258
|
+
'selected': false,
|
|
259
|
+
'visibility': true,
|
|
260
|
+
'iconsize': 20,
|
|
261
|
+
'functionid': 'ATR01',
|
|
262
|
+
'shadowcolor': '#f1f3f6',
|
|
263
|
+
'iconcolor': Global.AppTheme.primary_color,
|
|
264
|
+
'fontcolor': Global.AppTheme.primary_color,
|
|
265
|
+
}}
|
|
266
|
+
callBack={val => val == undefined ? null : onSelect()}
|
|
267
|
+
/>
|
|
268
|
+
: null}
|
|
269
|
+
{/* <TouchableOpacity style={{ marginTop: 5, justifyContent: 'center', backgroundColor: '#d8d0d0', width: '100%', borderRadius: 10, alignItems: 'center', height: normalize(23) }}
|
|
270
|
+
onPress={() => onSelectDelete()}
|
|
271
|
+
>
|
|
272
|
+
<AntDesign name={"close"}
|
|
273
|
+
color={"red"} size={normalize(21)} />
|
|
274
|
+
</TouchableOpacity> */}
|
|
275
|
+
</View>
|
|
276
|
+
</View>
|
|
277
|
+
);
|
|
278
|
+
}
|
|
279
|
+
const layoutstyles = StyleSheet.create({
|
|
280
|
+
overlay_screen_listview_container: {
|
|
281
|
+
justifyContent: 'center',
|
|
282
|
+
marginBottom: 2,
|
|
283
|
+
},
|
|
284
|
+
overlay_searchTextbox_View: {
|
|
285
|
+
width: '96%',
|
|
286
|
+
},
|
|
287
|
+
textinput_view: {
|
|
288
|
+
flex: 1,
|
|
289
|
+
paddingLeft: '1%',
|
|
290
|
+
},
|
|
291
|
+
getListviewItem: {
|
|
292
|
+
borderColor: '#DCDEDD',
|
|
293
|
+
borderWidth: 1,
|
|
294
|
+
borderBottomWidth: 1,
|
|
295
|
+
width: '100%',
|
|
296
|
+
borderRadius: 7,
|
|
297
|
+
justifyContent: 'space-between',
|
|
298
|
+
},
|
|
299
|
+
getListviewItemText: {
|
|
300
|
+
alignContent: 'center',
|
|
301
|
+
margin: 3,
|
|
302
|
+
alignItems: 'center',
|
|
303
|
+
textAlign: 'left',
|
|
304
|
+
fontSize: 12,
|
|
305
|
+
color: 'black',
|
|
306
|
+
},
|
|
307
|
+
});
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View, Text, TouchableOpacity, StyleSheet } from 'react-native';
|
|
3
|
+
import { isNU, notifyMessage } from '../CommonStyle/ComponentFunctions';
|
|
4
|
+
import { normalize } from '../CommonStyle/componentStyle';
|
|
5
|
+
import HOCIcons from '../HOC/HOCIcons';
|
|
6
|
+
|
|
7
|
+
export default function CAwesomeButton({ data, callBack }) {
|
|
8
|
+
|
|
9
|
+
const handlePress = () => {
|
|
10
|
+
if (data?.functionid != undefined) {
|
|
11
|
+
getCallBack(data);
|
|
12
|
+
} else {
|
|
13
|
+
notifyMessage('Incorporate soon', 5);
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
<TouchableOpacity
|
|
19
|
+
disabled={false}
|
|
20
|
+
onPress={handlePress}
|
|
21
|
+
style={[
|
|
22
|
+
styles.button,
|
|
23
|
+
{
|
|
24
|
+
borderRadius: 10,
|
|
25
|
+
borderWidth: 1,
|
|
26
|
+
height: normalize(40),
|
|
27
|
+
width: normalize(data?.width != undefined ? data?.width : 55),
|
|
28
|
+
backgroundColor: data?.shadowcolor != undefined ? data?.shadowcolor : '#f7efef',
|
|
29
|
+
borderColor: 'lightblue',
|
|
30
|
+
},
|
|
31
|
+
]}
|
|
32
|
+
>
|
|
33
|
+
<View style={styles.contentContainer}>
|
|
34
|
+
<HOCIcons.Icons
|
|
35
|
+
icongroup={isNU(data?.icongroup) ? data?.icongroup : 5}
|
|
36
|
+
name={data?.iconname != undefined ? data?.iconname : 'file'}
|
|
37
|
+
color={data?.iconcolor != undefined ? data?.iconcolor : 'white'}
|
|
38
|
+
size={data?.iconsize != undefined ? normalize(data?.iconsize) : normalize(20)}
|
|
39
|
+
style={styles.icon}
|
|
40
|
+
/>
|
|
41
|
+
<Text
|
|
42
|
+
numberOfLines={1}
|
|
43
|
+
style={[
|
|
44
|
+
styles.text,
|
|
45
|
+
{
|
|
46
|
+
width: isNU(data?.textwidth) ? normalize(data?.textwidth) : normalize(50),
|
|
47
|
+
color: data?.fontcolor != undefined ? data?.fontcolor : '#fff',
|
|
48
|
+
textAlign: data?.textAlign != undefined ? data?.textAlign : 'center',
|
|
49
|
+
fontSize: data?.size != undefined ? normalize(data?.size) : normalize(10),
|
|
50
|
+
fontWeight: data?.fontWeight != undefined ? data?.fontWeight : 'normal',
|
|
51
|
+
},
|
|
52
|
+
]}
|
|
53
|
+
>
|
|
54
|
+
{data?.displaytext != undefined ? data?.displaytext : ''}
|
|
55
|
+
</Text>
|
|
56
|
+
</View>
|
|
57
|
+
</TouchableOpacity>
|
|
58
|
+
);
|
|
59
|
+
|
|
60
|
+
function getCallBack(item) {
|
|
61
|
+
callBack(item);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
const styles = StyleSheet.create({
|
|
66
|
+
button: {
|
|
67
|
+
alignItems: 'center',
|
|
68
|
+
justifyContent: 'center',
|
|
69
|
+
paddingHorizontal: 0,
|
|
70
|
+
paddingBottom: 0,
|
|
71
|
+
paddingTop: 0,
|
|
72
|
+
},
|
|
73
|
+
contentContainer: {
|
|
74
|
+
alignItems: 'center',
|
|
75
|
+
justifyContent: 'center',
|
|
76
|
+
},
|
|
77
|
+
icon: {
|
|
78
|
+
// Add any additional icon styling here
|
|
79
|
+
},
|
|
80
|
+
text: {
|
|
81
|
+
// Base text styles if needed
|
|
82
|
+
},
|
|
83
|
+
});
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import React, { useState, useEffect } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Text,
|
|
4
|
+
View,
|
|
5
|
+
ScrollView,
|
|
6
|
+
Dimensions,
|
|
7
|
+
FlatList,
|
|
8
|
+
TouchableOpacity,
|
|
9
|
+
TextInput,
|
|
10
|
+
Alert,
|
|
11
|
+
} from 'react-native';
|
|
12
|
+
import AwesomeButton from 'react-native-really-awesome-button';
|
|
13
|
+
import { normalize } from '../Common/ComponentFunctions';
|
|
14
|
+
import HOCIcons from '../HOC/HOCIcons';
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
export default function CAwesomeMoreButtonLIS(props) {
|
|
18
|
+
|
|
19
|
+
return (
|
|
20
|
+
<AwesomeButton
|
|
21
|
+
onPress={() => { props.disablepress ? null : props.callback(props.data); }}
|
|
22
|
+
onLongPress={() => { props.enablelongpress ? props.callback(props.data) : null; }}
|
|
23
|
+
borderRadius={props.buttonstyle.borderRadius}
|
|
24
|
+
borderWidth={props.buttonstyle.borderWidth}
|
|
25
|
+
height={props.buttonstyle.height}
|
|
26
|
+
width={props.buttonstyle.width}
|
|
27
|
+
backgroundColor={props.buttonstyle.backgroundColor}
|
|
28
|
+
paddingHorizontal={props.buttonstyle.paddingHorizontal}
|
|
29
|
+
raiseLevel={2}
|
|
30
|
+
paddingBottom={props.buttonstyle.paddingBottom}
|
|
31
|
+
borderColor={props.buttonstyle.borderColor}
|
|
32
|
+
paddingTop={props.buttonstyle.paddingTop}
|
|
33
|
+
style={props.buttonstyle.style}
|
|
34
|
+
>
|
|
35
|
+
<View style={props.viewstyle}>
|
|
36
|
+
{props.icon ?
|
|
37
|
+
<HOCIcons.Icons
|
|
38
|
+
icongroup={props.icon.icongroup}
|
|
39
|
+
name={props.icon.name}
|
|
40
|
+
color={props.icon.color}
|
|
41
|
+
size={props.icon.size}
|
|
42
|
+
style={props.icon.style}
|
|
43
|
+
/>
|
|
44
|
+
: null}
|
|
45
|
+
{props.text ?
|
|
46
|
+
<Text adjustsFontSizeToFit style={props.text}>
|
|
47
|
+
{props.displaytext != null && props.displaytext != undefined ? props.displaytext : null}
|
|
48
|
+
</Text>
|
|
49
|
+
: null}
|
|
50
|
+
</View>
|
|
51
|
+
</AwesomeButton>
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
}
|