@os1-platform/dispatch-mobile 1.3.11 → 2.0.1

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 (629) hide show
  1. package/README.md +198 -30
  2. package/android/.gradle/7.0.2/fileHashes/fileHashes.lock +0 -0
  3. package/android/.gradle/7.2/dependencies-accessors/dependencies-accessors.lock +0 -0
  4. package/android/.gradle/7.2/executionHistory/executionHistory.bin +0 -0
  5. package/android/.gradle/7.2/executionHistory/executionHistory.lock +0 -0
  6. package/android/.gradle/7.2/fileChanges/last-build.bin +0 -0
  7. package/android/.gradle/7.2/fileHashes/fileHashes.bin +0 -0
  8. package/android/.gradle/7.2/fileHashes/fileHashes.lock +0 -0
  9. package/android/.gradle/7.2/fileHashes/resourceHashesCache.bin +0 -0
  10. package/android/.gradle/7.2/gc.properties +0 -0
  11. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  12. package/android/.gradle/buildOutputCleanup/cache.properties +2 -2
  13. package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
  14. package/android/.gradle/checksums/checksums.lock +0 -0
  15. package/android/.gradle/checksums/md5-checksums.bin +0 -0
  16. package/android/.gradle/checksums/sha1-checksums.bin +0 -0
  17. package/android/.idea/compiler.xml +6 -0
  18. package/android/.idea/gradle.xml +6 -1
  19. package/android/.idea/jarRepositories.xml +35 -0
  20. package/android/.idea/kotlinc.xml +6 -0
  21. package/android/.idea/misc.xml +6 -1
  22. package/android/local.properties +1 -1
  23. package/android/src/main/java/com/dispatchsdk/DispatchSdkPackage.kt +3 -1
  24. package/android/src/main/java/com/dispatchsdk/sharedPref/SharedPreferenceModule.kt +166 -0
  25. package/lib/commonjs/@types/assets/index.d.js +2 -0
  26. package/lib/commonjs/@types/assets/index.d.js.map +1 -0
  27. package/lib/commonjs/components/dispatch/DispatchExecNavigator.js +4 -4
  28. package/lib/commonjs/components/dispatch/DispatchExecNavigator.js.map +1 -1
  29. package/lib/commonjs/components/executiontasks/ExecutionTasksIndex.js +0 -28
  30. package/lib/commonjs/components/executiontasks/ExecutionTasksIndex.js.map +1 -1
  31. package/lib/commonjs/components/executiontasks/cancellation/CancelET.js.map +1 -1
  32. package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js +35 -35
  33. package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js.map +1 -1
  34. package/lib/commonjs/components/executiontasks/captureInput/utils.js +13 -0
  35. package/lib/commonjs/components/executiontasks/captureInput/utils.js.map +1 -0
  36. package/lib/commonjs/components/executiontasks/deliver/DeliverET.js +3 -7
  37. package/lib/commonjs/components/executiontasks/deliver/DeliverET.js.map +1 -1
  38. package/lib/commonjs/components/executiontasks/deliver/DeliverETInput.js.map +1 -1
  39. package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js +181 -112
  40. package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
  41. package/lib/commonjs/components/executiontasks/display/DisplayModalET.js +16 -16
  42. package/lib/commonjs/components/executiontasks/display/DisplayModalET.js.map +1 -1
  43. package/lib/commonjs/components/executiontasks/doodle/SignatureET.js +37 -34
  44. package/lib/commonjs/components/executiontasks/doodle/SignatureET.js.map +1 -1
  45. package/lib/commonjs/components/executiontasks/dropCash/DropCashET.js +2 -2
  46. package/lib/commonjs/components/executiontasks/dropCash/DropCashET.js.map +1 -1
  47. package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js +52 -52
  48. package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
  49. package/lib/commonjs/components/executiontasks/forms/FormGenerator.js +71 -66
  50. package/lib/commonjs/components/executiontasks/forms/FormGenerator.js.map +1 -1
  51. package/lib/commonjs/components/executiontasks/forms/widgets/DateTimeWidget.js.map +1 -1
  52. package/lib/commonjs/components/executiontasks/forms/widgets/DropdownWidget.js.map +1 -1
  53. package/lib/commonjs/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js +1 -1
  54. package/lib/commonjs/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js.map +1 -1
  55. package/lib/commonjs/components/executiontasks/forms/widgets/TimeRangeSelector.js.map +1 -1
  56. package/lib/commonjs/components/executiontasks/httpRequest/HttpEtUtils.js +2 -2
  57. package/lib/commonjs/components/executiontasks/httpRequest/HttpEtUtils.js.map +1 -1
  58. package/lib/commonjs/components/executiontasks/httpRequest/HttpRequestET.js +3 -3
  59. package/lib/commonjs/components/executiontasks/httpRequest/HttpRequestET.js.map +1 -1
  60. package/lib/commonjs/components/executiontasks/imageCapture/CaptureSchema.js.map +1 -1
  61. package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js +6 -3
  62. package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
  63. package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js +34 -34
  64. package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
  65. package/lib/commonjs/components/executiontasks/payments/PaymentUtils.js.map +1 -1
  66. package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js +54 -54
  67. package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
  68. package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js +33 -33
  69. package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
  70. package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js +33 -33
  71. package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
  72. package/lib/commonjs/components/executiontasks/pickup/PickupET.js +3 -7
  73. package/lib/commonjs/components/executiontasks/pickup/PickupET.js.map +1 -1
  74. package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js +106 -47
  75. package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js.map +1 -1
  76. package/lib/commonjs/components/executiontasks/scan/ScanET.js +326 -428
  77. package/lib/commonjs/components/executiontasks/scan/ScanET.js.map +1 -1
  78. package/lib/commonjs/components/executiontasks/scan/ScanSchema.js +13 -0
  79. package/lib/commonjs/components/executiontasks/scan/ScanSchema.js.map +1 -1
  80. package/lib/commonjs/components/executiontasks/scan/interfaces.js +15 -1
  81. package/lib/commonjs/components/executiontasks/scan/interfaces.js.map +1 -1
  82. package/lib/commonjs/components/executiontasks/scan/modalConstant.js +104 -0
  83. package/lib/commonjs/components/executiontasks/scan/modalConstant.js.map +1 -0
  84. package/lib/commonjs/components/executiontasks/scan/sub_components/CScanner.js.map +1 -1
  85. package/lib/commonjs/components/executiontasks/scan/sub_components/DropDownUtils.js +72 -37
  86. package/lib/commonjs/components/executiontasks/scan/sub_components/DropDownUtils.js.map +1 -1
  87. package/lib/commonjs/components/executiontasks/scan/sub_components/ERDropDown.js +9 -7
  88. package/lib/commonjs/components/executiontasks/scan/sub_components/ERDropDown.js.map +1 -1
  89. package/lib/commonjs/components/executiontasks/scan/sub_components/SummaryPage.js +1096 -0
  90. package/lib/commonjs/components/executiontasks/scan/sub_components/SummaryPage.js.map +1 -0
  91. package/lib/commonjs/components/executiontasks/scan/utils.js +548 -159
  92. package/lib/commonjs/components/executiontasks/scan/utils.js.map +1 -1
  93. package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPET.js +52 -53
  94. package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPET.js.map +1 -1
  95. package/lib/commonjs/components/executiontasks/validateOTP/sub-components/OTPInput.js +4 -0
  96. package/lib/commonjs/components/executiontasks/validateOTP/sub-components/OTPInput.js.map +1 -1
  97. package/lib/commonjs/components/executiontasks/validateOTP/utils.js.map +1 -1
  98. package/lib/commonjs/components/executiontasks/verifyLocation/GeofenceUtils.js.map +1 -1
  99. package/lib/commonjs/components/executiontasks/verifyLocation/VerifyLocationET.js +1 -1
  100. package/lib/commonjs/components/executiontasks/verifyLocation/VerifyLocationET.js.map +1 -1
  101. package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpET.js +1 -1
  102. package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpET.js.map +1 -1
  103. package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpSchema.js.map +1 -1
  104. package/lib/commonjs/components/utils/index.js +14 -0
  105. package/lib/commonjs/components/utils/index.js.map +1 -0
  106. package/lib/commonjs/components/widgets/AlertDisplay.js.map +1 -1
  107. package/lib/commonjs/components/widgets/CancelOrderDialog.js.map +1 -1
  108. package/lib/commonjs/components/widgets/Card.js +88 -0
  109. package/lib/commonjs/components/widgets/Card.js.map +1 -0
  110. package/lib/commonjs/components/widgets/GoBackModal.js +48 -0
  111. package/lib/commonjs/components/widgets/GoBackModal.js.map +1 -0
  112. package/lib/commonjs/components/widgets/IconButton.js.map +1 -1
  113. package/lib/commonjs/components/widgets/ModalWidget.js +99 -0
  114. package/lib/commonjs/components/widgets/ModalWidget.js.map +1 -0
  115. package/lib/commonjs/components/widgets/ProgressDialog.js.map +1 -1
  116. package/lib/commonjs/components/widgets/SearchBar.js +74 -0
  117. package/lib/commonjs/components/widgets/SearchBar.js.map +1 -0
  118. package/lib/commonjs/components/widgets/SnackBarCustom.js +12 -4
  119. package/lib/commonjs/components/widgets/SnackBarCustom.js.map +1 -1
  120. package/lib/commonjs/components/widgets/SplitTextInput.js.map +1 -1
  121. package/lib/commonjs/components/widgets/TabsComponent.js +64 -0
  122. package/lib/commonjs/components/widgets/TabsComponent.js.map +1 -0
  123. package/lib/commonjs/constants/apiConstants.js +3 -1
  124. package/lib/commonjs/constants/apiConstants.js.map +1 -1
  125. package/lib/commonjs/constants/constants.js +2 -2
  126. package/lib/commonjs/constants/constants.js.map +1 -1
  127. package/lib/commonjs/events/EventDispatcher.js +1 -5
  128. package/lib/commonjs/events/EventDispatcher.js.map +1 -1
  129. package/lib/commonjs/events/constants.js +3 -1
  130. package/lib/commonjs/events/constants.js.map +1 -1
  131. package/lib/commonjs/events/interface.js.map +1 -1
  132. package/lib/commonjs/icons/file.js +24 -0
  133. package/lib/commonjs/icons/file.js.map +1 -0
  134. package/lib/commonjs/icons/interface.js +2 -0
  135. package/lib/commonjs/icons/interface.js.map +1 -0
  136. package/lib/commonjs/index.js +32 -13
  137. package/lib/commonjs/index.js.map +1 -1
  138. package/lib/commonjs/manager/dispatch/DispatchStateContainer.js +315 -609
  139. package/lib/commonjs/manager/dispatch/DispatchStateContainer.js.map +1 -1
  140. package/lib/commonjs/manager/dispatchCodes/EventCodeContainer.js.map +1 -1
  141. package/lib/commonjs/manager/dispatchCodes/EventCodeRepo.js.map +1 -1
  142. package/lib/commonjs/manager/dispatchCodes/ReasonCodeContainer.js.map +1 -1
  143. package/lib/commonjs/manager/dispatchCodes/ReasonCodeRepo.js.map +1 -1
  144. package/lib/commonjs/manager/jobRemoval/JobRemovalManager.js +21 -25
  145. package/lib/commonjs/manager/jobRemoval/JobRemovalManager.js.map +1 -1
  146. package/lib/commonjs/manager/location/LocationManager.js.map +1 -1
  147. package/lib/commonjs/manager/sdk/DispatchSDKManager.js +15 -1
  148. package/lib/commonjs/manager/sdk/DispatchSDKManager.js.map +1 -1
  149. package/lib/commonjs/manager/sdk/DispatchSdkCache.js +2 -2
  150. package/lib/commonjs/manager/sdk/DispatchSdkCache.js.map +1 -1
  151. package/lib/commonjs/manager/sdk/callbacksHandler.js +26 -0
  152. package/lib/commonjs/manager/sdk/callbacksHandler.js.map +1 -0
  153. package/lib/commonjs/manager/syncmanager/AppSyncManager.js +15 -1
  154. package/lib/commonjs/manager/syncmanager/AppSyncManager.js.map +1 -1
  155. package/lib/commonjs/manager/syncmanager/DBConfig.js +36 -3
  156. package/lib/commonjs/manager/syncmanager/DBConfig.js.map +1 -1
  157. package/lib/commonjs/manager/syncmanager/constants.js +17 -0
  158. package/lib/commonjs/manager/syncmanager/constants.js.map +1 -0
  159. package/lib/commonjs/manager/syncmanager/database.js.map +1 -1
  160. package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js +11 -17
  161. package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js.map +1 -1
  162. package/lib/commonjs/manager/syncmanager/document/DocumentManager.js +5 -6
  163. package/lib/commonjs/manager/syncmanager/document/DocumentManager.js.map +1 -1
  164. package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js +16 -6
  165. package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
  166. package/lib/commonjs/manager/syncmanager/events/ETEventsManager.js +377 -26
  167. package/lib/commonjs/manager/syncmanager/events/ETEventsManager.js.map +1 -1
  168. package/lib/commonjs/manager/syncmanager/events/EventsSyncManager.js +183 -65
  169. package/lib/commonjs/manager/syncmanager/events/EventsSyncManager.js.map +1 -1
  170. package/lib/commonjs/manager/syncmanager/events/SyncHttpClient.js +150 -37
  171. package/lib/commonjs/manager/syncmanager/events/SyncHttpClient.js.map +1 -1
  172. package/lib/commonjs/models/DispatchModels.js.map +1 -1
  173. package/lib/commonjs/models/execTasks/ETBaseModels.js +4 -0
  174. package/lib/commonjs/models/execTasks/ETBaseModels.js.map +1 -1
  175. package/lib/commonjs/models/sdk.js.map +1 -1
  176. package/lib/commonjs/native/signature/SignatureCapture.js.map +1 -1
  177. package/lib/commonjs/network/GraphQLClient.js.map +1 -1
  178. package/lib/commonjs/network/NetworkClient.js.map +1 -1
  179. package/lib/commonjs/network/NetworkUtils.js.map +1 -1
  180. package/lib/commonjs/network/client.js.map +1 -1
  181. package/lib/commonjs/resources/Login.js.map +1 -1
  182. package/lib/commonjs/resources/network.js.map +1 -1
  183. package/lib/commonjs/styles/SdkColors.js +4 -2
  184. package/lib/commonjs/styles/SdkColors.js.map +1 -1
  185. package/lib/commonjs/styles/executionTasks/CommonStyles.js +19 -10
  186. package/lib/commonjs/styles/executionTasks/CommonStyles.js.map +1 -1
  187. package/lib/commonjs/ui/screens/CancellationScreen.js +38 -7
  188. package/lib/commonjs/ui/screens/CancellationScreen.js.map +1 -1
  189. package/lib/commonjs/ui/screens/CaptureInputScreen.js +11 -3
  190. package/lib/commonjs/ui/screens/CaptureInputScreen.js.map +1 -1
  191. package/lib/commonjs/ui/screens/CompleteObjectiveScreen.js +11 -4
  192. package/lib/commonjs/ui/screens/CompleteObjectiveScreen.js.map +1 -1
  193. package/lib/commonjs/ui/screens/DeliverScreen.js +26 -4
  194. package/lib/commonjs/ui/screens/DeliverScreen.js.map +1 -1
  195. package/lib/commonjs/ui/screens/DisplayScreen.js +11 -2
  196. package/lib/commonjs/ui/screens/DisplayScreen.js.map +1 -1
  197. package/lib/commonjs/ui/screens/DoodleScreen.js +13 -6
  198. package/lib/commonjs/ui/screens/DoodleScreen.js.map +1 -1
  199. package/lib/commonjs/ui/screens/DropCashScreen.js +39 -15
  200. package/lib/commonjs/ui/screens/DropCashScreen.js.map +1 -1
  201. package/lib/commonjs/ui/screens/ETScreensIndex.js +0 -7
  202. package/lib/commonjs/ui/screens/ETScreensIndex.js.map +1 -1
  203. package/lib/commonjs/ui/screens/FormsScreen.js +95 -28
  204. package/lib/commonjs/ui/screens/FormsScreen.js.map +1 -1
  205. package/lib/commonjs/ui/screens/GeofenceScreen.js +10 -2
  206. package/lib/commonjs/ui/screens/GeofenceScreen.js.map +1 -1
  207. package/lib/commonjs/ui/screens/HttpRequestScreen.js +10 -2
  208. package/lib/commonjs/ui/screens/HttpRequestScreen.js.map +1 -1
  209. package/lib/commonjs/ui/screens/ImageCaptureScreen.js +26 -18
  210. package/lib/commonjs/ui/screens/ImageCaptureScreen.js.map +1 -1
  211. package/lib/commonjs/ui/screens/PaymentScreen.js +22 -11
  212. package/lib/commonjs/ui/screens/PaymentScreen.js.map +1 -1
  213. package/lib/commonjs/ui/screens/PickupScreen.js +34 -8
  214. package/lib/commonjs/ui/screens/PickupScreen.js.map +1 -1
  215. package/lib/commonjs/ui/screens/ScanScreen.js +72 -219
  216. package/lib/commonjs/ui/screens/ScanScreen.js.map +1 -1
  217. package/lib/commonjs/ui/screens/StartWorkFlowScreen.js +51 -16
  218. package/lib/commonjs/ui/screens/StartWorkFlowScreen.js.map +1 -1
  219. package/lib/commonjs/ui/screens/ValidateOTPScreen.js +13 -7
  220. package/lib/commonjs/ui/screens/ValidateOTPScreen.js.map +1 -1
  221. package/lib/commonjs/ui/screens/WithBaseDispatchScreen.js.map +1 -1
  222. package/lib/commonjs/ui/uiConfig/RouteParams.js +20 -5
  223. package/lib/commonjs/ui/uiConfig/RouteParams.js.map +1 -1
  224. package/lib/commonjs/utils/ApiUtils.js +16 -2
  225. package/lib/commonjs/utils/ApiUtils.js.map +1 -1
  226. package/lib/commonjs/utils/ExecTaskUtils.js +33 -25
  227. package/lib/commonjs/utils/ExecTaskUtils.js.map +1 -1
  228. package/lib/commonjs/utils/Logger.js.map +1 -1
  229. package/lib/commonjs/utils/NetworkUtil.js.map +1 -1
  230. package/lib/commonjs/utils/SdkUtils.js.map +1 -1
  231. package/lib/commonjs/utils/SyncManagerUtils.js +37 -4
  232. package/lib/commonjs/utils/SyncManagerUtils.js.map +1 -1
  233. package/lib/commonjs/utils/fcm/FCM.js +64 -35
  234. package/lib/commonjs/utils/fcm/FCM.js.map +1 -1
  235. package/lib/commonjs/utils/fcm/FcmUtils.js +82 -46
  236. package/lib/commonjs/utils/fcm/FcmUtils.js.map +1 -1
  237. package/lib/commonjs/utils/helper.js.map +1 -1
  238. package/lib/commonjs/utils/hooks/useModal.js +53 -0
  239. package/lib/commonjs/utils/hooks/useModal.js.map +1 -0
  240. package/lib/commonjs/utils/loginHelper.js.map +1 -1
  241. package/lib/commonjs/utils/storage.js +37 -2
  242. package/lib/commonjs/utils/storage.js.map +1 -1
  243. package/lib/commonjs/utils/utils.js.map +1 -1
  244. package/lib/module/@types/assets/index.d.js +2 -0
  245. package/lib/module/@types/assets/index.d.js.map +1 -0
  246. package/lib/module/components/dispatch/DispatchExecNavigator.js +4 -4
  247. package/lib/module/components/dispatch/DispatchExecNavigator.js.map +1 -1
  248. package/lib/module/components/executiontasks/ExecutionTasksIndex.js +1 -5
  249. package/lib/module/components/executiontasks/ExecutionTasksIndex.js.map +1 -1
  250. package/lib/module/components/executiontasks/cancellation/CancelET.js.map +1 -1
  251. package/lib/module/components/executiontasks/captureInput/CaptureText.js +38 -37
  252. package/lib/module/components/executiontasks/captureInput/CaptureText.js.map +1 -1
  253. package/lib/module/components/executiontasks/captureInput/utils.js +7 -0
  254. package/lib/module/components/executiontasks/captureInput/utils.js.map +1 -0
  255. package/lib/module/components/executiontasks/deliver/DeliverET.js +4 -8
  256. package/lib/module/components/executiontasks/deliver/DeliverET.js.map +1 -1
  257. package/lib/module/components/executiontasks/deliver/DeliverETInput.js.map +1 -1
  258. package/lib/module/components/executiontasks/deliver/SLDeliverET.js +183 -114
  259. package/lib/module/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
  260. package/lib/module/components/executiontasks/display/DisplayModalET.js +16 -16
  261. package/lib/module/components/executiontasks/display/DisplayModalET.js.map +1 -1
  262. package/lib/module/components/executiontasks/doodle/SignatureET.js +39 -36
  263. package/lib/module/components/executiontasks/doodle/SignatureET.js.map +1 -1
  264. package/lib/module/components/executiontasks/dropCash/DropCashET.js +2 -2
  265. package/lib/module/components/executiontasks/dropCash/DropCashET.js.map +1 -1
  266. package/lib/module/components/executiontasks/dropCash/SLDropCash.js +53 -52
  267. package/lib/module/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
  268. package/lib/module/components/executiontasks/forms/FormGenerator.js +73 -68
  269. package/lib/module/components/executiontasks/forms/FormGenerator.js.map +1 -1
  270. package/lib/module/components/executiontasks/forms/widgets/DateTimeWidget.js.map +1 -1
  271. package/lib/module/components/executiontasks/forms/widgets/DropdownWidget.js.map +1 -1
  272. package/lib/module/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js +1 -1
  273. package/lib/module/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js.map +1 -1
  274. package/lib/module/components/executiontasks/forms/widgets/TimeRangeSelector.js.map +1 -1
  275. package/lib/module/components/executiontasks/httpRequest/HttpEtUtils.js +3 -3
  276. package/lib/module/components/executiontasks/httpRequest/HttpEtUtils.js.map +1 -1
  277. package/lib/module/components/executiontasks/httpRequest/HttpRequestET.js +3 -3
  278. package/lib/module/components/executiontasks/httpRequest/HttpRequestET.js.map +1 -1
  279. package/lib/module/components/executiontasks/imageCapture/CaptureSchema.js.map +1 -1
  280. package/lib/module/components/executiontasks/imageCapture/CaptureUtils.js +6 -3
  281. package/lib/module/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
  282. package/lib/module/components/executiontasks/imageCapture/ImageCapture.js +36 -36
  283. package/lib/module/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
  284. package/lib/module/components/executiontasks/payments/PaymentUtils.js.map +1 -1
  285. package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentET.js +55 -54
  286. package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
  287. package/lib/module/components/executiontasks/payments/init/InitPaymentET.js +35 -34
  288. package/lib/module/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
  289. package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentET.js +35 -35
  290. package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
  291. package/lib/module/components/executiontasks/pickup/PickupET.js +4 -8
  292. package/lib/module/components/executiontasks/pickup/PickupET.js.map +1 -1
  293. package/lib/module/components/executiontasks/pickup/SLPickupET.js +108 -49
  294. package/lib/module/components/executiontasks/pickup/SLPickupET.js.map +1 -1
  295. package/lib/module/components/executiontasks/scan/ScanET.js +332 -433
  296. package/lib/module/components/executiontasks/scan/ScanET.js.map +1 -1
  297. package/lib/module/components/executiontasks/scan/ScanSchema.js +16 -1
  298. package/lib/module/components/executiontasks/scan/ScanSchema.js.map +1 -1
  299. package/lib/module/components/executiontasks/scan/interfaces.js +12 -0
  300. package/lib/module/components/executiontasks/scan/interfaces.js.map +1 -1
  301. package/lib/module/components/executiontasks/scan/modalConstant.js +94 -0
  302. package/lib/module/components/executiontasks/scan/modalConstant.js.map +1 -0
  303. package/lib/module/components/executiontasks/scan/sub_components/CScanner.js.map +1 -1
  304. package/lib/module/components/executiontasks/scan/sub_components/DropDownUtils.js +72 -37
  305. package/lib/module/components/executiontasks/scan/sub_components/DropDownUtils.js.map +1 -1
  306. package/lib/module/components/executiontasks/scan/sub_components/ERDropDown.js +9 -7
  307. package/lib/module/components/executiontasks/scan/sub_components/ERDropDown.js.map +1 -1
  308. package/lib/module/components/executiontasks/scan/sub_components/SummaryPage.js +1089 -0
  309. package/lib/module/components/executiontasks/scan/sub_components/SummaryPage.js.map +1 -0
  310. package/lib/module/components/executiontasks/scan/utils.js +528 -160
  311. package/lib/module/components/executiontasks/scan/utils.js.map +1 -1
  312. package/lib/module/components/executiontasks/validateOTP/ValidateOTPET.js +54 -55
  313. package/lib/module/components/executiontasks/validateOTP/ValidateOTPET.js.map +1 -1
  314. package/lib/module/components/executiontasks/validateOTP/sub-components/OTPInput.js +4 -0
  315. package/lib/module/components/executiontasks/validateOTP/sub-components/OTPInput.js.map +1 -1
  316. package/lib/module/components/executiontasks/validateOTP/utils.js.map +1 -1
  317. package/lib/module/components/executiontasks/verifyLocation/GeofenceUtils.js.map +1 -1
  318. package/lib/module/components/executiontasks/verifyLocation/VerifyLocationET.js +1 -1
  319. package/lib/module/components/executiontasks/verifyLocation/VerifyLocationET.js.map +1 -1
  320. package/lib/module/components/executiontasks/verifyOtp/VerifyOtpET.js +2 -2
  321. package/lib/module/components/executiontasks/verifyOtp/VerifyOtpET.js.map +1 -1
  322. package/lib/module/components/executiontasks/verifyOtp/VerifyOtpSchema.js.map +1 -1
  323. package/lib/module/components/utils/index.js +8 -0
  324. package/lib/module/components/utils/index.js.map +1 -0
  325. package/lib/module/components/widgets/AlertDisplay.js.map +1 -1
  326. package/lib/module/components/widgets/CancelOrderDialog.js.map +1 -1
  327. package/lib/module/components/widgets/Card.js +80 -0
  328. package/lib/module/components/widgets/Card.js.map +1 -0
  329. package/lib/module/components/widgets/GoBackModal.js +40 -0
  330. package/lib/module/components/widgets/GoBackModal.js.map +1 -0
  331. package/lib/module/components/widgets/IconButton.js.map +1 -1
  332. package/lib/module/components/widgets/ModalWidget.js +92 -0
  333. package/lib/module/components/widgets/ModalWidget.js.map +1 -0
  334. package/lib/module/components/widgets/ProgressDialog.js.map +1 -1
  335. package/lib/module/components/widgets/SearchBar.js +66 -0
  336. package/lib/module/components/widgets/SearchBar.js.map +1 -0
  337. package/lib/module/components/widgets/SnackBarCustom.js +12 -4
  338. package/lib/module/components/widgets/SnackBarCustom.js.map +1 -1
  339. package/lib/module/components/widgets/SplitTextInput.js.map +1 -1
  340. package/lib/module/components/widgets/TabsComponent.js +55 -0
  341. package/lib/module/components/widgets/TabsComponent.js.map +1 -0
  342. package/lib/module/constants/apiConstants.js +3 -1
  343. package/lib/module/constants/apiConstants.js.map +1 -1
  344. package/lib/module/constants/constants.js +2 -2
  345. package/lib/module/constants/constants.js.map +1 -1
  346. package/lib/module/events/EventDispatcher.js +0 -3
  347. package/lib/module/events/EventDispatcher.js.map +1 -1
  348. package/lib/module/events/constants.js +3 -1
  349. package/lib/module/events/constants.js.map +1 -1
  350. package/lib/module/events/interface.js.map +1 -1
  351. package/lib/module/icons/file.js +16 -0
  352. package/lib/module/icons/file.js.map +1 -0
  353. package/lib/module/icons/interface.js +2 -0
  354. package/lib/module/icons/interface.js.map +1 -0
  355. package/lib/module/index.js +6 -3
  356. package/lib/module/index.js.map +1 -1
  357. package/lib/module/manager/dispatch/DispatchStateContainer.js +319 -610
  358. package/lib/module/manager/dispatch/DispatchStateContainer.js.map +1 -1
  359. package/lib/module/manager/dispatchCodes/EventCodeContainer.js.map +1 -1
  360. package/lib/module/manager/dispatchCodes/EventCodeRepo.js.map +1 -1
  361. package/lib/module/manager/dispatchCodes/ReasonCodeContainer.js.map +1 -1
  362. package/lib/module/manager/dispatchCodes/ReasonCodeRepo.js.map +1 -1
  363. package/lib/module/manager/jobRemoval/JobRemovalManager.js +21 -19
  364. package/lib/module/manager/jobRemoval/JobRemovalManager.js.map +1 -1
  365. package/lib/module/manager/location/LocationManager.js.map +1 -1
  366. package/lib/module/manager/sdk/DispatchSDKManager.js +15 -1
  367. package/lib/module/manager/sdk/DispatchSDKManager.js.map +1 -1
  368. package/lib/module/manager/sdk/DispatchSdkCache.js +2 -2
  369. package/lib/module/manager/sdk/DispatchSdkCache.js.map +1 -1
  370. package/lib/module/manager/sdk/callbacksHandler.js +19 -0
  371. package/lib/module/manager/sdk/callbacksHandler.js.map +1 -0
  372. package/lib/module/manager/syncmanager/AppSyncManager.js +15 -1
  373. package/lib/module/manager/syncmanager/AppSyncManager.js.map +1 -1
  374. package/lib/module/manager/syncmanager/DBConfig.js +32 -2
  375. package/lib/module/manager/syncmanager/DBConfig.js.map +1 -1
  376. package/lib/module/manager/syncmanager/constants.js +6 -0
  377. package/lib/module/manager/syncmanager/constants.js.map +1 -0
  378. package/lib/module/manager/syncmanager/database.js.map +1 -1
  379. package/lib/module/manager/syncmanager/document/DocumentHttpClient.js +11 -17
  380. package/lib/module/manager/syncmanager/document/DocumentHttpClient.js.map +1 -1
  381. package/lib/module/manager/syncmanager/document/DocumentManager.js +5 -6
  382. package/lib/module/manager/syncmanager/document/DocumentManager.js.map +1 -1
  383. package/lib/module/manager/syncmanager/document/DocumentSyncManager.js +16 -6
  384. package/lib/module/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
  385. package/lib/module/manager/syncmanager/events/ETEventsManager.js +377 -25
  386. package/lib/module/manager/syncmanager/events/ETEventsManager.js.map +1 -1
  387. package/lib/module/manager/syncmanager/events/EventsSyncManager.js +183 -65
  388. package/lib/module/manager/syncmanager/events/EventsSyncManager.js.map +1 -1
  389. package/lib/module/manager/syncmanager/events/SyncHttpClient.js +147 -34
  390. package/lib/module/manager/syncmanager/events/SyncHttpClient.js.map +1 -1
  391. package/lib/module/models/DispatchModels.js.map +1 -1
  392. package/lib/module/models/execTasks/ETBaseModels.js +1 -1
  393. package/lib/module/models/execTasks/ETBaseModels.js.map +1 -1
  394. package/lib/module/models/sdk.js.map +1 -1
  395. package/lib/module/native/signature/SignatureCapture.js.map +1 -1
  396. package/lib/module/network/GraphQLClient.js.map +1 -1
  397. package/lib/module/network/NetworkClient.js.map +1 -1
  398. package/lib/module/network/NetworkUtils.js.map +1 -1
  399. package/lib/module/network/client.js.map +1 -1
  400. package/lib/module/resources/Login.js.map +1 -1
  401. package/lib/module/resources/network.js.map +1 -1
  402. package/lib/module/styles/SdkColors.js +4 -2
  403. package/lib/module/styles/SdkColors.js.map +1 -1
  404. package/lib/module/styles/executionTasks/CommonStyles.js +19 -10
  405. package/lib/module/styles/executionTasks/CommonStyles.js.map +1 -1
  406. package/lib/module/ui/screens/CancellationScreen.js +39 -8
  407. package/lib/module/ui/screens/CancellationScreen.js.map +1 -1
  408. package/lib/module/ui/screens/CaptureInputScreen.js +12 -4
  409. package/lib/module/ui/screens/CaptureInputScreen.js.map +1 -1
  410. package/lib/module/ui/screens/CompleteObjectiveScreen.js +12 -5
  411. package/lib/module/ui/screens/CompleteObjectiveScreen.js.map +1 -1
  412. package/lib/module/ui/screens/DeliverScreen.js +27 -5
  413. package/lib/module/ui/screens/DeliverScreen.js.map +1 -1
  414. package/lib/module/ui/screens/DisplayScreen.js +12 -3
  415. package/lib/module/ui/screens/DisplayScreen.js.map +1 -1
  416. package/lib/module/ui/screens/DoodleScreen.js +14 -7
  417. package/lib/module/ui/screens/DoodleScreen.js.map +1 -1
  418. package/lib/module/ui/screens/DropCashScreen.js +42 -16
  419. package/lib/module/ui/screens/DropCashScreen.js.map +1 -1
  420. package/lib/module/ui/screens/ETScreensIndex.js +1 -2
  421. package/lib/module/ui/screens/ETScreensIndex.js.map +1 -1
  422. package/lib/module/ui/screens/FormsScreen.js +96 -29
  423. package/lib/module/ui/screens/FormsScreen.js.map +1 -1
  424. package/lib/module/ui/screens/GeofenceScreen.js +11 -3
  425. package/lib/module/ui/screens/GeofenceScreen.js.map +1 -1
  426. package/lib/module/ui/screens/HttpRequestScreen.js +11 -3
  427. package/lib/module/ui/screens/HttpRequestScreen.js.map +1 -1
  428. package/lib/module/ui/screens/ImageCaptureScreen.js +27 -19
  429. package/lib/module/ui/screens/ImageCaptureScreen.js.map +1 -1
  430. package/lib/module/ui/screens/PaymentScreen.js +23 -12
  431. package/lib/module/ui/screens/PaymentScreen.js.map +1 -1
  432. package/lib/module/ui/screens/PickupScreen.js +36 -10
  433. package/lib/module/ui/screens/PickupScreen.js.map +1 -1
  434. package/lib/module/ui/screens/ScanScreen.js +74 -222
  435. package/lib/module/ui/screens/ScanScreen.js.map +1 -1
  436. package/lib/module/ui/screens/StartWorkFlowScreen.js +51 -16
  437. package/lib/module/ui/screens/StartWorkFlowScreen.js.map +1 -1
  438. package/lib/module/ui/screens/ValidateOTPScreen.js +14 -8
  439. package/lib/module/ui/screens/ValidateOTPScreen.js.map +1 -1
  440. package/lib/module/ui/screens/WithBaseDispatchScreen.js.map +1 -1
  441. package/lib/module/ui/uiConfig/RouteParams.js +19 -5
  442. package/lib/module/ui/uiConfig/RouteParams.js.map +1 -1
  443. package/lib/module/utils/ApiUtils.js +17 -2
  444. package/lib/module/utils/ApiUtils.js.map +1 -1
  445. package/lib/module/utils/ExecTaskUtils.js +33 -25
  446. package/lib/module/utils/ExecTaskUtils.js.map +1 -1
  447. package/lib/module/utils/Logger.js.map +1 -1
  448. package/lib/module/utils/NetworkUtil.js.map +1 -1
  449. package/lib/module/utils/SdkUtils.js.map +1 -1
  450. package/lib/module/utils/SyncManagerUtils.js +37 -4
  451. package/lib/module/utils/SyncManagerUtils.js.map +1 -1
  452. package/lib/module/utils/fcm/FCM.js +64 -35
  453. package/lib/module/utils/fcm/FCM.js.map +1 -1
  454. package/lib/module/utils/fcm/FcmUtils.js +82 -46
  455. package/lib/module/utils/fcm/FcmUtils.js.map +1 -1
  456. package/lib/module/utils/helper.js.map +1 -1
  457. package/lib/module/utils/hooks/useModal.js +43 -0
  458. package/lib/module/utils/hooks/useModal.js.map +1 -0
  459. package/lib/module/utils/loginHelper.js.map +1 -1
  460. package/lib/module/utils/storage.js +37 -2
  461. package/lib/module/utils/storage.js.map +1 -1
  462. package/lib/module/utils/utils.js.map +1 -1
  463. package/lib/typescript/components/dispatch/DispatchExecNavigator.d.ts +2 -2
  464. package/lib/typescript/components/executiontasks/ExecutionTasksIndex.d.ts +3 -8
  465. package/lib/typescript/components/executiontasks/cancellation/CancelET.d.ts +2 -2
  466. package/lib/typescript/components/executiontasks/captureInput/CaptureText.d.ts +2 -2
  467. package/lib/typescript/components/executiontasks/captureInput/utils.d.ts +1 -0
  468. package/lib/typescript/components/executiontasks/deliver/DeliverET.d.ts +2 -2
  469. package/lib/typescript/components/executiontasks/deliver/DeliverETInput.d.ts +1 -0
  470. package/lib/typescript/components/executiontasks/deliver/SLDeliverET.d.ts +3 -3
  471. package/lib/typescript/components/executiontasks/display/DisplayModalET.d.ts +2 -2
  472. package/lib/typescript/components/executiontasks/doodle/SignatureET.d.ts +2 -2
  473. package/lib/typescript/components/executiontasks/dropCash/DropCashET.d.ts +2 -2
  474. package/lib/typescript/components/executiontasks/dropCash/SLDropCash.d.ts +2 -2
  475. package/lib/typescript/components/executiontasks/forms/FormGenerator.d.ts +2 -2
  476. package/lib/typescript/components/executiontasks/forms/widgets/DateTimeWidget.d.ts +2 -2
  477. package/lib/typescript/components/executiontasks/forms/widgets/DropdownWidget.d.ts +2 -2
  478. package/lib/typescript/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.d.ts +2 -2
  479. package/lib/typescript/components/executiontasks/forms/widgets/TimeRangeSelector.d.ts +2 -2
  480. package/lib/typescript/components/executiontasks/httpRequest/HttpEtUtils.d.ts +1 -1
  481. package/lib/typescript/components/executiontasks/httpRequest/HttpRequestET.d.ts +2 -2
  482. package/lib/typescript/components/executiontasks/imageCapture/CaptureSchema.d.ts +1 -0
  483. package/lib/typescript/components/executiontasks/imageCapture/ImageCapture.d.ts +2 -2
  484. package/lib/typescript/components/executiontasks/payments/completePayment/CompletePaymentET.d.ts +2 -2
  485. package/lib/typescript/components/executiontasks/payments/init/InitPaymentET.d.ts +2 -2
  486. package/lib/typescript/components/executiontasks/payments/processPayment/ProcessPaymentET.d.ts +2 -2
  487. package/lib/typescript/components/executiontasks/pickup/PickupET.d.ts +2 -2
  488. package/lib/typescript/components/executiontasks/pickup/SLPickupET.d.ts +3 -3
  489. package/lib/typescript/components/executiontasks/scan/ScanET.d.ts +3 -3
  490. package/lib/typescript/components/executiontasks/scan/ScanSchema.d.ts +25 -9
  491. package/lib/typescript/components/executiontasks/scan/interfaces.d.ts +54 -1
  492. package/lib/typescript/components/executiontasks/scan/modalConstant.d.ts +37 -0
  493. package/lib/typescript/components/executiontasks/scan/sub_components/CScanner.d.ts +1 -1
  494. package/lib/typescript/components/executiontasks/scan/sub_components/DropDownUtils.d.ts +1 -1
  495. package/lib/typescript/components/executiontasks/scan/sub_components/ERDropDown.d.ts +1 -1
  496. package/lib/typescript/components/executiontasks/scan/sub_components/SummaryPage.d.ts +21 -0
  497. package/lib/typescript/components/executiontasks/scan/utils.d.ts +29 -13
  498. package/lib/typescript/components/executiontasks/validateOTP/ValidateOTPET.d.ts +2 -2
  499. package/lib/typescript/components/executiontasks/validateOTP/sub-components/OTPInput.d.ts +2 -2
  500. package/lib/typescript/components/executiontasks/verifyLocation/VerifyLocationET.d.ts +2 -2
  501. package/lib/typescript/components/executiontasks/verifyOtp/VerifyOtpET.d.ts +2 -2
  502. package/lib/typescript/components/executiontasks/verifyOtp/VerifyOtpSchema.d.ts +3 -3
  503. package/lib/typescript/components/utils/index.d.ts +2 -0
  504. package/lib/typescript/components/widgets/CancelOrderDialog.d.ts +2 -2
  505. package/lib/typescript/components/widgets/Card.d.ts +17 -0
  506. package/lib/typescript/components/widgets/GoBackModal.d.ts +9 -0
  507. package/lib/typescript/components/widgets/IconButton.d.ts +2 -2
  508. package/lib/typescript/components/widgets/ModalWidget.d.ts +30 -0
  509. package/lib/typescript/components/widgets/ProgressDialog.d.ts +2 -2
  510. package/lib/typescript/components/widgets/SearchBar.d.ts +10 -0
  511. package/lib/typescript/components/widgets/SnackBarCustom.d.ts +3 -2
  512. package/lib/typescript/components/widgets/SplitTextInput.d.ts +2 -2
  513. package/lib/typescript/components/widgets/TabsComponent.d.ts +15 -0
  514. package/lib/typescript/constants/apiConstants.d.ts +1 -0
  515. package/lib/typescript/constants/constants.d.ts +2 -2
  516. package/lib/typescript/events/EventDispatcher.d.ts +0 -2
  517. package/lib/typescript/events/constants.d.ts +2 -0
  518. package/lib/typescript/events/interface.d.ts +1 -1
  519. package/lib/typescript/icons/file.d.ts +4 -0
  520. package/lib/typescript/icons/interface.d.ts +5 -0
  521. package/lib/typescript/index.d.ts +8 -6
  522. package/lib/typescript/manager/dispatch/DispatchStateContainer.d.ts +27 -19
  523. package/lib/typescript/manager/jobRemoval/JobRemovalManager.d.ts +0 -6
  524. package/lib/typescript/manager/sdk/DispatchSdkCache.d.ts +0 -1
  525. package/lib/typescript/manager/sdk/callbacksHandler.d.ts +13 -0
  526. package/lib/typescript/manager/syncmanager/AppSyncManager.d.ts +2 -1
  527. package/lib/typescript/manager/syncmanager/DBConfig.d.ts +63 -7
  528. package/lib/typescript/manager/syncmanager/constants.d.ts +5 -0
  529. package/lib/typescript/manager/syncmanager/document/DocumentManager.d.ts +1 -1
  530. package/lib/typescript/manager/syncmanager/document/DocumentSyncManager.d.ts +1 -1
  531. package/lib/typescript/manager/syncmanager/events/ETEventsManager.d.ts +11 -2
  532. package/lib/typescript/manager/syncmanager/events/EventsSyncManager.d.ts +3 -5
  533. package/lib/typescript/manager/syncmanager/events/SyncHttpClient.d.ts +4 -3
  534. package/lib/typescript/models/DispatchModels.d.ts +40 -41
  535. package/lib/typescript/models/execTasks/ETBaseModels.d.ts +21 -16
  536. package/lib/typescript/models/sdk.d.ts +7 -0
  537. package/lib/typescript/native/signature/SignatureCapture.d.ts +1 -1
  538. package/lib/typescript/styles/SdkColors.d.ts +1 -0
  539. package/lib/typescript/styles/executionTasks/CommonStyles.d.ts +16 -7
  540. package/lib/typescript/ui/screens/CancellationScreen.d.ts +2 -2
  541. package/lib/typescript/ui/screens/CaptureInputScreen.d.ts +2 -2
  542. package/lib/typescript/ui/screens/CompleteObjectiveScreen.d.ts +2 -2
  543. package/lib/typescript/ui/screens/DeliverScreen.d.ts +2 -2
  544. package/lib/typescript/ui/screens/DisplayScreen.d.ts +2 -2
  545. package/lib/typescript/ui/screens/DoodleScreen.d.ts +2 -2
  546. package/lib/typescript/ui/screens/DropCashScreen.d.ts +2 -2
  547. package/lib/typescript/ui/screens/ETScreensIndex.d.ts +1 -2
  548. package/lib/typescript/ui/screens/FormsScreen.d.ts +2 -2
  549. package/lib/typescript/ui/screens/GeofenceScreen.d.ts +2 -2
  550. package/lib/typescript/ui/screens/HttpRequestScreen.d.ts +1 -1
  551. package/lib/typescript/ui/screens/ImageCaptureScreen.d.ts +2 -2
  552. package/lib/typescript/ui/screens/PaymentScreen.d.ts +2 -2
  553. package/lib/typescript/ui/screens/PickupScreen.d.ts +2 -2
  554. package/lib/typescript/ui/screens/ScanScreen.d.ts +2 -2
  555. package/lib/typescript/ui/screens/StartWorkFlowScreen.d.ts +2 -2
  556. package/lib/typescript/ui/screens/ValidateOTPScreen.d.ts +2 -2
  557. package/lib/typescript/ui/screens/WithBaseDispatchScreen.d.ts +2 -2
  558. package/lib/typescript/ui/uiConfig/RouteParams.d.ts +10 -4
  559. package/lib/typescript/utils/ExecTaskUtils.d.ts +5 -4
  560. package/lib/typescript/utils/SyncManagerUtils.d.ts +4 -5
  561. package/lib/typescript/utils/hooks/useModal.d.ts +6 -0
  562. package/lib/typescript/utils/storage.d.ts +15 -0
  563. package/package.json +5 -4
  564. package/tsconfig.json +0 -1
  565. package/android/.gradle/6.8/fileHashes/fileHashes.lock +0 -0
  566. package/android/.idea/workspace.xml +0 -131
  567. package/lib/commonjs/components/executiontasks/doodle/DoodleUtils.js +0 -26
  568. package/lib/commonjs/components/executiontasks/doodle/DoodleUtils.js.map +0 -1
  569. package/lib/commonjs/components/executiontasks/scan/sub_components/ScanList.js +0 -134
  570. package/lib/commonjs/components/executiontasks/scan/sub_components/ScanList.js.map +0 -1
  571. package/lib/commonjs/components/executiontasks/scanner/CScanner.js +0 -105
  572. package/lib/commonjs/components/executiontasks/scanner/CScanner.js.map +0 -1
  573. package/lib/commonjs/components/executiontasks/scanner/ScannerSchema.js +0 -27
  574. package/lib/commonjs/components/executiontasks/scanner/ScannerSchema.js.map +0 -1
  575. package/lib/commonjs/components/executiontasks/scanner/ScannerUtils.js +0 -164
  576. package/lib/commonjs/components/executiontasks/scanner/ScannerUtils.js.map +0 -1
  577. package/lib/commonjs/components/executiontasks/scanner/returns/DropDownSelector.js +0 -15
  578. package/lib/commonjs/components/executiontasks/scanner/returns/DropDownSelector.js.map +0 -1
  579. package/lib/commonjs/components/executiontasks/scanner/returns/DropDownUtils.js +0 -40
  580. package/lib/commonjs/components/executiontasks/scanner/returns/DropDownUtils.js.map +0 -1
  581. package/lib/commonjs/components/executiontasks/scanner/returns/RTReasonSelection.js +0 -93
  582. package/lib/commonjs/components/executiontasks/scanner/returns/RTReasonSelection.js.map +0 -1
  583. package/lib/commonjs/components/executiontasks/scanner/returns/RTScan.js +0 -278
  584. package/lib/commonjs/components/executiontasks/scanner/returns/RTScan.js.map +0 -1
  585. package/lib/commonjs/components/executiontasks/scanner/returns/ReasonDropDown.js +0 -83
  586. package/lib/commonjs/components/executiontasks/scanner/returns/ReasonDropDown.js.map +0 -1
  587. package/lib/commonjs/components/executiontasks/scanner/returns/ScanList.js +0 -248
  588. package/lib/commonjs/components/executiontasks/scanner/returns/ScanList.js.map +0 -1
  589. package/lib/commonjs/ui/screens/RTScanScreen.js +0 -99
  590. package/lib/commonjs/ui/screens/RTScanScreen.js.map +0 -1
  591. package/lib/module/components/executiontasks/doodle/DoodleUtils.js +0 -19
  592. package/lib/module/components/executiontasks/doodle/DoodleUtils.js.map +0 -1
  593. package/lib/module/components/executiontasks/scan/sub_components/ScanList.js +0 -124
  594. package/lib/module/components/executiontasks/scan/sub_components/ScanList.js.map +0 -1
  595. package/lib/module/components/executiontasks/scanner/CScanner.js +0 -96
  596. package/lib/module/components/executiontasks/scanner/CScanner.js.map +0 -1
  597. package/lib/module/components/executiontasks/scanner/ScannerSchema.js +0 -24
  598. package/lib/module/components/executiontasks/scanner/ScannerSchema.js.map +0 -1
  599. package/lib/module/components/executiontasks/scanner/ScannerUtils.js +0 -146
  600. package/lib/module/components/executiontasks/scanner/ScannerUtils.js.map +0 -1
  601. package/lib/module/components/executiontasks/scanner/returns/DropDownSelector.js +0 -7
  602. package/lib/module/components/executiontasks/scanner/returns/DropDownSelector.js.map +0 -1
  603. package/lib/module/components/executiontasks/scanner/returns/DropDownUtils.js +0 -33
  604. package/lib/module/components/executiontasks/scanner/returns/DropDownUtils.js.map +0 -1
  605. package/lib/module/components/executiontasks/scanner/returns/RTReasonSelection.js +0 -83
  606. package/lib/module/components/executiontasks/scanner/returns/RTReasonSelection.js.map +0 -1
  607. package/lib/module/components/executiontasks/scanner/returns/RTScan.js +0 -269
  608. package/lib/module/components/executiontasks/scanner/returns/RTScan.js.map +0 -1
  609. package/lib/module/components/executiontasks/scanner/returns/ReasonDropDown.js +0 -73
  610. package/lib/module/components/executiontasks/scanner/returns/ReasonDropDown.js.map +0 -1
  611. package/lib/module/components/executiontasks/scanner/returns/ScanList.js +0 -238
  612. package/lib/module/components/executiontasks/scanner/returns/ScanList.js.map +0 -1
  613. package/lib/module/ui/screens/RTScanScreen.js +0 -89
  614. package/lib/module/ui/screens/RTScanScreen.js.map +0 -1
  615. package/lib/typescript/components/executiontasks/doodle/DoodleUtils.d.ts +0 -3
  616. package/lib/typescript/components/executiontasks/scan/sub_components/ScanList.d.ts +0 -8
  617. package/lib/typescript/components/executiontasks/scanner/CScanner.d.ts +0 -7
  618. package/lib/typescript/components/executiontasks/scanner/ScannerSchema.d.ts +0 -75
  619. package/lib/typescript/components/executiontasks/scanner/ScannerUtils.d.ts +0 -15
  620. package/lib/typescript/components/executiontasks/scanner/returns/DropDownSelector.d.ts +0 -3
  621. package/lib/typescript/components/executiontasks/scanner/returns/DropDownUtils.d.ts +0 -2
  622. package/lib/typescript/components/executiontasks/scanner/returns/RTReasonSelection.d.ts +0 -7
  623. package/lib/typescript/components/executiontasks/scanner/returns/RTScan.d.ts +0 -4
  624. package/lib/typescript/components/executiontasks/scanner/returns/ReasonDropDown.d.ts +0 -14
  625. package/lib/typescript/components/executiontasks/scanner/returns/ScanList.d.ts +0 -17
  626. package/lib/typescript/ui/screens/RTScanScreen.d.ts +0 -3
  627. /package/android/.gradle/{6.8 → 7.0.2}/fileChanges/last-build.bin +0 -0
  628. /package/android/.gradle/{6.8 → 7.0.2}/gc.properties +0 -0
  629. /package/android/.gradle/{configuration-cache → 7.2/dependencies-accessors}/gc.properties +0 -0
@@ -1 +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,CA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CAAC8B,OAAO,CAAC;MACjD,OAAOlC,SAAS,CAAC4C,KAAK,CACEX,GAAG,CAACY,iBAAiB,EAC3CF,WAAW,CAACG,IAAI,CACjB;IACH,CAAC,CAAC,OAAOC,KAAU,EAAE;MACnB7C,MAAM,CAAC8C,WAAW,EAAE,CAACC,QAAQ,CAC3B,sBAAsB,EACtBF,KAAK,CAACG,OAAO,EACb/C,QAAQ,CAACgD,SAAS,CACnB;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"}
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,IAAI,CAAC,KACT,OAAO,KAAK;AACnB,CAAC;AAED,OAAO,SAASC,SAASA,CAACC,IAAS,EAAEC,SAAc,EAAE;EACnD,MAAMC,WAAW,GAAGC,IAAI,CAACC,KAAK,CAACD,IAAI,CAACE,SAAS,CAACL,IAAI,CAAC,CAAC;EACpD,KAAK,MAAMM,GAAG,IAAIJ,WAAW,EAAE;IAC7B,IAAIK,MAAM,CAACC,SAAS,CAACC,cAAc,CAACC,IAAI,CAACR,WAAW,EAAEI,GAAG,CAAC,EAAE;MAC1D,MAAMK,KAAK,GAAGT,WAAW,CAACI,GAAG,CAAC;MAC9B,IAAI,OAAOK,KAAK,KAAK,QAAQ,EAAE;QAC7BT,WAAW,CAACI,GAAG,CAAC,GAAGP,SAAS,CAACY,KAAK,EAAEV,SAAS,CAAC;MAChD,CAAC,MAAM,I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gB,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"}
@@ -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,QAAQ,MAAM,eAAe;AACzC,SAASC,SAAS,QAAQ,2BAA2B;AACrD,OAAOC,UAAU,MAAM,4BAA4B;AAEnD,OAAO,eAAeC,cAAcA,CAClCC,MAA2B,EACT;EAClB,MAAM;IAAEC;EAAO,CAAC,GAAG,MAAML,QAAQ,CAACM,6BAA6B,EAAE;EACjE,IAAIC,QAAiB;EACrB,IAAIF,MAAM,KAAK,SAAS,EAAE;IACxBE,QAAQ,GAAG,MAAMC,aAAa,CAACJ,MAAM,CAAC;EACxC,CAAC,MAAM;IACL,MAAM;MAAEC;IAAO,CAAC,GAAG,MAAML,QAAQ,CAACS,iCAAiC,EAAE;IACrE,IAAIJ,MAAM,KAAK,SAAS,EAAE;MACxBE,QAAQ,GAAG,MAAMC,aAAa,CAACJ,MAAM,CAAC;IACxC,CAAC,MAAM;MACL,MAAM,IAAIH,SAAS,CACjBC,UAAU,CAACQ,0BAA0B,EACrC,4BAA4B,CAC7B;IACH;EACF;EACA,OAAOH,QAAQ;AACjB;AAEA,eAAeC,aAAaA,CAACJ,MAA2B,EAAoB;EAC1E,MAAMO,OAAO,GAAG;IACdC,QAAQ,EAAEZ,QAAQ,CAACa,QAAQ,CAACC;EAC9B,CAAC;EACD,MAAMC,QAAQ,GAAG,MAAMf,QAAQ,CAACgB,uBAAuB,CAACL,OAAO,CAAC;EAChE,IACEP,MAAM,CAACa,WAAW,CAACL,QAAQ,IAC3BG,QAAQ,CAACG,MAAM,CAACN,QAAQ,IACxBR,MAAM,CAACa,WAAW,CAACL,QAAQ,GAAGG,QAAQ,CAACG,MAAM,CAACN,QAAQ,EAEtD,OAAO,KAAK,CAAC,KACV;IACH,MAAMO,QAAgB,GAAG,CAACf,MAAM,CAACa,WAAW,CAACE,QAAQ;IACrD,MAAMC,SAAiB,GAAG,CAAChB,MAAM,CAACa,WAAW,CAACG,SAAS;IACvD,MAAMC,OAAO,GAAIC,IAAI,CAACC,EAAE,GAAGJ,QAAQ,GAAI,GAAG;IAC1C,MAAMK,OAAO,GAAIF,IAAI,CAACC,EAAE,GAAGR,QAAQ,CAACG,MAAM,CAACC,QAAQ,GAAI,GAAG;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"}
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;AAEnD,OAAO,eAAeC,cAAcA,CAClCC,MAA2B,EACT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AAQ,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"}
@@ -15,7 +15,7 @@ const VerifyLocationET = props => {
15
15
  var _props$applicableReas, _props$applicableReas2;
16
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
17
  props.onSubmitET({
18
- ...(await getBaseETResponse(EntityCode.VERIFY_LOCATION, response, getEventCodeByET(ExecutionTaskID.VERIFY_LOCATION, response, _appRC), ''))
18
+ ...(await getBaseETResponse(EntityCode.VERIFY_LOCATION, response, getEventCodeByET(ExecutionTaskID.VERIFY_LOCATION, response, _appRC), '', props.mergedObjectiveId, ExecutionTaskID.VERIFY_LOCATION))
19
19
  });
20
20
  }, [props]);
21
21
  useEffect(() => {
@@ -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","_props$applicableReas","_props$applicableReas2","_appRC","applicableReasons","success","failure","onSubmitET","VERIFY_LOCATION","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 )),\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={ge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QACF,IAAIiB,QAAQ,GAAG,MAAMf,cAAc,CAACW,KAAK,CAAC;QAC1C,MAAMG,sBAAsB,CAACC,QAAQ,CAAC;QACtCF,aAAa,CAAC,KAAK,CAAC;MACtB,CAAC,CAAC,OAAOW,KAAU,EAAE;QACnB,IAAIA,KAAK,YAAYjB,SAAS,EAAE;UAC9BC,SAAS,CACP,mBAAmB,EACnB,gEAAgE,EAChE,KAAK,EACL,eAAe,EACf,MAAM;YACJC,QAAQ,CAACgB,eAAe,EAAE;UAC5B,CAAC,CACF;QACH,CAAC,MAAM;UACL,MAAMX,sBAAsB,CAAC,KAAK,CAAC;QACrC;MACF;IACF,CAAC,GAAG;EACN,CAAC,EAAE,EAAE,CAAC;EACN,oBACElB,KAAA,CAAA8B,aAAA,CAAC/B,IAAI;IAACgC,KAAK,EAAEtB,YAAY,CAACuB;EAAc,gBACtChC,KAAA,CAAA8B,aAAA,CAACpB,cAAc;IACbuB,OAAO,EAAEjB,UAAW;IACpBkB,KAAK,EAAEnB,KAAK,CAACoB,OAAO,IAAI;EAAwB,EAChD,CACG;AAEX,CAAC;AACD,eAAerB,gBAAgB"}
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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Z,sBAAsB,CAAC,KAAK,CAAC;QACrC;MACF;IACF,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"}
@@ -5,7 +5,7 @@ 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';
8
+ import { EntityCode, ExecutionTaskID } from '../../../models/execTasks/ETConfig';
9
9
  const VerifyOtpET = props => {
10
10
  const otpInput = useRef();
11
11
  function backButtonHandler() {
@@ -29,7 +29,7 @@ const VerifyOtpET = props => {
29
29
  handleTextChange: async value => {
30
30
  if (value.length === props.inputCount) {
31
31
  props.onSubmit({
32
- ...(await getBaseETResponse(EntityCode.VERIFY_INPUT, true, '', ''))
32
+ ...(await getBaseETResponse(EntityCode.VERIFY_INPUT, true, '', '', props.mergedObjectiveId, ExecutionTaskID.VERIFY_INPUT))
33
33
  });
34
34
  }
35
35
  }
@@ -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","createElement","style","styles","otpInputTextView","veriOtpText","textInputStyle","otpInputStyle","ref","inputCount","tintColor","blue300","handleTextChange","value","length","onSubmit","VERIFY_INPUT","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 { 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 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 mar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,UAAU,EAAE;QACrCb,KAAK,CAACmB,QAAQ,CAAC;UACb,IAAI,MAAMtB,iBAAiB,CACzBC,UAAU,CAACsB,YAAY,EACvB,IAAI,EACJ,EAAE,EACF,EAAE,CACH;QACH,CAAC,CAAC;MACJ;IACF;EAAE,EACF,eACF7B,KAAA,CAAAc,aAAA,CAACf,IAAI;IAACgB,KAAK,EAAEC,MAAM,CAACc;EAAmB,gBACrC9B,KAAA,CAAAc,aAAA,CAAChB,IAAI,QAAC,2BAAyB,CAAO,eAEtCE,KAAA,CAAAc,aAAA,CAAClB,SAAS;IACRmC,OAAO,EAAEA,CAAA,KAAM;MACb1B,SAAS,CAAC,eAAe,CAAC;IAC5B,CAAE;IACFU,KAAK,EAAEC,MAAM,CAACgB;EAAc,gBAE5BhC,KAAA,CAAAc,aAAA,CAAChB,IAAI,QAAC,YAAU,CAAO,CACb,CACP,CACF,CACF;AAEX,CAAC;AACD,eAAeU,WAAW;AAE1B,MAAMQ,MAAM,GAAGnB,UAAU,CAACoC,MAAM,CAAC;EAC/BC,YAAY,EAAE;IACZC,SAAS,EAAE,EAAE;IACbC,WAAW,EAAE;EACf,CAAC;EACDlB,WAAW,EAAE;IACXmB,QAAQ,EAAE,EAAE;IACZC,KAAK,EAAElC,MAAM,CAACmC,KAAK;IACnBJ,SAAS,EAAE;EACb,CAAC;EACDf,aAAa,EAAE;IACboB,YAAY,EAAE,CAAC;IACfC,WAAW,EAAE,CAAC;IACdC,iBAAiB,EAAE,EAAE;IACrBC,eAAe,EAAE,EAAE;IACnBR,SAAS,EAAE;EACb,CAAC;EACDlB,gBAAgB,EAAE;IAChB2B,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
+ {"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;MACXjB,WAAW,CAACmB,mBAAmB,CAAC,mBAAmB,EAAEF,iBAAiB,CAAC;IACzE,CAAC;EACH,CAAC,EAAE,EAAE,CAAC;EAEN,oBACEZ,KAAA,CAAAe,aAAA,CAAChB,IAAI,qBACHC,KAAA,CAAAe,aAAA,CAAChB,IAAI;IAACiB,KAAK,EAAEC,MAAM,CAACC;EAAiB,gBACnClB,KAAA,C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J,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,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,UAAU,CACX,CACEM,IAAI,CAAEC,OAAgB,IAAK;IAC1B,IAAIA,OAAO,EAAEL,YAAY,EAAE,CAAC,KACvB,IAAIE,OAAO,EAAE;MAChBA,OAAO,EAAE;IACX;EACF,CAAC,CAAC,CACDI,KAAK,CAAEC,KAA0B,IAAK;IACrCd,MAAM,CAACe,WAAW,EAAE,CAACC,QAAQ,CAAC,OAAO,EAAEF,KAAK,CAACV,OAAO,EAAEH,QAAQ,CAACgB,SAAS,CAAC;EAC3E,CAAC,CAAC;AACN"}
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"}
@@ -1 +1 @@
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,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ACvB,CAAE;IACFC,MAAM,EAAC;EAAW,GAEjBlC,KAAK,CAACsC,mBAAmB,IAAI,IAAI,CAC3B,CACJ,CACF,CACF,CACD;AAEZ,CAAC;AAED,MAAM/B,MAAM,GAAGlB,UAAU,CAACkD,MAAM,CAAC;EAC/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"}
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,S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,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
@@ -0,0 +1 @@
1
+ {"version":3,"names":["View","Text","StyleSheet","TouchableOpacity","React","Checkbox","Feather","Card","props","_props$selectConfig","_props$renderAddition","isSelected","selectConfig","createElement","style","styles","container","status","onPress","_props$selectConfig2","_props$selectConfig3","onSelect","theme","roundness","body","header","title","renderAdditionalHeader","call","Body","editConfig","Fragment","divider","_props$editConfig","_props$editConfig2","onEdit","icon","name","size","color","create","flexDirection","justifyContent","alignItems","paddingVertical","paddingHorizontal","marginVertical","marginHorizontal","borderWidth","borderColor","borderRadius","flex","fontSize","fontStyle","fontWeight","lineHeight","marginRight","height","width","backgroundColor","alignSelf","margin"],"sources":["Card.tsx"],"sourcesContent":["import { View, Text, StyleSheet, TouchableOpacity } from 'react-native';\nimport React from 'react';\nimport { Checkbox } from 'react-native-paper';\nimport { Feather } from '@expo/vector-icons';\n\ninterface CardProps {\n title: string;\n renderAdditionalHeader?: () => JSX.Element;\n Body: JSX.Element;\n editConfig?: {\n props: any;\n onEdit: (props: any) => void;\n };\n selectConfig?: {\n isSelected: boolean;\n props: any;\n onSelect: (props: any) => void;\n };\n}\n\nconst Card = (props: CardProps) => {\n const isSelected = props.selectConfig?.isSelected ? 'checked' : 'unchecked';\n\n return (\n <View style={styles.container}>\n {props.selectConfig ? (\n <View>\n <Checkbox\n status={isSelected}\n onPress={() => {\n props.selectConfig?.onSelect(props.selectConfig?.props);\n }}\n theme={{ roundness: 5 }}\n />\n </View>\n ) : null}\n <View style={styles.body}>\n <View style={styles.header}>\n <Text style={styles.title}>{props.title}</Text>\n {props.renderAdditionalHeader?.()}\n </View>\n {props.Body}\n </View>\n {props.editConfig ? (\n <>\n <View style={styles.divider} />\n <TouchableOpacity\n onPress={() => props.editConfig?.onEdit(props.editConfig?.props)}\n style={styles.icon}\n >\n <Feather name=\"edit\" size={24} color=\"#5B80F7\" />\n </TouchableOpacity>\n </>\n ) : null}\n </View>\n );\n};\n\nexport default Card;\n\nconst styles = StyleSheet.create({\n container: {\n flexDirection: 'row',\n justifyContent: 'flex-start',\n alignItems: 'flex-start',\n paddingVertical: 12,\n paddingHorizontal: 16,\n marginVertical: 10,\n marginHorizontal: 16,\n borderWidth: 1,\n borderColor: '#E0E3EB',\n borderRadius: 8,\n // height: 150,\n },\n header: {\n flexDirection: 'row',\n alignItems: 'center',\n },\n body: {\n flex: 1,\n },\n title: {\n fontSize: 16,\n fontStyle: 'normal',\n fontWeight: '500',\n lineHeight: 24,\n marginRight: 8,\n },\n divider: {\n height: '90%',\n width: 2,\n backgroundColor: '#E0E3EB',\n alignSelf: 'center',\n },\n icon: {\n alignSelf: 'center',\n margin: 10,\n },\n});\n"],"mappings":"AAAA,SAASA,IAAI,EAAEC,IAAI,EAAEC,UAAU,EAAEC,gBAAgB,QAAQ,cAAc;AACvE,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,OAAO,QAAQ,oBAAoB;AAiB5C,MAAMC,IAAI,GAAIC,K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;EACf,CAAC;EACDxB,OAAO,EAAE;IACPyB,MAAM,EAAE,KAAK;IACbC,KAAK,EAAE,CAAC;IACRC,eAAe,EAAE,SAAS;IAC1BC,SAAS,EAAE;EACb,CAAC;EACDxB,IAAI,EAAE;IACJwB,SAAS,EAAE,QAAQ;IACnBC,MAAM,EAAE;EACV;AACF,CAAC,CAAC"}
@@ -0,0 +1,40 @@
1
+ import React from 'react';
2
+ import ModalWidget from './ModalWidget';
3
+ import { StyleSheet } from 'react-native';
4
+ const GoBackModal = props => {
5
+ return /*#__PURE__*/React.createElement(ModalWidget, {
6
+ dismissable: true,
7
+ showModal: props.showModal,
8
+ title: {
9
+ label: 'Are you sure you want to go back?'
10
+ },
11
+ primaryButton: {
12
+ label: 'Yes',
13
+ onPress: props.onSuccess,
14
+ styles: modalStyles.primaryButtonStyles
15
+ },
16
+ secondaryButton: {
17
+ label: 'No',
18
+ onPress: props.onFailure,
19
+ styles: modalStyles.secondaryButtonStyles
20
+ }
21
+ });
22
+ };
23
+ export default GoBackModal;
24
+ const modalStyles = StyleSheet.create({
25
+ primaryButtonStyles: {
26
+ marginTop: 16,
27
+ height: 40,
28
+ borderRadius: 6,
29
+ justifyContent: 'center',
30
+ alignItems: 'center'
31
+ },
32
+ secondaryButtonStyles: {
33
+ marginVertical: 16,
34
+ height: 40,
35
+ borderRadius: 6,
36
+ justifyContent: 'center',
37
+ alignItems: 'center'
38
+ }
39
+ });
40
+ //# sourceMappingURL=GoBackModal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","ModalWidget","StyleSheet","GoBackModal","props","createElement","dismissable","showModal","title","label","primaryButton","onPress","onSuccess","styles","modalStyles","primaryButtonStyles","secondaryButton","onFailure","secondaryButtonStyles","create","marginTop","height","borderRadius","justifyContent","alignItems","marginVertical"],"sources":["GoBackModal.tsx"],"sourcesContent":["import React from 'react';\nimport ModalWidget from './ModalWidget';\nimport { StyleSheet } from 'react-native';\n\ninterface GoBackModalProps {\n showModal: boolean;\n setShowModal: React.Dispatch<React.SetStateAction<boolean>>;\n onSuccess: () => any;\n onFailure: () => any;\n}\n\nconst GoBackModal = (props: GoBackModalProps) => {\n return (\n <ModalWidget\n dismissable={true}\n showModal={props.showModal}\n title={{ label: 'Are you sure you want to go back?' }}\n primaryButton={{\n label: 'Yes',\n onPress: props.onSuccess,\n styles: modalStyles.primaryButtonStyles,\n }}\n secondaryButton={{\n label: 'No',\n onPress: props.onFailure,\n styles: modalStyles.secondaryButtonStyles,\n }}\n />\n );\n};\n\nexport default GoBackModal;\n\nconst modalStyles = StyleSheet.create({\n primaryButtonStyles: {\n marginTop: 16,\n height: 40,\n borderRadius: 6,\n justifyContent: 'center',\n alignItems: 'center',\n },\n secondaryButtonStyles: {\n marginVertical: 16,\n height: 40,\n borderRadius: 6,\n justifyContent: 'center',\n alignItems: 'center',\n },\n});\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,WAAW,MAAM,eAAe;AACvC,SAASC,UAAU,QAAQ,cAAc;AASzC,MAAMC,WAAW,GAAIC,KAAuB,IAAK;EAC/C,oBACEJ,KAAA,CAAAK,aAAA,CAACJ,WAAW;IACVK,WAAW,EAAE,IAAK;IAClBC,SAAS,EAAEH,KAAK,CAACG,SAAU;IAC3BC,KAAK,EAAE;MAAEC,KAAK,EAAE;IAAoC,CAAE;IACtDC,aAAa,EAAE;MACbD,KAAK,EAAE,KAAK;MACZE,OAAO,EAAEP,KAAK,CAACQ,SAAS;MACxBC,MAAM,EAAEC,WAAW,CAACC;IACtB,CAAE;IACFC,eAAe,EAAE;MACfP,KAAK,EAAE,IAAI;MACXE,OAAO,EAAEP,KAAK,CAACa,SAAS;MACxBJ,MAAM,EAAEC,WAAW,CAACI;IACtB;EAAE,CACH,CAAC;AAEN,CAAC;AAED,eAAef,WAAW;AAE1B,MAAMW,WAAW,GAAGZ,UAAU,CAACiB,MAAM,CAAC;EACpCJ,mBAAmB,EAAE;IACnBK,SAAS,EAAE,EAAE;IACbC,MAAM,EAAE,EAAE;IACVC,YAAY,EAAE,CAAC;IACfC,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE;EACd,CAAC;EACDN,qBAAqB,EAAE;IACrBO,cAAc,EAAE,EAAE;IAClBJ,MAAM,EAAE,EAAE;IACVC,YAAY,EAAE,CAAC;IACfC,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE;EACd;AACF,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"names":["Text","TouchableOpacity","View","React","IconButton","_ref","title","onPress","icon","style","textStyles","createElement","flex","justifyContent","flexDirection","alignItems"],"sources":["IconButton.tsx"],"sourcesContent":["import { Text, TouchableOpacity, View } from 'react-native';\nimport React from 'react';\n\nconst IconButton = ({\n title,\n onPress,\n icon,\n style,\n textStyles,\n}: {\n title: string;\n onPress: (e: any) => void;\n icon?: any;\n style?: any;\n textStyles?: any;\n}) => (\n <TouchableOpacity style={style} onPress={onPress}>\n <View\n style={{\n flex: 1,\n justifyContent: 'space-between',\n flexDirection: 'row',\n alignItems: 'center',\n }}\n >\n <Text style={textStyles}>{title}</Text>\n {icon}\n </View>\n </TouchableOpacity>\n);\n\nexport default IconButton;\n"],"mappings":"AAAA,SAASA,IAAI,EAAEC,gBAAgB,EAAEC,IAAI,QAAQ,cAAc;AAC3D,OAAOC,KAAK,MAAM,OAAO;AAEzB,MAAMC,UAAU,GAAGC,IAAA;EAAA,IAAC;IAClBC,KAAK;IACLC,OAAO;IACPC,IAAI;IACJC,KAAK;IACLC;EAOF,CAAC,GAAAL,IAAA;EAAA,oBACCF,KAAA,CAAAQ,aAAA,CAACV,gBAAgB;IAACQ,KAAK,EAAEA,KAAM;IAACF,OAAO,EAAEA;EAAQ,gBAC/CJ,KAAA,CAAAQ,aAAA,CAACT,IAAI;IACHO,KAAK,EAAE;MACLG,IAAI,EAAE,CAAC;MACPC,cAAc,EAAE,eAAe;MAC/BC,aAAa,EAAE,KAAK;MACpBC,UAAU,EAAE;IACd;EAAE,gBAEFZ,KAAA,CAAAQ,aAAA,CAACX,IAAI;IAACS,KAAK,EAAEC;EAAW,GAAEJ,KAAK,CAAQ,EACtCE,IAAI,CACA,CACU;AAAA,CACpB;AAED,eAAeJ,UAAU"}
1
+ {"version":3,"names":["Text","TouchableOpacity","View","React","IconButton","_ref","title","onPress","icon","style","textStyles","createElement","flex","justifyContent","flexDirection","alignItems"],"sources":["IconButton.tsx"],"sourcesContent":["import { Text, TouchableOpacity, View } from 'react-native';\nimport React from 'react';\n\nconst IconButton = ({\n title,\n onPress,\n icon,\n style,\n textStyles,\n}: {\n title: string;\n onPress: (e: any) => void;\n icon?: any;\n style?: any;\n textStyles?: any;\n}) => (\n <TouchableOpacity style={style} onPress={onPress}>\n <View\n style={{\n flex: 1,\n justifyContent: 'space-between',\n flexDirection: 'row',\n alignItems: 'center',\n }}\n >\n <Text style={textStyles}>{title}</Text>\n {icon}\n </View>\n </TouchableOpacity>\n);\n\nexport default IconButton;\n"],"mappings":"AAAA,SAASA,IAAI,EAAEC,gBAAgB,EAAEC,IAAI,QAAQ,cAAc;AAC3D,OAAOC,KAAK,MAAM,OAAO;AAEzB,MAAMC,UAAU,GAAGC,IAAA;EAAA,IAAC;IAClBC,KAAK;IACLC,OAAO;IACPC,IAAI;IACJC,KAAK;IACLC;EAOF,CAAC,GAAAL,IAAA;EAAA,oBACCF,KAAA,CAAAQ,aAAA,CAACV,gBAAgB;IAACQ,KAAK,EAAEA,KAAM;IAACF,OAAO,EAAEA;EAAQ,gBAC/CJ,KAAA,CAAAQ,aAAA,CAACT,IAAI;IACHO,KAAK,EAAE;MACLG,IAAI,EAAE,CAAC;MACPC,cAAc,EAAE,eAAe;MAC/BC,aAAa,EAAE,KAAK;MACpBC,UAAU,EAAE;IACd;EAAE,gBAEFZ,KAAA,CAAAQ,aAAA,CAACX,IAAI;IAACS,KAAK,EAAEC;EAAW,GAAEJ,KAAY,CAAC,EACtCE,IACG,CACU,CAAC;AAAA,CACpB;AAED,eAAeJ,UAAU"}
@@ -0,0 +1,92 @@
1
+ import { View, Text, StyleSheet } from 'react-native';
2
+ import React from 'react';
3
+ import { Portal, Modal } from 'react-native-paper';
4
+ import { CommonStyles, Fonts } from '../../styles/executionTasks/CommonStyles';
5
+ import { TouchableOpacity } from 'react-native';
6
+ const ModalWidget = props => {
7
+ var _props$renderAddition, _props$renderChildren, _props$renderAddition2;
8
+ const {
9
+ dismissable = true,
10
+ contentContainerStyle = {},
11
+ modalStyle = {},
12
+ title: {
13
+ styles: titleStyle = {}
14
+ },
15
+ subTitle: {
16
+ styles: subTitleStyle = {}
17
+ } = {},
18
+ bodyStyle = {},
19
+ buttonStyle = {},
20
+ primaryButton: {
21
+ disabled: primaryButtonDisabled = false,
22
+ styles: primaryBtnStyles = {},
23
+ labelStyles: primaryBtnLabelStyles = {}
24
+ },
25
+ secondaryButton: {
26
+ disabled: secondaryButtonDisabled = false,
27
+ styles: secondaryBtnStyles = {},
28
+ labelStyles: secondaryBtnLabelStyles = {}
29
+ }
30
+ } = props;
31
+ return /*#__PURE__*/React.createElement(Portal, null, /*#__PURE__*/React.createElement(Modal, {
32
+ visible: props.showModal,
33
+ dismissable: dismissable,
34
+ contentContainerStyle: [styles.modalContent, contentContainerStyle]
35
+ }, /*#__PURE__*/React.createElement(View, {
36
+ style: [styles.modalView, modalStyle]
37
+ }, /*#__PURE__*/React.createElement(View, {
38
+ style: bodyStyle
39
+ }, (_props$renderAddition = props.renderAdditionalHeader) === null || _props$renderAddition === void 0 ? void 0 : _props$renderAddition.call(props), /*#__PURE__*/React.createElement(Text, {
40
+ style: [styles.titleText, titleStyle]
41
+ }, props.title.label), props.subTitle ? /*#__PURE__*/React.createElement(Text, {
42
+ style: [styles.subTitleText, subTitleStyle]
43
+ }, props.subTitle.label) : null, (_props$renderChildren = props.renderChildren) === null || _props$renderChildren === void 0 ? void 0 : _props$renderChildren.call(props)), /*#__PURE__*/React.createElement(View, {
44
+ style: buttonStyle
45
+ }, /*#__PURE__*/React.createElement(TouchableOpacity, {
46
+ style: [CommonStyles.nextButton, primaryBtnStyles],
47
+ onPress: props.primaryButton.onPress,
48
+ disabled: primaryButtonDisabled
49
+ }, /*#__PURE__*/React.createElement(Text, {
50
+ style: [CommonStyles.nextButtonLabel, primaryBtnLabelStyles]
51
+ }, props.primaryButton.label)), /*#__PURE__*/React.createElement(TouchableOpacity, {
52
+ style: [CommonStyles.cancelButton, secondaryBtnStyles],
53
+ onPress: props.secondaryButton.onPress,
54
+ disabled: secondaryButtonDisabled
55
+ }, /*#__PURE__*/React.createElement(Text, {
56
+ style: [CommonStyles.cancelButtonLabel, secondaryBtnLabelStyles]
57
+ }, props.secondaryButton.label)), (_props$renderAddition2 = props.renderAdditionalButtons) === null || _props$renderAddition2 === void 0 ? void 0 : _props$renderAddition2.call(props)))));
58
+ };
59
+ export default ModalWidget;
60
+ const styles = StyleSheet.create({
61
+ modalContent: {
62
+ marginStart: 60,
63
+ marginEnd: 60,
64
+ marginBottom: 60,
65
+ flex: 1
66
+ },
67
+ modalView: {
68
+ backgroundColor: 'white',
69
+ padding: 15,
70
+ borderRadius: 9
71
+ },
72
+ titleText: {
73
+ justifyContent: 'center',
74
+ fontFamily: Fonts.IBMPlexSans_600SemiBold,
75
+ fontStyle: 'normal',
76
+ fontSize: 14,
77
+ lineHeight: 20,
78
+ textAlign: 'center',
79
+ color: '#111111',
80
+ marginBottom: 10
81
+ },
82
+ subTitleText: {
83
+ justifyContent: 'center',
84
+ fontFamily: 'IBMPlexSans_400Regular',
85
+ fontStyle: 'normal',
86
+ fontSize: 14,
87
+ lineHeight: 20,
88
+ color: '#000000',
89
+ marginBottom: 10
90
+ }
91
+ });
92
+ //# sourceMappingURL=ModalWidget.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["View","Text","StyleSheet","React","Portal","Modal","CommonStyles","Fonts","TouchableOpacity","ModalWidget","props","_props$renderAddition","_props$renderChildren","_props$renderAddition2","dismissable","contentContainerStyle","modalStyle","title","styles","titleStyle","subTitle","subTitleStyle","bodyStyle","buttonStyle","primaryButton","disabled","primaryButtonDisabled","primaryBtnStyles","labelStyles","primaryBtnLabelStyles","secondaryButton","secondaryButtonDisabled","secondaryBtnStyles","secondaryBtnLabelStyles","createElement","visible","showModal","modalContent","style","modalView","renderAdditionalHeader","call","titleText","label","subTitleText","renderChildren","nextButton","onPress","nextButtonLabel","cancelButton","cancelButtonLabel","renderAdditionalButtons","create","marginStart","marginEnd","marginBottom","flex","backgroundColor","padding","borderRadius","justifyContent","fontFamily","IBMPlexSans_600SemiBold","fontStyle","fontSize","lineHeight","textAlign","color"],"sources":["ModalWidget.tsx"],"sourcesContent":["import { View, Text, StyleSheet, ViewStyle, TextStyle } from 'react-native';\nimport React from 'react';\nimport { Portal, Modal } from 'react-native-paper';\nimport { CommonStyles, Fonts } from '../../styles/executionTasks/CommonStyles';\nimport { TouchableOpacity } from 'react-native';\n\ninterface ButtonProps {\n label: string;\n disabled?: boolean;\n onPress: (() => void) | (() => Promise<any>);\n styles?: ViewStyle;\n labelStyles?: TextStyle;\n}\n\ninterface TitleProps {\n label: string;\n styles?: TextStyle;\n}\n\nexport interface ModalProps {\n showModal: boolean;\n dismissable?: boolean;\n title: TitleProps;\n subTitle?: TitleProps;\n contentContainerStyle?: ViewStyle;\n modalStyle?: ViewStyle;\n bodyStyle?: ViewStyle;\n renderChildren?: () => JSX.Element;\n buttonStyle?: ViewStyle;\n primaryButton: ButtonProps;\n secondaryButton: ButtonProps;\n renderAdditionalButtons?: () => JSX.Element;\n renderAdditionalHeader?: () => JSX.Element;\n}\n\nconst ModalWidget = (props: ModalProps) => {\n const {\n dismissable = true,\n contentContainerStyle = {},\n modalStyle = {},\n title: { styles: titleStyle = {} },\n subTitle: { styles: subTitleStyle = {} } = {},\n bodyStyle = {},\n buttonStyle = {},\n primaryButton: {\n disabled: primaryButtonDisabled = false,\n styles: primaryBtnStyles = {},\n labelStyles: primaryBtnLabelStyles = {},\n },\n secondaryButton: {\n disabled: secondaryButtonDisabled = false,\n styles: secondaryBtnStyles = {},\n labelStyles: secondaryBtnLabelStyles = {},\n },\n } = props;\n return (\n <Portal>\n <Modal\n visible={props.showModal}\n dismissable={dismissable}\n contentContainerStyle={[styles.modalContent, contentContainerStyle]}\n >\n <View style={[styles.modalView, modalStyle]}>\n <View style={bodyStyle}>\n {props.renderAdditionalHeader?.()}\n <Text style={[styles.titleText, titleStyle]}>\n {props.title.label}\n </Text>\n {props.subTitle ? (\n <Text style={[styles.subTitleText, subTitleStyle]}>\n {props.subTitle.label}\n </Text>\n ) : null}\n {props.renderChildren?.()}\n </View>\n\n <View style={buttonStyle}>\n <TouchableOpacity\n style={[CommonStyles.nextButton, primaryBtnStyles]}\n onPress={props.primaryButton.onPress}\n disabled={primaryButtonDisabled}\n >\n <Text\n style={[CommonStyles.nextButtonLabel, primaryBtnLabelStyles]}\n >\n {props.primaryButton.label}\n </Text>\n </TouchableOpacity>\n <TouchableOpacity\n style={[CommonStyles.cancelButton, secondaryBtnStyles]}\n onPress={props.secondaryButton.onPress}\n disabled={secondaryButtonDisabled}\n >\n <Text\n style={[\n CommonStyles.cancelButtonLabel,\n secondaryBtnLabelStyles,\n ]}\n >\n {props.secondaryButton.label}\n </Text>\n </TouchableOpacity>\n {props.renderAdditionalButtons?.()}\n </View>\n </View>\n </Modal>\n </Portal>\n );\n};\n\nexport default ModalWidget;\n\ninterface StyleSheetType {\n modalContent: ViewStyle;\n modalView: ViewStyle;\n titleText: TextStyle;\n subTitleText: TextStyle;\n}\n\nconst styles = StyleSheet.create<StyleSheetType>({\n modalContent: {\n marginStart: 60,\n marginEnd: 60,\n marginBottom: 60,\n flex: 1,\n },\n modalView: {\n backgroundColor: 'white',\n padding: 15,\n borderRadius: 9,\n },\n titleText: {\n justifyContent: 'center',\n fontFamily: Fonts.IBMPlexSans_600SemiBold,\n fontStyle: 'normal',\n fontSize: 14,\n lineHeight: 20,\n textAlign: 'center',\n color: '#111111',\n marginBottom: 10,\n },\n subTitleText: {\n justifyContent: 'center',\n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UAAU,EAAE,EAAE;IACdE,KAAK,EAAE,SAAS;IAChBZ,YAAY,EAAE;EAChB;AACF,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"names":["React","ActivityIndicator","Modal","StyleSheet","Text","View","Fonts","ProgressDialog","props","createElement","animationType","transparent","visible","onRequestClose","style","styles","wrapper","content","size","color","label","create","textAlign","fontStyle","fontSize","fontFamily","IBMPlexSans_600SemiBold","backgroundColor","padding","borderRadius","width","alignItems","flex","justifyContent"],"sources":["ProgressDialog.tsx"],"sourcesContent":["import React from 'react';\nimport { ActivityIndicator, Modal, StyleSheet, Text, View } from 'react-native';\nimport { Fonts } from '../../styles/executionTasks/CommonStyles';\n\nconst ProgressDialog = (props: ProgressDialogProps) => {\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 <ActivityIndicator size=\"large\" color=\"rgba(107, 142, 255, 1)\" />\n <Text style={[styles.label]}>{props.label}</Text>\n </View>\n </View>\n </Modal>\n );\n};\n\nconst styles = StyleSheet.create({\n label: {\n color: 'black',\n textAlign: 'center',\n fontStyle: 'normal',\n fontSize: 15,\n fontFamily: Fonts.IBMPlexSans_600SemiBold,\n },\n content: {\n backgroundColor: 'white',\n padding: 10,\n borderRadius: 5,\n width: '80%',\n alignItems: 'center',\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 ProgressDialog;\n\nexport interface ProgressDialogProps {\n visible: boolean;\n label: string;\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,iBAAiB,EAAEC,KAAK,EAAEC,UAAU,EAAEC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AAC/E,SAASC,KAAK,QAAQ,0CAA0C;AAEhE,MAAMC,cAAc,GAAIC,KAA0B,IAAK;EACrD,oBACER,KAAA,CAAAS,aAAA,CAACP,KAAK;IACJQ,aAAa,EAAC,MAAM;IACpBC,WAAW,EAAE,IAAK;IAClBC,OAAO,EAAEJ,KAAK,CAACI,OAAQ;IACvBC,cAAc,EAAEA,CAAA,KAAM,CAAC;EAAE,gBAEzBb,KAAA,CAAAS,aAAA,CAACJ,IAAI;IAACS,KAAK,EAAEC,MAAM,CAACC;EAAQ,gBAC1BhB,KAAA,CAAAS,aAAA,CAACJ,IAAI;IAACS,KAAK,EAAEC,MAAM,CAACE;EAAQ,gBAC1BjB,KAAA,CAAAS,aAAA,CAACR,iBAAiB;IAACiB,IAAI,EAAC,OAAO;IAACC,KAAK,EAAC;EAAwB,EAAG,eACjEnB,KAAA,CAAAS,aAAA,CAACL,IAAI;IAACU,KAAK,EAAE,CAACC,MAAM,CAACK,KAAK;EAAE,GAAEZ,KAAK,CAACY,KAAK,CAAQ,CAC5C,CACF,CACD;AAEZ,CAAC;AAED,MAAML,MAAM,GAAGZ,UAAU,CAACkB,MAAM,CAAC;EAC/BD,KAAK,EAAE;IACLD,KAAK,EAAE,OAAO;IACdG,SAAS,EAAE,QAAQ;IACnBC,SAAS,EAAE,QAAQ;IACnBC,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAEnB,KAAK,CAACoB;EACpB,CAAC;EACDT,OAAO,EAAE;IACPU,eAAe,EAAE,OAAO;IACxBC,OAAO,EAAE,EAAE;IACXC,YAAY,EAAE,CAAC;IACfC,KAAK,EAAE,KAAK;IACZC,UAAU,EAAE;EACd,CAAC;EACDf,OAAO,EAAE;IACPgB,IAAI,EAAE,CAAC;IACPD,UAAU,EAAE,QAAQ;IACpBE,cAAc,EAAE,QAAQ;IACxBN,eAAe,EAAE;EACnB;AACF,CAAC,CAAC;AAEF,eAAepB,cAAc"}
1
+ {"version":3,"names":["React","ActivityIndicator","Modal","StyleSheet","Text","View","Fonts","ProgressDialog","props","createElement","animationType","transparent","visible","onRequestClose","style","styles","wrapper","content","size","color","label","create","textAlign","fontStyle","fontSize","fontFamily","IBMPlexSans_600SemiBold","backgroundColor","padding","borderRadius","width","alignItems","flex","justifyContent"],"sources":["ProgressDialog.tsx"],"sourcesContent":["import React from 'react';\nimport { ActivityIndicator, Modal, StyleSheet, Text, View } from 'react-native';\nimport { Fonts } from '../../styles/executionTasks/CommonStyles';\n\nconst ProgressDialog = (props: ProgressDialogProps) => {\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 <ActivityIndicator size=\"large\" color=\"rgba(107, 142, 255, 1)\" />\n <Text style={[styles.label]}>{props.label}</Text>\n </View>\n </View>\n </Modal>\n );\n};\n\nconst styles = StyleSheet.create({\n label: {\n color: 'black',\n textAlign: 'center',\n fontStyle: 'normal',\n fontSize: 15,\n fontFamily: Fonts.IBMPlexSans_600SemiBold,\n },\n content: {\n backgroundColor: 'white',\n padding: 10,\n borderRadius: 5,\n width: '80%',\n alignItems: 'center',\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 ProgressDialog;\n\nexport interface ProgressDialogProps {\n visible: boolean;\n label: string;\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,iBAAiB,EAAEC,KAAK,EAAEC,UAAU,EAAEC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AAC/E,SAASC,KAAK,QAAQ,0CAA0C;AAEhE,MAAMC,cAAc,GAAIC,KAA0B,IAAK;EACrD,oBACER,KAAA,CAAAS,aAAA,CAACP,KAAK;IACJQ,aAAa,EAAC,MAAM;IACpBC,WAAW,EAAE,IAAK;IAClBC,OAAO,EAAEJ,KAAK,CAACI,OAAQ;IACvBC,cAAc,EAAEA,CAAA,KAAM,CAAC;EAAE,gBAEzBb,KAAA,CAAAS,aAAA,CAACJ,IAAI;IAACS,KAAK,EAAEC,MAAM,CAACC;EAAQ,gBAC1BhB,KAAA,CAAAS,aAAA,CAACJ,IAAI;IAACS,KAAK,EAAEC,MAAM,CAACE;EAAQ,gBAC1BjB,KAAA,CAAAS,aAAA,CAACR,iBAAiB;IAACiB,IAAI,EAAC,OAAO;IAACC,KAAK,EAAC;EAAwB,CAAE,CAAC,eACjEnB,KAAA,CAAAS,aAAA,CAACL,IAAI;IAACU,KAAK,EAAE,CAACC,MAAM,CAACK,KAAK;EAAE,GAAEZ,KAAK,CAACY,KAAY,CAC5C,CACF,CACD,CAAC;AAEZ,CAAC;AAED,MAAML,MAAM,GAAGZ,UAAU,CAACkB,MAAM,CAAC;EAC/BD,KAAK,EAAE;IACLD,KAAK,EAAE,OAAO;IACdG,SAAS,EAAE,QAAQ;IACnBC,SAAS,EAAE,QAAQ;IACnBC,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAEnB,KAAK,CAACoB;EACpB,CAAC;EACDT,OAAO,EAAE;IACPU,eAAe,EAAE,OAAO;IACxBC,OAAO,EAAE,EAAE;IACXC,YAAY,EAAE,CAAC;IACfC,KAAK,EAAE,KAAK;IACZC,UAAU,EAAE;EACd,CAAC;EACDf,OAAO,EAAE;IACPgB,IAAI,EAAE,CAAC;IACPD,UAAU,EAAE,QAAQ;IACpBE,cAAc,EAAE,QAAQ;IACxBN,eAAe,EAAE;EACnB;AACF,CAAC,CAAC;AAEF,eAAepB,cAAc"}
@@ -0,0 +1,66 @@
1
+ import React from 'react';
2
+ import { View, TextInput, TouchableOpacity, StyleSheet } from 'react-native';
3
+ import { EvilIcons, MaterialIcons } from '@expo/vector-icons';
4
+ const SearchBar = props => {
5
+ const {
6
+ searchText,
7
+ setSearchText
8
+ } = props;
9
+ const handleSearch = text => {
10
+ props.onChangeSearch(text);
11
+ };
12
+ const handleClear = () => {
13
+ props.onClear();
14
+ setSearchText('');
15
+ };
16
+ return /*#__PURE__*/React.createElement(View, {
17
+ style: styles.container
18
+ }, /*#__PURE__*/React.createElement(TouchableOpacity, {
19
+ style: styles.iconContainer
20
+ }, /*#__PURE__*/React.createElement(EvilIcons, {
21
+ name: "search",
22
+ size: 24,
23
+ color: "#525B7A"
24
+ })), /*#__PURE__*/React.createElement(View, {
25
+ style: styles.inputContainer
26
+ }, /*#__PURE__*/React.createElement(TextInput, {
27
+ style: styles.input,
28
+ placeholder: props.placeholder,
29
+ onChangeText: text => {
30
+ handleSearch(text);
31
+ setSearchText(text);
32
+ },
33
+ value: searchText
34
+ })), searchText ? /*#__PURE__*/React.createElement(TouchableOpacity, {
35
+ style: styles.iconContainer,
36
+ onPress: handleClear
37
+ }, /*#__PURE__*/React.createElement(MaterialIcons, {
38
+ name: "clear",
39
+ size: 24,
40
+ color: "#525B7A"
41
+ })) : null);
42
+ };
43
+ const styles = StyleSheet.create({
44
+ container: {
45
+ flexDirection: 'row',
46
+ alignItems: 'center',
47
+ backgroundColor: '#ffffff',
48
+ borderRadius: 6,
49
+ paddingHorizontal: 12,
50
+ borderWidth: 1,
51
+ borderColor: '#DDDDDD',
52
+ marginHorizontal: 16
53
+ },
54
+ inputContainer: {
55
+ flex: 1
56
+ },
57
+ input: {
58
+ height: 40
59
+ },
60
+ iconContainer: {
61
+ paddingLeft: 4,
62
+ paddingRight: 8
63
+ }
64
+ });
65
+ export default SearchBar;
66
+ //# sourceMappingURL=SearchBar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","View","TextInput","TouchableOpacity","StyleSheet","EvilIcons","MaterialIcons","SearchBar","props","searchText","setSearchText","handleSearch","text","onChangeSearch","handleClear","onClear","createElement","style","styles","container","iconContainer","name","size","color","inputContainer","input","placeholder","onChangeText","value","onPress","create","flexDirection","alignItems","backgroundColor","borderRadius","paddingHorizontal","borderWidth","borderColor","marginHorizontal","flex","height","paddingLeft","paddingRight"],"sources":["SearchBar.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport { View, TextInput, TouchableOpacity, StyleSheet } from 'react-native';\nimport { EvilIcons, MaterialIcons } from '@expo/vector-icons';\n\ninterface SearchBarProps {\n searchText: string;\n setSearchText: (searchText: string) => void;\n onChangeSearch: (searchText: string) => any;\n placeholder: string;\n onClear: () => any;\n}\n\nconst SearchBar = (props: SearchBarProps) => {\n const { searchText, setSearchText } = props;\n const handleSearch = (text: string) => {\n props.onChangeSearch(text);\n };\n const handleClear = () => {\n props.onClear();\n setSearchText('');\n };\n\n return (\n <View style={styles.container}>\n <TouchableOpacity style={styles.iconContainer}>\n <EvilIcons name=\"search\" size={24} color=\"#525B7A\" />\n </TouchableOpacity>\n <View style={styles.inputContainer}>\n <TextInput\n style={styles.input}\n placeholder={props.placeholder}\n onChangeText={(text) => {\n handleSearch(text);\n setSearchText(text);\n }}\n value={searchText}\n />\n </View>\n {searchText ? (\n <TouchableOpacity style={styles.iconContainer} onPress={handleClear}>\n <MaterialIcons name=\"clear\" size={24} color=\"#525B7A\" />\n </TouchableOpacity>\n ) : null}\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n flexDirection: 'row',\n alignItems: 'center',\n backgroundColor: '#ffffff',\n borderRadius: 6,\n paddingHorizontal: 12,\n borderWidth: 1,\n borderColor: '#DDDDDD',\n marginHorizontal: 16,\n },\n inputContainer: {\n flex: 1,\n },\n input: {\n height: 40,\n },\n iconContainer: {\n paddingLeft: 4,\n paddingRight: 8,\n },\n});\n\nexport default SearchBar;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAoB,OAAO;AACvC,SAASC,IAAI,EAAEC,SAAS,EAAEC,gBAAgB,EAAEC,UAAU,QAAQ,cAAc;AAC5E,SAASC,SAAS,EAAEC,aAAa,QAAQ,oBAAoB;AAU7D,MAAMC,SAAS,GAAIC,KAAqB,IAAK;EAC3C,MAAM;IAAEC,UAAU;IAAEC;EAAc,CAAC,GAAGF,KAAK;EAC3C,MAAMG,YAAY,GAAIC,IAAY,IAAK;IACrCJ,KAAK,CAACK,cAAc,CAACD,IAAI,CAAC;EAC5B,CAAC;EACD,MAAME,WAAW,GAAGA,CAAA,KAAM;IACxBN,KAAK,CAACO,OA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