@jescon-technologies/react-native-ui-kit 0.0.4 → 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.
Files changed (177) hide show
  1. package/index.d.ts +66 -0
  2. package/index.js +0 -4
  3. package/package.json +3 -2
  4. package/src/Alerts/AAlert.js +3 -3
  5. package/src/Alerts/AAlertIOS.js +3 -3
  6. package/src/{common → Common}/NetworkServiceCall.js +1 -1
  7. package/src/CommonStyle/CommonTheme.js +11 -0
  8. package/src/CommonStyle/ComponentFunctions.js +632 -0
  9. package/src/CommonStyle/PopupStyle.js +146 -0
  10. package/src/CommonStyle/commonStyle.js +93 -0
  11. package/src/CommonStyle/componentStyle.js +545 -0
  12. package/src/CommonStyle/optionListStyles.js +175 -0
  13. package/src/Components/ByProductPage.js +200 -0
  14. package/src/Components/CDropDownListNew.js +153 -0
  15. package/src/Components/CSupplierList.js +88 -0
  16. package/src/Components/CVerificationCard.js +2822 -0
  17. package/src/Components/CustomButton.js +67 -0
  18. package/src/Components/CustomCard.js +127 -0
  19. package/src/Components/CustomTextInput.js +47 -0
  20. package/src/Components/EquipmentPage.js +313 -0
  21. package/src/Components/FilterInput.Copy.js +723 -0
  22. package/src/Components/FilterInput.js +569 -0
  23. package/src/Components/HSubHeading.js +68 -0
  24. package/src/Components/HeaderCard.js +40 -0
  25. package/src/Components/MoreOptionsScreen.js +251 -0
  26. package/src/Components/NonSwipableProductCard.js +226 -0
  27. package/src/Components/NonSwipableSupplierCard.js +348 -0
  28. package/src/Components/ProductCard.js +1336 -0
  29. package/src/Components/QualityProductCard.js +1059 -0
  30. package/src/Components/RateProductCard.js +1452 -0
  31. package/src/Components/RawMaterial.js +261 -0
  32. package/src/Components/SDropDownEdited.js +549 -0
  33. package/src/Components/SDropDownNew.js +529 -0
  34. package/src/Components/SHelpDescription.js +147 -0
  35. package/src/Components/STextInputNew.js +510 -0
  36. package/src/Components/SearchProductCard.js +470 -0
  37. package/src/Components/StageByProduct.js +199 -0
  38. package/src/Components/SupplierCard.js +243 -0
  39. package/src/Components/SupplierInvoiceCard.js +405 -0
  40. package/src/Components/SwipableSupplierCard.js +136 -0
  41. package/src/Components/TagTemplate.js +74 -0
  42. package/src/Components/WrappedComponent.js +25 -0
  43. package/src/Custom/CBooking.js +944 -0
  44. package/src/Custom/CBookingPostpone.js +1822 -0
  45. package/src/Custom/CCalendar.js +560 -0
  46. package/src/Custom/CCard.js +880 -0
  47. package/src/Custom/CDetailCard.js +205 -0
  48. package/src/Custom/CHelpImage.js +52 -0
  49. package/src/Custom/CReport.js +569 -0
  50. package/src/Custom/CScrollView.js +73 -0
  51. package/src/Custom/CSignature.js +112 -0
  52. package/src/Custom/CSliderMenu.js +339 -0
  53. package/src/Custom/CSupplierCard.js +99 -0
  54. package/src/Custom/CTemplateCard.js +438 -0
  55. package/src/Custom/CTokenAllocation.js +1402 -0
  56. package/src/Custom/CTokenListOverlay.js +122 -0
  57. package/src/Custom/CWardStatus.js +444 -0
  58. package/src/Custom/Charts/CBarChart.js +218 -0
  59. package/src/Custom/Charts/CDashBoardList.js +133 -0
  60. package/src/Custom/Charts/CDashBoardTable.js +172 -0
  61. package/src/Custom/Charts/CLineChart.js +193 -0
  62. package/src/Custom/Charts/CPieChart.js +186 -0
  63. package/src/Custom/Loader.js +182 -0
  64. package/src/Custom/OUserView.js +1121 -0
  65. package/src/Custom/PreviewDosage.js +115 -0
  66. package/src/Custom/SearchLoader.js +32 -0
  67. package/src/Custom/TableComponent/CActivityTable.js +707 -0
  68. package/src/Custom/TableComponent/CMoreButtonTable.js +197 -0
  69. package/src/Custom/TableComponent/CTable.js +185 -0
  70. package/src/Custom/TableComponent/CTextBody.js +40 -0
  71. package/src/Custom/TableComponent/CTextHeader.js +17 -0
  72. package/src/Custom/TableComponent/PreviewPrescriptionNew.js +1011 -0
  73. package/src/Custom/TableComponent/SDropdownTable.js +491 -0
  74. package/src/Custom/TableComponent/TagTable.js +1200 -0
  75. package/src/CustomComponents/CAddColumn.js +140 -0
  76. package/src/CustomComponents/CAssessmentDelete.js +307 -0
  77. package/src/CustomComponents/CAwesomeButton.js +83 -0
  78. package/src/CustomComponents/CAwesomeMoreButton.js +54 -0
  79. package/src/CustomComponents/CBackHandler.js +273 -0
  80. package/src/CustomComponents/CCalendar.js +243 -0
  81. package/src/CustomComponents/CCommentOverlay.js +202 -0
  82. package/src/CustomComponents/CComments.js +162 -0
  83. package/src/CustomComponents/CContainerView.js +24 -0
  84. package/src/CustomComponents/CCustomTextInput.js +336 -0
  85. package/src/CustomComponents/CDetailView.js +40 -0
  86. package/src/CustomComponents/CDropDownList.js +153 -0
  87. package/src/CustomComponents/CDropdownSelect.js +555 -0
  88. package/src/CustomComponents/CFooterView.js +42 -0
  89. package/src/CustomComponents/CImagePickerSave.js +316 -0
  90. package/src/CustomComponents/CModalOverlay.js +91 -0
  91. package/src/CustomComponents/CNetworkStatus.js +327 -0
  92. package/src/CustomComponents/CNotesInstructions.js +1000 -0
  93. package/src/CustomComponents/COverlay.js +81 -0
  94. package/src/CustomComponents/CRemarks.js +176 -0
  95. package/src/CustomComponents/CRowAdd.js +143 -0
  96. package/src/CustomComponents/CSummaryDropDown.js +327 -0
  97. package/src/CustomComponents/CText.js +9 -0
  98. package/src/CustomComponents/CVectorIcon.js +34 -0
  99. package/src/CustomComponents/HtmlContentViewer.js +65 -0
  100. package/src/CustomComponents/PdfContentViewer.js +90 -0
  101. package/src/CustomComponents/SDropDownDosage.js +1087 -0
  102. package/src/CustomComponents/SwipableProductCard.js +246 -0
  103. package/src/CustomComponents/SwipableProductImageCard.js +254 -0
  104. package/src/CustomComponents/WorkOrderDetails.js +1216 -0
  105. package/src/CustomComponents/WorkOrderDetailsPage.js +1213 -0
  106. package/src/HOC/ConfirmOverlay.js +2 -2
  107. package/src/HOC/HMoreButton.js +1 -1
  108. package/src/HOC/HNatureHeading.js +1 -1
  109. package/src/HOC/HShadowButton.js +1 -1
  110. package/src/HOC/HShadowCountButton.js +1 -1
  111. package/src/Json/Chart.json +818 -0
  112. package/src/Json/Consultation.json +622 -0
  113. package/src/Json/CreditBill.json +490 -0
  114. package/src/Json/Dropdown.json +216 -0
  115. package/src/Json/DropdownConsultation.json +228 -0
  116. package/src/Json/DynamicReports.json +623 -0
  117. package/src/Json/Footer.json +79 -0
  118. package/src/Media/AudioScreen.js +2 -7
  119. package/src/Media/CCaptureImageWithoutEdit.js +1 -1
  120. package/src/Media/CImageGallery.js +2 -2
  121. package/src/Media/CSingleImage.js +2 -2
  122. package/src/Media/CVideoPlay.js +1 -1
  123. package/src/Media/DocumentScreen.js +2 -7
  124. package/src/Media/DrawingScreen.js +2 -6
  125. package/src/Media/ImageScreen.js +2 -6
  126. package/src/Media/VideoScreen.js +2 -7
  127. package/src/Navigation/PageNavigation.js +224 -0
  128. package/src/Navigation/useFocusEffect.js +2 -0
  129. package/src/Navigation/useFocusEffect.native.js +1 -0
  130. package/src/Navigation/useFocusEffect.web.js +1 -0
  131. package/src/Navigation/useIsFocused.js +1 -0
  132. package/src/Navigation/useIsFocused.native.js +1 -0
  133. package/src/Navigation/useIsFocused.web.js +1 -0
  134. package/src/Navigation/useNavigation.js +2 -0
  135. package/src/Navigation/useNavigation.native.js +1 -0
  136. package/src/Navigation/useNavigation.web.js +1 -0
  137. package/src/Screens/CMedications.js +528 -0
  138. package/src/Screens/CWebViewGallery.js +203 -0
  139. package/src/Screens/ChartScan.js +279 -0
  140. package/src/Screens/ChartScreenNew.js +1579 -0
  141. package/src/Screens/Consultation.js +1500 -0
  142. package/src/Screens/Dashboard.js +778 -0
  143. package/src/Screens/FileExplorer.js +288 -0
  144. package/src/Screens/Footer.js +340 -0
  145. package/src/Screens/ForgotPassword.js +288 -0
  146. package/src/Screens/HeaderBlock.js +353 -0
  147. package/src/Screens/Login.js +328 -0
  148. package/src/Screens/Notification.js +149 -0
  149. package/src/Screens/OcrScreen.js +20 -0
  150. package/src/Screens/PdfPreview.js +507 -0
  151. package/src/Screens/RegistrationDetails.js +467 -0
  152. package/src/Screens/SearchScreen.js +582 -0
  153. package/src/Screens/Splash.js +788 -0
  154. package/src/Screens/SwipeLeftView.js +1867 -0
  155. package/src/StaticComponents/SDatePickerLabel.js +1 -1
  156. package/src/StaticComponents/SDatePickerNew.js +1 -1
  157. package/src/StaticComponents/SDateTimePickerNew.js +2 -2
  158. package/src/StaticComponents/SDropDownGenerate.js +3 -3
  159. package/src/StaticComponents/SDropDownHoc.js +4 -4
  160. package/src/StaticComponents/SDropDownIcon.js +1 -1
  161. package/src/StaticComponents/SMenuBox.js +2 -2
  162. package/src/StaticComponents/SSearch.js +2 -2
  163. package/src/StaticComponents/STextInput.js +1 -1
  164. package/src/StaticComponents/STimePicker.js +1 -1
  165. package/src/StaticComponents/STimingDropDownNew.js +2 -6
  166. package/src/StaticComponents/STimingSwitch.js +1 -1
  167. package/src/layout/CContainerView.js +1 -1
  168. package/src/layout/CDetailView.js +3 -3
  169. package/src/layout/HeaderBlock.js +5 -5
  170. package/src/layout/INVLoginLayout.js +3 -4
  171. package/src/layout/Loader.js +2 -2
  172. package/src/HOC/HAbsolute.js +0 -56
  173. package/src/HOC/HDiscontinue.js +0 -105
  174. package/src/HOC/HOverlay.js +0 -99
  175. package/src/layout/FooterBlock.js +0 -821
  176. /package/src/{common → Common}/ErrorBoundary.tsx +0 -0
  177. /package/src/{common → Common}/Icons.js +0 -0
@@ -1,821 +0,0 @@
1
- import React, { useState, useRef, useEffect } from 'react';
2
- import {
3
- View,
4
- TouchableOpacity,
5
- Text,
6
- ScrollView,
7
- Dimensions,
8
- TouchableHighlight,
9
- Pressable,
10
- FlatList,
11
- Platform,
12
- } from 'react-native';
13
- import {
14
- Menu,
15
- MenuOptions,
16
- MenuOption,
17
- MenuTrigger,
18
- } from 'react-native-popup-menu';
19
- import CText from '../CustomComponents/CText';
20
- import HOCIcons from '../HOC/HOCIcons';
21
- import themes from '../CommonStyle/CommonTheme';
22
- import { normalize } from '../CommonStyle/componentStyle';
23
- import { isBNUL } from '../CommonStyle/ComponentFunctions';
24
- import CAwesomeButtonLIS from '../Custom/CAwesomeButton';
25
- import SSearchBar from '../StaticComponents/SSearchBar';
26
- import { Global } from '../Common/Global';
27
- import SAlphabet from '../StaticComponents/SAlphabet';
28
- import { useNavigation } from '../Navigation/useNavigation';
29
-
30
-
31
-
32
- const FooterBlock = props => {
33
- const navigation = useNavigation();
34
- const [FooterArray, SetFooterArray] = useState(
35
- props.footerdata &&
36
- props.footerdata != null &&
37
- props.footerdata != undefined
38
- ? props.footerdata
39
- : null,
40
- );
41
- const [stage, setStage] = useState(props.stage);
42
- const [more, setMore] = useState(false);
43
- const [activities, setActivities] = useState(false);
44
- const [searchData, setSearchData] = useState('');
45
- const [alpha, setAlpha] = useState(null);
46
- const [expandedCategory, setExpandedCategory] = useState(null);
47
- const [optionSelected, setOptionSelected] = useState(null);
48
- const [isLoading, setIsLoading] = useState(false);
49
- const [refresh, setRefresh] = useState(0);
50
- const [visibility, setVisibility] = useState(0);
51
- const [data, setData] = useState([]);
52
- const [displayData, setDisplayData] = useState([]);
53
- const [alphaFilter, setAlphaFilter] = useState(false);
54
- const [filterPurpose, setFilterPurpose] = useState([]);
55
- const [filterdata, setFilterData] = useState(data);
56
- const alphabet = Array.from({ length: 26 }, (_, i) =>
57
- String.fromCharCode(65 + i),
58
- ); // Create alphabet array A-Z
59
- const scrollViewRef = useRef(null);
60
- useEffect(() => {
61
- // getmorebutton();
62
-
63
- setData(Global.userOptionList);
64
- setFilterData(Global.userOptionList);
65
- // SetFooterArray([
66
- // {
67
- // stage: 1,
68
- // display: 'MY PROFILE',
69
- // suoptiondetail: 46001,
70
- // icon: 'account-cog',
71
- // icongroup: 3,
72
- // component: 'CProfileDetails',
73
- // color: '#2bcfc1',
74
- // componenttype: 'screen',
75
- // more: false,
76
- // selectedicon: 'account-cog',
77
- // footerorder: 1,
78
- // },
79
- // {
80
- // stage: 2,
81
- // display: 'ABOUT US',
82
- // suoptiondetail: 46201,
83
- // icon: 'account-group-outline',
84
- // icongroup: 3,
85
- // component: 'CGeneralBiodata',
86
- // color: '#3ef06e',
87
- // componenttype: 'screen',
88
- // more: false,
89
- // selectedicon: 'account-group',
90
- // footerorder: 2,
91
- // },
92
- // {
93
- // stage: 3,
94
- // display: 'HELP',
95
- // suoptiondetail: 43801,
96
- // icon: 'help-circle-outline',
97
- // icongroup: 3,
98
- // component: 'CBiodataCollection',
99
- // color: '#a33ef0',
100
- // componenttype: 'screen2',
101
- // more: false,
102
- // selectedicon: 'help-circle',
103
- // footerorder: 3,
104
- // },
105
- // {
106
- // stage: 4,
107
- // display: 'CHANGE PASSWORD',
108
- // suoptiondetail: 43802,
109
- // icon: 'lock-reset',
110
- // icongroup: 3,
111
- // component: 'ForgotPassword',
112
- // color: '#a33ef0',
113
- // componenttype: 'screen2',
114
- // more: false,
115
- // selectedicon: 'lock-reset',
116
- // footerorder: 4,
117
- // },
118
-
119
- // {
120
- // stage: 9,
121
- // display: 'MORE',
122
- // icon: 'cog-outline',
123
- // icongroup: 3,
124
- // componenttype: 'more',
125
- // more: false,
126
- // selectedicon: 'cog',
127
- // footerorder: 10,
128
- // view: true,
129
- // moreoptions: [],
130
- // },
131
- // {
132
- // stage: 83,
133
- // display: 'DECLARATION CANCELLATION',
134
- // more: false,
135
- // footerorder: 11,
136
- // },
137
- // ]);
138
- }, []);
139
-
140
- // function getmorebutton() {
141
- // setIsLoading(true);
142
- // let buttonapi = "http://192.168.1.3:9090/hislogin/login/UserLogin1_27122024%201,'1199',0";
143
-
144
- // console.log('BUTTON API MORE BUTTON', buttonapi);
145
-
146
- // NetworkServiceCall('get', buttonapi)
147
- // .then(function (response) {
148
- // if (response.httpstatus === 200 && response.data && response.data.data) {
149
- // setData(response.data.data); // Store data in state
150
- // console.log('success.....', JSON.stringify(response.data.data));
151
- // } else {
152
- // notifyMessage('Supplier data not found.');
153
- // }
154
- // setIsLoading(false);
155
- // })
156
- // .catch((error) => {
157
- // console.error('Network error:', error);
158
- // notifyMessage('Failed to fetch data.');
159
- // setIsLoading(false);
160
- // });
161
- // }
162
- // console.log("FOOTER BLOCK--------------------------------", FooterArray)
163
- function getAlphabetData(alpha, index) {
164
- var filter = isBNUL(displayData)
165
- ? displayData.filter(
166
- value =>
167
- (value.displayvalue != undefined ? value.displayvalue : '').charAt(
168
- 0,
169
- ) == alpha,
170
- )
171
- : [];
172
- setFilterPurpose(filter);
173
- index == 0 ? setSearchData('') : setSearchData(alpha);
174
- index == 0 ? setAlphaFilter(false) : setAlphaFilter(true);
175
- }
176
-
177
- const handleCategoryPress = categoryId => {
178
- // Toggle display expansion
179
- // console.log('-----------------------', categoryId);
180
- setExpandedCategory(prev =>
181
- prev === categoryId.display ? null : categoryId.display,
182
- );
183
- };
184
-
185
- const handleAlphabetPress = letter => {
186
- const filteredLetter = letter === "#" ? null : letter;
187
- setAlpha(filteredLetter);
188
-
189
- setFilterData(data.filter(params =>
190
- params.display.toLowerCase().startsWith(filteredLetter?.toLowerCase() || '')
191
- ));
192
- };
193
-
194
- function CShadowDynamic(offsetX, offsetY, blurRadius, spreadDistance, color) {
195
- const isAndroidBelow9 = Platform.OS === 'android' && Platform.Version < 28;
196
- return isAndroidBelow9
197
- ? {
198
- elevation: 10,
199
- shadowColor: color || Global.AppTheme.primary_color,
200
- shadowOffset: { width: offsetX, height: offsetY },
201
- shadowOpacity: 0.3,
202
- shadowRadius: blurRadius,
203
- }
204
- : {
205
- boxShadow: `${offsetX}px ${offsetY}px ${blurRadius}px ${spreadDistance}px ${color}`,
206
- };
207
- }
208
-
209
- const renderItem = ({ item, index }) => {
210
- return (
211
- <MenuOption
212
- key={item.suoptiondetail || index} // Ensure a unique key using suoptiondetail or index
213
- onSelect={() => {
214
- setActivities(false);
215
- props.fooCallBack(item);
216
- setStage(item.display);
217
- setMore(true);
218
- }}
219
- style={{
220
- flexDirection: 'row',
221
- alignItems: 'center',
222
- borderLeftWidth: 3,
223
- borderColor: item.color,
224
- height: normalize(36),
225
- }}>
226
- <HOCIcons.Icons
227
- icongroup={item.icongroup != undefined ? item.icongroup : 3}
228
- name={item.icon}
229
- color={item.display === stage ? item.color : '#303030'}
230
- size={normalize(15)}
231
- style={{
232
- borderWidth: 0,
233
- borderColor: item.color,
234
- borderRadius: 100,
235
- textAlign: 'center',
236
- padding: normalize(4),
237
- backgroundColor: 'transparent',
238
- elevation: 0,
239
- }}
240
- />
241
- <CText
242
- style={{
243
- fontSize: normalize(9),
244
- marginLeft: '5%',
245
- width: Dimensions.get('screen').width * 0.38,
246
- color: item.display === stage ? item.color : '#303030',
247
- fontWeight: 'bold',
248
- }}>
249
- {item.display} {/* Handle undefined item.display */}
250
- </CText>
251
- </MenuOption>
252
- );
253
- };
254
-
255
- // console.log("FOOTERBLOCK---------------------------------------",props.footerdata)
256
- return (
257
- // <View style={{
258
- // flexDirection: 'row',
259
- // alignItems: 'center',
260
- // justifyContent: 'space-between',
261
- // width: '100%',
262
- // height: normalize(45),
263
- // borderTopLeftRadius: 15,
264
- // borderTopRightRadius: 15,
265
- // paddingTop: normalize(5),
266
- // elevation: 100,
267
- // paddingHorizontal: normalize(6)
268
- // }}>
269
- // {isBNUL(FooterArray) ? FooterArray.map((items, k) => {
270
- // return (
271
- // // items.view ?
272
- // // items.componenttype == 'more' ?
273
- // <Menu ref={r => (items.moremenu = r) /* this.menu2.open() */}>
274
- // <MenuTrigger customStyles={{ triggerWrapper: {} }} >
275
- // <CAwesomeButtonLIS
276
- // callback={(val) => { { items.moremenu.open() } }}
277
- // buttonstyle={{
278
- // 'borderRadius': 10,
279
- // 'borderWidth': 1,
280
- // 'height': normalize(40),
281
- // 'width': normalize(40),
282
- // 'backgroundColor': '#f2f3ff',
283
- // 'paddingHorizontal': 0,
284
- // 'raiseLevel': 1,
285
- // 'paddingBottom': 0,
286
- // 'borderColor': 'lightblue',
287
- // 'paddingTop': 0,
288
- // 'style': {
289
- // padding: 0
290
- // }
291
- // }}
292
- // viewstyle={{
293
- // borderWidth: 0,
294
- // borderRadius: 0,
295
- // justifyContent: 'center',
296
- // alignItems: 'center'
297
- // }}
298
- // icon={{
299
- // 'icongroup': 3,
300
- // 'name': items.optionicon ,
301
- // 'color':
302
- // // items.color
303
- // 'darkblue'
304
- // ,
305
- // 'size': normalize(25),
306
- // 'style': {
307
- // textAlign: 'center'
308
- // }
309
- // }}
310
- // text={{
311
- // fontSize: normalize(6),
312
- // fontWeight: 'bold',
313
- // color: more == true ?
314
- // items.color
315
- // // 'red'
316
- // : themes.main,
317
- // textAlign: 'center'
318
- // }}
319
- // displaytext={items.optionname}
320
- // />
321
- // </MenuTrigger>
322
- // <MenuOptions customStyles={{ optionsContainer: { width: '45%', maxHeight: Dimensions.get('screen').height * 0.8, shadowColor: 'transparent' }, optionText: {}, }}>
323
- // {items.optiondetail != undefined ?
324
- // <View style={{ backgroundColor: 'transparent' }}>
325
- // <ScrollView>
326
- // {items.optiondetail.map((params, key) => {
327
- // return (
328
- // <MenuOption
329
- // key={key}
330
- // onSelect={() => { params.componenttype == 'screen' ? (setActivities(false), props.fooCallBack(params)) : (setStage(params.stage), setMore(true), setActivities(false), props.fooCallBack(params)) }}
331
- // style={{
332
- // flexDirection: 'row', alignItems: 'center', borderLeftWidth: 3,borderColor: params.color,
333
- // height: normalize(36),
334
- // }}>
335
- // <HOCIcons.Icons
336
- // icongroup={3}
337
- // name={params.optionicon}
338
- // color={"darkblue"}
339
- // // color={params.stage == stage ?
340
- // // // 'red'
341
- // // params.color
342
- // // : params.color}
343
- // size={normalize(22)}
344
- // style={{ borderWidth: 0, borderColor: "darkblue", borderRadius: 100, textAlign: 'center', padding: normalize(4), backgroundColor: 'transparent', elevation: 0 }}
345
- // />
346
- // <CText style={{
347
- // fontSize: normalize(9), marginLeft: '5%',
348
- // color: params.stage == stage ?
349
- // // 'red'
350
- // params.color
351
- // : "#303030",
352
- // fontWeight: 'bold'
353
- // }}>
354
- // {params.optiondetailname}
355
- // </CText>
356
- // </MenuOption>
357
- // )
358
- // })}
359
- // </ScrollView>
360
- // </View> : null}
361
- // </MenuOptions>
362
- // </Menu>
363
- // // : items.componenttype == 'activities' ?
364
- // // <Menu
365
- // // ref={r => (items.activitymenu = r)}
366
- // // >
367
- // // <MenuTrigger
368
- // // customStyles={{
369
- // // triggerWrapper: {
370
- // // }
371
- // // }}
372
- // // >
373
- // // <CAwesomeButtonLIS
374
- // // callback={(val) => { { items.activitymenu.open() } }}
375
- // // buttonstyle={{
376
- // // 'borderRadius': 10,
377
- // // 'borderWidth': 1,
378
- // // 'height': normalize(40),
379
- // // 'width': normalize(40),
380
- // // 'backgroundColor': '#f2f3ff',
381
- // // 'paddingHorizontal': 0,
382
- // // 'raiseLevel': 1,
383
- // // 'paddingBottom': 0,
384
- // // 'borderColor': 'lightblue',
385
- // // 'paddingTop': 0,
386
- // // 'style': {
387
- // // padding: 0
388
- // // }
389
- // // }}
390
- // // viewstyle={{
391
- // // borderWidth: 0,
392
- // // borderRadius: 0,
393
- // // justifyContent: 'center',
394
- // // alignItems: 'center'
395
- // // }}
396
- // // icon={{
397
- // // 'icongroup': 3,
398
- // // 'name': activities == true ? items.selectedicon : items.icon,
399
- // // 'color': activities == true ?
400
- // // // 'red'
401
- // // items.color
402
- // // : themes.main,
403
- // // 'size': normalize(25),
404
- // // 'style': {
405
- // // textAlign: 'center'
406
- // // }
407
- // // }}
408
- // // text={{
409
- // // fontSize: normalize(6),
410
- // // fontWeight: 'bold',
411
- // // color: activities == true ?
412
- // // // 'red'
413
- // // items.color
414
- // // : themes.main,
415
- // // textAlign: 'center'
416
- // // }}
417
- // // displaytext={items.display}
418
- // // />
419
- // // </MenuTrigger>
420
- // // <MenuOptions customStyles={{ optionsContainer: { width: '40%', shadowColor: 'transparent' }, optionText: {}, }}>
421
- // // {items.data != undefined ?
422
- // // <View style={{ backgroundColor: 'transparent' }}>
423
- // // {items.data.map((params, key) => {
424
- // // return (
425
- // // <MenuOption
426
- // // key={key}
427
- // // onSelect={() => { params.componenttype == 'screen' ? (setActivities(true), setMore(false), props.fooCallBack(params)) : (setStage(params.stage), setActivities(true), setMore(false), props.fooCallBack(params)) }}
428
- // // style={{
429
- // // flexDirection: 'row', alignItems: 'center', borderWidth: 0,
430
- // // height: normalize(36),
431
- // // }}>
432
- // // <HOCIcons.Icons
433
- // // icongroup={3}
434
- // // name={params.icon}
435
- // // color={params.stage == stage ?
436
- // // // 'red'
437
- // // params.color
438
- // // : "#585858"}
439
- // // size={normalize(20)}
440
- // // style={{ borderWidth: 0, borderColor: 'grey', borderRadius: 100, paddingHorizontal: normalize(5), textAlign: 'center', paddingVertical: normalize(5), backgroundColor: 'transparent', elevation: 0 }}
441
- // // />
442
- // // <CText style={{
443
- // // fontSize: normalize(9), marginLeft: '5%',
444
- // // color: params.stage == stage ?
445
- // // // 'red'
446
- // // params.color
447
- // // : "#585858",
448
- // // fontWeight: 'normal'
449
- // // }}>
450
- // // {params.display}
451
- // // </CText>
452
- // // </MenuOption>
453
- // // )
454
- // // })}
455
- // // </View> : null}
456
- // // </MenuOptions>
457
- // // </Menu>
458
- // // :
459
- // // <CAwesomeButtonLIS
460
- // // callback={(val) => { { setStage(items.stage), setMore(false), setActivities(false), props.fooCallBack(items) } }}
461
- // // buttonstyle={{
462
- // // 'borderRadius': 10,
463
- // // 'borderWidth': 1,
464
- // // 'height': normalize(40),
465
- // // 'width': normalize(40),
466
- // // 'backgroundColor': '#f2f3ff',
467
- // // 'paddingHorizontal': 0,
468
- // // 'raiseLevel': 1,
469
- // // 'paddingBottom': 0,
470
- // // 'borderColor': 'lightblue',
471
- // // 'paddingTop': 0,
472
- // // 'style': {
473
- // // padding: 0
474
- // // }
475
- // // }}
476
- // // viewstyle={{
477
- // // borderWidth: 0,
478
- // // borderRadius: 0,
479
- // // justifyContent: 'center',
480
- // // alignItems: 'center'
481
- // // }}
482
- // // icon={{
483
- // // 'icongroup': 3,
484
- // // 'name': items.stage == stage ? items.selectedicon : items.icon,
485
- // // 'color': items.stage == stage ?
486
- // // // 'red'
487
- // // items.color
488
- // // : themes.main,
489
- // // 'size': normalize(25),
490
- // // 'style': {
491
- // // textAlign: 'center'
492
- // // }
493
- // // }}
494
- // // text={{
495
- // // fontSize: normalize(6),
496
- // // fontWeight: 'bold',
497
- // // color: items.stage == stage ?
498
- // // // 'red'
499
- // // items.color
500
- // // : themes.main,
501
- // // textAlign: 'center'
502
- // // }}
503
- // // displaytext={items.display}
504
- // // />
505
-
506
- // // : null
507
- // )
508
- // }) : null}
509
- // </View>
510
-
511
- <View
512
- style={{
513
- flexDirection: 'row',
514
- alignItems: 'center',
515
- // justifyContent: 'space-between',
516
- justifyContent: 'flex-end',
517
- width: '100%',
518
- height: '100%',
519
- borderTopLeftRadius: 15,
520
- borderTopRightRadius: 15,
521
- paddingTop: normalize(5),
522
- elevation: 100,
523
- paddingHorizontal: normalize(6),
524
- flex: 1,
525
- }}>
526
- {/* {console.log('dddddddddddddddddddddddddd@@@@@@@@@@@@@@@@@', JSON.stringify(data))} */}
527
- {isBNUL(FooterArray)
528
- ? FooterArray.filter(item => item.componenttype).map((items, k) => {
529
- return items.view ? (
530
- items.componenttype == 'more' ? (
531
- <Menu
532
- key={k}
533
- ref={r => (items.moremenu = r) /* this.menu2.open() */}>
534
- <MenuTrigger customStyles={{ triggerWrapper: {} }}>
535
- {/* <CAwesomeButtonLIS
536
- callback={val => {
537
- {
538
- navigation.navigate('MoreOptionsScreen', {
539
- footerdata: FooterArray, // Pass the FooterArray
540
- stage: stage, // Pass the current stage
541
- fooCallBack: props.fooCallBack,
542
- })
543
- console.log('options')
544
- // items.moremenu.open();
545
- }
546
- }}
547
- buttonstyle={{
548
- borderRadius: 10,
549
- borderWidth: 1,
550
- height: normalize(40),
551
- width: normalize(40),
552
- backgroundColor: '#f2f3ff',
553
- paddingHorizontal: 0,
554
- raiseLevel: 1,
555
- paddingBottom: 0,
556
- borderColor: 'lightblue',
557
- paddingTop: 0,
558
- style: {
559
- padding: 0,
560
- },
561
- }}
562
- viewstyle={{
563
- borderWidth: 0,
564
- borderRadius: 0,
565
- justifyContent: 'center',
566
- alignItems: 'center',
567
- }}
568
- icon={{
569
- icongroup: 3,
570
- name: more == true ? items.selectedicon : items.icon,
571
- color:
572
- more == true
573
- ? themes.main ? themes.main : null
574
- : // 'red'
575
- themes.main,
576
- size: normalize(25),
577
- style: {
578
- textAlign: 'center',
579
- },
580
- }}
581
- text={{
582
- fontSize: normalize(6),
583
- fontWeight: 'bold',
584
- color:
585
- more == true
586
- ? items.color ? items.color : null
587
- : // 'red'
588
- themes.main,
589
- textAlign: 'center',
590
- }}
591
- displaytext={items.display}
592
- /> */}
593
- <TouchableOpacity
594
- disabled={false} // You can make this dynamic if needed
595
- onPress={() =>
596
- navigation.navigate('MoreOptionsScreen', {
597
- footerdata: FooterArray, // Pass the FooterArray
598
- stage: stage, // Pass the current stage
599
- fooCallBack: props.fooCallBack,
600
- })
601
- }
602
- style={{
603
- width: normalize(40), // Adjust width for the button
604
- flexDirection: 'column', // Stack icon and text vertically
605
- alignItems: 'center',
606
- justifyContent: 'center',
607
- padding: normalize(2), // Add margin for spacing
608
- backgroundColor: 'white', // Background color for the button
609
- borderRadius: normalize(10), // Rounded corners
610
- ...CShadowDynamic(-3, 3, 5, 0, Global.AppTheme.primary_color), // Apply shadow dynamically
611
- }}
612
- >
613
- {/* Icon */}
614
- <HOCIcons.Icons
615
- icongroup={items.icongroup || 3}
616
- name={items.icon || 'cog-outline'}
617
- color={items.color || Global.AppTheme.primary_color}
618
- size={normalize(22)}
619
- />
620
- {/* Text */}
621
- <Text
622
- style={{
623
- fontSize: normalize(8), // Make text smaller
624
- color: items.color || Global.AppTheme.primary_color,
625
- fontWeight: 'bold', // Bold text
626
- textAlign: 'center',
627
- maxWidth: normalize(35), // Limit text width
628
- }}
629
- numberOfLines={1} // Ensure text is displayed in a single line
630
- ellipsizeMode="tail" // Add ellipsis if text overflows
631
- >
632
- {items.display}
633
- </Text>
634
- </TouchableOpacity>
635
- </MenuTrigger>
636
- <MenuOptions
637
- customStyles={{
638
- optionsContainer: {
639
- width: '55%',
640
- height: '60%',
641
- shadowColor: 'transparent',
642
- borderRadius: 10,
643
- },
644
- optionText: {},
645
- }}>
646
- {/* Alphabet column */}
647
-
648
- {items.moreoptions != undefined ? (
649
- <View style={{ marginBottom: normalize(80), height: '88%' }}>
650
- <SSearchBar
651
- // value={searchData}
652
- onChangeText={setSearchData}
653
- />
654
- <View style={{ flexDirection: 'row', flex: 1 }}>
655
- <ScrollView
656
- showsVerticalScrollIndicator={true}>
657
- {isBNUL(filterdata) ? filterdata
658
- .filter(
659
- params =>
660
- params.display
661
- ?.toLowerCase()
662
- ?.includes((searchData || '').toLowerCase()), // Handle undefined searchData
663
- )
664
- .map(params => {
665
- return (
666
- <View key={params.display} style={{ flex: 1 }}>
667
- <TouchableOpacity
668
- style={{
669
- width: '100%',
670
- backgroundColor: '#f5f5f5',
671
- borderRadius: 8,
672
- marginBottom: 5,
673
- elevation: 2, // Shadow effect
674
- paddingHorizontal: 10,
675
- }}
676
- onPress={() =>
677
- handleCategoryPress(params)
678
- }>
679
- <View
680
- style={{
681
- padding: 5,
682
- flexDirection: 'row',
683
- alignItems: 'center',
684
- }}>
685
- <HOCIcons.Icons
686
- icongroup={
687
- params.icongroup != undefined
688
- ? params.icongroup
689
- : 3
690
- }
691
- name={
692
- params.icon != undefined
693
- ? params.icon
694
- : 'file'
695
- }
696
- color={
697
- params.color != undefined
698
- ? params.color
699
- : null
700
- }
701
- size={normalize(18)}
702
- style={{
703
- borderWidth: 0,
704
- borderColor: params.color != undefined
705
- ? params.color
706
- : null,
707
- borderRadius: 100,
708
- textAlign: 'center',
709
- backgroundColor: 'transparent',
710
- elevation: 0,
711
- }}
712
- />
713
- <Text
714
- style={{
715
- fontSize: 10,
716
- fontWeight: 'bold',
717
- color: '#333',
718
- paddingLeft: normalize(5),
719
- }}>
720
- {params.display}
721
- </Text>
722
- </View>
723
- </TouchableOpacity>
724
-
725
- {expandedCategory === params.display && (
726
- <FlatList
727
- data={params.optiondetail.filter(
728
- item => item.component != '',
729
- )}
730
- keyExtractor={(item, index) =>
731
- index.toString()
732
- }
733
- renderItem={renderItem}
734
- />
735
- )}
736
- </View>
737
- );
738
- }) : null}
739
- </ScrollView>
740
- <View>
741
- <SAlphabet
742
- callBack={val =>
743
- val == undefined
744
- ? null
745
- : handleAlphabetPress(val.alpha)
746
- }
747
- />
748
- </View>
749
- </View>
750
- </View>
751
- ) : null}
752
- </MenuOptions>
753
- </Menu>
754
- ) : null
755
- ) : (
756
- <CAwesomeButtonLIS
757
- key={k}
758
- // callback={(val) => { { setStage(items.stage), setMore(false), setActivities(false), props.fooCallBack(items) } }}
759
- callback={() => {
760
- items.componenttype == 'screen'
761
- ? (setActivities(false), props.fooCallBack(items))
762
- : (setStage(items.stage),
763
- setMore(true),
764
- setActivities(false),
765
- props.fooCallBack(items));
766
- }}
767
- buttonstyle={{
768
- borderRadius: 10,
769
- borderWidth: 1,
770
- height: normalize(40),
771
- width: normalize(40),
772
- backgroundColor: '#f2f3ff',
773
- paddingHorizontal: 0,
774
- raiseLevel: 1,
775
- paddingBottom: 0,
776
- borderColor: 'lightblue',
777
- paddingTop: 0,
778
- style: {
779
- padding: 0,
780
- },
781
- }}
782
- viewstyle={{
783
- borderWidth: 0,
784
- borderRadius: 0,
785
- justifyContent: 'center',
786
- alignItems: 'center',
787
- }}
788
- icon={{
789
- icongroup: 3,
790
- name: items.stage == stage ? items.selectedicon : items.icon,
791
- color:
792
- items.stage == stage
793
- ? // 'red'
794
- themes.main
795
- : themes.main,
796
- size: normalize(25),
797
- style: {
798
- textAlign: 'center',
799
- },
800
- }}
801
- text={{
802
- fontSize: normalize(6),
803
- fontWeight: 'bold',
804
- color:
805
- items.stage == stage
806
- ? // 'red'
807
- themes.main
808
- : themes.main,
809
- textAlign: 'center',
810
- }}
811
- displaytext={items.display}
812
- />
813
- );
814
-
815
- // : null
816
- })
817
- : null}
818
- </View>
819
- );
820
- };
821
- export default FooterBlock;