@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,251 +0,0 @@
1
- import React, { useContext, useState, useEffect } from 'react';
2
- import { View, Text, TouchableOpacity, FlatList, TextInput, Platform, BackHandler } from 'react-native';
3
- import HOCIcons from '../HOC/HOCIcons';
4
- import { normalize } from '../CommonStyle/componentStyle';
5
-
6
-
7
- import { Global } from '../../../../../src/Common/Global';
8
- import CContainerView from '../CustomComponents/CContainerView';
9
- import CDetailView from '../CustomComponents/CDetailView';
10
- import HeaderBlock from '../Screens/HeaderBlock';
11
- import {useNavigation } from '../Navigation/useNavigation';
12
-
13
- const MoreOptionsScreen = () => {
14
- const navigation = useNavigation();
15
-
16
- useEffect(() => {
17
- const onBackPress = () => {
18
- if (navigation && navigation.canGoBack && navigation.canGoBack()) {
19
- navigation.goBack();
20
- return true;
21
- }
22
- // Prevent closing the app from this screen on back press
23
- return true;
24
- };
25
-
26
- const backHandler = BackHandler.addEventListener('hardwareBackPress', onBackPress);
27
- return () => backHandler.remove();
28
- }, [navigation]);
29
-
30
- // const navigation = useNavigation();
31
- const optionList = Global.userOptionList || []; // Get the OptionList from Global
32
- // { console.log('xxxxxxxxxxxxxxxxxxxxx', JSON.stringify(optionList)) }
33
- const [searchQuery, setSearchQuery] = useState(''); // State for search query
34
- // const [filteredOptions, setFilteredOptions] = useState(optionList); // State for filtered options
35
- const productSection = optionList.find(section => section.suoption === 31900);
36
-
37
- let filteredOptionList = optionList;
38
-
39
- // If found, filter its optiondetail
40
- if (productSection) {
41
- // Remove the item with suoptiondetail === 800091
42
- const newOptionDetail = productSection.optiondetail.filter(
43
- option => option.suoptiondetail !== 800091
44
- );
45
-
46
- // Map through optionList and update the product section
47
- filteredOptionList = optionList.map(section =>
48
- section.suoption === 31900
49
- ? { ...section, optiondetail: newOptionDetail }
50
- : section
51
- );
52
- }
53
-
54
- // Now use filteredOptionList instead of optionList for your state
55
- const [filteredOptions, setFilteredOptions] = useState(filteredOptionList);
56
-
57
- // Function to handle search
58
- const handleSearch = (query) => {
59
- setSearchQuery(query);
60
-
61
- if (query.trim() === '') {
62
- setFilteredOptions(optionList); // Reset to original list if query is empty
63
- } else {
64
- const filtered = optionList.map((section) => ({
65
- ...section,
66
- optiondetail: section.optiondetail.filter((option) =>
67
- option.display.toLowerCase().includes(query.toLowerCase())
68
- ),
69
- })).filter((section) => section.optiondetail.length > 0); // Remove empty sections
70
-
71
- setFilteredOptions(filtered);
72
- }
73
- };
74
-
75
- // Function to handle navigation when an option is clicked
76
- const handleOptionPress = (option) => {
77
- if (option.component) {
78
- navigation.navigate('WrappedComponent', { component: option.component, data: option });
79
- console.log('Navigating to component:', option.component, 'with data:', JSON.stringify(option));
80
- }
81
- };
82
-
83
- function CShadowDynamic(offsetX, offsetY, blurRadius, spreadDistance, color) {
84
- const isAndroidBelow9 = Platform.OS === 'android' && Platform.Version < 28;
85
- return isAndroidBelow9
86
- ? {
87
- elevation: 10,
88
- shadowColor: color || Global.AppTheme.primary_color,
89
- shadowOffset: { width: offsetX, height: offsetY },
90
- shadowOpacity: 0.3,
91
- shadowRadius: blurRadius,
92
- }
93
- : {
94
- boxShadow: `${offsetX}px ${offsetY}px ${blurRadius}px ${spreadDistance}px ${color}`,
95
- };
96
- }
97
-
98
- // Render each section
99
- const renderSection = ({ item }) => (
100
- <View
101
- style={{
102
- // margin:normalize(10),
103
- // marginBottom: normalize(15),
104
- // // borderWidth:normalize(3),
105
- // // borderColor: '#ccc',
106
- // borderRadius: normalize(10),
107
- // padding: normalize(5),
108
- // backgroundColor: '#f9f9f9', // Light background for the section
109
- // ...CShadowDynamic(-3, 3, 5, 0, '#ccc'), // Apply shadow dynamically
110
-
111
- marginHorizontal: normalize(10),
112
- marginTop: normalize(10),
113
- marginBottom: normalize(20),
114
- borderRadius: normalize(14),
115
- paddingVertical: normalize(12),
116
- paddingHorizontal: normalize(10),
117
- backgroundColor: '#fcfcfe', // Slightly lighter for contrast
118
- borderWidth: 1,
119
- borderColor: '#e3e6ee', // Subtle border
120
- ...CShadowDynamic(0, 2, 8, 0, '#e3e6ee'), // Softer shadow
121
-
122
- }}
123
- >
124
- {/* Section Title */}
125
- <Text
126
- style={{
127
- fontSize: normalize(16),
128
- fontWeight: 'bold',
129
- color: '#094485',
130
- marginBottom: normalize(10),
131
- }}
132
- >
133
- {item.display}
134
- </Text>
135
-
136
- {/* Render Options */}
137
- <FlatList
138
- data={item.optiondetail}
139
- keyExtractor={(option) => option.suoptiondetail.toString()}
140
- numColumns={3} // Display items in a grid-like structure
141
- columnWrapperStyle={{
142
- justifyContent: 'flex-start', // Align items to the start
143
- gap: normalize(10), // Add a simple gap between items
144
- }}
145
- renderItem={({ item: option }) => (
146
- <TouchableOpacity
147
- disabled={false} // You can make this dynamic if needed
148
- onPress={() => handleOptionPress(option)}
149
- style={{
150
- width: '25%', // Reduce the width to fit multiple items in a row
151
- flexDirection: 'column', // Stack icon and text vertically
152
- alignItems: 'center',
153
- justifyContent: 'center',
154
- padding: normalize(10),
155
- margin: normalize(5), // Add margin for spacing between items
156
- backgroundColor: 'white', // Dynamic background color
157
- borderRadius: normalize(10), // Rounded corners
158
- ...CShadowDynamic(-3, 3, 5, 0, option.color || Global.AppTheme.primary_color), // Apply shadow dynamically
159
- }}
160
- >
161
- {/* Icon */}
162
- <HOCIcons.Icons
163
- icongroup={option.icongroup || 3}
164
- name={option.icon || 'file'}
165
- color={option.color || '#303030'}
166
- size={normalize(30)} // Increase icon size
167
- style={{
168
- marginBottom: normalize(5), // Add spacing between icon and text
169
- }}
170
- />
171
- {/* Text */}
172
- <Text
173
- style={{
174
- fontSize: normalize(9), // Make text smaller
175
- color: 'black' || option.color || '#303030',
176
- fontWeight: 'bold', // Bold text
177
- textAlign: 'center',
178
- maxWidth: normalize(60), // Limit text width
179
- }}
180
- numberOfLines={2} // Ensure text is displayed in a single line
181
- ellipsizeMode="tail" // Add ellipsis if text overflows
182
- >
183
- {option.display}
184
- </Text>
185
- </TouchableOpacity>
186
- )}
187
- />
188
- </View>
189
- );
190
-
191
- return (
192
- <CContainerView>
193
- <HeaderBlock />
194
- <CDetailView>
195
- <View
196
- style={{
197
- flex: 1,
198
- backgroundColor: '#fff',
199
- // padding: normalize(10),
200
- }}
201
- >
202
- {/* Search Bar */}
203
- <View
204
- style={{
205
- flexDirection: 'row',
206
- alignItems: 'center',
207
- height: normalize(40),
208
- borderColor: '#ccc',
209
- borderWidth: 1,
210
- borderRadius: normalize(10),
211
- paddingHorizontal: normalize(10),
212
- marginBottom: normalize(15),
213
- backgroundColor: '#f9f9f9', // Light background for the search bar
214
- }}
215
- >
216
- <HOCIcons.Icons
217
- icongroup={3}
218
- name="magnify" // Search icon
219
- color="#888" // Icon color
220
- size={normalize(20)}
221
- style={{
222
- marginRight: normalize(10),
223
- }}
224
- />
225
- <TextInput
226
- value={searchQuery}
227
- onChangeText={handleSearch}
228
- placeholder="Search options..."
229
- placeholderTextColor="#888" // Placeholder color
230
- style={{
231
- flex: 1,
232
- fontSize: normalize(14),
233
- color: '#333',
234
- }}
235
- />
236
- </View>
237
- {console.log('WWWWWWWWWWWWWWWWWWWWWW', JSON.stringify(filteredOptions))
238
- }
239
- {/* Render Sections */}
240
- <FlatList
241
- data={filteredOptions}
242
- keyExtractor={(item) => item.suoption.toString()}
243
- renderItem={renderSection}
244
- />
245
- </View>
246
- </CDetailView>
247
- </CContainerView>
248
- );
249
- };
250
-
251
- export default MoreOptionsScreen;
@@ -1,226 +0,0 @@
1
- import React from 'react';
2
- import { View, Text, TouchableOpacity } from 'react-native';
3
- import { normalize } from '../CommonStyle/componentStyle';
4
- import { Global } from '../../../../../src/Common/Global';
5
- import { CButtonShadow, isNUQ } from '../CommonStyle/ComponentFunctions';
6
- import { useNavigation } from '../Navigation/useNavigation';
7
-
8
- import { SwipeRow } from 'react-native-swipe-list-view';
9
-
10
-
11
- const NonSwipableProductCard = ({ data }) => {
12
- const navigation = useNavigation();
13
-
14
- const renderLeftActions = () => (
15
- <View style={{
16
- // flex: 1,
17
- // width: normalize(100),
18
- // backgroundColor: '#4caf50',
19
- justifyContent: 'flex-start',
20
- alignItems: 'flex-start',
21
- borderTopLeftRadius: 10,
22
- borderBottomLeftRadius: 10,
23
- flexDirection: 'row',
24
- paddingHorizontal: normalize(10),
25
- }}>
26
- {/* Marketing division */}
27
- <TouchableOpacity
28
- style={{
29
- // // flex: 1,
30
- // width: normalize(100),
31
- // // backgroundColor: '#4caf50',
32
- // justifyContent: 'flex-start',
33
- // alignItems: 'center',
34
- // borderTopLeftRadius: 10,
35
- // borderBottomLeftRadius: 10,
36
- marginLeft: normalize(5),
37
- }}
38
- onPress={() => console.log('left')}
39
- >
40
- {/* {!leftAction && <View style={{
41
- backgroundColor: '#f4f5ae',
42
- justifyContent: 'center',
43
- alignItems: 'center',
44
- ...CButtonShadow(),
45
- borderRadius: normalize(5),
46
- paddingHorizontal: normalize(3),
47
- paddingVertical: normalize(5),
48
- height: normalize(38),
49
- width: normalize(38)
50
- }}>
51
- <HOCIcons.MaterialCommunityIcons
52
- name={'office-building'}
53
- size={normalize(20)}
54
- color={Global.AppTheme.primary_color}
55
- />
56
- <Text numberOfLines={1} style={{ fontSize: normalize(8), fontWeight: 'bold', color: Global.AppTheme.primary_color }}>Division</Text>
57
- </View>
58
- } */}
59
- {/* {leftAction &&
60
- <View style={{
61
- backgroundColor: '#f4f5ae',
62
- justifyContent: 'center',
63
- alignItems: 'center',
64
- ...CButtonShadow(),
65
- borderRadius: normalize(5),
66
- paddingHorizontal: normalize(3),
67
- paddingVertical: normalize(5),
68
- height: normalize(38),
69
- width: normalize(38)
70
- }}>
71
- <Text style={{ fontSize: normalize(9), fontWeight: 'bold', color: Global.AppTheme.primary_color }}>{data?.marketingdivisionname}</Text>
72
- </View>
73
- } */}
74
- </TouchableOpacity>
75
- {/* Tax name */}
76
- <TouchableOpacity
77
- style={{
78
- // // flex: 1,
79
- // width: normalize(100),
80
- // // backgroundColor: '#4caf50',
81
- // justifyContent: 'flex-start',
82
- // alignItems: 'center',
83
- // borderTopLeftRadius: 10,
84
- // borderBottomLeftRadius: 10,
85
- marginLeft: normalize(5),
86
- }}
87
- onPress={() => console.log('left')}
88
- >
89
- {/* {!secondAction && <View style={{
90
- backgroundColor: '#f5bfae',
91
- justifyContent: 'center',
92
- alignItems: 'center',
93
- ...CButtonShadow(),
94
- borderRadius: normalize(5),
95
- paddingHorizontal: normalize(3),
96
- paddingVertical: normalize(5),
97
- height: normalize(38),
98
- width: normalize(38)
99
- }}>
100
- <HOCIcons.MaterialCommunityIcons
101
- name={'brightness-percent'}
102
- size={normalize(20)}
103
- color={Global.AppTheme.primary_color}
104
- />
105
- <Text numberOfLines={1} style={{ fontSize: normalize(8), fontWeight: 'bold', color: Global.AppTheme.primary_color }}>Tax Name</Text>
106
- </View>
107
- } */}
108
- {/* {secondAction &&
109
- <View style={{
110
- backgroundColor: '#f5bfae',
111
- justifyContent: 'center',
112
- alignItems: 'center',
113
- ...CButtonShadow(),
114
- borderRadius: normalize(5),
115
- paddingHorizontal: normalize(3),
116
- paddingVertical: normalize(5),
117
- height: normalize(38),
118
- width: normalize(38)
119
- }}>
120
- <Text style={{ fontSize: normalize(9), fontWeight: 'bold', color: Global.AppTheme.primary_color }}>{data?.taxname}</Text>
121
- </View>
122
- } */}
123
- </TouchableOpacity>
124
- </View>
125
- );
126
-
127
- const renderRightActions = () => (
128
- <TouchableOpacity
129
- style={{
130
- // flex: 1,
131
- width: normalize(100),
132
- // backgroundColor: '#f44336',
133
- justifyContent: 'center',
134
- alignItems: 'center',
135
- borderTopRightRadius: 10,
136
- borderBottomRightRadius: 10,
137
- }}
138
- onPress={() => console.log('Right action')}
139
- >
140
- {/* <Text style={{ color: '#000', fontWeight: 'bold' }}>{data?.taxname}</Text> */}
141
- </TouchableOpacity>
142
- );
143
-
144
- return (
145
- <SwipeRow
146
- disableLeftSwipe={false}
147
- disableRightSwipe={false}
148
- leftOpenValue={190}
149
- rightOpenValue={-190}
150
- swipeToClosePercent={10}
151
- swipeToOpenPercent={10}
152
- >
153
- {/* Hidden Row (Swipe Actions) */}
154
- <View style={{
155
- borderWidth: 0,
156
- flexDirection: 'row',
157
- justifyContent: 'space-between',
158
- minHeight: normalize(70),
159
- }}>
160
- <View style={{ flex: 1, alignItems: 'flex-start' }}>
161
- {renderLeftActions && renderLeftActions(data)}
162
- </View>
163
- <View style={{ flex: 1, alignItems: 'flex-end' }}>
164
- {renderRightActions && renderRightActions(data)}
165
- </View>
166
- </View>
167
- <View
168
- style={{
169
- padding: normalize(5),
170
- marginVertical: 5,
171
- marginHorizontal: normalize(10),
172
- backgroundColor: '#ebf1fa',
173
- borderRadius: normalize(5),
174
- shadowColor: Global.AppTheme.primary_color,
175
- shadowOffset: { width: 4, height: 4 },
176
- shadowOpacity: 0.6,
177
- shadowRadius: 10,
178
- elevation: 8,
179
- ...CButtonShadow(),
180
- borderLeftWidth: normalize(10),
181
- borderLeftColor: isNUQ(data?.color) ? data?.color : '#FF8C33',
182
- }}>
183
- <View>
184
- {/* Product Name */}
185
- {isNUQ(data?.productname) && (
186
- <Text
187
- numberOfLines={1}
188
- style={{
189
- fontSize: normalize(13),
190
- fontWeight: 'bold',
191
- color: Global.AppTheme.primary_color,
192
- marginBottom: normalize(5),
193
- }}>
194
- {data.productname}
195
- </Text>
196
- )}
197
- {/* Marketing Division */}
198
- {isNUQ(data?.marketingdivisionname) && (
199
- <Text
200
- numberOfLines={1}
201
- style={{
202
- fontSize: normalize(11),
203
- color: '#555',
204
- marginBottom: normalize(3),
205
- }}>
206
- Marketing Division: {data.marketingdivisionname}
207
- </Text>
208
- )}
209
- {/* Manufacturer Division */}
210
- {isNUQ(data?.manufacturerdivisionname) && (
211
- <Text
212
- numberOfLines={1}
213
- style={{
214
- fontSize: normalize(11),
215
- color: '#555',
216
- }}>
217
- Manufacturer Division: {data.manufacturerdivisionname}
218
- </Text>
219
- )}
220
- </View>
221
- </View>
222
- </SwipeRow>
223
- );
224
- };
225
-
226
- export default NonSwipableProductCard;