@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
@@ -0,0 +1,53 @@
1
+ import { StyleSheet, Pressable, Keyboard } from 'react-native';
2
+ import React, { useEffect } from 'react';
3
+ import SplitTextInput from '../../../widgets/SplitTextInput';
4
+ import { Fonts } from '../../../../styles/executionTasks/CommonStyles';
5
+ import { InputType } from '../ValidateOTPSchema';
6
+ import { INVALID_REGEX } from '../constants';
7
+ const OTPInput = props => {
8
+ const maximumCodeLength = props.input.length;
9
+ const keyboardType = props.input.inputType === InputType.NUMBER ? 'number-pad' : 'default';
10
+ useEffect(() => {
11
+ if (props.input.validationRegex && props.otpCode.length === maximumCodeLength) {
12
+ const regex = new RegExp(props.input.validationRegex);
13
+ const hasError = !regex.test(props.otpCode);
14
+ props.setHasError(hasError);
15
+ if (hasError) props.setErrorMessage(INVALID_REGEX);else props.setErrorMessage('');
16
+ }
17
+ }, [props.otpCode]);
18
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Pressable, {
19
+ onPress: Keyboard.dismiss
20
+ }, /*#__PURE__*/React.createElement(SplitTextInput, {
21
+ styles: styles.text,
22
+ value: props.otpCode,
23
+ onChange: text => {
24
+ if (props.input.validationRegex) {}
25
+ if (props.hasError) {
26
+ props.setErrorMessage('');
27
+ props.setHasError(false);
28
+ }
29
+ props.setOTPCode(text);
30
+ },
31
+ maxLength: maximumCodeLength,
32
+ keyboardType: keyboardType,
33
+ hasError: props.hasError
34
+ })));
35
+ };
36
+ export default OTPInput;
37
+ const styles = StyleSheet.create({
38
+ text: {
39
+ fontFamily: Fonts.IBMPlexSans_400Regular,
40
+ color: '#3D445C',
41
+ fontSize: 20,
42
+ textAlign: 'center'
43
+ },
44
+ errorMessage: {
45
+ marginTop: 16,
46
+ marginHorizontal: 10,
47
+ color: '#DC2626',
48
+ fontFamily: Fonts.IBMPlexSans_400Regular,
49
+ fontSize: 12,
50
+ lineHeight: 16
51
+ }
52
+ });
53
+ //# sourceMappingURL=OTPInput.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["StyleSheet","Pressable","Keyboard","React","useEffect","SplitTextInput","Fonts","InputType","INVALID_REGEX","OTPInput","props","maximumCodeLength","input","length","keyboardType","inputType","NUMBER","validationRegex","otpCode","regex","RegExp","hasError","test","setHasError","setErrorMessage","createElement","Fragment","onPress","dismiss","styles","text","value","onChange","setOTPCode","maxLength","create","fontFamily","IBMPlexSans_400Regular","color","fontSize","textAlign","errorMessage","marginTop","marginHorizontal","lineHeight"],"sources":["OTPInput.tsx"],"sourcesContent":["import { StyleSheet, Pressable, Keyboard } from 'react-native';\nimport React, { useEffect } from 'react';\nimport SplitTextInput from '../../../widgets/SplitTextInput';\nimport { Fonts } from '../../../../styles/executionTasks/CommonStyles';\nimport { InputType, CaptureInput } from '../ValidateOTPSchema';\nimport { INVALID_REGEX } from '../constants';\n\nexport interface OTPInputProps {\n input: CaptureInput;\n otpCode: string;\n setOTPCode: (otpCode: string) => void;\n hasError: boolean;\n setHasError: (hasError: boolean) => void;\n setErrorMessage: (errorMessage: string) => void;\n}\n\nconst OTPInput = (props: OTPInputProps) => {\n const maximumCodeLength = props.input.length;\n const keyboardType =\n props.input.inputType === InputType.NUMBER ? 'number-pad' : 'default';\n\n useEffect(() => {\n if (\n props.input.validationRegex &&\n props.otpCode.length === maximumCodeLength\n ) {\n const regex = new RegExp(props.input.validationRegex);\n const hasError = !regex.test(props.otpCode);\n\n props.setHasError(hasError);\n if (hasError) props.setErrorMessage(INVALID_REGEX);\n else props.setErrorMessage('');\n }\n }, [props.otpCode]);\n\n return (\n <>\n <Pressable onPress={Keyboard.dismiss}>\n <SplitTextInput\n styles={styles.text}\n value={props.otpCode}\n onChange={(text) => {\n if (props.input.validationRegex) {\n }\n if (props.hasError) {\n props.setErrorMessage('');\n props.setHasError(false);\n }\n props.setOTPCode(text);\n }}\n maxLength={maximumCodeLength}\n keyboardType={keyboardType}\n hasError={props.hasError}\n />\n </Pressable>\n </>\n );\n};\n\nexport default OTPInput;\n\nconst styles = StyleSheet.create({\n text: {\n fontFamily: Fonts.IBMPlexSans_400Regular,\n color: '#3D445C',\n fontSize: 20,\n textAlign: 'center',\n },\n errorMessage: {\n marginTop: 16,\n marginHorizontal: 10,\n color: '#DC2626',\n fontFamily: Fonts.IBMPlexSans_400Regular,\n fontSize: 12,\n lineHeight: 16,\n },\n});\n"],"mappings":"AAAA,SAASA,UAAU,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,cAAc;AAC9D,OAAOC,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,OAAOC,cAAc,MAAM,iCAAiC;AAC5D,SAASC,KAAK,QAAQ,gDAAgD;AACtE,SAASC,SAAS,QAAsB,sBAAsB;AAC9D,SAASC,aAAa,QAAQ,cAAc;AAW5C,MAAMC,QAAQ,GAAIC,KAAoB,IAAK;EACzC,MAAMC,iBAAiB,GAAGD,KAAK,CAACE,KAAK,CAACC,MAAM;EAC5C,MAAMC,YAAY,GAChBJ,KAAK,CAACE,KAAK,CAACG,SAAS,KAAKR,SAAS,CAACS,MAAM,GAAG,YAAY,GAAG,SAAS;EAEvEZ,SAAS,CAAC,MAAM;IACd,IACEM,KAAK,CAACE,KAAK,CAACK,eAAe,IAC3BP,KAAK,CAACQ,OAAO,CAACL,MAAM,KAAKF,iBAAiB,EAC1C;MACA,MAAMQ,KAAK,GAAG,IAAIC,MAAM,CAACV,KAAK,CAACE,KAAK,CAACK,eAAe,CAAC;MACrD,MAAMI,QAAQ,GAAG,CAACF,KAAK,CAACG,IAAI,CAACZ,KAAK,CAACQ,OAAO,CAAC;MAE3CR,KAAK,CAACa,WAAW,CAACF,QAAQ,CAAC;MA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EAAE,EAAE;IACZK,UAAU,EAAE;EACd;AACF,CAAC,CAAC"}
@@ -0,0 +1,133 @@
1
+ import * as jsonLogic from 'json-logic-js';
2
+ import { JSONPath } from 'jsonpath-plus';
3
+ import Logger, { LOG_TYPE } from '../../../utils/Logger';
4
+ import { getApiResponse } from '../../../utils/ApiUtils';
5
+ import { DEFAULT_RETRY_CONFIG } from './constants';
6
+ const isDyanmicValue = function (input) {
7
+ if (input.charAt(0) === '{' && input.charAt(1) === '{' && input.charAt(input.length - 1) === '}' && input.charAt(input.length - 2) === '}') return true;else return false;
8
+ };
9
+ export function parseBody(body, userInput) {
10
+ const requestBody = JSON.parse(JSON.stringify(body));
11
+ for (const key in requestBody) {
12
+ if (Object.prototype.hasOwnProperty.call(requestBody, key)) {
13
+ const value = requestBody[key];
14
+ if (typeof value === 'object') {
15
+ requestBody[key] = parseBody(value, userInput);
16
+ } else if (Array.isArray(value)) {
17
+ value.forEach(val => {
18
+ requestBody[key] = parseBody(val, userInput);
19
+ });
20
+ } else {
21
+ if (typeof value === 'string' && isDyanmicValue(value) && value.includes('userInput')) {
22
+ if (value.includes('captureInput')) requestBody[key] = userInput.captureInput;
23
+ }
24
+ }
25
+ }
26
+ }
27
+ return requestBody;
28
+ }
29
+ export function parseKeyValue(array, userInput) {
30
+ array.forEach(item => {
31
+ if (isDyanmicValue(item.value) && item.value.includes('userInput')) {
32
+ if (item.value.includes('captureInput')) item.value = userInput.captureInput;
33
+ }
34
+ });
35
+ return array;
36
+ }
37
+ export const generateOTP = async api => {
38
+ // TESTING
39
+ try {
40
+ const apiData = {
41
+ errorJsonPath: '',
42
+ responseJsonPath: '',
43
+ uri: api.uri,
44
+ httpMethod: api.httpMethod,
45
+ timeout: api.timeout,
46
+ headers: api.headers
47
+ };
48
+ if (api.requestBody) {
49
+ apiData.requestBody = api.requestBody;
50
+ }
51
+ if (api.pathParams) {
52
+ apiData.pathParams = api.pathParams;
53
+ }
54
+ if (api.queryParams) {
55
+ apiData.queryParams = api.queryParams;
56
+ }
57
+ const apiResponse = await getApiResponse(apiData);
58
+ return jsonLogic.apply(api.responseJsonLogic, apiResponse.data);
59
+ } catch (error) {
60
+ Logger.getInstance().logEvent('~ generateOTP', error.message, LOG_TYPE.SDK_ERROR);
61
+ return false;
62
+ }
63
+ };
64
+ export const checkForValidation = async (otp, validation, userInput) => {
65
+ // API
66
+ if (validation.selectedIndex === 0) {
67
+ const otpValue = JSONPath({
68
+ path: '$.userInput.captureInput',
69
+ json: userInput
70
+ })[0];
71
+ try {
72
+ //@ts-ignore
73
+ const api = validation.logic.api;
74
+ const apiData = {
75
+ errorJsonPath: '',
76
+ responseJsonPath: '',
77
+ uri: api.uri,
78
+ httpMethod: api.httpMethod,
79
+ timeout: api.timeout,
80
+ headers: api.headers
81
+ };
82
+ if (api.requestBody) {
83
+ const parsedRequestBody = parseBody(api.requestBody, {
84
+ captureInput: otpValue
85
+ });
86
+ apiData.requestBody = parsedRequestBody;
87
+ }
88
+ if (api.pathParams) {
89
+ parseKeyValue(api.pathParams, {
90
+ captureInput: otpValue
91
+ });
92
+ apiData.pathParams = api.pathParams;
93
+ }
94
+ if (api.queryParams) {
95
+ parseKeyValue(api.queryParams, {
96
+ captureInput: otpValue
97
+ });
98
+ apiData.queryParams = api.queryParams;
99
+ }
100
+ const apiResponse = await getApiResponse(apiData);
101
+ return jsonLogic.apply(api.responseJsonLogic, apiResponse.data);
102
+ } catch (error) {
103
+ Logger.getInstance().logEvent('~ checkForValidation', error.message, LOG_TYPE.SDK_ERROR);
104
+ return false;
105
+ }
106
+ }
107
+ // Exact Value
108
+ else if (validation.selectedIndex === 1) {
109
+ // @ts-ignore
110
+ const value = validation.logic.value;
111
+ return value == otp;
112
+ }
113
+ // Invalid input received
114
+ else {
115
+ return false;
116
+ }
117
+ };
118
+ export const parseRetryConfig = inputRetryConfig => {
119
+ const retryConfig = DEFAULT_RETRY_CONFIG;
120
+ if (inputRetryConfig) {
121
+ if (inputRetryConfig.buttonTitle) {
122
+ retryConfig.buttonTitle = inputRetryConfig.buttonTitle;
123
+ }
124
+ if (inputRetryConfig.delay) {
125
+ retryConfig.delay = inputRetryConfig.delay;
126
+ }
127
+ if (inputRetryConfig.maxAttempt) {
128
+ retryConfig.maxAttempt = inputRetryConfig.maxAttempt;
129
+ }
130
+ }
131
+ return retryConfig;
132
+ };
133
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["jsonLogic","JSONPath","Logger","LOG_TYPE","getApiResponse","DEFAULT_RETRY_CONFIG","isDyanmicValue","input","charAt","length","parseBody","body","userInput","requestBody","JSON","parse","stringify","key","Object","prototype","hasOwnProperty","call","value","Array","isArray","forEach","val","includes","captureInput","parseKeyValue","array","item","generateOTP","api","apiData","errorJsonPath","responseJsonPath","uri","httpMethod","timeout","headers","pathParams","queryParams","apiResponse","apply","responseJsonLogic","data","error","getInstance","logEvent","message","SDK_ERROR","checkForValidation","otp","validation","selectedIndex","otpValue","path","json","logic","parsedRequestBody","parseRetryConfig","inputRetryConfig","retryConfig","buttonTitle","delay","maxAttempt"],"sources":["utils.ts"],"sourcesContent":["import * as jsonLogic from 'json-logic-js';\nimport { JSONPath } from 'jsonpath-plus';\nimport Logger, { LOG_TYPE } from '../../../utils/Logger';\nimport {\n APIData,\n getApiResponse,\n KeyValueArray,\n} from '../../../utils/ApiUtils';\nimport { DEFAULT_RETRY_CONFIG } from './constants';\nimport type {\n API,\n InputType,\n Validation,\n RetryConfig,\n} from './ValidateOTPSchema';\n\nconst isDyanmicValue = function (input: string) {\n if (\n input.charAt(0) === '{' &&\n input.charAt(1) === '{' &&\n input.charAt(input.length - 1) === '}' &&\n input.charAt(input.length - 2) === '}'\n )\n return true;\n else return false;\n};\n\nexport function parseBody(body: any, userInput: any) {\n const requestBody = JSON.parse(JSON.stringify(body));\n for (const key in requestBody) {\n if (Object.prototype.hasOwnProperty.call(requestBody, key)) {\n const value = requestBody[key];\n if (typeof value === 'object') {\n requestBody[key] = parseBody(value, userInput);\n } else if (Array.isArray(value)) {\n value.forEach((val) => {\n requestBody[key] = parseBody(val, userInput);\n });\n } else {\n if (\n typeof value === 'string' &&\n isDyanmicValue(value) &&\n value.includes('userInput')\n ) {\n if (value.includes('captureInput'))\n requestBody[key] = userInput.captureInput;\n }\n }\n }\n }\n return requestBody;\n}\n\nexport function parseKeyValue(array: KeyValueArray[], userInput: any) {\n array.forEach((item) => {\n if (isDyanmicValue(item.value) && item.value.includes('userInput')) {\n if (item.value.includes('captureInput'))\n item.value = userInput.captureInput;\n }\n });\n return array;\n}\n\nexport const generateOTP = async (api: API) => {\n // TESTING\n try {\n const apiData: APIData = {\n errorJsonPath: '',\n responseJsonPath: '',\n uri: api.uri,\n httpMethod: api.httpMethod,\n timeout: api.timeout,\n headers: api.headers,\n };\n if (api.requestBody) {\n apiData.requestBody = api.requestBody;\n }\n if (api.pathParams) {\n apiData.pathParams = api.pathParams;\n }\n if (api.queryParams) {\n apiData.queryParams = api.queryParams;\n }\n\n const apiResponse = await getApiResponse(apiData);\n\n return jsonLogic.apply(\n <jsonLogic.RulesLogic>api.responseJsonLogic,\n apiResponse.data\n );\n } catch (error: any) {\n Logger.getInstance().logEvent(\n '~ generateOTP',\n error.message,\n LOG_TYPE.SDK_ERROR\n );\n return false;\n }\n};\n\nexport const checkForValidation = async (\n otp: string,\n validation: Validation,\n userInput: any\n): Promise<boolean> => {\n // API\n if (validation.selectedIndex === 0) {\n const otpValue = JSONPath({\n path: '$.userInput.captureInput',\n json: userInput,\n })[0];\n\n try {\n //@ts-ignore\n const api: API = validation.logic.api;\n const apiData: APIData = {\n errorJsonPath: '',\n responseJsonPath: '',\n uri: api.uri,\n httpMethod: api.httpMethod,\n timeout: api.timeout,\n headers: api.headers,\n };\n if (api.requestBody) {\n const parsedRequestBody = parseBody(api.requestBody, {\n captureInput: otpValue,\n });\n apiData.requestBody = parsedRequestBody;\n }\n if (api.pathParams) {\n parseKeyValue(api.pathParams, { captureInput: otpValue });\n apiData.pathParams = api.pathParams;\n }\n if (api.queryParams) {\n parseKeyValue(api.queryParams, { captureInput: otpValue });\n apiData.queryParams = api.queryParams;\n }\n const apiResponse = await getApiResponse(apiData);\n return jsonLogic.apply(\n <jsonLogic.RulesLogic>api.responseJsonLogic,\n apiResponse.data\n );\n } catch (error: any) {\n Logger.getInstance().logEvent(\n '~ checkForValidation',\n error.message,\n LOG_TYPE.SDK_ERROR\n );\n return false;\n }\n }\n // Exact Value\n else if (validation.selectedIndex === 1) {\n // @ts-ignore\n const value: InputType = validation.logic.value;\n return value == otp;\n }\n // Invalid input received\n else {\n return false;\n }\n};\n\nexport const parseRetryConfig = (\n inputRetryConfig: RetryConfig | undefined\n): RetryConfig => {\n const retryConfig: RetryConfig = DEFAULT_RETRY_CONFIG;\n if (inputRetryConfig) {\n if (inputRetryConfig.buttonTitle) {\n retryConfig.buttonTitle = inputRetryConfig.buttonTitle;\n }\n if (inputRetryConfig.delay) {\n retryConfig.delay = inputRetryConfig.delay;\n }\n if (inputRetryConfig.maxAttempt) {\n retryConfig.maxAttempt = inputRetryConfig.maxAttempt;\n }\n }\n return retryConfig;\n};\n"],"mappings":"AAAA,OAAO,KAAKA,SAAS,MAAM,eAAe;AAC1C,SAASC,QAAQ,QAAQ,eAAe;AACxC,OAAOC,MAAM,IAAIC,QAAQ,QAAQ,uBAAuB;AACxD,SAEEC,cAAc,QAET,yBAAyB;AAChC,SAASC,oBAAoB,QAAQ,aAAa;AAQlD,MAAMC,cAAc,GAAG,SAAAA,CAAUC,KAAa,EAAE;EAC9C,IACEA,KAAK,CAACC,MAAM,CAAC,CAAC,CAAC,KAAK,GAAG,IACvBD,KAAK,CAACC,MAAM,CAAC,CAAC,CAAC,KAAK,GAAG,IACvBD,KAAK,CAACC,MAAM,CAACD,KAAK,CAACE,MAAM,GAAG,CAAC,CAAC,KAAK,GAAG,IACtCF,KAAK,CAACC,MAAM,CAACD,KAAK,CAACE,MAAM,GAAG,CAAC,CAAC,KAAK,GAAG,EAEtC,OAAO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,CAACC,QAAQ,CAC3B,sBAAsB,EACtBF,KAAK,CAACG,OAAO,EACb/C,QAAQ,CAACgD,SACX,CAAC;MACD,OAAO,KAAK;IACd;EACF;EACA;EAAA,KACK,IAAIG,UAAU,CAACC,aAAa,KAAK,CAAC,EAAE;IACvC;IACA,MAAMjC,KAAgB,GAAGgC,UAAU,CAACK,KAAK,CAACrC,KAAK;IAC/C,OAAOA,KAAK,IAAI+B,GAAG;EACrB;EACA;EAAA,KACK;IACH,OAAO,KAAK;EACd;AACF,CAAC;AAED,OAAO,MAAMQ,gBAAgB,GAC3BC,gBAAyC,IACzB;EAChB,MAAMC,WAAwB,GAAG1D,oBAAoB;EACrD,IAAIyD,gBAAgB,EAAE;IACpB,IAAIA,gBAAgB,CAACE,WAAW,EAAE;MAChCD,WAAW,CAACC,WAAW,GAAGF,gBAAgB,CAACE,WAAW;IACxD;IACA,IAAIF,gBAAgB,CAACG,KAAK,EAAE;MAC1BF,WAAW,CAACE,KAAK,GAAGH,gBAAgB,CAACG,KAAK;IAC5C;IACA,IAAIH,gBAAgB,CAACI,UAAU,EAAE;MAC/BH,WAAW,CAACG,UAAU,GAAGJ,gBAAgB,CAACI,UAAU;IACtD;EACF;EACA,OAAOH,WAAW;AACpB,CAAC"}
@@ -6,24 +6,20 @@ export async function verifyLocation(params) {
6
6
  status
7
7
  } = await Location.getForegroundPermissionsAsync();
8
8
  let response;
9
-
10
9
  if (status === 'granted') {
11
10
  response = await geofenceLogic(params);
12
11
  } else {
13
12
  const {
14
13
  status
15
14
  } = await Location.requestForegroundPermissionsAsync();
16
-
17
15
  if (status === 'granted') {
18
16
  response = await geofenceLogic(params);
19
17
  } else {
20
18
  throw new BaseError(ErrorCodes.LOCATION_PERMISSION_DENIED, 'Location Permission denied');
21
19
  }
22
20
  }
23
-
24
21
  return response;
25
22
  }
26
-
27
23
  async function geofenceLogic(params) {
28
24
  const options = {
29
25
  accuracy: Location.Accuracy.Highest
@@ -37,11 +33,9 @@ async function geofenceLogic(params) {
37
33
  const theta = longitude - location.coords.longitude;
38
34
  const radtheta = Math.PI * theta / 180;
39
35
  let dist = Math.sin(radlat1) * Math.sin(radlat2) + Math.cos(radlat1) * Math.cos(radlat2) * Math.cos(radtheta);
40
-
41
36
  if (dist > 1) {
42
37
  dist = 1;
43
38
  }
44
-
45
39
  const multiplier = 180 * 60 * 1.1515 * 1.609344 * 1000 / Math.PI;
46
40
  dist = Math.acos(dist) * multiplier;
47
41
  return params.geolocation.geofencing.radius >= dist;
@@ -1 +1 @@
1
- {"version":3,"names":["Location","BaseError","ErrorCodes","verifyLocation","params","status","getForegroundPermissionsAsync","response","geofenceLogic","requestForegroundPermissionsAsync","LOCATION_PERMISSION_DENIED","options","accuracy","Accuracy","Highest","location","getCurrentPositionAsync","geolocation","coords","latitude","longitude","radlat1","Math","PI","radlat2","theta","radtheta","dist","sin","cos","multiplier","acos","geofencing","radius"],"sources":["GeofenceUtils.ts"],"sourcesContent":["import type { VerifyLocationInput } from './VerifyLocSchema';\nimport * as Location from 'expo-location';\nimport { BaseError } from '../../../errors/BaseError';\nimport ErrorCodes from '../../../errors/ErrorCodes';\n\nexport async function verifyLocation(\n params: VerifyLocationInput\n): Promise<boolean> {\n const { status } = await Location.getForegroundPermissionsAsync();\n let response: boolean;\n if (status === 'granted') {\n response = await geofenceLogic(params);\n } else {\n const { status } = await Location.requestForegroundPermissionsAsync();\n if (status === 'granted') {\n response = await geofenceLogic(params);\n } else {\n throw new BaseError(\n ErrorCodes.LOCATION_PERMISSION_DENIED,\n 'Location Permission denied'\n );\n }\n }\n return response;\n}\n\nasync function geofenceLogic(params: VerifyLocationInput): Promise<boolean> {\n const options = {\n accuracy: Location.Accuracy.Highest,\n };\n const location = await Location.getCurrentPositionAsync(options);\n if (\n params.geolocation.accuracy &&\n location.coords.accuracy &&\n params.geolocation.accuracy < location.coords.accuracy\n )\n return false;\n else {\n const latitude: number = +params.geolocation.latitude;\n const longitude: number = +params.geolocation.longitude;\n const radlat1 = (Math.PI * latitude) / 180;\n const radlat2 = (Math.PI * location.coords.latitude) / 180;\n const theta = longitude - location.coords.longitude;\n const radtheta = (Math.PI * theta) / 180;\n let dist =\n Math.sin(radlat1) * Math.sin(radlat2) +\n Math.cos(radlat1) * Math.cos(radlat2) * Math.cos(radtheta);\n if (dist > 1) {\n dist = 1;\n }\n const multiplier = (180 * 60 * 1.1515 * 1.609344 * 1000) / Math.PI;\n dist = Math.acos(dist) * multiplier;\n return params.geolocation.geofencing.radius >= dist;\n }\n}\n"],"mappings":"AACA,OAAO,KAAKA,QAAZ,MAA0B,eAA1B;AACA,SAASC,SAAT,QAA0B,2BAA1B;AACA,OAAOC,UAAP,MAAuB,4BAAvB;AAEA,OAAO,eAAeC,cAAf,CACLC,MADK,EAEa;EAClB,MAAM;IAAEC;EAAF,IAAa,MAAML,QAAQ,CAACM,6BAAT,EAAzB;EACA,IAAIC,QAAJ;;EACA,IAAIF,MAAM,KAAK,SAAf,EAA0B;IACxBE,QAAQ,GAAG,MAAMC,aAAa,CAACJ,MAAD,CAA9B;EACD,CAFD,MAEO;IACL,MAAM;MAAEC;IAAF,IAAa,MAAML,QAAQ,CAACS,iCAAT,EAAzB;;IACA,IAAIJ,MAAM,KAAK,SAAf,EAA0B;MACxBE,QAAQ,GAAG,MAAMC,aAAa,CAACJ,MAAD,CAA9B;IACD,CAFD,MAEO;MACL,MAAM,IAAIH,SAAJ,CACJC,UAAU,CAACQ,0BADP,EAEJ,4BAFI,CAAN;IAID;EACF;;EACD,OAAOH,QAAP;AACD;;AAED,eAAeC,aAAf,CAA6BJ,MAA7B,EAA4E;EAC1E,MAAMO,OAAO,GAAG;IACdC,QAAQ,EAAEZ,QAAQ,CAACa,QAAT,CAAkBC;EADd,CAAhB;EAGA,MAAMC,QAAQ,GAAG,MAAMf,QAAQ,CAACgB,uBAAT,CAAiCL,OAAjC,CAAvB;EACA,IACEP,MAAM,CAACa,WAAP,CAAmBL,QAAnB,IACAG,QAAQ,CAACG,MAAT,CAAgBN,QADhB,IAEAR,MAAM,CAACa,WAAP,CAAmBL,QAAnB,GAA8BG,QAAQ,CAACG,MAAT,CAAgBN,QAHhD,EAKE,OAAO,KAAP,CALF,KAMK;IACH,MAAMO,QAAgB,GAAG,CAACf,MAAM,CAACa,WAAP,CAAmBE,QAA7C;IACA,MAAMC,SAAiB,GAAG,CAAChB,MAAM,CAACa,WAAP,CAAmBG,SAA9C;IACA,MAAMC,OAAO,GAAIC,IAAI,CAACC,EAAL,GAAUJ,QAAX,GAAuB,GAAvC;IACA,MAAMK,OAAO,GAAIF,IAAI,CAACC,EAAL,GAAUR,QAAQ,CAACG,MAAT,CAAgBC,QAA3B,GAAuC,GAAvD;IACA,MAAMM,KAAK,GAAGL,SAAS,GAAGL,QAAQ,CAACG,MAAT,CAAgBE,SAA1C;IACA,MAAMM,QAAQ,GAAIJ,IAAI,CAACC,EAAL,GAAUE,KAAX,GAAoB,GAArC;IACA,IAAIE,IAAI,GACNL,IAAI,CAACM,GAAL,CAASP,OAAT,IAAoBC,IAAI,CAACM,GAAL,CAASJ,OAAT,CAApB,GACAF,IAAI,CAACO,GAAL,CAASR,OAAT,IAAoBC,IAAI,CAACO,GAAL,CAASL,OAAT,CAApB,GAAwCF,IAAI,CAACO,GAAL,CAASH,QAAT,CAF1C;;IAGA,IAAIC,IAAI,GAAG,CAAX,EAAc;MACZA,IAAI,GAAG,CAAP;IACD;;IACD,MAAMG,UAAU,GAAI,MAAM,EAAN,GAAW,MAAX,GAAoB,QAApB,GAA+B,IAAhC,GAAwCR,IAAI,CAACC,EAAhE;IACAI,IAAI,GAAGL,IAAI,CAACS,IAAL,CAAUJ,IAAV,IAAkBG,UAAzB;IACA,OAAO1B,MAAM,CAACa,WAAP,CAAmBe,UAAnB,CAA8BC,MAA9B,IAAwCN,IAA/C;EACD;AACF"}
1
+ {"version":3,"names":["Location","BaseError","ErrorCodes","verifyLocation","params","status","getForegroundPermissionsAsync","response","geofenceLogic","requestForegroundPermissionsAsync","LOCATION_PERMISSION_DENIED","options","accuracy","Accuracy","Highest","location","getCurrentPositionAsync","geolocation","coords","latitude","longitude","radlat1","Math","PI","radlat2","theta","radtheta","dist","sin","cos","multiplier","acos","geofencing","radius"],"sources":["GeofenceUtils.ts"],"sourcesContent":["import type { VerifyLocationInput } from './VerifyLocSchema';\nimport * as Location from 'expo-location';\nimport { BaseError } from '../../../errors/BaseError';\nimport ErrorCodes from '../../../errors/ErrorCodes';\n\nexport async function verifyLocation(\n params: VerifyLocationInput\n): Promise<boolean> {\n const { status } = await Location.getForegroundPermissionsAsync();\n let response: boolean;\n if (status === 'granted') {\n response = await geofenceLogic(params);\n } else {\n const { status } = await Location.requestForegroundPermissionsAsync();\n if (status === 'granted') {\n response = await geofenceLogic(params);\n } else {\n throw new BaseError(\n ErrorCodes.LOCATION_PERMISSION_DENIED,\n 'Location Permission denied'\n );\n }\n }\n return response;\n}\n\nasync function geofenceLogic(params: VerifyLocationInput): Promise<boolean> {\n const options = {\n accuracy: Location.Accuracy.Highest,\n };\n const location = await Location.getCurrentPositionAsync(options);\n if (\n params.geolocation.accuracy &&\n location.coords.accuracy &&\n params.geolocation.accuracy < location.coords.accuracy\n )\n return false;\n else {\n const latitude: number = +params.geolocation.latitude;\n const longitude: number = +params.geolocation.longitude;\n const radlat1 = (Math.PI * latitude) / 180;\n const radlat2 = (Math.PI * location.coords.latitude) / 180;\n const theta = longitude - location.coords.longitude;\n const radtheta = (Math.PI * theta) / 180;\n let dist =\n Math.sin(radlat1) * Math.sin(radlat2) +\n Math.cos(radlat1) * Math.cos(radlat2) * Math.cos(radtheta);\n if (dist > 1) {\n dist = 1;\n }\n const multiplier = (180 * 60 * 1.1515 * 1.609344 * 1000) / Math.PI;\n dist = Math.acos(dist) * multiplier;\n return params.geolocation.geofencing.radius >= dist;\n }\n}\n"],"mappings":"AACA,OAAO,KAAKA,QAAQ,MAAM,eAAe;AACzC,SAASC,SAAS,QAAQ,2BAA2B;AACrD,OAAOC,UAAU,MAAM,4BAA4B;A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G;IAC1D,MAAMM,KAAK,GAAGL,SAAS,GAAGL,QAAQ,CAACG,MAAM,CAACE,SAAS;IACnD,MAAMM,QAAQ,GAAIJ,IAAI,CAACC,EAAE,GAAGE,KAAK,GAAI,GAAG;IACxC,IAAIE,IAAI,GACNL,IAAI,CAACM,GAAG,CAACP,OAAO,CAAC,GAAGC,IAAI,CAACM,GAAG,CAACJ,OAAO,CAAC,GACrCF,IAAI,CAACO,GAAG,CAACR,OAAO,CAAC,GAAGC,IAAI,CAACO,GAAG,CAACL,OAAO,CAAC,GAAGF,IAAI,CAACO,GAAG,CAACH,QAAQ,CAAC;IAC5D,IAAIC,IAAI,GAAG,CAAC,EAAE;MACZA,IAAI,GAAG,CAAC;IACV;IACA,MAAMG,UAAU,GAAI,GAAG,GAAG,EAAE,GAAG,MAAM,GAAG,QAAQ,GAAG,IAAI,GAAIR,IAAI,CAACC,EAAE;IAClEI,IAAI,GAAGL,IAAI,CAACS,IAAI,CAACJ,IAAI,CAAC,GAAGG,UAAU;IACnC,OAAO1B,MAAM,CAACa,WAAW,CAACe,UAAU,CAACC,MAAM,IAAIN,IAAI;EACrD;AACF"}
@@ -9,11 +9,13 @@ import ProgressDialog from '../../widgets/ProgressDialog';
9
9
  import { BaseError } from '../../../errors/BaseError';
10
10
  import { showAlert } from '../../widgets/AlertDisplay';
11
11
  import SdkUtils from '../../../utils/SdkUtils';
12
-
13
12
  const VerifyLocationET = props => {
14
13
  const [geofencing, setGeofencing] = useState(true);
15
14
  const submitLocationResponse = useCallback(async response => {
16
- props.onSubmitET({ ...(await getBaseETResponse(EntityCode.VERIFY_LOCATION, response, getEventCodeByET(ExecutionTaskID.VERIFY_LOCATION, response), ''))
15
+ var _props$applicableReas, _props$applicableReas2;
16
+ const _appRC = response ? (_props$applicableReas = props.applicableReasons) === null || _props$applicableReas === void 0 ? void 0 : _props$applicableReas.success : (_props$applicableReas2 = props.applicableReasons) === null || _props$applicableReas2 === void 0 ? void 0 : _props$applicableReas2.failure;
17
+ props.onSubmitET({
18
+ ...(await getBaseETResponse(EntityCode.VERIFY_LOCATION, response, getEventCodeByET(ExecutionTaskID.VERIFY_LOCATION, response, _appRC), '', props.mergedObjectiveId, ExecutionTaskID.VERIFY_LOCATION))
17
19
  });
18
20
  }, [props]);
19
21
  useEffect(() => {
@@ -40,6 +42,5 @@ const VerifyLocationET = props => {
40
42
  label: props.message ?? 'Verifying Location...'
41
43
  }));
42
44
  };
43
-
44
45
  export default VerifyLocationET;
45
46
  //# sourceMappingURL=VerifyLocationET.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["View","React","useCallback","useEffect","useState","verifyLocation","getBaseETResponse","getEventCodeByET","EntityCode","ExecutionTaskID","CommonStyles","ProgressDialog","BaseError","showAlert","SdkUtils","VerifyLocationET","props","geofencing","setGeofencing","submitLocationResponse","response","onSubmitET","VERIFY_LOCATION","error","openAppSettings","mainContainer","message"],"sources":["VerifyLocationET.tsx"],"sourcesContent":["import { View } from 'react-native';\nimport React, { useCallback, useEffect, useState } from 'react';\nimport type { VerifyLocationInput } from './VerifyLocSchema';\nimport { verifyLocation } from './GeofenceUtils';\nimport { getBaseETResponse } from '../../../utils/ExecTaskUtils';\nimport { getEventCodeByET } from '../../../manager/dispatchCodes/EventCodeContainer';\nimport {\n EntityCode,\n ExecutionTaskID,\n} from '../../../models/execTasks/ETConfig';\nimport { CommonStyles } from '../../../styles/executionTasks/CommonStyles';\nimport ProgressDialog from '../../widgets/ProgressDialog';\nimport { BaseError } from '../../../errors/BaseError';\nimport { showAlert } from '../../widgets/AlertDisplay';\nimport SdkUtils from '../../../utils/SdkUtils';\n\nconst VerifyLocationET = (props: VerifyLocationInput) => {\n const [geofencing, setGeofencing] = useState(true);\n const submitLocationResponse = useCallback(\n async (response: boolean) => {\n props.onSubmitET({\n ...(await getBaseETResponse(\n EntityCode.VERIFY_LOCATION,\n response,\n getEventCodeByET(ExecutionTaskID.VERIFY_LOCATION, response),\n ''\n )),\n });\n },\n [props]\n );\n useEffect(() => {\n (async () => {\n try {\n let response = await verifyLocation(props);\n await submitLocationResponse(response);\n setGeofencing(false);\n } catch (error: any) {\n if (error instanceof BaseError) {\n showAlert(\n 'Permission Denied',\n 'Please enable Location permissions from settings and Try again',\n false,\n 'Open Settings',\n () => {\n SdkUtils.openAppSettings();\n }\n );\n } else {\n await submitLocationResponse(false);\n }\n }\n })();\n }, []);\n return (\n <View style={CommonStyles.mainContainer}>\n <ProgressDialog\n visible={geofencing}\n label={props.message ?? 'Verifying Location...'}\n />\n </View>\n );\n};\nexport default VerifyLocationET;\n"],"mappings":"AAAA,SAASA,IAAT,QAAqB,cAArB;AACA,OAAOC,KAAP,IAAgBC,WAAhB,EAA6BC,SAA7B,EAAwCC,QAAxC,QAAwD,OAAxD;AAEA,SAASC,cAAT,QAA+B,iBAA/B;AACA,SAASC,iBAAT,QAAkC,8BAAlC;AACA,SAASC,gBAAT,QAAiC,mDAAjC;AACA,SACEC,UADF,EAEEC,eAFF,QAGO,oCAHP;AAIA,SAASC,YAAT,QAA6B,6CAA7B;AACA,OAAOC,cAAP,MAA2B,8BAA3B;AACA,SAASC,SAAT,QAA0B,2BAA1B;AACA,SAASC,SAAT,QAA0B,4BAA1B;AACA,OAAOC,QAAP,MAAqB,yBAArB;;AAEA,MAAMC,gBAAgB,GAAIC,KAAD,IAAgC;EACvD,MAAM,CAACC,UAAD,EAAaC,aAAb,IAA8Bd,QAAQ,CAAC,IAAD,CAA5C;EACA,MAAMe,sBAAsB,GAAGjB,WAAW,CACxC,MAAOkB,QAAP,IAA6B;IAC3BJ,KAAK,CAACK,UAAN,CAAiB,EACf,IAAI,MAAMf,iBAAiB,CACzBE,UAAU,CAACc,eADc,EAEzBF,QAFyB,EAGzBb,gBAAgB,CAACE,eAAe,CAACa,eAAjB,EAAkCF,QAAlC,CAHS,EAIzB,EAJyB,CAA3B;IADe,CAAjB;EAQD,CAVuC,EAWxC,CAACJ,KAAD,CAXwC,CAA1C;EAaAb,SAAS,CAAC,MAAM;IACd,CAAC,YAAY;MACX,IAAI;QACF,IAAIiB,QAAQ,GAAG,MAAMf,cAAc,CAACW,KAAD,CAAnC;QACA,MAAMG,sBAAsB,CAACC,QAAD,CAA5B;QACAF,aAAa,CAAC,KAAD,CAAb;MACD,CAJD,CAIE,OAAOK,KAAP,EAAmB;QACnB,IAAIA,KAAK,YAAYX,SAArB,EAAgC;UAC9BC,SAAS,CACP,mBADO,EAEP,gEAFO,EAGP,KAHO,EAIP,eAJO,EAKP,MAAM;YACJC,QAAQ,CAACU,eAAT;UACD,CAPM,CAAT;QASD,CAVD,MAUO;UACL,MAAML,sBAAsB,CAAC,KAAD,CAA5B;QACD;MACF;IACF,CApBD;EAqBD,CAtBQ,EAsBN,EAtBM,CAAT;EAuBA,oBACE,oBAAC,IAAD;IAAM,KAAK,EAAET,YAAY,CAACe;EAA1B,gBACE,oBAAC,cAAD;IACE,OAAO,EAAER,UADX;IAEE,KAAK,EAAED,KAAK,CAACU,OAAN,IAAiB;EAF1B,EADF,CADF;AAQD,CA9CD;;AA+CA,eAAeX,gBAAf"}
1
+ {"version":3,"names":["View","React","useCallback","useEffect","useState","verifyLocation","getBaseETResponse","getEventCodeByET","EntityCode","ExecutionTaskID","CommonStyles","ProgressDialog","BaseError","showAlert","SdkUtils","VerifyLocationET","props","geofencing","setGeofencing","submitLocationResponse","response","_props$applicableReas","_props$applicableReas2","_appRC","applicableReasons","success","failure","onSubmitET","VERIFY_LOCATION","mergedObjectiveId","error","openAppSettings","createElement","style","mainContainer","visible","label","message"],"sources":["VerifyLocationET.tsx"],"sourcesContent":["import { View } from 'react-native';\nimport React, { useCallback, useEffect, useState } from 'react';\nimport type { VerifyLocationInput } from './VerifyLocSchema';\nimport { verifyLocation } from './GeofenceUtils';\nimport { getBaseETResponse } from '../../../utils/ExecTaskUtils';\nimport { getEventCodeByET } from '../../../manager/dispatchCodes/EventCodeContainer';\nimport {\n EntityCode,\n ExecutionTaskID,\n} from '../../../models/execTasks/ETConfig';\nimport { CommonStyles } from '../../../styles/executionTasks/CommonStyles';\nimport ProgressDialog from '../../widgets/ProgressDialog';\nimport { BaseError } from '../../../errors/BaseError';\nimport { showAlert } from '../../widgets/AlertDisplay';\nimport SdkUtils from '../../../utils/SdkUtils';\n\nconst VerifyLocationET = (props: VerifyLocationInput) => {\n const [geofencing, setGeofencing] = useState(true);\n const submitLocationResponse = useCallback(\n async (response: boolean) => {\n const _appRC = response\n ? props.applicableReasons?.success\n : props.applicableReasons?.failure;\n props.onSubmitET({\n ...(await getBaseETResponse(\n EntityCode.VERIFY_LOCATION,\n response,\n getEventCodeByET(ExecutionTaskID.VERIFY_LOCATION, response, _appRC),\n '',\n props.mergedObjectiveId,\n ExecutionTaskID.VERIFY_LOCATION\n )),\n });\n },\n [props]\n );\n useEffect(() => {\n (async () => {\n try {\n let response = await verifyLocation(props);\n await submitLocationResponse(response);\n setGeofencing(false);\n } catch (error: any) {\n if (error instanceof BaseError) {\n showAlert(\n 'Permission Denied',\n 'Please enable Location permissions from settings and Try again',\n false,\n 'Open Settings',\n () => {\n SdkUtils.openAppSettings();\n }\n );\n } else {\n await submitLocationResponse(false);\n }\n }\n })();\n }, []);\n return (\n <View style={CommonStyles.mainContainer}>\n <ProgressDialog\n visible={geofencing}\n label={props.message ?? 'Verifying Location...'}\n />\n </View>\n );\n};\nexport default VerifyLocationET;\n"],"mappings":"AAAA,SAASA,IAAI,QAAQ,cAAc;AACnC,OAAOC,KAAK,IAAIC,WAAW,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAE/D,SAASC,cAAc,QAAQ,iBAAiB;AAChD,SAASC,iBAAiB,QAAQ,8BAA8B;AAChE,SAASC,gBAAgB,QAAQ,mDAAmD;AACpF,SACEC,UAAU,EACVC,eAAe,QACV,oCAAoC;AAC3C,SAASC,YAAY,QAAQ,6CAA6C;AAC1E,OAAOC,cAAc,MAAM,8BAA8B;AACzD,SAASC,SAAS,QAAQ,2BAA2B;AACrD,SAASC,SAAS,QAAQ,4BAA4B;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,CAAC,EAAE,CAAC;EACN,CAAC,EAAE,EAAE,CAAC;EACN,oBACElB,KAAA,CAAA+B,aAAA,CAAChC,IAAI;IAACiC,KAAK,EAAEvB,YAAY,CAACwB;EAAc,gBACtCjC,KAAA,CAAA+B,aAAA,CAACrB,cAAc;IACbwB,OAAO,EAAElB,UAAW;IACpBmB,KAAK,EAAEpB,KAAK,CAACqB,OAAO,IAAI;EAAwB,CACjD,CACG,CAAC;AAEX,CAAC;AACD,eAAetB,gBAAgB"}
@@ -1,19 +1,16 @@
1
1
  import { BackHandler, Pressable, StyleSheet, Text, View } from 'react-native';
2
- import React, { useEffect, useRef } from 'react'; // @ts-ignore
3
-
2
+ import React, { useEffect, useRef } from 'react';
3
+ // @ts-ignore
4
4
  import OTPTextView from 'react-native-otp-textinput';
5
5
  import { Colors } from 'react-native-paper';
6
6
  import { showToast } from '../../widgets/Toaster';
7
7
  import { getBaseETResponse } from '../../../utils/ExecTaskUtils';
8
- import { EntityCode } from '../../../models/execTasks/ETConfig';
9
-
8
+ import { EntityCode, ExecutionTaskID } from '../../../models/execTasks/ETConfig';
10
9
  const VerifyOtpET = props => {
11
10
  const otpInput = useRef();
12
-
13
11
  function backButtonHandler() {
14
12
  return true;
15
13
  }
16
-
17
14
  useEffect(() => {
18
15
  BackHandler.addEventListener('hardwareBackPress', backButtonHandler);
19
16
  return () => {
@@ -31,8 +28,8 @@ const VerifyOtpET = props => {
31
28
  tintColor: Colors.blue300,
32
29
  handleTextChange: async value => {
33
30
  if (value.length === props.inputCount) {
34
- console.log('OTP Submit');
35
- props.onSubmit({ ...(await getBaseETResponse(EntityCode.VERIFY_INPUT, true, '', ''))
31
+ props.onSubmit({
32
+ ...(await getBaseETResponse(EntityCode.VERIFY_INPUT, true, '', '', props.mergedObjectiveId, ExecutionTaskID.VERIFY_INPUT))
36
33
  });
37
34
  }
38
35
  }
@@ -45,7 +42,6 @@ const VerifyOtpET = props => {
45
42
  style: styles.sendAgainText
46
43
  }, /*#__PURE__*/React.createElement(Text, null, "Send again")))));
47
44
  };
48
-
49
45
  export default VerifyOtpET;
50
46
  const styles = StyleSheet.create({
51
47
  backIconView: {
@@ -1 +1 @@
1
- {"version":3,"names":["BackHandler","Pressable","StyleSheet","Text","View","React","useEffect","useRef","OTPTextView","Colors","showToast","getBaseETResponse","EntityCode","VerifyOtpET","props","otpInput","backButtonHandler","addEventListener","removeEventListener","styles","otpInputTextView","veriOtpText","otpInputStyle","inputCount","blue300","value","length","console","log","onSubmit","VERIFY_INPUT","otpNotReceivedView","sendAgainText","create","backIconView","marginTop","marginStart","fontSize","color","black","borderRadius","borderWidth","paddingHorizontal","paddingVertical","marginHorizontal","flexDirection"],"sources":["VerifyOtpET.tsx"],"sourcesContent":["import { BackHandler, Pressable, StyleSheet, Text, View } from 'react-native';\nimport React, { useEffect, useRef } from 'react';\n// @ts-ignore\nimport OTPTextView from 'react-native-otp-textinput';\nimport { Colors } from 'react-native-paper';\nimport { showToast } from '../../widgets/Toaster';\nimport type { OtpInputSchema } from './VerifyOtpSchema';\nimport { getBaseETResponse } from '../../../utils/ExecTaskUtils';\nimport { EntityCode } from '../../../models/execTasks/ETConfig';\n\nconst VerifyOtpET = (props: OtpInputSchema) => {\n const otpInput = useRef();\n\n function backButtonHandler() {\n return true;\n }\n useEffect(() => {\n BackHandler.addEventListener('hardwareBackPress', backButtonHandler);\n return () => {\n BackHandler.removeEventListener('hardwareBackPress', backButtonHandler);\n };\n }, []);\n\n return (\n <View>\n <View style={styles.otpInputTextView}>\n <Text style={styles.veriOtpText}>Verify OTP</Text>\n <OTPTextView\n textInputStyle={styles.otpInputStyle}\n ref={otpInput}\n inputCount={props.inputCount}\n tintColor={Colors.blue300}\n handleTextChange={async (value: string) => {\n if (value.length === props.inputCount) {\n console.log('OTP Submit');\n props.onSubmit({\n ...(await getBaseETResponse(\n EntityCode.VERIFY_INPUT,\n true,\n '',\n ''\n )),\n });\n }\n }}\n />\n <View style={styles.otpNotReceivedView}>\n <Text>Haven't received the sms?</Text>\n\n <Pressable\n onPress={() => {\n showToast('Resending OTP');\n }}\n style={styles.sendAgainText}\n >\n <Text>Send again</Text>\n </Pressable>\n </View>\n </View>\n </View>\n );\n};\nexport default VerifyOtpET;\n\nconst styles = StyleSheet.create({\n backIconView: {\n marginTop: 22,\n marginStart: 22,\n },\n veriOtpText: {\n fontSize: 24,\n color: Colors.black,\n marginTop: 40,\n },\n otpInputStyle: {\n borderRadius: 4,\n borderWidth: 1,\n paddingHorizontal: 16,\n paddingVertical: 12,\n marginTop: 32,\n },\n otpInputTextView: {\n marginHorizontal: 17,\n },\n otpNotReceivedView: {\n flexDirection: 'row',\n marginTop: 10,\n },\n sendAgainText: {\n marginHorizontal: 8,\n },\n});\n"],"mappings":"AAAA,SAASA,WAAT,EAAsBC,SAAtB,EAAiCC,UAAjC,EAA6CC,IAA7C,EAAmDC,IAAnD,QAA+D,cAA/D;AACA,OAAOC,KAAP,IAAgBC,SAAhB,EAA2BC,MAA3B,QAAyC,OAAzC,C,CACA;;AACA,OAAOC,WAAP,MAAwB,4BAAxB;AACA,SAASC,MAAT,QAAuB,oBAAvB;AACA,SAASC,SAAT,QAA0B,uBAA1B;AAEA,SAASC,iBAAT,QAAkC,8BAAlC;AACA,SAASC,UAAT,QAA2B,oCAA3B;;AAEA,MAAMC,WAAW,GAAIC,KAAD,IAA2B;EAC7C,MAAMC,QAAQ,GAAGR,MAAM,EAAvB;;EAEA,SAASS,iBAAT,GAA6B;IAC3B,OAAO,IAAP;EACD;;EACDV,SAAS,CAAC,MAAM;IACdN,WAAW,CAACiB,gBAAZ,CAA6B,mBAA7B,EAAkDD,iBAAlD;IACA,OAAO,MAAM;MACXhB,WAAW,CAACkB,mBAAZ,CAAgC,mBAAhC,EAAqDF,iBAArD;IACD,CAFD;EAGD,CALQ,EAKN,EALM,CAAT;EAOA,oBACE,oBAAC,IAAD,qBACE,oBAAC,IAAD;IAAM,KAAK,EAAEG,MAAM,CAACC;EAApB,gBACE,oBAAC,IAAD;I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;IAChBwB,gBAAgB,EAAE;EADF,CAjBa;EAoB/Bb,kBAAkB,EAAE;IAClBc,aAAa,EAAE,KADG;IAElBV,SAAS,EAAE;EAFO,CApBW;EAwB/BH,aAAa,EAAE;IACbY,gBAAgB,EAAE;EADL;AAxBgB,CAAlB,CAAf"}
1
+ {"version":3,"names":["BackHandler","Pressable","StyleSheet","Text","View","React","useEffect","useRef","OTPTextView","Colors","showToast","getBaseETResponse","EntityCode","ExecutionTaskID","VerifyOtpET","props","otpInput","backButtonHandler","addEventListener","removeEventListener","createElement","style","styles","otpInputTextView","veriOtpText","textInputStyle","otpInputStyle","ref","inputCount","tintColor","blue300","handleTextChange","value","length","onSubmit","VERIFY_INPUT","mergedObjectiveId","otpNotReceivedView","onPress","sendAgainText","create","backIconView","marginTop","marginStart","fontSize","color","black","borderRadius","borderWidth","paddingHorizontal","paddingVertical","marginHorizontal","flexDirection"],"sources":["VerifyOtpET.tsx"],"sourcesContent":["import { BackHandler, Pressable, StyleSheet, Text, View } from 'react-native';\nimport React, { useEffect, useRef } from 'react';\n// @ts-ignore\nimport OTPTextView from 'react-native-otp-textinput';\nimport { Colors } from 'react-native-paper';\nimport { showToast } from '../../widgets/Toaster';\nimport type { OtpInputSchema } from './VerifyOtpSchema';\nimport { getBaseETResponse } from '../../../utils/ExecTaskUtils';\nimport {\n EntityCode,\n ExecutionTaskID,\n} from '../../../models/execTasks/ETConfig';\n\nconst VerifyOtpET = (props: OtpInputSchema) => {\n const otpInput = useRef();\n\n function backButtonHandler() {\n return true;\n }\n useEffect(() => {\n BackHandler.addEventListener('hardwareBackPress', backButtonHandler);\n return () => {\n BackHandler.removeEventListener('hardwareBackPress', backButtonHandler);\n };\n }, []);\n\n return (\n <View>\n <View style={styles.otpInputTextView}>\n <Text style={styles.veriOtpText}>Verify OTP</Text>\n <OTPTextView\n textInputStyle={styles.otpInputStyle}\n ref={otpInput}\n inputCount={props.inputCount}\n tintColor={Colors.blue300}\n handleTextChange={async (value: string) => {\n if (value.length === props.inputCount) {\n props.onSubmit({\n ...(await getBaseETResponse(\n EntityCode.VERIFY_INPUT,\n true,\n '',\n '',\n props.mergedObjectiveId,\n ExecutionTaskID.VERIFY_INPUT\n )),\n });\n }\n }}\n />\n <View style={styles.otpNotReceivedView}>\n <Text>Haven't received the sms?</Text>\n\n <Pressable\n onPress={() => {\n showToast('Resending OTP');\n }}\n style={styles.sendAgainText}\n >\n <Text>Send again</Text>\n </Pressable>\n </View>\n </View>\n </View>\n );\n};\nexport default VerifyOtpET;\n\nconst styles = StyleSheet.create({\n backIconView: {\n marginTop: 22,\n marginStart: 22,\n },\n veriOtpText: {\n fontSize: 24,\n color: Colors.black,\n marginTop: 40,\n },\n otpInputStyle: {\n borderRadius: 4,\n borderWidth: 1,\n paddingHorizontal: 16,\n paddingVertical: 12,\n marginTop: 32,\n },\n otpInputTextView: {\n marginHorizontal: 17,\n },\n otpNotReceivedView: {\n flexDirection: 'row',\n marginTop: 10,\n },\n sendAgainText: {\n marginHorizontal: 8,\n },\n});\n"],"mappings":"AAAA,SAASA,WAAW,EAAEC,SAAS,EAAEC,UAAU,EAAEC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AAC7E,OAAOC,KAAK,IAAIC,SAAS,EAAEC,MAAM,QAAQ,OAAO;AAChD;AACA,OAAOC,WAAW,MAAM,4BAA4B;AACpD,SAASC,MAAM,QAAQ,oBAAoB;AAC3C,SAASC,SAAS,QAAQ,uBAAuB;AAEjD,SAASC,iBAAiB,QAAQ,8BAA8B;AAChE,SACEC,UAAU,EACVC,eAAe,QACV,oCAAoC;AAE3C,MAAMC,WAAW,GAAIC,KAAqB,IAAK;EAC7C,MAAMC,QAAQ,GAAGT,MAAM,CAAC,CAAC;EAEzB,SAASU,iBAAiBA,CAAA,EAAG;IAC3B,OAAO,IAAI;EACb;EACAX,SAAS,CAAC,MAAM;IACdN,WAAW,CAACkB,gBAAgB,CAAC,mBAAmB,EAAED,iBAAiB,CAAC;IACpE,OAAO,MAAM;MACX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,CAAC;AACD,eAAeW,WAAW;AAE1B,MAAMQ,MAAM,GAAGpB,UAAU,CAACsC,MAAM,CAAC;EAC/BC,YAAY,EAAE;IACZC,SAAS,EAAE,EAAE;IACbC,WAAW,EAAE;EACf,CAAC;EACDnB,WAAW,EAAE;IACXoB,QAAQ,EAAE,EAAE;IACZC,KAAK,EAAEpC,MAAM,CAACqC,KAAK;IACnBJ,SAAS,EAAE;EACb,CAAC;EACDhB,aAAa,EAAE;IACbqB,YAAY,EAAE,CAAC;IACfC,WAAW,EAAE,CAAC;IACdC,iBAAiB,EAAE,EAAE;IACrBC,eAAe,EAAE,EAAE;IACnBR,SAAS,EAAE;EACb,CAAC;EACDnB,gBAAgB,EAAE;IAChB4B,gBAAgB,EAAE;EACpB,CAAC;EACDd,kBAAkB,EAAE;IAClBe,aAAa,EAAE,KAAK;IACpBV,SAAS,EAAE;EACb,CAAC;EACDH,aAAa,EAAE;IACbY,gBAAgB,EAAE;EACpB;AACF,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["VerifyOtpSchema.ts"],"sourcesContent":["/**\n * Otp entered by user\n */\nimport type { BaseETResponse } from '../../../models/execTasks/ETBaseModels';\n\nexport type InputOtp = string;\n/**\n * Otp Value\n */\nexport type Otp = string;\n\nexport interface OtpInputSchema {\n inputCount: number;\n inputOtp: InputOtp;\n otp: Otp;\n onSubmit: (output: OtpOutputSchema) => void;\n}\n\nexport type OtpOutputSchema = BaseETResponse & {\n /**\n * Boolean to represent result of verification\n */\n success: boolean;\n};\n"],"mappings":""}
1
+ {"version":3,"names":[],"sources":["VerifyOtpSchema.ts"],"sourcesContent":["/**\n * Otp entered by user\n */\nimport type {\n BaseETRequest,\n BaseETResponse,\n} from '../../../models/execTasks/ETBaseModels';\n\nexport type InputOtp = string;\n/**\n * Otp Value\n */\nexport type Otp = string;\n\nexport type OtpInputSchema = BaseETRequest & {\n inputCount: number;\n inputOtp: InputOtp;\n otp: Otp;\n onSubmit: (output: OtpOutputSchema) => void;\n};\n\nexport type OtpOutputSchema = BaseETResponse & {\n /**\n * Boolean to represent result of verification\n */\n success: boolean;\n};\n"],"mappings":""}
@@ -0,0 +1,8 @@
1
+ import { GO_BACK_EVENT_CODE } from '../../constants/constants';
2
+ export function hasGoBackConnector(applicableReasons) {
3
+ var _applicableReasons$go;
4
+ if (applicableReasons && applicableReasons.goBack && typeof applicableReasons.goBack === 'object' && (_applicableReasons$go = applicableReasons.goBack) !== null && _applicableReasons$go !== void 0 && _applicableReasons$go.hasOwnProperty(GO_BACK_EVENT_CODE)) {
5
+ return true;
6
+ } else return false;
7
+ }
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["GO_BACK_EVENT_CODE","hasGoBackConnector","applicableReasons","_applicableReasons$go","goBack","hasOwnProperty"],"sources":["index.ts"],"sourcesContent":["import { GO_BACK_EVENT_CODE } from '../../constants/constants';\nimport {\n ApplicableReasons,\n NewApplicableReasons,\n} from '../../models/execTasks/ETBaseModels';\n\nexport function hasGoBackConnector(\n applicableReasons: ApplicableReasons | NewApplicableReasons | undefined\n): boolean {\n if (\n applicableReasons &&\n applicableReasons.goBack &&\n typeof applicableReasons.goBack === 'object' &&\n applicableReasons.goBack?.hasOwnProperty(GO_BACK_EVENT_CODE)\n ) {\n return true;\n } else return false;\n}\n"],"mappings":"AAAA,SAASA,kBAAkB,QAAQ,2BAA2B;AAM9D,OAAO,SAASC,kBAAkBA,CAChCC,iBAAuE,EAC9D;EAAA,IAAAC,qBAAA;EACT,IACED,iBAAiB,IACjBA,iBAAiB,CAACE,MAAM,IACxB,OAAOF,iBAAiB,CAACE,MAAM,KAAK,QAAQ,KAAAD,qBAAA,GAC5CD,iBAAiB,CAACE,MAAM,cAAAD,qBAAA,eAAxBA,qBAAA,CAA0BE,cAAc,CAACL,kBAAkB,CAAC,EAC5D;IACA,OAAO,IAAI;EACb,CAAC,MAAM,OAAO,KAAK;AACrB"}
@@ -1 +1 @@
1
- {"version":3,"names":["DispatchUtilsInterface","Logger","LOG_TYPE","showAlert","title","message","cancelable","btnPositive","positiveCall","btnNegative","negCall","showAndroidDialog","then","success","catch","error","getInstance","logEvent","SDK_ERROR"],"sources":["AlertDisplay.tsx"],"sourcesContent":["import { DispatchUtilsInterface } from '../../utils/SdkUtils';\nimport Logger, { LOG_TYPE } from '../../utils/Logger';\n\nexport function showAlert(\n title: string,\n message: string,\n cancelable: boolean,\n btnPositive: string,\n positiveCall: () => void,\n btnNegative?: string,\n negCall?: () => void\n) {\n DispatchUtilsInterface.showAndroidDialog(\n title,\n message,\n btnPositive,\n btnNegative ?? null,\n cancelable\n )\n .then((success: boolean) => {\n if (success) positiveCall();\n else if (negCall) {\n negCall();\n }\n })\n .catch((error: { message: string }) => {\n Logger.getInstance().logEvent('error', error.message, LOG_TYPE.SDK_ERROR);\n });\n}\n"],"mappings":"AAAA,SAASA,sBAAT,QAAuC,sBAAvC;AACA,OAAOC,MAAP,IAAiBC,QAAjB,QAAiC,oBAAjC;AAEA,OAAO,SAASC,SAAT,CACLC,KADK,EAELC,OAFK,EAGLC,UAHK,EAILC,WAJK,EAKLC,YALK,EAMLC,WANK,EAOLC,OAPK,EAQL;EACAV,sBAAsB,CAACW,iBAAvB,CACEP,KADF,EAEEC,OAFF,EAGEE,WAHF,EAIEE,WAAW,IAAI,IAJjB,EAKEH,UALF,EAOGM,IAPH,CAOSC,OAAD,IAAsB;IAC1B,IAAIA,OAAJ,EAAaL,YAAY,GAAzB,KACK,IAAIE,OAAJ,EAAa;MAChBA,OAAO;IACR;EACF,CAZH,EAaGI,KAbH,CAaUC,KAAD,IAAgC;IACrCd,MAAM,CAACe,WAAP,GAAqBC,QAArB,CAA8B,OAA9B,EAAuCF,KAAK,CAACV,OAA7C,EAAsDH,QAAQ,CAACgB,SAA/D;EACD,CAfH;AAgBD"}
1
+ {"version":3,"names":["DispatchUtilsInterface","Logger","LOG_TYPE","showAlert","title","message","cancelable","btnPositive","positiveCall","btnNegative","negCall","showAndroidDialog","then","success","catch","error","getInstance","logEvent","SDK_ERROR"],"sources":["AlertDisplay.tsx"],"sourcesContent":["import { DispatchUtilsInterface } from '../../utils/SdkUtils';\nimport Logger, { LOG_TYPE } from '../../utils/Logger';\n\nexport function showAlert(\n title: string,\n message: string,\n cancelable: boolean,\n btnPositive: string,\n positiveCall: () => void,\n btnNegative?: string,\n negCall?: () => void\n) {\n DispatchUtilsInterface.showAndroidDialog(\n title,\n message,\n btnPositive,\n btnNegative ?? null,\n cancelable\n )\n .then((success: boolean) => {\n if (success) positiveCall();\n else if (negCall) {\n negCall();\n }\n })\n .catch((error: { message: string }) => {\n Logger.getInstance().logEvent('error', error.message, LOG_TYPE.SDK_ERROR);\n });\n}\n"],"mappings":"AAAA,SAASA,sBAAsB,QAAQ,sBAAsB;AAC7D,OAAOC,MAAM,IAAIC,QAAQ,QAAQ,oBAAoB;AAErD,OAAO,SAASC,SAASA,CACvBC,KAAa,EACbC,OAAe,EACfC,UAAmB,EACnBC,WAAmB,EACnBC,YAAwB,EACxBC,WAAoB,EACpBC,OAAoB,EACpB;EACAV,sBAAsB,CAACW,iBAAiB,CACtCP,KAAK,EACLC,OAAO,EACPE,WAAW,EACXE,WAAW,IAAI,IAAI,EACnBH,UACF,CAAC,CACEM,IAAI,CAAEC,OAAgB,IAAK;IAC1B,IAAIA,OAAO,EAAEL,YAAY,CAAC,CAAC,CAAC,KACvB,IAAIE,OAAO,EAAE;MAChBA,OAAO,CAAC,CAAC;IACX;EACF,CAAC,CAAC,CACDI,KAAK,CAAEC,KAA0B,IAAK;IACrCd,MAAM,CAACe,WAAW,CAAC,CAAC,CAACC,QAAQ,CAAC,OAAO,EAAEF,KAAK,CAACV,OAAO,EAAEH,QAAQ,CAACgB,SAAS,CAAC;EAC3E,CAAC,CAAC;AACN"}
@@ -4,7 +4,6 @@ import { CommonStyles, Fonts } from '../../styles/executionTasks/CommonStyles';
4
4
  import { Button, Paragraph, Title } from 'react-native-paper';
5
5
  import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
6
6
  import SdkColors, { ColorTheme } from '../../styles/SdkColors';
7
-
8
7
  const CancelOrderDialog = props => {
9
8
  return /*#__PURE__*/React.createElement(Modal, {
10
9
  animationType: "none",
@@ -62,7 +61,6 @@ const CancelOrderDialog = props => {
62
61
  testID: "secondary"
63
62
  }, props.negativeButtonTitle ?? 'No')))));
64
63
  };
65
-
66
64
  const styles = StyleSheet.create({
67
65
  content: {
68
66
  backgroundColor: 'white',
@@ -1 +1 @@
1
- {"version":3,"names":["React","Modal","StyleSheet","View","CommonStyles","Fonts","Button","Paragraph","Title","Icon","SdkColors","ColorTheme","CancelOrderDialog","props","visible","styles","wrapper","content","showIcon","iconName","alignSelf","LIGHT","primaryButton","fontFamily","IBMPlexSans_600SemiBold","marginTop","marginBottom","textAlign","color","label","message","fontSize","IBMPlexSans_400Regular","nextButtonLabel","nextButton","onSubmit","positiveButtonTitle","cancelButtonLabel","cancelButton","negativeButtonTitle","create","backgroundColor","padding","borderRadius","width","flex","alignItems","justifyContent"],"sources":["CancelOrderDialog.tsx"],"sourcesContent":["import React from 'react';\nimport { Modal, StyleSheet, View } from 'react-native';\nimport { CommonStyles, Fonts } from '../../styles/executionTasks/CommonStyles';\nimport { Button, Paragraph, Title } from 'react-native-paper';\nimport Icon from 'react-native-vector-icons/MaterialCommunityIcons';\nimport SdkColors, { ColorTheme } from '../../styles/SdkColors';\n\nconst CancelOrderDialog = (props: CancelDialogProps) => {\n return (\n <Modal\n animationType=\"none\"\n transparent={true}\n visible={props.visible}\n onRequestClose={() => {}}\n >\n <View style={styles.wrapper}>\n <View style={styles.content}>\n {props.showIcon && props.iconName && (\n <Icon\n style={{ alignSelf: 'center' }}\n size={34}\n name={props.iconName}\n color={SdkColors[ColorTheme.LIGHT].primaryButton}\n />\n )}\n <Title\n style={{\n fontFamily: Fonts.IBMPlexSans_600SemiBold,\n marginTop: 0,\n marginBottom: 15,\n textAlign: 'center',\n color: '#000000',\n }}\n >\n {props.label ?? 'Cancel Order'}\n </Title>\n {props.message && (\n <Paragraph\n style={{\n textAlign: 'center',\n fontSize: 14,\n fontFamily: Fonts.IBMPlexSans_400Regular,\n }}\n >\n {props.message}\n </Paragraph>\n )}\n <View style={{ marginTop: 20 }}>\n <Button\n mode={'outlined'}\n uppercase={false}\n labelStyle={CommonStyles.nextButtonLabel}\n style={CommonStyles.nextButton}\n onPress={() => {\n props.onSubmit(true);\n }}\n testID=\"primary\"\n >\n {props.positiveButtonTitle ?? 'Yes'}\n </Button>\n <Button\n uppercase={false}\n mode={'outlined'}\n labelStyle={CommonStyles.cancelButtonLabel}\n style={[CommonStyles.cancelButton, { marginTop: 10 }]}\n onPress={async () => {\n props.onSubmit(false);\n }}\n testID=\"secondary\"\n >\n {props.negativeButtonTitle ?? 'No'}\n </Button>\n </View>\n </View>\n </View>\n </Modal>\n );\n};\n\nconst styles = StyleSheet.create({\n content: {\n backgroundColor: 'white',\n padding: 20,\n borderRadius: 5,\n width: '80%',\n },\n wrapper: {\n flex: 1,\n alignItems: 'center',\n justifyContent: 'center',\n backgroundColor: 'rgba(0,0,0,0.7)',\n },\n});\n\nexport default CancelOrderDialog;\n\nexport interface CancelDialogProps {\n visible: boolean;\n onSubmit: (success: boolean) => void;\n label?: string;\n message?: string;\n positiveButtonTitle?: string;\n negativeButtonTitle?: string;\n showIcon?: boolean;\n iconName?: string;\n}\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,KAAT,EAAgBC,UAAhB,EAA4BC,IAA5B,QAAwC,cAAxC;AACA,SAASC,YAAT,EAAuBC,KAAvB,QAAoC,0CAApC;AACA,SAASC,MAAT,EAAiBC,SAAjB,EAA4BC,KAA5B,QAAyC,oBAAzC;AACA,OAAOC,IAAP,MAAiB,kDAAjB;AACA,OAAOC,SAAP,IAAoBC,UAApB,QAAsC,wBAAtC;;AAEA,MAAMC,iBAAiB,GAAIC,KAAD,IAA8B;EACtD,oBACE,oBAAC,KAAD;IACE,a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B,mBAAN,IAA6B,KAVhC,CADF,eAaE,oBAAC,MAAD;IACE,SAAS,EAAE,KADb;IAEE,IAAI,EAAE,UAFR;IAGE,UAAU,EAAEhC,YAAY,CAACiC,iBAH3B;IAIE,KAAK,EAAE,CAACjC,YAAY,CAACkC,YAAd,EAA4B;MAAEb,SAAS,EAAE;IAAb,CAA5B,CAJT;IAKE,OAAO,EAAE,YAAY;MACnBZ,KAAK,CAACsB,QAAN,CAAe,KAAf;IACD,CAPH;IAQE,MAAM,EAAC;EART,GAUGtB,KAAK,CAAC0B,mBAAN,IAA6B,IAVhC,CAbF,CA/BF,CADF,CANF,CADF;AAqED,CAtED;;AAwEA,MAAMxB,MAAM,GAAGb,UAAU,CAACsC,MAAX,CAAkB;EAC/BvB,OAAO,EAAE;IACPwB,eAAe,EAAE,OADV;IAEPC,OAAO,EAAE,EAFF;IAGPC,YAAY,EAAE,CAHP;IAIPC,KAAK,EAAE;EAJA,CADsB;EAO/B5B,OAAO,EAAE;IACP6B,IAAI,EAAE,CADC;IAEPC,UAAU,EAAE,QAFL;IAGPC,cAAc,EAAE,QAHT;IAIPN,eAAe,EAAE;EAJV;AAPsB,CAAlB,CAAf;AAeA,eAAe7B,iBAAf"}
1
+ {"version":3,"names":["React","Modal","StyleSheet","View","CommonStyles","Fonts","Button","Paragraph","Title","Icon","SdkColors","ColorTheme","CancelOrderDialog","props","createElement","animationType","transparent","visible","onRequestClose","style","styles","wrapper","content","showIcon","iconName","alignSelf","size","name","color","LIGHT","primaryButton","fontFamily","IBMPlexSans_600SemiBold","marginTop","marginBottom","textAlign","label","message","fontSize","IBMPlexSans_400Regular","mode","uppercase","labelStyle","nextButtonLabel","nextButton","onPress","onSubmit","testID","positiveButtonTitle","cancelButtonLabel","cancelButton","negativeButtonTitle","create","backgroundColor","padding","borderRadius","width","flex","alignItems","justifyContent"],"sources":["CancelOrderDialog.tsx"],"sourcesContent":["import React from 'react';\nimport { Modal, StyleSheet, View } from 'react-native';\nimport { CommonStyles, Fonts } from '../../styles/executionTasks/CommonStyles';\nimport { Button, Paragraph, Title } from 'react-native-paper';\nimport Icon from 'react-native-vector-icons/MaterialCommunityIcons';\nimport SdkColors, { ColorTheme } from '../../styles/SdkColors';\n\nconst CancelOrderDialog = (props: CancelDialogProps) => {\n return (\n <Modal\n animationType=\"none\"\n transparent={true}\n visible={props.visible}\n onRequestClose={() => {}}\n >\n <View style={styles.wrapper}>\n <View style={styles.content}>\n {props.showIcon && props.iconName && (\n <Icon\n style={{ alignSelf: 'center' }}\n size={34}\n name={props.iconName}\n color={SdkColors[ColorTheme.LIGHT].primaryButton}\n />\n )}\n <Title\n style={{\n fontFamily: Fonts.IBMPlexSans_600SemiBold,\n marginTop: 0,\n marginBottom: 15,\n textAlign: 'center',\n color: '#000000',\n }}\n >\n {props.label ?? 'Cancel Order'}\n </Title>\n {props.message && (\n <Paragraph\n style={{\n textAlign: 'center',\n fontSize: 14,\n fontFamily: Fonts.IBMPlexSans_400Regular,\n }}\n >\n {props.message}\n </Paragraph>\n )}\n <View style={{ marginTop: 20 }}>\n <Button\n mode={'outlined'}\n uppercase={false}\n labelStyle={CommonStyles.nextButtonLabel}\n style={CommonStyles.nextButton}\n onPress={() => {\n props.onSubmit(true);\n }}\n testID=\"primary\"\n >\n {props.positiveButtonTitle ?? 'Yes'}\n </Button>\n <Button\n uppercase={false}\n mode={'outlined'}\n labelStyle={CommonStyles.cancelButtonLabel}\n style={[CommonStyles.cancelButton, { marginTop: 10 }]}\n onPress={async () => {\n props.onSubmit(false);\n }}\n testID=\"secondary\"\n >\n {props.negativeButtonTitle ?? 'No'}\n </Button>\n </View>\n </View>\n </View>\n </Modal>\n );\n};\n\nconst styles = StyleSheet.create({\n content: {\n backgroundColor: 'white',\n padding: 20,\n borderRadius: 5,\n width: '80%',\n },\n wrapper: {\n flex: 1,\n alignItems: 'center',\n justifyContent: 'center',\n backgroundColor: 'rgba(0,0,0,0.7)',\n },\n});\n\nexport default CancelOrderDialog;\n\nexport interface CancelDialogProps {\n visible: boolean;\n onSubmit: (success: boolean) => void;\n label?: string;\n message?: string;\n positiveButtonTitle?: string;\n negativeButtonTitle?: string;\n showIcon?: boolean;\n iconName?: string;\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,KAAK,EAAEC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AACtD,SAASC,YAAY,EAAEC,KAAK,QAAQ,0CAA0C;AAC9E,SAASC,MAAM,EAAEC,SAAS,EAAEC,KAAK,QAAQ,oBAAoB;AAC7D,OAAOC,IAAI,MAAM,kDAAkD;AACnE,OAAOC,SAAS,IAAIC,UAAU,QAAQ,wBAAwB;AAE9D,MAAMC,iBAAiB,GAAIC,KAAwB,IAAK;EACtD,oBACEb,KAAA,CAAAc,aAAA,CAACb,KAAK;IACJc,aAAa,EAAC,MAAM;IACpBC,WAAW,EAAE,IAAK;IAClBC,OAAO,EAAEJ,KAAK,CAACI,OAAQ;IACvBC,cAAc,EAAEA,CAAA,KAAM,CAAC;EAAE,gBAEzBlB,KAAA,CAAAc,aAAA,CAACX,IAAI;IAACgB,KAAK,EAAEC,MAAM,CAACC;EAAQ,gBAC1BrB,KAAA,CAAAc,aAAA,CAACX,IAAI;IAACgB,KAAK,EAAEC,MAAM,CAACE;EAAQ,GACzBT,KAAK,CAACU,QAAQ,IAAIV,KAAK,CAACW,QAAQ,iBAC/BxB,KAAA,CAAAc,aAAA,CAACL,IAAI;IACHU,KAAK,EAAE;MAAEM,SAAS,EAAE;IAAS,CAAE;IAC/BC,IAAI,EAAE,EAAG;IACTC,IAAI,EAAEd,KAAK,CAACW,QAAS;IACrBI,KAAK,EAAElB,SAAS,CAACC,UAAU,CAACkB,KAAK,CAAC,CAACC;EAAc,CAClD,CACF,eACD9B,KAAA,CAAAc,aAAA,CAACN,KAAK;IACJW,KAAK,EAAE;MACLY,UAAU,EAAE1B,KAAK,CAAC2B,uBAAuB;MACzCC,SAAS,EAAE,CAAC;MACZC,YAAY,EAAE,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C/B9B,OAAO,EAAE;IACP+B,eAAe,EAAE,OAAO;IACxBC,OAAO,EAAE,EAAE;IACXC,YAAY,EAAE,CAAC;IACfC,KAAK,EAAE;EACT,CAAC;EACDnC,OAAO,EAAE;IACPoC,IAAI,EAAE,CAAC;IACPC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,QAAQ;IACxBN,eAAe,EAAE;EACnB;AACF,CAAC,CAAC;AAEF,eAAezC,iBAAiB"}
@@ -0,0 +1,80 @@
1
+ import { View, Text, StyleSheet, TouchableOpacity } from 'react-native';
2
+ import React from 'react';
3
+ import { Checkbox } from 'react-native-paper';
4
+ import { Feather } from '@expo/vector-icons';
5
+ const Card = props => {
6
+ var _props$selectConfig, _props$renderAddition;
7
+ const isSelected = (_props$selectConfig = props.selectConfig) !== null && _props$selectConfig !== void 0 && _props$selectConfig.isSelected ? 'checked' : 'unchecked';
8
+ return /*#__PURE__*/React.createElement(View, {
9
+ style: styles.container
10
+ }, props.selectConfig ? /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(Checkbox, {
11
+ status: isSelected,
12
+ onPress: () => {
13
+ var _props$selectConfig2, _props$selectConfig3;
14
+ (_props$selectConfig2 = props.selectConfig) === null || _props$selectConfig2 === void 0 ? void 0 : _props$selectConfig2.onSelect((_props$selectConfig3 = props.selectConfig) === null || _props$selectConfig3 === void 0 ? void 0 : _props$selectConfig3.props);
15
+ },
16
+ theme: {
17
+ roundness: 5
18
+ }
19
+ })) : null, /*#__PURE__*/React.createElement(View, {
20
+ style: styles.body
21
+ }, /*#__PURE__*/React.createElement(View, {
22
+ style: styles.header
23
+ }, /*#__PURE__*/React.createElement(Text, {
24
+ style: styles.title
25
+ }, props.title), (_props$renderAddition = props.renderAdditionalHeader) === null || _props$renderAddition === void 0 ? void 0 : _props$renderAddition.call(props)), props.Body), props.editConfig ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(View, {
26
+ style: styles.divider
27
+ }), /*#__PURE__*/React.createElement(TouchableOpacity, {
28
+ onPress: () => {
29
+ var _props$editConfig, _props$editConfig2;
30
+ return (_props$editConfig = props.editConfig) === null || _props$editConfig === void 0 ? void 0 : _props$editConfig.onEdit((_props$editConfig2 = props.editConfig) === null || _props$editConfig2 === void 0 ? void 0 : _props$editConfig2.props);
31
+ },
32
+ style: styles.icon
33
+ }, /*#__PURE__*/React.createElement(Feather, {
34
+ name: "edit",
35
+ size: 24,
36
+ color: "#5B80F7"
37
+ }))) : null);
38
+ };
39
+ export default Card;
40
+ const styles = StyleSheet.create({
41
+ container: {
42
+ flexDirection: 'row',
43
+ justifyContent: 'flex-start',
44
+ alignItems: 'flex-start',
45
+ paddingVertical: 12,
46
+ paddingHorizontal: 16,
47
+ marginVertical: 10,
48
+ marginHorizontal: 16,
49
+ borderWidth: 1,
50
+ borderColor: '#E0E3EB',
51
+ borderRadius: 8
52
+ // height: 150,
53
+ },
54
+
55
+ header: {
56
+ flexDirection: 'row',
57
+ alignItems: 'center'
58
+ },
59
+ body: {
60
+ flex: 1
61
+ },
62
+ title: {
63
+ fontSize: 16,
64
+ fontStyle: 'normal',
65
+ fontWeight: '500',
66
+ lineHeight: 24,
67
+ marginRight: 8
68
+ },
69
+ divider: {
70
+ height: '90%',
71
+ width: 2,
72
+ backgroundColor: '#E0E3EB',
73
+ alignSelf: 'center'
74
+ },
75
+ icon: {
76
+ alignSelf: 'center',
77
+ margin: 10
78
+ }
79
+ });
80
+ //# sourceMappingURL=Card.js.map