@os1-platform/dispatch-mobile 1.0.8 → 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 (778) hide show
  1. package/README.md +310 -74
  2. package/android/.gradle/7.0.2/fileChanges/last-build.bin +0 -0
  3. package/android/.gradle/7.0.2/fileHashes/fileHashes.lock +0 -0
  4. package/android/.gradle/7.0.2/gc.properties +0 -0
  5. package/android/.gradle/7.2/dependencies-accessors/dependencies-accessors.lock +0 -0
  6. package/android/.gradle/7.2/dependencies-accessors/gc.properties +0 -0
  7. package/android/.gradle/7.2/executionHistory/executionHistory.bin +0 -0
  8. package/android/.gradle/7.2/executionHistory/executionHistory.lock +0 -0
  9. package/android/.gradle/7.2/fileChanges/last-build.bin +0 -0
  10. package/android/.gradle/7.2/fileHashes/fileHashes.bin +0 -0
  11. package/android/.gradle/7.2/fileHashes/fileHashes.lock +0 -0
  12. package/android/.gradle/7.2/fileHashes/resourceHashesCache.bin +0 -0
  13. package/android/.gradle/7.2/gc.properties +0 -0
  14. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  15. package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
  16. package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
  17. package/android/.gradle/checksums/checksums.lock +0 -0
  18. package/android/.gradle/checksums/md5-checksums.bin +0 -0
  19. package/android/.gradle/checksums/sha1-checksums.bin +0 -0
  20. package/android/.gradle/vcs-1/gc.properties +0 -0
  21. package/android/.idea/compiler.xml +6 -0
  22. package/android/.idea/gradle.xml +18 -0
  23. package/android/.idea/jarRepositories.xml +35 -0
  24. package/android/.idea/kotlinc.xml +6 -0
  25. package/android/.idea/misc.xml +9 -0
  26. package/android/.idea/vcs.xml +6 -0
  27. package/android/gradle.properties +1 -1
  28. package/android/local.properties +8 -0
  29. package/android/src/main/AndroidManifest.xml +0 -1
  30. package/android/src/main/java/com/dispatchsdk/DispatchSdkPackage.kt +3 -1
  31. package/android/src/main/java/com/dispatchsdk/sharedPref/SharedPreferenceModule.kt +166 -0
  32. package/lib/commonjs/@types/assets/index.d.js +2 -0
  33. package/lib/commonjs/@types/assets/index.d.js.map +1 -0
  34. package/lib/commonjs/components/dispatch/DispatchExecNavigator.js +50 -43
  35. package/lib/commonjs/components/dispatch/DispatchExecNavigator.js.map +1 -1
  36. package/lib/commonjs/components/executiontasks/ExecutionTasksIndex.js +10 -48
  37. package/lib/commonjs/components/executiontasks/ExecutionTasksIndex.js.map +1 -1
  38. package/lib/commonjs/components/executiontasks/cancellation/CancelET.js +142 -23
  39. package/lib/commonjs/components/executiontasks/cancellation/CancelET.js.map +1 -1
  40. package/lib/commonjs/components/executiontasks/cancellation/CancellationSchema.js.map +1 -1
  41. package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js +66 -18
  42. package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js.map +1 -1
  43. package/lib/commonjs/components/executiontasks/captureInput/utils.js +13 -0
  44. package/lib/commonjs/components/executiontasks/captureInput/utils.js.map +1 -0
  45. package/lib/commonjs/components/executiontasks/deliver/DeliverET.js +6 -16
  46. package/lib/commonjs/components/executiontasks/deliver/DeliverET.js.map +1 -1
  47. package/lib/commonjs/components/executiontasks/deliver/DeliverETInput.js.map +1 -1
  48. package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js +212 -95
  49. package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
  50. package/lib/commonjs/components/executiontasks/display/DisplayModalET.js +16 -25
  51. package/lib/commonjs/components/executiontasks/display/DisplayModalET.js.map +1 -1
  52. package/lib/commonjs/components/executiontasks/doodle/SignatureET.js +65 -29
  53. package/lib/commonjs/components/executiontasks/doodle/SignatureET.js.map +1 -1
  54. package/lib/commonjs/components/executiontasks/dropCash/DropCashET.js +5 -19
  55. package/lib/commonjs/components/executiontasks/dropCash/DropCashET.js.map +1 -1
  56. package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js +74 -30
  57. package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
  58. package/lib/commonjs/components/executiontasks/forms/FormGenerator.js +139 -50
  59. package/lib/commonjs/components/executiontasks/forms/FormGenerator.js.map +1 -1
  60. package/lib/commonjs/components/executiontasks/forms/widgets/DateTimeWidget.js +3 -26
  61. package/lib/commonjs/components/executiontasks/forms/widgets/DateTimeWidget.js.map +1 -1
  62. package/lib/commonjs/components/executiontasks/forms/widgets/DropdownWidget.js +49 -0
  63. package/lib/commonjs/components/executiontasks/forms/widgets/DropdownWidget.js.map +1 -0
  64. package/lib/commonjs/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js +2 -17
  65. package/lib/commonjs/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js.map +1 -1
  66. package/lib/commonjs/components/executiontasks/forms/widgets/TimeRangeSelector.js +0 -10
  67. package/lib/commonjs/components/executiontasks/forms/widgets/TimeRangeSelector.js.map +1 -1
  68. package/lib/commonjs/components/executiontasks/httpRequest/HttpEtUtils.js +5 -14
  69. package/lib/commonjs/components/executiontasks/httpRequest/HttpEtUtils.js.map +1 -1
  70. package/lib/commonjs/components/executiontasks/httpRequest/HttpRequestET.js +3 -15
  71. package/lib/commonjs/components/executiontasks/httpRequest/HttpRequestET.js.map +1 -1
  72. package/lib/commonjs/components/executiontasks/imageCapture/CaptureSchema.js.map +1 -1
  73. package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js +11 -36
  74. package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
  75. package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js +73 -48
  76. package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
  77. package/lib/commonjs/components/executiontasks/payments/PaymentStyles.js +0 -4
  78. package/lib/commonjs/components/executiontasks/payments/PaymentStyles.js.map +1 -1
  79. package/lib/commonjs/components/executiontasks/payments/PaymentUtils.js +0 -2
  80. package/lib/commonjs/components/executiontasks/payments/PaymentUtils.js.map +1 -1
  81. package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js +76 -29
  82. package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
  83. package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js +63 -24
  84. package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
  85. package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js +71 -22
  86. package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
  87. package/lib/commonjs/components/executiontasks/pickup/PickupET.js +5 -15
  88. package/lib/commonjs/components/executiontasks/pickup/PickupET.js.map +1 -1
  89. package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js +138 -32
  90. package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js.map +1 -1
  91. package/lib/commonjs/components/executiontasks/scan/ScanET.js +741 -0
  92. package/lib/commonjs/components/executiontasks/scan/ScanET.js.map +1 -0
  93. package/lib/commonjs/components/executiontasks/scan/ScanSchema.js +19 -0
  94. package/lib/commonjs/components/executiontasks/scan/ScanSchema.js.map +1 -0
  95. package/lib/commonjs/components/executiontasks/scan/constants.js +19 -0
  96. package/lib/commonjs/components/executiontasks/scan/constants.js.map +1 -0
  97. package/lib/commonjs/components/executiontasks/scan/interfaces.js +43 -0
  98. package/lib/commonjs/components/executiontasks/scan/interfaces.js.map +1 -0
  99. package/lib/commonjs/components/executiontasks/scan/modalConstant.js +104 -0
  100. package/lib/commonjs/components/executiontasks/scan/modalConstant.js.map +1 -0
  101. package/lib/commonjs/components/executiontasks/{scanner → scan/sub_components}/CScanner.js +9 -29
  102. package/lib/commonjs/components/executiontasks/scan/sub_components/CScanner.js.map +1 -0
  103. package/lib/commonjs/components/executiontasks/scan/sub_components/DropDownUtils.js +109 -0
  104. package/lib/commonjs/components/executiontasks/scan/sub_components/DropDownUtils.js.map +1 -0
  105. package/lib/commonjs/components/executiontasks/{scanner/returns/ReasonDropDown.js → scan/sub_components/ERDropDown.js} +72 -55
  106. package/lib/commonjs/components/executiontasks/scan/sub_components/ERDropDown.js.map +1 -0
  107. package/lib/commonjs/components/executiontasks/scan/sub_components/SummaryPage.js +1099 -0
  108. package/lib/commonjs/components/executiontasks/scan/sub_components/SummaryPage.js.map +1 -0
  109. package/lib/commonjs/components/executiontasks/scan/utils.js +762 -0
  110. package/lib/commonjs/components/executiontasks/scan/utils.js.map +1 -0
  111. package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPET.js +333 -0
  112. package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPET.js.map +1 -0
  113. package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPSchema.js +14 -0
  114. package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPSchema.js.map +1 -0
  115. package/lib/commonjs/components/executiontasks/validateOTP/constants.js +37 -0
  116. package/lib/commonjs/components/executiontasks/validateOTP/constants.js.map +1 -0
  117. package/lib/commonjs/components/executiontasks/validateOTP/sub-components/OTPInput.js +63 -0
  118. package/lib/commonjs/components/executiontasks/validateOTP/sub-components/OTPInput.js.map +1 -0
  119. package/lib/commonjs/components/executiontasks/validateOTP/utils.js +147 -0
  120. package/lib/commonjs/components/executiontasks/validateOTP/utils.js.map +1 -0
  121. package/lib/commonjs/components/executiontasks/verifyLocation/GeofenceUtils.js +0 -13
  122. package/lib/commonjs/components/executiontasks/verifyLocation/GeofenceUtils.js.map +1 -1
  123. package/lib/commonjs/components/executiontasks/verifyLocation/VerifyLocationET.js +4 -17
  124. package/lib/commonjs/components/executiontasks/verifyLocation/VerifyLocationET.js.map +1 -1
  125. package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpET.js +3 -18
  126. package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpET.js.map +1 -1
  127. package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpSchema.js.map +1 -1
  128. package/lib/commonjs/components/utils/index.js +14 -0
  129. package/lib/commonjs/components/utils/index.js.map +1 -0
  130. package/lib/commonjs/components/widgets/AlertDisplay.js +0 -5
  131. package/lib/commonjs/components/widgets/AlertDisplay.js.map +1 -1
  132. package/lib/commonjs/components/widgets/CancelOrderDialog.js +0 -12
  133. package/lib/commonjs/components/widgets/CancelOrderDialog.js.map +1 -1
  134. package/lib/commonjs/components/widgets/Card.js +88 -0
  135. package/lib/commonjs/components/widgets/Card.js.map +1 -0
  136. package/lib/commonjs/components/widgets/GoBackModal.js +48 -0
  137. package/lib/commonjs/components/widgets/GoBackModal.js.map +1 -0
  138. package/lib/commonjs/components/widgets/IconButton.js +34 -0
  139. package/lib/commonjs/components/widgets/IconButton.js.map +1 -0
  140. package/lib/commonjs/components/widgets/ModalWidget.js +99 -0
  141. package/lib/commonjs/components/widgets/ModalWidget.js.map +1 -0
  142. package/lib/commonjs/components/widgets/ProgressDialog.js +0 -7
  143. package/lib/commonjs/components/widgets/ProgressDialog.js.map +1 -1
  144. package/lib/commonjs/components/widgets/SearchBar.js +74 -0
  145. package/lib/commonjs/components/widgets/SearchBar.js.map +1 -0
  146. package/lib/commonjs/components/widgets/SnackBarCustom.js +48 -40
  147. package/lib/commonjs/components/widgets/SnackBarCustom.js.map +1 -1
  148. package/lib/commonjs/components/widgets/SplitTextInput.js +93 -0
  149. package/lib/commonjs/components/widgets/SplitTextInput.js.map +1 -0
  150. package/lib/commonjs/components/widgets/TabsComponent.js +64 -0
  151. package/lib/commonjs/components/widgets/TabsComponent.js.map +1 -0
  152. package/lib/commonjs/components/widgets/Toaster.js +0 -2
  153. package/lib/commonjs/components/widgets/Toaster.js.map +1 -1
  154. package/lib/commonjs/config/DispatchSDKConfig.js +4 -5
  155. package/lib/commonjs/config/DispatchSDKConfig.js.map +1 -1
  156. package/lib/commonjs/constants/apiConstants.js +17 -0
  157. package/lib/commonjs/constants/apiConstants.js.map +1 -0
  158. package/lib/commonjs/constants/constants.js +7 -3
  159. package/lib/commonjs/constants/constants.js.map +1 -1
  160. package/lib/commonjs/constants/statuscode.js +3 -5
  161. package/lib/commonjs/constants/statuscode.js.map +1 -1
  162. package/lib/commonjs/errors/BaseError.js +3 -8
  163. package/lib/commonjs/errors/BaseError.js.map +1 -1
  164. package/lib/commonjs/errors/ErrorCodes.js +7 -6
  165. package/lib/commonjs/errors/ErrorCodes.js.map +1 -1
  166. package/lib/commonjs/events/EventDispatcher.js +23 -0
  167. package/lib/commonjs/events/EventDispatcher.js.map +1 -0
  168. package/lib/commonjs/events/EventListener.js +20 -0
  169. package/lib/commonjs/events/EventListener.js.map +1 -0
  170. package/lib/commonjs/events/constants.js +15 -0
  171. package/lib/commonjs/events/constants.js.map +1 -0
  172. package/lib/commonjs/events/index.js +11 -0
  173. package/lib/commonjs/events/index.js.map +1 -0
  174. package/lib/commonjs/events/interface.js +2 -0
  175. package/lib/commonjs/events/interface.js.map +1 -0
  176. package/lib/commonjs/index.js +40 -35
  177. package/lib/commonjs/index.js.map +1 -1
  178. package/lib/commonjs/manager/dispatch/DispatchStateContainer.js +328 -272
  179. package/lib/commonjs/manager/dispatch/DispatchStateContainer.js.map +1 -1
  180. package/lib/commonjs/manager/dispatchCodes/EventCodeContainer.js +55 -4
  181. package/lib/commonjs/manager/dispatchCodes/EventCodeContainer.js.map +1 -1
  182. package/lib/commonjs/manager/dispatchCodes/EventCodeRepo.js +70 -0
  183. package/lib/commonjs/manager/dispatchCodes/EventCodeRepo.js.map +1 -0
  184. package/lib/commonjs/manager/dispatchCodes/ReasonCodeContainer.js +3 -29
  185. package/lib/commonjs/manager/dispatchCodes/ReasonCodeContainer.js.map +1 -1
  186. package/lib/commonjs/manager/dispatchCodes/ReasonCodeRepo.js +6 -20
  187. package/lib/commonjs/manager/dispatchCodes/ReasonCodeRepo.js.map +1 -1
  188. package/lib/commonjs/manager/jobRemoval/JobRemovalManager.js +23 -0
  189. package/lib/commonjs/manager/jobRemoval/JobRemovalManager.js.map +1 -0
  190. package/lib/commonjs/manager/location/LocationManager.js +3 -20
  191. package/lib/commonjs/manager/location/LocationManager.js.map +1 -1
  192. package/lib/commonjs/manager/sdk/DispatchSDKManager.js +23 -37
  193. package/lib/commonjs/manager/sdk/DispatchSDKManager.js.map +1 -1
  194. package/lib/commonjs/manager/sdk/DispatchSdkCache.js +6 -17
  195. package/lib/commonjs/manager/sdk/DispatchSdkCache.js.map +1 -1
  196. package/lib/commonjs/manager/sdk/callbacksHandler.js +26 -0
  197. package/lib/commonjs/manager/sdk/callbacksHandler.js.map +1 -0
  198. package/lib/commonjs/manager/syncmanager/AppSyncManager.js +26 -46
  199. package/lib/commonjs/manager/syncmanager/AppSyncManager.js.map +1 -1
  200. package/lib/commonjs/manager/syncmanager/DBConfig.js +48 -9
  201. package/lib/commonjs/manager/syncmanager/DBConfig.js.map +1 -1
  202. package/lib/commonjs/manager/syncmanager/NativeSyncManager.js +0 -2
  203. package/lib/commonjs/manager/syncmanager/NativeSyncManager.js.map +1 -1
  204. package/lib/commonjs/manager/syncmanager/constants.js +17 -0
  205. package/lib/commonjs/manager/syncmanager/constants.js.map +1 -0
  206. package/lib/commonjs/manager/syncmanager/database.js +28 -12
  207. package/lib/commonjs/manager/syncmanager/database.js.map +1 -1
  208. package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js +11 -36
  209. package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js.map +1 -1
  210. package/lib/commonjs/manager/syncmanager/document/DocumentManager.js +8 -26
  211. package/lib/commonjs/manager/syncmanager/document/DocumentManager.js.map +1 -1
  212. package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js +19 -58
  213. package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
  214. package/lib/commonjs/manager/syncmanager/events/ETEventsManager.js +414 -29
  215. package/lib/commonjs/manager/syncmanager/events/ETEventsManager.js.map +1 -1
  216. package/lib/commonjs/manager/syncmanager/events/EventsSyncManager.js +208 -103
  217. package/lib/commonjs/manager/syncmanager/events/EventsSyncManager.js.map +1 -1
  218. package/lib/commonjs/manager/syncmanager/events/SyncHttpClient.js +157 -36
  219. package/lib/commonjs/manager/syncmanager/events/SyncHttpClient.js.map +1 -1
  220. package/lib/commonjs/models/DispatchModels.js +4 -5
  221. package/lib/commonjs/models/DispatchModels.js.map +1 -1
  222. package/lib/commonjs/models/ReasonCodes.js.map +1 -1
  223. package/lib/commonjs/models/execTasks/ETBaseModels.js +4 -0
  224. package/lib/commonjs/models/execTasks/ETBaseModels.js.map +1 -1
  225. package/lib/commonjs/models/execTasks/ETConfig.js +28 -35
  226. package/lib/commonjs/models/execTasks/ETConfig.js.map +1 -1
  227. package/lib/commonjs/models/sdk.js +4 -5
  228. package/lib/commonjs/models/sdk.js.map +1 -1
  229. package/lib/commonjs/native/signature/SignatureCapture.js +3 -24
  230. package/lib/commonjs/native/signature/SignatureCapture.js.map +1 -1
  231. package/lib/commonjs/network/GraphQLClient.js +7 -35
  232. package/lib/commonjs/network/GraphQLClient.js.map +1 -1
  233. package/lib/commonjs/network/NetworkClient.js +2 -13
  234. package/lib/commonjs/network/NetworkClient.js.map +1 -1
  235. package/lib/commonjs/network/NetworkUtils.js +10 -8
  236. package/lib/commonjs/network/NetworkUtils.js.map +1 -1
  237. package/lib/commonjs/network/Queries.js +0 -2
  238. package/lib/commonjs/network/Queries.js.map +1 -1
  239. package/lib/commonjs/network/client.js +6 -21
  240. package/lib/commonjs/network/client.js.map +1 -1
  241. package/lib/commonjs/res/strings.js.map +1 -1
  242. package/lib/commonjs/resources/Login.js +4 -15
  243. package/lib/commonjs/resources/Login.js.map +1 -1
  244. package/lib/commonjs/resources/network.js +3 -8
  245. package/lib/commonjs/resources/network.js.map +1 -1
  246. package/lib/commonjs/styles/SdkColors.js +10 -8
  247. package/lib/commonjs/styles/SdkColors.js.map +1 -1
  248. package/lib/commonjs/styles/executionTasks/CommonStyles.js +58 -25
  249. package/lib/commonjs/styles/executionTasks/CommonStyles.js.map +1 -1
  250. package/lib/commonjs/ui/screens/CancellationScreen.js +67 -27
  251. package/lib/commonjs/ui/screens/CancellationScreen.js.map +1 -1
  252. package/lib/commonjs/ui/screens/CaptureInputScreen.js +15 -16
  253. package/lib/commonjs/ui/screens/CaptureInputScreen.js.map +1 -1
  254. package/lib/commonjs/ui/screens/CompleteObjectiveScreen.js +11 -23
  255. package/lib/commonjs/ui/screens/CompleteObjectiveScreen.js.map +1 -1
  256. package/lib/commonjs/ui/screens/DeliverScreen.js +30 -17
  257. package/lib/commonjs/ui/screens/DeliverScreen.js.map +1 -1
  258. package/lib/commonjs/ui/screens/DisplayScreen.js +17 -13
  259. package/lib/commonjs/ui/screens/DisplayScreen.js.map +1 -1
  260. package/lib/commonjs/ui/screens/DoodleScreen.js +17 -20
  261. package/lib/commonjs/ui/screens/DoodleScreen.js.map +1 -1
  262. package/lib/commonjs/ui/screens/DropCashScreen.js +43 -31
  263. package/lib/commonjs/ui/screens/DropCashScreen.js.map +1 -1
  264. package/lib/commonjs/ui/screens/ETScreensIndex.js +10 -19
  265. package/lib/commonjs/ui/screens/ETScreensIndex.js.map +1 -1
  266. package/lib/commonjs/ui/screens/FormsScreen.js +105 -17
  267. package/lib/commonjs/ui/screens/FormsScreen.js.map +1 -1
  268. package/lib/commonjs/ui/screens/GeofenceScreen.js +16 -14
  269. package/lib/commonjs/ui/screens/GeofenceScreen.js.map +1 -1
  270. package/lib/commonjs/ui/screens/HttpRequestScreen.js +14 -11
  271. package/lib/commonjs/ui/screens/HttpRequestScreen.js.map +1 -1
  272. package/lib/commonjs/ui/screens/ImageCaptureScreen.js +38 -17
  273. package/lib/commonjs/ui/screens/ImageCaptureScreen.js.map +1 -1
  274. package/lib/commonjs/ui/screens/PaymentScreen.js +28 -29
  275. package/lib/commonjs/ui/screens/PaymentScreen.js.map +1 -1
  276. package/lib/commonjs/ui/screens/PickupScreen.js +41 -19
  277. package/lib/commonjs/ui/screens/PickupScreen.js.map +1 -1
  278. package/lib/commonjs/ui/screens/ScanScreen.js +121 -0
  279. package/lib/commonjs/ui/screens/ScanScreen.js.map +1 -0
  280. package/lib/commonjs/ui/screens/StartWorkFlowScreen.js +64 -38
  281. package/lib/commonjs/ui/screens/StartWorkFlowScreen.js.map +1 -1
  282. package/lib/commonjs/ui/screens/ValidateOTPScreen.js +55 -0
  283. package/lib/commonjs/ui/screens/ValidateOTPScreen.js.map +1 -0
  284. package/lib/commonjs/ui/screens/WithBaseDispatchScreen.js +0 -10
  285. package/lib/commonjs/ui/screens/WithBaseDispatchScreen.js.map +1 -1
  286. package/lib/commonjs/ui/uiConfig/RouteParams.js +24 -1
  287. package/lib/commonjs/ui/uiConfig/RouteParams.js.map +1 -1
  288. package/lib/commonjs/utils/ApiUtils.js +129 -0
  289. package/lib/commonjs/utils/ApiUtils.js.map +1 -0
  290. package/lib/commonjs/utils/ExecTaskUtils.js +111 -41
  291. package/lib/commonjs/utils/ExecTaskUtils.js.map +1 -1
  292. package/lib/commonjs/utils/Logger.js +10 -29
  293. package/lib/commonjs/utils/Logger.js.map +1 -1
  294. package/lib/commonjs/utils/NetworkUtil.js +3 -19
  295. package/lib/commonjs/utils/NetworkUtil.js.map +1 -1
  296. package/lib/commonjs/utils/SdkUtils.js +2 -31
  297. package/lib/commonjs/utils/SdkUtils.js.map +1 -1
  298. package/lib/commonjs/utils/SyncManagerUtils.js +61 -43
  299. package/lib/commonjs/utils/SyncManagerUtils.js.map +1 -1
  300. package/lib/commonjs/utils/fcm/FCM.js +59 -11
  301. package/lib/commonjs/utils/fcm/FCM.js.map +1 -1
  302. package/lib/commonjs/utils/fcm/FcmUtils.js +82 -21
  303. package/lib/commonjs/utils/fcm/FcmUtils.js.map +1 -1
  304. package/lib/commonjs/utils/helper.js +0 -5
  305. package/lib/commonjs/utils/helper.js.map +1 -1
  306. package/lib/commonjs/utils/hooks/useModal.js +53 -0
  307. package/lib/commonjs/utils/hooks/useModal.js.map +1 -0
  308. package/lib/commonjs/utils/hooks/useTimer.js +44 -0
  309. package/lib/commonjs/utils/hooks/useTimer.js.map +1 -0
  310. package/lib/commonjs/utils/loginHelper.js +6 -18
  311. package/lib/commonjs/utils/loginHelper.js.map +1 -1
  312. package/lib/commonjs/utils/storage.js +87 -31
  313. package/lib/commonjs/utils/storage.js.map +1 -1
  314. package/lib/commonjs/utils/utils.js +8 -11
  315. package/lib/commonjs/utils/utils.js.map +1 -1
  316. package/lib/module/@types/assets/index.d.js +2 -0
  317. package/lib/module/@types/assets/index.d.js.map +1 -0
  318. package/lib/module/components/dispatch/DispatchExecNavigator.js +50 -32
  319. package/lib/module/components/dispatch/DispatchExecNavigator.js.map +1 -1
  320. package/lib/module/components/executiontasks/ExecutionTasksIndex.js +3 -5
  321. package/lib/module/components/executiontasks/ExecutionTasksIndex.js.map +1 -1
  322. package/lib/module/components/executiontasks/cancellation/CancelET.js +145 -19
  323. package/lib/module/components/executiontasks/cancellation/CancelET.js.map +1 -1
  324. package/lib/module/components/executiontasks/cancellation/CancellationSchema.js.map +1 -1
  325. package/lib/module/components/executiontasks/captureInput/CaptureText.js +68 -10
  326. package/lib/module/components/executiontasks/captureInput/CaptureText.js.map +1 -1
  327. package/lib/module/components/executiontasks/captureInput/utils.js +7 -0
  328. package/lib/module/components/executiontasks/captureInput/utils.js.map +1 -0
  329. package/lib/module/components/executiontasks/deliver/DeliverET.js +6 -7
  330. package/lib/module/components/executiontasks/deliver/DeliverET.js.map +1 -1
  331. package/lib/module/components/executiontasks/deliver/DeliverETInput.js.map +1 -1
  332. package/lib/module/components/executiontasks/deliver/SLDeliverET.js +214 -86
  333. package/lib/module/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
  334. package/lib/module/components/executiontasks/display/DisplayModalET.js +16 -15
  335. package/lib/module/components/executiontasks/display/DisplayModalET.js.map +1 -1
  336. package/lib/module/components/executiontasks/doodle/SignatureET.js +68 -15
  337. package/lib/module/components/executiontasks/doodle/SignatureET.js.map +1 -1
  338. package/lib/module/components/executiontasks/dropCash/DropCashET.js +5 -6
  339. package/lib/module/components/executiontasks/dropCash/DropCashET.js.map +1 -1
  340. package/lib/module/components/executiontasks/dropCash/SLDropCash.js +75 -20
  341. package/lib/module/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
  342. package/lib/module/components/executiontasks/forms/FormGenerator.js +142 -37
  343. package/lib/module/components/executiontasks/forms/FormGenerator.js.map +1 -1
  344. package/lib/module/components/executiontasks/forms/widgets/DateTimeWidget.js +3 -15
  345. package/lib/module/components/executiontasks/forms/widgets/DateTimeWidget.js.map +1 -1
  346. package/lib/module/components/executiontasks/forms/widgets/DropdownWidget.js +39 -0
  347. package/lib/module/components/executiontasks/forms/widgets/DropdownWidget.js.map +1 -0
  348. package/lib/module/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js +2 -6
  349. package/lib/module/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js.map +1 -1
  350. package/lib/module/components/executiontasks/forms/widgets/TimeRangeSelector.js +0 -3
  351. package/lib/module/components/executiontasks/forms/widgets/TimeRangeSelector.js.map +1 -1
  352. package/lib/module/components/executiontasks/httpRequest/HttpEtUtils.js +6 -4
  353. package/lib/module/components/executiontasks/httpRequest/HttpEtUtils.js.map +1 -1
  354. package/lib/module/components/executiontasks/httpRequest/HttpRequestET.js +3 -6
  355. package/lib/module/components/executiontasks/httpRequest/HttpRequestET.js.map +1 -1
  356. package/lib/module/components/executiontasks/imageCapture/CaptureSchema.js.map +1 -1
  357. package/lib/module/components/executiontasks/imageCapture/CaptureUtils.js +11 -11
  358. package/lib/module/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
  359. package/lib/module/components/executiontasks/imageCapture/ImageCapture.js +75 -35
  360. package/lib/module/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
  361. package/lib/module/components/executiontasks/payments/PaymentStyles.js.map +1 -1
  362. package/lib/module/components/executiontasks/payments/PaymentUtils.js.map +1 -1
  363. package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentET.js +77 -18
  364. package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
  365. package/lib/module/components/executiontasks/payments/init/InitPaymentET.js +64 -11
  366. package/lib/module/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
  367. package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentET.js +72 -11
  368. package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
  369. package/lib/module/components/executiontasks/pickup/PickupET.js +5 -6
  370. package/lib/module/components/executiontasks/pickup/PickupET.js.map +1 -1
  371. package/lib/module/components/executiontasks/pickup/SLPickupET.js +141 -25
  372. package/lib/module/components/executiontasks/pickup/SLPickupET.js.map +1 -1
  373. package/lib/module/components/executiontasks/scan/ScanET.js +732 -0
  374. package/lib/module/components/executiontasks/scan/ScanET.js.map +1 -0
  375. package/lib/module/components/executiontasks/scan/ScanSchema.js +17 -0
  376. package/lib/module/components/executiontasks/scan/ScanSchema.js.map +1 -0
  377. package/lib/module/components/executiontasks/scan/constants.js +7 -0
  378. package/lib/module/components/executiontasks/scan/constants.js.map +1 -0
  379. package/lib/module/components/executiontasks/scan/interfaces.js +33 -0
  380. package/lib/module/components/executiontasks/scan/interfaces.js.map +1 -0
  381. package/lib/module/components/executiontasks/scan/modalConstant.js +94 -0
  382. package/lib/module/components/executiontasks/scan/modalConstant.js.map +1 -0
  383. package/lib/module/components/executiontasks/{scanner → scan/sub_components}/CScanner.js +9 -16
  384. package/lib/module/components/executiontasks/scan/sub_components/CScanner.js.map +1 -0
  385. package/lib/module/components/executiontasks/scan/sub_components/DropDownUtils.js +101 -0
  386. package/lib/module/components/executiontasks/scan/sub_components/DropDownUtils.js.map +1 -0
  387. package/lib/module/components/executiontasks/scan/sub_components/ERDropDown.js +107 -0
  388. package/lib/module/components/executiontasks/scan/sub_components/ERDropDown.js.map +1 -0
  389. package/lib/module/components/executiontasks/scan/sub_components/SummaryPage.js +1092 -0
  390. package/lib/module/components/executiontasks/scan/sub_components/SummaryPage.js.map +1 -0
  391. package/lib/module/components/executiontasks/scan/utils.js +726 -0
  392. package/lib/module/components/executiontasks/scan/utils.js.map +1 -0
  393. package/lib/module/components/executiontasks/validateOTP/ValidateOTPET.js +324 -0
  394. package/lib/module/components/executiontasks/validateOTP/ValidateOTPET.js.map +1 -0
  395. package/lib/module/components/executiontasks/validateOTP/ValidateOTPSchema.js +8 -0
  396. package/lib/module/components/executiontasks/validateOTP/ValidateOTPSchema.js.map +1 -0
  397. package/lib/module/components/executiontasks/validateOTP/constants.js +25 -0
  398. package/lib/module/components/executiontasks/validateOTP/constants.js.map +1 -0
  399. package/lib/module/components/executiontasks/validateOTP/sub-components/OTPInput.js +53 -0
  400. package/lib/module/components/executiontasks/validateOTP/sub-components/OTPInput.js.map +1 -0
  401. package/lib/module/components/executiontasks/validateOTP/utils.js +133 -0
  402. package/lib/module/components/executiontasks/validateOTP/utils.js.map +1 -0
  403. package/lib/module/components/executiontasks/verifyLocation/GeofenceUtils.js +0 -6
  404. package/lib/module/components/executiontasks/verifyLocation/GeofenceUtils.js.map +1 -1
  405. package/lib/module/components/executiontasks/verifyLocation/VerifyLocationET.js +4 -3
  406. package/lib/module/components/executiontasks/verifyLocation/VerifyLocationET.js.map +1 -1
  407. package/lib/module/components/executiontasks/verifyOtp/VerifyOtpET.js +5 -9
  408. package/lib/module/components/executiontasks/verifyOtp/VerifyOtpET.js.map +1 -1
  409. package/lib/module/components/executiontasks/verifyOtp/VerifyOtpSchema.js.map +1 -1
  410. package/lib/module/components/utils/index.js +8 -0
  411. package/lib/module/components/utils/index.js.map +1 -0
  412. package/lib/module/components/widgets/AlertDisplay.js.map +1 -1
  413. package/lib/module/components/widgets/CancelOrderDialog.js +0 -2
  414. package/lib/module/components/widgets/CancelOrderDialog.js.map +1 -1
  415. package/lib/module/components/widgets/Card.js +80 -0
  416. package/lib/module/components/widgets/Card.js.map +1 -0
  417. package/lib/module/components/widgets/GoBackModal.js +40 -0
  418. package/lib/module/components/widgets/GoBackModal.js.map +1 -0
  419. package/lib/module/components/widgets/IconButton.js +26 -0
  420. package/lib/module/components/widgets/IconButton.js.map +1 -0
  421. package/lib/module/components/widgets/ModalWidget.js +92 -0
  422. package/lib/module/components/widgets/ModalWidget.js.map +1 -0
  423. package/lib/module/components/widgets/ProgressDialog.js +0 -2
  424. package/lib/module/components/widgets/ProgressDialog.js.map +1 -1
  425. package/lib/module/components/widgets/SearchBar.js +66 -0
  426. package/lib/module/components/widgets/SearchBar.js.map +1 -0
  427. package/lib/module/components/widgets/SnackBarCustom.js +46 -20
  428. package/lib/module/components/widgets/SnackBarCustom.js.map +1 -1
  429. package/lib/module/components/widgets/SplitTextInput.js +84 -0
  430. package/lib/module/components/widgets/SplitTextInput.js.map +1 -0
  431. package/lib/module/components/widgets/TabsComponent.js +55 -0
  432. package/lib/module/components/widgets/TabsComponent.js.map +1 -0
  433. package/lib/module/components/widgets/Toaster.js.map +1 -1
  434. package/lib/module/config/DispatchSDKConfig.js +3 -4
  435. package/lib/module/config/DispatchSDKConfig.js.map +1 -1
  436. package/lib/module/constants/apiConstants.js +9 -0
  437. package/lib/module/constants/apiConstants.js.map +1 -0
  438. package/lib/module/constants/constants.js +4 -2
  439. package/lib/module/constants/constants.js.map +1 -1
  440. package/lib/module/constants/statuscode.js +3 -5
  441. package/lib/module/constants/statuscode.js.map +1 -1
  442. package/lib/module/errors/BaseError.js +3 -6
  443. package/lib/module/errors/BaseError.js.map +1 -1
  444. package/lib/module/errors/ErrorCodes.js +5 -5
  445. package/lib/module/errors/ErrorCodes.js.map +1 -1
  446. package/lib/module/events/EventDispatcher.js +16 -0
  447. package/lib/module/events/EventDispatcher.js.map +1 -0
  448. package/lib/module/events/EventListener.js +13 -0
  449. package/lib/module/events/EventListener.js.map +1 -0
  450. package/lib/module/events/constants.js +8 -0
  451. package/lib/module/events/constants.js.map +1 -0
  452. package/lib/module/events/index.js +3 -0
  453. package/lib/module/events/index.js.map +1 -0
  454. package/lib/module/events/interface.js +2 -0
  455. package/lib/module/events/interface.js.map +1 -0
  456. package/lib/module/index.js +9 -5
  457. package/lib/module/index.js.map +1 -1
  458. package/lib/module/manager/dispatch/DispatchStateContainer.js +334 -247
  459. package/lib/module/manager/dispatch/DispatchStateContainer.js.map +1 -1
  460. package/lib/module/manager/dispatchCodes/EventCodeContainer.js +52 -2
  461. package/lib/module/manager/dispatchCodes/EventCodeContainer.js.map +1 -1
  462. package/lib/module/manager/dispatchCodes/EventCodeRepo.js +61 -0
  463. package/lib/module/manager/dispatchCodes/EventCodeRepo.js.map +1 -0
  464. package/lib/module/manager/dispatchCodes/ReasonCodeContainer.js +3 -16
  465. package/lib/module/manager/dispatchCodes/ReasonCodeContainer.js.map +1 -1
  466. package/lib/module/manager/dispatchCodes/ReasonCodeRepo.js +6 -14
  467. package/lib/module/manager/dispatchCodes/ReasonCodeRepo.js.map +1 -1
  468. package/lib/module/manager/jobRemoval/JobRemovalManager.js +22 -0
  469. package/lib/module/manager/jobRemoval/JobRemovalManager.js.map +1 -0
  470. package/lib/module/manager/location/LocationManager.js +3 -14
  471. package/lib/module/manager/location/LocationManager.js.map +1 -1
  472. package/lib/module/manager/sdk/DispatchSDKManager.js +23 -15
  473. package/lib/module/manager/sdk/DispatchSDKManager.js.map +1 -1
  474. package/lib/module/manager/sdk/DispatchSdkCache.js +6 -13
  475. package/lib/module/manager/sdk/DispatchSdkCache.js.map +1 -1
  476. package/lib/module/manager/sdk/callbacksHandler.js +19 -0
  477. package/lib/module/manager/sdk/callbacksHandler.js.map +1 -0
  478. package/lib/module/manager/syncmanager/AppSyncManager.js +26 -26
  479. package/lib/module/manager/syncmanager/AppSyncManager.js.map +1 -1
  480. package/lib/module/manager/syncmanager/DBConfig.js +41 -7
  481. package/lib/module/manager/syncmanager/DBConfig.js.map +1 -1
  482. package/lib/module/manager/syncmanager/NativeSyncManager.js.map +1 -1
  483. package/lib/module/manager/syncmanager/constants.js +6 -0
  484. package/lib/module/manager/syncmanager/constants.js.map +1 -0
  485. package/lib/module/manager/syncmanager/database.js +27 -3
  486. package/lib/module/manager/syncmanager/database.js.map +1 -1
  487. package/lib/module/manager/syncmanager/document/DocumentHttpClient.js +11 -24
  488. package/lib/module/manager/syncmanager/document/DocumentHttpClient.js.map +1 -1
  489. package/lib/module/manager/syncmanager/document/DocumentManager.js +8 -20
  490. package/lib/module/manager/syncmanager/document/DocumentManager.js.map +1 -1
  491. package/lib/module/manager/syncmanager/document/DocumentSyncManager.js +19 -41
  492. package/lib/module/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
  493. package/lib/module/manager/syncmanager/events/ETEventsManager.js +415 -22
  494. package/lib/module/manager/syncmanager/events/ETEventsManager.js.map +1 -1
  495. package/lib/module/manager/syncmanager/events/EventsSyncManager.js +209 -82
  496. package/lib/module/manager/syncmanager/events/EventsSyncManager.js.map +1 -1
  497. package/lib/module/manager/syncmanager/events/SyncHttpClient.js +152 -24
  498. package/lib/module/manager/syncmanager/events/SyncHttpClient.js.map +1 -1
  499. package/lib/module/models/DispatchModels.js +3 -4
  500. package/lib/module/models/DispatchModels.js.map +1 -1
  501. package/lib/module/models/ReasonCodes.js.map +1 -1
  502. package/lib/module/models/execTasks/ETBaseModels.js +1 -1
  503. package/lib/module/models/execTasks/ETBaseModels.js.map +1 -1
  504. package/lib/module/models/execTasks/ETConfig.js +22 -29
  505. package/lib/module/models/execTasks/ETConfig.js.map +1 -1
  506. package/lib/module/models/sdk.js +3 -4
  507. package/lib/module/models/sdk.js.map +1 -1
  508. package/lib/module/native/signature/SignatureCapture.js +3 -18
  509. package/lib/module/native/signature/SignatureCapture.js.map +1 -1
  510. package/lib/module/network/GraphQLClient.js +6 -26
  511. package/lib/module/network/GraphQLClient.js.map +1 -1
  512. package/lib/module/network/NetworkClient.js +2 -6
  513. package/lib/module/network/NetworkClient.js.map +1 -1
  514. package/lib/module/network/NetworkUtils.js +10 -3
  515. package/lib/module/network/NetworkUtils.js.map +1 -1
  516. package/lib/module/network/Queries.js.map +1 -1
  517. package/lib/module/network/client.js +7 -17
  518. package/lib/module/network/client.js.map +1 -1
  519. package/lib/module/res/strings.js.map +1 -1
  520. package/lib/module/resources/Login.js +4 -13
  521. package/lib/module/resources/Login.js.map +1 -1
  522. package/lib/module/resources/network.js +3 -6
  523. package/lib/module/resources/network.js.map +1 -1
  524. package/lib/module/styles/SdkColors.js +9 -7
  525. package/lib/module/styles/SdkColors.js.map +1 -1
  526. package/lib/module/styles/executionTasks/CommonStyles.js +57 -14
  527. package/lib/module/styles/executionTasks/CommonStyles.js.map +1 -1
  528. package/lib/module/ui/screens/CancellationScreen.js +68 -15
  529. package/lib/module/ui/screens/CancellationScreen.js.map +1 -1
  530. package/lib/module/ui/screens/CaptureInputScreen.js +17 -6
  531. package/lib/module/ui/screens/CaptureInputScreen.js.map +1 -1
  532. package/lib/module/ui/screens/CompleteObjectiveScreen.js +12 -8
  533. package/lib/module/ui/screens/CompleteObjectiveScreen.js.map +1 -1
  534. package/lib/module/ui/screens/DeliverScreen.js +32 -7
  535. package/lib/module/ui/screens/DeliverScreen.js.map +1 -1
  536. package/lib/module/ui/screens/DisplayScreen.js +16 -6
  537. package/lib/module/ui/screens/DisplayScreen.js.map +1 -1
  538. package/lib/module/ui/screens/DoodleScreen.js +19 -9
  539. package/lib/module/ui/screens/DoodleScreen.js.map +1 -1
  540. package/lib/module/ui/screens/DropCashScreen.js +45 -19
  541. package/lib/module/ui/screens/DropCashScreen.js.map +1 -1
  542. package/lib/module/ui/screens/ETScreensIndex.js +3 -2
  543. package/lib/module/ui/screens/ETScreensIndex.js.map +1 -1
  544. package/lib/module/ui/screens/FormsScreen.js +104 -9
  545. package/lib/module/ui/screens/FormsScreen.js.map +1 -1
  546. package/lib/module/ui/screens/GeofenceScreen.js +15 -6
  547. package/lib/module/ui/screens/GeofenceScreen.js.map +1 -1
  548. package/lib/module/ui/screens/HttpRequestScreen.js +15 -5
  549. package/lib/module/ui/screens/HttpRequestScreen.js.map +1 -1
  550. package/lib/module/ui/screens/ImageCaptureScreen.js +37 -9
  551. package/lib/module/ui/screens/ImageCaptureScreen.js.map +1 -1
  552. package/lib/module/ui/screens/PaymentScreen.js +30 -17
  553. package/lib/module/ui/screens/PaymentScreen.js.map +1 -1
  554. package/lib/module/ui/screens/PickupScreen.js +40 -12
  555. package/lib/module/ui/screens/PickupScreen.js.map +1 -1
  556. package/lib/module/ui/screens/ScanScreen.js +111 -0
  557. package/lib/module/ui/screens/ScanScreen.js.map +1 -0
  558. package/lib/module/ui/screens/StartWorkFlowScreen.js +64 -16
  559. package/lib/module/ui/screens/StartWorkFlowScreen.js.map +1 -1
  560. package/lib/module/ui/screens/ValidateOTPScreen.js +45 -0
  561. package/lib/module/ui/screens/ValidateOTPScreen.js.map +1 -0
  562. package/lib/module/ui/screens/WithBaseDispatchScreen.js +0 -3
  563. package/lib/module/ui/screens/WithBaseDispatchScreen.js.map +1 -1
  564. package/lib/module/ui/uiConfig/RouteParams.js +23 -1
  565. package/lib/module/ui/uiConfig/RouteParams.js.map +1 -1
  566. package/lib/module/utils/ApiUtils.js +116 -0
  567. package/lib/module/utils/ApiUtils.js.map +1 -0
  568. package/lib/module/utils/ExecTaskUtils.js +110 -31
  569. package/lib/module/utils/ExecTaskUtils.js.map +1 -1
  570. package/lib/module/utils/Logger.js +9 -21
  571. package/lib/module/utils/Logger.js.map +1 -1
  572. package/lib/module/utils/NetworkUtil.js +3 -15
  573. package/lib/module/utils/NetworkUtil.js.map +1 -1
  574. package/lib/module/utils/SdkUtils.js +2 -15
  575. package/lib/module/utils/SdkUtils.js.map +1 -1
  576. package/lib/module/utils/SyncManagerUtils.js +62 -14
  577. package/lib/module/utils/SyncManagerUtils.js.map +1 -1
  578. package/lib/module/utils/fcm/FCM.js +63 -3
  579. package/lib/module/utils/fcm/FCM.js.map +1 -1
  580. package/lib/module/utils/fcm/FcmUtils.js +86 -7
  581. package/lib/module/utils/fcm/FcmUtils.js.map +1 -1
  582. package/lib/module/utils/helper.js +0 -3
  583. package/lib/module/utils/helper.js.map +1 -1
  584. package/lib/module/utils/hooks/useModal.js +43 -0
  585. package/lib/module/utils/hooks/useModal.js.map +1 -0
  586. package/lib/module/utils/hooks/useTimer.js +37 -0
  587. package/lib/module/utils/hooks/useTimer.js.map +1 -0
  588. package/lib/module/utils/loginHelper.js +6 -16
  589. package/lib/module/utils/loginHelper.js.map +1 -1
  590. package/lib/module/utils/storage.js +86 -29
  591. package/lib/module/utils/storage.js.map +1 -1
  592. package/lib/module/utils/utils.js +8 -6
  593. package/lib/module/utils/utils.js.map +1 -1
  594. package/lib/typescript/components/dispatch/DispatchExecNavigator.d.ts +2 -2
  595. package/lib/typescript/components/executiontasks/CompletedWFSchema.d.ts +2 -2
  596. package/lib/typescript/components/executiontasks/ExecutionTasksIndex.d.ts +6 -7
  597. package/lib/typescript/components/executiontasks/cancellation/CancelET.d.ts +2 -2
  598. package/lib/typescript/components/executiontasks/cancellation/CancellationSchema.d.ts +10 -5
  599. package/lib/typescript/components/executiontasks/captureInput/CaptureInputSchema.d.ts +7 -7
  600. package/lib/typescript/components/executiontasks/captureInput/CaptureText.d.ts +2 -2
  601. package/lib/typescript/components/executiontasks/captureInput/utils.d.ts +1 -0
  602. package/lib/typescript/components/executiontasks/deliver/DeliverET.d.ts +2 -2
  603. package/lib/typescript/components/executiontasks/deliver/DeliverETInput.d.ts +8 -7
  604. package/lib/typescript/components/executiontasks/deliver/SLDeliverET.d.ts +3 -3
  605. package/lib/typescript/components/executiontasks/display/DisplayModalET.d.ts +2 -2
  606. package/lib/typescript/components/executiontasks/display/DisplaySchema.d.ts +5 -5
  607. package/lib/typescript/components/executiontasks/doodle/SignatureET.d.ts +2 -2
  608. package/lib/typescript/components/executiontasks/doodle/SignatureSchema.d.ts +7 -7
  609. package/lib/typescript/components/executiontasks/dropCash/DropCashET.d.ts +2 -2
  610. package/lib/typescript/components/executiontasks/dropCash/DropCashSchema.d.ts +2 -2
  611. package/lib/typescript/components/executiontasks/dropCash/SLDropCash.d.ts +2 -2
  612. package/lib/typescript/components/executiontasks/forms/FormGenerator.d.ts +2 -2
  613. package/lib/typescript/components/executiontasks/forms/FormSchema.d.ts +2 -2
  614. package/lib/typescript/components/executiontasks/forms/widgets/DateTimeWidget.d.ts +3 -3
  615. package/lib/typescript/components/executiontasks/forms/widgets/DropdownWidget.d.ts +9 -0
  616. package/lib/typescript/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.d.ts +2 -2
  617. package/lib/typescript/components/executiontasks/forms/widgets/TimeRangeSelector.d.ts +2 -2
  618. package/lib/typescript/components/executiontasks/httpRequest/HttpEtUtils.d.ts +1 -1
  619. package/lib/typescript/components/executiontasks/httpRequest/HttpRequestET.d.ts +2 -2
  620. package/lib/typescript/components/executiontasks/httpRequest/HttpRequestETSchema.d.ts +6 -6
  621. package/lib/typescript/components/executiontasks/imageCapture/CaptureSchema.d.ts +17 -11
  622. package/lib/typescript/components/executiontasks/imageCapture/ImageCapture.d.ts +2 -2
  623. package/lib/typescript/components/executiontasks/payments/completePayment/CompletePaymentET.d.ts +2 -2
  624. package/lib/typescript/components/executiontasks/payments/completePayment/CompletePaymentSchema.d.ts +2 -2
  625. package/lib/typescript/components/executiontasks/payments/init/InitPaymentET.d.ts +2 -2
  626. package/lib/typescript/components/executiontasks/payments/init/InitPaymentSchema.d.ts +3 -3
  627. package/lib/typescript/components/executiontasks/payments/processPayment/ProcessPaymentET.d.ts +2 -2
  628. package/lib/typescript/components/executiontasks/payments/processPayment/ProcessPaymentSchema.d.ts +2 -2
  629. package/lib/typescript/components/executiontasks/pickup/PickpSchema.d.ts +3 -3
  630. package/lib/typescript/components/executiontasks/pickup/PickupET.d.ts +2 -2
  631. package/lib/typescript/components/executiontasks/pickup/SLPickupET.d.ts +3 -3
  632. package/lib/typescript/components/executiontasks/scan/ScanET.d.ts +16 -0
  633. package/lib/typescript/components/executiontasks/scan/ScanSchema.d.ts +86 -0
  634. package/lib/typescript/components/executiontasks/scan/constants.d.ts +6 -0
  635. package/lib/typescript/components/executiontasks/scan/interfaces.d.ts +94 -0
  636. package/lib/typescript/components/executiontasks/scan/modalConstant.d.ts +37 -0
  637. package/lib/typescript/components/executiontasks/{scanner → scan/sub_components}/CScanner.d.ts +1 -1
  638. package/lib/typescript/components/executiontasks/scan/sub_components/DropDownUtils.d.ts +7 -0
  639. package/lib/typescript/components/executiontasks/scan/sub_components/ERDropDown.d.ts +17 -0
  640. package/lib/typescript/components/executiontasks/scan/sub_components/SummaryPage.d.ts +21 -0
  641. package/lib/typescript/components/executiontasks/scan/utils.d.ts +37 -0
  642. package/lib/typescript/components/executiontasks/validateOTP/ValidateOTPET.d.ts +4 -0
  643. package/lib/typescript/components/executiontasks/validateOTP/ValidateOTPSchema.d.ts +54 -0
  644. package/lib/typescript/components/executiontasks/validateOTP/constants.d.ts +10 -0
  645. package/lib/typescript/components/executiontasks/validateOTP/sub-components/OTPInput.d.ts +12 -0
  646. package/lib/typescript/components/executiontasks/validateOTP/utils.d.ts +7 -0
  647. package/lib/typescript/components/executiontasks/verifyInput/VerifyInputSchema.d.ts +8 -8
  648. package/lib/typescript/components/executiontasks/verifyLocation/VerifyLocSchema.d.ts +9 -9
  649. package/lib/typescript/components/executiontasks/verifyLocation/VerifyLocationET.d.ts +2 -2
  650. package/lib/typescript/components/executiontasks/verifyOtp/VerifyOtpET.d.ts +2 -2
  651. package/lib/typescript/components/executiontasks/verifyOtp/VerifyOtpSchema.d.ts +6 -6
  652. package/lib/typescript/components/utils/index.d.ts +2 -0
  653. package/lib/typescript/components/widgets/CancelOrderDialog.d.ts +2 -2
  654. package/lib/typescript/components/widgets/Card.d.ts +17 -0
  655. package/lib/typescript/components/widgets/GoBackModal.d.ts +9 -0
  656. package/lib/typescript/components/widgets/IconButton.d.ts +9 -0
  657. package/lib/typescript/components/widgets/ModalWidget.d.ts +30 -0
  658. package/lib/typescript/components/widgets/ProgressDialog.d.ts +2 -2
  659. package/lib/typescript/components/widgets/SearchBar.d.ts +10 -0
  660. package/lib/typescript/components/widgets/SnackBarCustom.d.ts +10 -5
  661. package/lib/typescript/components/widgets/SplitTextInput.d.ts +12 -0
  662. package/lib/typescript/components/widgets/TabsComponent.d.ts +15 -0
  663. package/lib/typescript/constants/apiConstants.d.ts +7 -0
  664. package/lib/typescript/constants/constants.d.ts +4 -2
  665. package/lib/typescript/errors/ErrorCodes.d.ts +3 -1
  666. package/lib/typescript/events/EventDispatcher.d.ts +3 -0
  667. package/lib/typescript/events/EventListener.d.ts +5 -0
  668. package/lib/typescript/events/constants.d.ts +7 -0
  669. package/lib/typescript/events/index.d.ts +2 -0
  670. package/lib/typescript/events/interface.d.ts +1 -0
  671. package/lib/typescript/index.d.ts +12 -9
  672. package/lib/typescript/manager/dispatch/DispatchStateContainer.d.ts +38 -17
  673. package/lib/typescript/manager/dispatchCodes/EventCodeContainer.d.ts +12 -1
  674. package/lib/typescript/manager/dispatchCodes/EventCodeRepo.d.ts +13 -0
  675. package/lib/typescript/manager/jobRemoval/JobRemovalManager.d.ts +0 -0
  676. package/lib/typescript/manager/sdk/DispatchSdkCache.d.ts +1 -0
  677. package/lib/typescript/manager/sdk/callbacksHandler.d.ts +13 -0
  678. package/lib/typescript/manager/syncmanager/AppSyncManager.d.ts +3 -1
  679. package/lib/typescript/manager/syncmanager/DBConfig.d.ts +80 -4
  680. package/lib/typescript/manager/syncmanager/constants.d.ts +5 -0
  681. package/lib/typescript/manager/syncmanager/database.d.ts +5 -0
  682. package/lib/typescript/manager/syncmanager/document/DocumentManager.d.ts +1 -1
  683. package/lib/typescript/manager/syncmanager/document/DocumentSyncManager.d.ts +1 -1
  684. package/lib/typescript/manager/syncmanager/document/models.d.ts +1 -1
  685. package/lib/typescript/manager/syncmanager/events/ETEventsManager.d.ts +15 -2
  686. package/lib/typescript/manager/syncmanager/events/EventsSyncManager.d.ts +4 -2
  687. package/lib/typescript/manager/syncmanager/events/SyncHttpClient.d.ts +6 -3
  688. package/lib/typescript/models/DispatchModels.d.ts +59 -5
  689. package/lib/typescript/models/ReasonCodes.d.ts +5 -0
  690. package/lib/typescript/models/auth.d.ts +1 -1
  691. package/lib/typescript/models/execTasks/ETBaseModels.d.ts +44 -20
  692. package/lib/typescript/models/execTasks/ETConfig.d.ts +8 -4
  693. package/lib/typescript/models/sdk.d.ts +12 -0
  694. package/lib/typescript/native/signature/SignatureCapture.d.ts +2 -2
  695. package/lib/typescript/network/NetworkUtils.d.ts +1 -5
  696. package/lib/typescript/styles/SdkColors.d.ts +2 -0
  697. package/lib/typescript/styles/executionTasks/CommonStyles.d.ts +50 -5
  698. package/lib/typescript/ui/screens/CancellationScreen.d.ts +2 -2
  699. package/lib/typescript/ui/screens/CaptureInputScreen.d.ts +2 -2
  700. package/lib/typescript/ui/screens/CompleteObjectiveScreen.d.ts +2 -2
  701. package/lib/typescript/ui/screens/DeliverScreen.d.ts +2 -2
  702. package/lib/typescript/ui/screens/DisplayScreen.d.ts +2 -2
  703. package/lib/typescript/ui/screens/DoodleScreen.d.ts +2 -2
  704. package/lib/typescript/ui/screens/DropCashScreen.d.ts +2 -2
  705. package/lib/typescript/ui/screens/ETScreensIndex.d.ts +3 -2
  706. package/lib/typescript/ui/screens/FormsScreen.d.ts +2 -2
  707. package/lib/typescript/ui/screens/GeofenceScreen.d.ts +2 -2
  708. package/lib/typescript/ui/screens/HttpRequestScreen.d.ts +1 -1
  709. package/lib/typescript/ui/screens/ImageCaptureScreen.d.ts +2 -2
  710. package/lib/typescript/ui/screens/PaymentScreen.d.ts +2 -2
  711. package/lib/typescript/ui/screens/PickupScreen.d.ts +2 -2
  712. package/lib/typescript/ui/screens/ScanScreen.d.ts +3 -0
  713. package/lib/typescript/ui/screens/StartWorkFlowScreen.d.ts +2 -2
  714. package/lib/typescript/ui/screens/ValidateOTPScreen.d.ts +3 -0
  715. package/lib/typescript/ui/screens/WithBaseDispatchScreen.d.ts +2 -2
  716. package/lib/typescript/ui/uiConfig/RouteParams.d.ts +14 -0
  717. package/lib/typescript/utils/ApiUtils.d.ts +61 -0
  718. package/lib/typescript/utils/ExecTaskUtils.d.ts +10 -4
  719. package/lib/typescript/utils/NetworkUtil.d.ts +1 -1
  720. package/lib/typescript/utils/SyncManagerUtils.d.ts +4 -3
  721. package/lib/typescript/utils/hooks/useModal.d.ts +6 -0
  722. package/lib/typescript/utils/hooks/useTimer.d.ts +5 -0
  723. package/lib/typescript/utils/storage.d.ts +32 -0
  724. package/package.json +26 -26
  725. package/tsconfig.json +9 -9
  726. package/file_unzip.js +0 -5
  727. package/lib/commonjs/components/executiontasks/doodle/DoodleUtils.js +0 -28
  728. package/lib/commonjs/components/executiontasks/doodle/DoodleUtils.js.map +0 -1
  729. package/lib/commonjs/components/executiontasks/scanner/CScanner.js.map +0 -1
  730. package/lib/commonjs/components/executiontasks/scanner/ScannerSchema.js +0 -32
  731. package/lib/commonjs/components/executiontasks/scanner/ScannerSchema.js.map +0 -1
  732. package/lib/commonjs/components/executiontasks/scanner/ScannerUtils.js +0 -193
  733. package/lib/commonjs/components/executiontasks/scanner/ScannerUtils.js.map +0 -1
  734. package/lib/commonjs/components/executiontasks/scanner/returns/DropDownSelector.js +0 -20
  735. package/lib/commonjs/components/executiontasks/scanner/returns/DropDownSelector.js.map +0 -1
  736. package/lib/commonjs/components/executiontasks/scanner/returns/DropDownUtils.js +0 -49
  737. package/lib/commonjs/components/executiontasks/scanner/returns/DropDownUtils.js.map +0 -1
  738. package/lib/commonjs/components/executiontasks/scanner/returns/RTReasonSelection.js +0 -107
  739. package/lib/commonjs/components/executiontasks/scanner/returns/RTReasonSelection.js.map +0 -1
  740. package/lib/commonjs/components/executiontasks/scanner/returns/RTScan.js +0 -317
  741. package/lib/commonjs/components/executiontasks/scanner/returns/RTScan.js.map +0 -1
  742. package/lib/commonjs/components/executiontasks/scanner/returns/ReasonDropDown.js.map +0 -1
  743. package/lib/commonjs/components/executiontasks/scanner/returns/ScanList.js +0 -276
  744. package/lib/commonjs/components/executiontasks/scanner/returns/ScanList.js.map +0 -1
  745. package/lib/commonjs/ui/screens/RTScanScreen.js +0 -118
  746. package/lib/commonjs/ui/screens/RTScanScreen.js.map +0 -1
  747. package/lib/module/components/executiontasks/doodle/DoodleUtils.js +0 -19
  748. package/lib/module/components/executiontasks/doodle/DoodleUtils.js.map +0 -1
  749. package/lib/module/components/executiontasks/scanner/CScanner.js.map +0 -1
  750. package/lib/module/components/executiontasks/scanner/ScannerSchema.js +0 -24
  751. package/lib/module/components/executiontasks/scanner/ScannerSchema.js.map +0 -1
  752. package/lib/module/components/executiontasks/scanner/ScannerUtils.js +0 -158
  753. package/lib/module/components/executiontasks/scanner/ScannerUtils.js.map +0 -1
  754. package/lib/module/components/executiontasks/scanner/returns/DropDownSelector.js +0 -9
  755. package/lib/module/components/executiontasks/scanner/returns/DropDownSelector.js.map +0 -1
  756. package/lib/module/components/executiontasks/scanner/returns/DropDownUtils.js +0 -38
  757. package/lib/module/components/executiontasks/scanner/returns/DropDownUtils.js.map +0 -1
  758. package/lib/module/components/executiontasks/scanner/returns/RTReasonSelection.js +0 -86
  759. package/lib/module/components/executiontasks/scanner/returns/RTReasonSelection.js.map +0 -1
  760. package/lib/module/components/executiontasks/scanner/returns/RTScan.js +0 -287
  761. package/lib/module/components/executiontasks/scanner/returns/RTScan.js.map +0 -1
  762. package/lib/module/components/executiontasks/scanner/returns/ReasonDropDown.js +0 -80
  763. package/lib/module/components/executiontasks/scanner/returns/ReasonDropDown.js.map +0 -1
  764. package/lib/module/components/executiontasks/scanner/returns/ScanList.js +0 -253
  765. package/lib/module/components/executiontasks/scanner/returns/ScanList.js.map +0 -1
  766. package/lib/module/ui/screens/RTScanScreen.js +0 -93
  767. package/lib/module/ui/screens/RTScanScreen.js.map +0 -1
  768. package/lib/typescript/components/executiontasks/doodle/DoodleUtils.d.ts +0 -3
  769. package/lib/typescript/components/executiontasks/scanner/ScannerSchema.d.ts +0 -75
  770. package/lib/typescript/components/executiontasks/scanner/ScannerUtils.d.ts +0 -15
  771. package/lib/typescript/components/executiontasks/scanner/returns/DropDownSelector.d.ts +0 -3
  772. package/lib/typescript/components/executiontasks/scanner/returns/DropDownUtils.d.ts +0 -3
  773. package/lib/typescript/components/executiontasks/scanner/returns/RTReasonSelection.d.ts +0 -7
  774. package/lib/typescript/components/executiontasks/scanner/returns/RTScan.d.ts +0 -4
  775. package/lib/typescript/components/executiontasks/scanner/returns/ReasonDropDown.d.ts +0 -14
  776. package/lib/typescript/components/executiontasks/scanner/returns/ScanList.d.ts +0 -17
  777. package/lib/typescript/ui/screens/RTScanScreen.d.ts +0 -3
  778. package/mobile-execution-lib-0.6.4.tgz +0 -0
@@ -4,31 +4,25 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var Database = _interopRequireWildcard(require("../syncmanager/database"));
9
-
10
8
  var _DBConfig = require("../syncmanager/DBConfig");
11
-
12
9
  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); }
13
-
14
10
  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
-
16
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
17
-
11
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
12
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
13
+ function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
18
14
  class ReasonCodeRepo {
19
15
  static getInstance() {
20
16
  if (!ReasonCodeRepo.instance) {
21
17
  ReasonCodeRepo.instance = new ReasonCodeRepo();
22
18
  }
23
-
24
19
  return ReasonCodeRepo.instance;
25
20
  }
26
-
27
21
  async saveReasonCode(reasonsList) {
28
22
  if (!reasonsList || reasonsList.length < 1) return;
29
23
  await this.init();
30
24
  await this.deleteAll();
31
-
25
+ const promises = [];
32
26
  for (let r of reasonsList) {
33
27
  const reasonRow = {
34
28
  reasonCode: r.reasonCode,
@@ -36,10 +30,10 @@ class ReasonCodeRepo {
36
30
  isEnabled: r.isEnabled,
37
31
  isSystemDefined: r.isSystemDefined
38
32
  };
39
- await this.insertReason(reasonRow);
33
+ promises.push(this.insertReason(reasonRow));
40
34
  }
35
+ await Promise.all(promises);
41
36
  }
42
-
43
37
  async insertReason(reason) {
44
38
  await Database.executeQuery(`INSERT OR REPLACE INTO ${_DBConfig.REASONS_TABLE}(\
45
39
  ${_DBConfig.ReasonColums.CODE},\
@@ -48,7 +42,6 @@ class ReasonCodeRepo {
48
42
  ${_DBConfig.ReasonColums.SYSTEM_DEFINED})\
49
43
  values (?,?,?,?)`, [reason.reasonCode, reason.description, reason.isEnabled, reason.isSystemDefined]);
50
44
  }
51
-
52
45
  async init() {
53
46
  await Database.executeQuery(`CREATE TABLE IF NOT EXISTS ${_DBConfig.REASONS_TABLE} (\
54
47
  ${_DBConfig.ReasonColums.CODE} TEXT PRIMARY KEY NOT NULL,\
@@ -56,32 +49,25 @@ class ReasonCodeRepo {
56
49
  ${_DBConfig.ReasonColums.IS_ENABLED} INTEGER,\
57
50
  ${_DBConfig.ReasonColums.SYSTEM_DEFINED} INTEGER);`, []);
58
51
  }
59
-
60
52
  async getAllReasons() {
61
53
  const resultSet = await Database.executeQuery(`SELECT * FROM ${_DBConfig.REASONS_TABLE};`, []);
62
54
  return resultSet.rows._array;
63
55
  }
64
-
65
56
  async deleteAll() {
66
57
  return Database.executeQuery(`DELETE FROM ${_DBConfig.REASONS_TABLE};`, []);
67
58
  }
68
-
69
59
  async getReasonsByCode(codes) {
70
60
  if (!codes || codes.length < 1) return [];
71
61
  const placeholders = codes.map(it => `'${it}'`).join(',');
72
62
  const resultSet = await Database.executeQuery(`SELECT * FROM ${_DBConfig.REASONS_TABLE} WHERE (${_DBConfig.ReasonColums.IS_ENABLED}=1) and ${_DBConfig.ReasonColums.CODE} IN (${placeholders});`, []);
73
63
  return resultSet.rows._array;
74
64
  }
75
-
76
65
  async getReasonByCode(code) {
77
66
  if (!code) return [];
78
67
  const resultSet = await Database.executeQuery(`SELECT * FROM ${_DBConfig.REASONS_TABLE} WHERE ${_DBConfig.ReasonColums.CODE} = ?;`, [code]);
79
68
  return resultSet.rows._array;
80
69
  }
81
-
82
70
  }
83
-
84
71
  exports.default = ReasonCodeRepo;
85
-
86
72
  _defineProperty(ReasonCodeRepo, "instance", void 0);
87
73
  //# sourceMappingURL=ReasonCodeRepo.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["ReasonCodeRepo","getInstance","instance","saveReasonCode","reasonsList","length","init","deleteAll","r","reasonRow","reasonCode","description","isEnabled","isSystemDefined","insertReason","reason","Database","executeQuery","REASONS_TABLE","ReasonColums","CODE","DESCRIPTION","IS_ENABLED","SYSTEM_DEFINED","getAllReasons","resultSet","rows","_array","getReasonsByCode","codes","placeholders","map","it","join","getReasonByCode","code"],"sources":["ReasonCodeRepo.ts"],"sourcesContent":["import * as Database from '../syncmanager/database';\nimport {\n ReasonColums,\n REASONS_TABLE,\n ReasonsRow,\n} from '../syncmanager/DBConfig';\nimport type { ReasonCodes } from '../../models/ReasonCodes';\n\nexport default class ReasonCodeRepo {\n private static instance: ReasonCodeRepo;\n public static getInstance(): ReasonCodeRepo {\n if (!ReasonCodeRepo.instance) {\n ReasonCodeRepo.instance = new ReasonCodeRepo();\n }\n return ReasonCodeRepo.instance;\n }\n\n public async saveReasonCode(reasonsList: ReasonCodes[]) {\n if (!reasonsList || reasonsList.length < 1) return;\n await this.init();\n await this.deleteAll();\n for (let r of reasonsList) {\n const reasonRow: ReasonsRow = {\n reasonCode: r.reasonCode,\n description: r.description,\n isEnabled: r.isEnabled,\n isSystemDefined: r.isSystemDefined,\n };\n await this.insertReason(reasonRow);\n }\n }\n private async insertReason(reason: ReasonsRow) {\n await Database.executeQuery(\n `INSERT OR REPLACE INTO ${REASONS_TABLE}(\\\n ${ReasonColums.CODE},\\\n ${ReasonColums.DESCRIPTION},\\\n ${ReasonColums.IS_ENABLED},\\\n ${ReasonColums.SYSTEM_DEFINED})\\\n values (?,?,?,?)`,\n [\n reason.reasonCode,\n reason.description,\n reason.isEnabled,\n reason.isSystemDefined,\n ]\n );\n }\n\n private async init(): Promise<void> {\n await Database.executeQuery(\n `CREATE TABLE IF NOT EXISTS ${REASONS_TABLE} (\\\n ${ReasonColums.CODE} TEXT PRIMARY KEY NOT NULL,\\\n ${ReasonColums.DESCRIPTION} TEXT,\\\n ${ReasonColums.IS_ENABLED} INTEGER,\\\n ${ReasonColums.SYSTEM_DEFINED} INTEGER);`,\n []\n );\n }\n public async getAllReasons(): Promise<ReasonsRow[]> {\n const resultSet = await Database.executeQuery(\n `SELECT * FROM ${REASONS_TABLE};`,\n []\n );\n return resultSet.rows._array;\n }\n public async deleteAll() {\n return Database.executeQuery(`DELETE FROM ${REASONS_TABLE};`, []);\n }\n\n public async getReasonsByCode(codes: string[]): Promise<ReasonsRow[]> {\n if (!codes || codes.length < 1) return [];\n const placeholders = codes.map((it) => `'${it}'`).join(',');\n const resultSet = await Database.executeQuery(\n `SELECT * FROM ${REASONS_TABLE} WHERE (${ReasonColums.IS_ENABLED}=1) and ${ReasonColums.CODE} IN (${placeholders});`,\n []\n );\n return resultSet.rows._array;\n }\n\n public async getReasonByCode(code: string): Promise<ReasonsRow[]> {\n if (!code) return [];\n const resultSet = await Database.executeQuery(\n `SELECT * FROM ${REASONS_TABLE} WHERE ${ReasonColums.CODE} = ?;`,\n [code]\n );\n return resultSet.rows._array;\n }\n}\n"],"mappings":";;;;;;;AAAA;;AACA;;;;;;;;AAOe,MAAMA,cAAN,CAAqB;EAET,OAAXC,WAAW,GAAmB;IAC1C,IAAI,CAACD,cAAc,CAACE,QAApB,EAA8B;MAC5BF,cAAc,CAACE,QAAf,GAA0B,IAAIF,cAAJ,EAA1B;IACD;;IACD,OAAOA,cAAc,CAACE,QAAtB;EACD;;EAE0B,MAAdC,cAAc,CAACC,WAAD,EAA6B;IACtD,IAAI,CAACA,WAAD,IAAgBA,WAAW,CAACC,MAAZ,GAAqB,CAAzC,EAA4C;IAC5C,MAAM,KAAKC,IAAL,EAAN;IACA,MAAM,KAAKC,SAAL,EAAN;;IACA,KAAK,IAAIC,CAAT,IAAcJ,WAAd,EAA2B;MACzB,MAAMK,SAAqB,GAAG;QAC5BC,UAAU,EAAEF,CAAC,CAACE,UADc;QAE5BC,WAAW,EAAEH,CAAC,CAACG,WAFa;QAG5BC,SAAS,EAAEJ,CAAC,CAACI,SAHe;QAI5BC,eAAe,EAAEL,CAAC,CAACK;MAJS,CAA9B;MAMA,MAAM,KAAKC,YAAL,CAAkBL,SAAlB,CAAN;IACD;EACF;;EACyB,MAAZK,YAAY,CAACC,MAAD,EAAqB;IAC7C,MAAMC,QAAQ,CAACC,YAAT,CACH,0BAAyBC,uBAAc;AAC9C,kBAAkBC,sBAAA,CAAaC,IAAK;AACpC,kBAAkBD,sBAAA,CAAaE,WAAY;AAC3C,kBAAkBF,sBAAA,CAAaG,UAAW;AAC1C,kBAAkBH,sBAAA,CAAaI,cAAe;AAC9C,iCANU,E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,MAAMV,SAAS,GAAG,MAAMT,QAAQ,CAACC,YAAT,CACrB,iBAAgBC,uBAAc,UAASC,sBAAA,CAAaC,IAAK,OADpC,EAEtB,CAACe,IAAD,CAFsB,CAAxB;IAIA,OAAOV,SAAS,CAACC,IAAV,CAAeC,MAAtB;EACD;;AA9EiC;;;;gBAAf3B,c"}
1
+ {"version":3,"names":["Database","_interopRequireWildcard","require","_DBConfig","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_defineProperty","value","_toPropertyKey","enumerable","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","TypeError","Number","ReasonCodeRepo","getInstance","instance","saveReasonCode","reasonsList","length","init","deleteAll","promises","r","reasonRow","reasonCode","description","isEnabled","isSystemDefined","push","insertReason","Promise","all","reason","executeQuery","REASONS_TABLE","ReasonColums","CODE","DESCRIPTION","IS_ENABLED","SYSTEM_DEFINED","getAllReasons","resultSet","rows","_array","getReasonsByCode","codes","placeholders","map","it","join","getReasonByCode","code","exports"],"sources":["ReasonCodeRepo.ts"],"sourcesContent":["import * as Database from '../syncmanager/database';\nimport {\n ReasonColums,\n REASONS_TABLE,\n ReasonsRow,\n} from '../syncmanager/DBConfig';\nimport type { ReasonCodes } from '../../models/ReasonCodes';\n\nexport default class ReasonCodeRepo {\n private static instance: ReasonCodeRepo;\n public static getInstance(): ReasonCodeRepo {\n if (!ReasonCodeRepo.instance) {\n ReasonCodeRepo.instance = new ReasonCodeRepo();\n }\n return ReasonCodeRepo.instance;\n }\n\n public async saveReasonCode(reasonsList: ReasonCodes[]) {\n if (!reasonsList || reasonsList.length < 1) return;\n await this.init();\n await this.deleteAll();\n const promises: any[] = [];\n for (let r of reasonsList) {\n const reasonRow: ReasonsRow = {\n reasonCode: r.reasonCode,\n description: r.description,\n isEnabled: r.isEnabled,\n isSystemDefined: r.isSystemDefined,\n };\n promises.push(this.insertReason(reasonRow));\n }\n await Promise.all(promises);\n }\n private async insertReason(reason: ReasonsRow) {\n await Database.executeQuery(\n `INSERT OR REPLACE INTO ${REASONS_TABLE}(\\\n ${ReasonColums.CODE},\\\n ${ReasonColums.DESCRIPTION},\\\n ${ReasonColums.IS_ENABLED},\\\n ${ReasonColums.SYSTEM_DEFINED})\\\n values (?,?,?,?)`,\n [\n reason.reasonCode,\n reason.description,\n reason.isEnabled,\n reason.isSystemDefined,\n ]\n );\n }\n\n private async init(): Promise<void> {\n await Database.executeQuery(\n `CREATE TABLE IF NOT EXISTS ${REASONS_TABLE} (\\\n ${ReasonColums.CODE} TEXT PRIMARY KEY NOT NULL,\\\n ${ReasonColums.DESCRIPTION} TEXT,\\\n ${ReasonColums.IS_ENABLED} INTEGER,\\\n ${ReasonColums.SYSTEM_DEFINED} INTEGER);`,\n []\n );\n }\n public async getAllReasons(): Promise<ReasonsRow[]> {\n const resultSet = await Database.executeQuery(\n `SELECT * FROM ${REASONS_TABLE};`,\n []\n );\n return resultSet.rows._array;\n }\n public async deleteAll() {\n return Database.executeQuery(`DELETE FROM ${REASONS_TABLE};`, []);\n }\n\n public async getReasonsByCode(codes: string[]): Promise<ReasonsRow[]> {\n if (!codes || codes.length < 1) return [];\n const placeholders = codes.map((it) => `'${it}'`).join(',');\n const resultSet = await Database.executeQuery(\n `SELECT * FROM ${REASONS_TABLE} WHERE (${ReasonColums.IS_ENABLED}=1) and ${ReasonColums.CODE} IN (${placeholders});`,\n []\n );\n return resultSet.rows._array;\n }\n\n public async getReasonByCode(code: string): Promise<ReasonsRow[]> {\n if (!code) return [];\n const resultSet = await Database.executeQuery(\n `SELECT * FROM ${REASONS_TABLE} WHERE ${ReasonColums.CODE} = ?;`,\n [code]\n );\n return resultSet.rows._array;\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC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C3B,MAAM,GAAG,CAAC,EAAE,OAAO,EAAE;IACzC,MAAM4B,YAAY,GAAGD,KAAK,CAACE,GAAG,CAAEC,EAAE,IAAM,IAAGA,EAAG,GAAE,CAAC,CAACC,IAAI,CAAC,GAAG,CAAC;IAC3D,MAAMR,SAAS,GAAG,MAAMxE,QAAQ,CAACgE,YAAY,CAC1C,iBAAgBC,uBAAc,WAAUC,sBAAY,CAACG,UAAW,YAAWH,sBAAY,CAACC,IAAK,QAAOU,YAAa,IAAG,EACrH,EACF,CAAC;IACD,OAAOL,SAAS,CAACC,IAAI,CAACC,MAAM;EAC9B;EAEA,MAAaO,eAAeA,CAACC,IAAY,EAAyB;IAChE,IAAI,CAACA,IAAI,EAAE,OAAO,EAAE;IACpB,MAAMV,SAAS,GAAG,MAAMxE,QAAQ,CAACgE,YAAY,CAC1C,iBAAgBC,uBAAc,UAASC,sBAAY,CAACC,IAAK,OAAM,EAChE,CAACe,IAAI,CACP,CAAC;IACD,OAAOV,SAAS,CAACC,IAAI,CAACC,MAAM;EAC9B;AACF;AAACS,OAAA,CAAAxE,OAAA,GAAAiC,cAAA;AAAAlB,eAAA,CAjFoBkB,cAAc"}
@@ -0,0 +1,23 @@
1
+ // TODO: Move to execution-engine for Job Removal Manager
2
+
3
+ // const dispatchExecutor = new ExecutionEngine();
4
+
5
+ // export default class JobRemovalManager {
6
+ // private static instance: JobRemovalManager;
7
+
8
+ // private constructor() {}
9
+
10
+ // public static getInstance(): JobRemovalManager {
11
+ // if (!JobRemovalManager.instance) {
12
+ // let managerInstance = new JobRemovalManager();
13
+ // JobRemovalManager.instance = managerInstance;
14
+ // }
15
+ // return JobRemovalManager.instance;
16
+ // }
17
+
18
+ // public async handleRemoval(dispatchId: string, jobs: string[]) {
19
+ // return await dispatchExecutor.validateJobRemoval(dispatchId, jobs);
20
+ // }
21
+ // }
22
+ "use strict";
23
+ //# sourceMappingURL=JobRemovalManager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["JobRemovalManager.ts"],"sourcesContent":["// TODO: Move to execution-engine for Job Removal Manager\n\n// const dispatchExecutor = new ExecutionEngine();\n\n// export default class JobRemovalManager {\n// private static instance: JobRemovalManager;\n\n// private constructor() {}\n\n// public static getInstance(): JobRemovalManager {\n// if (!JobRemovalManager.instance) {\n// let managerInstance = new JobRemovalManager();\n// JobRemovalManager.instance = managerInstance;\n// }\n// return JobRemovalManager.instance;\n// }\n\n// public async handleRemoval(dispatchId: string, jobs: string[]) {\n// return await dispatchExecutor.validateJobRemoval(dispatchId, jobs);\n// }\n// }\n"],"mappings":"AAAA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AAAA"}
@@ -4,27 +4,20 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var Location = _interopRequireWildcard(require("expo-location"));
9
-
10
8
  var _Logger = _interopRequireWildcard(require("../../utils/Logger"));
11
-
12
9
  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); }
13
-
14
10
  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
-
16
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
17
-
11
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
12
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
13
+ function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
18
14
  class LocationManager {
19
15
  constructor() {
20
16
  _defineProperty(this, "lastLocation", null);
21
-
22
17
  _defineProperty(this, "stopUpdate", void 0);
23
18
  }
24
-
25
19
  async checkForLocationPermissions() {
26
20
  let permissionResponse = await Location.getForegroundPermissionsAsync();
27
-
28
21
  if (permissionResponse.status === 'granted') {
29
22
  this.startUpdates();
30
23
  return true;
@@ -32,7 +25,6 @@ class LocationManager {
32
25
  let {
33
26
  status
34
27
  } = await Location.requestForegroundPermissionsAsync();
35
-
36
28
  if (status === 'granted') {
37
29
  this.startUpdates();
38
30
  return true;
@@ -42,22 +34,18 @@ class LocationManager {
42
34
  }
43
35
  }
44
36
  }
45
-
46
37
  static getInstance() {
47
38
  if (!LocationManager.instance) {
48
39
  LocationManager.instance = new LocationManager();
49
40
  }
50
-
51
41
  return LocationManager.instance;
52
42
  }
53
-
54
43
  startUpdates() {
55
44
  Location.watchPositionAsync({
56
45
  accuracy: Location.Accuracy.Highest,
57
46
  timeInterval: 10000,
58
47
  // in millis
59
48
  distanceInterval: 10 //in metres
60
-
61
49
  }, location => {
62
50
  if (location != null) {
63
51
  this.lastLocation = location;
@@ -68,7 +56,6 @@ class LocationManager {
68
56
  _Logger.default.getInstance().logEvent('LOCATION_MANAGER', error.message, _Logger.LOG_TYPE.SDK_WARNING);
69
57
  });
70
58
  }
71
-
72
59
  getLastLocation() {
73
60
  if (this.lastLocation != null && this.lastLocation.coords != null) {
74
61
  return {
@@ -82,16 +69,12 @@ class LocationManager {
82
69
  };
83
70
  }
84
71
  }
85
-
86
72
  stopLocationUpdates() {
87
73
  try {
88
74
  if (this.stopUpdate) this.stopUpdate.remove();
89
75
  } catch (error) {}
90
76
  }
91
-
92
77
  }
93
-
94
78
  exports.default = LocationManager;
95
-
96
79
  _defineProperty(LocationManager, "instance", void 0);
97
80
  //# sourceMappingURL=LocationManager.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["LocationManager","checkForLocationPermissions","permissionResponse","Location","getForegroundPermissionsAsync","status","startUpdates","requestForegroundPermissionsAsync","stopLocationUpdates","getInstance","instance","watchPositionAsync","accuracy","Accuracy","Highest","timeInterval","distanceInterval","location","lastLocation","then","r","stopUpdate","catch","error","Logger","logEvent","message","LOG_TYPE","SDK_WARNING","getLastLocation","coords","latitude","toString","longitude","remove"],"sources":["LocationManager.ts"],"sourcesContent":["import * as Location from 'expo-location';\nimport { Accuracy, LocationObject } from 'expo-location';\nimport Logger, { LOG_TYPE } from '../../utils/Logger';\n\nexport default class LocationManager {\n private static instance: LocationManager;\n private lastLocation: LocationObject | null = null;\n private stopUpdate: { remove(): void } | undefined;\n\n public async checkForLocationPermissions(): Promise<boolean> {\n let permissionResponse = await Location.getForegroundPermissionsAsync();\n if (permissionResponse.status === 'granted') {\n this.startUpdates();\n return true;\n } else {\n let { status } = await Location.requestForegroundPermissionsAsync();\n if (status === 'granted') {\n this.startUpdates();\n return true;\n } else {\n this.stopLocationUpdates();\n return false;\n }\n }\n }\n\n public static getInstance(): LocationManager {\n if (!LocationManager.instance) {\n LocationManager.instance = new LocationManager();\n }\n return LocationManager.instance;\n }\n public startUpdates() {\n Location.watchPositionAsync(\n {\n accuracy: Accuracy.Highest,\n timeInterval: 10000, // in millis\n distanceInterval: 10, //in metres\n },\n (location) => {\n if (location != null) {\n this.lastLocation = location;\n }\n }\n )\n .then((r) => {\n this.stopUpdate = r;\n })\n .catch((error) => {\n Logger.getInstance().logEvent(\n 'LOCATION_MANAGER',\n error.message,\n LOG_TYPE.SDK_WARNING\n );\n });\n }\n public getLastLocation(): DLocation {\n if (this.lastLocation != null && this.lastLocation.coords != null) {\n return {\n latitude: this.lastLocation.coords.latitude.toString(),\n longitude: this.lastLocation.coords.longitude.toString(),\n };\n } else {\n return { latitude: 'null', longitude: 'null' };\n }\n }\n public stopLocationUpdates() {\n try {\n if (this.stopUpdate) this.stopUpdate.remove();\n } catch (error: any) {}\n }\n}\n\nexport interface DLocation {\n latitude: string;\n longitude: string;\n}\n"],"mappings":";;;;;;;AAAA;;AAEA;;;;;;;;AAEe,MAAMA,eAAN,CAAsB;EAAA;IAAA,sCAEW,IAFX;;IAAA;EAAA;;EAKK,MAA3BC,2BAA2B,GAAqB;IAC3D,IAAIC,kBAAkB,GAAG,MAAMC,QAAQ,CAACC,6BAAT,EAA/B;;IACA,IAAIF,kBAAkB,CAACG,MAAnB,KAA8B,SAAlC,EAA6C;MAC3C,KAAKC,YAAL;MACA,OAAO,IAAP;IACD,CAHD,MAGO;MACL,IAAI;QAAED;MAAF,IAAa,MAAMF,QAAQ,CAACI,iCAAT,EAAvB;;MACA,IAAIF,MAAM,KAAK,SAAf,EAA0B;QACxB,KAAKC,YAAL;QACA,OAAO,IAAP;MACD,CAHD,MAGO;QACL,KAAKE,mBAAL;QACA,OAAO,KAAP;MACD;IACF;EACF;;EAEwB,OAAXC,WAAW,GAAoB;IAC3C,IAAI,CAACT,eAAe,CAACU,QAArB,EAA+B;MAC7BV,eAAe,CAACU,QAAhB,GAA2B,IAAIV,eAAJ,EAA3B;IACD;;IACD,OAAOA,eAAe,CAACU,QAAvB;EACD;;EACMJ,YAAY,GAAG;IACpBH,QAAQ,CAACQ,kBAAT,CACE;MACEC,QAAQ,EAAEC,iBAAA,CAASC,OADrB;MAEEC,YAAY,EAAE,KAFhB;MAEuB;MACrBC,gBAAgB,EAAE,EAHpB,CAGwB;;IAHxB,CADF,EAMGC,QAAD,IAAc;MACZ,IAAIA,QAAQ,IAAI,IAAhB,EAAsB;QACpB,KAAKC,YAAL,GAAoBD,QAApB;MACD;IACF,CAVH,EAYGE,IAZH,CAYSC,CAAD,IAAO;MACX,KAAKC,UAAL,GAAkBD,CAAlB;IACD,CAdH,EAeGE,KAfH,CAeUC,KAAD,IAAW;MAChBC,eAAA,CAAOf,WAAP,GAAqBgB,QAArB,CACE,kBADF,EAEEF,KAAK,CAACG,OAFR,EAGEC,gBAAA,CAASC,WAHX;IAKD,CArBH;EAsBD;;EACMC,eAAe,GAAc;IAClC,IAAI,KAAKX,YAAL,IAAqB,IAArB,IAA6B,KAAKA,YAAL,CAAkBY,MAAlB,IAA4B,IAA7D,EAAmE;MACjE,OAAO;QACLC,QAAQ,EAAE,KAAKb,YAAL,CAAkBY,MAAlB,CAAyBC,QAAzB,CAAkCC,QAAlC,EADL;QAELC,SAAS,EAAE,KAAKf,YAAL,CAAkBY,MAAlB,CAAyBG,SAAzB,CAAmCD,QAAnC;MAFN,CAAP;IAID,CALD,MAKO;MACL,OAAO;QAAED,QAAQ,EAAE,MAAZ;QAAoBE,SAAS,EAAE;MAA/B,CAAP;IACD;EACF;;EACMzB,mBAAmB,GAAG;IAC3B,IAAI;MACF,IAAI,KAAKa,UAAT,EAAqB,KAAKA,UAAL,CAAgBa,MAAhB;IACtB,CAFD,CAEE,OAAOX,KAAP,EAAmB,CAAE;EACxB;;AAlEkC;;;;gBAAhBvB,e"}
1
+ {"version":3,"names":["Location","_interopRequireWildcard","require","_Logger","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_defineProperty","value","_toPropertyKey","enumerable","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","TypeError","Number","LocationManager","constructor","checkForLocationPermissions","permissionResponse","getForegroundPermissionsAsync","status","startUpdates","requestForegroundPermissionsAsync","stopLocationUpdates","getInstance","instance","watchPositionAsync","accuracy","Accuracy","Highest","timeInterval","distanceInterval","location","lastLocation","then","r","stopUpdate","catch","error","Logger","logEvent","message","LOG_TYPE","SDK_WARNING","getLastLocation","coords","latitude","toString","longitude","remove","exports"],"sources":["LocationManager.ts"],"sourcesContent":["import * as Location from 'expo-location';\nimport { Accuracy, LocationObject } from 'expo-location';\nimport Logger, { LOG_TYPE } from '../../utils/Logger';\n\nexport default class LocationManager {\n private static instance: LocationManager;\n private lastLocation: LocationObject | null = null;\n private stopUpdate: { remove(): void } | undefined;\n\n public async checkForLocationPermissions(): Promise<boolean> {\n let permissionResponse = await Location.getForegroundPermissionsAsync();\n if (permissionResponse.status === 'granted') {\n this.startUpdates();\n return true;\n } else {\n let { status } = await Location.requestForegroundPermissionsAsync();\n if (status === 'granted') {\n this.startUpdates();\n return true;\n } else {\n this.stopLocationUpdates();\n return false;\n }\n }\n }\n\n public static getInstance(): LocationManager {\n if (!LocationManager.instance) {\n LocationManager.instance = new LocationManager();\n }\n return LocationManager.instance;\n }\n public startUpdates() {\n Location.watchPositionAsync(\n {\n accuracy: Accuracy.Highest,\n timeInterval: 10000, // in millis\n distanceInterval: 10, //in metres\n },\n (location) => {\n if (location != null) {\n this.lastLocation = location;\n }\n }\n )\n .then((r) => {\n this.stopUpdate = r;\n })\n .catch((error) => {\n Logger.getInstance().logEvent(\n 'LOCATION_MANAGER',\n error.message,\n LOG_TYPE.SDK_WARNING\n );\n });\n }\n public getLastLocation(): DLocation {\n if (this.lastLocation != null && this.lastLocation.coords != null) {\n return {\n latitude: this.lastLocation.coords.latitude.toString(),\n longitude: this.lastLocation.coords.longitude.toString(),\n };\n } else {\n return { latitude: 'null', longitude: 'null' };\n }\n }\n public stopLoc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;IACH,CAAC,MAAM;MACL,OAAO;QAAED,QAAQ,EAAE,MAAM;QAAEE,SAAS,EAAE;MAAO,CAAC;IAChD;EACF;EACOzB,mBAAmBA,CAAA,EAAG;IAC3B,IAAI;MACF,IAAI,IAAI,CAACa,UAAU,EAAE,IAAI,CAACA,UAAU,CAACa,MAAM,CAAC,CAAC;IAC/C,CAAC,CAAC,OAAOX,KAAU,EAAE,CAAC;EACxB;AACF;AAACY,OAAA,CAAApE,OAAA,GAAAiC,eAAA;AAAAlB,eAAA,CAnEoBkB,eAAe"}
@@ -4,68 +4,52 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.DispatchSDKManager = void 0;
7
-
8
7
  var _DispatchSdkCache = _interopRequireDefault(require("./DispatchSdkCache"));
9
-
10
8
  var _LocationManager = _interopRequireDefault(require("../location/LocationManager"));
11
-
12
9
  var _AppSyncManager = _interopRequireDefault(require("../syncmanager/AppSyncManager"));
13
-
14
10
  var _Logger = _interopRequireDefault(require("../../utils/Logger"));
15
-
16
11
  var _ReasonCodeContainer = _interopRequireDefault(require("../dispatchCodes/ReasonCodeContainer"));
17
-
18
12
  var _GraphQLClient = _interopRequireDefault(require("../../network/GraphQLClient"));
19
-
20
13
  var _utils = require("../../utils/utils");
21
-
22
14
  var _BaseError = require("../../errors/BaseError");
23
-
24
15
  var _ErrorCodes = _interopRequireDefault(require("../../errors/ErrorCodes"));
25
-
26
16
  var _SdkUtils = _interopRequireDefault(require("../../utils/SdkUtils"));
27
-
28
17
  var Sentry = _interopRequireWildcard(require("@sentry/react-native"));
29
-
18
+ var _EventCodeRepo = _interopRequireDefault(require("../dispatchCodes/EventCodeRepo"));
19
+ var _storage = _interopRequireDefault(require("../../utils/storage"));
20
+ var _SyncManagerUtils = require("../../utils/SyncManagerUtils");
21
+ var _callbacksHandler = _interopRequireDefault(require("./callbacksHandler"));
22
+ var _platformCoreosExecutionEngineSdk = require("@os1-platform/platform-coreos-execution-engine-sdk");
30
23
  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); }
31
-
32
24
  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; }
33
-
34
25
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
35
-
36
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
37
-
26
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
27
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
28
+ function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
38
29
  class DispatchSDKManager {
39
30
  constructor() {
40
31
  _defineProperty(this, "cache", _DispatchSdkCache.default.getInstance());
41
-
42
32
  _defineProperty(this, "keys", _DispatchSdkCache.default.KEYS);
43
33
  }
44
-
45
34
  static getInstance() {
46
35
  if (!DispatchSDKManager.instance) {
47
36
  DispatchSDKManager.instance = new DispatchSDKManager();
48
37
  }
49
-
50
38
  return DispatchSDKManager.instance;
51
39
  }
40
+
52
41
  /**
53
42
  * Call this init method with username,userID & authentication tokens
54
43
  * @param sdkConfig
55
44
  */
56
-
57
-
58
45
  async initDispatchSDK(sdkConfig) {
59
- var _sdkConfig$sentry;
60
-
46
+ var _sdkConfig$sentry, _sdkConfig$callbacks;
61
47
  if (!(0, _utils.isMandatoryKeysPresent)(sdkConfig, ['tenantID', 'userID', 'userName', 'tenantBaseURL', 'accessToken'])) {
62
48
  throw new _BaseError.BaseError(_ErrorCodes.default.InvalidArgumentError, 'Invalid/Missing Argument Passed in SdkConfig');
63
49
  }
64
-
65
50
  if ((0, _utils.isTokenExpired)(sdkConfig.accessToken)) {
66
51
  throw new _BaseError.BaseError(_ErrorCodes.default.ACCESS_TOKEN_EXPIRED, 'JWT Token Expired!');
67
52
  }
68
-
69
53
  if (sdkConfig.sentry && (_sdkConfig$sentry = sdkConfig.sentry) !== null && _sdkConfig$sentry !== void 0 && _sdkConfig$sentry.enabled) {
70
54
  Sentry.init({
71
55
  enableNative: true,
@@ -74,30 +58,32 @@ class DispatchSDKManager {
74
58
  tracesSampleRate: 1.0
75
59
  });
76
60
  }
77
-
78
61
  await _SdkUtils.default.checkMandatory();
79
62
  await this.cache.setObjectInCache(this.keys.SDK_CONFIG, sdkConfig);
80
-
81
63
  _GraphQLClient.default.init(sdkConfig.tenantBaseURL);
82
-
83
64
  _AppSyncManager.default.initAppSync(sdkConfig.tenantBaseURL, sdkConfig.syncRetryCount ?? 3);
84
-
85
65
  _LocationManager.default.getInstance().startUpdates();
86
-
66
+ if (sdkConfig.eventMapping) {
67
+ _EventCodeRepo.default.getInstance().saveEventCode(sdkConfig.eventMapping);
68
+ }
87
69
  await _ReasonCodeContainer.default.getInstance().fetchReasonCode();
88
-
89
70
  _Logger.default.getInstance().setLogging(sdkConfig.enableLogging ?? true, sdkConfig);
90
-
71
+ let storage = _storage.default.getInstance();
72
+ if ((_sdkConfig$callbacks = sdkConfig.callbacks) !== null && _sdkConfig$callbacks !== void 0 && _sdkConfig$callbacks.fetchPhoneNumbersCallback) {
73
+ await _callbacksHandler.default.init(sdkConfig.callbacks.fetchPhoneNumbersCallback);
74
+ }
75
+ await _platformCoreosExecutionEngineSdk.DispatchExecutor.init({
76
+ storeMultipleKeysCallback: storage.setSharedItems,
77
+ readMultipleKeysCallback: storage.getSharedItems,
78
+ deleteMultipleKeysCallback: storage.removeSharedItems,
79
+ eventBulkSyncCallback: _SyncManagerUtils.pushBulkEventForSync
80
+ }, sdkConfig.debugLevelLog ? 'debug' : 'emerg');
91
81
  _AppSyncManager.default.getInstance().startSDKSyncManager();
92
82
  }
93
-
94
83
  removeLocationUpdates() {
95
84
  _LocationManager.default.getInstance().stopLocationUpdates();
96
85
  }
97
-
98
86
  }
99
-
100
87
  exports.DispatchSDKManager = DispatchSDKManager;
101
-
102
88
  _defineProperty(DispatchSDKManager, "instance", void 0);
103
89
  //# sourceMappingURL=DispatchSDKManager.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["DispatchSDKManager","constructor","DispatchSdkCache","getInstance","KEYS","instance","initDispatchSDK","sdkConfig","isMandatoryKeysPresent","BaseError","ErrorCodes","InvalidArgumentError","isTokenExpired","accessToken","ACCESS_TOKEN_EXPIRED","sentry","enabled","Sentry","init","enableNative","environment","env","dsn","tracesSampleRate","SdkUtils","checkMandatory","cache","setObjectInCache","keys","SDK_CONFIG","GraphQLClient","tenantBaseURL","AppSyncManager","initAppSync","syncRetryCount","LocationManager","startUpdates","ReasonCodeContainer","fetchReasonCode","Logger","setLogging","enableLogging","startSDKSyncManager","removeLocationUpdates","stopLocationUpdates"],"sources":["DispatchSDKManager.ts"],"sourcesContent":["import DispatchSdkCache from './DispatchSdkCache';\nimport LocationManager from '../location/LocationManager';\nimport AppSyncManager from '../syncmanager/AppSyncManager';\nimport Logger from '../../utils/Logger';\nimport ReasonCodeContainer from '../dispatchCodes/ReasonCodeContainer';\nimport GraphQLClient from '../../network/GraphQLClient';\nimport { isMandatoryKeysPresent, isTokenExpired } from '../../utils/utils';\nimport { BaseError } from '../../errors/BaseError';\nimport ErrorCodes from '../../errors/ErrorCodes';\nimport SdkUtils from '../../utils/SdkUtils';\nimport * as Sentry from '@sentry/react-native';\nimport type { DispatchSDKConfig } from '../../models/sdk';\n\nexport class DispatchSDKManager {\n private static instance: DispatchSDKManager;\n private cache: DispatchSdkCache = DispatchSdkCache.getInstance();\n private keys = DispatchSdkCache.KEYS;\n\n private constructor() {}\n\n public static getInstance(): DispatchSDKManager {\n if (!DispatchSDKManager.instance) {\n DispatchSDKManager.instance = new DispatchSDKManager();\n }\n return DispatchSDKManager.instance;\n }\n\n /**\n * Call this init method with username,userID & authentication tokens\n * @param sdkConfig\n */\n public async initDispatchSDK(sdkConfig: DispatchSDKConfig) {\n if (\n !isMandatoryKeysPresent(sdkConfig, [\n 'tenantID',\n 'userID',\n 'userName',\n 'tenantBaseURL',\n 'accessToken',\n ])\n ) {\n throw new BaseError(\n ErrorCodes.InvalidArgumentError,\n 'Invalid/Missing Argument Passed in SdkConfig'\n );\n }\n if (isTokenExpired(sdkConfig.accessToken)) {\n throw new BaseError(\n ErrorCodes.ACCESS_TOKEN_EXPIRED,\n 'JWT Token Expired!'\n );\n }\n if (sdkConfig.sentry && sdkConfig.sentry?.enabled) {\n Sentry.init({\n enableNative: true,\n environment: sdkConfig.sentry.env,\n dsn: sdkConfig.sentry.dsn,\n tracesSampleRate: 1.0,\n });\n }\n await SdkUtils.checkMandatory();\n await this.cache.setObjectInCache(this.keys.SDK_CONFIG, sdkConfig);\n GraphQLClient.init(sdkConfig.tenantBaseURL);\n AppSyncManager.initAppSync(\n sdkConfig.tenantBaseURL,\n sdkConfig.syncRetryCount ?? 3\n );\n LocationManager.getInstance().startUpdates();\n await ReasonCodeContainer.getInstance().fetchReasonCode();\n Logger.getInstance().setLogging(sdkConfig.enableLogging ?? true, sdkConfig);\n AppSyncManager.getInstance().startSDKSyncManager();\n }\n\n public removeLocationUpdates() {\n LocationManager.getInstance().stopLocationUpdates();\n }\n}\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAGO,MAAMA,kBAAN,CAAyB;EAKtBC,WAAW,GAAG;IAAA,+BAHYC,yBAAA,CAAiBC,WAAjB,EAGZ;;IAAA,8BAFPD,yBAAA,CAAiBE,IAEV;EAAE;;EAEC,OAAXD,WAAW,GAAuB;IAC9C,IAAI,CAACH,kBAAkB,CAACK,QAAxB,EAAkC;MAChCL,kBAAkB,CAACK,QAAnB,GAA8B,IAAIL,kBAAJ,EAA9B;IACD;;IACD,OAAOA,kBAAkB,CAACK,QAA1B;EACD;EAED;AACF;AACA;AACA;;;EAC8B,MAAfC,eAAe,CAACC,SAAD,EAA+B;IAAA;;IACzD,IACE,CAAC,IAAAC,6BAAA,EAAuBD,SAAvB,EAAkC,CACjC,UADiC,EAEjC,QAFiC,EAGjC,UAHiC,EAIjC,eAJiC,EAKjC,aALiC,CAAlC,CADH,EAQE;MACA,MAAM,IAAIE,oBAAJ,CACJC,mBAAA,CAAWC,oBADP,EAEJ,8CAFI,CAAN;IAID;;IACD,IAAI,IAAAC,qBAAA,EAAeL,SAAS,CAACM,WAAzB,CAAJ,EAA2C;MACzC,MAAM,IAAIJ,oBAAJ,CACJC,mBAAA,CAAWI,oBADP,EAEJ,oBAFI,CAAN;IAID;;IACD,IAAIP,SAAS,CAACQ,MAAV,yBAAoBR,SAAS,CAACQ,MAA9B,8CAAoB,kBAAkBC,OAA1C,EAAmD;MACjDC,MAAM,CAACC,IAAP,CAAY;QACVC,YAAY,EAAE,IADJ;QAEVC,WAAW,EAAEb,SAAS,CAACQ,MAAV,CAAiBM,GAFpB;QAGVC,GAAG,EAAEf,SAAS,CAACQ,MAAV,CAAiBO,GAHZ;QAIVC,gBAAgB,EAAE;MAJR,CAAZ;IAMD;;IACD,MAAMC,iBAAA,CAASC,cAAT,EAAN;IACA,MAAM,KAAKC,KAAL,CAAWC,gBAAX,CAA4B,KAAKC,IAAL,CAAUC,UAAtC,EAAkDtB,SAAlD,CAAN;;IACAuB,sBAAA,CAAcZ,IAAd,CAAmBX,SAAS,CAACwB,aAA7B;;IACAC,uBAAA,CAAeC,WAAf,CACE1B,SAAS,CAACwB,aADZ,EAEExB,SAAS,CAAC2B,cAAV,IAA4B,CAF9B;;IAIAC,wBAAA,CAAgBhC,WAAhB,GAA8BiC,YAA9B;;IACA,MAAMC,4BAAA,CAAoBlC,WAApB,GAAkCmC,eAAlC,EAAN;;IACAC,eAAA,CAAOpC,WAAP,GAAqBqC,UAArB,CAAgCjC,SAAS,CAACkC,aAAV,IAA2B,IAA3D,EAAiElC,SAAjE;;IACAyB,uBAAA,CAAe7B,WAAf,GAA6BuC,mBAA7B;EACD;;EAEMC,qBAAqB,GAAG;IAC7BR,wBAAA,CAAgBhC,WAAhB,GAA8ByC,mBAA9B;EACD;;AA9D6B;;;;gBAAnB5C,kB"}
1
+ {"version":3,"names":["_DispatchSdkCache","_interopRequireDefault","require","_LocationManager","_AppSyncManager","_Logger","_ReasonCodeContainer","_GraphQLClient","_utils","_BaseError","_ErrorCodes","_SdkUtils","Sentry","_interopRequireWildcard","_EventCodeRepo","_storage","_SyncManagerUtils","_callbacksHandler","_platformCoreosExecutionEngineSdk","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_defineProperty","value","_toPropertyKey","enumerable","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","TypeError","Number","DispatchSDKManager","constructor","DispatchSdkCache","getInstance","KEYS","instance","initDispatchSDK","sdkConfig","_sdkConfig$sentry","_sdkConfig$callbacks","isMandatoryKeysPresent","BaseError","ErrorCodes","InvalidArgumentError","isTokenExpired","accessToken","ACCESS_TOKEN_EXPIRED","sentry","enabled","init","enableNative","environment","env","dsn","tracesSampleRate","SdkUtils","checkMandatory","setObjectInCache","keys","SDK_CONFIG","GraphQLClient","tenantBaseURL","AppSyncManager","initAppSync","syncRetryCount","LocationManager","startUpdates","eventMapping","EventCodeRepo","saveEventCode","ReasonCodeContainer","fetchReasonCode","Logger","setLogging","enableLogging","storage","Storage","callbacks","fetchPhoneNumbersCallback","callbackHandler","dispatchExecutor","storeMultipleKeysCallback","setSharedItems","readMultipleKeysCallback","getSharedItems","deleteMultipleKeysCallback","removeSharedItems","eventBulkSyncCallback","pushBulkEventForSync","debugLevelLog","startSDKSyncManager","removeLocationUpdates","stopLocationUpdates","exports"],"sources":["DispatchSDKManager.ts"],"sourcesContent":["import DispatchSdkCache from './DispatchSdkCache';\nimport LocationManager from '../location/LocationManager';\nimport AppSyncManager from '../syncmanager/AppSyncManager';\nimport Logger from '../../utils/Logger';\nimport ReasonCodeContainer from '../dispatchCodes/ReasonCodeContainer';\nimport GraphQLClient from '../../network/GraphQLClient';\nimport { isMandatoryKeysPresent, isTokenExpired } from '../../utils/utils';\nimport { BaseError } from '../../errors/BaseError';\nimport ErrorCodes from '../../errors/ErrorCodes';\nimport SdkUtils from '../../utils/SdkUtils';\nimport * as Sentry from '@sentry/react-native';\nimport type { DispatchSDKConfig } from '../../models/sdk';\nimport EventCodeRepo from '../dispatchCodes/EventCodeRepo';\nimport Storage from '../../utils/storage';\nimport { pushBulkEventForSync } from '../../utils/SyncManagerUtils';\nimport callbackHandler from './callbacksHandler';\nimport { DispatchExecutor as dispatchExecutor } from '@os1-platform/platform-coreos-execution-engine-sdk';\n\nexport class DispatchSDKManager {\n private static instance: DispatchSDKManager;\n private cache: DispatchSdkCache = DispatchSdkCache.getInstance();\n private keys = DispatchSdkCache.KEYS;\n\n private constructor() {}\n\n public static getInstance(): DispatchSDKManager {\n if (!DispatchSDKManager.instance) {\n DispatchSDKManager.instance = new DispatchSDKManager();\n }\n return DispatchSDKManager.instance;\n }\n\n /**\n * Call this init method with username,userID & authentication tokens\n * @param sdkConfig\n */\n public async initDispatchSDK(sdkConfig: DispatchSDKConfig) {\n if (\n !isMandatoryKeysPresent(sdkConfig, [\n 'tenantID',\n 'userID',\n 'userName',\n 'tenantBaseURL',\n 'accessToken',\n ])\n ) {\n throw new BaseError(\n ErrorCodes.InvalidArgumentError,\n 'Invalid/Missing Argument Passed in SdkConfig'\n );\n }\n if (isTokenExpired(sdkConfig.accessToken)) {\n throw new BaseError(\n ErrorCodes.ACCESS_TOKEN_EXPIRED,\n 'JWT Token Expired!'\n );\n }\n if (sdkConfig.sentry && sdkConfig.sentry?.enabled) {\n Sentry.init({\n enableNative: true,\n environment: sdkConfig.sentry.env,\n dsn: sdkConfig.sentry.dsn,\n tracesSampleRate: 1.0,\n });\n }\n await SdkUtils.checkMandatory();\n await this.cache.setObjectInCache(this.keys.SDK_CONFIG, sdkConfig);\n GraphQLClient.init(sdkConfig.tenantBaseURL);\n AppSyncManager.initAppSync(\n sdkConfig.tenantBaseURL,\n sdkConfig.syncRetryCount ?? 3\n );\n LocationManager.getInstance().startUpdates();\n if (sdkConfig.eventMapping) {\n EventCodeRepo.getInstance().saveEventCode(sdkConfig.eventMapping);\n }\n await ReasonCodeContainer.getInstance().fetchReasonCode();\n Logger.getInstance().setLogging(sdkConfig.enableLogging ?? true, sdkConfig);\n let storage = Storage.getInstance();\n\n if (sdkConfig.callbacks?.fetchPhoneNumbersCallback) {\n await callbackHandler.init(sdkConfig.callbacks.fetchPhoneNumbersCallback);\n }\n await dispatchExecutor.init(\n {\n storeMultipleKeysCallback: storage.setSharedItems,\n readMultipleKeysCallback: storage.getSharedItems,\n deleteMultipleKeysCallback: storage.removeSharedItems,\n eventBulkSyncCallback: pushBulkEventForSync,\n },\n sdkConfig.debugLevelLog ? 'debug' : 'emerg'\n );\n AppSyncManager.getInstance().startSDKSyncManager();\n }\n\n public removeLocationUpdates() {\n LocationManager.getInstance().stopLocationUpdates();\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,eAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,OAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,oBAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,cAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,UAAA,GAAAP,OAAA;AACA,IAAAQ,WAAA,GAAAT,sBAAA,CAAAC,OAAA;AACA,IAAAS,SAAA,GAAAV,sBAAA,CAAAC,OAAA;AACA,IAAAU,MAAA,GAAAC,uBAAA,CAAAX,OAAA;AAEA,IAAAY,cAAA,GAAAb,sBAAA,CAAAC,OAAA;AACA,IAAAa,QAAA,GAAAd,sBAAA,CAAAC,OAAA;AACA,IAAAc,iBAAA,GAAAd,OAAA;AACA,IAAAe,iBAAA,GAAAhB,sBAAA,CAAAC,OAAA;AACA,IAAAgB,iCAAA,GAAAhB,OAAA;AAA0G,SAAAiB,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,SAAAP,wBAAAW,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAA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jDC,wBAAwB,EAAER,OAAO,CAACS,cAAc;MAChDC,0BAA0B,EAAEV,OAAO,CAACW,iBAAiB;MACrDC,qBAAqB,EAAEC;IACzB,CAAC,EACDnD,SAAS,CAACoD,aAAa,GAAG,OAAO,GAAG,OACtC,CAAC;IACD3B,uBAAc,CAAC7B,WAAW,CAAC,CAAC,CAACyD,mBAAmB,CAAC,CAAC;EACpD;EAEOC,qBAAqBA,CAAA,EAAG;IAC7B1B,wBAAe,CAAChC,WAAW,CAAC,CAAC,CAAC2D,mBAAmB,CAAC,CAAC;EACrD;AACF;AAACC,OAAA,CAAA/D,kBAAA,GAAAA,kBAAA;AAAAlB,eAAA,CAhFYkB,kBAAkB"}
@@ -4,38 +4,30 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _storage = _interopRequireDefault(require("../../utils/storage"));
9
-
10
8
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
-
12
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
13
-
9
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
10
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
11
+ function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
14
12
  class DispatchSdkCache {
15
13
  constructor() {
16
14
  _defineProperty(this, "storage", _storage.default.getInstance());
17
15
  }
18
-
19
16
  static getInstance() {
20
17
  if (!DispatchSdkCache.instance) {
21
18
  DispatchSdkCache.instance = new DispatchSdkCache();
22
19
  }
23
-
24
20
  return DispatchSdkCache.instance;
25
21
  }
26
-
27
22
  async setObjectInCache(keyName, obj) {
28
23
  await this.storage.setObject(keyName, obj);
29
24
  }
30
-
31
25
  async getObjectFromCache(keyName) {
32
26
  return await this.storage.getObject(keyName);
33
27
  }
34
-
35
28
  async setKeyInCache(keyName, keyValue) {
36
29
  await this.storage.setItem(keyName, keyValue);
37
30
  }
38
-
39
31
  async getKeyFromCache(keyName) {
40
32
  try {
41
33
  let keyValue = await this.storage.getItem(keyName);
@@ -44,7 +36,6 @@ class DispatchSdkCache {
44
36
  return null;
45
37
  }
46
38
  }
47
-
48
39
  async clearKeys(keys) {
49
40
  try {
50
41
  for (let i = 0; i < keys.length; i++) {
@@ -52,18 +43,16 @@ class DispatchSdkCache {
52
43
  }
53
44
  } catch (error) {}
54
45
  }
55
-
56
46
  }
57
-
58
47
  exports.default = DispatchSdkCache;
59
-
60
48
  _defineProperty(DispatchSdkCache, "instance", void 0);
61
-
62
49
  _defineProperty(DispatchSdkCache, "KEYS", {
63
50
  SDK_CONFIG: 'dsc_sdk_config',
64
51
  DISPATCH_ID: 'dsc_dispatch_id',
65
52
  FMS_FOLDER: 'dsc_fms_folder',
66
53
  FIREBASE_REGISTRATION_TOKEN: 'dsc_firebase_token',
67
- REASON_FETCH_TIME: 'dsc_reasons_fetch_time'
54
+ REASON_FETCH_TIME: 'dsc_reasons_fetch_time',
55
+ CURRENT_WORKING_TASK_ID: 'current_working_task_id'
56
+ // TASK_START_TIME: 'task_start_time',
68
57
  });
69
58
  //# sourceMappingURL=DispatchSdkCache.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["DispatchSdkCache","Storage","getInstance","instance","setObjectInCache","keyName","obj","storage","setObject","getObjectFromCache","getObject","setKeyInCache","keyValue","setItem","getKeyFromCache","getItem","error","clearKeys","keys","i","length","deleteItem","SDK_CONFIG","DISPATCH_ID","FMS_FOLDER","FIREBASE_REGISTRATION_TOKEN","REASON_FETCH_TIME"],"sources":["DispatchSdkCache.ts"],"sourcesContent":["import Storage from '../../utils/storage';\n\nexport default class DispatchSdkCache {\n private storage: Storage = Storage.getInstance();\n private static instance: DispatchSdkCache;\n\n public static getInstance() {\n if (!DispatchSdkCache.instance) {\n DispatchSdkCache.instance = new DispatchSdkCache();\n }\n return DispatchSdkCache.instance;\n }\n public static KEYS = {\n SDK_CONFIG: 'dsc_sdk_config',\n DISPATCH_ID: 'dsc_dispatch_id',\n FMS_FOLDER: 'dsc_fms_folder',\n FIREBASE_REGISTRATION_TOKEN: 'dsc_firebase_token',\n REASON_FETCH_TIME: 'dsc_reasons_fetch_time',\n };\n public async setObjectInCache(keyName: string, obj: any) {\n await this.storage.setObject(keyName, obj);\n }\n public async getObjectFromCache(keyName: string): Promise<any> {\n return await this.storage.getObject(keyName);\n }\n public async setKeyInCache(keyName: string, keyValue: string) {\n await this.storage.setItem(keyName, keyValue);\n }\n public async getKeyFromCache(keyName: string): Promise<string | null> {\n try {\n let keyValue = await this.storage.getItem(keyName);\n if (keyValue != null) return keyValue;\n else return null;\n } catch (error: any) {\n return null;\n }\n }\n public async clearKeys(keys: string[]) {\n try {\n for (let i = 0; i < keys.length; i++) {\n await this.storage.deleteItem(keys[i]);\n }\n } catch (error: any) {}\n }\n}\n"],"mappings":";;;;;;;AAAA;;;;;;AAEe,MAAMA,gBAAN,CAAuB;EAAA;IAAA,iCACTC,gBAAA,CAAQC,WAAR,EADS;EAAA;;EAIX,OAAXA,WAAW,GAAG;IAC1B,IAAI,CAACF,gBAAgB,CAACG,QAAtB,EAAgC;MAC9BH,gBAAgB,CAACG,QAAjB,GAA4B,IAAIH,gBAAJ,EAA5B;IACD;;IACD,OAAOA,gBAAgB,CAACG,QAAxB;EACD;;EAQ4B,MAAhBC,gBAAgB,CAACC,OAAD,EAAkBC,GAAlB,EAA4B;IACvD,MAAM,KAAKC,OAAL,CAAaC,SAAb,CAAuBH,OAAvB,EAAgCC,GAAhC,CAAN;EACD;;EAC8B,MAAlBG,kBAAkB,CAACJ,OAAD,EAAgC;IAC7D,OAAO,MAAM,KAAKE,OAAL,CAAaG,SAAb,CAAuBL,OAAvB,CAAb;EACD;;EACyB,MAAbM,aAAa,CAACN,OAAD,EAAkBO,QAAlB,EAAoC;IAC5D,MAAM,KAAKL,OAAL,CAAaM,OAAb,CAAqBR,OAArB,EAA8BO,QAA9B,CAAN;EACD;;EAC2B,MAAfE,eAAe,CAACT,OAAD,EAA0C;IACpE,IAAI;MACF,IAAIO,QAAQ,GAAG,MAAM,KAAKL,OAAL,CAAaQ,OAAb,CAAqBV,OAArB,CAArB;MACA,IAAIO,QAAQ,IAAI,IAAhB,EAAsB,OAAOA,QAAP,CAAtB,KACK,OAAO,IAAP;IACN,CAJD,CAIE,OAAOI,KAAP,EAAmB;MACnB,OAAO,IAAP;IACD;EACF;;EACqB,MAATC,SAAS,CAACC,IAAD,EAAiB;IACrC,IAAI;MACF,KAAK,IAAIC,CAAC,GAAG,CAAb,EAAgBA,CAAC,GAAGD,IAAI,CAACE,MAAzB,EAAiCD,CAAC,EAAlC,EAAsC;QACpC,MAAM,KAAKZ,OAAL,CAAac,UAAb,CAAwBH,IAAI,CAACC,CAAD,CAA5B,CAAN;MACD;IACF,CAJD,CAIE,OAAOH,KAAP,EAAmB,CAAE;EACxB;;AAzCmC;;;;gBAAjBhB,gB;;gBAAAA,gB,UAUE;EACnBsB,UAAU,EAAE,gBADO;EAEnBC,WAAW,EAAE,iBAFM;EAGnBC,UAAU,EAAE,gBAHO;EAInBC,2BAA2B,EAAE,oBAJV;EAKnBC,iBAAiB,EAAE;AALA,C"}
1
+ {"version":3,"names":["_storage","_interopRequireDefault","require","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","call","TypeError","Number","DispatchSdkCache","constructor","Storage","getInstance","instance","setObjectInCache","keyName","storage","setObject","getObjectFromCache","getObject","setKeyInCache","keyValue","setItem","getKeyFromCache","getItem","error","clearKeys","keys","i","length","deleteItem","exports","SDK_CONFIG","DISPATCH_ID","FMS_FOLDER","FIREBASE_REGISTRATION_TOKEN","REASON_FETCH_TIME","CURRENT_WORKING_TASK_ID"],"sources":["DispatchSdkCache.ts"],"sourcesContent":["import Storage from '../../utils/storage';\n\nexport default class DispatchSdkCache {\n private storage: Storage = Storage.getInstance();\n private static instance: DispatchSdkCache;\n\n public static getInstance() {\n if (!DispatchSdkCache.instance) {\n DispatchSdkCache.instance = new DispatchSdkCache();\n }\n return DispatchSdkCache.instance;\n }\n public static KEYS = {\n SDK_CONFIG: 'dsc_sdk_config',\n DISPATCH_ID: 'dsc_dispatch_id',\n FMS_FOLDER: 'dsc_fms_folder',\n FIREBASE_REGISTRATION_TOKEN: 'dsc_firebase_token',\n REASON_FETCH_TIME: 'dsc_reasons_fetch_time',\n CURRENT_WORKING_TASK_ID: 'current_working_task_id',\n // TASK_START_TIME: 'task_start_time',\n };\n public async setObjectInCache(keyName: string, obj: any) {\n await this.storage.setObject(keyName, obj);\n }\n public async getObjectFromCache(keyName: string): Promise<any> {\n return await this.storage.getObject(keyName);\n }\n public async setKeyInCache(keyName: string, keyValue: string) {\n await this.storage.setItem(keyName, keyValue);\n }\n public async getKeyFromCache(keyName: string): Promise<string | null> {\n try {\n let keyValue = await this.storage.getItem(keyName);\n if (keyValue != null) return keyValue;\n else return null;\n } catch (error: any) {\n return null;\n }\n }\n public async clearKeys(keys: string[]) {\n try {\n for (let i = 0; i < keys.length; i++) {\n await this.storage.deleteItem(keys[i]);\n }\n } catch (error: any) {}\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA0C,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,gBAAAH,GAAA,EAAAI,GAAA,EAAAC,KAAA,I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AC9C;EACA,MAAaK,aAAaA,CAACL,OAAe,EAAEM,QAAgB,EAAE;IAC5D,MAAM,IAAI,CAACL,OAAO,CAACM,OAAO,CAACP,OAAO,EAAEM,QAAQ,CAAC;EAC/C;EACA,MAAaE,eAAeA,CAACR,OAAe,EAA0B;IACpE,IAAI;MACF,IAAIM,QAAQ,GAAG,MAAM,IAAI,CAACL,OAAO,CAACQ,OAAO,CAACT,OAAO,CAAC;MAClD,IAAIM,QAAQ,IAAI,IAAI,EAAE,OAAOA,QAAQ,CAAC,KACjC,OAAO,IAAI;IAClB,CAAC,CAAC,OAAOI,KAAU,EAAE;MACnB,OAAO,IAAI;IACb;EACF;EACA,MAAaC,SAASA,CAACC,IAAc,EAAE;IACrC,IAAI;MACF,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGD,IAAI,CAACE,MAAM,EAAED,CAAC,EAAE,EAAE;QACpC,MAAM,IAAI,CAACZ,OAAO,CAACc,UAAU,CAACH,IAAI,CAACC,CAAC,CAAC,CAAC;MACxC;IACF,CAAC,CAAC,OAAOH,KAAU,EAAE,CAAC;EACxB;AACF;AAACM,OAAA,CAAA7C,OAAA,GAAAuB,gBAAA;AAAAtB,eAAA,CA5CoBsB,gBAAgB;AAAAtB,eAAA,CAAhBsB,gBAAgB,UAUd;EACnBuB,UAAU,EAAE,gBAAgB;EAC5BC,WAAW,EAAE,iBAAiB;EAC9BC,UAAU,EAAE,gBAAgB;EAC5BC,2BAA2B,EAAE,oBAAoB;EACjDC,iBAAiB,EAAE,wBAAwB;EAC3CC,uBAAuB,EAAE;EACzB;AACF,CAAC"}
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
8
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
9
+ function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
10
+ class CallbacksHandler {
11
+ constructor() {
12
+ _defineProperty(this, "_callbackToFetchPhoneNumbers", void 0);
13
+ }
14
+ init(phoneCallback) {
15
+ this._callbackToFetchPhoneNumbers = phoneCallback;
16
+ }
17
+ async getPhoneNumbers(sdsIds) {
18
+ if (!this._callbackToFetchPhoneNumbers) return null;else {
19
+ return await this._callbackToFetchPhoneNumbers(sdsIds);
20
+ }
21
+ }
22
+ }
23
+ const callbackHandler = new CallbacksHandler();
24
+ var _default = callbackHandler;
25
+ exports.default = _default;
26
+ //# sourceMappingURL=callbacksHandler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["CallbacksHandler","constructor","_defineProperty","init","phoneCallback","_callbackToFetchPhoneNumbers","getPhoneNumbers","sdsIds","callbackHandler","_default","exports","default"],"sources":["callbacksHandler.ts"],"sourcesContent":["class CallbacksHandler {\n private _callbackToFetchPhoneNumbers!: (\n sdsIds: string[]\n ) => Promise<{ key: string; value: string[] }>;\n\n public init(\n phoneCallback: (\n sdsIds: string[]\n ) => Promise<{ key: string; value: string[] }>\n ) {\n this._callbackToFetchPhoneNumbers = phoneCallback;\n }\n\n public async getPhoneNumbers(\n sdsIds: string[]\n ): Promise<{ key: string; value: string[] } | null> {\n if (!this._callbackToFetchPhoneNumbers) return null;\n else {\n return await this._callbackToFetchPhoneNumbers(sdsIds);\n }\n }\n}\n\nconst callbackHandler = new CallbacksHandler();\nexport default callbackHandler;\n"],"mappings":";;;;;;;;;AAAA,MAAMA,gBAAgB,CAAC;EAAAC,YAAA;IAAAC,eAAA;EAAA;EAKdC,IAAIA,CACTC,aAE8C,EAC9C;IACA,IAAI,CAACC,4BAA4B,GAAGD,aAAa;EACnD;EAEA,MAAaE,eAAeA,CAC1BC,MAAgB,EACkC;IAClD,IAAI,CAAC,IAAI,CAACF,4BAA4B,EAAE,OAAO,IAAI,CAAC,KAC/C;MACH,OAAO,MAAM,IAAI,CAACA,4BAA4B,CAACE,MAAM,CAAC;IACxD;EACF;AACF;AAEA,MAAMC,eAAe,GAAG,IAAIR,gBAAgB,CAAC,CAAC;AAAC,IAAAS,QAAA,GAChCD,eAAe;AAAAE,OAAA,CAAAC,OAAA,GAAAF,QAAA"}