@os1-platform/dispatch-mobile 1.3.11 → 2.0.0

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 (619) hide show
  1. package/README.md +198 -30
  2. package/android/.gradle/7.0.2/fileHashes/fileHashes.lock +0 -0
  3. package/android/.gradle/7.2/dependencies-accessors/dependencies-accessors.lock +0 -0
  4. package/android/.gradle/7.2/executionHistory/executionHistory.bin +0 -0
  5. package/android/.gradle/7.2/executionHistory/executionHistory.lock +0 -0
  6. package/android/.gradle/7.2/fileChanges/last-build.bin +0 -0
  7. package/android/.gradle/7.2/fileHashes/fileHashes.bin +0 -0
  8. package/android/.gradle/7.2/fileHashes/fileHashes.lock +0 -0
  9. package/android/.gradle/7.2/fileHashes/resourceHashesCache.bin +0 -0
  10. package/android/.gradle/7.2/gc.properties +0 -0
  11. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  12. package/android/.gradle/buildOutputCleanup/cache.properties +2 -2
  13. package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
  14. package/android/.gradle/checksums/checksums.lock +0 -0
  15. package/android/.gradle/checksums/md5-checksums.bin +0 -0
  16. package/android/.gradle/checksums/sha1-checksums.bin +0 -0
  17. package/android/.idea/compiler.xml +6 -0
  18. package/android/.idea/gradle.xml +6 -1
  19. package/android/.idea/jarRepositories.xml +35 -0
  20. package/android/.idea/kotlinc.xml +6 -0
  21. package/android/.idea/misc.xml +6 -1
  22. package/android/local.properties +1 -1
  23. package/android/src/main/java/com/dispatchsdk/DispatchSdkPackage.kt +3 -1
  24. package/android/src/main/java/com/dispatchsdk/sharedPref/SharedPreferenceModule.kt +166 -0
  25. package/lib/commonjs/@types/assets/index.d.js +2 -0
  26. package/lib/commonjs/@types/assets/index.d.js.map +1 -0
  27. package/lib/commonjs/components/dispatch/DispatchExecNavigator.js +4 -4
  28. package/lib/commonjs/components/dispatch/DispatchExecNavigator.js.map +1 -1
  29. package/lib/commonjs/components/executiontasks/ExecutionTasksIndex.js +0 -28
  30. package/lib/commonjs/components/executiontasks/ExecutionTasksIndex.js.map +1 -1
  31. package/lib/commonjs/components/executiontasks/cancellation/CancelET.js.map +1 -1
  32. package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js +35 -35
  33. package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js.map +1 -1
  34. package/lib/commonjs/components/executiontasks/captureInput/utils.js +13 -0
  35. package/lib/commonjs/components/executiontasks/captureInput/utils.js.map +1 -0
  36. package/lib/commonjs/components/executiontasks/deliver/DeliverET.js +2 -2
  37. package/lib/commonjs/components/executiontasks/deliver/DeliverET.js.map +1 -1
  38. package/lib/commonjs/components/executiontasks/deliver/DeliverETInput.js.map +1 -1
  39. package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js +187 -112
  40. package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
  41. package/lib/commonjs/components/executiontasks/display/DisplayModalET.js +16 -16
  42. package/lib/commonjs/components/executiontasks/display/DisplayModalET.js.map +1 -1
  43. package/lib/commonjs/components/executiontasks/doodle/SignatureET.js +37 -34
  44. package/lib/commonjs/components/executiontasks/doodle/SignatureET.js.map +1 -1
  45. package/lib/commonjs/components/executiontasks/dropCash/DropCashET.js +2 -2
  46. package/lib/commonjs/components/executiontasks/dropCash/DropCashET.js.map +1 -1
  47. package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js +52 -52
  48. package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
  49. package/lib/commonjs/components/executiontasks/forms/FormGenerator.js +71 -66
  50. package/lib/commonjs/components/executiontasks/forms/FormGenerator.js.map +1 -1
  51. package/lib/commonjs/components/executiontasks/forms/widgets/DateTimeWidget.js.map +1 -1
  52. package/lib/commonjs/components/executiontasks/forms/widgets/DropdownWidget.js.map +1 -1
  53. package/lib/commonjs/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js +1 -1
  54. package/lib/commonjs/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js.map +1 -1
  55. package/lib/commonjs/components/executiontasks/forms/widgets/TimeRangeSelector.js.map +1 -1
  56. package/lib/commonjs/components/executiontasks/httpRequest/HttpEtUtils.js +2 -2
  57. package/lib/commonjs/components/executiontasks/httpRequest/HttpEtUtils.js.map +1 -1
  58. package/lib/commonjs/components/executiontasks/httpRequest/HttpRequestET.js +3 -3
  59. package/lib/commonjs/components/executiontasks/httpRequest/HttpRequestET.js.map +1 -1
  60. package/lib/commonjs/components/executiontasks/imageCapture/CaptureSchema.js.map +1 -1
  61. package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js +6 -3
  62. package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
  63. package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js +34 -34
  64. package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
  65. package/lib/commonjs/components/executiontasks/payments/PaymentUtils.js.map +1 -1
  66. package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js +54 -54
  67. package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
  68. package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js +33 -33
  69. package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
  70. package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js +33 -33
  71. package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
  72. package/lib/commonjs/components/executiontasks/pickup/PickupET.js +2 -2
  73. package/lib/commonjs/components/executiontasks/pickup/PickupET.js.map +1 -1
  74. package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js +112 -47
  75. package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js.map +1 -1
  76. package/lib/commonjs/components/executiontasks/scan/ScanET.js +326 -428
  77. package/lib/commonjs/components/executiontasks/scan/ScanET.js.map +1 -1
  78. package/lib/commonjs/components/executiontasks/scan/ScanSchema.js +13 -0
  79. package/lib/commonjs/components/executiontasks/scan/ScanSchema.js.map +1 -1
  80. package/lib/commonjs/components/executiontasks/scan/interfaces.js +15 -1
  81. package/lib/commonjs/components/executiontasks/scan/interfaces.js.map +1 -1
  82. package/lib/commonjs/components/executiontasks/scan/modalConstant.js +104 -0
  83. package/lib/commonjs/components/executiontasks/scan/modalConstant.js.map +1 -0
  84. package/lib/commonjs/components/executiontasks/scan/sub_components/CScanner.js.map +1 -1
  85. package/lib/commonjs/components/executiontasks/scan/sub_components/DropDownUtils.js +72 -37
  86. package/lib/commonjs/components/executiontasks/scan/sub_components/DropDownUtils.js.map +1 -1
  87. package/lib/commonjs/components/executiontasks/scan/sub_components/ERDropDown.js +9 -7
  88. package/lib/commonjs/components/executiontasks/scan/sub_components/ERDropDown.js.map +1 -1
  89. package/lib/commonjs/components/executiontasks/scan/sub_components/SummaryPage.js +1099 -0
  90. package/lib/commonjs/components/executiontasks/scan/sub_components/SummaryPage.js.map +1 -0
  91. package/lib/commonjs/components/executiontasks/scan/utils.js +548 -159
  92. package/lib/commonjs/components/executiontasks/scan/utils.js.map +1 -1
  93. package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPET.js +52 -53
  94. package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPET.js.map +1 -1
  95. package/lib/commonjs/components/executiontasks/validateOTP/sub-components/OTPInput.js +4 -0
  96. package/lib/commonjs/components/executiontasks/validateOTP/sub-components/OTPInput.js.map +1 -1
  97. package/lib/commonjs/components/executiontasks/validateOTP/utils.js.map +1 -1
  98. package/lib/commonjs/components/executiontasks/verifyLocation/GeofenceUtils.js.map +1 -1
  99. package/lib/commonjs/components/executiontasks/verifyLocation/VerifyLocationET.js +1 -1
  100. package/lib/commonjs/components/executiontasks/verifyLocation/VerifyLocationET.js.map +1 -1
  101. package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpET.js +1 -1
  102. package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpET.js.map +1 -1
  103. package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpSchema.js.map +1 -1
  104. package/lib/commonjs/components/utils/index.js +14 -0
  105. package/lib/commonjs/components/utils/index.js.map +1 -0
  106. package/lib/commonjs/components/widgets/AlertDisplay.js.map +1 -1
  107. package/lib/commonjs/components/widgets/CancelOrderDialog.js.map +1 -1
  108. package/lib/commonjs/components/widgets/Card.js +88 -0
  109. package/lib/commonjs/components/widgets/Card.js.map +1 -0
  110. package/lib/commonjs/components/widgets/GoBackModal.js +48 -0
  111. package/lib/commonjs/components/widgets/GoBackModal.js.map +1 -0
  112. package/lib/commonjs/components/widgets/IconButton.js.map +1 -1
  113. package/lib/commonjs/components/widgets/ModalWidget.js +99 -0
  114. package/lib/commonjs/components/widgets/ModalWidget.js.map +1 -0
  115. package/lib/commonjs/components/widgets/ProgressDialog.js.map +1 -1
  116. package/lib/commonjs/components/widgets/SearchBar.js +74 -0
  117. package/lib/commonjs/components/widgets/SearchBar.js.map +1 -0
  118. package/lib/commonjs/components/widgets/SnackBarCustom.js +12 -4
  119. package/lib/commonjs/components/widgets/SnackBarCustom.js.map +1 -1
  120. package/lib/commonjs/components/widgets/SplitTextInput.js.map +1 -1
  121. package/lib/commonjs/components/widgets/TabsComponent.js +64 -0
  122. package/lib/commonjs/components/widgets/TabsComponent.js.map +1 -0
  123. package/lib/commonjs/constants/apiConstants.js +3 -1
  124. package/lib/commonjs/constants/apiConstants.js.map +1 -1
  125. package/lib/commonjs/constants/constants.js +2 -2
  126. package/lib/commonjs/constants/constants.js.map +1 -1
  127. package/lib/commonjs/events/EventDispatcher.js +1 -5
  128. package/lib/commonjs/events/EventDispatcher.js.map +1 -1
  129. package/lib/commonjs/events/constants.js +3 -1
  130. package/lib/commonjs/events/constants.js.map +1 -1
  131. package/lib/commonjs/events/interface.js.map +1 -1
  132. package/lib/commonjs/index.js +32 -13
  133. package/lib/commonjs/index.js.map +1 -1
  134. package/lib/commonjs/manager/dispatch/DispatchStateContainer.js +315 -609
  135. package/lib/commonjs/manager/dispatch/DispatchStateContainer.js.map +1 -1
  136. package/lib/commonjs/manager/dispatchCodes/EventCodeContainer.js.map +1 -1
  137. package/lib/commonjs/manager/dispatchCodes/EventCodeRepo.js.map +1 -1
  138. package/lib/commonjs/manager/dispatchCodes/ReasonCodeContainer.js.map +1 -1
  139. package/lib/commonjs/manager/dispatchCodes/ReasonCodeRepo.js.map +1 -1
  140. package/lib/commonjs/manager/jobRemoval/JobRemovalManager.js +21 -25
  141. package/lib/commonjs/manager/jobRemoval/JobRemovalManager.js.map +1 -1
  142. package/lib/commonjs/manager/location/LocationManager.js.map +1 -1
  143. package/lib/commonjs/manager/sdk/DispatchSDKManager.js +15 -1
  144. package/lib/commonjs/manager/sdk/DispatchSDKManager.js.map +1 -1
  145. package/lib/commonjs/manager/sdk/DispatchSdkCache.js +2 -2
  146. package/lib/commonjs/manager/sdk/DispatchSdkCache.js.map +1 -1
  147. package/lib/commonjs/manager/sdk/callbacksHandler.js +26 -0
  148. package/lib/commonjs/manager/sdk/callbacksHandler.js.map +1 -0
  149. package/lib/commonjs/manager/syncmanager/AppSyncManager.js +15 -1
  150. package/lib/commonjs/manager/syncmanager/AppSyncManager.js.map +1 -1
  151. package/lib/commonjs/manager/syncmanager/DBConfig.js +36 -3
  152. package/lib/commonjs/manager/syncmanager/DBConfig.js.map +1 -1
  153. package/lib/commonjs/manager/syncmanager/constants.js +17 -0
  154. package/lib/commonjs/manager/syncmanager/constants.js.map +1 -0
  155. package/lib/commonjs/manager/syncmanager/database.js.map +1 -1
  156. package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js +11 -17
  157. package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js.map +1 -1
  158. package/lib/commonjs/manager/syncmanager/document/DocumentManager.js +5 -6
  159. package/lib/commonjs/manager/syncmanager/document/DocumentManager.js.map +1 -1
  160. package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js +16 -6
  161. package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
  162. package/lib/commonjs/manager/syncmanager/events/ETEventsManager.js +377 -26
  163. package/lib/commonjs/manager/syncmanager/events/ETEventsManager.js.map +1 -1
  164. package/lib/commonjs/manager/syncmanager/events/EventsSyncManager.js +183 -65
  165. package/lib/commonjs/manager/syncmanager/events/EventsSyncManager.js.map +1 -1
  166. package/lib/commonjs/manager/syncmanager/events/SyncHttpClient.js +150 -37
  167. package/lib/commonjs/manager/syncmanager/events/SyncHttpClient.js.map +1 -1
  168. package/lib/commonjs/models/DispatchModels.js.map +1 -1
  169. package/lib/commonjs/models/execTasks/ETBaseModels.js +4 -0
  170. package/lib/commonjs/models/execTasks/ETBaseModels.js.map +1 -1
  171. package/lib/commonjs/models/sdk.js.map +1 -1
  172. package/lib/commonjs/native/signature/SignatureCapture.js.map +1 -1
  173. package/lib/commonjs/network/GraphQLClient.js.map +1 -1
  174. package/lib/commonjs/network/NetworkClient.js.map +1 -1
  175. package/lib/commonjs/network/NetworkUtils.js.map +1 -1
  176. package/lib/commonjs/network/client.js.map +1 -1
  177. package/lib/commonjs/resources/Login.js.map +1 -1
  178. package/lib/commonjs/resources/network.js.map +1 -1
  179. package/lib/commonjs/styles/SdkColors.js +4 -2
  180. package/lib/commonjs/styles/SdkColors.js.map +1 -1
  181. package/lib/commonjs/styles/executionTasks/CommonStyles.js +19 -10
  182. package/lib/commonjs/styles/executionTasks/CommonStyles.js.map +1 -1
  183. package/lib/commonjs/ui/screens/CancellationScreen.js +38 -7
  184. package/lib/commonjs/ui/screens/CancellationScreen.js.map +1 -1
  185. package/lib/commonjs/ui/screens/CaptureInputScreen.js +11 -3
  186. package/lib/commonjs/ui/screens/CaptureInputScreen.js.map +1 -1
  187. package/lib/commonjs/ui/screens/CompleteObjectiveScreen.js +11 -4
  188. package/lib/commonjs/ui/screens/CompleteObjectiveScreen.js.map +1 -1
  189. package/lib/commonjs/ui/screens/DeliverScreen.js +26 -4
  190. package/lib/commonjs/ui/screens/DeliverScreen.js.map +1 -1
  191. package/lib/commonjs/ui/screens/DisplayScreen.js +11 -2
  192. package/lib/commonjs/ui/screens/DisplayScreen.js.map +1 -1
  193. package/lib/commonjs/ui/screens/DoodleScreen.js +13 -6
  194. package/lib/commonjs/ui/screens/DoodleScreen.js.map +1 -1
  195. package/lib/commonjs/ui/screens/DropCashScreen.js +39 -15
  196. package/lib/commonjs/ui/screens/DropCashScreen.js.map +1 -1
  197. package/lib/commonjs/ui/screens/ETScreensIndex.js +0 -7
  198. package/lib/commonjs/ui/screens/ETScreensIndex.js.map +1 -1
  199. package/lib/commonjs/ui/screens/FormsScreen.js +95 -28
  200. package/lib/commonjs/ui/screens/FormsScreen.js.map +1 -1
  201. package/lib/commonjs/ui/screens/GeofenceScreen.js +10 -2
  202. package/lib/commonjs/ui/screens/GeofenceScreen.js.map +1 -1
  203. package/lib/commonjs/ui/screens/HttpRequestScreen.js +10 -2
  204. package/lib/commonjs/ui/screens/HttpRequestScreen.js.map +1 -1
  205. package/lib/commonjs/ui/screens/ImageCaptureScreen.js +26 -18
  206. package/lib/commonjs/ui/screens/ImageCaptureScreen.js.map +1 -1
  207. package/lib/commonjs/ui/screens/PaymentScreen.js +22 -11
  208. package/lib/commonjs/ui/screens/PaymentScreen.js.map +1 -1
  209. package/lib/commonjs/ui/screens/PickupScreen.js +34 -8
  210. package/lib/commonjs/ui/screens/PickupScreen.js.map +1 -1
  211. package/lib/commonjs/ui/screens/ScanScreen.js +72 -219
  212. package/lib/commonjs/ui/screens/ScanScreen.js.map +1 -1
  213. package/lib/commonjs/ui/screens/StartWorkFlowScreen.js +51 -16
  214. package/lib/commonjs/ui/screens/StartWorkFlowScreen.js.map +1 -1
  215. package/lib/commonjs/ui/screens/ValidateOTPScreen.js +13 -7
  216. package/lib/commonjs/ui/screens/ValidateOTPScreen.js.map +1 -1
  217. package/lib/commonjs/ui/screens/WithBaseDispatchScreen.js.map +1 -1
  218. package/lib/commonjs/ui/uiConfig/RouteParams.js +20 -5
  219. package/lib/commonjs/ui/uiConfig/RouteParams.js.map +1 -1
  220. package/lib/commonjs/utils/ApiUtils.js +16 -2
  221. package/lib/commonjs/utils/ApiUtils.js.map +1 -1
  222. package/lib/commonjs/utils/ExecTaskUtils.js +33 -25
  223. package/lib/commonjs/utils/ExecTaskUtils.js.map +1 -1
  224. package/lib/commonjs/utils/Logger.js.map +1 -1
  225. package/lib/commonjs/utils/NetworkUtil.js.map +1 -1
  226. package/lib/commonjs/utils/SdkUtils.js.map +1 -1
  227. package/lib/commonjs/utils/SyncManagerUtils.js +37 -4
  228. package/lib/commonjs/utils/SyncManagerUtils.js.map +1 -1
  229. package/lib/commonjs/utils/fcm/FCM.js +64 -35
  230. package/lib/commonjs/utils/fcm/FCM.js.map +1 -1
  231. package/lib/commonjs/utils/fcm/FcmUtils.js +82 -46
  232. package/lib/commonjs/utils/fcm/FcmUtils.js.map +1 -1
  233. package/lib/commonjs/utils/helper.js.map +1 -1
  234. package/lib/commonjs/utils/hooks/useModal.js +53 -0
  235. package/lib/commonjs/utils/hooks/useModal.js.map +1 -0
  236. package/lib/commonjs/utils/loginHelper.js.map +1 -1
  237. package/lib/commonjs/utils/storage.js +37 -2
  238. package/lib/commonjs/utils/storage.js.map +1 -1
  239. package/lib/commonjs/utils/utils.js.map +1 -1
  240. package/lib/module/@types/assets/index.d.js +2 -0
  241. package/lib/module/@types/assets/index.d.js.map +1 -0
  242. package/lib/module/components/dispatch/DispatchExecNavigator.js +4 -4
  243. package/lib/module/components/dispatch/DispatchExecNavigator.js.map +1 -1
  244. package/lib/module/components/executiontasks/ExecutionTasksIndex.js +1 -5
  245. package/lib/module/components/executiontasks/ExecutionTasksIndex.js.map +1 -1
  246. package/lib/module/components/executiontasks/cancellation/CancelET.js.map +1 -1
  247. package/lib/module/components/executiontasks/captureInput/CaptureText.js +38 -37
  248. package/lib/module/components/executiontasks/captureInput/CaptureText.js.map +1 -1
  249. package/lib/module/components/executiontasks/captureInput/utils.js +7 -0
  250. package/lib/module/components/executiontasks/captureInput/utils.js.map +1 -0
  251. package/lib/module/components/executiontasks/deliver/DeliverET.js +2 -2
  252. package/lib/module/components/executiontasks/deliver/DeliverET.js.map +1 -1
  253. package/lib/module/components/executiontasks/deliver/DeliverETInput.js.map +1 -1
  254. package/lib/module/components/executiontasks/deliver/SLDeliverET.js +189 -114
  255. package/lib/module/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
  256. package/lib/module/components/executiontasks/display/DisplayModalET.js +16 -16
  257. package/lib/module/components/executiontasks/display/DisplayModalET.js.map +1 -1
  258. package/lib/module/components/executiontasks/doodle/SignatureET.js +39 -36
  259. package/lib/module/components/executiontasks/doodle/SignatureET.js.map +1 -1
  260. package/lib/module/components/executiontasks/dropCash/DropCashET.js +2 -2
  261. package/lib/module/components/executiontasks/dropCash/DropCashET.js.map +1 -1
  262. package/lib/module/components/executiontasks/dropCash/SLDropCash.js +53 -52
  263. package/lib/module/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
  264. package/lib/module/components/executiontasks/forms/FormGenerator.js +73 -68
  265. package/lib/module/components/executiontasks/forms/FormGenerator.js.map +1 -1
  266. package/lib/module/components/executiontasks/forms/widgets/DateTimeWidget.js.map +1 -1
  267. package/lib/module/components/executiontasks/forms/widgets/DropdownWidget.js.map +1 -1
  268. package/lib/module/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js +1 -1
  269. package/lib/module/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js.map +1 -1
  270. package/lib/module/components/executiontasks/forms/widgets/TimeRangeSelector.js.map +1 -1
  271. package/lib/module/components/executiontasks/httpRequest/HttpEtUtils.js +3 -3
  272. package/lib/module/components/executiontasks/httpRequest/HttpEtUtils.js.map +1 -1
  273. package/lib/module/components/executiontasks/httpRequest/HttpRequestET.js +3 -3
  274. package/lib/module/components/executiontasks/httpRequest/HttpRequestET.js.map +1 -1
  275. package/lib/module/components/executiontasks/imageCapture/CaptureSchema.js.map +1 -1
  276. package/lib/module/components/executiontasks/imageCapture/CaptureUtils.js +6 -3
  277. package/lib/module/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
  278. package/lib/module/components/executiontasks/imageCapture/ImageCapture.js +36 -36
  279. package/lib/module/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
  280. package/lib/module/components/executiontasks/payments/PaymentUtils.js.map +1 -1
  281. package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentET.js +55 -54
  282. package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
  283. package/lib/module/components/executiontasks/payments/init/InitPaymentET.js +35 -34
  284. package/lib/module/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
  285. package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentET.js +35 -35
  286. package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
  287. package/lib/module/components/executiontasks/pickup/PickupET.js +2 -2
  288. package/lib/module/components/executiontasks/pickup/PickupET.js.map +1 -1
  289. package/lib/module/components/executiontasks/pickup/SLPickupET.js +114 -49
  290. package/lib/module/components/executiontasks/pickup/SLPickupET.js.map +1 -1
  291. package/lib/module/components/executiontasks/scan/ScanET.js +332 -433
  292. package/lib/module/components/executiontasks/scan/ScanET.js.map +1 -1
  293. package/lib/module/components/executiontasks/scan/ScanSchema.js +16 -1
  294. package/lib/module/components/executiontasks/scan/ScanSchema.js.map +1 -1
  295. package/lib/module/components/executiontasks/scan/interfaces.js +12 -0
  296. package/lib/module/components/executiontasks/scan/interfaces.js.map +1 -1
  297. package/lib/module/components/executiontasks/scan/modalConstant.js +94 -0
  298. package/lib/module/components/executiontasks/scan/modalConstant.js.map +1 -0
  299. package/lib/module/components/executiontasks/scan/sub_components/CScanner.js.map +1 -1
  300. package/lib/module/components/executiontasks/scan/sub_components/DropDownUtils.js +72 -37
  301. package/lib/module/components/executiontasks/scan/sub_components/DropDownUtils.js.map +1 -1
  302. package/lib/module/components/executiontasks/scan/sub_components/ERDropDown.js +9 -7
  303. package/lib/module/components/executiontasks/scan/sub_components/ERDropDown.js.map +1 -1
  304. package/lib/module/components/executiontasks/scan/sub_components/SummaryPage.js +1092 -0
  305. package/lib/module/components/executiontasks/scan/sub_components/SummaryPage.js.map +1 -0
  306. package/lib/module/components/executiontasks/scan/utils.js +528 -160
  307. package/lib/module/components/executiontasks/scan/utils.js.map +1 -1
  308. package/lib/module/components/executiontasks/validateOTP/ValidateOTPET.js +54 -55
  309. package/lib/module/components/executiontasks/validateOTP/ValidateOTPET.js.map +1 -1
  310. package/lib/module/components/executiontasks/validateOTP/sub-components/OTPInput.js +4 -0
  311. package/lib/module/components/executiontasks/validateOTP/sub-components/OTPInput.js.map +1 -1
  312. package/lib/module/components/executiontasks/validateOTP/utils.js.map +1 -1
  313. package/lib/module/components/executiontasks/verifyLocation/GeofenceUtils.js.map +1 -1
  314. package/lib/module/components/executiontasks/verifyLocation/VerifyLocationET.js +1 -1
  315. package/lib/module/components/executiontasks/verifyLocation/VerifyLocationET.js.map +1 -1
  316. package/lib/module/components/executiontasks/verifyOtp/VerifyOtpET.js +2 -2
  317. package/lib/module/components/executiontasks/verifyOtp/VerifyOtpET.js.map +1 -1
  318. package/lib/module/components/executiontasks/verifyOtp/VerifyOtpSchema.js.map +1 -1
  319. package/lib/module/components/utils/index.js +8 -0
  320. package/lib/module/components/utils/index.js.map +1 -0
  321. package/lib/module/components/widgets/AlertDisplay.js.map +1 -1
  322. package/lib/module/components/widgets/CancelOrderDialog.js.map +1 -1
  323. package/lib/module/components/widgets/Card.js +80 -0
  324. package/lib/module/components/widgets/Card.js.map +1 -0
  325. package/lib/module/components/widgets/GoBackModal.js +40 -0
  326. package/lib/module/components/widgets/GoBackModal.js.map +1 -0
  327. package/lib/module/components/widgets/IconButton.js.map +1 -1
  328. package/lib/module/components/widgets/ModalWidget.js +92 -0
  329. package/lib/module/components/widgets/ModalWidget.js.map +1 -0
  330. package/lib/module/components/widgets/ProgressDialog.js.map +1 -1
  331. package/lib/module/components/widgets/SearchBar.js +66 -0
  332. package/lib/module/components/widgets/SearchBar.js.map +1 -0
  333. package/lib/module/components/widgets/SnackBarCustom.js +12 -4
  334. package/lib/module/components/widgets/SnackBarCustom.js.map +1 -1
  335. package/lib/module/components/widgets/SplitTextInput.js.map +1 -1
  336. package/lib/module/components/widgets/TabsComponent.js +55 -0
  337. package/lib/module/components/widgets/TabsComponent.js.map +1 -0
  338. package/lib/module/constants/apiConstants.js +3 -1
  339. package/lib/module/constants/apiConstants.js.map +1 -1
  340. package/lib/module/constants/constants.js +2 -2
  341. package/lib/module/constants/constants.js.map +1 -1
  342. package/lib/module/events/EventDispatcher.js +0 -3
  343. package/lib/module/events/EventDispatcher.js.map +1 -1
  344. package/lib/module/events/constants.js +3 -1
  345. package/lib/module/events/constants.js.map +1 -1
  346. package/lib/module/events/interface.js.map +1 -1
  347. package/lib/module/index.js +6 -3
  348. package/lib/module/index.js.map +1 -1
  349. package/lib/module/manager/dispatch/DispatchStateContainer.js +319 -610
  350. package/lib/module/manager/dispatch/DispatchStateContainer.js.map +1 -1
  351. package/lib/module/manager/dispatchCodes/EventCodeContainer.js.map +1 -1
  352. package/lib/module/manager/dispatchCodes/EventCodeRepo.js.map +1 -1
  353. package/lib/module/manager/dispatchCodes/ReasonCodeContainer.js.map +1 -1
  354. package/lib/module/manager/dispatchCodes/ReasonCodeRepo.js.map +1 -1
  355. package/lib/module/manager/jobRemoval/JobRemovalManager.js +21 -19
  356. package/lib/module/manager/jobRemoval/JobRemovalManager.js.map +1 -1
  357. package/lib/module/manager/location/LocationManager.js.map +1 -1
  358. package/lib/module/manager/sdk/DispatchSDKManager.js +15 -1
  359. package/lib/module/manager/sdk/DispatchSDKManager.js.map +1 -1
  360. package/lib/module/manager/sdk/DispatchSdkCache.js +2 -2
  361. package/lib/module/manager/sdk/DispatchSdkCache.js.map +1 -1
  362. package/lib/module/manager/sdk/callbacksHandler.js +19 -0
  363. package/lib/module/manager/sdk/callbacksHandler.js.map +1 -0
  364. package/lib/module/manager/syncmanager/AppSyncManager.js +15 -1
  365. package/lib/module/manager/syncmanager/AppSyncManager.js.map +1 -1
  366. package/lib/module/manager/syncmanager/DBConfig.js +32 -2
  367. package/lib/module/manager/syncmanager/DBConfig.js.map +1 -1
  368. package/lib/module/manager/syncmanager/constants.js +6 -0
  369. package/lib/module/manager/syncmanager/constants.js.map +1 -0
  370. package/lib/module/manager/syncmanager/database.js.map +1 -1
  371. package/lib/module/manager/syncmanager/document/DocumentHttpClient.js +11 -17
  372. package/lib/module/manager/syncmanager/document/DocumentHttpClient.js.map +1 -1
  373. package/lib/module/manager/syncmanager/document/DocumentManager.js +5 -6
  374. package/lib/module/manager/syncmanager/document/DocumentManager.js.map +1 -1
  375. package/lib/module/manager/syncmanager/document/DocumentSyncManager.js +16 -6
  376. package/lib/module/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
  377. package/lib/module/manager/syncmanager/events/ETEventsManager.js +377 -25
  378. package/lib/module/manager/syncmanager/events/ETEventsManager.js.map +1 -1
  379. package/lib/module/manager/syncmanager/events/EventsSyncManager.js +183 -65
  380. package/lib/module/manager/syncmanager/events/EventsSyncManager.js.map +1 -1
  381. package/lib/module/manager/syncmanager/events/SyncHttpClient.js +147 -34
  382. package/lib/module/manager/syncmanager/events/SyncHttpClient.js.map +1 -1
  383. package/lib/module/models/DispatchModels.js.map +1 -1
  384. package/lib/module/models/execTasks/ETBaseModels.js +1 -1
  385. package/lib/module/models/execTasks/ETBaseModels.js.map +1 -1
  386. package/lib/module/models/sdk.js.map +1 -1
  387. package/lib/module/native/signature/SignatureCapture.js.map +1 -1
  388. package/lib/module/network/GraphQLClient.js.map +1 -1
  389. package/lib/module/network/NetworkClient.js.map +1 -1
  390. package/lib/module/network/NetworkUtils.js.map +1 -1
  391. package/lib/module/network/client.js.map +1 -1
  392. package/lib/module/resources/Login.js.map +1 -1
  393. package/lib/module/resources/network.js.map +1 -1
  394. package/lib/module/styles/SdkColors.js +4 -2
  395. package/lib/module/styles/SdkColors.js.map +1 -1
  396. package/lib/module/styles/executionTasks/CommonStyles.js +19 -10
  397. package/lib/module/styles/executionTasks/CommonStyles.js.map +1 -1
  398. package/lib/module/ui/screens/CancellationScreen.js +39 -8
  399. package/lib/module/ui/screens/CancellationScreen.js.map +1 -1
  400. package/lib/module/ui/screens/CaptureInputScreen.js +12 -4
  401. package/lib/module/ui/screens/CaptureInputScreen.js.map +1 -1
  402. package/lib/module/ui/screens/CompleteObjectiveScreen.js +12 -5
  403. package/lib/module/ui/screens/CompleteObjectiveScreen.js.map +1 -1
  404. package/lib/module/ui/screens/DeliverScreen.js +27 -5
  405. package/lib/module/ui/screens/DeliverScreen.js.map +1 -1
  406. package/lib/module/ui/screens/DisplayScreen.js +12 -3
  407. package/lib/module/ui/screens/DisplayScreen.js.map +1 -1
  408. package/lib/module/ui/screens/DoodleScreen.js +14 -7
  409. package/lib/module/ui/screens/DoodleScreen.js.map +1 -1
  410. package/lib/module/ui/screens/DropCashScreen.js +42 -16
  411. package/lib/module/ui/screens/DropCashScreen.js.map +1 -1
  412. package/lib/module/ui/screens/ETScreensIndex.js +1 -2
  413. package/lib/module/ui/screens/ETScreensIndex.js.map +1 -1
  414. package/lib/module/ui/screens/FormsScreen.js +96 -29
  415. package/lib/module/ui/screens/FormsScreen.js.map +1 -1
  416. package/lib/module/ui/screens/GeofenceScreen.js +11 -3
  417. package/lib/module/ui/screens/GeofenceScreen.js.map +1 -1
  418. package/lib/module/ui/screens/HttpRequestScreen.js +11 -3
  419. package/lib/module/ui/screens/HttpRequestScreen.js.map +1 -1
  420. package/lib/module/ui/screens/ImageCaptureScreen.js +27 -19
  421. package/lib/module/ui/screens/ImageCaptureScreen.js.map +1 -1
  422. package/lib/module/ui/screens/PaymentScreen.js +23 -12
  423. package/lib/module/ui/screens/PaymentScreen.js.map +1 -1
  424. package/lib/module/ui/screens/PickupScreen.js +36 -10
  425. package/lib/module/ui/screens/PickupScreen.js.map +1 -1
  426. package/lib/module/ui/screens/ScanScreen.js +74 -222
  427. package/lib/module/ui/screens/ScanScreen.js.map +1 -1
  428. package/lib/module/ui/screens/StartWorkFlowScreen.js +51 -16
  429. package/lib/module/ui/screens/StartWorkFlowScreen.js.map +1 -1
  430. package/lib/module/ui/screens/ValidateOTPScreen.js +14 -8
  431. package/lib/module/ui/screens/ValidateOTPScreen.js.map +1 -1
  432. package/lib/module/ui/screens/WithBaseDispatchScreen.js.map +1 -1
  433. package/lib/module/ui/uiConfig/RouteParams.js +19 -5
  434. package/lib/module/ui/uiConfig/RouteParams.js.map +1 -1
  435. package/lib/module/utils/ApiUtils.js +17 -2
  436. package/lib/module/utils/ApiUtils.js.map +1 -1
  437. package/lib/module/utils/ExecTaskUtils.js +33 -25
  438. package/lib/module/utils/ExecTaskUtils.js.map +1 -1
  439. package/lib/module/utils/Logger.js.map +1 -1
  440. package/lib/module/utils/NetworkUtil.js.map +1 -1
  441. package/lib/module/utils/SdkUtils.js.map +1 -1
  442. package/lib/module/utils/SyncManagerUtils.js +37 -4
  443. package/lib/module/utils/SyncManagerUtils.js.map +1 -1
  444. package/lib/module/utils/fcm/FCM.js +64 -35
  445. package/lib/module/utils/fcm/FCM.js.map +1 -1
  446. package/lib/module/utils/fcm/FcmUtils.js +82 -46
  447. package/lib/module/utils/fcm/FcmUtils.js.map +1 -1
  448. package/lib/module/utils/helper.js.map +1 -1
  449. package/lib/module/utils/hooks/useModal.js +43 -0
  450. package/lib/module/utils/hooks/useModal.js.map +1 -0
  451. package/lib/module/utils/loginHelper.js.map +1 -1
  452. package/lib/module/utils/storage.js +37 -2
  453. package/lib/module/utils/storage.js.map +1 -1
  454. package/lib/module/utils/utils.js.map +1 -1
  455. package/lib/typescript/components/dispatch/DispatchExecNavigator.d.ts +2 -2
  456. package/lib/typescript/components/executiontasks/ExecutionTasksIndex.d.ts +3 -8
  457. package/lib/typescript/components/executiontasks/cancellation/CancelET.d.ts +2 -2
  458. package/lib/typescript/components/executiontasks/captureInput/CaptureText.d.ts +2 -2
  459. package/lib/typescript/components/executiontasks/captureInput/utils.d.ts +1 -0
  460. package/lib/typescript/components/executiontasks/deliver/DeliverET.d.ts +2 -2
  461. package/lib/typescript/components/executiontasks/deliver/DeliverETInput.d.ts +1 -0
  462. package/lib/typescript/components/executiontasks/deliver/SLDeliverET.d.ts +3 -3
  463. package/lib/typescript/components/executiontasks/display/DisplayModalET.d.ts +2 -2
  464. package/lib/typescript/components/executiontasks/doodle/SignatureET.d.ts +2 -2
  465. package/lib/typescript/components/executiontasks/dropCash/DropCashET.d.ts +2 -2
  466. package/lib/typescript/components/executiontasks/dropCash/SLDropCash.d.ts +2 -2
  467. package/lib/typescript/components/executiontasks/forms/FormGenerator.d.ts +2 -2
  468. package/lib/typescript/components/executiontasks/forms/widgets/DateTimeWidget.d.ts +2 -2
  469. package/lib/typescript/components/executiontasks/forms/widgets/DropdownWidget.d.ts +2 -2
  470. package/lib/typescript/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.d.ts +2 -2
  471. package/lib/typescript/components/executiontasks/forms/widgets/TimeRangeSelector.d.ts +2 -2
  472. package/lib/typescript/components/executiontasks/httpRequest/HttpEtUtils.d.ts +1 -1
  473. package/lib/typescript/components/executiontasks/httpRequest/HttpRequestET.d.ts +2 -2
  474. package/lib/typescript/components/executiontasks/imageCapture/CaptureSchema.d.ts +1 -0
  475. package/lib/typescript/components/executiontasks/imageCapture/ImageCapture.d.ts +2 -2
  476. package/lib/typescript/components/executiontasks/payments/completePayment/CompletePaymentET.d.ts +2 -2
  477. package/lib/typescript/components/executiontasks/payments/init/InitPaymentET.d.ts +2 -2
  478. package/lib/typescript/components/executiontasks/payments/processPayment/ProcessPaymentET.d.ts +2 -2
  479. package/lib/typescript/components/executiontasks/pickup/PickupET.d.ts +2 -2
  480. package/lib/typescript/components/executiontasks/pickup/SLPickupET.d.ts +3 -3
  481. package/lib/typescript/components/executiontasks/scan/ScanET.d.ts +3 -3
  482. package/lib/typescript/components/executiontasks/scan/ScanSchema.d.ts +25 -9
  483. package/lib/typescript/components/executiontasks/scan/interfaces.d.ts +54 -1
  484. package/lib/typescript/components/executiontasks/scan/modalConstant.d.ts +37 -0
  485. package/lib/typescript/components/executiontasks/scan/sub_components/CScanner.d.ts +1 -1
  486. package/lib/typescript/components/executiontasks/scan/sub_components/DropDownUtils.d.ts +1 -1
  487. package/lib/typescript/components/executiontasks/scan/sub_components/ERDropDown.d.ts +1 -1
  488. package/lib/typescript/components/executiontasks/scan/sub_components/SummaryPage.d.ts +21 -0
  489. package/lib/typescript/components/executiontasks/scan/utils.d.ts +29 -13
  490. package/lib/typescript/components/executiontasks/validateOTP/ValidateOTPET.d.ts +2 -2
  491. package/lib/typescript/components/executiontasks/validateOTP/sub-components/OTPInput.d.ts +2 -2
  492. package/lib/typescript/components/executiontasks/verifyLocation/VerifyLocationET.d.ts +2 -2
  493. package/lib/typescript/components/executiontasks/verifyOtp/VerifyOtpET.d.ts +2 -2
  494. package/lib/typescript/components/executiontasks/verifyOtp/VerifyOtpSchema.d.ts +3 -3
  495. package/lib/typescript/components/utils/index.d.ts +2 -0
  496. package/lib/typescript/components/widgets/CancelOrderDialog.d.ts +2 -2
  497. package/lib/typescript/components/widgets/Card.d.ts +17 -0
  498. package/lib/typescript/components/widgets/GoBackModal.d.ts +9 -0
  499. package/lib/typescript/components/widgets/IconButton.d.ts +2 -2
  500. package/lib/typescript/components/widgets/ModalWidget.d.ts +30 -0
  501. package/lib/typescript/components/widgets/ProgressDialog.d.ts +2 -2
  502. package/lib/typescript/components/widgets/SearchBar.d.ts +10 -0
  503. package/lib/typescript/components/widgets/SnackBarCustom.d.ts +3 -2
  504. package/lib/typescript/components/widgets/SplitTextInput.d.ts +2 -2
  505. package/lib/typescript/components/widgets/TabsComponent.d.ts +15 -0
  506. package/lib/typescript/constants/apiConstants.d.ts +1 -0
  507. package/lib/typescript/constants/constants.d.ts +2 -2
  508. package/lib/typescript/events/EventDispatcher.d.ts +0 -2
  509. package/lib/typescript/events/constants.d.ts +2 -0
  510. package/lib/typescript/events/interface.d.ts +1 -1
  511. package/lib/typescript/index.d.ts +8 -6
  512. package/lib/typescript/manager/dispatch/DispatchStateContainer.d.ts +27 -19
  513. package/lib/typescript/manager/jobRemoval/JobRemovalManager.d.ts +0 -6
  514. package/lib/typescript/manager/sdk/DispatchSdkCache.d.ts +0 -1
  515. package/lib/typescript/manager/sdk/callbacksHandler.d.ts +13 -0
  516. package/lib/typescript/manager/syncmanager/AppSyncManager.d.ts +2 -1
  517. package/lib/typescript/manager/syncmanager/DBConfig.d.ts +63 -7
  518. package/lib/typescript/manager/syncmanager/constants.d.ts +5 -0
  519. package/lib/typescript/manager/syncmanager/document/DocumentManager.d.ts +1 -1
  520. package/lib/typescript/manager/syncmanager/document/DocumentSyncManager.d.ts +1 -1
  521. package/lib/typescript/manager/syncmanager/events/ETEventsManager.d.ts +11 -2
  522. package/lib/typescript/manager/syncmanager/events/EventsSyncManager.d.ts +3 -5
  523. package/lib/typescript/manager/syncmanager/events/SyncHttpClient.d.ts +4 -3
  524. package/lib/typescript/models/DispatchModels.d.ts +40 -41
  525. package/lib/typescript/models/execTasks/ETBaseModels.d.ts +21 -16
  526. package/lib/typescript/models/sdk.d.ts +7 -0
  527. package/lib/typescript/native/signature/SignatureCapture.d.ts +1 -1
  528. package/lib/typescript/styles/SdkColors.d.ts +1 -0
  529. package/lib/typescript/styles/executionTasks/CommonStyles.d.ts +16 -7
  530. package/lib/typescript/ui/screens/CancellationScreen.d.ts +2 -2
  531. package/lib/typescript/ui/screens/CaptureInputScreen.d.ts +2 -2
  532. package/lib/typescript/ui/screens/CompleteObjectiveScreen.d.ts +2 -2
  533. package/lib/typescript/ui/screens/DeliverScreen.d.ts +2 -2
  534. package/lib/typescript/ui/screens/DisplayScreen.d.ts +2 -2
  535. package/lib/typescript/ui/screens/DoodleScreen.d.ts +2 -2
  536. package/lib/typescript/ui/screens/DropCashScreen.d.ts +2 -2
  537. package/lib/typescript/ui/screens/ETScreensIndex.d.ts +1 -2
  538. package/lib/typescript/ui/screens/FormsScreen.d.ts +2 -2
  539. package/lib/typescript/ui/screens/GeofenceScreen.d.ts +2 -2
  540. package/lib/typescript/ui/screens/HttpRequestScreen.d.ts +1 -1
  541. package/lib/typescript/ui/screens/ImageCaptureScreen.d.ts +2 -2
  542. package/lib/typescript/ui/screens/PaymentScreen.d.ts +2 -2
  543. package/lib/typescript/ui/screens/PickupScreen.d.ts +2 -2
  544. package/lib/typescript/ui/screens/ScanScreen.d.ts +2 -2
  545. package/lib/typescript/ui/screens/StartWorkFlowScreen.d.ts +2 -2
  546. package/lib/typescript/ui/screens/ValidateOTPScreen.d.ts +2 -2
  547. package/lib/typescript/ui/screens/WithBaseDispatchScreen.d.ts +2 -2
  548. package/lib/typescript/ui/uiConfig/RouteParams.d.ts +10 -4
  549. package/lib/typescript/utils/ExecTaskUtils.d.ts +5 -4
  550. package/lib/typescript/utils/SyncManagerUtils.d.ts +4 -5
  551. package/lib/typescript/utils/hooks/useModal.d.ts +6 -0
  552. package/lib/typescript/utils/storage.d.ts +15 -0
  553. package/package.json +5 -4
  554. package/tsconfig.json +0 -1
  555. package/android/.gradle/6.8/fileHashes/fileHashes.lock +0 -0
  556. package/android/.idea/workspace.xml +0 -131
  557. package/lib/commonjs/components/executiontasks/doodle/DoodleUtils.js +0 -26
  558. package/lib/commonjs/components/executiontasks/doodle/DoodleUtils.js.map +0 -1
  559. package/lib/commonjs/components/executiontasks/scan/sub_components/ScanList.js +0 -134
  560. package/lib/commonjs/components/executiontasks/scan/sub_components/ScanList.js.map +0 -1
  561. package/lib/commonjs/components/executiontasks/scanner/CScanner.js +0 -105
  562. package/lib/commonjs/components/executiontasks/scanner/CScanner.js.map +0 -1
  563. package/lib/commonjs/components/executiontasks/scanner/ScannerSchema.js +0 -27
  564. package/lib/commonjs/components/executiontasks/scanner/ScannerSchema.js.map +0 -1
  565. package/lib/commonjs/components/executiontasks/scanner/ScannerUtils.js +0 -164
  566. package/lib/commonjs/components/executiontasks/scanner/ScannerUtils.js.map +0 -1
  567. package/lib/commonjs/components/executiontasks/scanner/returns/DropDownSelector.js +0 -15
  568. package/lib/commonjs/components/executiontasks/scanner/returns/DropDownSelector.js.map +0 -1
  569. package/lib/commonjs/components/executiontasks/scanner/returns/DropDownUtils.js +0 -40
  570. package/lib/commonjs/components/executiontasks/scanner/returns/DropDownUtils.js.map +0 -1
  571. package/lib/commonjs/components/executiontasks/scanner/returns/RTReasonSelection.js +0 -93
  572. package/lib/commonjs/components/executiontasks/scanner/returns/RTReasonSelection.js.map +0 -1
  573. package/lib/commonjs/components/executiontasks/scanner/returns/RTScan.js +0 -278
  574. package/lib/commonjs/components/executiontasks/scanner/returns/RTScan.js.map +0 -1
  575. package/lib/commonjs/components/executiontasks/scanner/returns/ReasonDropDown.js +0 -83
  576. package/lib/commonjs/components/executiontasks/scanner/returns/ReasonDropDown.js.map +0 -1
  577. package/lib/commonjs/components/executiontasks/scanner/returns/ScanList.js +0 -248
  578. package/lib/commonjs/components/executiontasks/scanner/returns/ScanList.js.map +0 -1
  579. package/lib/commonjs/ui/screens/RTScanScreen.js +0 -99
  580. package/lib/commonjs/ui/screens/RTScanScreen.js.map +0 -1
  581. package/lib/module/components/executiontasks/doodle/DoodleUtils.js +0 -19
  582. package/lib/module/components/executiontasks/doodle/DoodleUtils.js.map +0 -1
  583. package/lib/module/components/executiontasks/scan/sub_components/ScanList.js +0 -124
  584. package/lib/module/components/executiontasks/scan/sub_components/ScanList.js.map +0 -1
  585. package/lib/module/components/executiontasks/scanner/CScanner.js +0 -96
  586. package/lib/module/components/executiontasks/scanner/CScanner.js.map +0 -1
  587. package/lib/module/components/executiontasks/scanner/ScannerSchema.js +0 -24
  588. package/lib/module/components/executiontasks/scanner/ScannerSchema.js.map +0 -1
  589. package/lib/module/components/executiontasks/scanner/ScannerUtils.js +0 -146
  590. package/lib/module/components/executiontasks/scanner/ScannerUtils.js.map +0 -1
  591. package/lib/module/components/executiontasks/scanner/returns/DropDownSelector.js +0 -7
  592. package/lib/module/components/executiontasks/scanner/returns/DropDownSelector.js.map +0 -1
  593. package/lib/module/components/executiontasks/scanner/returns/DropDownUtils.js +0 -33
  594. package/lib/module/components/executiontasks/scanner/returns/DropDownUtils.js.map +0 -1
  595. package/lib/module/components/executiontasks/scanner/returns/RTReasonSelection.js +0 -83
  596. package/lib/module/components/executiontasks/scanner/returns/RTReasonSelection.js.map +0 -1
  597. package/lib/module/components/executiontasks/scanner/returns/RTScan.js +0 -269
  598. package/lib/module/components/executiontasks/scanner/returns/RTScan.js.map +0 -1
  599. package/lib/module/components/executiontasks/scanner/returns/ReasonDropDown.js +0 -73
  600. package/lib/module/components/executiontasks/scanner/returns/ReasonDropDown.js.map +0 -1
  601. package/lib/module/components/executiontasks/scanner/returns/ScanList.js +0 -238
  602. package/lib/module/components/executiontasks/scanner/returns/ScanList.js.map +0 -1
  603. package/lib/module/ui/screens/RTScanScreen.js +0 -89
  604. package/lib/module/ui/screens/RTScanScreen.js.map +0 -1
  605. package/lib/typescript/components/executiontasks/doodle/DoodleUtils.d.ts +0 -3
  606. package/lib/typescript/components/executiontasks/scan/sub_components/ScanList.d.ts +0 -8
  607. package/lib/typescript/components/executiontasks/scanner/CScanner.d.ts +0 -7
  608. package/lib/typescript/components/executiontasks/scanner/ScannerSchema.d.ts +0 -75
  609. package/lib/typescript/components/executiontasks/scanner/ScannerUtils.d.ts +0 -15
  610. package/lib/typescript/components/executiontasks/scanner/returns/DropDownSelector.d.ts +0 -3
  611. package/lib/typescript/components/executiontasks/scanner/returns/DropDownUtils.d.ts +0 -2
  612. package/lib/typescript/components/executiontasks/scanner/returns/RTReasonSelection.d.ts +0 -7
  613. package/lib/typescript/components/executiontasks/scanner/returns/RTScan.d.ts +0 -4
  614. package/lib/typescript/components/executiontasks/scanner/returns/ReasonDropDown.d.ts +0 -14
  615. package/lib/typescript/components/executiontasks/scanner/returns/ScanList.d.ts +0 -17
  616. package/lib/typescript/ui/screens/RTScanScreen.d.ts +0 -3
  617. /package/android/.gradle/{6.8 → 7.0.2}/fileChanges/last-build.bin +0 -0
  618. /package/android/.gradle/{6.8 → 7.0.2}/gc.properties +0 -0
  619. /package/android/.gradle/{configuration-cache → 7.2/dependencies-accessors}/gc.properties +0 -0
@@ -1,3 +1,3 @@
1
- /// <reference types="react" />
2
- declare const _default: (props: any) => JSX.Element;
1
+ import React from 'react';
2
+ declare const _default: (props: any) => React.JSX.Element;
3
3
  export default _default;
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
- declare const _default: (props: any) => JSX.Element;
2
+ declare const _default: (props: any) => import("react").JSX.Element;
3
3
  export default _default;
@@ -1,3 +1,3 @@
1
- /// <reference types="react" />
2
- declare const _default: (props: any) => JSX.Element;
1
+ import React from 'react';
2
+ declare const _default: (props: any) => React.JSX.Element;
3
3
  export default _default;
@@ -1,3 +1,3 @@
1
- /// <reference types="react" />
2
- declare const _default: (props: any) => JSX.Element;
1
+ import React from 'react';
2
+ declare const _default: (props: any) => React.JSX.Element;
3
3
  export default _default;
@@ -1,3 +1,3 @@
1
- /// <reference types="react" />
2
- declare const _default: (props: any) => JSX.Element;
1
+ import React from 'react';
2
+ declare const _default: (props: any) => React.JSX.Element;
3
3
  export default _default;
@@ -1,3 +1,3 @@
1
- /// <reference types="react" />
2
- declare const _default: (props: any) => JSX.Element;
1
+ import React from 'react';
2
+ declare const _default: (props: any) => React.JSX.Element;
3
3
  export default _default;
@@ -1,3 +1,3 @@
1
- /// <reference types="react" />
2
- declare const _default: (props: any) => JSX.Element;
1
+ import React from 'react';
2
+ declare const _default: (props: any) => React.JSX.Element;
3
3
  export default _default;
@@ -1,3 +1,3 @@
1
- /// <reference types="react" />
2
- declare const _default: (props: any) => JSX.Element;
1
+ import React from 'react';
2
+ declare const _default: (props: any) => React.JSX.Element;
3
3
  export default _default;
@@ -1,3 +1,3 @@
1
- /// <reference types="react" />
2
- declare const withBaseDispatchScreen: (WrappedComponent: any) => (props: any) => JSX.Element;
1
+ import React from 'react';
2
+ declare const withBaseDispatchScreen: (WrappedComponent: any) => (props: any) => React.JSX.Element;
3
3
  export default withBaseDispatchScreen;
@@ -1,3 +1,4 @@
1
+ import { IDispatch } from '@os1-platform/platform-coreos-execution-engine-sdk';
1
2
  export declare const RouteParams: {
2
3
  NEXT_STATES: string;
3
4
  REASONS: string;
@@ -5,12 +6,17 @@ export declare const RouteParams: {
5
6
  ET_SUCCESS_RESPONSE: string;
6
7
  CURRENT_ET_NAME: string;
7
8
  IS_LAST_ET: string;
8
- PENDING_STATES: string;
9
9
  EVENT_CODES: string;
10
10
  APPLICABLE_CODES: string;
11
- IS_JOB_BASED_OUTPUT: string;
11
+ IS_MERGED_OBJ_BASED_OUTPUT: string;
12
12
  ROOT_META_DATA: string;
13
- COMPLETED_STATES: string;
14
- PENDING_STATES_OUTPUT: string;
15
13
  CANCEL_EVENT: string;
14
+ HAS_MULTIPLE_ET: string;
15
+ };
16
+ export declare function getDataFromNextState(nextState: IDispatch.IExecutionTaskQueryResponse): {
17
+ input: any;
18
+ taskMeta: any;
19
+ mergedObjectiveId: string[];
20
+ wfMeta: any;
21
+ taskName: string;
16
22
  };
@@ -1,12 +1,13 @@
1
1
  import type { BaseETResponse } from '../models/execTasks/ETBaseModels';
2
2
  import type { CompletedWFResponse } from '../components/executiontasks/CompletedWFSchema';
3
- import type { stateWithObjRef } from '../models/DispatchModels';
4
- export declare function getBaseETResponse(entityCode: string, success: boolean, eventCode: string, reasonCode: string): Promise<BaseETResponse>;
5
- export declare function getObjectiveCompleteResp(entityCode: string, success: boolean, eventCode: string, reasonCode: string): Promise<CompletedWFResponse>;
3
+ import { ExecutionTaskID } from '../models/execTasks/ETConfig';
4
+ import { IDispatch } from '@os1-platform/platform-coreos-execution-engine-sdk';
5
+ export declare function getBaseETResponse(entityCode: string, success: boolean, eventCode: string, reasonCode: string, mergedObjectiveIds: Array<string>, taskId: ExecutionTaskID): Promise<BaseETResponse>;
6
+ export declare function getObjectiveCompleteResp(entityCode: string, success: boolean, eventCode: string, reasonCode: string, mergedObjectiveId: Array<string>, taskId: ExecutionTaskID): Promise<CompletedWFResponse>;
6
7
  export declare function getEntityCodeByET(etId: string): string;
7
8
  /**
8
9
  * This function will be called on start of every execution task and is being used in ET screens components.
9
10
  * @param eventData nextState: state | objRef: string | jobId: string
10
11
  */
11
- export declare function onTaskStart(eventData: stateWithObjRef[], triggerEvent?: boolean): void;
12
+ export declare function onTaskStart(eventData: IDispatch.IExecutionTaskQueryResponse, customData: any, triggerEvent?: boolean): void;
12
13
  export declare function handleDynamicValues(jsonInput: any, dataBlob: any): any;
@@ -1,12 +1,11 @@
1
- import type { SyncType } from '@os1-platform/mobile-execution-lib';
2
- import type { BulkEvent } from '../manager/syncmanager/DBConfig';
3
- export declare function pushEventForSync(syncType: SyncType, dspID: string, data: string, config: any, sequence: number, meta?: any): Promise<boolean>;
4
- export declare function pushBulkEventForSync(pushData: BulkEvent[]): Promise<boolean>;
1
+ import type { BulkEvent, ExecEngineSyncType } from '../manager/syncmanager/DBConfig';
2
+ export declare function pushEventForSync(syncType: ExecEngineSyncType, dspID: string, data: string, config: any, sequence: number, meta?: any): Promise<boolean>;
3
+ export declare function pushBulkEventForSync(pushData: BulkEvent): Promise<boolean>;
5
4
  /**
6
5
  * clears synced events from Sync & Document manager
7
6
  * @param dspID
8
7
  * @private
9
8
  */
10
9
  export declare function clearCache(dspID: string): Promise<void>;
11
- export declare function insertDocumentInDB(fileName: string, fmsFolderName: string, jobID: string, objRef: string, base64Image: string | null, imageDesc: string, filePath: string | null): Promise<number | undefined>;
10
+ export declare function insertDocumentInDB(fileName: string, fmsFolderName: string, base64Image: string | null, imageDesc: string, filePath: string | null): Promise<number | undefined>;
12
11
  export declare function createFmsFolder(dispatchID: string): Promise<void>;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ /// <reference types="react" />
3
+ import { ModalProps } from '../../components/widgets/ModalWidget';
4
+ export type ModalHookProps = Omit<ModalProps, 'showModal'>;
5
+ declare const useModal: (props: ModalHookProps) => [() => void, () => void, () => JSX.Element, any];
6
+ export default useModal;
@@ -62,5 +62,20 @@ declare class Storage {
62
62
  deleteItem(key: string): Promise<void>;
63
63
  deleteMultiple(keys: string[]): Promise<void>;
64
64
  getAllKeys(prefix: string): Promise<string[]>;
65
+ /**
66
+ * Shared preferences
67
+ */
68
+ setSharedItem(key: string, value: string): Promise<void>;
69
+ setSharedItems(items: {
70
+ key: string;
71
+ value: string;
72
+ }[]): Promise<void>;
73
+ getSharedItem(key: string): Promise<string>;
74
+ getSharedItems(key: string[]): Promise<string[][]>;
75
+ getSharedAll(): Promise<[][]>;
76
+ getAllSharedKeys(): Promise<string[]>;
77
+ clearShared(): Promise<void>;
78
+ removeSharedItem(key: string): Promise<void>;
79
+ removeSharedItems(key: string[]): Promise<void>;
65
80
  }
66
81
  export default Storage;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@os1-platform/dispatch-mobile",
3
- "version": "1.3.11",
3
+ "version": "2.0.0",
4
4
  "description": "Dispatch SDK React Native Package",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -83,7 +83,7 @@
83
83
  "eslint": "^7.32.0",
84
84
  "eslint-config-prettier": "^7.0.0",
85
85
  "eslint-plugin-prettier": "^3.1.3",
86
- "expo": "~43.0.4",
86
+ "expo": "~47.0.13",
87
87
  "expo-barcode-scanner": "~11.2.1",
88
88
  "expo-blur": "~11.0.0",
89
89
  "expo-camera": "~12.1.2",
@@ -92,7 +92,7 @@
92
92
  "expo-image-manipulator": "~10.1.2",
93
93
  "expo-image-picker": "~11.0.3",
94
94
  "expo-location": "~13.0.4",
95
- "expo-sqlite": "~10.0.3",
95
+ "expo-sqlite": "~11.0.0",
96
96
  "graphql": "^16.2.0",
97
97
  "husky": "^4.2.5",
98
98
  "jest": "^26.6.3",
@@ -245,7 +245,7 @@
245
245
  ]
246
246
  },
247
247
  "dependencies": {
248
- "@os1-platform/mobile-execution-lib": "^2.0.1",
248
+ "@os1-platform/platform-coreos-execution-engine-sdk": "^1.0.0",
249
249
  "@rjsf/core": "^2.0.0",
250
250
  "decompress": "^4.2.1",
251
251
  "json-logic-js": "^2.0.1",
@@ -254,6 +254,7 @@
254
254
  "lodash": "^4.17.21",
255
255
  "react-native-otp-textinput": "0.0.8",
256
256
  "react-native-svg": "^13.6.0",
257
+ "recyclerlistview": "^4.2.0",
257
258
  "rjsf-native": "^1.0.14"
258
259
  }
259
260
  }
package/tsconfig.json CHANGED
@@ -7,7 +7,6 @@
7
7
  "allowUnreachableCode": false,
8
8
  "allowUnusedLabels": true,
9
9
  "esModuleInterop": true,
10
- "importsNotUsedAsValues": "error",
11
10
  "forceConsistentCasingInFileNames": true,
12
11
  "jsx": "react-native",
13
12
  "lib": ["esnext", "ES6"],
@@ -1,131 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="AndroidLayouts">
4
- <shared>
5
- <config />
6
- </shared>
7
- </component>
8
- <component name="AutoImportSettings">
9
- <option name="autoReloadType" value="NONE" />
10
- </component>
11
- <component name="ChangeListManager">
12
- <list default="true" id="9e0b05bf-ee06-4169-bdda-4954b118eea2" name="Changes" comment="">
13
- <change beforePath="$PROJECT_DIR$/src/main/java/com/dispatchsdk/sharedPref/SharedPreferenceModule.kt" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/dispatchsdk/sharedPref/SharedPreferenceModule.kt" afterDir="false" />
14
- <change beforePath="$PROJECT_DIR$/../example/env.json" beforeDir="false" afterPath="$PROJECT_DIR$/../example/env.json" afterDir="false" />
15
- <change beforePath="$PROJECT_DIR$/../example/src/TaskDetail.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/../example/src/TaskDetail.tsx" afterDir="false" />
16
- <change beforePath="$PROJECT_DIR$/../src/manager/dispatch/DispatchStateContainer.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/../src/manager/dispatch/DispatchStateContainer.tsx" afterDir="false" />
17
- <change beforePath="$PROJECT_DIR$/../src/manager/sdk/DispatchSDKManager.ts" beforeDir="false" afterPath="$PROJECT_DIR$/../src/manager/sdk/DispatchSDKManager.ts" afterDir="false" />
18
- <change beforePath="$PROJECT_DIR$/../src/models/sdk.ts" beforeDir="false" afterPath="$PROJECT_DIR$/../src/models/sdk.ts" afterDir="false" />
19
- <change beforePath="$PROJECT_DIR$/../src/utils/storage.ts" beforeDir="false" afterPath="$PROJECT_DIR$/../src/utils/storage.ts" afterDir="false" />
20
- </list>
21
- <option name="SHOW_DIALOG" value="false" />
22
- <option name="HIGHLIGHT_CONFLICTS" value="true" />
23
- <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
24
- <option name="LAST_RESOLUTION" value="IGNORE" />
25
- </component>
26
- <component name="ExternalProjectsData">
27
- <projectState path="$PROJECT_DIR$">
28
- <ProjectState />
29
- </projectState>
30
- </component>
31
- <component name="ExternalProjectsManager">
32
- <system id="GRADLE">
33
- <state>
34
- <task path="$PROJECT_DIR$">
35
- <activation />
36
- </task>
37
- <projects_view>
38
- <tree_state>
39
- <expand>
40
- <path>
41
- <item name="" type="6a2764b6:ExternalProjectsStructure$RootNode" />
42
- <item name="android" type="f1a62948:ProjectNode" />
43
- </path>
44
- <path>
45
- <item name="" type="6a2764b6:ExternalProjectsStructure$RootNode" />
46
- <item name="android" type="f1a62948:ProjectNode" />
47
- <item name="Tasks" type="e4a08cd1:TasksNode" />
48
- </path>
49
- <path>
50
- <item name="" type="6a2764b6:ExternalProjectsStructure$RootNode" />
51
- <item name="android" type="f1a62948:ProjectNode" />
52
- <item name="Tasks" type="e4a08cd1:TasksNode" />
53
- <item name="other" type="c8890929:TasksNode$1" />
54
- </path>
55
- </expand>
56
- <select />
57
- </tree_state>
58
- </projects_view>
59
- </state>
60
- </system>
61
- </component>
62
- <component name="FileTemplateManagerImpl">
63
- <option name="RECENT_TEMPLATES">
64
- <list>
65
- <option value="Class" />
66
- <option value="Kotlin Class" />
67
- </list>
68
- </option>
69
- </component>
70
- <component name="Git.Settings">
71
- <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$/.." />
72
- </component>
73
- <component name="MarkdownSettingsMigration">
74
- <option name="stateVersion" value="1" />
75
- </component>
76
- <component name="ProjectId" id="2RbHAcMjtvDnyVAejISeOEfpT5m" />
77
- <component name="ProjectLevelVcsManager" settingsEditedManually="true">
78
- <ConfirmationsSetting value="1" id="Add" />
79
- </component>
80
- <component name="ProjectViewState">
81
- <option name="hideEmptyMiddlePackages" value="true" />
82
- <option name="showLibraryContents" value="true" />
83
- </component>
84
- <component name="PropertiesComponent">{
85
- &quot;keyToString&quot;: {
86
- &quot;RunOnceActivity.OpenProjectViewOnStart&quot;: &quot;true&quot;,
87
- &quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
88
- &quot;RunOnceActivity.cidr.known.project.marker&quot;: &quot;true&quot;,
89
- &quot;cidr.known.project.marker&quot;: &quot;true&quot;,
90
- &quot;last_opened_file_path&quot;: &quot;/Users/delhivery/Documents/coreos_projects/platform-coreos-dispatch-sdk/android&quot;
91
- }
92
- }</component>
93
- <component name="RecentsManager">
94
- <key name="android.template.656734805">
95
- <recent name="com.dispatchsdk" />
96
- </key>
97
- </component>
98
- <component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
99
- <component name="TaskManager">
100
- <task active="true" id="Default" summary="Default task">
101
- <changelist id="9e0b05bf-ee06-4169-bdda-4954b118eea2" name="Changes" comment="" />
102
- <created>1687511723592</created>
103
- <option name="number" value="Default" />
104
- <option name="presentableId" value="Default" />
105
- <updated>1687511723592</updated>
106
- </task>
107
- <servers />
108
- </component>
109
- <component name="Vcs.Log.Tabs.Properties">
110
- <option name="TAB_STATES">
111
- <map>
112
- <entry key="MAIN">
113
- <value>
114
- <State />
115
- </value>
116
- </entry>
117
- </map>
118
- </option>
119
- </component>
120
- <component name="XDebuggerManager">
121
- <breakpoint-manager>
122
- <breakpoints>
123
- <line-breakpoint enabled="true" type="kotlin-line">
124
- <url>file://$PROJECT_DIR$/src/main/java/com/dispatchsdk/utils/DispatchSdkUtils.kt</url>
125
- <line>74</line>
126
- <option name="timeStamp" value="1" />
127
- </line-breakpoint>
128
- </breakpoints>
129
- </breakpoint-manager>
130
- </component>
131
- </project>
@@ -1,26 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.getJobIDs = getJobIDs;
7
- exports.getObjectiveRefs = getObjectiveRefs;
8
- function getJobIDs(nextStates) {
9
- let result = [];
10
- if (!nextStates || nextStates.length === 0) return result;else {
11
- nextStates.forEach(s => {
12
- result.push(s.jobId);
13
- });
14
- return result;
15
- }
16
- }
17
- function getObjectiveRefs(nextStates) {
18
- let result = [];
19
- if (!nextStates || nextStates.length === 0) return result;else {
20
- nextStates.forEach(s => {
21
- result.push(s.objRef);
22
- });
23
- return result;
24
- }
25
- }
26
- //# sourceMappingURL=DoodleUtils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["getJobIDs","nextStates","result","length","forEach","s","push","jobId","getObjectiveRefs","objRef"],"sources":["DoodleUtils.ts"],"sourcesContent":["import type { stateWithObjRef } from '../../../models/DispatchModels';\n\nexport function getJobIDs(nextStates: stateWithObjRef[]): string[] {\n let result: string[] = [];\n if (!nextStates || nextStates.length === 0) return result;\n else {\n nextStates.forEach((s) => {\n result.push(s.jobId);\n });\n return result;\n }\n}\n\nexport function getObjectiveRefs(nextStates: stateWithObjRef[]): string[] {\n let result: string[] = [];\n if (!nextStates || nextStates.length === 0) return result;\n else {\n nextStates.forEach((s) => {\n result.push(s.objRef);\n });\n return result;\n }\n}\n"],"mappings":";;;;;;;AAEO,SAASA,SAASA,CAACC,UAA6B,EAAY;EACjE,IAAIC,MAAgB,GAAG,EAAE;EACzB,IAAI,CAACD,UAAU,IAAIA,UAAU,CAACE,MAAM,KAAK,CAAC,EAAE,OAAOD,MAAM,CAAC,KACrD;IACHD,UAAU,CAACG,OAAO,CAAEC,CAAC,IAAK;MACxBH,MAAM,CAACI,IAAI,CAACD,CAAC,CAACE,KAAK,CAAC;IACtB,CAAC,CAAC;IACF,OAAOL,MAAM;EACf;AACF;AAEO,SAASM,gBAAgBA,CAACP,UAA6B,EAAY;EACxE,IAAIC,MAAgB,GAAG,EAAE;EACzB,IAAI,CAACD,UAAU,IAAIA,UAAU,CAACE,MAAM,KAAK,CAAC,EAAE,OAAOD,MAAM,CAAC,KACrD;IACHD,UAAU,CAACG,OAAO,CAAEC,CAAC,IAAK;MACxBH,MAAM,CAACI,IAAI,CAACD,CAAC,CAACI,MAAM,CAAC;IACvB,CAAC,CAAC;IACF,OAAOP,MAAM;EACf;AACF"}
@@ -1,134 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _reactNative = require("react-native");
8
- var _react = _interopRequireWildcard(require("react"));
9
- var _vectorIcons = require("@expo/vector-icons");
10
- var _CommonStyles = require("../../../../styles/executionTasks/CommonStyles");
11
- var _IconButton = _interopRequireDefault(require("../../../widgets/IconButton"));
12
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
14
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
15
- const ListItem = _ref => {
16
- let {
17
- lineItem
18
- } = _ref;
19
- return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
20
- style: styles.rowItem
21
- }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
22
- style: {
23
- marginEnd: 20
24
- }
25
- }, `#${lineItem}`));
26
- };
27
- const renderItem = _ref2 => {
28
- let {
29
- item
30
- } = _ref2;
31
- return /*#__PURE__*/_react.default.createElement(ListItem, {
32
- lineItem: item
33
- });
34
- };
35
- const ICON_SIZE = 12;
36
- const ScanList = _ref3 => {
37
- let {
38
- pending,
39
- scanned,
40
- validation
41
- } = _ref3;
42
- const [showPendingList, setShowPendingList] = (0, _react.useState)(true);
43
- const [showScannedList, setShowScannedList] = (0, _react.useState)(() => validation.selectedIndex === 0 ? false : true);
44
- const pendingIconName = showPendingList ? 'caretup' : 'caretdown';
45
- const scannedIconName = showScannedList ? 'caretup' : 'caretdown';
46
- return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
47
- style: {
48
- flex: 1
49
- }
50
- }, validation.selectedIndex === 0 ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_IconButton.default, {
51
- title: `PENDING SHIPMENTS (${pending.length})`,
52
- style: styles.listHeader,
53
- onPress: () => {
54
- setShowPendingList(showPendingList => !showPendingList);
55
- setShowScannedList(showScannedList => {
56
- if (showScannedList && pending.length > 0) return !showScannedList;else return showScannedList;
57
- });
58
- },
59
- textStyles: styles.headerText,
60
- icon: /*#__PURE__*/_react.default.createElement(_vectorIcons.AntDesign, {
61
- name: `${pendingIconName}`,
62
- size: ICON_SIZE,
63
- color: "black"
64
- })
65
- }), showPendingList && pending.length > 0 ? /*#__PURE__*/_react.default.createElement(_reactNative.View, {
66
- style: pending.length >= 9 ? styles.list : {
67
- marginTop: 12
68
- }
69
- }, /*#__PURE__*/_react.default.createElement(_reactNative.FlatList, {
70
- data: pending,
71
- renderItem: renderItem,
72
- keyExtractor: item => item
73
- })) : null) : null, /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_IconButton.default, {
74
- title: `SCANNED SHIPMENTS (${scanned.length})`,
75
- style: styles.listHeader,
76
- onPress: () => {
77
- setShowScannedList(showScannedList => !showScannedList);
78
- if (validation.selectedIndex === 0) {
79
- setShowPendingList(showPendingList => {
80
- if (showPendingList && scanned.length > 0) return !showPendingList;else return showPendingList;
81
- });
82
- }
83
- },
84
- textStyles: styles.headerText,
85
- icon: /*#__PURE__*/_react.default.createElement(_vectorIcons.AntDesign, {
86
- name: `${scannedIconName}`,
87
- size: ICON_SIZE,
88
- color: "black"
89
- })
90
- }), showScannedList && scanned.length > 0 ? /*#__PURE__*/_react.default.createElement(_reactNative.View, {
91
- style: scanned.length >= 9 ? styles.list : {
92
- marginTop: 12
93
- }
94
- }, /*#__PURE__*/_react.default.createElement(_reactNative.FlatList, {
95
- data: scanned,
96
- renderItem: renderItem,
97
- keyExtractor: item => item
98
- })) : null));
99
- };
100
- var _default = ScanList;
101
- exports.default = _default;
102
- const styles = _reactNative.StyleSheet.create({
103
- list: {
104
- flex: 1,
105
- marginTop: 12
106
- },
107
- rowItem: {
108
- paddingHorizontal: 10,
109
- paddingVertical: 18,
110
- flexDirection: 'row',
111
- alignItems: 'center',
112
- marginTop: 8,
113
- backgroundColor: '#ffffff'
114
- },
115
- headerText: {
116
- fontFamily: _CommonStyles.Fonts.IBMPlexSans_400Regular,
117
- fontStyle: 'normal',
118
- fontWeight: '400',
119
- fontSize: 14,
120
- textAlign: 'left',
121
- lineHeight: 18,
122
- color: '#9D9D9D',
123
- letterSpacing: 0.25
124
- },
125
- listHeader: {
126
- paddingHorizontal: 10,
127
- paddingVertical: 18,
128
- flexDirection: 'row',
129
- alignItems: 'center',
130
- backgroundColor: '#fbfbfb',
131
- marginTop: 8
132
- }
133
- });
134
- //# sourceMappingURL=ScanList.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_reactNative","require","_react","_interopRequireWildcard","_vectorIcons","_CommonStyles","_IconButton","_interopRequireDefault","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","ListItem","_ref","lineItem","createElement","View","style","styles","rowItem","Text","marginEnd","renderItem","_ref2","item","ICON_SIZE","ScanList","_ref3","pending","scanned","validation","showPendingList","setShowPendingList","useState","showScannedList","setShowScannedList","selectedIndex","pendingIconName","scannedIconName","flex","Fragment","title","length","listHeader","onPress","textStyles","headerText","icon","AntDesign","name","size","color","list","marginTop","FlatList","data","keyExtractor","_default","exports","StyleSheet","create","paddingHorizontal","paddingVertical","flexDirection","alignItems","backgroundColor","fontFamily","Fonts","IBMPlexSans_400Regular","fontStyle","fontWeight","fontSize","textAlign","lineHeight","letterSpacing"],"sources":["ScanList.tsx"],"sourcesContent":["import { View, Text, FlatList, StyleSheet } from 'react-native';\nimport React, { useState } from 'react';\nimport { AntDesign } from '@expo/vector-icons';\nimport { Fonts } from '../../../../styles/executionTasks/CommonStyles';\nimport IconButton from '../../../widgets/IconButton';\nimport type { Validation } from '../ScanSchema';\n\nconst ListItem = ({ lineItem }: { lineItem: string }) => (\n <View style={styles.rowItem}>\n <Text style={{ marginEnd: 20 }}>{`#${lineItem}`}</Text>\n </View>\n);\n\nconst renderItem = ({ item }: { item: string }) => <ListItem lineItem={item} />;\n\nconst ICON_SIZE = 12;\n\nconst ScanList = ({\n pending,\n scanned,\n validation,\n}: {\n pending: string[];\n scanned: string[];\n validation: Validation;\n}) => {\n const [showPendingList, setShowPendingList] = useState(true);\n const [showScannedList, setShowScannedList] = useState(() =>\n validation.selectedIndex === 0 ? false : true\n );\n\n const pendingIconName = showPendingList ? 'caretup' : 'caretdown';\n const scannedIconName = showScannedList ? 'caretup' : 'caretdown';\n\n return (\n <View style={{ flex: 1 }}>\n {validation.selectedIndex === 0 ? (\n <>\n <IconButton\n title={`PENDING SHIPMENTS (${pending.length})`}\n style={styles.listHeader}\n onPress={() => {\n setShowPendingList((showPendingList) => !showPendingList);\n setShowScannedList((showScannedList) => {\n if (showScannedList && pending.length > 0)\n return !showScannedList;\n else return showScannedList;\n });\n }}\n textStyles={styles.headerText}\n icon={\n <AntDesign\n name={`${pendingIconName}`}\n size={ICON_SIZE}\n color=\"black\"\n />\n }\n />\n {showPendingList && pending.length > 0 ? (\n <View style={pending.length >= 9 ? styles.list : { marginTop: 12 }}>\n <FlatList\n data={pending}\n renderItem={renderItem}\n keyExtractor={(item) => item}\n />\n </View>\n ) : null}\n </>\n ) : null}\n <>\n <IconButton\n title={`SCANNED SHIPMENTS (${scanned.length})`}\n style={styles.listHeader}\n onPress={() => {\n setShowScannedList((showScannedList) => !showScannedList);\n if (validation.selectedIndex === 0) {\n setShowPendingList((showPendingList) => {\n if (showPendingList && scanned.length > 0)\n return !showPendingList;\n else return showPendingList;\n });\n }\n }}\n textStyles={styles.headerText}\n icon={\n <AntDesign\n name={`${scannedIconName}`}\n size={ICON_SIZE}\n color=\"black\"\n />\n }\n />\n {showScannedList && scanned.length > 0 ? (\n <View style={scanned.length >= 9 ? styles.list : { marginTop: 12 }}>\n <FlatList\n data={scanned}\n renderItem={renderItem}\n keyExtractor={(item) => item}\n />\n </View>\n ) : null}\n </>\n </View>\n );\n};\n\nexport default ScanList;\n\nconst styles = StyleSheet.create({\n list: {\n flex: 1,\n marginTop: 12,\n },\n rowItem: {\n paddingHorizontal: 10,\n paddingVertical: 18,\n flexDirection: 'row',\n alignItems: 'center',\n marginTop: 8,\n backgroundColor: '#ffffff',\n },\n headerText: {\n fontFamily: Fonts.IBMPlexSans_400Regular,\n fontStyle: 'normal',\n fontWeight: '400',\n fontSize: 14,\n textAlign: 'left',\n lineHeight: 18,\n color: '#9D9D9D',\n letterSpacing: 0.25,\n },\n listHeader: {\n paddingHorizontal: 10,\n paddingVertical: 18,\n flexDirection: 'row',\n alignItems: 'center',\n backgroundColor: '#fbfbfb',\n marginTop: 8,\n },\n});\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAC,sBAAA,CAAAN,OAAA;AAAqD,SAAAM,uBAAAC,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAT,wBAAAK,GAAA,EAAAI,WAAA,SAAAA,WAAA,IAAAJ,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAQ,KAAA,GAAAL,wBAAA,CAAAC,WAAA,OAAAI,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAT,GAAA,YAAAQ,KAAA,CAAAE,GAAA,CAAAV,GAAA,SAAAW,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAhB,GAAA,QAAAgB,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAnB,GAAA,EAAAgB,GAAA,SAAAI,IAAA,GAAAR,qBAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAf,GAAA,EAAAgB,GAAA,cAAAI,IAAA,KAAAA,IAAA,CAAAV,GAAA,IAAAU,IAAA,CAAAC,GAAA,KAAAR,MAAA,CAAAC,cAAA,CAAAH,MAAA,EAAAK,GAAA,EAAAI,IAAA,YAAAT,MAAA,CAAAK,GAAA,IAAAhB,GAAA,CAAAgB,GAAA,SAAAL,MAAA,CAAAT,OAAA,GAAAF,GAAA,MAAAQ,KAAA,IAAAA,KAAA,CAAAa,GAAA,CAAArB,GAAA,EAAAW,MAAA,YAAAA,MAAA;AAGrD,MAAMW,QAAQ,GAAGC,IAAA;EAAA,IAAC;IAAEC;EAA+B,CAAC,GAAAD,IAAA;EAAA,oBAClD7B,MAAA,CAAAQ,OAAA,CAAAuB,aAAA,CAACjC,YAAA,CAAAkC,IAAI;IAACC,KAAK,EAAEC,MAAM,CAACC;EAAQ,gBAC1BnC,MAAA,CAAAQ,OAAA,CAAAuB,aAAA,CAACjC,YAAA,CAAAsC,IAAI;IAACH,KAAK,EAAE;MAAEI,SAAS,EAAE;IAAG;EAAE,GAAG,IAAGP,QAAS,EAAC,CAAQ,CAClD;AAAA,CACR;AAED,MAAMQ,UAAU,GAAGC,KAAA;EAAA,IAAC;IAAEC;EAAuB,CAAC,GAAAD,KAAA;EAAA,oBAAKvC,MAAA,CAAAQ,OAAA,CAAAuB,aAAA,CAACH,QAAQ;IAACE,QAAQ,EAAEU;EAAK,EAAG;AAAA;AAE/E,MAAMC,SAAS,GAAG,EAAE;AAEpB,MAAMC,QAAQ,GAAGC,KAAA,IAQX;EAAA,IARY;IAChBC,OAAO;IACPC,OAAO;IACPC;EAKF,CAAC,GAAAH,KAAA;EACC,MAAM,CAACI,eAAe,EAAEC,kBAAkB,CAAC,GAAG,IAAAC,eAAQ,EAAC,IAAI,CAAC;EAC5D,MAAM,CAACC,eAAe,EAAEC,kBAAkB,CAAC,GAAG,IAAAF,eAAQ,EAAC,MACrDH,UAAU,CAACM,aAAa,KAAK,CAAC,GAAG,KAAK,GAAG,IAAI,CAC9C;EAED,MAAMC,eAAe,GAAGN,eAAe,GAAG,SAAS,GAAG,WAAW;EACjE,MAAMO,eAAe,GAAGJ,eAAe,GAAG,SAAS,GAAG,WAAW;EAEjE,oBACElD,MAAA,CAAAQ,OAAA,CAAAuB,aAAA,CAACjC,YAAA,CAAAkC,IAAI;IAACC,KAAK,EAAE;MAAEsB,IAAI,EAAE;IAAE;EAAE,GACtBT,UAAU,CAACM,aAAa,KAAK,CAAC,gBAC7BpD,MAAA,CAAAQ,OAAA,CAAAuB,aAAA,CAAA/B,MAAA,CAAAQ,OAAA,CAAAgD,QAAA,qBACExD,MAAA,CAAAQ,OAAA,CAAAuB,aAAA,CAAC3B,WAAA,CAAAI,OAAU;IACTiD,KAAK,EAAG,sBAAqBb,OAAO,CAACc,MAAO,GAAG;IAC/CzB,KAAK,EAAEC,MAAM,CAACyB,UAAW;IACzBC,OAAO,EAAEA,CAAA,KAAM;MACbZ,kBAAkB,CAAED,eAAe,IAAK,CAACA,eAAe,CAAC;MACzDI,kBAAkB,CAAED,eAAe,IAAK;QACtC,IAAIA,eAAe,IAAIN,OAAO,CAACc,MAAM,GAAG,CAAC,EACvC,OAAO,CAACR,eAAe,CAAC,KACrB,OAAOA,eAAe;MAC7B,CAAC,CAAC;IACJ,CAAE;IACFW,UAAU,EAAE3B,MAAM,CAAC4B,UAAW;IAC9BC,IAAI,eACF/D,MAAA,CAAAQ,OAAA,CAAAuB,aAAA,CAAC7B,YAAA,CAAA8D,SAAS;MACRC,IAAI,EAAG,GAAEZ,eAAgB,EAAE;MAC3Ba,IAAI,EAAEzB,SAAU;MAChB0B,KAAK,EAAC;IAAO;EAEhB,EACD,EACDpB,eAAe,IAAIH,OAAO,CAACc,MAAM,GAAG,CAAC,gBACpC1D,MAAA,CAAAQ,OAAA,CAAAuB,aAAA,CAACjC,YAAA,CAAAkC,IAAI;IAACC,KAAK,EAAEW,OAAO,CAACc,MAAM,IAAI,CAAC,GAAGxB,MAAM,CAACkC,IAAI,GAAG;MAAEC,SAAS,EAAE;IAAG;EAAE,gBACjErE,MAAA,CAAAQ,OAAA,CAAAuB,aAAA,CAACjC,YAAA,CAAAwE,QAAQ;IACPC,IAAI,EAAE3B,OAAQ;IACdN,UAAU,EAAEA,UAAW;IACvBkC,YAAY,EAAGhC,IAAI,IAAKA;EAAK,EAC7B,CACG,GACL,IAAI,CACP,GACD,IAAI,eACRxC,MAAA,CAAAQ,OAAA,CAAAuB,aAAA,CAAA/B,MAAA,CAAAQ,OAAA,CAAAgD,QAAA,qBACExD,MAAA,CAAAQ,OAAA,CAAAuB,aAAA,CAAC3B,WAAA,CAAAI,OAAU;IACTiD,KAAK,EAAG,sBAAqBZ,OAAO,CAACa,MAAO,GAAG;IAC/CzB,KAAK,EAAEC,MAAM,CAACyB,UAAW;IACzBC,OAAO,EAAEA,CAAA,KAAM;MACbT,kBAAkB,CAAED,eAAe,IAAK,CAACA,eAAe,CAAC;MACzD,IAAIJ,UAAU,CAACM,aAAa,KAAK,CAAC,EAAE;QAClCJ,kBAAkB,CAAED,eAAe,IAAK;UACtC,IAAIA,eAAe,IAAIF,OAAO,CAACa,MAAM,GAAG,CAAC,EACvC,OAAO,CAACX,eAAe,CAAC,KACrB,OAAOA,eAAe;QAC7B,CAAC,CAAC;MACJ;IACF,CAAE;IACFc,UAAU,EAAE3B,MAAM,CAAC4B,UAAW;IAC9BC,IAAI,eACF/D,MAAA,CAAAQ,OAAA,CAAAuB,aAAA,CAAC7B,YAAA,CAAA8D,SAAS;MACRC,IAAI,EAAG,GAAEX,eAAgB,EAAE;MAC3BY,IAAI,EAAEzB,SAAU;MAChB0B,KAAK,EAAC;IAAO;EAEhB,EACD,EACDjB,eAAe,IAAIL,OAAO,CAACa,MAAM,GAAG,CAAC,gBACpC1D,MAAA,CAAAQ,OAAA,CAAAuB,aAAA,CAACjC,YAAA,CAAAkC,IAAI;IAACC,KAAK,EAAEY,OAAO,CAACa,MAAM,IAAI,CAAC,GAAGxB,MAAM,CAACkC,IAAI,GAAG;MAAEC,SAAS,EAAE;IAAG;EAAE,gBACjErE,MAAA,CAAAQ,OAAA,CAAAuB,aAAA,CAACjC,YAAA,CAAAwE,QAAQ;IACPC,IAAI,EAAE1B,OAAQ;IACdP,UAAU,EAAEA,UAAW;IACvBkC,YAAY,EAAGhC,IAAI,IAAKA;EAAK,EAC7B,CACG,GACL,IAAI,CACP,CACE;AAEX,CAAC;AAAC,IAAAiC,QAAA,GAEa/B,QAAQ;AAAAgC,OAAA,CAAAlE,OAAA,GAAAiE,QAAA;AAEvB,MAAMvC,MAAM,GAAGyC,uBAAU,CAACC,MAAM,CAAC;EAC/BR,IAAI,EAAE;IACJb,IAAI,EAAE,CAAC;IACPc,SAAS,EAAE;EACb,CAAC;EACDlC,OAAO,EAAE;IACP0C,iBAAiB,EAAE,EAAE;IACrBC,eAAe,EAAE,EAAE;IACnBC,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBX,SAAS,EAAE,CAAC;IACZY,eAAe,EAAE;EACnB,CAAC;EACDnB,UAAU,EAAE;IACVoB,UAAU,EAAEC,mBAAK,CAACC,sBAAsB;IACxCC,SAAS,EAAE,QAAQ;IACnBC,UAAU,EAAE,KAAK;IACjBC,QAAQ,EAAE,EAAE;IACZC,SAAS,EAAE,MAAM;IACjBC,UAAU,EAAE,EAAE;IACdtB,KAAK,EAAE,SAAS;IAChBuB,aAAa,EAAE;EACjB,CAAC;EACD/B,UAAU,EAAE;IACVkB,iBAAiB,EAAE,EAAE;IACrBC,eAAe,EAAE,EAAE;IACnBC,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBC,eAAe,EAAE,SAAS;IAC1BZ,SAAS,EAAE;EACb;AACF,CAAC,CAAC"}
@@ -1,105 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _react = _interopRequireWildcard(require("react"));
8
- var _reactNative = require("react-native");
9
- var _expoCamera = require("expo-camera");
10
- var _utils = require("../../../utils/utils");
11
- var _CaptureUtils = require("../imageCapture/CaptureUtils");
12
- var _reactNativePaper = require("react-native-paper");
13
- var _expoBlur = require("expo-blur");
14
- var _reactNativeSafeAreaContext = require("react-native-safe-area-context");
15
- var _CommonStyles = require("../../../styles/executionTasks/CommonStyles");
16
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
17
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
18
- function Hint(_ref) {
19
- let {
20
- children
21
- } = _ref;
22
- return /*#__PURE__*/_react.default.createElement(_expoBlur.BlurView, {
23
- style: styles.hint,
24
- intensity: 50,
25
- tint: "dark"
26
- }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
27
- style: styles.headerText
28
- }, children));
29
- }
30
- const CScanner = props => {
31
- const [isVisible, setVisible] = (0, _react.useState)(true);
32
- const [hasPermission, setHasPermission] = (0, _react.useState)(null);
33
- const {
34
- bottom
35
- } = (0, _reactNativeSafeAreaContext.useSafeAreaInsets)();
36
- (0, _react.useEffect)(() => {
37
- (async () => {
38
- let response = await (0, _CaptureUtils.checkCameraPermissionUtil)();
39
- setHasPermission(response);
40
- })();
41
- }, []);
42
- const _handleBarCodeScanned = scan => {
43
- if (!(0, _utils.isEmptyOrBlank)(scan.data)) {
44
- setVisible(false);
45
- props.onScanned(scan.data);
46
- }
47
- };
48
- if (!hasPermission) {
49
- return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
50
- style: {
51
- flex: 1,
52
- justifyContent: 'center',
53
- alignItems: 'center'
54
- }
55
- }, /*#__PURE__*/_react.default.createElement(_reactNativePaper.Title, null, 'No Permissions for Camera. Please provide camera permissions from app\
56
- settings.'));
57
- }
58
- return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
59
- style: styles.container
60
- }, isVisible ? /*#__PURE__*/_react.default.createElement(_expoCamera.Camera, {
61
- barCodeScannerSettings: {
62
- barCodeTypes: props.barCodeTypes
63
- },
64
- onBarCodeScanned: _handleBarCodeScanned,
65
- style: _reactNative.StyleSheet.absoluteFill
66
- }) : null, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
67
- style: [styles.header, {
68
- bottom: 16 + bottom
69
- }]
70
- }, /*#__PURE__*/_react.default.createElement(Hint, null, 'or \nScan Shipment ID')));
71
- };
72
-
73
- // exporting Scanner as Pure Component
74
- var _default = /*#__PURE__*/(0, _react.memo)(CScanner);
75
- exports.default = _default;
76
- const styles = _reactNative.StyleSheet.create({
77
- container: {
78
- flex: 1,
79
- backgroundColor: '#000',
80
- justifyContent: 'center',
81
- alignItems: 'center'
82
- },
83
- hint: {
84
- paddingHorizontal: 16,
85
- paddingVertical: 20,
86
- overflow: 'hidden',
87
- justifyContent: 'center',
88
- alignItems: 'center'
89
- },
90
- headerText: {
91
- color: '#fff',
92
- backgroundColor: 'transparent',
93
- textAlign: 'center',
94
- fontSize: 16,
95
- fontWeight: '500'
96
- },
97
- header: {
98
- position: 'absolute',
99
- left: 0,
100
- right: 0,
101
- alignItems: 'center',
102
- fontFamily: _CommonStyles.Fonts.IBMPlexSans_600SemiBold
103
- }
104
- });
105
- //# sourceMappingURL=CScanner.js.map