@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
@@ -3,22 +3,49 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
+ exports.addScans = addScans;
6
7
  exports.checkForValidation = checkForValidation;
8
+ exports.clearScanOutput = void 0;
9
+ exports.filterERCItems = filterERCItems;
7
10
  exports.getBarCodeTypes = getBarCodeTypes;
11
+ exports.getErrorMessage = void 0;
12
+ exports.getEventType = getEventType;
13
+ exports.getMappingCount = getMappingCount;
14
+ exports.getScanData = getScanData;
8
15
  exports.getScanETOutput = getScanETOutput;
16
+ exports.getScanMappedOutput = getScanMappedOutput;
17
+ exports.getScanMergedObjectID = getScanMergedObjectID;
18
+ exports.getScanMergedOutput = getScanMergedOutput;
9
19
  exports.getScannedItemCount = getScannedItemCount;
10
20
  exports.getScannedItems = getScannedItems;
11
21
  exports.getShipmentData = getShipmentData;
22
+ exports.getTabCount = exports.getSplitIds = void 0;
23
+ exports.getUpdatedScanETOutput = getUpdatedScanETOutput;
12
24
  exports.isETCompleted = isETCompleted;
13
25
  exports.isReplacement = isReplacement;
26
+ exports.removeScan = removeScan;
27
+ exports.triggerScanEvent = triggerScanEvent;
28
+ exports.updatePendingSharedPreference = updatePendingSharedPreference;
29
+ exports.updateSharedPreference = updateSharedPreference;
14
30
  var _expoBarcodeScanner = require("expo-barcode-scanner");
15
31
  var _interfaces = require("./interfaces");
32
+ var _ScanSchema = require("./ScanSchema");
16
33
  var jsonLogic = _interopRequireWildcard(require("json-logic-js"));
17
34
  var _ExecTaskUtils = require("../../../utils/ExecTaskUtils");
18
35
  var _ETConfig = require("../../../models/execTasks/ETConfig");
19
- var _EventCodeContainer = require("../../../manager/dispatchCodes/EventCodeContainer");
20
36
  var _ApiUtils = require("../../../utils/ApiUtils");
21
37
  var _Logger = _interopRequireWildcard(require("../../../utils/Logger"));
38
+ var _constants = require("../../../constants/constants");
39
+ var _storage = _interopRequireDefault(require("../../../utils/storage"));
40
+ var _constants2 = require("../../../manager/syncmanager/constants");
41
+ var _RouteParams = require("../../../ui/uiConfig/RouteParams");
42
+ var _EventDispatcher = _interopRequireDefault(require("../../../events/EventDispatcher"));
43
+ var _platformCoreosExecutionEngineSdk = require("@os1-platform/platform-coreos-execution-engine-sdk");
44
+ var _utils = require("../../../utils/utils");
45
+ var _constants3 = require("./constants");
46
+ var _DropDownUtils = require("./sub_components/DropDownUtils");
47
+ var _SnackBarCustom = require("../../../components/widgets/SnackBarCustom");
48
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
22
49
  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); }
23
50
  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; }
24
51
  function getBarCodeTypes(input) {
@@ -75,10 +102,7 @@ function getBarCodeTypes(input) {
75
102
  async function checkForValidation(scannedInput, validation) {
76
103
  // Scans Array
77
104
  if (validation.selectedIndex === 0) {
78
- //@ts-ignore
79
- const scans = validation.logic;
80
- const found = scans.find(s => s === scannedInput);
81
- return found !== undefined;
105
+ return true;
82
106
  }
83
107
  // Validation Regex
84
108
  else if (validation.selectedIndex === 1 && typeof validation.logic === 'string') {
@@ -155,169 +179,94 @@ function getScannedItemCount(scansMap) {
155
179
  }
156
180
  return scannedShipments;
157
181
  }
182
+ function getMappingCount(scanOutput, wiMappingUpdate) {
183
+ const {
184
+ mwId: mergedObjectiveId
185
+ } = wiMappingUpdate.data;
186
+ if (scanOutput[mergedObjectiveId]) {
187
+ return scanOutput[mergedObjectiveId].count + 1;
188
+ } else {
189
+ return 1;
190
+ }
191
+ }
192
+ async function getUpdatedScanETOutput(scanOutput, wiMappingUpdate, success, eventCode, reasonCode, route, scannedData) {
193
+ const prefixedMergedObjectiveId = route.params[_RouteParams.RouteParams.ROOT_META_DATA].prefixedMergedObjectiveId;
194
+ const {
195
+ mwId: mergedObjectiveId,
196
+ previousMWID: previousMergedObjectiveId
197
+ } = wiMappingUpdate.data;
198
+ const output = await (0, _ExecTaskUtils.getBaseETResponse)(_ETConfig.EntityCode.SCAN, success, eventCode, reasonCode, [mergedObjectiveId], _ETConfig.ExecutionTaskID.SCAN);
199
+ const _scannedData = [{
200
+ groupId: scannedData.displayInfo.groupId,
201
+ jobId: scannedData.jobId,
202
+ shipmentFlow: scannedData.displayInfo.shipmentFlow,
203
+ scanValue: scannedData.scanId
204
+ }];
205
+ scannedData !== null && scannedData !== void 0 && scannedData.isScan ? triggerScanEvent('ON_SCAN', route, _scannedData, output) : null;
206
+ if (scanOutput[previousMergedObjectiveId]) {
207
+ scanOutput[previousMergedObjectiveId].count -= 1;
208
+ if (scanOutput[previousMergedObjectiveId].count === 0) {
209
+ delete scanOutput[previousMergedObjectiveId];
210
+ }
211
+ }
212
+ const count = getMappingCount(scanOutput, wiMappingUpdate);
213
+ if (!scanOutput[mergedObjectiveId]) {
214
+ scanOutput[mergedObjectiveId] = {
215
+ output,
216
+ count
217
+ };
218
+ } else {
219
+ scanOutput[mergedObjectiveId].count = count;
220
+ }
158
221
 
159
- /**
160
- * Mode: SINGLE -> each scanned output will be passed on, corresponding to each jobId, based on the blindData(containing jobIds)
161
- * Mode: MULTI -> for scans array: output will be based on the jobId present in scansMap
162
- * -> for blind with maxScanCount: output will be set incrementaly, based on the maxScanCount of each ET of job
163
- * -> for blind without maxScanCount: output will be set in the first objective
164
- */
165
-
166
- async function getScanETOutput(scansMap, selectedValidationIndex, blindData, scanMode) {
167
- let scanCountLimit = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
168
- let defaultERC = arguments.length > 5 ? arguments[5] : undefined;
169
- let isMultiObjectiveEnable = arguments.length > 6 ? arguments[6] : undefined;
170
- let applicableCodes = arguments.length > 7 ? arguments[7] : undefined;
171
- let isErcSelector = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : false;
172
- let isCancelled = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : false;
173
- let scanOutput = {
174
- etData: {},
175
- pendingEtData: {}
176
- };
177
- if (scansMap.size) for (let [, _scannedValue] of scansMap.entries()) {
178
- const _isScannedSuccess = _scannedValue !== null && _scannedValue !== void 0 && _scannedValue.success ? true : false;
179
- const _appRC = _isScannedSuccess ? applicableCodes === null || applicableCodes === void 0 ? void 0 : applicableCodes.success : applicableCodes === null || applicableCodes === void 0 ? void 0 : applicableCodes.failure;
180
- if (scanMode === 'SINGLE' || isMultiObjectiveEnable) {
181
- for (let [_jobId, blindValue] of blindData.entries()) {
182
- if (_scannedValue.jobId === _jobId) {
183
- if (blindValue.scannedCount === 1) continue;else {
184
- if (_scannedValue.scanStatus === _interfaces.SCAN_STATUS.SCANNED) {
185
- if (!isCancelled && isMultiObjectiveEnable && isErcSelector && !_scannedValue.success) {
186
- scanOutput.pendingEtData[_jobId] = {
187
- scans: [{
188
- value: _scannedValue.value,
189
- validated: _scannedValue.validated || false,
190
- timestamp: _scannedValue.timestamp || Date.now()
191
- }]
192
- };
193
- if (isErcSelector) {
194
- scanOutput.pendingEtData[_jobId]['baseResponse'] = {
195
- ...(await (0, _ExecTaskUtils.getBaseETResponse)(_ETConfig.EntityCode.SCAN, _isScannedSuccess, (_scannedValue === null || _scannedValue === void 0 ? void 0 : _scannedValue.eventCode) || (0, _EventCodeContainer.getEventCodeByET)(_ETConfig.ExecutionTaskID.SCAN, _isScannedSuccess, _appRC), (_scannedValue === null || _scannedValue === void 0 ? void 0 : _scannedValue.reasonCode) || ''))
196
- };
197
- }
198
- } else {
199
- scanOutput.etData[_jobId] = {
200
- scans: getScannedItems(_scannedValue)
201
- };
202
- if (isErcSelector && !isCancelled) {
203
- scanOutput.etData[_jobId]['baseResponse'] = {
204
- ...(await (0, _ExecTaskUtils.getBaseETResponse)(_ETConfig.EntityCode.SCAN, _isScannedSuccess, (_scannedValue === null || _scannedValue === void 0 ? void 0 : _scannedValue.eventCode) || (0, _EventCodeContainer.getEventCodeByET)(_ETConfig.ExecutionTaskID.SCAN, _isScannedSuccess, _appRC), (_scannedValue === null || _scannedValue === void 0 ? void 0 : _scannedValue.reasonCode) || ''))
205
- };
206
- } else if (isCancelled) {
207
- scanOutput.etData[_jobId]['baseResponse'] = {
208
- ...(await (0, _ExecTaskUtils.getBaseETResponse)(_ETConfig.EntityCode.SCAN, false, defaultERC === null || defaultERC === void 0 ? void 0 : defaultERC.eventCode, (defaultERC === null || defaultERC === void 0 ? void 0 : defaultERC.reasonCode) || ''))
209
- };
210
- }
211
- }
212
- blindData.set(_jobId, {
213
- ...blindValue,
214
- scannedCount: blindValue.scannedCount + 1
215
- });
216
- }
217
- break;
222
+ // SAVE IN SHARED PREFERENCE
223
+ let allScansOutput = (await getScanMappedOutput()) || {};
224
+ let storage = _storage.default.getInstance();
225
+ await storage.setSharedItem(_constants2.SHARED_PREFERENCE_SCAN_OUTPUT, JSON.stringify({
226
+ ...allScansOutput,
227
+ [prefixedMergedObjectiveId]: scanOutput
228
+ }));
229
+ return scanOutput;
230
+ }
231
+ async function getScanETOutput(mergeScannedOutput, mergedObjectiveId, ercItems, defaultERC, deliverState, isPartial, count) {
232
+ switch (deliverState) {
233
+ case _ScanSchema.DeliverState.CANCELLED:
234
+ {
235
+ const output = await (0, _ExecTaskUtils.getBaseETResponse)(_ETConfig.EntityCode.SCAN, false, defaultERC.eventCode, defaultERC.reasonCode || '', mergedObjectiveId, _ETConfig.ExecutionTaskID.SCAN);
236
+ return {
237
+ [mergedObjectiveId[0]]: {
238
+ output,
239
+ count
218
240
  }
219
- }
241
+ };
220
242
  }
221
- } else {
222
- /**
223
- * Only successful scans are pushed to output for mode MULTI
224
- */
225
- if (selectedValidationIndex === 0 && _scannedValue.jobId) {
226
- var _scanOutput$etData$_s;
227
- scanOutput.etData[_scannedValue.jobId] = {
228
- scans: (_scanOutput$etData$_s = scanOutput.etData[_scannedValue.jobId]) !== null && _scanOutput$etData$_s !== void 0 && _scanOutput$etData$_s.scans ? scanOutput.etData[_scannedValue.jobId].scans.concat(getScannedItems(_scannedValue)) : getScannedItems(_scannedValue)
243
+ case _ScanSchema.DeliverState.DELIVERE_LATER:
244
+ {
245
+ const output = await (0, _ExecTaskUtils.getBaseETResponse)(_ETConfig.EntityCode.SCAN, false, _constants.REASON_NOT_USED, '', mergedObjectiveId, _ETConfig.ExecutionTaskID.SCAN);
246
+ mergeScannedOutput['default'] = {
247
+ output,
248
+ count
229
249
  };
230
- if (isErcSelector && !isCancelled) {
231
- scanOutput.etData[_scannedValue.jobId]['baseResponse'] = {
232
- ...(await (0, _ExecTaskUtils.getBaseETResponse)(_ETConfig.EntityCode.SCAN, _isScannedSuccess, (_scannedValue === null || _scannedValue === void 0 ? void 0 : _scannedValue.eventCode) || (0, _EventCodeContainer.getEventCodeByET)(_ETConfig.ExecutionTaskID.SCAN, _isScannedSuccess, _appRC), (_scannedValue === null || _scannedValue === void 0 ? void 0 : _scannedValue.reasonCode) || ''))
233
- };
234
- } else if (isCancelled) {
235
- scanOutput.etData[_scannedValue.jobId]['baseResponse'] = {
236
- ...(await (0, _ExecTaskUtils.getBaseETResponse)(_ETConfig.EntityCode.SCAN, false, defaultERC === null || defaultERC === void 0 ? void 0 : defaultERC.eventCode, (defaultERC === null || defaultERC === void 0 ? void 0 : defaultERC.reasonCode) || ''))
250
+ return mergeScannedOutput;
251
+ }
252
+ case _ScanSchema.DeliverState.DELIVER_NOW:
253
+ {
254
+ if (isPartial) {
255
+ const output = await (0, _ExecTaskUtils.getBaseETResponse)(_ETConfig.EntityCode.SCAN, getEventType(ercItems, defaultERC.eventCode), defaultERC.eventCode, defaultERC.reasonCode || '', mergedObjectiveId, _ETConfig.ExecutionTaskID.SCAN);
256
+ mergeScannedOutput['default'] = {
257
+ output,
258
+ count
237
259
  };
238
- }
239
- } else {
240
- for (let [_jobId, blindValue] of blindData.entries()) {
241
- /**
242
- * Blind scan without any maxCount limit
243
- */
244
- if (!scanCountLimit) {
245
- var _scanOutput$etData$_j;
246
- scanOutput.etData[_jobId] = {
247
- scans: (_scanOutput$etData$_j = scanOutput.etData[_jobId]) !== null && _scanOutput$etData$_j !== void 0 && _scanOutput$etData$_j.scans ? scanOutput.etData[_jobId].scans.concat(getScannedItems(_scannedValue)) : getScannedItems(_scannedValue)
248
- };
249
- if (isErcSelector && !isCancelled) {
250
- scanOutput.etData[_jobId]['baseResponse'] = {
251
- ...(await (0, _ExecTaskUtils.getBaseETResponse)(_ETConfig.EntityCode.SCAN, _isScannedSuccess, (_scannedValue === null || _scannedValue === void 0 ? void 0 : _scannedValue.eventCode) || (0, _EventCodeContainer.getEventCodeByET)(_ETConfig.ExecutionTaskID.SCAN, _isScannedSuccess, _appRC), (_scannedValue === null || _scannedValue === void 0 ? void 0 : _scannedValue.reasonCode) || ''))
252
- };
253
- } else if (isCancelled) {
254
- scanOutput.etData[_jobId]['baseResponse'] = {
255
- ...(await (0, _ExecTaskUtils.getBaseETResponse)(_ETConfig.EntityCode.SCAN, false, defaultERC === null || defaultERC === void 0 ? void 0 : defaultERC.eventCode, (defaultERC === null || defaultERC === void 0 ? void 0 : defaultERC.reasonCode) || ''))
256
- };
257
- }
258
- break;
259
- } else {
260
- if (blindValue.maxCount === blindValue.scannedCount) continue;else {
261
- var _scanOutput$etData$_j2;
262
- scanOutput.etData[_jobId] = {
263
- scans: (_scanOutput$etData$_j2 = scanOutput.etData[_jobId]) !== null && _scanOutput$etData$_j2 !== void 0 && _scanOutput$etData$_j2.scans ? scanOutput.etData[_jobId].scans.concat(getScannedItems(_scannedValue)) : getScannedItems(_scannedValue)
264
- };
265
- if (isErcSelector && !isCancelled) {
266
- scanOutput.etData[_jobId]['baseResponse'] = {
267
- ...(await (0, _ExecTaskUtils.getBaseETResponse)(_ETConfig.EntityCode.SCAN, _isScannedSuccess, (_scannedValue === null || _scannedValue === void 0 ? void 0 : _scannedValue.eventCode) || (0, _EventCodeContainer.getEventCodeByET)(_ETConfig.ExecutionTaskID.SCAN, _isScannedSuccess, _appRC), (_scannedValue === null || _scannedValue === void 0 ? void 0 : _scannedValue.reasonCode) || ''))
268
- };
269
- } else if (isCancelled) {
270
- scanOutput.etData[_jobId]['baseResponse'] = {
271
- ...(await (0, _ExecTaskUtils.getBaseETResponse)(_ETConfig.EntityCode.SCAN, false, defaultERC === null || defaultERC === void 0 ? void 0 : defaultERC.eventCode, (defaultERC === null || defaultERC === void 0 ? void 0 : defaultERC.reasonCode) || ''))
272
- };
273
- }
274
- blindData.set(_jobId, {
275
- ...blindValue,
276
- scannedCount: blindValue.scannedCount + 1
277
- });
278
- break;
279
- }
280
- }
260
+ return mergeScannedOutput;
261
+ } else {
262
+ return mergeScannedOutput;
281
263
  }
282
264
  }
283
- }
284
- }
285
-
286
- /**
287
- * Add unscanned objectives to pending_states
288
- */
289
- if (isMultiObjectiveEnable) {
290
- if (scansMap.size) {
291
- for (let [, _scannedValue] of scansMap.entries()) {
292
- const _isScannedSuccess = _scannedValue !== null && _scannedValue !== void 0 && _scannedValue.success ? true : false;
293
- for (let [_jobId, blindValue] of blindData.entries()) {
294
- if (_scannedValue.jobId === _jobId) {
295
- if (blindValue.scannedCount === 1) continue;else {
296
- if (!_scannedValue.scanStatus || _scannedValue.scanStatus === _interfaces.SCAN_STATUS.FAILED) {
297
- if (!scanOutput.pendingEtData) scanOutput.pendingEtData = {};
298
- scanOutput.pendingEtData[_jobId] = {
299
- scans: [{
300
- value: _scannedValue.value,
301
- validated: _scannedValue.validated || false,
302
- timestamp: _scannedValue.timestamp || Date.now()
303
- }]
304
- };
305
- scanOutput.pendingEtData[_jobId]['baseResponse'] = {
306
- ...(await (0, _ExecTaskUtils.getBaseETResponse)(_ETConfig.EntityCode.SCAN, _isScannedSuccess, defaultERC === null || defaultERC === void 0 ? void 0 : defaultERC.eventCode, (defaultERC === null || defaultERC === void 0 ? void 0 : defaultERC.reasonCode) || ''))
307
- };
308
- blindData.set(_jobId, {
309
- ...blindValue,
310
- scannedCount: blindValue.scannedCount + 1
311
- });
312
- }
313
- break;
314
- }
315
- }
316
- }
265
+ default:
266
+ {
267
+ return mergeScannedOutput;
317
268
  }
318
- }
319
269
  }
320
- return scanOutput;
321
270
  }
322
271
  function getScannedItems(scanValue) {
323
272
  const items = [];
@@ -370,4 +319,444 @@ function isReplacement(scan, scansMap, selectedEventCode, selectedReason) {
370
319
  }
371
320
  return false;
372
321
  }
322
+ function getEventType(eventList, eventCode) {
323
+ const result = eventList.find(code => code.code === eventCode);
324
+ if (result) {
325
+ return Boolean(result.success);
326
+ } else {
327
+ return false;
328
+ }
329
+ }
330
+ async function getScanMappedOutput() {
331
+ let storage = _storage.default.getInstance();
332
+ const mergedScanOutput = await storage.getSharedItem(_constants2.SHARED_PREFERENCE_SCAN_OUTPUT);
333
+ if (mergedScanOutput) {
334
+ return JSON.parse(mergedScanOutput);
335
+ } else {
336
+ return {};
337
+ }
338
+ }
339
+ function triggerScanEvent(type, route, scannedData, etOutput) {
340
+ switch (type) {
341
+ case 'ON_SCAN':
342
+ {
343
+ const nextStates = route.params[_RouteParams.RouteParams.NEXT_STATES];
344
+ const eventOutputData = {
345
+ meta: (etOutput === null || etOutput === void 0 ? void 0 : etOutput.meta) || {},
346
+ etData: {
347
+ eventCode: (etOutput === null || etOutput === void 0 ? void 0 : etOutput.eventCode) || '',
348
+ reasonCode: (etOutput === null || etOutput === void 0 ? void 0 : etOutput.reasonCode) || '',
349
+ success: (etOutput === null || etOutput === void 0 ? void 0 : etOutput.success) || false,
350
+ endTime: Date.now(),
351
+ scannedData
352
+ },
353
+ taskId: nextStates.taskId,
354
+ timestamp: Date.now(),
355
+ customData: route.params[_RouteParams.RouteParams.ROOT_META_DATA].customEventsData
356
+ };
357
+ (0, _EventDispatcher.default)('ON_SCAN', nextStates.taskName, eventOutputData);
358
+ break;
359
+ }
360
+ case 'ON_SCAN_REMOVE':
361
+ {
362
+ const nextStates = route.params[_RouteParams.RouteParams.NEXT_STATES];
363
+ const eventOutputData = {
364
+ etData: {
365
+ scannedData
366
+ },
367
+ taskId: nextStates.taskId,
368
+ timestamp: Date.now(),
369
+ customData: route.params[_RouteParams.RouteParams.ROOT_META_DATA].customEventsData
370
+ };
371
+ (0, _EventDispatcher.default)('ON_SCAN_REMOVE', nextStates.taskName, eventOutputData);
372
+ break;
373
+ }
374
+ default:
375
+ break;
376
+ }
377
+ }
378
+ const fetchMergedObjectiveIdBasedOnStatus = async (activeTab, scanProps) => {
379
+ let prefixedMergedObjectiveId = scanProps.route.params[_RouteParams.RouteParams.ROOT_META_DATA].prefixedMergedObjectiveId;
380
+ let mergedObjectiveIds;
381
+ let filterIds = await getScanMergedObjectID();
382
+ if (filterIds) {
383
+ mergedObjectiveIds = filterIds[prefixedMergedObjectiveId] || [];
384
+ } else {
385
+ return [];
386
+ }
387
+ switch (activeTab) {
388
+ case _interfaces.SummaryPageTabs.ALL:
389
+ return [...mergedObjectiveIds['pending'], ...mergedObjectiveIds['success'], ...mergedObjectiveIds['failure']];
390
+ case _interfaces.SummaryPageTabs.PENDING:
391
+ return mergedObjectiveIds['pending'];
392
+ case _interfaces.SummaryPageTabs.DELIVERED:
393
+ return mergedObjectiveIds['success'];
394
+ case _interfaces.SummaryPageTabs.UNDELIVERED:
395
+ return mergedObjectiveIds['failure'];
396
+ default:
397
+ return [];
398
+ }
399
+ };
400
+ const fetchLabel = async (eventCode, reasonCode) => {
401
+ return await (0, _DropDownUtils.getDefaultERCLabel)({
402
+ eventCode,
403
+ reasonCode
404
+ });
405
+ };
406
+ const modifyDisplayScanData = async response => {
407
+ const {
408
+ data: scans
409
+ } = response;
410
+ const updatedScanData = await Promise.all(scans.map(async scan => {
411
+ var _scan$displayInfo, _scan$displayInfo2;
412
+ const {
413
+ eventCode,
414
+ reasonCode
415
+ } = await fetchLabel(scan.eventCode, scan.reasonCode);
416
+ return {
417
+ scanId: scan.scannableId,
418
+ clientName: ((_scan$displayInfo = scan.displayInfo) === null || _scan$displayInfo === void 0 ? void 0 : _scan$displayInfo.clientName) || '--',
419
+ orderId: ((_scan$displayInfo2 = scan.displayInfo) === null || _scan$displayInfo2 === void 0 ? void 0 : _scan$displayInfo2.orderId) || '--',
420
+ eventCode: eventCode || '--',
421
+ reasonCode: reasonCode || '--',
422
+ prefixedMergedObjectiveId: scan.originalMergedObjId,
423
+ lastStatus: scan.lastStatus
424
+ };
425
+ }));
426
+ return {
427
+ data: updatedScanData,
428
+ totalCount: response.totalCount
429
+ };
430
+ };
431
+ async function getScanData(activeTab, scanProps, limit, offset, scan) {
432
+ const taskName = scanProps.taskName || '';
433
+ const mergedObjectiveId = scanProps.mergedObjectiveId;
434
+ const mergedObjectiveIds = await fetchMergedObjectiveIdBasedOnStatus(activeTab, scanProps);
435
+ if (!mergedObjectiveIds || mergedObjectiveIds.length === 0) {
436
+ return {
437
+ data: [],
438
+ totalCount: 0
439
+ };
440
+ }
441
+ if (scan) {
442
+ const scans = await _platformCoreosExecutionEngineSdk.DispatchExecutor.filterWFIData(taskName, mergedObjectiveIds, limit, offset, scan);
443
+ return await modifyDisplayScanData(scans);
444
+ } else {
445
+ const scans = await _platformCoreosExecutionEngineSdk.DispatchExecutor.filterWFIData(taskName, mergedObjectiveIds, limit, offset);
446
+ return await modifyDisplayScanData(scans);
447
+ }
448
+ }
449
+ async function addScans(scan, scanProps, scanOutput, ercItems, eventCode, reasonCode) {
450
+ const prefixedMergedObjectiveId = scanProps.route.params[_RouteParams.RouteParams.ROOT_META_DATA].prefixedMergedObjectiveId;
451
+ const isErcSelector = scanProps.ercSelector ? true : false;
452
+ if ((0, _utils.isEmptyOrBlank)(scan)) {
453
+ return {
454
+ status: false,
455
+ message: _constants3.EMPTY_AWB,
456
+ type: _SnackBarCustom.SnackBarType.FAILURE
457
+ };
458
+ }
459
+ if (isErcSelector && (!eventCode || !eventCode.code)) {
460
+ return {
461
+ status: false,
462
+ type: _SnackBarCustom.SnackBarType.FAILURE,
463
+ message: _constants3.ER_MISSING.replace('<shipment_id>', scan)
464
+ };
465
+ }
466
+ let isValidated = await checkForValidation(scan, scanProps.validation);
467
+ if (isValidated) {
468
+ // NEW CODE
469
+ try {
470
+ const eventType = getEventType(ercItems || [], (eventCode === null || eventCode === void 0 ? void 0 : eventCode.code) || '');
471
+ const result = await _platformCoreosExecutionEngineSdk.DispatchExecutor.updateWIMapping(prefixedMergedObjectiveId, scan, {
472
+ ec: (eventCode === null || eventCode === void 0 ? void 0 : eventCode.code) || '',
473
+ rc: (reasonCode === null || reasonCode === void 0 ? void 0 : reasonCode.code) || ''
474
+ }, scanProps.scanToMerge || false);
475
+ if ('data' in result) {
476
+ const data = result.data;
477
+ const {
478
+ message: {
479
+ title,
480
+ subTitle
481
+ }
482
+ } = data;
483
+
484
+ // UPDATE SHARED PREFERENCE
485
+ updateSharedPreference(eventType, data.mwId, prefixedMergedObjectiveId);
486
+ const _scanOutput = await getUpdatedScanETOutput(scanOutput, result, eventType, (eventCode === null || eventCode === void 0 ? void 0 : eventCode.code) || '', (reasonCode === null || reasonCode === void 0 ? void 0 : reasonCode.code) || '', scanProps.route, {
487
+ jobId: data.jobId,
488
+ displayInfo: data.displayInfo,
489
+ isScan: true,
490
+ scanId: scan
491
+ });
492
+ return {
493
+ status: true,
494
+ type: subTitle ? _SnackBarCustom.SnackBarType.WARNING : _SnackBarCustom.SnackBarType.SUCCESS,
495
+ message: subTitle ? `#${scan}\n${title}\n${subTitle}` : `#${scan}\nShipment updated successfully!`,
496
+ data: {
497
+ output: _scanOutput,
498
+ shipmentCount: {
499
+ scannedCount: data.scanned,
500
+ totalCount: data.total
501
+ }
502
+ }
503
+ };
504
+ } else {
505
+ return {
506
+ status: false,
507
+ type: _SnackBarCustom.SnackBarType.FAILURE,
508
+ message: 'Error occurred while scanning'
509
+ };
510
+ }
511
+ } catch (error) {
512
+ if (scanProps.exitOnError) {
513
+ return {
514
+ status: false,
515
+ type: _SnackBarCustom.SnackBarType.FAILURE,
516
+ exit: true,
517
+ message: 'Error occurred while scanning'
518
+ };
519
+
520
+ // props.onSubmitET({
521
+ // ...(await getScanETOutput(
522
+ // mergedScanETOutput,
523
+ // props.mergedObjectiveId,
524
+ // eventCodeItems || [],
525
+ // props.defaultERC,
526
+ // false,
527
+ // true
528
+ // )),
529
+ // });
530
+ } else {
531
+ return {
532
+ status: false,
533
+ ...getErrorMessage(scan, error)
534
+ };
535
+ }
536
+ }
537
+ } else {
538
+ if (scanProps.exitOnError) {
539
+ return {
540
+ status: false,
541
+ type: _SnackBarCustom.SnackBarType.FAILURE,
542
+ exit: true,
543
+ message: 'Error occurred while scanning'
544
+ };
545
+ } else {
546
+ return {
547
+ status: false,
548
+ message: _constants3.INVALID_SHIPMENT,
549
+ type: _SnackBarCustom.SnackBarType.FAILURE
550
+ };
551
+ }
552
+ }
553
+ }
554
+ async function removeScan(taskName, scans, route, scanOutput) {
555
+ const prefixedMergedObjectiveId = route.params[_RouteParams.RouteParams.ROOT_META_DATA].prefixedMergedObjectiveId;
556
+ const result = await _platformCoreosExecutionEngineSdk.DispatchExecutor.removeShipment(prefixedMergedObjectiveId, scans);
557
+
558
+ // Decrease count on remove
559
+ Object.keys(result).forEach(mergedObjectiveId => {
560
+ scanOutput[mergedObjectiveId].count -= result[mergedObjectiveId];
561
+ if (scanOutput[mergedObjectiveId].count === 0) {
562
+ delete scanOutput[mergedObjectiveId];
563
+ }
564
+ });
565
+ const allScansOutput = (await getScanMergedOutput()) || {};
566
+
567
+ // SAVE IN SHARED PREFERENCE
568
+ let storage = _storage.default.getInstance();
569
+ const mergedIdOutput = await getScanMergedObjectID();
570
+ if (mergedIdOutput) {
571
+ const _mergedIds = mergedIdOutput[prefixedMergedObjectiveId];
572
+ _mergedIds.pending.push(prefixedMergedObjectiveId);
573
+ await storage.setSharedItem(_constants2.SCAN_MERGED_OBJ_ID_OUTPUT, JSON.stringify({
574
+ ...mergedIdOutput,
575
+ [prefixedMergedObjectiveId]: _mergedIds
576
+ }));
577
+ }
578
+ let outputAtPrefixedId = allScansOutput[prefixedMergedObjectiveId] || {};
579
+ await storage.setSharedItem(_constants2.SHARED_PREFERENCE_SCAN_OUTPUT, JSON.stringify({
580
+ ...allScansOutput,
581
+ [prefixedMergedObjectiveId]: {
582
+ ...outputAtPrefixedId,
583
+ scanOutput
584
+ }
585
+ }));
586
+
587
+ // TRIGGER REMOVE SCAN EVENT
588
+ const scannedData = scans.map(scan => ({
589
+ scanValue: scan
590
+ }));
591
+ triggerScanEvent('ON_SCAN_REMOVE', route, scannedData);
592
+ }
593
+ async function updateSharedPreference(eventType, mergedObjectiveId, prefixedMergedObjectiveId) {
594
+ let storage = _storage.default.getInstance();
595
+ const mergedIdOutput = await getScanMergedObjectID();
596
+ if (mergedIdOutput) {
597
+ const _mergedIds = mergedIdOutput[prefixedMergedObjectiveId];
598
+ if (eventType) {
599
+ _mergedIds.success.push(mergedObjectiveId);
600
+ } else {
601
+ _mergedIds.failure.push(mergedObjectiveId);
602
+ }
603
+ await storage.setSharedItem(_constants2.SCAN_MERGED_OBJ_ID_OUTPUT, JSON.stringify({
604
+ ...mergedIdOutput,
605
+ [prefixedMergedObjectiveId]: _mergedIds
606
+ }));
607
+ }
608
+ }
609
+ async function updatePendingSharedPreference(eventType, prefixedMergedObjectiveId) {
610
+ let storage = _storage.default.getInstance();
611
+ const mergedIdOutput = await getScanMergedObjectID();
612
+ if (mergedIdOutput) {
613
+ const _mergedIds = mergedIdOutput[prefixedMergedObjectiveId];
614
+ if (_mergedIds) {
615
+ if (eventType) {
616
+ _mergedIds.success.push(prefixedMergedObjectiveId);
617
+ _mergedIds.pending = [];
618
+ } else {
619
+ _mergedIds.failure.push(prefixedMergedObjectiveId);
620
+ _mergedIds.pending = [];
621
+ }
622
+ await storage.setSharedItem(_constants2.SCAN_MERGED_OBJ_ID_OUTPUT, JSON.stringify({
623
+ ...mergedIdOutput,
624
+ [prefixedMergedObjectiveId]: _mergedIds
625
+ }));
626
+ }
627
+ }
628
+ }
629
+ const getTabCount = async scanProps => {
630
+ let prefixedMergedObjectiveId = scanProps.route.params[_RouteParams.RouteParams.ROOT_META_DATA].prefixedMergedObjectiveId;
631
+ const mergedIdOutput = await getScanMergedObjectID();
632
+ const defaultResult = {
633
+ [_interfaces.SummaryPageTabs.ALL]: 0,
634
+ [_interfaces.SummaryPageTabs.PENDING]: 0,
635
+ [_interfaces.SummaryPageTabs.DELIVERED]: 0,
636
+ [_interfaces.SummaryPageTabs.UNDELIVERED]: 0
637
+ };
638
+ const input = {};
639
+ if (mergedIdOutput) {
640
+ const _mergedIds = mergedIdOutput[prefixedMergedObjectiveId];
641
+ if (_mergedIds) {
642
+ const success = _mergedIds.success;
643
+ const failure = _mergedIds.failure;
644
+ const pending = _mergedIds.pending;
645
+ input[_interfaces.SummaryPageTabs.ALL] = [...success, ...failure, ...pending];
646
+ if (pending.length > 0) input[_interfaces.SummaryPageTabs.PENDING] = pending;
647
+ if (success.length > 0) input[_interfaces.SummaryPageTabs.DELIVERED] = success;
648
+ if (failure.length > 0) input[_interfaces.SummaryPageTabs.UNDELIVERED] = failure;
649
+ const result = await _platformCoreosExecutionEngineSdk.DispatchExecutor.getWFICountByMWIIds(input);
650
+ return {
651
+ ...defaultResult,
652
+ ...result
653
+ };
654
+ } else {
655
+ return defaultResult;
656
+ }
657
+ } else {
658
+ return defaultResult;
659
+ }
660
+ };
661
+ exports.getTabCount = getTabCount;
662
+ const clearScanOutput = async prefixedMergedObjectiveId => {
663
+ let storage = _storage.default.getInstance();
664
+ const promises = [];
665
+
666
+ // Clear Scan Record
667
+ const scanRecord = (await getScanMergedObjectID()) || {};
668
+ if (scanRecord) {
669
+ delete scanRecord[prefixedMergedObjectiveId];
670
+ promises.push(storage.setSharedItem(_constants2.SCAN_MERGED_OBJ_ID_OUTPUT, JSON.stringify(scanRecord)));
671
+ }
672
+
673
+ // Clear Scan Output
674
+ const scanOutputs = (await getScanMappedOutput()) || {};
675
+ if (scanOutputs) {
676
+ delete scanOutputs[prefixedMergedObjectiveId];
677
+ promises.push(storage.setSharedItem(_constants2.SHARED_PREFERENCE_SCAN_OUTPUT, JSON.stringify(scanOutputs)));
678
+ }
679
+ return Promise.all(promises);
680
+ };
681
+ exports.clearScanOutput = clearScanOutput;
682
+ async function getScanMergedObjectID() {
683
+ let storage = _storage.default.getInstance();
684
+ const mergedIdOutput = await storage.getSharedItem(_constants2.SCAN_MERGED_OBJ_ID_OUTPUT);
685
+ if (mergedIdOutput) {
686
+ return JSON.parse(mergedIdOutput);
687
+ } else {
688
+ return null;
689
+ }
690
+ }
691
+ async function getScanMergedOutput() {
692
+ let storage = _storage.default.getInstance();
693
+ const mergedIdOutput = await storage.getSharedItem(_constants2.SHARED_PREFERENCE_SCAN_OUTPUT);
694
+ if (mergedIdOutput) {
695
+ return JSON.parse(mergedIdOutput);
696
+ } else {
697
+ return null;
698
+ }
699
+ }
700
+ const getErrorMessage = (scan, error) => {
701
+ switch (error.errorCode) {
702
+ case _platformCoreosExecutionEngineSdk.WIErrorCodes.ScannableIdAlreadyCompleted:
703
+ return {
704
+ type: _SnackBarCustom.SnackBarType.FAILURE,
705
+ message: `#${scan}\n${_platformCoreosExecutionEngineSdk.ErrorCodeMessages[_platformCoreosExecutionEngineSdk.WIErrorCodes.ScannableIdAlreadyCompleted]}`
706
+ };
707
+ case _platformCoreosExecutionEngineSdk.WIErrorCodes.ScannableIdNotInDispatch:
708
+ return {
709
+ type: _SnackBarCustom.SnackBarType.FAILURE,
710
+ message: `#${scan}\n${_platformCoreosExecutionEngineSdk.ErrorCodeMessages[_platformCoreosExecutionEngineSdk.WIErrorCodes.ScannableIdNotInDispatch]}`
711
+ };
712
+ case _platformCoreosExecutionEngineSdk.WIErrorCodes.ScannableIdNotReady:
713
+ return {
714
+ type: _SnackBarCustom.SnackBarType.FAILURE,
715
+ message: `#${scan}\n${_platformCoreosExecutionEngineSdk.ErrorCodeMessages[_platformCoreosExecutionEngineSdk.WIErrorCodes.ScannableIdNotReady]}`
716
+ };
717
+ case _platformCoreosExecutionEngineSdk.WIErrorCodes.DifferentGroupUpdateNotAllowed:
718
+ return {
719
+ type: _SnackBarCustom.SnackBarType.FAILURE,
720
+ message: `#${scan}\n${_platformCoreosExecutionEngineSdk.ErrorCodeMessages[_platformCoreosExecutionEngineSdk.WIErrorCodes.DifferentGroupUpdateNotAllowed]}`
721
+ };
722
+ case _platformCoreosExecutionEngineSdk.WIErrorCodes.ObjectiveAndJobWFMismatch:
723
+ return {
724
+ type: _SnackBarCustom.SnackBarType.FAILURE,
725
+ message: `#${scan}\n${_platformCoreosExecutionEngineSdk.ErrorCodeMessages[_platformCoreosExecutionEngineSdk.WIErrorCodes.ObjectiveAndJobWFMismatch]}`
726
+ };
727
+ case _platformCoreosExecutionEngineSdk.WIErrorCodes.ScannableIdAlreadyUpdated:
728
+ return {
729
+ type: _SnackBarCustom.SnackBarType.WARNING,
730
+ message: `#${scan}\n${_platformCoreosExecutionEngineSdk.ErrorCodeMessages[_platformCoreosExecutionEngineSdk.WIErrorCodes.ScannableIdAlreadyUpdated]}`
731
+ };
732
+ case _platformCoreosExecutionEngineSdk.WIErrorCodes.JobAlreadyCompleted:
733
+ return {
734
+ type: _SnackBarCustom.SnackBarType.WARNING,
735
+ message: `#${scan}\n${_platformCoreosExecutionEngineSdk.ErrorCodeMessages[_platformCoreosExecutionEngineSdk.WIErrorCodes.JobAlreadyCompleted]}`
736
+ };
737
+ case _platformCoreosExecutionEngineSdk.WIErrorCodes.ScannableIdPartOfAnotherMO:
738
+ return {
739
+ type: _SnackBarCustom.SnackBarType.WARNING,
740
+ message: `#${scan}\n${_platformCoreosExecutionEngineSdk.ErrorCodeMessages[_platformCoreosExecutionEngineSdk.WIErrorCodes.ScannableIdPartOfAnotherMO]}`
741
+ };
742
+ default:
743
+ return {
744
+ type: _SnackBarCustom.SnackBarType.FAILURE,
745
+ message: 'Error occurred while scanning'
746
+ };
747
+ }
748
+ };
749
+ exports.getErrorMessage = getErrorMessage;
750
+ const getSplitIds = scanOutput => {
751
+ const splitMergedObjectiveIds = Object.keys(scanOutput).filter(mergedObjectiveID => {
752
+ const scan = scanOutput[mergedObjectiveID];
753
+ if (scan.count > 0) return true;
754
+ return false;
755
+ }).map(mergedObjectiveIds => mergedObjectiveIds);
756
+ return splitMergedObjectiveIds;
757
+ };
758
+ exports.getSplitIds = getSplitIds;
759
+ function filterERCItems(eventCodeItems, type) {
760
+ return eventCodeItems.filter(erc => Boolean(erc.success) === (type === 'SUCCESS' ? true : false));
761
+ }
373
762
  //# sourceMappingURL=utils.js.map