@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,507 +0,0 @@
1
- import React, { useState, useEffect } from 'react';
2
- import {
3
- StyleSheet,
4
- Dimensions,
5
- View,
6
- Platform,
7
- BackHandler,
8
- TouchableOpacity,
9
- } from 'react-native';
10
- import CFooterView from '../CustomComponents/CFooterView';
11
- import CContainerView from '../CustomComponents/CContainerView';
12
- import CDetailView from '../CustomComponents/CDetailView';
13
- import HeaderBlock from './HeaderBlock';
14
- import { normalize } from '../CommonStyle/componentStyle';
15
- import {
16
- CShadowDynamic,
17
- getLoading,
18
- isBNU,
19
- isBNUL,
20
- isNUQ,
21
- isPermitted,
22
- Loader,
23
- notifyMessage,
24
- } from '../CommonStyle/ComponentFunctions';
25
- import RNFetchBlob from 'rn-fetch-blob';
26
- import moment from 'moment';
27
- import { Global } from '../../../../../src/Common/Global';
28
- import Share from 'react-native-share';
29
- import {
30
- MenuProvider,
31
- Menu,
32
- MenuOptions,
33
- MenuOption,
34
- MenuTrigger,
35
- } from 'react-native-popup-menu';
36
- import Icons from '../Common/Icons';
37
- import { Text } from 'react-native-elements';
38
- import ReactNativeBlobUtil from 'react-native-blob-util';
39
- import axios from 'axios';
40
- import { EMRAPI } from '../../../../../src/Common/apiConstants';
41
- import NetworkServiceCall from '../Common/NetworkServiceCall';
42
- import HShadowButton from '../HOC/HShadowButton';
43
- import PDFContentViewer from '../CustomComponents/PDFContentViewer';
44
- // Get screen dimensions
45
- const { width: SCREEN_WIDTH, height: SCREEN_HEIGHT } = Dimensions.get('window');
46
-
47
- // Responsive size calculations
48
- const MIN_WIDTH = SCREEN_WIDTH * 0.1; // 25% of screen width
49
- const MAX_WIDTH = SCREEN_WIDTH * 0.9; // 90% of screen width
50
-
51
- const MIN_HEIGHT = SCREEN_HEIGHT * 0.1; // 5% of screen height
52
- const MAX_HEIGHT = SCREEN_HEIGHT * 0.1; // 12% of screen height
53
-
54
- export default function PdfPreview({ route, navigation, ...props }) {
55
- console.log('PdfPreviewllllll', route.params.link);
56
-
57
- const [pdfviewdata, setPdfViewData] = useState();
58
- const [isLoading, setIsLoading] = useState(false);
59
- const FooterArr = [
60
- {
61
- keyid: 1,
62
- displaytext: 'Download',
63
- size: 10,
64
- iconname: 'download',
65
- icongroup: 4,
66
- iconcolor: Global.AppTheme.primary_color,
67
- fontcolor: '#a30e0e',
68
- shadowcolor: '#ffe5e5',
69
- selected: false,
70
- visibility: Platform.OS != 'web',
71
- iconsize: 20,
72
- functionid: 'D01',
73
- },
74
- {
75
- keyid: 2,
76
- displaytext: 'Share',
77
- size: 10,
78
- iconname: 'share',
79
- icongroup: 4,
80
- iconcolor: Global.AppTheme.primary_color,
81
- fontcolor: '#a30e0e',
82
- shadowcolor: '#ffe5e5',
83
- selected: false,
84
- visibility: Platform.OS != 'web',
85
- iconsize: 20,
86
- functionid: 'D02',
87
- },
88
- ];
89
-
90
- const SendPrint = async (results, printer) => {
91
- console.log('llllllllll', JSON.stringify(printer));
92
- console.log('llllllllll2', JSON.stringify(results));
93
- if (await isPermitted()) {
94
- setIsLoading(true);
95
- let filePath =
96
- RNFetchBlob.fs.dirs.DownloadDir +
97
- '/' +
98
- moment().format('DD-MM-YYYY hmmssSSS') +
99
- '.pdf';
100
- const fileBase64 = await ReactNativeBlobUtil.fs.readFile(
101
- results,
102
- 'base64',
103
- );
104
- if (isBNU(fileBase64)) {
105
- RNFetchBlob.fs
106
- .writeFile(filePath, fileBase64, 'base64')
107
- .then(response => {
108
- var formData = new FormData();
109
- formData.append('file', {
110
- uri: 'file://' + filePath,
111
- type: 'application/pdf',
112
- name: '.pdf',
113
- });
114
- let multiformapi = EMRAPI.postPrintDocument;
115
- console.log(
116
- 'PRINTERAPI--------------------',
117
- JSON.stringify(multiformapi),
118
- );
119
- console.log(
120
- 'FORMDATA--------------------',
121
- JSON.stringify(formData),
122
- );
123
- NetworkServiceCall('multiform', multiformapi, formData)
124
- .then(function (responsedata) {
125
- console.log(
126
- 'PRINTERDATA--------------------',
127
- JSON.stringify(responsedata),
128
- );
129
- if (responsedata.httpstatus == 200) {
130
- let printapi = EMRAPI.postPrintFile;
131
- let letprintername = printer;
132
- let output = {
133
- heading1: responsedata.data.fileuri,
134
- heading2: letprintername,
135
- };
136
- console.log('printer output', JSON.stringify(output));
137
- axios
138
- .post(printapi, output)
139
- .then(function (response) {
140
- if (
141
- response &&
142
- isBNU(response.data) &&
143
- isBNU(response.data.httpstatus) &&
144
- response.data.httpstatus == 200
145
- ) {
146
- notifyMessage('Printed Successfully', 1);
147
- setIsLoading(false);
148
- } else {
149
- notifyMessage('Print Failed', 2);
150
- setIsLoading(false);
151
- }
152
- })
153
- .catch(function (error) {
154
- notifyMessage('Print Failed', 2);
155
- setIsLoading(false);
156
- });
157
- } else {
158
- notifyMessage('PRINT FAILED.Try Again', 2);
159
- setIsLoading(false);
160
- }
161
- })
162
- .catch(error => {
163
- notifyMessage('PRINT FAILED.Try Again', 2);
164
- setIsLoading(false);
165
- });
166
- })
167
- .catch(error => {
168
- notifyMessage('FILE CREATION FAILED.Try Again.', 2);
169
- setIsLoading(false);
170
- });
171
- } else {
172
- notifyMessage('conversion failed.Try Again.', 2);
173
- setIsLoading(false);
174
- }
175
- }
176
- };
177
-
178
- useEffect(() => {
179
- const backAction = () => {
180
- navigation.goBack();
181
- return true;
182
- };
183
- const backHandler = BackHandler.addEventListener(
184
- 'hardwareBackPress',
185
- backAction,
186
- );
187
- return () => backHandler.remove();
188
- }, []);
189
-
190
- useEffect(() => {
191
- setIsLoading(true);
192
- getLoading(v => setIsLoading(false));
193
- }, []);
194
-
195
- // const navigation = useNavigation();
196
-
197
- const onPressFooter = val => {
198
- switch (val.functionid) {
199
- case 'D01':
200
- DownloadPdf(pdfviewdata);
201
- break;
202
- case 'D02':
203
- handleShare(pdfviewdata);
204
- break;
205
- case 'D03':
206
- break;
207
- default:
208
- break;
209
- }
210
- };
211
- const handleShare = async params => {
212
- if (isPermitted()) {
213
- try {
214
- setIsLoading(true);
215
-
216
- // Read file as base64
217
- const fileBase64 = await ReactNativeBlobUtil.fs.readFile(
218
- params,
219
- 'base64',
220
- );
221
-
222
- // Construct file path for sharing (temporary)
223
- const filePath =
224
- RNFetchBlob.fs.dirs.CacheDir +
225
- '/' +
226
- moment().format('DD-MM-YYYY hmmssSSS') +
227
- '.pdf';
228
-
229
- // Write the file temporarily
230
- await RNFetchBlob.fs.writeFile(filePath, fileBase64, 'base64');
231
-
232
- // Share the file
233
- const options = {
234
- title: 'Share PDF',
235
- url: 'file://' + filePath,
236
- type: 'application/pdf',
237
- };
238
-
239
- await Share.open(options);
240
- console.log('PDF shared successfully');
241
- } catch (error) {
242
- console.log('Error sharing PDF:', error);
243
- notifyMessage('Share Failed');
244
- } finally {
245
- setIsLoading(false);
246
- }
247
- }
248
- };
249
-
250
- const DownloadPdf = async params => {
251
- if (isPermitted()) {
252
- setIsLoading(true);
253
- const fileBase64 = await ReactNativeBlobUtil.fs.readFile(
254
- params,
255
- 'base64',
256
- );
257
- const filePath =
258
- RNFetchBlob.fs.dirs.DownloadDir +
259
- '/' +
260
- moment().format('DD-MM-YYYY hmmssSSS') +
261
- '.pdf';
262
- RNFetchBlob.fs
263
- .writeFile(filePath, fileBase64, 'base64')
264
- .then(response => {
265
- notifyMessage(filePath);
266
- setIsLoading(false);
267
- console.log('success');
268
- })
269
- .catch(errors => {
270
- console.log('catch', errors);
271
- notifyMessage('Download Failed');
272
- setIsLoading(false);
273
- });
274
- }
275
- };
276
-
277
- return (
278
- <CContainerView>
279
- <HeaderBlock
280
- style={
281
- isNUQ(route.params.headerblockstyle)
282
- ? route.params.headerblockstyle
283
- : {}
284
- }
285
- navigation={navigation}
286
- // backhandler={true}
287
- callback={() => {
288
- navigation.goBack();
289
- }}
290
- consultation={false}
291
- />
292
- <CDetailView>
293
- {isLoading ? <Loader /> : null}
294
- <PDFContentViewer
295
- link={route.params.link}
296
- style={styles.pdfView}
297
- onLoadComplete={(path) => {
298
- console.log('PDF loaded:', path);
299
- setPdfViewData(path);
300
- setIsLoading(false);
301
- }}
302
- onError={(error) => {
303
- console.log('PDF error:', error);
304
- setIsLoading(false);
305
- }}
306
- />
307
- </CDetailView>
308
- <CFooterView>
309
- <View
310
- style={{
311
- flexDirection: 'row',
312
- alignItems: 'center',
313
- justifyContent: 'flex-start',
314
- width: '100%',
315
- bottom: 0,
316
- }}>
317
- {isBNUL(FooterArr)
318
- ? FooterArr.map((item, i) => {
319
- return item.visibility ? (
320
- <View style={{ marginHorizontal: normalize(2) }} key={i}>
321
- <HShadowButton
322
- key={i}
323
- useicon={true}
324
- usetext={true}
325
- disabled={false}
326
- buttonstyle={[styles.actionButton, CShadowDynamic(-3, 3, 5, 0, Global.AppTheme.primary_color)]}
327
- iconcolor={Global.AppTheme.primary_color}
328
- icongroup={item.icongroup}
329
- iconname={item.iconname}
330
- iconsize={normalize(20)}
331
- displaytext={item.displaytext}
332
- buttonCallback={val =>
333
- val == undefined ? null : onPressFooter(item)
334
- }
335
- textstyle={styles.optionText}
336
- />
337
- </View>
338
- ) : null;
339
- })
340
- : null}
341
- {Platform.OS != "web" && < Menu style={{ borderRadius: 10, borderWidth: 0 }}>
342
- <MenuTrigger
343
- customStyles={{
344
- triggerWrapper: {
345
- borderWidth: 0,
346
- borderRadius: 10,
347
- elevation: 0,
348
- },
349
- }}>
350
- <View
351
- style={[styles.actionButton, CShadowDynamic(-3, 3, 5, 0, Global.AppTheme.primary_color)]}>
352
- <Icons.FontAwesome5
353
- name={'print'}
354
- size={normalize(20)}
355
- color={Global.AppTheme.primary_color}
356
- style={{ textAlign: 'center' }}
357
- />
358
- <Text style={styles.optionText}>
359
- {'Print'}
360
- </Text>
361
- </View>
362
- </MenuTrigger>
363
- <MenuOptions
364
- optionsContainerStyle={{ marginTop: normalize(-30) }}
365
- customStyles={{
366
- optionsContainer: {
367
- shadowColor: '#ffe5e5',
368
- shadowRadius: 10,
369
- borderRadius: 5,
370
- borderWidth: 0.5,
371
- borderColor: 'lightgrey',
372
- elevation: 3,
373
- width: '60%',
374
- },
375
- optionText: {},
376
- }}>
377
- <View style={{}}>
378
- {isBNUL(Global?.userData?.printerarray)
379
- ? Global?.userData?.printerarray.map((item, i) => {
380
- return (
381
- <View
382
- key={i}
383
- style={styles.printerOption}>
384
- <Text
385
- style={{
386
- fontSize: normalize(9),
387
- fontWeight: 'bold',
388
- color: 'black',
389
- paddingHorizontal: normalize(5),
390
- }}>
391
- {isBNU(item.displayvalue)
392
- ? item.displayvalue
393
- : 'Printer not found'}
394
- </Text>
395
- {isBNU(item.printername) ? (
396
- <HShadowButton
397
- key={i}
398
- useicon={true}
399
- usetext={true}
400
- disabled={false}
401
- buttonstyle={styles.printButton}
402
- iconcolor={Global.AppTheme.primary_color}
403
- icongroup={5}
404
- iconname={'print'}
405
- iconsize={normalize(20)}
406
- displaytext={"Print"}
407
- buttonCallback={() => {
408
- SendPrint(pdfviewdata, item.printername)
409
- }}
410
- textstyle={styles.optionText}
411
- />
412
- ) : null}
413
- </View>
414
- );
415
- })
416
- : null}
417
- </View>
418
- </MenuOptions>
419
- </Menu>}
420
- </View>
421
- </CFooterView>
422
- </CContainerView >
423
- );
424
- }
425
- const styles = StyleSheet.create({
426
- selectionButtonText: {
427
- fontSize: normalize(6.2),
428
- fontWeight: 'bold',
429
- color: 'black',
430
- textAlign: 'center',
431
- },
432
- printer: {
433
- borderRadius: 10,
434
- borderWidth: 0.5,
435
- height:
436
- Dimensions.get('screen').height * 0.054,
437
- width: Dimensions.get('screen').height * 0.07,
438
- backgroundColor: '#fff',
439
- paddingHorizontal: 0,
440
- paddingBottom: 0,
441
- paddingTop: 0,
442
- borderColor: Global.AppTheme.primary_color,
443
- justifyContent: 'center',
444
- alignItems: 'center',
445
- marginHorizontal: normalize(3),
446
- elevation: 4, // raiseLevel equivalent for Android
447
- shadowColor: '#ffe5e5', // optional for iOS shadow
448
- shadowOffset: { width: 0, height: 2 },
449
- shadowOpacity: 0.2,
450
- shadowRadius: 2,
451
- },
452
- actionButton: {
453
- minWidth: Platform.OS === "web" && MIN_WIDTH,
454
- maxWidth: Platform.OS === "web" && MAX_WIDTH,
455
- minHeight: Platform.OS === "web" && MIN_HEIGHT,
456
- maxHeight: Platform.OS === "web" && MAX_HEIGHT,
457
- borderRadius: 10,
458
- borderWidth: 0.5,
459
- height: Dimensions.get('screen').height * 0.054,
460
- width: Dimensions.get('screen').height * 0.07,
461
- backgroundColor: '#fff',
462
- paddingHorizontal: 0,
463
- paddingBottom: 0,
464
- paddingTop: 0,
465
- borderColor: Global.AppTheme.primary_color,
466
- justifyContent: 'center',
467
- alignItems: 'center',
468
- marginHorizontal: normalize(3),
469
- elevation: 4, // raiseLevel equivalent for Android
470
- shadowColor: '#ffe5e5', // optional for iOS shadow
471
- shadowOffset: { width: 0, height: 2 },
472
- shadowOpacity: 0.2,
473
- shadowRadius: 2,
474
- },
475
- actionButtonIcon: {
476
- textAlign: 'center',
477
- },
478
- actionButtonText: {
479
- fontSize: normalize(7),
480
- fontWeight: 'normal',
481
- color: Global.AppTheme.primary_color,
482
- textAlign: 'center',
483
- },
484
- printButton: {
485
- flexDirection: 'row',
486
- alignItems: 'center',
487
- padding: normalize(5),
488
- backgroundColor: '#f0f0f0',
489
- borderRadius: 5,
490
- },
491
- printerOption: {
492
- flexDirection: 'row',
493
- justifyContent: 'space-between',
494
- alignItems: 'center',
495
- padding: normalize(5),
496
- borderBottomWidth: 0.5,
497
- borderBottomColor: '#eee',
498
- },
499
- optionText: {
500
- fontSize: normalize(8),
501
- color: Global.AppTheme.primary_color,
502
- fontWeight: 'bold',
503
- textAlign: 'center',
504
- maxWidth: normalize(60),
505
- },
506
- pdfView: { flex: 1, backgroundColor: 'white' },
507
- })