@jescon-technologies/react-native-ui-kit 0.0.4 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (178) hide show
  1. package/index.d.ts +66 -0
  2. package/index.js +3 -7
  3. package/package.json +3 -2
  4. package/src/Alerts/AAlert.js +4 -4
  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/RecordAudio.js +1 -1
  127. package/src/Media/VideoScreen.js +2 -7
  128. package/src/Navigation/PageNavigation.js +224 -0
  129. package/src/Navigation/useFocusEffect.js +2 -0
  130. package/src/Navigation/useFocusEffect.native.js +1 -0
  131. package/src/Navigation/useFocusEffect.web.js +1 -0
  132. package/src/Navigation/useIsFocused.js +1 -0
  133. package/src/Navigation/useIsFocused.native.js +1 -0
  134. package/src/Navigation/useIsFocused.web.js +1 -0
  135. package/src/Navigation/useNavigation.js +2 -0
  136. package/src/Navigation/useNavigation.native.js +1 -0
  137. package/src/Navigation/useNavigation.web.js +1 -0
  138. package/src/Screens/CMedications.js +528 -0
  139. package/src/Screens/CWebViewGallery.js +203 -0
  140. package/src/Screens/ChartScan.js +279 -0
  141. package/src/Screens/ChartScreenNew.js +1579 -0
  142. package/src/Screens/Consultation.js +1500 -0
  143. package/src/Screens/Dashboard.js +778 -0
  144. package/src/Screens/FileExplorer.js +288 -0
  145. package/src/Screens/Footer.js +340 -0
  146. package/src/Screens/ForgotPassword.js +288 -0
  147. package/src/Screens/HeaderBlock.js +353 -0
  148. package/src/Screens/Login.js +328 -0
  149. package/src/Screens/Notification.js +149 -0
  150. package/src/Screens/OcrScreen.js +20 -0
  151. package/src/Screens/PdfPreview.js +507 -0
  152. package/src/Screens/RegistrationDetails.js +467 -0
  153. package/src/Screens/SearchScreen.js +582 -0
  154. package/src/Screens/Splash.js +788 -0
  155. package/src/Screens/SwipeLeftView.js +1867 -0
  156. package/src/StaticComponents/SDatePickerLabel.js +1 -1
  157. package/src/StaticComponents/SDatePickerNew.js +1 -1
  158. package/src/StaticComponents/SDateTimePickerNew.js +2 -2
  159. package/src/StaticComponents/SDropDownGenerate.js +3 -3
  160. package/src/StaticComponents/SDropDownHoc.js +4 -4
  161. package/src/StaticComponents/SDropDownIcon.js +1 -1
  162. package/src/StaticComponents/SMenuBox.js +2 -2
  163. package/src/StaticComponents/SSearch.js +2 -2
  164. package/src/StaticComponents/STextInput.js +1 -1
  165. package/src/StaticComponents/STimePicker.js +1 -1
  166. package/src/StaticComponents/STimingDropDownNew.js +2 -6
  167. package/src/StaticComponents/STimingSwitch.js +1 -1
  168. package/src/layout/CContainerView.js +1 -1
  169. package/src/layout/CDetailView.js +3 -3
  170. package/src/layout/HeaderBlock.js +5 -5
  171. package/src/layout/INVLoginLayout.js +3 -4
  172. package/src/layout/Loader.js +2 -2
  173. package/src/HOC/HAbsolute.js +0 -56
  174. package/src/HOC/HDiscontinue.js +0 -105
  175. package/src/HOC/HOverlay.js +0 -99
  176. package/src/layout/FooterBlock.js +0 -821
  177. /package/src/{common → Common}/ErrorBoundary.tsx +0 -0
  178. /package/src/{common → Common}/Icons.js +0 -0
@@ -0,0 +1,79 @@
1
+ {
2
+ "componentFooter": [
3
+ {
4
+ "itemid": 1,
5
+ "iconname": "save",
6
+ "heading": "Save",
7
+ "functionname": "save",
8
+ "componentname": "CODropdownAPI",
9
+ "name": "Save"
10
+ },
11
+ {
12
+ "itemid": 2,
13
+ "iconname": "check-square-o",
14
+ "heading": "Verify",
15
+ "functionname": "screen",
16
+ "componentname": "Verification",
17
+ "name": "Verify"
18
+ },
19
+ {
20
+ "itemid": 3,
21
+ "iconname": "eyedropper",
22
+ "heading": "Lab Results",
23
+ "functionname": "labresults",
24
+ "componentname": "CLabChart",
25
+ "name": "Lab Results"
26
+ },
27
+ {
28
+ "itemid": 4,
29
+ "iconname": "file-text-o",
30
+ "heading": "Add Nature",
31
+ "functionname": "overlay",
32
+ "componentname": "AddScreenOverlay",
33
+ "buttonapi": "emr/emrcommonget/exec rndddaaddclassificationnature",
34
+ "name": "Add Nature"
35
+ },
36
+ {
37
+ "itemid": 7,
38
+ "iconname": "th-list",
39
+ "heading": "More",
40
+ "functionname": "exit",
41
+ "componentname": "CODropdownAPI",
42
+ "name": "More",
43
+ "morebuttons": [
44
+ {
45
+ "itemid": 51,
46
+ "iconname": "list-ul",
47
+ "heading": "MicroTemplate",
48
+ "buttonapi": "emr/emrcommonget/exec rndddatemplate",
49
+ "functionname": "overlay",
50
+ "componentname": "AddScreenOverlay"
51
+ },
52
+ {
53
+ "itemid": 53,
54
+ "iconname": "list-alt",
55
+ "heading": "Template",
56
+ "buttonapi": "emr/emrcommonget/exec rndddatemplate",
57
+ "functionname": "overlay",
58
+ "componentname": "AddScreenOverlay"
59
+ },
60
+ {
61
+ "itemid": 1,
62
+ "iconname": "star-o",
63
+ "heading": "SaveAs Template",
64
+ "buttonapi": "",
65
+ "functionname": "screen",
66
+ "componentname": "SaveAsTemplate"
67
+ },
68
+ {
69
+ "itemid": 5,
70
+ "iconname": "folder",
71
+ "heading": "Files",
72
+ "buttonapi": "",
73
+ "functionname": "context",
74
+ "componentname": "FileExplorer"
75
+ }
76
+ ]
77
+ }
78
+ ]
79
+ }
@@ -12,7 +12,7 @@ import {
12
12
  ActivityIndicator,
13
13
  PermissionsAndroid,
14
14
  } from 'react-native';
15
- import {audioURL, APIURL} from '../Common/apiConstants';
15
+ import {audioURL, APIURL} from '../../../../../src/Common/apiConstants';
16
16
  import Fontisto from 'react-native-vector-icons/Fontisto';
17
17
  import AntDesign from 'react-native-vector-icons/AntDesign';
18
18
  import CAudioPlay from '../Media/CAudioPlay';
@@ -22,14 +22,10 @@ import { useNavigation } from '../Navigation/useNavigation';
22
22
  import ReactNativeBlobUtil from 'react-native-blob-util';
23
23
  import Sound from 'react-native-sound';
24
24
  import SSpeedDial from '../StaticComponents/SSpeedDial';
25
- import {Global} from '../Common/Global';
26
- import EmrResponseComponentContext from '../Handlers/emrResponseComponentContext';
25
+ import {Global} from '../../../../../src/Common/Global';
27
26
 
28
27
  function AudioScreen(props) {
29
28
  const navigation = useNavigation();
30
- const {responseJSON, setResponseJSON} = useContext(
31
- EmrResponseComponentContext,
32
- );
33
29
  const [data, setData] = useState(
34
30
  props?.data?.savedaudio ? props.data.savedaudio : null,
35
31
  //props.route.params.gallery.savedaudio
@@ -238,7 +234,6 @@ function AudioScreen(props) {
238
234
  ? prevData => [...prevData, dataset2.filename]
239
235
  : [dataset2.filename],
240
236
  );
241
- responseJSON.consultationEdit.editStatus = true;
242
237
  setrefreshCount(refreshCount + 1);
243
238
  props.editStatus(1);
244
239
  props.data.usertype =
@@ -6,7 +6,7 @@ import HeaderBlock from '../Screens/HeaderBlock';
6
6
  import { useNavigation } from '../Navigation/useNavigation';
7
7
  import { Camera, getCameraDevice, useCameraDevices, useCameraFormat, useCodeScanner } from 'react-native-vision-camera';
8
8
  import CFooterView from '../CustomComponents/CFooterView';
9
- import { Global } from '../Common/Global';
9
+ import { Global } from '../../../../../src/Common/Global';
10
10
  import HOCIcons from '../HOC/HOCIcons';
11
11
  import PhotoEditor from 'react-native-photo-editor';
12
12
 
@@ -14,9 +14,9 @@ import CDetailView from '../CustomComponents/CDetailView';
14
14
  import CContainerView from '../CustomComponents/CContainerView';
15
15
  import HeaderBlock from '../Screens/HeaderBlock';
16
16
  import { normalize } from '../CommonStyle/componentStyle';
17
- import { imageURL } from '../Common/apiConstants';
17
+ import { imageURL } from '../../../../../src/Common/apiConstants';
18
18
  import FastImage from 'react-native-fast-image';
19
- import { Global } from '../Common/Global';
19
+ import { Global } from '../../../../../src/Common/Global';
20
20
  import { ArrayCheck, ValueCheck } from '../CommonStyle/ComponentFunctions';
21
21
  const { width } = Dimensions.get('window');
22
22
  const { height } = Dimensions.get('window');
@@ -18,11 +18,11 @@ import FontAwesome from 'react-native-vector-icons/FontAwesome';
18
18
  import { useNavigation } from '../Navigation/useNavigation';
19
19
 
20
20
 
21
- import { APIURL, EMRAPI, imageURL } from '../Common/apiConstants';
21
+ import { APIURL, EMRAPI, imageURL } from '../../../../../src/Common/apiConstants';
22
22
  import { isNU, LoaderIndicator, notifyMessage } from '../CommonStyle/ComponentFunctions';
23
23
  import ReactNativeBlobUtil from 'react-native-blob-util';
24
24
  //import PhotoEditor from 'react-native-photo-editor';
25
- import { Global } from '../Common/Global';
25
+ import { Global } from '../../../../../src/Common/Global';
26
26
 
27
27
  function CSingleImage(props) {
28
28
 
@@ -4,7 +4,7 @@ import VideoPlayer from 'react-native-video-controls';
4
4
  import { useNavigation } from '../Navigation/useNavigation';
5
5
 
6
6
 
7
- import { Global } from '../Common/Global';
7
+ import { Global } from '../../../../../src/Common/Global';
8
8
 
9
9
  export default function CVideoPlay(props) {
10
10
  // console.log("videoplayer", JSON.stringify(props))
@@ -13,24 +13,20 @@ import {
13
13
  ActivityIndicator,
14
14
  Platform,
15
15
  } from 'react-native';
16
- import {audioURL, pdfURL, APIURL} from '../Common/apiConstants';
16
+ import {audioURL, pdfURL, APIURL} from '../../../../../src/Common/apiConstants';
17
17
  import Fontisto from 'react-native-vector-icons/Fontisto';
18
18
  import AntDesign from 'react-native-vector-icons/AntDesign';
19
- import {Global} from '../Common/Global';
19
+ import {Global} from '../../../../../src/Common/Global';
20
20
  // import DocumentPicker from 'react-native-document-picker';
21
21
  import { useNavigation } from '../Navigation/useNavigation';
22
22
 
23
23
  import {notifyMessage} from '../CommonStyle/ComponentFunctions';
24
24
  import ReactNativeBlobUtil from 'react-native-blob-util';
25
25
  import NetworkServiceCall from '../Common/NetworkServiceCall';
26
- import EmrResponseComponentContext from '../Handlers/emrResponseComponentContext';
27
26
  import MaterialIcons from 'react-native-vector-icons/MaterialIcons';
28
27
  import FontAwesome from 'react-native-vector-icons/FontAwesome';
29
28
 
30
29
  function DocumentScreen(props) {
31
- const {responseJSON, setResponseJSON} = useContext(
32
- EmrResponseComponentContext,
33
- );
34
30
  const navigation = useNavigation();
35
31
  const windowWidth = Dimensions.get('window').width;
36
32
  const windowHeight = Dimensions.get('window').height;
@@ -230,7 +226,6 @@ function DocumentScreen(props) {
230
226
  ? prevData => [...prevData, dataset2.filename]
231
227
  : [dataset2.filename],
232
228
  );
233
- responseJSON.consultationEdit.editStatus = true;
234
229
  setrefreshCount(refreshCount + 1);
235
230
  props.editStatus(1);
236
231
  props.data.usertype =
@@ -15,7 +15,7 @@ import {
15
15
  import Fontisto from 'react-native-vector-icons/Fontisto';
16
16
  import CImageZoom from '../Media/CImageZoom';
17
17
  import AntDesign from 'react-native-vector-icons/AntDesign';
18
- import {APIURL, imageURL, drawingURL} from '../Common/apiConstants';
18
+ import {APIURL, imageURL, drawingURL} from '../../../../../src/Common/apiConstants';
19
19
  // import DocumentPicker from 'react-native-document-picker';
20
20
  import ComponentStyles, {normalize} from '../CommonStyle/componentStyle';
21
21
  import { useNavigation } from '../Navigation/useNavigation';
@@ -23,16 +23,12 @@ import { useNavigation } from '../Navigation/useNavigation';
23
23
  import {notifyMessage} from '../CommonStyle/ComponentFunctions';
24
24
  import ReactNativeBlobUtil from 'react-native-blob-util';
25
25
  import RNSketchCanvas from '@terrylinla/react-native-sketch-canvas';
26
- import EmrResponseComponentContext from '../Handlers/emrResponseComponentContext';
27
- import {Global} from '../Common/Global';
26
+ import {Global} from '../../../../../src/Common/Global';
28
27
  import FontAwesome from 'react-native-vector-icons/FontAwesome';
29
28
  import MaterialIcons from 'react-native-vector-icons/MaterialIcons';
30
29
 
31
30
  /*---------------------------------------------------------------------------------------*/
32
31
  function DrawingScreen(props) {
33
- const {responseJSON, setResponseJSON} = useContext(
34
- EmrResponseComponentContext,
35
- );
36
32
  const navigation = useNavigation();
37
33
  const windowWidth = Dimensions.get('window').width;
38
34
  const windowHeight = Dimensions.get('window').height;
@@ -15,7 +15,7 @@ import {
15
15
  import Fontisto from 'react-native-vector-icons/Fontisto';
16
16
  import CImageZoom from '../Media/CImageZoom';
17
17
  import AntDesign from 'react-native-vector-icons/AntDesign';
18
- import { APIURL, imageURLHIS } from '../Common/apiConstants';
18
+ import { APIURL, imageURLHIS } from '../../../../../src/Common/apiConstants';
19
19
  import DocumentPicker from 'react-native-document-picker';
20
20
  import { normalize } from '../CommonStyle/componentStyle';
21
21
  import { useNavigation } from '../Navigation/useNavigation';
@@ -23,14 +23,12 @@ import { useNavigation } from '../Navigation/useNavigation';
23
23
  import { notifyMessage } from '../CommonStyle/ComponentFunctions';
24
24
  import PhotoEditor from 'react-native-photo-editor';
25
25
  import ReactNativeBlobUtil from 'react-native-blob-util';
26
- import { Global } from '../Common/Global';
26
+ import { Global } from '../../../../../src/Common/Global';
27
27
  import NetworkServiceCall from '../Common/NetworkServiceCall';
28
28
  import SSpeedDial from '../StaticComponents/SSpeedDial';
29
- import EmrResponseComponentContext from '../Handlers/emrResponseComponentContext';
30
29
 
31
30
  /*---------------------------------------------------------------------------------------*/
32
31
  function ImageScreen(props) {
33
- const { responseJSON, setResponseJSON } = useContext(EmrResponseComponentContext);
34
32
  const navigation = useNavigation();
35
33
  const windowWidth = Dimensions.get('window').width;
36
34
  const windowHeight = Dimensions.get('window').height;
@@ -190,8 +188,6 @@ function ImageScreen(props) {
190
188
  dataset2.filename = responsedata.data.fileuri;
191
189
 
192
190
  setData(prev => [...prev, dataset2.filename]);
193
- responseJSON.consultationEdit.editStatus = true;
194
-
195
191
  props.editStatus(1);
196
192
  props.data.usertype =
197
193
  Global.PatientDetails?.usertype ?? 'Z';
@@ -14,7 +14,7 @@ import {
14
14
  } from 'react-native';
15
15
  // import AudioRecorderPlayer from 'react-native-audio-recorder-player';
16
16
  import Ionicons from 'react-native-vector-icons/Ionicons';
17
- import { AudioRecorder, AudioUtils } from 'react-native-audio';
17
+ // import { AudioRecorder, AudioUtils } from 'react-native-audio';
18
18
  import { Stopwatch, Timer } from 'react-native-stopwatch-timer';
19
19
  import FontAwesome from 'react-native-vector-icons/FontAwesome';
20
20
  // const audioRecorderPlayer = new AudioRecorderPlayer();
@@ -16,21 +16,17 @@ import {
16
16
  import Fontisto from 'react-native-vector-icons/Fontisto';
17
17
  import AntDesign from 'react-native-vector-icons/AntDesign';
18
18
  // import DocumentPicker from 'react-native-document-picker';
19
- import {videoURL, APIURL} from '../Common/apiConstants';
19
+ import {videoURL, APIURL} from '../../../../../src/Common/apiConstants';
20
20
  import { useNavigation } from '../Navigation/useNavigation';
21
21
 
22
22
  import ReactNativeBlobUtil from 'react-native-blob-util';
23
23
  import {isNU, notifyMessage} from '../CommonStyle/ComponentFunctions';
24
- import EmrResponseComponentContext from '../Handlers/emrResponseComponentContext';
25
- import {Global} from '../Common/Global';
24
+ import {Global} from '../../../../../src/Common/Global';
26
25
  import MaterialIcons from 'react-native-vector-icons/MaterialIcons';
27
26
  import FontAwesome from 'react-native-vector-icons/FontAwesome';
28
27
  import Ionicons from 'react-native-vector-icons/Ionicons';
29
28
 
30
29
  export default function VideoScreen(props) {
31
- const {responseJSON, setResponseJSON} = useContext(
32
- EmrResponseComponentContext,
33
- );
34
30
  const navigation = useNavigation();
35
31
  const windowWidth = Dimensions.get('window').width;
36
32
  const windowHeight = Dimensions.get('window').height;
@@ -249,7 +245,6 @@ export default function VideoScreen(props) {
249
245
  ? [...data, dataset2]
250
246
  : [dataset2],
251
247
  );
252
- responseJSON.consultationEdit.editStatus = true;
253
248
  setrefreshCount(refreshCount + 1);
254
249
  props.editStatus(1);
255
250
  setLoading(false);
@@ -0,0 +1,224 @@
1
+ import * as React from 'react';
2
+ import { createContext, useState, useRef, useEffect, useContext } from 'react';
3
+ import { View, Text, Button, Platform } from 'react-native';
4
+ import { NavigationContainer } from '@react-navigation/native';
5
+ import { createNativeStackNavigator } from '@react-navigation/native-stack';
6
+ import Splash from '../Screens/Splash';
7
+ import Login from '../Screens/Login';
8
+ import Dashboard from '../Screens/Dashboard';
9
+ import MoreOptionsScreen from '../Components/MoreOptionsScreen';
10
+ import Notifications from '../Screens/Notification';
11
+ import ForgotPassword from '../Screens/ForgotPassword';
12
+ import WrappedComponent from '../Components/WrappedComponent';
13
+ import PdfUnSavedViewer from '../Screens/PdfUnSavedViewer';
14
+ import PdfPreview from '../Screens/PdfPreview';
15
+ import PdfUnSavedViewerDownload from '../Screens/PdfUnsavedViewerDownload';
16
+ import SearchScreen from '../Screens/SearchScreen';
17
+ import FileExplorer from '../Screens/FileExplorer';
18
+ import BiodataEdit from '../Screens/BiodataEdit';
19
+ import CInvoiceQuantityVerificationScreen from '../CustomComponents/CInvoiceQuantityVerificationScreen';
20
+ import PDFScreen from '../Screens/PDFScreen';
21
+ import CInvoiceRateEntryScreen from '../CustomComponents/CInvoiceRateEntryScreen';
22
+ import CProductPhysicalQuantityScreen from '../CustomComponents/CProductPhysicalQuantityScreen';
23
+ import CSupplierList from '../Components/CSupplierList';
24
+ import CInvoiceRateVerificationScreen from '../CustomComponents/CInvoiceRateVerificationScreen';
25
+ import CInvoiceQualityEntryScreen from '../CustomComponents/CInvoiceQualityEntryScreen';
26
+ import CInvoiceQualityVerificationScreen from '../CustomComponents/CInvoiceQualityVerificationScreen';
27
+ import CPurchaseDetails from '../CustomComponents/CPurchaseDetails';
28
+ import CStockAdjustScreen from '../CustomComponents/CStockAdjustScreen';
29
+ import CSupplierInvoiceList from '../CustomComponents/CSupplierInvoiceList';
30
+ import CCaptureImageWithoutEdit from '../Media/CCaptureImageWithoutEdit';
31
+ import HtmlPreview from '../Screens/HtmlPreview';
32
+
33
+ //////////////////////////////////////////////////////////////////
34
+ // -------- Web Navigation (Your Custom Stack) -------------------
35
+ //////////////////////////////////////////////////////////////////
36
+
37
+ const screens = {
38
+ Splash,
39
+ Login,
40
+ Dashboard,
41
+ MoreOptionsScreen,
42
+ Notifications,
43
+ ForgotPassword,
44
+ WrappedComponent,
45
+ PdfUnSavedViewer,
46
+ PdfPreview,
47
+ PdfUnSavedViewerDownload,
48
+ SearchScreen,
49
+ FileExplorer,
50
+ BiodataEdit,
51
+ CInvoiceQuantityVerificationScreen,
52
+ PDFScreen,
53
+ CInvoiceRateEntryScreen,
54
+ CProductPhysicalQuantityScreen,
55
+ CPurchaseDetails,
56
+ CSupplierList,
57
+ CInvoiceRateVerificationScreen,
58
+ CInvoiceQualityEntryScreen,
59
+ CInvoiceQualityVerificationScreen,
60
+ CStockAdjustScreen,
61
+ CSupplierInvoiceList,
62
+ CCaptureImageWithoutEdit,
63
+ HtmlPreview,
64
+ };
65
+
66
+ const NavigationContext = createContext(null);
67
+
68
+ export const NavigationProvider = ({ children }) => {
69
+ const [stack, setStack] = useState([{ name: 'Splash', params: {} }]);
70
+ const focusListeners = useRef({});
71
+
72
+ const current = stack[stack.length - 1];
73
+
74
+ const navigate = (screenName, params = {}) => {
75
+ setStack(prev => [...prev, { name: screenName, params }]);
76
+ };
77
+
78
+ const replace = (screenName, params = {}) => {
79
+ setStack(prev => [...prev.slice(0, -1), { name: screenName, params }]);
80
+ };
81
+
82
+ const goBack = () => {
83
+ if (stack.length > 1) {setStack(prev => prev.slice(0, -1));}
84
+ };
85
+
86
+ const addFocusListener = (screenName, callback) => {
87
+ if (!focusListeners.current[screenName]) {focusListeners.current[screenName] = [];}
88
+ focusListeners.current[screenName].push(callback);
89
+ return () => {
90
+ focusListeners.current[screenName] = focusListeners.current[screenName].filter(cb => cb !== callback);
91
+ };
92
+ };
93
+
94
+ useEffect(() => {
95
+ const listeners = focusListeners.current[current.name] || [];
96
+ listeners.forEach(cb => cb());
97
+ }, [current.name]);
98
+
99
+ return (
100
+ <NavigationContext.Provider
101
+ value={{ navigate, goBack, replace, addFocusListener, current }}
102
+ >
103
+ <View style={{ flex: 1 }}>
104
+ {stack.map((route, index) => {
105
+ const ScreenComponent = screens[route.name];
106
+ const isFocused = index === stack.length - 1;
107
+
108
+ return (
109
+ <View
110
+ key={index}
111
+ style={{
112
+ flex: 1,
113
+ display: isFocused ? 'flex' : 'none',
114
+ }}
115
+ >
116
+ <ScreenComponent
117
+ navigation={{ navigate, replace, goBack }}
118
+ route={{ params: route.params }}
119
+ />
120
+ </View>
121
+ );
122
+ })}
123
+
124
+ {children}
125
+ </View>
126
+ </NavigationContext.Provider>
127
+ );
128
+ };
129
+
130
+ export const useNavigation = () => {
131
+ const ctx = useContext(NavigationContext);
132
+ if (!ctx) {throw new Error('useNavigation must be used inside NavigationProvider');}
133
+ return ctx;
134
+ };
135
+
136
+ export const useFocusEffect = (callback) => {
137
+ const { current, addFocusListener } = useNavigation();
138
+ const cleanupRef = useRef(null);
139
+
140
+ useEffect(() => {
141
+ cleanupRef.current?.();
142
+ const unsubscribe = addFocusListener(current.name, () => {
143
+ cleanupRef.current?.();
144
+ cleanupRef.current = callback();
145
+ });
146
+ return () => {
147
+ cleanupRef.current?.();
148
+ unsubscribe?.();
149
+ };
150
+ }, [current.name]);
151
+ };
152
+
153
+ // Hook to check if the current screen is focused
154
+ export const useIsFocused = () => {
155
+ const { current, addFocusListener } = useNavigation();
156
+ const [isFocused, setIsFocused] = useState(true);
157
+
158
+ useEffect(() => {
159
+ // Initial check
160
+ setIsFocused(true);
161
+
162
+ // Subscribe to focus changes
163
+ const unsubscribe = addFocusListener(current.name, () => {
164
+ setIsFocused(true);
165
+ });
166
+
167
+ // When the screen loses focus, we mark it as not focused
168
+ return () => {
169
+ setIsFocused(false);
170
+ unsubscribe();
171
+ };
172
+ }, [current.name]);
173
+
174
+ return isFocused;
175
+ };
176
+
177
+ export const ReactNativeNavigation = () => {
178
+ const Stack = createNativeStackNavigator();
179
+
180
+ return (
181
+ <NavigationContainer>
182
+ <Stack.Navigator
183
+ initialRouteName="Splash"
184
+ screenOptions={{
185
+ animation: 'none',
186
+ headerShown: false,
187
+ }}
188
+ >
189
+ <Stack.Screen name="Splash" component={Splash} />
190
+ <Stack.Screen name="Login" component={Login} />
191
+ <Stack.Screen name="Dashboard" component={Dashboard} />
192
+ <Stack.Screen name="MoreOptionsScreen" component={MoreOptionsScreen} />
193
+ <Stack.Screen name="Notifications" component={Notifications} />
194
+ <Stack.Screen name="ForgotPassword" component={ForgotPassword} />
195
+ <Stack.Screen name="WrappedComponent" component={WrappedComponent} />
196
+ <Stack.Screen name="PdfUnSavedViewer" component={PdfUnSavedViewer} />
197
+ <Stack.Screen name="PdfPreview" component={PdfPreview} />
198
+ <Stack.Screen name="PdfUnSavedViewerDownload" component={PdfUnSavedViewerDownload} />
199
+ <Stack.Screen name="SearchScreen" component={SearchScreen} />
200
+ <Stack.Screen name="FileExplorer" component={FileExplorer} />
201
+ <Stack.Screen name="BiodataEdit" component={BiodataEdit} />
202
+ <Stack.Screen name="CInvoiceQuantityVerificationScreen" component={CInvoiceQuantityVerificationScreen} />
203
+ <Stack.Screen name="PDFScreen" component={PDFScreen} />
204
+ <Stack.Screen name="CInvoiceRateEntryScreen" component={CInvoiceRateEntryScreen} />
205
+ <Stack.Screen name="CProductPhysicalQuantityScreen" component={CProductPhysicalQuantityScreen} />
206
+ <Stack.Screen name="CPurchaseDetails" component={CPurchaseDetails} />
207
+ <Stack.Screen name="CSupplierList" component={CSupplierList} />
208
+ <Stack.Screen name="CInvoiceRateVerificationScreen" component={CInvoiceRateVerificationScreen} />
209
+ <Stack.Screen name="CInvoiceQualityEntryScreen" component={CInvoiceQualityEntryScreen} />
210
+ <Stack.Screen name="CInvoiceQualityVerificationScreen" component={CInvoiceQualityVerificationScreen} />
211
+ <Stack.Screen name="CStockAdjustScreen" component={CStockAdjustScreen} />
212
+ <Stack.Screen name="CSupplierInvoiceList" component={CSupplierInvoiceList} />
213
+ <Stack.Screen name="CCaptureImageWithoutEdit" component={CCaptureImageWithoutEdit} />
214
+ <Stack.Screen name="HtmlPreview" component={HtmlPreview} />
215
+ </Stack.Navigator>
216
+ </NavigationContainer>
217
+ );
218
+ };
219
+
220
+ export default function Navigation() {
221
+
222
+ return Platform.OS === 'web' ? <NavigationProvider /> : <ReactNativeNavigation />;
223
+ }
224
+
@@ -0,0 +1,2 @@
1
+
2
+ export { useFocusEffect } from './PageNavigation';
@@ -0,0 +1 @@
1
+ export { useFocusEffect } from '@react-navigation/native';
@@ -0,0 +1 @@
1
+ export { useFocusEffect } from './PageNavigation';
@@ -0,0 +1 @@
1
+ export { useIsFocused } from './PageNavigation';
@@ -0,0 +1 @@
1
+ export { useIsFocused } from '@react-navigation/native';
@@ -0,0 +1 @@
1
+ export { useIsFocused } from './PageNavigation';
@@ -0,0 +1,2 @@
1
+
2
+ export { useNavigation } from './PageNavigation';
@@ -0,0 +1 @@
1
+ export { useNavigation } from '@react-navigation/native';
@@ -0,0 +1 @@
1
+ export { useNavigation } from './PageNavigation';