@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,57 +4,47 @@
4
4
  *
5
5
  * @class LoginHelper
6
6
  */
7
- import Auth from '../resources/Login';
8
7
 
8
+ import Auth from '../resources/Login';
9
9
  class LoginHelper {
10
10
  async initLogin(loginPayload, loginType) {
11
11
  try {
12
12
  let loginResponse;
13
-
14
13
  switch (loginType) {
15
14
  case 'mobilePassword':
16
15
  loginResponse = await Auth.loginMobilePassword(loginPayload);
17
16
  break;
18
-
19
17
  case 'mobileOtp':
20
18
  loginResponse = await Auth.loginMobileOtp(loginPayload);
21
19
  break;
22
-
23
20
  case 'mPin':
24
21
  loginResponse = await Auth.loginMpin(loginPayload);
25
22
  break;
26
-
27
23
  case 'usernamePassword':
28
24
  loginResponse = await Auth.loginUserName(loginPayload);
29
25
  break;
30
-
31
26
  case 'clientCredential':
32
27
  loginResponse = await Auth.loginCredential(loginPayload);
33
28
  break;
34
-
35
29
  default:
36
30
  break;
37
- } // await Storage.setObject('LoginResponse', loginResponse);
38
-
39
-
31
+ }
32
+ // await Storage.setObject('LoginResponse', loginResponse);
40
33
  return loginResponse;
41
34
  } catch (e) {
42
35
  // Flush all storage
43
36
  throw new Error(e);
44
37
  }
45
38
  }
46
-
47
39
  async handleAccessTokenExpiry() {
48
40
  const data = {
49
- tenant: '',
50
- appName: '',
51
- applicationSecret: ''
41
+ tenant: 'delhivery',
42
+ appName: 'user-auth',
43
+ applicationSecret: 'c8fda076-c0ab-4afd-b357-ecfba4dad6f8'
52
44
  };
53
45
  await Auth.refreshToken(data);
54
46
  }
55
-
56
47
  }
57
-
58
48
  const loginHelper = new LoginHelper();
59
49
  export default loginHelper;
60
50
  //# sourceMappingURL=loginHelper.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["Auth","LoginHelper","initLogin","loginPayload","loginType","loginResponse","loginMobilePassword","loginMobileOtp","loginMpin","loginUserName","loginCredential","e","Error","handleAccessTokenExpiry","data","tenant","appName","applicationSecret","refreshToken","loginHelper"],"sources":["loginHelper.ts"],"sourcesContent":["/**\n * Creating a wrapper arround localstorage as https://reactnative.dev/docs/asyncstorage\n *\n *\n * @class LoginHelper\n */\nimport type { LoginPayload, LoginType } from '../models/auth';\nimport Auth from '../resources/Login';\nclass LoginHelper {\n async initLogin(loginPayload: LoginPayload, loginType: LoginType) {\n try {\n let loginResponse: any;\n switch (loginType) {\n case 'mobilePassword':\n loginResponse = await Auth.loginMobilePassword(loginPayload);\n break;\n case 'mobileOtp':\n loginResponse = await Auth.loginMobileOtp(loginPayload);\n break;\n case 'mPin':\n loginResponse = await Auth.loginMpin(loginPayload);\n break;\n case 'usernamePassword':\n loginResponse = await Auth.loginUserName(loginPayload);\n break;\n case 'clientCredential':\n loginResponse = await Auth.loginCredential(loginPayload);\n break;\n default:\n break;\n }\n // await Storage.setObject('LoginResponse', loginResponse);\n return loginResponse;\n } catch (e: any) {\n // Flush all storage\n throw new Error(e);\n }\n }\n\n async handleAccessTokenExpiry() {\n const data: any = {\n tenant: '',\n appName: '',\n applicationSecret: '',\n };\n await Auth.refreshToken(data);\n }\n}\n\nconst loginHelper = new LoginHelper();\nexport default loginHelper;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AAEA,OAAOA,IAAP,MAAiB,oBAAjB;;AACA,MAAMC,WAAN,CAAkB;EACD,MAATC,SAAS,CAACC,YAAD,EAA6BC,SAA7B,EAAmD;IAChE,IAAI;MACF,IAAIC,aAAJ;;MACA,QAAQD,SAAR;QACE,KAAK,gBAAL;UACEC,aAAa,GAAG,MAAML,IAAI,CAACM,mBAAL,CAAyBH,YAAzB,CAAtB;UACA;;QACF,KAAK,WAAL;UACEE,aAAa,GAAG,MAAML,IAAI,CAACO,cAAL,CAAoBJ,YAApB,CAAtB;UACA;;QACF,KAAK,MAAL;UACEE,aAAa,GAAG,MAAML,IAAI,CAACQ,SAAL,CAAeL,YAAf,CAAtB;UACA;;QACF,KAAK,kBAAL;UACEE,aAAa,GAAG,MAAML,IAAI,CAACS,aAAL,CAAmBN,YAAnB,CAAtB;UACA;;QACF,KAAK,kBAAL;UACEE,aAAa,GAAG,MAAML,IAAI,CAACU,eAAL,CAAqBP,YAArB,CAAtB;UACA;;QACF;UACE;MAjBJ,CAFE,CAqBF;;;MACA,OAAOE,aAAP;IACD,CAvBD,CAuBE,OAAOM,CAAP,EAAe;MACf;MACA,MAAM,IAAIC,KAAJ,CAAUD,CAAV,CAAN;IACD;EACF;;EAE4B,MAAvBE,uBAAuB,GAAG;IAC9B,MAAMC,IAAS,GAAG;MAChBC,MAAM,EAAE,EADQ;MAEhBC,OAAO,EAAE,EAFO;MAGhBC,iBAAiB,EAAE;IAHH,CAAlB;IAKA,MAAMjB,IAAI,CAACkB,YAAL,CAAkBJ,IAAlB,CAAN;EACD;;AAtCe;;AAyClB,MAAMK,WAAW,GAAG,IAAIlB,WAAJ,EAApB;AACA,eAAekB,WAAf"}
1
+ {"version":3,"names":["Auth","LoginHelper","initLogin","loginPayload","loginType","loginResponse","loginMobilePassword","loginMobileOtp","loginMpin","loginUserName","loginCredential","e","Error","handleAccessTokenExpiry","data","tenant","appName","applicationSecret","refreshToken","loginHelper"],"sources":["loginHelper.ts"],"sourcesContent":["/**\n * Creating a wrapper arround localstorage as https://reactnative.dev/docs/asyncstorage\n *\n *\n * @class LoginHelper\n */\nimport type { LoginPayload, LoginType } from '../models/auth';\nimport Auth from '../resources/Login';\nclass LoginHelper {\n async initLogin(loginPayload: LoginPayload, loginType: LoginType) {\n try {\n let loginResponse: any;\n switch (loginType) {\n case 'mobilePassword':\n loginResponse = await Auth.loginMobilePassword(loginPayload);\n break;\n case 'mobileOtp':\n loginResponse = await Auth.loginMobileOtp(loginPayload);\n break;\n case 'mPin':\n loginResponse = await Auth.loginMpin(loginPayload);\n break;\n case 'usernamePassword':\n loginResponse = await Auth.loginUserName(loginPayload);\n break;\n case 'clientCredential':\n loginResponse = await Auth.loginCredential(loginPayload);\n break;\n default:\n break;\n }\n // await Storage.setObject('LoginResponse', loginResponse);\n return loginResponse;\n } catch (e: any) {\n // Flush all storage\n throw new Error(e);\n }\n }\n\n async handleAccessTokenExpiry() {\n const data: any = {\n tenant: 'delhivery',\n appName: 'user-auth',\n applicationSecret: 'c8fda076-c0ab-4afd-b357-ecfba4dad6f8',\n };\n await Auth.refreshToken(data);\n }\n}\n\nconst loginHelper = new LoginHelper();\nexport default loginHelper;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,IAAI,MAAM,oBAAoB;AACrC,MAAMC,WAAW,CAAC;EAChB,MAAMC,SAASA,CAACC,YAA0B,EAAEC,SAAoB,EAAE;IAChE,IAAI;MACF,IAAIC,aAAkB;MACtB,QAAQD,SAAS;QACf,KAAK,gBAAgB;UACnBC,aAAa,GAAG,MAAML,IAAI,CAACM,mBAAmB,CAACH,YAAY,CAAC;UAC5D;QACF,KAAK,WAAW;UACdE,aAAa,GAAG,MAAML,IAAI,CAACO,cAAc,CAACJ,YAAY,CAAC;UACvD;QACF,KAAK,MAAM;UACTE,aAAa,GAAG,MAAML,IAAI,CAACQ,SAAS,CAACL,YAAY,CAAC;UAClD;QACF,KAAK,kBAAkB;UACrBE,aAAa,GAAG,MAAML,IAAI,CAACS,aAAa,CAACN,YAAY,CAAC;UACtD;QACF,KAAK,kBAAkB;UACrBE,aAAa,GAAG,MAAML,IAAI,CAACU,eAAe,CAACP,YAAY,CAAC;UACxD;QACF;UACE;MACJ;MACA;MACA,OAAOE,aAAa;IACtB,CAAC,CAAC,OAAOM,CAAM,EAAE;MACf;MACA,MAAM,IAAIC,KAAK,CAACD,CAAC,CAAC;IACpB;EACF;EAEA,MAAME,uBAAuBA,CAAA,EAAG;IAC9B,MAAMC,IAAS,GAAG;MAChBC,MAAM,EAAE,WAAW;MACnBC,OAAO,EAAE,WAAW;MACpBC,iBAAiB,EAAE;IACrB,CAAC;IACD,MAAMjB,IAAI,CAACkB,YAAY,CAACJ,IAAI,CAAC;EAC/B;AACF;AAEA,MAAMK,WAAW,GAAG,IAAIlB,WAAW,CAAC,CAAC;AACrC,eAAekB,WAAW"}
@@ -1,24 +1,27 @@
1
- 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; }
2
-
1
+ 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; }
2
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
3
+ 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); }
3
4
  import { LOCAL_STORAGE_KEY_PREFIX } from './../constants/constants';
4
5
  import AsyncStorage from '@react-native-async-storage/async-storage';
6
+ import Logger, { LOG_TYPE } from './Logger';
7
+ import { NativeModules } from 'react-native';
8
+ const {
9
+ SharedPreferencesModule
10
+ } = NativeModules;
11
+
5
12
  /**
6
13
  * Creating a wrapper arround localstorage as https://reactnative.dev/docs/asyncstorage
7
14
  * depreciated using communiity package instead https://github.com/react-native-async-storage/async-storage
8
15
  *
9
16
  * @class Storage
10
17
  */
11
-
12
18
  class Storage {
13
- // private prefixKey: string;
14
19
  constructor() {}
15
-
16
20
  static getInstance() {
17
21
  if (!this.classInstance) {
18
22
  this.classInstance = new Storage();
19
23
  Storage.prefixKey = LOCAL_STORAGE_KEY_PREFIX;
20
24
  }
21
-
22
25
  return this.classInstance;
23
26
  }
24
27
  /**
@@ -27,38 +30,32 @@ class Storage {
27
30
  * @param {string} key
28
31
  * @returns {Promise<string | null>}
29
32
  */
30
-
31
-
32
33
  async getItem(key) {
33
34
  if (!key) {
34
35
  throw new TypeError('In-valid params.');
35
36
  }
36
-
37
37
  return await AsyncStorage.getItem(Storage.prefixKey + key);
38
38
  }
39
+
39
40
  /**
40
41
  * Save a single itema
41
42
  *
42
43
  * @param {string} key
43
44
  * @returns {Promise<void>}
44
45
  */
45
-
46
-
47
46
  async setItem(key, value) {
48
47
  if (!(key && value)) {
49
48
  throw TypeError('In-valid params.');
50
49
  }
51
-
52
50
  return await AsyncStorage.setItem(Storage.prefixKey + key, value);
53
51
  }
52
+
54
53
  /**
55
54
  * Save a Object
56
55
  *
57
56
  * @param {string} key
58
57
  * @returns {Promise<{}|[]>}
59
58
  */
60
-
61
-
62
59
  async setObject(key, value) {
63
60
  if (!key) {
64
61
  throw TypeError('In-valid params.');
@@ -66,6 +63,27 @@ class Storage {
66
63
  return await AsyncStorage.setItem(Storage.prefixKey + key, JSON.stringify(value));
67
64
  }
68
65
  }
66
+
67
+ /**
68
+ *
69
+ * @param input: Array<MultiObject>
70
+ * @returns
71
+ */
72
+ async setMultiObject(input) {
73
+ if (input.some(arg => !(arg.key && arg.value) && typeof arg.value !== 'object' || Array.isArray(arg.value) && arg.value.length === 0 || Object.keys(arg.value).length === 0)) {
74
+ throw TypeError(`In-valid params: ${input}`);
75
+ } else {
76
+ try {
77
+ return await AsyncStorage.multiSet(input.map(arg => {
78
+ const v = [Storage.prefixKey + arg.key, JSON.stringify(arg.value)];
79
+ return v;
80
+ }));
81
+ } catch (error) {
82
+ Logger.getInstance().logEvent('~ setMultiObject Async Storage', 'Unable to multiSet data in Async Storage', LOG_TYPE.SDK_ERROR);
83
+ }
84
+ }
85
+ }
86
+
69
87
  /**
70
88
  * Get an Object
71
89
  *
@@ -73,15 +91,11 @@ class Storage {
73
91
  * @returns {Promise<void>}
74
92
  */
75
93
  // the return type of the function could be made as Generic
76
-
77
-
78
94
  async getObject(key) {
79
95
  if (!key) {
80
96
  throw new TypeError('In-valid params.');
81
97
  }
82
-
83
98
  let val = await AsyncStorage.getItem(Storage.prefixKey + key);
84
-
85
99
  if (val !== null) {
86
100
  const obj = JSON.parse(val);
87
101
  return obj;
@@ -89,27 +103,43 @@ class Storage {
89
103
  return null;
90
104
  }
91
105
  }
106
+
107
+ /**
108
+ * Get an Object
109
+ *
110
+ * @param {string} keys
111
+ * @returns {Promise<void>}
112
+ */
113
+
114
+ async getMultiObject(keys) {
115
+ if (!keys) {
116
+ throw new TypeError(`Read In-valid params: ${keys}`);
117
+ }
118
+ let items = await AsyncStorage.multiGet(keys.map(key => Storage.prefixKey + key));
119
+ if (items) {
120
+ return items.map(i => {
121
+ if (i[1]) return [i[0], JSON.parse(i[1])];else return [i[0], null];
122
+ });
123
+ } else {
124
+ return [[]];
125
+ }
126
+ }
92
127
  /**
93
128
  * Deletes a single item
94
129
  * @param {string} key
95
130
  * @returns {Promise<void>}
96
131
  */
97
132
  // need to handle cases for wrongs keys
98
-
99
-
100
133
  async deleteItem(key) {
101
134
  if (!key) {
102
135
  throw new TypeError('In-valid params.');
103
136
  }
104
-
105
137
  await AsyncStorage.removeItem(Storage.prefixKey + key);
106
138
  }
107
-
108
139
  async deleteMultiple(keys) {
109
140
  if (!keys || keys.length === 0) {
110
141
  throw new TypeError('In-valid params.');
111
142
  }
112
-
113
143
  const alteredKeys = keys.map(k => {
114
144
  if (k.startsWith(Storage.prefixKey)) {
115
145
  return k;
@@ -119,24 +149,51 @@ class Storage {
119
149
  });
120
150
  await AsyncStorage.multiRemove(alteredKeys);
121
151
  }
122
-
123
152
  async getAllKeys(prefix) {
124
153
  if (!prefix) {
125
154
  throw new TypeError('In-valid params.');
126
155
  }
127
-
128
156
  const keys = await AsyncStorage.getAllKeys();
129
157
  return keys.filter(key => {
130
158
  return key.startsWith(Storage.prefixKey + prefix);
131
159
  });
132
160
  }
133
161
 
134
- } // const storage = new Storage();
135
-
162
+ /**
163
+ * Shared preferences
164
+ */
165
+ async setSharedItem(key, value) {
166
+ await SharedPreferencesModule.setItem(key, value);
167
+ }
168
+ async setSharedItems(items) {
169
+ await SharedPreferencesModule.setItems(JSON.stringify(items));
170
+ }
171
+ async getSharedItem(key) {
172
+ return await SharedPreferencesModule.getItem(key);
173
+ }
174
+ async getSharedItems(key) {
175
+ return await SharedPreferencesModule.getItems(key);
176
+ }
177
+ async getSharedAll() {
178
+ return await SharedPreferencesModule.getAll();
179
+ }
180
+ async getAllSharedKeys() {
181
+ return await SharedPreferencesModule.getAllKeys();
182
+ }
183
+ async clearShared() {
184
+ await SharedPreferencesModule.clear();
185
+ }
186
+ async removeSharedItem(key) {
187
+ await SharedPreferencesModule.removeItem(key);
188
+ }
189
+ async removeSharedItems(key) {
190
+ await SharedPreferencesModule.removeItems(key);
191
+ }
192
+ }
136
193
 
194
+ // const storage = new Storage();
137
195
  _defineProperty(Storage, "classInstance", void 0);
138
-
196
+ // private prefixKey: string;
139
197
  _defineProperty(Storage, "prefixKey", void 0);
140
-
141
198
  export default Storage;
142
199
  //# sourceMappingURL=storage.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["LOCAL_STORAGE_KEY_PREFIX","AsyncStorage","Storage","constructor","getInstance","classInstance","prefixKey","getItem","key","TypeError","setItem","value","setObject","JSON","stringify","getObject","val","obj","parse","deleteItem","removeItem","deleteMultiple","keys","length","alteredKeys","map","k","startsWith","multiRemove","getAllKeys","prefix","filter"],"sources":["storage.ts"],"sourcesContent":["import { LOCAL_STORAGE_KEY_PREFIX } from './../constants/constants';\nimport AsyncStorage from '@react-native-async-storage/async-storage';\n\n/**\n * Creating a wrapper arround localstorage as https://reactnative.dev/docs/asyncstorage\n * depreciated using communiity package instead https://github.com/react-native-async-storage/async-storage\n *\n * @class Storage\n */\nclass Storage {\n private static classInstance?: Storage;\n // private prefixKey: string;\n static prefixKey: string;\n private constructor() {}\n\n public static getInstance(): Storage {\n if (!this.classInstance) {\n this.classInstance = new Storage();\n Storage.prefixKey = LOCAL_STORAGE_KEY_PREFIX;\n }\n return this.classInstance;\n }\n /**\n * Get a single item\n *\n * @param {string} key\n * @returns {Promise<string | null>}\n */\n async getItem(key: string): Promise<string | null> {\n if (!key) {\n throw new TypeError('In-valid params.');\n }\n return await AsyncStorage.getItem(Storage.prefixKey + key);\n }\n\n /**\n * Save a single itema\n *\n * @param {string} key\n * @returns {Promise<void>}\n */\n async setItem(key: string, value: string): Promise<void> {\n if (!(key && value)) {\n throw TypeError('In-valid params.');\n }\n return await AsyncStorage.setItem(Storage.prefixKey + key, value);\n }\n\n /**\n * Save a Object\n *\n * @param {string} key\n * @returns {Promise<{}|[]>}\n */\n async setObject(key: string, value: {} | []): Promise<void> {\n if (!key) {\n throw TypeError('In-valid params.');\n } else {\n return await AsyncStorage.setItem(\n Storage.prefixKey + key,\n JSON.stringify(value)\n );\n }\n }\n\n /**\n * Get an Object\n *\n * @param {string} key\n * @returns {Promise<void>}\n */\n // the return type of the function could be made as Generic\n async getObject(key: string): Promise<{} | [] | null> {\n if (!key) {\n throw new TypeError('In-valid params.');\n }\n let val: string | null = await AsyncStorage.getItem(\n Storage.prefixKey + key\n );\n if (val !== null) {\n const obj = JSON.parse(val);\n return obj;\n } else {\n return null;\n }\n }\n /**\n * Deletes a single item\n * @param {string} key\n * @returns {Promise<void>}\n */\n // need to handle cases for wrongs keys\n async deleteItem(key: string): Promise<void> {\n if (!key) {\n throw new TypeError('In-valid params.');\n }\n await AsyncStorage.removeItem(Storage.prefixKey + key);\n }\n\n async deleteMultiple(keys: string[]) {\n if (!keys || keys.length === 0) {\n throw new TypeError('In-valid params.');\n }\n const alteredKeys = keys.map((k) => {\n if (k.startsWith(Storage.prefixKey)) {\n return k;\n } else {\n return Storage.prefixKey + k;\n }\n });\n await AsyncStorage.multiRemove(alteredKeys);\n }\n async getAllKeys(prefix: string): Promise<string[]> {\n if (!prefix) {\n throw new TypeError('In-valid params.');\n }\n const keys = await AsyncStorage.getAllKeys();\n return keys.filter((key) => {\n return key.startsWith(Storage.prefixKey + prefix);\n });\n }\n}\n\n// const storage = new Storage();\nexport default Storage;\n"],"mappings":"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"}
1
+ {"version":3,"names":["LOCAL_STORAGE_KEY_PREFIX","AsyncStorage","Logger","LOG_TYPE","NativeModules","SharedPreferencesModule","Storage","constructor","getInstance","classInstance","prefixKey","getItem","key","TypeError","setItem","value","setObject","JSON","stringify","setMultiObject","input","some","arg","Array","isArray","length","Object","keys","multiSet","map","v","error","logEvent","SDK_ERROR","getObject","val","obj","parse","getMultiObject","items","multiGet","i","deleteItem","removeItem","deleteMultiple","alteredKeys","k","startsWith","multiRemove","getAllKeys","prefix","filter","setSharedItem","setSharedItems","setItems","getSharedItem","getSharedItems","getItems","getSharedAll","getAll","getAllSharedKeys","clearShared","clear","removeSharedItem","removeSharedItems","removeItems","_defineProperty"],"sources":["storage.ts"],"sourcesContent":["import { LOCAL_STORAGE_KEY_PREFIX } from './../constants/constants';\nimport AsyncStorage from '@react-native-async-storage/async-storage';\nimport Logger, { LOG_TYPE } from './Logger';\nimport { NativeModules } from 'react-native';\n\ninterface MultiObject {\n key: string;\n value: {} | [];\n}\n\nconst { SharedPreferencesModule } = NativeModules;\n\n/**\n * Creating a wrapper arround localstorage as https://reactnative.dev/docs/asyncstorage\n * depreciated using communiity package instead https://github.com/react-native-async-storage/async-storage\n *\n * @class Storage\n */\nclass Storage {\n private static classInstance?: Storage;\n // private prefixKey: string;\n static prefixKey: string;\n private constructor() {}\n\n public static getInstance(): Storage {\n if (!this.classInstance) {\n this.classInstance = new Storage();\n Storage.prefixKey = LOCAL_STORAGE_KEY_PREFIX;\n }\n return this.classInstance;\n }\n /**\n * Get a single item\n *\n * @param {string} key\n * @returns {Promise<string | null>}\n */\n async getItem(key: string): Promise<string | null> {\n if (!key) {\n throw new TypeError('In-valid params.');\n }\n return await AsyncStorage.getItem(Storage.prefixKey + key);\n }\n\n /**\n * Save a single itema\n *\n * @param {string} key\n * @returns {Promise<void>}\n */\n async setItem(key: string, value: string): Promise<void> {\n if (!(key && value)) {\n throw TypeError('In-valid params.');\n }\n return await AsyncStorage.setItem(Storage.prefixKey + key, value);\n }\n\n /**\n * Save a Object\n *\n * @param {string} key\n * @returns {Promise<{}|[]>}\n */\n async setObject(key: string, value: {} | []): Promise<void> {\n if (!key) {\n throw TypeError('In-valid params.');\n } else {\n return await AsyncStorage.setItem(\n Storage.prefixKey + key,\n JSON.stringify(value)\n );\n }\n }\n\n /**\n *\n * @param input: Array<MultiObject>\n * @returns\n */\n async setMultiObject(input: Array<MultiObject>): Promise<void> {\n if (\n input.some(\n (arg) =>\n (!(arg.key && arg.value) && typeof arg.value !== 'object') ||\n (Array.isArray(arg.value) && arg.value.length === 0) ||\n Object.keys(arg.value).length === 0\n )\n ) {\n throw TypeError(`In-valid params: ${input}`);\n } else {\n try {\n return await AsyncStorage.multiSet(\n input.map((arg) => {\n const v: [string, string] = [\n Storage.prefixKey + arg.key,\n JSON.stringify(arg.value),\n ];\n return v;\n })\n );\n } catch (error) {\n Logger.getInstance().logEvent(\n '~ setMultiObject Async Storage',\n 'Unable to multiSet data in Async Storage',\n LOG_TYPE.SDK_ERROR\n );\n }\n }\n }\n\n /**\n * Get an Object\n *\n * @param {string} key\n * @returns {Promise<void>}\n */\n // the return type of the function could be made as Generic\n async getObject(key: string): Promise<{} | [] | null> {\n if (!key) {\n throw new TypeError('In-valid params.');\n }\n let val: string | null = await AsyncStorage.getItem(\n Storage.prefixKey + key\n );\n if (val !== null) {\n const obj = JSON.parse(val);\n return obj;\n } else {\n return null;\n }\n }\n\n /**\n * Get an Object\n *\n * @param {string} keys\n * @returns {Promise<void>}\n */\n\n async getMultiObject(keys: string[]): Promise<any[][]> {\n if (!keys) {\n throw new TypeError(`Read In-valid params: ${keys}`);\n }\n let items = await AsyncStorage.multiGet(\n keys.map((key) => Storage.prefixKey + key)\n );\n if (items) {\n return items.map((i) => {\n if (i[1]) return [i[0], JSON.parse(i[1])];\n else return [i[0], null];\n });\n } else {\n return [[]];\n }\n }\n /**\n * Deletes a single item\n * @param {string} key\n * @returns {Promise<void>}\n */\n // need to handle cases for wrongs keys\n async deleteItem(key: string): Promise<void> {\n if (!key) {\n throw new TypeError('In-valid params.');\n }\n await AsyncStorage.removeItem(Storage.prefixKey + key);\n }\n\n async deleteMultiple(keys: string[]) {\n if (!keys || keys.length === 0) {\n throw new TypeError('In-valid params.');\n }\n const alteredKeys = keys.map((k) => {\n if (k.startsWith(Storage.prefixKey)) {\n return k;\n } else {\n return Storage.prefixKey + k;\n }\n });\n await AsyncStorage.multiRemove(alteredKeys);\n }\n\n async getAllKeys(prefix: string): Promise<string[]> {\n if (!prefix) {\n throw new TypeError('In-valid params.');\n }\n const keys = await AsyncStorage.getAllKeys();\n return keys.filter((key) => {\n return key.startsWith(Storage.prefixKey + prefix);\n });\n }\n\n /**\n * Shared preferences\n */\n async setSharedItem(key: string, value: string): Promise<void> {\n await SharedPreferencesModule.setItem(key, value);\n }\n\n async setSharedItems(items: { key: string; value: string }[]): Promise<void> {\n await SharedPreferencesModule.setItems(JSON.stringify(items));\n }\n\n async getSharedItem(key: string): Promise<string> {\n return await SharedPreferencesModule.getItem(key);\n }\n\n async getSharedItems(key: string[]): Promise<string[][]> {\n return await SharedPreferencesModule.getItems(key);\n }\n\n async getSharedAll(): Promise<[][]> {\n return await SharedPreferencesModule.getAll();\n }\n\n async getAllSharedKeys(): Promise<string[]> {\n return await SharedPreferencesModule.getAllKeys();\n }\n\n async clearShared(): Promise<void> {\n await SharedPreferencesModule.clear();\n }\n\n async removeSharedItem(key: string): Promise<void> {\n await SharedPreferencesModule.removeItem(key);\n }\n\n async removeSharedItems(key: string[]): Promise<void> {\n await SharedPreferencesModule.removeItems(key);\n }\n}\n\n// const storage = new Storage();\nexport default Storage;\n"],"mappings":"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"}
@@ -5,16 +5,18 @@ export function isEmptyOrBlank(str) {
5
5
  export function isMandatoryKeysPresent(obj, keys) {
6
6
  if (!obj) return false;
7
7
  if ((keys === null || keys === void 0 ? void 0 : keys.length) === 0) return true;
8
-
9
8
  for (let i = 0; i < keys.length; i++) {
10
9
  // @ts-ignore
11
- if ( // @ts-ignore
12
- !(keys[i] in obj) || // @ts-ignore
13
- obj[keys[i]] === null || // @ts-ignore
14
- obj[keys[i]] === undefined || // @ts-ignore
10
+ if (
11
+ // @ts-ignore
12
+ !(keys[i] in obj) ||
13
+ // @ts-ignore
14
+ obj[keys[i]] === null ||
15
+ // @ts-ignore
16
+ obj[keys[i]] === undefined ||
17
+ // @ts-ignore
15
18
  obj[keys[i]] === '') return false;
16
19
  }
17
-
18
20
  return true;
19
21
  }
20
22
  export function isTokenExpired(accessToken) {
@@ -1 +1 @@
1
- {"version":3,"names":["jwtDecode","isEmptyOrBlank","str","length","test","isMandatoryKeysPresent","obj","keys","i","undefined","isTokenExpired","accessToken","decodedData","exp","Date","now"],"sources":["utils.ts"],"sourcesContent":["import jwtDecode from 'jwt-decode';\n\nexport function isEmptyOrBlank(str: string | null | undefined) {\n return !str || str.length === 0 || /^\\s*$/.test(str);\n}\n\nexport function isMandatoryKeysPresent(obj: object, keys: string[]): boolean {\n if (!obj) return false;\n if (keys?.length === 0) return true;\n for (let i = 0; i < keys.length; i++) {\n // @ts-ignore\n if (\n // @ts-ignore\n !(keys[i] in obj) ||\n // @ts-ignore\n obj[keys[i]] === null ||\n // @ts-ignore\n obj[keys[i]] === undefined ||\n // @ts-ignore\n obj[keys[i]] === ''\n )\n return false;\n }\n return true;\n}\n\nexport function isTokenExpired(accessToken: string) {\n let decodedData: any = jwtDecode(accessToken);\n return !(decodedData && decodedData.exp * 1000 > Date.now());\n}\n"],"mappings":"AAAA,OAAOA,SAAP,MAAsB,YAAtB;AAEA,OAAO,SAASC,cAAT,CAAwBC,GAAxB,EAAwD;EAC7D,OAAO,CAACA,GAAD,IAAQA,GAAG,CAACC,MAAJ,KAAe,CAAvB,IAA4B,QAAQC,IAAR,CAAaF,GAAb,CAAnC;AACD;AAED,OAAO,SAASG,sBAAT,CAAgCC,GAAhC,EAA6CC,IAA7C,EAAsE;EAC3E,IAAI,CAACD,GAAL,EAAU,OAAO,KAAP;EACV,IAAI,CAAAC,IAAI,SAAJ,IAAAA,IAAI,WAAJ,YAAAA,IAAI,CAAEJ,MAAN,MAAiB,CAArB,EAAwB,OAAO,IAAP;;EACxB,KAAK,IAAIK,CAAC,GAAG,CAAb,EAAgBA,CAAC,GAAGD,IAAI,CAACJ,MAAzB,EAAiCK,CAAC,EAAlC,EAAsC;IACpC;IACA,KACE;IACA,EAAED,IAAI,CAACC,CAAD,CAAJ,IAAWF,GAAb,KACA;IACAA,GAAG,CAACC,IAAI,CAACC,CAAD,CAAL,CAAH,KAAiB,IAFjB,IAGA;IACAF,GAAG,CAACC,IAAI,CAACC,CAAD,CAAL,CAAH,KAAiBC,SAJjB,IAKA;IACAH,GAAG,CAACC,IAAI,CAACC,CAAD,CAAL,CAAH,KAAiB,EARnB,EAUE,OAAO,KAAP;EACH;;EACD,OAAO,IAAP;AACD;AAED,OAAO,SAASE,cAAT,CAAwBC,WAAxB,EAA6C;EAClD,IAAIC,WAAgB,GAAGZ,SAAS,CAACW,WAAD,CAAhC;EACA,OAAO,EAAEC,WAAW,IAAIA,WAAW,CAACC,GAAZ,GAAkB,IAAlB,GAAyBC,IAAI,CAACC,GAAL,EAA1C,CAAP;AACD"}
1
+ {"version":3,"names":["jwtDecode","isEmptyOrBlank","str","length","test","isMandatoryKeysPresent","obj","keys","i","undefined","isTokenExpired","accessToken","decodedData","exp","Date","now"],"sources":["utils.ts"],"sourcesContent":["import jwtDecode from 'jwt-decode';\n\nexport function isEmptyOrBlank(str: string | null | undefined) {\n return !str || str.length === 0 || /^\\s*$/.test(str);\n}\n\nexport function isMandatoryKeysPresent(obj: object, keys: string[]): boolean {\n if (!obj) return false;\n if (keys?.length === 0) return true;\n for (let i = 0; i < keys.length; i++) {\n // @ts-ignore\n if (\n // @ts-ignore\n !(keys[i] in obj) ||\n // @ts-ignore\n obj[keys[i]] === null ||\n // @ts-ignore\n obj[keys[i]] === undefined ||\n // @ts-ignore\n obj[keys[i]] === ''\n )\n return false;\n }\n return true;\n}\n\nexport function isTokenExpired(accessToken: string) {\n let decodedData: any = jwtDecode(accessToken);\n return !(decodedData && decodedData.exp * 1000 > Date.now());\n}\n"],"mappings":"AAAA,OAAOA,SAAS,MAAM,YAAY;AAElC,OAAO,SAASC,cAAcA,CAACC,GAA8B,EAAE;EAC7D,OAAO,CAACA,GAAG,IAAIA,GAAG,CAACC,MAAM,KAAK,CAAC,IAAI,OAAO,CAACC,IAAI,CAACF,GAAG,CAAC;AACtD;AAEA,OAAO,SAASG,sBAAsBA,CAACC,GAAW,EAAEC,IAAc,EAAW;EAC3E,IAAI,CAACD,GAAG,EAAE,OAAO,KAAK;EACtB,IAAI,CAAAC,IAAI,aAAJA,IAAI,uBAAJA,IAAI,CAAEJ,MAAM,MAAK,CAAC,EAAE,OAAO,IAAI;EACnC,KAAK,IAAIK,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGD,IAAI,CAACJ,MAAM,EAAEK,CAAC,EAAE,EAAE;IACpC;IACA;IACE;IACA,EAAED,IAAI,CAACC,CAAC,CAAC,IAAIF,GAAG,CAAC;IACjB;IACAA,GAAG,CAACC,IAAI,CAACC,CAAC,CAAC,CAAC,KAAK,IAAI;IACrB;IACAF,GAAG,CAACC,IAAI,CAACC,CAAC,CAAC,CAAC,KAAKC,SAAS;IAC1B;IACAH,GAAG,CAACC,IAAI,CAACC,CAAC,CAAC,CAAC,KAAK,EAAE,EAEnB,OAAO,KAAK;EAChB;EACA,OAAO,IAAI;AACb;AAEA,OAAO,SAASE,cAAcA,CAACC,WAAmB,EAAE;EAClD,IAAIC,WAAgB,GAAGZ,SAAS,CAACW,WAAW,CAAC;EAC7C,OAAO,EAAEC,WAAW,IAAIA,WAAW,CAACC,GAAG,GAAG,IAAI,GAAGC,IAAI,CAACC,GAAG,CAAC,CAAC,CAAC;AAC9D"}
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
1
+ import * as React from 'react';
2
2
  declare const DispatchExecNavigator: ({ route }: {
3
3
  route: any;
4
- }) => JSX.Element;
4
+ }) => React.JSX.Element;
5
5
  export default DispatchExecNavigator;
@@ -1,5 +1,5 @@
1
1
  import type { BaseETResponse } from '../../models/execTasks/ETBaseModels';
2
- export declare type CompletedWFResponse = BaseETResponse & {
2
+ export type CompletedWFResponse = BaseETResponse & {
3
3
  /**
4
4
  * Last Event code
5
5
  */
@@ -12,7 +12,7 @@ export declare type CompletedWFResponse = BaseETResponse & {
12
12
  /**
13
13
  * Can go back
14
14
  */
15
- export declare type CanGoBack = boolean;
15
+ export type CanGoBack = boolean;
16
16
  export interface CompletedWFRequest {
17
17
  canGoBack?: CanGoBack;
18
18
  }
@@ -5,7 +5,6 @@ import SignatureET from './doodle/SignatureET';
5
5
  import CancelET from './cancellation/CancelET';
6
6
  import type { CancellationInput, CancellationOutput } from './cancellation/CancellationSchema';
7
7
  import type { SignatureInput, SignatureOutput } from './doodle/SignatureSchema';
8
- import type { ScannerInput, ScannerOutput } from './scanner/ScannerSchema';
9
8
  import DeliverET from './deliver/DeliverET';
10
9
  import type { DeliverETInput, DeliverOutput, DeliverRemarks, LineItem } from './deliver/DeliverETInput';
11
10
  import type { BaseETResponse } from '../../models/execTasks/ETBaseModels';
@@ -33,10 +32,10 @@ import CompletePaymentET from './payments/completePayment/CompletePaymentET';
33
32
  import SLDeliverET from './deliver/SLDeliverET';
34
33
  import SLPickupET from './pickup/SLPickupET';
35
34
  import SLDropCash from './dropCash/SLDropCash';
36
- import RTScan from './scanner/returns/RTScan';
37
- import ScanList from './scanner/returns/ScanList';
38
- import CScanner from './scanner/CScanner';
39
- import RTReasonSelection from './scanner/returns/RTReasonSelection';
40
35
  import HttpRequestET from './httpRequest/HttpRequestET';
41
- export type { CancellationInput, CancellationOutput, DeliverETInput, DeliverOutput, LineItem, DeliverRemarks, DisplayETInput, DisplayETOutput, SignatureInput, SignatureOutput, FormInputSchema, FormOutputSchema, CaptureOutput, CaptureInput, VerifyLocationOutput, VerifyLocationInput, CompletePaymentInput, CompletePaymentOutput, InitPaymentInput, InitPaymentOutput, ProcessPaymentInput, ProcessPaymentOutput, PickupETInput, PickupETOutput, ScannerInput, ScannerOutput, BaseETResponse, OtpInputSchema, OtpOutputSchema, CaptureTextInput, CaptureTextOutput, VerifyInput, VerifyInputResponse, DropCashInput, DropCashOutput, };
42
- export { CancelET, DeliverET, DisplayModalET, SignatureET, FormGenerator, ImageCapture, VerifyLocationET, verifyLocation, PickupET, VerifyOtpET, CaptureText, InitPaymentET, ProcessPaymentET, DropCashET, CompletePaymentET, SLDeliverET, SLPickupET, SLDropCash, RTScan, ScanList, CScanner, RTReasonSelection, HttpRequestET, };
36
+ import ScanET from './scan/ScanET';
37
+ import ValidateOTPET from './validateOTP/ValidateOTPET';
38
+ import type { ScannerInput, ScannerOutput } from './scan/ScanSchema';
39
+ import type { ValidateOTPInput, ValidateOTPOutput } from './validateOTP/ValidateOTPSchema';
40
+ export type { CancellationInput, CancellationOutput, DeliverETInput, DeliverOutput, LineItem, DeliverRemarks, DisplayETInput, DisplayETOutput, SignatureInput, SignatureOutput, FormInputSchema, FormOutputSchema, CaptureOutput, CaptureInput, VerifyLocationOutput, VerifyLocationInput, CompletePaymentInput, CompletePaymentOutput, InitPaymentInput, InitPaymentOutput, ProcessPaymentInput, ProcessPaymentOutput, PickupETInput, PickupETOutput, BaseETResponse, OtpInputSchema, OtpOutputSchema, CaptureTextInput, CaptureTextOutput, VerifyInput, VerifyInputResponse, DropCashInput, DropCashOutput, ScannerInput, ScannerOutput, ValidateOTPInput, ValidateOTPOutput, };
41
+ export { CancelET, DeliverET, DisplayModalET, SignatureET, FormGenerator, ImageCapture, VerifyLocationET, verifyLocation, PickupET, VerifyOtpET, CaptureText, InitPaymentET, ProcessPaymentET, DropCashET, CompletePaymentET, SLDeliverET, SLPickupET, SLDropCash, HttpRequestET, ScanET, ValidateOTPET, };
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import type { CancellationInput } from './CancellationSchema';
3
- declare const CancelET: (props: CancellationInput) => JSX.Element;
3
+ declare const CancelET: (props: CancellationInput) => React.JSX.Element;
4
4
  export default CancelET;
@@ -1,12 +1,17 @@
1
1
  /**
2
2
  * List of reasons for cancellation
3
3
  */
4
- import type { BaseETResponse } from '../../../models/execTasks/ETBaseModels';
5
- export declare type CancellationReasons = string[];
4
+ import type { EventsRow, ReasonsRow } from '../../../manager/syncmanager/DBConfig';
5
+ import type { ApplicableReasons, BaseETResponse } from '../../../models/execTasks/ETBaseModels';
6
+ export type CancellationReasons = string[];
6
7
  export interface CancellationInput {
7
- cancellationReasons: CancellationReasons;
8
- onSubmitET: (reason: string) => void;
8
+ cancelEvent: string;
9
+ cancellationEvents?: CancellationReasons;
10
+ cancellationReasons?: CancellationReasons;
11
+ applicableCodes?: ApplicableReasons;
12
+ eventRows?: EventsRow[];
13
+ onSubmitET: (reason: string, event?: string, reasonsRow?: ReasonsRow[]) => void;
9
14
  }
10
- export declare type CancellationOutput = BaseETResponse & {
15
+ export type CancellationOutput = BaseETResponse & {
11
16
  remark: string;
12
17
  };
@@ -2,7 +2,7 @@
2
2
  * Input data type
3
3
  */
4
4
  import type { BaseETRequest, BaseETResponse } from '../../../models/execTasks/ETBaseModels';
5
- export declare type CaptureTextOutput = BaseETResponse & {
5
+ export type CaptureTextOutput = BaseETResponse & {
6
6
  /**
7
7
  * Value entered by user
8
8
  */
@@ -19,24 +19,24 @@ export declare type CaptureTextOutput = BaseETResponse & {
19
19
  /**
20
20
  * Input data type
21
21
  */
22
- export declare type InputDataType = 'string' | 'number';
22
+ export type InputDataType = 'string' | 'number';
23
23
  /**
24
24
  * Regex to validate input strings
25
25
  */
26
- export declare type ValidationRegex = string;
26
+ export type ValidationRegex = string;
27
27
  /**
28
28
  * Title of instruction
29
29
  */
30
- export declare type Title = string;
30
+ export type Title = string;
31
31
  /**
32
32
  * Message of instruction
33
33
  */
34
- export declare type Message = string;
34
+ export type Message = string;
35
35
  /**
36
36
  * Can go back
37
37
  */
38
- export declare type CanGoBack = boolean;
39
- export declare type CaptureTextInput = BaseETRequest & {
38
+ export type CanGoBack = boolean;
39
+ export type CaptureTextInput = BaseETRequest & {
40
40
  inputType: InputDataType;
41
41
  validationRegex: ValidationRegex;
42
42
  onSubmitET: (value: CaptureTextOutput) => void;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
2
1
  import type { CaptureTextInput } from './CaptureInputSchema';
3
- declare const CaptureText: (props: CaptureTextInput) => JSX.Element;
2
+ import React from 'react';
3
+ declare const CaptureText: (props: CaptureTextInput) => React.JSX.Element;
4
4
  export default CaptureText;
@@ -0,0 +1 @@
1
+ export declare function checkForValidation(data: string, regexRule: string | undefined): Promise<boolean>;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
2
1
  import type { DeliverETInput } from './DeliverETInput';
3
- declare const DeliverET: (props: DeliverETInput) => JSX.Element;
2
+ import React from 'react';
3
+ declare const DeliverET: (props: DeliverETInput) => React.JSX.Element;
4
4
  export default DeliverET;
@@ -2,19 +2,19 @@
2
2
  * Unique identifier for the item
3
3
  */
4
4
  import type { BaseETRequest, BaseETResponse } from '../../../models/execTasks/ETBaseModels';
5
- export declare type SKU = string;
5
+ export type SKU = string;
6
6
  /**
7
7
  * Description of item
8
8
  */
9
- export declare type ProductDescription = string;
9
+ export type ProductDescription = string;
10
10
  /**
11
11
  * Count of items
12
12
  */
13
- export declare type ItemCount = number;
13
+ export type ItemCount = number;
14
14
  /**
15
15
  * Items to be delivered
16
16
  */
17
- export declare type LineItem = {
17
+ export type LineItem = {
18
18
  skuId: SKU;
19
19
  productDescription?: ProductDescription;
20
20
  count?: ItemCount;
@@ -22,19 +22,20 @@ export declare type LineItem = {
22
22
  /**
23
23
  * Any manual instruction to display for the Operator to work on
24
24
  */
25
- export declare type Instruction = string;
25
+ export type Instruction = string;
26
26
  export interface DeliverRemarks {
27
27
  remark: string;
28
28
  success: boolean;
29
29
  }
30
- export declare type DeliverETInput = BaseETRequest & {
30
+ export type DeliverETInput = BaseETRequest & {
31
31
  items: LineItem[];
32
32
  confirmCustodyExchange?: boolean;
33
33
  confirmShipments?: boolean;
34
34
  onSubmitET(response: DeliverOutput): void;
35
35
  returnPackageCount?: number;
36
+ restrictCancel?: boolean;
36
37
  };
37
- export declare type DeliverOutput = BaseETResponse & {
38
+ export type DeliverOutput = BaseETResponse & {
38
39
  /**
39
40
  * Remark captured at time of delivery
40
41
  */
@@ -1,8 +1,8 @@
1
- /// <reference types="react" />
2
1
  import type { DeliverETInput } from './DeliverETInput';
2
+ import React from 'react';
3
3
  import type { LineItem } from '../deliver/DeliverETInput';
4
4
  export declare const renderItem: ({ item }: {
5
5
  item: LineItem;
6
- }) => JSX.Element;
7
- declare const DeliverET: (props: DeliverETInput) => JSX.Element;
6
+ }) => React.JSX.Element;
7
+ declare const DeliverET: (props: DeliverETInput) => React.JSX.Element;
8
8
  export default DeliverET;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
2
1
  import type { DisplayETInput } from './DisplaySchema';
3
- declare const DisplayModalET: (etProps: DisplayETInput) => JSX.Element;
2
+ import React from 'react';
3
+ declare const DisplayModalET: (props: DisplayETInput) => React.JSX.Element;
4
4
  export default DisplayModalET;
@@ -2,16 +2,16 @@ import type { BaseETRequest, BaseETResponse } from '../../../models/execTasks/ET
2
2
  /**
3
3
  * Type of display
4
4
  */
5
- export declare type DisplayType = 'ALERT' | 'WARNING' | 'MESSAGE';
5
+ export type DisplayType = 'ALERT' | 'WARNING' | 'MESSAGE';
6
6
  /**
7
7
  * Text to be displayed
8
8
  */
9
- export declare type DisplayText = string;
9
+ export type DisplayText = string;
10
10
  /**
11
11
  * Url of image to be displayed
12
12
  */
13
- export declare type DisplayImageURL = string;
14
- export declare type DisplayETInput = BaseETRequest & {
13
+ export type DisplayImageURL = string;
14
+ export type DisplayETInput = BaseETRequest & {
15
15
  showDialog: boolean;
16
16
  displayType: DisplayType;
17
17
  text?: DisplayText;
@@ -20,4 +20,4 @@ export declare type DisplayETInput = BaseETRequest & {
20
20
  negativeBtn?: string;
21
21
  onSubmit: (displayOutput: DisplayETOutput) => void;
22
22
  };
23
- export declare type DisplayETOutput = BaseETResponse;
23
+ export type DisplayETOutput = BaseETResponse;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import type { SignatureInput } from './SignatureSchema';
3
- declare const SignatureET: (props: SignatureInput) => JSX.Element;
3
+ declare const SignatureET: (props: SignatureInput) => React.JSX.Element;
4
4
  export default SignatureET;