@jescon-technologies/react-native-ui-kit 0.0.3 → 0.0.5
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 +0 -4
- package/package.json +3 -34
- package/src/Alerts/AAlert.js +3 -3
- 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/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,136 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View, Text, TouchableOpacity } from 'react-native';
|
|
3
|
+
import { Swipeable } from 'react-native-gesture-handler';
|
|
4
|
+
import { Dimensions } from 'react-native';
|
|
5
|
+
import { normalize } from '../CommonStyle/componentStyle';
|
|
6
|
+
import { Icons } from '@jescon-technologies/react-native-ui-kit';;
|
|
7
|
+
|
|
8
|
+
const SwipableSupplierCard = ({ supplierDetails }) => {
|
|
9
|
+
const renderLeftActions = () => (
|
|
10
|
+
<TouchableOpacity
|
|
11
|
+
style={{
|
|
12
|
+
// flex: 1,
|
|
13
|
+
width: normalize(100),
|
|
14
|
+
// backgroundColor: '#4caf50',
|
|
15
|
+
justifyContent: 'center',
|
|
16
|
+
alignItems: 'center',
|
|
17
|
+
borderTopLeftRadius: 10,
|
|
18
|
+
borderBottomLeftRadius: 10,
|
|
19
|
+
}}
|
|
20
|
+
onPress={() => alert('Left action executed!')}
|
|
21
|
+
>
|
|
22
|
+
<Text style={{ color: '#000', fontWeight: 'bold' }}>Left Action</Text>
|
|
23
|
+
</TouchableOpacity>
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
const renderRightActions = () => (
|
|
27
|
+
<TouchableOpacity
|
|
28
|
+
style={{
|
|
29
|
+
// flex: 1,
|
|
30
|
+
width: normalize(100),
|
|
31
|
+
// backgroundColor: '#f44336',
|
|
32
|
+
justifyContent: 'center',
|
|
33
|
+
alignItems: 'center',
|
|
34
|
+
borderTopRightRadius: 10,
|
|
35
|
+
borderBottomRightRadius: 10,
|
|
36
|
+
}}
|
|
37
|
+
onPress={() => alert('Right action executed!')}
|
|
38
|
+
>
|
|
39
|
+
<Text style={{ color: '#000', fontWeight: 'bold' }}>Right Action</Text>
|
|
40
|
+
</TouchableOpacity>
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
return (
|
|
44
|
+
<Swipeable
|
|
45
|
+
renderLeftActions={renderLeftActions}
|
|
46
|
+
renderRightActions={renderRightActions}
|
|
47
|
+
leftThreshold={80}
|
|
48
|
+
rightThreshold={80}
|
|
49
|
+
overshootLeft={false}
|
|
50
|
+
overshootRight={false}
|
|
51
|
+
>
|
|
52
|
+
{/* Main card */}
|
|
53
|
+
<View
|
|
54
|
+
style={{
|
|
55
|
+
backgroundColor: '#fff',
|
|
56
|
+
padding: 10,
|
|
57
|
+
borderRadius: 10,
|
|
58
|
+
shadowColor: '#000',
|
|
59
|
+
shadowOpacity: 0.1,
|
|
60
|
+
shadowRadius: 5,
|
|
61
|
+
elevation: 3,
|
|
62
|
+
marginVertical: 5,
|
|
63
|
+
marginHorizontal: 1,
|
|
64
|
+
borderLeftWidth: 3,
|
|
65
|
+
borderLeftColor: '#094485',
|
|
66
|
+
flexDirection: 'row',
|
|
67
|
+
justifyContent: 'space-between',
|
|
68
|
+
}}
|
|
69
|
+
>
|
|
70
|
+
<View style={{ width: '75%' }}>
|
|
71
|
+
{supplierDetails?.invoiceno && (
|
|
72
|
+
<View style={{ flexDirection: 'row', alignItems: 'center', marginBottom: normalize(5) }}>
|
|
73
|
+
<Icons.FontAwesome5
|
|
74
|
+
name="file-invoice"
|
|
75
|
+
size={normalize(12)}
|
|
76
|
+
color="#094485"
|
|
77
|
+
/>
|
|
78
|
+
<Text style={{ fontSize: 16, fontWeight: 'bold', color: '#000', marginLeft: normalize(5) }}>
|
|
79
|
+
{supplierDetails.invoiceno}
|
|
80
|
+
</Text>
|
|
81
|
+
</View>
|
|
82
|
+
)}
|
|
83
|
+
|
|
84
|
+
{supplierDetails?.email && (
|
|
85
|
+
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
|
|
86
|
+
<Icons.FontAwesome5
|
|
87
|
+
name="envelope"
|
|
88
|
+
size={normalize(12)}
|
|
89
|
+
color="#094485"
|
|
90
|
+
/>
|
|
91
|
+
<Text style={{ fontSize: 14, fontWeight: '500', color: '#333', marginLeft: normalize(5) }}>
|
|
92
|
+
{supplierDetails.email}
|
|
93
|
+
</Text>
|
|
94
|
+
</View>
|
|
95
|
+
)}
|
|
96
|
+
|
|
97
|
+
{supplierDetails?.companyaddress && (
|
|
98
|
+
<View style={{ flexDirection: 'row', alignItems: 'flex-start' }}>
|
|
99
|
+
<Icons.FontAwesome5
|
|
100
|
+
name="map-marker-alt"
|
|
101
|
+
size={normalize(12)}
|
|
102
|
+
color="#094485"
|
|
103
|
+
/>
|
|
104
|
+
<Text
|
|
105
|
+
style={{ fontSize: 14, fontWeight: '500', color: '#333', marginLeft: normalize(5), maxWidth: '100%' }}
|
|
106
|
+
>
|
|
107
|
+
{supplierDetails.companyaddress}
|
|
108
|
+
</Text>
|
|
109
|
+
</View>
|
|
110
|
+
)}
|
|
111
|
+
</View>
|
|
112
|
+
<View>
|
|
113
|
+
{supplierDetails?.grade && (
|
|
114
|
+
<View
|
|
115
|
+
style={{
|
|
116
|
+
height: 60,
|
|
117
|
+
width: 60,
|
|
118
|
+
backgroundColor: 'lightgrey',
|
|
119
|
+
borderRadius: 30,
|
|
120
|
+
justifyContent: 'center',
|
|
121
|
+
alignItems: 'center',
|
|
122
|
+
}}
|
|
123
|
+
>
|
|
124
|
+
<Text style={{ fontSize: 20, fontWeight: 'bold', color: '#094485' }}>
|
|
125
|
+
{supplierDetails.grade}
|
|
126
|
+
</Text>
|
|
127
|
+
<Text style={{ fontSize: 12 }}>Grade</Text>
|
|
128
|
+
</View>
|
|
129
|
+
)}
|
|
130
|
+
</View>
|
|
131
|
+
</View>
|
|
132
|
+
</Swipeable>
|
|
133
|
+
);
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
export default SwipableSupplierCard;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
import CSingleEditor from '../CustomComponents/CSingleEditor';
|
|
4
|
+
import CContainerView from '../CustomComponents/CContainerView';
|
|
5
|
+
import CDetailView from '../CustomComponents/CDetailView';
|
|
6
|
+
import HeaderBlock from '../Screens/HeaderBlock';
|
|
7
|
+
|
|
8
|
+
export default function TagTemplate() {
|
|
9
|
+
const [text,setText] = useState('');
|
|
10
|
+
const [editorData, setEditorData] = useState([
|
|
11
|
+
{
|
|
12
|
+
componentname: 'header',
|
|
13
|
+
value: '<p>Sample Header</p>',
|
|
14
|
+
toolbarview: false,
|
|
15
|
+
idlist: [], // Add idlist for tag variables
|
|
16
|
+
},
|
|
17
|
+
// {
|
|
18
|
+
// componentname: 'content',
|
|
19
|
+
// value: '<p>Sample Content</p>',
|
|
20
|
+
// toolbarview: false,
|
|
21
|
+
// idlist: [], // Add idlist for tag variables
|
|
22
|
+
// },
|
|
23
|
+
]);
|
|
24
|
+
|
|
25
|
+
const handleEditorChange = (newValue, index) => {
|
|
26
|
+
setEditorData(prevData => {
|
|
27
|
+
const updatedData = [...prevData];
|
|
28
|
+
updatedData[index] = { ...updatedData[index], value: newValue };
|
|
29
|
+
return updatedData;
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const handleToolbarView = (val, index) => {
|
|
34
|
+
setEditorData(prevData => {
|
|
35
|
+
const updatedData = prevData.map((item, i) => ({
|
|
36
|
+
...item,
|
|
37
|
+
toolbarview: i === index ? val : false,
|
|
38
|
+
}));
|
|
39
|
+
return updatedData;
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
const handleIdListChange = (idlist, index) => {
|
|
44
|
+
setEditorData(prevData => {
|
|
45
|
+
const updatedData = [...prevData];
|
|
46
|
+
updatedData[index] = { ...updatedData[index], idlist };
|
|
47
|
+
return updatedData;
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
return (
|
|
52
|
+
<CContainerView>
|
|
53
|
+
<HeaderBlock />
|
|
54
|
+
<CDetailView>
|
|
55
|
+
<View style={{ flex: 1 }}>
|
|
56
|
+
{editorData.map((item, index) => (
|
|
57
|
+
<CSingleEditor
|
|
58
|
+
textinput={true}
|
|
59
|
+
inputcallback={setText}
|
|
60
|
+
more={true}
|
|
61
|
+
key={index}
|
|
62
|
+
data={item}
|
|
63
|
+
callback={newValue => handleEditorChange(newValue, index)}
|
|
64
|
+
toolbarview={val => handleToolbarView(val, index)}
|
|
65
|
+
idlistcallback={idlist => handleIdListChange(idlist, index)} // Pass idlist callback
|
|
66
|
+
variables={true} // Enable variables
|
|
67
|
+
showvariables={true} // Show variables
|
|
68
|
+
/>
|
|
69
|
+
))}
|
|
70
|
+
</View>
|
|
71
|
+
</CDetailView>
|
|
72
|
+
</CContainerView>
|
|
73
|
+
);
|
|
74
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View, StyleSheet } from 'react-native';
|
|
3
|
+
import HeaderBlock from '../Screens/HeaderBlock';
|
|
4
|
+
import HView from '../HOC/HView'; // Import HView for dynamic component rendering
|
|
5
|
+
|
|
6
|
+
const WrappedComponent = ({ route }) => {
|
|
7
|
+
const { component, data } = route.params;
|
|
8
|
+
|
|
9
|
+
return (
|
|
10
|
+
<View style={styles.container}>
|
|
11
|
+
{console.log('WrappedComponent received component:', component)}
|
|
12
|
+
<HeaderBlock />
|
|
13
|
+
{component ? <HView component={component} optiondata={data} /> : null}
|
|
14
|
+
</View>
|
|
15
|
+
);
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const styles = StyleSheet.create({
|
|
19
|
+
container: {
|
|
20
|
+
flex: 1,
|
|
21
|
+
backgroundColor: '#fff',
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
export default WrappedComponent;
|