@os1-platform/dispatch-mobile 2.1.22 → 2.1.24

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 (602) hide show
  1. package/README.md +122 -11
  2. package/lib/commonjs/analytics/firebase/FirebaseLogging.js +1 -4
  3. package/lib/commonjs/analytics/firebase/FirebaseLogging.js.map +1 -1
  4. package/lib/commonjs/analytics/sentry/SentryAnalyticsSingleton.js +5 -5
  5. package/lib/commonjs/analytics/sentry/SentryAnalyticsSingleton.js.map +1 -1
  6. package/lib/commonjs/analytics/sentry/SentryAnalyticsUtils.js +9 -16
  7. package/lib/commonjs/analytics/sentry/SentryAnalyticsUtils.js.map +1 -1
  8. package/lib/commonjs/components/dispatch/DispatchExecNavigator.js +16 -6
  9. package/lib/commonjs/components/dispatch/DispatchExecNavigator.js.map +1 -1
  10. package/lib/commonjs/components/executiontasks/ExecutionTasksIndex.js +8 -1
  11. package/lib/commonjs/components/executiontasks/ExecutionTasksIndex.js.map +1 -1
  12. package/lib/commonjs/components/executiontasks/cancellation/CancelET.js +8 -10
  13. package/lib/commonjs/components/executiontasks/cancellation/CancelET.js.map +1 -1
  14. package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js +2 -2
  15. package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js.map +1 -1
  16. package/lib/commonjs/components/executiontasks/collectPayment/CollectPayment.js +40 -0
  17. package/lib/commonjs/components/executiontasks/collectPayment/CollectPayment.js.map +1 -0
  18. package/lib/commonjs/components/executiontasks/collectPayment/CollectPaymentSchema.js +35 -0
  19. package/lib/commonjs/components/executiontasks/collectPayment/CollectPaymentSchema.js.map +1 -0
  20. package/lib/commonjs/components/executiontasks/collectPayment/PaymentStyles.js +102 -0
  21. package/lib/commonjs/components/executiontasks/collectPayment/PaymentStyles.js.map +1 -0
  22. package/lib/commonjs/components/executiontasks/collectPayment/PaymentUtils.js +151 -0
  23. package/lib/commonjs/components/executiontasks/collectPayment/PaymentUtils.js.map +1 -0
  24. package/lib/commonjs/components/executiontasks/collectPayment/components/CompletePayment.js +188 -0
  25. package/lib/commonjs/components/executiontasks/collectPayment/components/CompletePayment.js.map +1 -0
  26. package/lib/commonjs/components/executiontasks/collectPayment/components/CustomContactsModal.js +2 -0
  27. package/lib/commonjs/components/executiontasks/collectPayment/components/CustomContactsModal.js.map +1 -0
  28. package/lib/commonjs/components/executiontasks/collectPayment/components/InitPayment.js +442 -0
  29. package/lib/commonjs/components/executiontasks/collectPayment/components/InitPayment.js.map +1 -0
  30. package/lib/commonjs/components/executiontasks/collectPayment/components/PaymentContactDetails.js +538 -0
  31. package/lib/commonjs/components/executiontasks/collectPayment/components/PaymentContactDetails.js.map +1 -0
  32. package/lib/commonjs/components/executiontasks/collectPayment/components/ProcessPayment.js +887 -0
  33. package/lib/commonjs/components/executiontasks/collectPayment/components/ProcessPayment.js.map +1 -0
  34. package/lib/commonjs/components/executiontasks/deliver/DeliverET.js +14 -20
  35. package/lib/commonjs/components/executiontasks/deliver/DeliverET.js.map +1 -1
  36. package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js +24 -27
  37. package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
  38. package/lib/commonjs/components/executiontasks/display/DisplayModalET.js +1 -1
  39. package/lib/commonjs/components/executiontasks/display/DisplayModalET.js.map +1 -1
  40. package/lib/commonjs/components/executiontasks/doodle/SignatureET.js +2 -3
  41. package/lib/commonjs/components/executiontasks/doodle/SignatureET.js.map +1 -1
  42. package/lib/commonjs/components/executiontasks/dropCash/DropCashET.js +1 -1
  43. package/lib/commonjs/components/executiontasks/dropCash/DropCashET.js.map +1 -1
  44. package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js +9 -3
  45. package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
  46. package/lib/commonjs/components/executiontasks/forms/FormGenerator.js +2 -2
  47. package/lib/commonjs/components/executiontasks/forms/FormGenerator.js.map +1 -1
  48. package/lib/commonjs/components/executiontasks/forms/widgets/DateTimeWidget.js +13 -14
  49. package/lib/commonjs/components/executiontasks/forms/widgets/DateTimeWidget.js.map +1 -1
  50. package/lib/commonjs/components/executiontasks/forms/widgets/DropdownWidget.js +2 -2
  51. package/lib/commonjs/components/executiontasks/forms/widgets/DropdownWidget.js.map +1 -1
  52. package/lib/commonjs/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js +11 -12
  53. package/lib/commonjs/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js.map +1 -1
  54. package/lib/commonjs/components/executiontasks/forms/widgets/TimeRangeSelector.js +3 -3
  55. package/lib/commonjs/components/executiontasks/forms/widgets/TimeRangeSelector.js.map +1 -1
  56. package/lib/commonjs/components/executiontasks/httpRequest/HttpEtUtils.js +1 -1
  57. package/lib/commonjs/components/executiontasks/httpRequest/HttpEtUtils.js.map +1 -1
  58. package/lib/commonjs/components/executiontasks/httpRequest/HttpRequestET.js +2 -2
  59. package/lib/commonjs/components/executiontasks/httpRequest/HttpRequestET.js.map +1 -1
  60. package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js +2 -2
  61. package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
  62. package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js +11 -13
  63. package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
  64. package/lib/commonjs/components/executiontasks/payments/PaymentUtils.js +11 -2
  65. package/lib/commonjs/components/executiontasks/payments/PaymentUtils.js.map +1 -1
  66. package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js +2 -2
  67. package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
  68. package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js +5 -6
  69. package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
  70. package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js +2 -2
  71. package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
  72. package/lib/commonjs/components/executiontasks/pickup/PickupET.js +14 -20
  73. package/lib/commonjs/components/executiontasks/pickup/PickupET.js.map +1 -1
  74. package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js +18 -24
  75. package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js.map +1 -1
  76. package/lib/commonjs/components/executiontasks/scan/ScanET.js +4 -6
  77. package/lib/commonjs/components/executiontasks/scan/ScanET.js.map +1 -1
  78. package/lib/commonjs/components/executiontasks/scan/constants.js.map +1 -1
  79. package/lib/commonjs/components/executiontasks/scan/interfaces.js.map +1 -1
  80. package/lib/commonjs/components/executiontasks/scan/modalConstant.js.map +1 -1
  81. package/lib/commonjs/components/executiontasks/scan/sub_components/CScanner.js +4 -5
  82. package/lib/commonjs/components/executiontasks/scan/sub_components/CScanner.js.map +1 -1
  83. package/lib/commonjs/components/executiontasks/scan/sub_components/DropDownUtils.js +1 -2
  84. package/lib/commonjs/components/executiontasks/scan/sub_components/DropDownUtils.js.map +1 -1
  85. package/lib/commonjs/components/executiontasks/scan/sub_components/ERDropDown.js +2 -4
  86. package/lib/commonjs/components/executiontasks/scan/sub_components/ERDropDown.js.map +1 -1
  87. package/lib/commonjs/components/executiontasks/scan/sub_components/SummaryPage.js +3 -6
  88. package/lib/commonjs/components/executiontasks/scan/sub_components/SummaryPage.js.map +1 -1
  89. package/lib/commonjs/components/executiontasks/scan/utils.js +14 -8
  90. package/lib/commonjs/components/executiontasks/scan/utils.js.map +1 -1
  91. package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPET.js +2 -2
  92. package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPET.js.map +1 -1
  93. package/lib/commonjs/components/executiontasks/validateOTP/constants.js.map +1 -1
  94. package/lib/commonjs/components/executiontasks/validateOTP/sub-components/OTPInput.js +2 -2
  95. package/lib/commonjs/components/executiontasks/validateOTP/sub-components/OTPInput.js.map +1 -1
  96. package/lib/commonjs/components/executiontasks/validateOTP/utils.js +1 -1
  97. package/lib/commonjs/components/executiontasks/validateOTP/utils.js.map +1 -1
  98. package/lib/commonjs/components/executiontasks/verifyLocation/GeofenceUtils.js +2 -2
  99. package/lib/commonjs/components/executiontasks/verifyLocation/GeofenceUtils.js.map +1 -1
  100. package/lib/commonjs/components/executiontasks/verifyLocation/VerifyLocationET.js +2 -2
  101. package/lib/commonjs/components/executiontasks/verifyLocation/VerifyLocationET.js.map +1 -1
  102. package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpET.js +2 -2
  103. package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpET.js.map +1 -1
  104. package/lib/commonjs/components/widgets/AlertDisplay.js +1 -1
  105. package/lib/commonjs/components/widgets/AlertDisplay.js.map +1 -1
  106. package/lib/commonjs/components/widgets/CancelOrderDialog.js +2 -2
  107. package/lib/commonjs/components/widgets/CancelOrderDialog.js.map +1 -1
  108. package/lib/commonjs/components/widgets/Card.js +1 -2
  109. package/lib/commonjs/components/widgets/Card.js.map +1 -1
  110. package/lib/commonjs/components/widgets/GoBackModal.js +1 -1
  111. package/lib/commonjs/components/widgets/GoBackModal.js.map +1 -1
  112. package/lib/commonjs/components/widgets/IconButton.js +20 -23
  113. package/lib/commonjs/components/widgets/IconButton.js.map +1 -1
  114. package/lib/commonjs/components/widgets/ModalWidget.js +3 -1
  115. package/lib/commonjs/components/widgets/ModalWidget.js.map +1 -1
  116. package/lib/commonjs/components/widgets/ProgressDialog.js +3 -3
  117. package/lib/commonjs/components/widgets/ProgressDialog.js.map +1 -1
  118. package/lib/commonjs/components/widgets/SearchBar.js +1 -1
  119. package/lib/commonjs/components/widgets/SearchBar.js.map +1 -1
  120. package/lib/commonjs/components/widgets/SnackBarCustom.js +22 -21
  121. package/lib/commonjs/components/widgets/SnackBarCustom.js.map +1 -1
  122. package/lib/commonjs/components/widgets/SplitTextInput.js +10 -11
  123. package/lib/commonjs/components/widgets/SplitTextInput.js.map +1 -1
  124. package/lib/commonjs/components/widgets/TabsComponent.js +1 -1
  125. package/lib/commonjs/components/widgets/TabsComponent.js.map +1 -1
  126. package/lib/commonjs/components/widgets/Timer.js +40 -0
  127. package/lib/commonjs/components/widgets/Timer.js.map +1 -0
  128. package/lib/commonjs/constants/apiConstants.js +4 -1
  129. package/lib/commonjs/constants/apiConstants.js.map +1 -1
  130. package/lib/commonjs/constants/constants.js +4 -1
  131. package/lib/commonjs/constants/constants.js.map +1 -1
  132. package/lib/commonjs/errors/BaseError.js +3 -3
  133. package/lib/commonjs/events/EventDispatcher.js +5 -1
  134. package/lib/commonjs/events/EventDispatcher.js.map +1 -1
  135. package/lib/commonjs/events/constants.js +2 -1
  136. package/lib/commonjs/events/constants.js.map +1 -1
  137. package/lib/commonjs/events/index.js +1 -1
  138. package/lib/commonjs/events/index.js.map +1 -1
  139. package/lib/commonjs/events/interface.js.map +1 -1
  140. package/lib/commonjs/icons/CircleMark.js +27 -0
  141. package/lib/commonjs/icons/CircleMark.js.map +1 -0
  142. package/lib/commonjs/icons/FailedIcon.js +69 -0
  143. package/lib/commonjs/icons/FailedIcon.js.map +1 -0
  144. package/lib/commonjs/icons/FailureCloseIcon.js +42 -0
  145. package/lib/commonjs/icons/FailureCloseIcon.js.map +1 -0
  146. package/lib/commonjs/icons/ScanIcon.js +1 -1
  147. package/lib/commonjs/icons/ScanIcon.js.map +1 -1
  148. package/lib/commonjs/icons/SuccessCompleteIcon.js +42 -0
  149. package/lib/commonjs/icons/SuccessCompleteIcon.js.map +1 -0
  150. package/lib/commonjs/icons/file.js +1 -1
  151. package/lib/commonjs/icons/file.js.map +1 -1
  152. package/lib/commonjs/index.js +2 -2
  153. package/lib/commonjs/index.js.map +1 -1
  154. package/lib/commonjs/locale/i18n.js +1 -1
  155. package/lib/commonjs/locale/i18n.js.map +1 -1
  156. package/lib/commonjs/locale/util.js +1 -1
  157. package/lib/commonjs/locale/util.js.map +1 -1
  158. package/lib/commonjs/manager/dispatch/DispatchStateContainer.js +11 -9
  159. package/lib/commonjs/manager/dispatch/DispatchStateContainer.js.map +1 -1
  160. package/lib/commonjs/manager/dispatchCodes/EventCodeContainer.js +6 -6
  161. package/lib/commonjs/manager/dispatchCodes/EventCodeContainer.js.map +1 -1
  162. package/lib/commonjs/manager/dispatchCodes/EventCodeRepo.js +6 -6
  163. package/lib/commonjs/manager/dispatchCodes/EventCodeRepo.js.map +1 -1
  164. package/lib/commonjs/manager/dispatchCodes/ReasonCodeContainer.js +7 -7
  165. package/lib/commonjs/manager/dispatchCodes/ReasonCodeContainer.js.map +1 -1
  166. package/lib/commonjs/manager/dispatchCodes/ReasonCodeRepo.js +6 -6
  167. package/lib/commonjs/manager/dispatchCodes/ReasonCodeRepo.js.map +1 -1
  168. package/lib/commonjs/manager/location/LocationManager.js +6 -6
  169. package/lib/commonjs/manager/location/LocationManager.js.map +1 -1
  170. package/lib/commonjs/manager/sdk/DispatchSDKManager.js +8 -8
  171. package/lib/commonjs/manager/sdk/DispatchSDKManager.js.map +1 -1
  172. package/lib/commonjs/manager/sdk/DispatchSdkCache.js +6 -6
  173. package/lib/commonjs/manager/sdk/DispatchSdkCache.js.map +1 -1
  174. package/lib/commonjs/manager/sdk/callbacksHandler.js +4 -4
  175. package/lib/commonjs/manager/sdk/callbacksHandler.js.map +1 -1
  176. package/lib/commonjs/manager/syncmanager/AppSyncManager.js +7 -7
  177. package/lib/commonjs/manager/syncmanager/AppSyncManager.js.map +1 -1
  178. package/lib/commonjs/manager/syncmanager/constants.js +1 -1
  179. package/lib/commonjs/manager/syncmanager/constants.js.map +1 -1
  180. package/lib/commonjs/manager/syncmanager/database.js +2 -2
  181. package/lib/commonjs/manager/syncmanager/database.js.map +1 -1
  182. package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js +2 -2
  183. package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js.map +1 -1
  184. package/lib/commonjs/manager/syncmanager/document/DocumentManager.js +7 -10
  185. package/lib/commonjs/manager/syncmanager/document/DocumentManager.js.map +1 -1
  186. package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js +13 -47
  187. package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
  188. package/lib/commonjs/manager/syncmanager/events/ETEventsManager.js +6 -7
  189. package/lib/commonjs/manager/syncmanager/events/ETEventsManager.js.map +1 -1
  190. package/lib/commonjs/manager/syncmanager/events/EventsSyncManager.js +7 -8
  191. package/lib/commonjs/manager/syncmanager/events/EventsSyncManager.js.map +1 -1
  192. package/lib/commonjs/manager/syncmanager/events/SyncHttpClient.js +5 -9
  193. package/lib/commonjs/manager/syncmanager/events/SyncHttpClient.js.map +1 -1
  194. package/lib/commonjs/models/DispatchModels.js.map +1 -1
  195. package/lib/commonjs/models/execTasks/ETConfig.js +3 -0
  196. package/lib/commonjs/models/execTasks/ETConfig.js.map +1 -1
  197. package/lib/commonjs/models/sdk.js.map +1 -1
  198. package/lib/commonjs/native/signature/SignatureCapture.js +5 -5
  199. package/lib/commonjs/native/signature/SignatureCapture.js.map +1 -1
  200. package/lib/commonjs/network/GraphQLClient.js +15 -19
  201. package/lib/commonjs/network/GraphQLClient.js.map +1 -1
  202. package/lib/commonjs/network/NetworkClient.js +30 -3
  203. package/lib/commonjs/network/NetworkClient.js.map +1 -1
  204. package/lib/commonjs/network/NetworkUtils.js +2 -5
  205. package/lib/commonjs/network/NetworkUtils.js.map +1 -1
  206. package/lib/commonjs/network/Queries.js.map +1 -1
  207. package/lib/commonjs/network/client.js +5 -5
  208. package/lib/commonjs/network/client.js.map +1 -1
  209. package/lib/commonjs/resources/Login.js +4 -4
  210. package/lib/commonjs/resources/Login.js.map +1 -1
  211. package/lib/commonjs/resources/network.js +4 -4
  212. package/lib/commonjs/resources/network.js.map +1 -1
  213. package/lib/commonjs/styles/executionTasks/CommonStyles.js +13 -3
  214. package/lib/commonjs/styles/executionTasks/CommonStyles.js.map +1 -1
  215. package/lib/commonjs/ui/screens/CancellationScreen.js +7 -8
  216. package/lib/commonjs/ui/screens/CancellationScreen.js.map +1 -1
  217. package/lib/commonjs/ui/screens/CaptureInputScreen.js +8 -9
  218. package/lib/commonjs/ui/screens/CaptureInputScreen.js.map +1 -1
  219. package/lib/commonjs/ui/screens/CollectPaymentScreen.js +251 -0
  220. package/lib/commonjs/ui/screens/CollectPaymentScreen.js.map +1 -0
  221. package/lib/commonjs/ui/screens/CompleteObjectiveScreen.js +7 -8
  222. package/lib/commonjs/ui/screens/CompleteObjectiveScreen.js.map +1 -1
  223. package/lib/commonjs/ui/screens/DeliverScreen.js +8 -9
  224. package/lib/commonjs/ui/screens/DeliverScreen.js.map +1 -1
  225. package/lib/commonjs/ui/screens/DisplayScreen.js +8 -9
  226. package/lib/commonjs/ui/screens/DisplayScreen.js.map +1 -1
  227. package/lib/commonjs/ui/screens/DoodleScreen.js +8 -9
  228. package/lib/commonjs/ui/screens/DoodleScreen.js.map +1 -1
  229. package/lib/commonjs/ui/screens/DropCashScreen.js +43 -11
  230. package/lib/commonjs/ui/screens/DropCashScreen.js.map +1 -1
  231. package/lib/commonjs/ui/screens/ETScreensIndex.js +8 -1
  232. package/lib/commonjs/ui/screens/ETScreensIndex.js.map +1 -1
  233. package/lib/commonjs/ui/screens/FormsScreen.js +8 -9
  234. package/lib/commonjs/ui/screens/FormsScreen.js.map +1 -1
  235. package/lib/commonjs/ui/screens/GeofenceScreen.js +8 -9
  236. package/lib/commonjs/ui/screens/GeofenceScreen.js.map +1 -1
  237. package/lib/commonjs/ui/screens/HttpRequestScreen.js +7 -8
  238. package/lib/commonjs/ui/screens/HttpRequestScreen.js.map +1 -1
  239. package/lib/commonjs/ui/screens/ImageCaptureScreen.js +8 -9
  240. package/lib/commonjs/ui/screens/ImageCaptureScreen.js.map +1 -1
  241. package/lib/commonjs/ui/screens/PaymentScreen.js +9 -9
  242. package/lib/commonjs/ui/screens/PaymentScreen.js.map +1 -1
  243. package/lib/commonjs/ui/screens/PickupScreen.js +8 -9
  244. package/lib/commonjs/ui/screens/PickupScreen.js.map +1 -1
  245. package/lib/commonjs/ui/screens/ScanScreen.js +8 -10
  246. package/lib/commonjs/ui/screens/ScanScreen.js.map +1 -1
  247. package/lib/commonjs/ui/screens/StartWorkFlowScreen.js +14 -10
  248. package/lib/commonjs/ui/screens/StartWorkFlowScreen.js.map +1 -1
  249. package/lib/commonjs/ui/screens/ValidateOTPScreen.js +8 -9
  250. package/lib/commonjs/ui/screens/ValidateOTPScreen.js.map +1 -1
  251. package/lib/commonjs/ui/screens/WithBaseDispatchScreen.js +3 -3
  252. package/lib/commonjs/ui/screens/WithBaseDispatchScreen.js.map +1 -1
  253. package/lib/commonjs/ui/uiConfig/RouteParams.js +2 -1
  254. package/lib/commonjs/ui/uiConfig/RouteParams.js.map +1 -1
  255. package/lib/commonjs/utils/ApiUtils.js +3 -1
  256. package/lib/commonjs/utils/ApiUtils.js.map +1 -1
  257. package/lib/commonjs/utils/ExecTaskUtils.js +35 -5
  258. package/lib/commonjs/utils/ExecTaskUtils.js.map +1 -1
  259. package/lib/commonjs/utils/Logger.js +6 -62
  260. package/lib/commonjs/utils/Logger.js.map +1 -1
  261. package/lib/commonjs/utils/NetworkUtil.js +4 -4
  262. package/lib/commonjs/utils/NetworkUtil.js.map +1 -1
  263. package/lib/commonjs/utils/SdkUtils.js +2 -2
  264. package/lib/commonjs/utils/SdkUtils.js.map +1 -1
  265. package/lib/commonjs/utils/SyncManagerUtils.js +3 -3
  266. package/lib/commonjs/utils/SyncManagerUtils.js.map +1 -1
  267. package/lib/commonjs/utils/context/paymentContext.js +9 -0
  268. package/lib/commonjs/utils/context/paymentContext.js.map +1 -0
  269. package/lib/commonjs/utils/fcm/FCM.js +22 -4
  270. package/lib/commonjs/utils/fcm/FCM.js.map +1 -1
  271. package/lib/commonjs/utils/fcm/FcmUtils.js +12 -2
  272. package/lib/commonjs/utils/fcm/FcmUtils.js.map +1 -1
  273. package/lib/commonjs/utils/helper.js +6 -6
  274. package/lib/commonjs/utils/helper.js.map +1 -1
  275. package/lib/commonjs/utils/hooks/useModal.js +4 -3
  276. package/lib/commonjs/utils/hooks/useModal.js.map +1 -1
  277. package/lib/commonjs/utils/hooks/useTimer.js.map +1 -1
  278. package/lib/commonjs/utils/loginHelper.js +1 -1
  279. package/lib/commonjs/utils/loginHelper.js.map +1 -1
  280. package/lib/commonjs/utils/storage.js +11 -17
  281. package/lib/commonjs/utils/storage.js.map +1 -1
  282. package/lib/commonjs/utils/utils.js +2 -3
  283. package/lib/commonjs/utils/utils.js.map +1 -1
  284. package/lib/module/analytics/firebase/FirebaseLogging.js +0 -3
  285. package/lib/module/analytics/firebase/FirebaseLogging.js.map +1 -1
  286. package/lib/module/analytics/sentry/SentryAnalyticsSingleton.js +5 -5
  287. package/lib/module/analytics/sentry/SentryAnalyticsSingleton.js.map +1 -1
  288. package/lib/module/analytics/sentry/SentryAnalyticsUtils.js +7 -14
  289. package/lib/module/analytics/sentry/SentryAnalyticsUtils.js.map +1 -1
  290. package/lib/module/components/dispatch/DispatchExecNavigator.js +14 -4
  291. package/lib/module/components/dispatch/DispatchExecNavigator.js.map +1 -1
  292. package/lib/module/components/executiontasks/ExecutionTasksIndex.js +2 -1
  293. package/lib/module/components/executiontasks/ExecutionTasksIndex.js.map +1 -1
  294. package/lib/module/components/executiontasks/cancellation/CancelET.js +6 -8
  295. package/lib/module/components/executiontasks/cancellation/CancelET.js.map +1 -1
  296. package/lib/module/components/executiontasks/collectPayment/CollectPayment.js +32 -0
  297. package/lib/module/components/executiontasks/collectPayment/CollectPayment.js.map +1 -0
  298. package/lib/module/components/executiontasks/collectPayment/CollectPaymentSchema.js +29 -0
  299. package/lib/module/components/executiontasks/collectPayment/CollectPaymentSchema.js.map +1 -0
  300. package/lib/module/components/executiontasks/collectPayment/PaymentStyles.js +96 -0
  301. package/lib/module/components/executiontasks/collectPayment/PaymentStyles.js.map +1 -0
  302. package/lib/module/components/executiontasks/collectPayment/PaymentUtils.js +132 -0
  303. package/lib/module/components/executiontasks/collectPayment/PaymentUtils.js.map +1 -0
  304. package/lib/module/components/executiontasks/collectPayment/components/CompletePayment.js +179 -0
  305. package/lib/module/components/executiontasks/collectPayment/components/CompletePayment.js.map +1 -0
  306. package/lib/module/components/executiontasks/collectPayment/components/CustomContactsModal.js +2 -0
  307. package/lib/module/components/executiontasks/collectPayment/components/CustomContactsModal.js.map +1 -0
  308. package/lib/module/components/executiontasks/collectPayment/components/InitPayment.js +433 -0
  309. package/lib/module/components/executiontasks/collectPayment/components/InitPayment.js.map +1 -0
  310. package/lib/module/components/executiontasks/collectPayment/components/PaymentContactDetails.js +531 -0
  311. package/lib/module/components/executiontasks/collectPayment/components/PaymentContactDetails.js.map +1 -0
  312. package/lib/module/components/executiontasks/collectPayment/components/ProcessPayment.js +880 -0
  313. package/lib/module/components/executiontasks/collectPayment/components/ProcessPayment.js.map +1 -0
  314. package/lib/module/components/executiontasks/deliver/DeliverET.js +13 -19
  315. package/lib/module/components/executiontasks/deliver/DeliverET.js.map +1 -1
  316. package/lib/module/components/executiontasks/deliver/SLDeliverET.js +21 -24
  317. package/lib/module/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
  318. package/lib/module/components/executiontasks/doodle/SignatureET.js +0 -1
  319. package/lib/module/components/executiontasks/doodle/SignatureET.js.map +1 -1
  320. package/lib/module/components/executiontasks/dropCash/DropCashET.js.map +1 -1
  321. package/lib/module/components/executiontasks/dropCash/SLDropCash.js +6 -1
  322. package/lib/module/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
  323. package/lib/module/components/executiontasks/forms/widgets/DateTimeWidget.js +11 -12
  324. package/lib/module/components/executiontasks/forms/widgets/DateTimeWidget.js.map +1 -1
  325. package/lib/module/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js +9 -10
  326. package/lib/module/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js.map +1 -1
  327. package/lib/module/components/executiontasks/forms/widgets/TimeRangeSelector.js +1 -1
  328. package/lib/module/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
  329. package/lib/module/components/executiontasks/imageCapture/ImageCapture.js +9 -11
  330. package/lib/module/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
  331. package/lib/module/components/executiontasks/payments/PaymentUtils.js +11 -2
  332. package/lib/module/components/executiontasks/payments/PaymentUtils.js.map +1 -1
  333. package/lib/module/components/executiontasks/payments/init/InitPaymentET.js +3 -4
  334. package/lib/module/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
  335. package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
  336. package/lib/module/components/executiontasks/pickup/PickupET.js +13 -19
  337. package/lib/module/components/executiontasks/pickup/PickupET.js.map +1 -1
  338. package/lib/module/components/executiontasks/pickup/SLPickupET.js +15 -21
  339. package/lib/module/components/executiontasks/pickup/SLPickupET.js.map +1 -1
  340. package/lib/module/components/executiontasks/scan/ScanET.js +2 -4
  341. package/lib/module/components/executiontasks/scan/ScanET.js.map +1 -1
  342. package/lib/module/components/executiontasks/scan/constants.js.map +1 -1
  343. package/lib/module/components/executiontasks/scan/interfaces.js.map +1 -1
  344. package/lib/module/components/executiontasks/scan/modalConstant.js.map +1 -1
  345. package/lib/module/components/executiontasks/scan/sub_components/CScanner.js +3 -4
  346. package/lib/module/components/executiontasks/scan/sub_components/CScanner.js.map +1 -1
  347. package/lib/module/components/executiontasks/scan/sub_components/DropDownUtils.js +0 -1
  348. package/lib/module/components/executiontasks/scan/sub_components/DropDownUtils.js.map +1 -1
  349. package/lib/module/components/executiontasks/scan/sub_components/ERDropDown.js +0 -2
  350. package/lib/module/components/executiontasks/scan/sub_components/ERDropDown.js.map +1 -1
  351. package/lib/module/components/executiontasks/scan/sub_components/SummaryPage.js +1 -4
  352. package/lib/module/components/executiontasks/scan/sub_components/SummaryPage.js.map +1 -1
  353. package/lib/module/components/executiontasks/scan/utils.js +11 -6
  354. package/lib/module/components/executiontasks/scan/utils.js.map +1 -1
  355. package/lib/module/components/executiontasks/validateOTP/ValidateOTPET.js.map +1 -1
  356. package/lib/module/components/executiontasks/validateOTP/constants.js.map +1 -1
  357. package/lib/module/components/widgets/Card.js +0 -1
  358. package/lib/module/components/widgets/Card.js.map +1 -1
  359. package/lib/module/components/widgets/IconButton.js +19 -22
  360. package/lib/module/components/widgets/IconButton.js.map +1 -1
  361. package/lib/module/components/widgets/ModalWidget.js +1 -0
  362. package/lib/module/components/widgets/ModalWidget.js.map +1 -1
  363. package/lib/module/components/widgets/ProgressDialog.js +2 -2
  364. package/lib/module/components/widgets/ProgressDialog.js.map +1 -1
  365. package/lib/module/components/widgets/SnackBarCustom.js +21 -20
  366. package/lib/module/components/widgets/SnackBarCustom.js.map +1 -1
  367. package/lib/module/components/widgets/SplitTextInput.js +9 -10
  368. package/lib/module/components/widgets/SplitTextInput.js.map +1 -1
  369. package/lib/module/components/widgets/Timer.js +32 -0
  370. package/lib/module/components/widgets/Timer.js.map +1 -0
  371. package/lib/module/constants/apiConstants.js +4 -1
  372. package/lib/module/constants/apiConstants.js.map +1 -1
  373. package/lib/module/constants/constants.js +3 -0
  374. package/lib/module/constants/constants.js.map +1 -1
  375. package/lib/module/errors/BaseError.js +3 -3
  376. package/lib/module/events/EventDispatcher.js +3 -0
  377. package/lib/module/events/EventDispatcher.js.map +1 -1
  378. package/lib/module/events/constants.js +2 -1
  379. package/lib/module/events/constants.js.map +1 -1
  380. package/lib/module/events/interface.js.map +1 -1
  381. package/lib/module/icons/CircleMark.js +20 -0
  382. package/lib/module/icons/CircleMark.js.map +1 -0
  383. package/lib/module/icons/FailedIcon.js +62 -0
  384. package/lib/module/icons/FailedIcon.js.map +1 -0
  385. package/lib/module/icons/FailureCloseIcon.js +35 -0
  386. package/lib/module/icons/FailureCloseIcon.js.map +1 -0
  387. package/lib/module/icons/SuccessCompleteIcon.js +35 -0
  388. package/lib/module/icons/SuccessCompleteIcon.js.map +1 -0
  389. package/lib/module/manager/dispatch/DispatchStateContainer.js +10 -8
  390. package/lib/module/manager/dispatch/DispatchStateContainer.js.map +1 -1
  391. package/lib/module/manager/dispatchCodes/EventCodeContainer.js +5 -5
  392. package/lib/module/manager/dispatchCodes/EventCodeContainer.js.map +1 -1
  393. package/lib/module/manager/dispatchCodes/EventCodeRepo.js +5 -5
  394. package/lib/module/manager/dispatchCodes/EventCodeRepo.js.map +1 -1
  395. package/lib/module/manager/dispatchCodes/ReasonCodeContainer.js +5 -5
  396. package/lib/module/manager/dispatchCodes/ReasonCodeContainer.js.map +1 -1
  397. package/lib/module/manager/dispatchCodes/ReasonCodeRepo.js +5 -5
  398. package/lib/module/manager/dispatchCodes/ReasonCodeRepo.js.map +1 -1
  399. package/lib/module/manager/location/LocationManager.js +5 -5
  400. package/lib/module/manager/location/LocationManager.js.map +1 -1
  401. package/lib/module/manager/sdk/DispatchSDKManager.js +6 -6
  402. package/lib/module/manager/sdk/DispatchSDKManager.js.map +1 -1
  403. package/lib/module/manager/sdk/DispatchSdkCache.js +5 -5
  404. package/lib/module/manager/sdk/DispatchSdkCache.js.map +1 -1
  405. package/lib/module/manager/sdk/callbacksHandler.js +3 -3
  406. package/lib/module/manager/syncmanager/AppSyncManager.js +5 -5
  407. package/lib/module/manager/syncmanager/AppSyncManager.js.map +1 -1
  408. package/lib/module/manager/syncmanager/DBConfig.js +1 -0
  409. package/lib/module/manager/syncmanager/DBConfig.js.map +1 -1
  410. package/lib/module/manager/syncmanager/constants.js +1 -1
  411. package/lib/module/manager/syncmanager/constants.js.map +1 -1
  412. package/lib/module/manager/syncmanager/document/DocumentHttpClient.js.map +1 -1
  413. package/lib/module/manager/syncmanager/document/DocumentManager.js +6 -9
  414. package/lib/module/manager/syncmanager/document/DocumentManager.js.map +1 -1
  415. package/lib/module/manager/syncmanager/document/DocumentSyncManager.js +11 -45
  416. package/lib/module/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
  417. package/lib/module/manager/syncmanager/events/ETEventsManager.js +5 -6
  418. package/lib/module/manager/syncmanager/events/ETEventsManager.js.map +1 -1
  419. package/lib/module/manager/syncmanager/events/EventsSyncManager.js +5 -6
  420. package/lib/module/manager/syncmanager/events/EventsSyncManager.js.map +1 -1
  421. package/lib/module/manager/syncmanager/events/SyncHttpClient.js +3 -7
  422. package/lib/module/manager/syncmanager/events/SyncHttpClient.js.map +1 -1
  423. package/lib/module/models/DispatchModels.js.map +1 -1
  424. package/lib/module/models/execTasks/ETConfig.js +3 -0
  425. package/lib/module/models/execTasks/ETConfig.js.map +1 -1
  426. package/lib/module/models/sdk.js.map +1 -1
  427. package/lib/module/native/signature/SignatureCapture.js +4 -4
  428. package/lib/module/network/GraphQLClient.js +14 -18
  429. package/lib/module/network/GraphQLClient.js.map +1 -1
  430. package/lib/module/network/NetworkClient.js +29 -2
  431. package/lib/module/network/NetworkClient.js.map +1 -1
  432. package/lib/module/network/NetworkUtils.js +1 -4
  433. package/lib/module/network/NetworkUtils.js.map +1 -1
  434. package/lib/module/network/Queries.js.map +1 -1
  435. package/lib/module/network/client.js +4 -4
  436. package/lib/module/network/client.js.map +1 -1
  437. package/lib/module/resources/Login.js +3 -3
  438. package/lib/module/resources/network.js +3 -3
  439. package/lib/module/styles/executionTasks/CommonStyles.js +12 -2
  440. package/lib/module/styles/executionTasks/CommonStyles.js.map +1 -1
  441. package/lib/module/ui/screens/CancellationScreen.js +5 -6
  442. package/lib/module/ui/screens/CancellationScreen.js.map +1 -1
  443. package/lib/module/ui/screens/CaptureInputScreen.js +6 -7
  444. package/lib/module/ui/screens/CaptureInputScreen.js.map +1 -1
  445. package/lib/module/ui/screens/CollectPaymentScreen.js +244 -0
  446. package/lib/module/ui/screens/CollectPaymentScreen.js.map +1 -0
  447. package/lib/module/ui/screens/CompleteObjectiveScreen.js +5 -6
  448. package/lib/module/ui/screens/CompleteObjectiveScreen.js.map +1 -1
  449. package/lib/module/ui/screens/DeliverScreen.js +6 -7
  450. package/lib/module/ui/screens/DeliverScreen.js.map +1 -1
  451. package/lib/module/ui/screens/DisplayScreen.js +6 -7
  452. package/lib/module/ui/screens/DisplayScreen.js.map +1 -1
  453. package/lib/module/ui/screens/DoodleScreen.js +6 -7
  454. package/lib/module/ui/screens/DoodleScreen.js.map +1 -1
  455. package/lib/module/ui/screens/DropCashScreen.js +41 -10
  456. package/lib/module/ui/screens/DropCashScreen.js.map +1 -1
  457. package/lib/module/ui/screens/ETScreensIndex.js +2 -1
  458. package/lib/module/ui/screens/ETScreensIndex.js.map +1 -1
  459. package/lib/module/ui/screens/FormsScreen.js +6 -7
  460. package/lib/module/ui/screens/FormsScreen.js.map +1 -1
  461. package/lib/module/ui/screens/GeofenceScreen.js +6 -7
  462. package/lib/module/ui/screens/GeofenceScreen.js.map +1 -1
  463. package/lib/module/ui/screens/HttpRequestScreen.js +6 -7
  464. package/lib/module/ui/screens/HttpRequestScreen.js.map +1 -1
  465. package/lib/module/ui/screens/ImageCaptureScreen.js +6 -7
  466. package/lib/module/ui/screens/ImageCaptureScreen.js.map +1 -1
  467. package/lib/module/ui/screens/PaymentScreen.js +7 -7
  468. package/lib/module/ui/screens/PaymentScreen.js.map +1 -1
  469. package/lib/module/ui/screens/PickupScreen.js +6 -7
  470. package/lib/module/ui/screens/PickupScreen.js.map +1 -1
  471. package/lib/module/ui/screens/ScanScreen.js +6 -8
  472. package/lib/module/ui/screens/ScanScreen.js.map +1 -1
  473. package/lib/module/ui/screens/StartWorkFlowScreen.js +12 -8
  474. package/lib/module/ui/screens/StartWorkFlowScreen.js.map +1 -1
  475. package/lib/module/ui/screens/ValidateOTPScreen.js +6 -7
  476. package/lib/module/ui/screens/ValidateOTPScreen.js.map +1 -1
  477. package/lib/module/ui/screens/WithBaseDispatchScreen.js +1 -1
  478. package/lib/module/ui/uiConfig/RouteParams.js +2 -1
  479. package/lib/module/ui/uiConfig/RouteParams.js.map +1 -1
  480. package/lib/module/utils/ApiUtils.js +2 -0
  481. package/lib/module/utils/ApiUtils.js.map +1 -1
  482. package/lib/module/utils/ExecTaskUtils.js +31 -4
  483. package/lib/module/utils/ExecTaskUtils.js.map +1 -1
  484. package/lib/module/utils/Logger.js +5 -61
  485. package/lib/module/utils/Logger.js.map +1 -1
  486. package/lib/module/utils/NetworkUtil.js +3 -3
  487. package/lib/module/utils/NetworkUtil.js.map +1 -1
  488. package/lib/module/utils/SdkUtils.js.map +1 -1
  489. package/lib/module/utils/SyncManagerUtils.js +1 -1
  490. package/lib/module/utils/SyncManagerUtils.js.map +1 -1
  491. package/lib/module/utils/context/paymentContext.js +3 -0
  492. package/lib/module/utils/context/paymentContext.js.map +1 -0
  493. package/lib/module/utils/fcm/FCM.js +20 -2
  494. package/lib/module/utils/fcm/FCM.js.map +1 -1
  495. package/lib/module/utils/fcm/FcmUtils.js +10 -0
  496. package/lib/module/utils/fcm/FcmUtils.js.map +1 -1
  497. package/lib/module/utils/helper.js +5 -5
  498. package/lib/module/utils/helper.js.map +1 -1
  499. package/lib/module/utils/hooks/useModal.js +2 -1
  500. package/lib/module/utils/hooks/useModal.js.map +1 -1
  501. package/lib/module/utils/hooks/useTimer.js.map +1 -1
  502. package/lib/module/utils/storage.js +9 -15
  503. package/lib/module/utils/storage.js.map +1 -1
  504. package/lib/module/utils/utils.js +1 -2
  505. package/lib/module/utils/utils.js.map +1 -1
  506. package/lib/typescript/components/executiontasks/ExecutionTasksIndex.d.ts +4 -2
  507. package/lib/typescript/components/executiontasks/collectPayment/CollectPayment.d.ts +4 -0
  508. package/lib/typescript/components/executiontasks/collectPayment/CollectPaymentSchema.d.ts +155 -0
  509. package/lib/typescript/components/executiontasks/collectPayment/PaymentStyles.d.ts +92 -0
  510. package/lib/typescript/components/executiontasks/collectPayment/PaymentUtils.d.ts +16 -0
  511. package/lib/typescript/components/executiontasks/collectPayment/components/CompletePayment.d.ts +4 -0
  512. package/lib/typescript/components/executiontasks/collectPayment/components/CustomContactsModal.d.ts +0 -0
  513. package/lib/typescript/components/executiontasks/collectPayment/components/InitPayment.d.ts +4 -0
  514. package/lib/typescript/components/executiontasks/collectPayment/components/PaymentContactDetails.d.ts +4 -0
  515. package/lib/typescript/components/executiontasks/collectPayment/components/ProcessPayment.d.ts +4 -0
  516. package/lib/typescript/components/executiontasks/scan/interfaces.d.ts +1 -1
  517. package/lib/typescript/components/executiontasks/scan/utils.d.ts +1 -0
  518. package/lib/typescript/components/widgets/ProgressDialog.d.ts +3 -0
  519. package/lib/typescript/components/widgets/SnackBarCustom.d.ts +3 -2
  520. package/lib/typescript/components/widgets/Timer.d.ts +7 -0
  521. package/lib/typescript/constants/apiConstants.d.ts +3 -0
  522. package/lib/typescript/constants/constants.d.ts +3 -0
  523. package/lib/typescript/events/EventDispatcher.d.ts +1 -0
  524. package/lib/typescript/events/constants.d.ts +1 -0
  525. package/lib/typescript/events/interface.d.ts +1 -1
  526. package/lib/typescript/icons/CircleMark.d.ts +3 -0
  527. package/lib/typescript/icons/FailedIcon.d.ts +4 -0
  528. package/lib/typescript/icons/FailureCloseIcon.d.ts +4 -0
  529. package/lib/typescript/icons/SuccessCompleteIcon.d.ts +4 -0
  530. package/lib/typescript/manager/syncmanager/constants.d.ts +1 -1
  531. package/lib/typescript/models/DispatchModels.d.ts +11 -0
  532. package/lib/typescript/models/execTasks/ETConfig.d.ts +6 -3
  533. package/lib/typescript/models/sdk.d.ts +12 -0
  534. package/lib/typescript/network/NetworkClient.d.ts +3 -1
  535. package/lib/typescript/styles/executionTasks/CommonStyles.d.ts +10 -1
  536. package/lib/typescript/ui/screens/CollectPaymentScreen.d.ts +3 -0
  537. package/lib/typescript/ui/screens/ETScreensIndex.d.ts +2 -1
  538. package/lib/typescript/ui/uiConfig/RouteParams.d.ts +1 -0
  539. package/lib/typescript/utils/ExecTaskUtils.d.ts +2 -0
  540. package/lib/typescript/utils/context/paymentContext.d.ts +7 -0
  541. package/package.json +5 -4
  542. package/src/analytics/firebase/FirebaseLogging.ts +2 -11
  543. package/src/analytics/sentry/SentryAnalyticsUtils.ts +0 -7
  544. package/src/components/dispatch/DispatchExecNavigator.tsx +14 -0
  545. package/src/components/executiontasks/ExecutionTasksIndex.ts +8 -0
  546. package/src/components/executiontasks/collectPayment/CollectPayment.tsx +60 -0
  547. package/src/components/executiontasks/collectPayment/CollectPaymentSchema.ts +182 -0
  548. package/src/components/executiontasks/collectPayment/PaymentStyles.ts +102 -0
  549. package/src/components/executiontasks/collectPayment/PaymentUtils.ts +200 -0
  550. package/src/components/executiontasks/collectPayment/components/CompletePayment.tsx +273 -0
  551. package/src/components/executiontasks/collectPayment/components/CustomContactsModal.tsx +0 -0
  552. package/src/components/executiontasks/collectPayment/components/InitPayment.tsx +658 -0
  553. package/src/components/executiontasks/collectPayment/components/PaymentContactDetails.tsx +790 -0
  554. package/src/components/executiontasks/collectPayment/components/ProcessPayment.tsx +1352 -0
  555. package/src/components/executiontasks/deliver/SLDeliverET.tsx +132 -60
  556. package/src/components/executiontasks/dropCash/SLDropCash.tsx +35 -12
  557. package/src/components/executiontasks/payments/PaymentUtils.ts +10 -2
  558. package/src/components/executiontasks/pickup/SLPickupET.tsx +6 -3
  559. package/src/components/executiontasks/scan/ScanET.tsx +1 -1
  560. package/src/components/executiontasks/scan/interfaces.ts +1 -1
  561. package/src/components/executiontasks/scan/utils.ts +16 -8
  562. package/src/components/widgets/ModalWidget.tsx +26 -8
  563. package/src/components/widgets/ProgressDialog.tsx +23 -3
  564. package/src/components/widgets/SnackBarCustom.tsx +8 -1
  565. package/src/components/widgets/SplitTextInput.tsx +1 -1
  566. package/src/components/widgets/Timer.tsx +53 -0
  567. package/src/constants/apiConstants.ts +3 -0
  568. package/src/constants/constants.ts +3 -0
  569. package/src/events/EventDispatcher.ts +4 -0
  570. package/src/events/constants.ts +1 -0
  571. package/src/events/interface.ts +7 -1
  572. package/src/icons/CircleMark.tsx +18 -0
  573. package/src/icons/FailedIcon.tsx +80 -0
  574. package/src/icons/FailureCloseIcon.tsx +35 -0
  575. package/src/icons/SuccessCompleteIcon.tsx +35 -0
  576. package/src/manager/dispatch/DispatchStateContainer.tsx +6 -4
  577. package/src/manager/sdk/DispatchSDKManager.ts +1 -0
  578. package/src/manager/syncmanager/constants.ts +1 -1
  579. package/src/manager/syncmanager/document/DocumentManager.ts +6 -8
  580. package/src/manager/syncmanager/document/DocumentSyncManager.ts +8 -43
  581. package/src/models/DispatchModels.ts +12 -0
  582. package/src/models/execTasks/ETConfig.ts +3 -0
  583. package/src/models/sdk.ts +13 -0
  584. package/src/network/NetworkClient.ts +34 -1
  585. package/src/network/client.ts +1 -0
  586. package/src/styles/executionTasks/CommonStyles.ts +32 -8
  587. package/src/ui/screens/CollectPaymentScreen.tsx +315 -0
  588. package/src/ui/screens/DropCashScreen.tsx +49 -2
  589. package/src/ui/screens/ETScreensIndex.ts +2 -0
  590. package/src/ui/screens/PaymentScreen.tsx +1 -0
  591. package/src/ui/screens/StartWorkFlowScreen.tsx +16 -1
  592. package/src/ui/uiConfig/RouteParams.ts +8 -1
  593. package/src/utils/ApiUtils.ts +1 -0
  594. package/src/utils/ExecTaskUtils.ts +44 -3
  595. package/src/utils/Logger.ts +1 -58
  596. package/src/utils/SyncManagerUtils.ts +1 -0
  597. package/src/utils/context/paymentContext.ts +8 -0
  598. package/src/utils/fcm/FCM.ts +30 -0
  599. package/src/utils/fcm/FcmUtils.ts +53 -29
  600. package/lib/commonjs/icons/circleMark.svg +0 -3
  601. package/lib/module/icons/circleMark.svg +0 -3
  602. package/src/icons/circleMark.svg +0 -3
@@ -0,0 +1,531 @@
1
+ import React, { useEffect, useState, useLayoutEffect, useContext } from 'react';
2
+ import { BackHandler, FlatList, Platform, StyleSheet, Text, View } from 'react-native';
3
+ import {
4
+ // PAYMENT_SHARED_PREF_KEY,
5
+ getPaymentDataMO, getPaymentType, removeSharedPrefPaymentData } from '../PaymentUtils';
6
+ import { getBaseETResponse, maskContact } from '../../../../utils/ExecTaskUtils';
7
+ import { EntityCode, ExecutionTaskID } from '../../../../models/execTasks/ETConfig';
8
+ import { getEventCodeByET } from '../../../../manager/dispatchCodes/EventCodeContainer';
9
+ import { CommonStyles, Fonts } from '../../../../styles/executionTasks/CommonStyles';
10
+ import { Button, Provider, RadioButton, TextInput } from 'react-native-paper';
11
+ import Icon from 'react-native-vector-icons/MaterialIcons';
12
+ import { EMAIL_REGEX, PAYMENT_NOTIFICATION } from '../../../../constants/constants';
13
+ import EventListener from '../../../../events';
14
+ import { PAYMENT_SCREEN, STATUS } from '../CollectPaymentSchema';
15
+ import { useFocusEffect } from '@react-navigation/native';
16
+ import { RouteParams } from '../../../../ui/uiConfig/RouteParams';
17
+ import { DispatchExecutor as dispatchExecutor } from '@os1-platform/platform-coreos-execution-engine-sdk';
18
+ import callbackHandler from '../../../../manager/sdk/callbacksHandler';
19
+ import ModalWidget from '../../../../components/widgets/ModalWidget';
20
+ import Storage from '../../../../utils/storage';
21
+ import { PaymentContext } from '../../../../utils/context/paymentContext';
22
+ import { ENDPOINTS } from '../../../../constants/apiConstants';
23
+ import { PROGRESS_GROUP } from '../../../../utils/Constants';
24
+ import Logger, { LOG_TYPE } from '../../../../utils/Logger';
25
+ let storage = Storage.getInstance();
26
+ const PaymentContactDetails = props => {
27
+ var _props$route$params$R, _props$onsiteLinkShar;
28
+ const paymentConfigContext = useContext(PaymentContext);
29
+ const [selectedContact, setSelectedContact] = useState('');
30
+ const [displayContactModal, setDisplayContactModal] = useState(false);
31
+ const [manualContactDetails, setManualContactDetails] = useState();
32
+ const [displayError, setErrorDisplay] = useState(false);
33
+ const [manualContact, setManualContact] = useState('');
34
+ const [contactList, setContactList] = useState([]);
35
+ const paymentRefId = (_props$route$params$R = props.route.params[RouteParams.ROOT_META_DATA].paymentConfig) === null || _props$route$params$R === void 0 ? void 0 : _props$route$params$R.paymentRefId;
36
+ useEffect(() => {
37
+ (async () => {
38
+ if (props.route.params[RouteParams.ROOT_META_DATA]) {
39
+ var _phoneNumbers$value;
40
+ //Call objectiveDetails fn and fetch sds ids
41
+ let progressGroup = null;
42
+ try {
43
+ progressGroup = await Storage.getInstance().getSharedItem(PROGRESS_GROUP, false);
44
+ } catch (error) {
45
+ var _error$response;
46
+ Logger.getInstance().logEvent('~ getPaymentStatus triggered ', JSON.stringify((error === null || error === void 0 || (_error$response = error.response) === null || _error$response === void 0 ? void 0 : _error$response.data) || error), LOG_TYPE.SDK_ERROR);
47
+ progressGroup = null;
48
+ }
49
+ const {
50
+ contact
51
+ } = await dispatchExecutor.getObjectiveTaskDetails(props.mergedObjectiveId[0], progressGroup, props.route.params[RouteParams.ROOT_META_DATA].statusFilter);
52
+
53
+ // run callback to get corresponding phone numbers
54
+ const phoneNumbers = await callbackHandler.getPhoneNumbers(contact);
55
+ if (phoneNumbers && (_phoneNumbers$value = phoneNumbers.value) !== null && _phoneNumbers$value !== void 0 && _phoneNumbers$value.length) {
56
+ setContactList(phoneNumbers.value);
57
+ }
58
+ }
59
+ })();
60
+ EventListener.on(PAYMENT_NOTIFICATION, async data => {
61
+ console.log("PaymentCollectDetail:", JSON.stringify(data));
62
+ let sharedPrefPaymentData = null;
63
+ if (data && (data.status === STATUS.SUCCESS || data.status === STATUS.FAILED)) {
64
+ sharedPrefPaymentData = await getPaymentDataMO(props.mergedObjectiveId, data.refId, storage);
65
+ }
66
+ if (sharedPrefPaymentData && data && data.status === STATUS.SUCCESS) {
67
+ var _sharedPrefPaymentDat, _sharedPrefPaymentDat2, _sharedPrefPaymentDat3, _paymentConfigContext, _props$applicableReas;
68
+ props.next({
69
+ paymentMode: ((_sharedPrefPaymentDat = sharedPrefPaymentData) === null || _sharedPrefPaymentDat === void 0 ? void 0 : _sharedPrefPaymentDat.paymentMode) || props.paymentMode,
70
+ collectedAmount: {
71
+ value: ((_sharedPrefPaymentDat2 = sharedPrefPaymentData) === null || _sharedPrefPaymentDat2 === void 0 ? void 0 : _sharedPrefPaymentDat2.amount.value) || props.expectedAmount,
72
+ currencyCode: ((_sharedPrefPaymentDat3 = sharedPrefPaymentData) === null || _sharedPrefPaymentDat3 === void 0 ? void 0 : _sharedPrefPaymentDat3.amount.currencyCode) || (paymentConfigContext === null || paymentConfigContext === void 0 || (_paymentConfigContext = paymentConfigContext.sdkConfig) === null || _paymentConfigContext === void 0 || (_paymentConfigContext = _paymentConfigContext.etConfig) === null || _paymentConfigContext === void 0 ? void 0 : _paymentConfigContext.currencyCode) || ''
73
+ },
74
+ refId: data.refId,
75
+ screen: PAYMENT_SCREEN.COMPLETE,
76
+ sourceScreen: PAYMENT_SCREEN.CONTACTS,
77
+ ...(await getBaseETResponse(EntityCode.COLLECT_PAYMENT_ET, true, getEventCodeByET(ExecutionTaskID.COLLECT_PAYMENT_ET, true, (_props$applicableReas = props.applicableReasons) === null || _props$applicableReas === void 0 ? void 0 : _props$applicableReas.success), '', props.mergedObjectiveId, ExecutionTaskID.COLLECT_PAYMENT_ET))
78
+ });
79
+ } else if (sharedPrefPaymentData && data && data.status === STATUS.FAILED) {
80
+ /* const _sharedPrefPaymentData = JSON.parse(
81
+ JSON.stringify(sharedPrefPaymentData)
82
+ ); */
83
+ /* await storage.removeSharedItems(
84
+ props.mergedObjectiveId.map((_id) => PAYMENT_SHARED_PREF_KEY + _id)
85
+ ); */
86
+ await removeSharedPrefPaymentData(data.refId, storage);
87
+ }
88
+ });
89
+ return () => EventListener.remove(PAYMENT_NOTIFICATION);
90
+ }, []);
91
+ const handleOnCancelClick = async () => {
92
+ var _props$applicableReas2, _paymentConfigContext2;
93
+ props.onSubmitET({
94
+ paymentMode: props.paymentMode,
95
+ refId: paymentRefId,
96
+ ...(await getBaseETResponse(EntityCode.COLLECT_PAYMENT_ET, false, getEventCodeByET(ExecutionTaskID.COLLECT_PAYMENT_ET, false, (_props$applicableReas2 = props.applicableReasons) === null || _props$applicableReas2 === void 0 ? void 0 : _props$applicableReas2.failure), '', props.mergedObjectiveId, ExecutionTaskID.COLLECT_PAYMENT_ET)),
97
+ collectedAmount: {
98
+ value: props.expectedAmount,
99
+ currencyCode: (paymentConfigContext === null || paymentConfigContext === void 0 || (_paymentConfigContext2 = paymentConfigContext.sdkConfig) === null || _paymentConfigContext2 === void 0 || (_paymentConfigContext2 = _paymentConfigContext2.etConfig) === null || _paymentConfigContext2 === void 0 ? void 0 : _paymentConfigContext2.currencyCode) || ''
100
+ }
101
+ });
102
+ };
103
+ const getPaymentStatus = async isProceed => {
104
+ try {
105
+ var _ps$data$transactions, _ps$data$meta, _ps$data$meta2, _ps$data$transactions2;
106
+ let sharedPrefPaymentData = null;
107
+ const paymentResp = await (paymentConfigContext === null || paymentConfigContext === void 0 ? void 0 : paymentConfigContext.networkInstance.requestGet(ENDPOINTS.PAYMENT_STATUS + paymentRefId, {
108
+ requestId: 'payment:' + paymentRefId
109
+ }, {
110
+ appAbbr: paymentConfigContext.sdkConfig.etConfig.appAbbr,
111
+ latest: true
112
+ }));
113
+ // const paymentResp = {
114
+ // data: {
115
+ // data: {
116
+ // meta: { totalCount: 1 },
117
+ // transactions: [
118
+ // {
119
+ // refId: paymentRefId,
120
+ // status: STATUS.FAILED,
121
+ // subStatus: SUB_STATUS.completed,
122
+ // money: {
123
+ // amount: 1000,
124
+ // currency: 'INR',
125
+ // },
126
+ // txnId: '123',
127
+ // txnType: TRANSACTION_TYPE.LINK,
128
+ // appAbbr: 'testApp31',
129
+ // },
130
+ // ],
131
+ // },
132
+ // },
133
+ // };
134
+ const _ps = paymentResp === null || paymentResp === void 0 ? void 0 : paymentResp.data;
135
+ console.log('Contact getPaymentStatus _ps: ', JSON.stringify(_ps));
136
+ sharedPrefPaymentData = await getPaymentDataMO(props.mergedObjectiveId, paymentRefId, storage);
137
+ if (_ps !== null && _ps !== void 0 && (_ps$data$transactions = _ps.data.transactions) !== null && _ps$data$transactions !== void 0 && _ps$data$transactions.length && (sharedPrefPaymentData || getPaymentType(_ps === null || _ps === void 0 ? void 0 : _ps.data.transactions[0].txnType)) && (_ps$data$meta = _ps.data.meta) !== null && _ps$data$meta !== void 0 && _ps$data$meta.totalCount && (_ps === null || _ps === void 0 ? void 0 : _ps.data.transactions[0].status) === STATUS.SUCCESS) {
138
+ var _sharedPrefPaymentDat4, _sharedPrefPaymentDat5, _sharedPrefPaymentDat6, _paymentConfigContext3, _props$applicableReas3;
139
+ props.next({
140
+ paymentMode: ((_sharedPrefPaymentDat4 = sharedPrefPaymentData) === null || _sharedPrefPaymentDat4 === void 0 ? void 0 : _sharedPrefPaymentDat4.paymentMode) || getPaymentType(_ps === null || _ps === void 0 ? void 0 : _ps.data.transactions[0].txnType) || props.paymentMode,
141
+ collectedAmount: {
142
+ value: ((_sharedPrefPaymentDat5 = sharedPrefPaymentData) === null || _sharedPrefPaymentDat5 === void 0 ? void 0 : _sharedPrefPaymentDat5.amount.value) || (_ps === null || _ps === void 0 ? void 0 : _ps.data.transactions[0].money.amount) || props.expectedAmount,
143
+ currencyCode: ((_sharedPrefPaymentDat6 = sharedPrefPaymentData) === null || _sharedPrefPaymentDat6 === void 0 ? void 0 : _sharedPrefPaymentDat6.amount.currencyCode) || (_ps === null || _ps === void 0 ? void 0 : _ps.data.transactions[0].money.currency) || (paymentConfigContext === null || paymentConfigContext === void 0 || (_paymentConfigContext3 = paymentConfigContext.sdkConfig) === null || _paymentConfigContext3 === void 0 || (_paymentConfigContext3 = _paymentConfigContext3.etConfig) === null || _paymentConfigContext3 === void 0 ? void 0 : _paymentConfigContext3.currencyCode) || ''
144
+ },
145
+ refId: _ps.data.transactions[0].refId,
146
+ screen: PAYMENT_SCREEN.COMPLETE,
147
+ sourceScreen: PAYMENT_SCREEN.CONTACTS,
148
+ ...(await getBaseETResponse(EntityCode.COLLECT_PAYMENT_ET, true, getEventCodeByET(ExecutionTaskID.COLLECT_PAYMENT_ET, true, (_props$applicableReas3 = props.applicableReasons) === null || _props$applicableReas3 === void 0 ? void 0 : _props$applicableReas3.success), '', props.mergedObjectiveId, ExecutionTaskID.COLLECT_PAYMENT_ET))
149
+ });
150
+ return;
151
+ } else if (sharedPrefPaymentData && (_ps$data$meta2 = _ps.data.meta) !== null && _ps$data$meta2 !== void 0 && _ps$data$meta2.totalCount && _ps !== null && _ps !== void 0 && (_ps$data$transactions2 = _ps.data.transactions) !== null && _ps$data$transactions2 !== void 0 && _ps$data$transactions2.length && (_ps === null || _ps === void 0 ? void 0 : _ps.data.transactions[0].status) === STATUS.FAILED) {
152
+ await removeSharedPrefPaymentData(paymentRefId, storage);
153
+ }
154
+ if (isProceed) await sendPaymentLink(selectedContact);else if (isProceed === false) await handleOnCancelClick();
155
+ } catch (err) {
156
+ var _err$response, _err$response2;
157
+ Logger.getInstance().logEvent('~ getPaymentStatus triggered ', JSON.stringify((err === null || err === void 0 || (_err$response = err.response) === null || _err$response === void 0 ? void 0 : _err$response.data) || err), LOG_TYPE.SDK_ERROR);
158
+ console.error('STATUS: ', (err === null || err === void 0 || (_err$response2 = err.response) === null || _err$response2 === void 0 ? void 0 : _err$response2.data) || err.message);
159
+ }
160
+ };
161
+
162
+ // Handle back-button click
163
+ useFocusEffect(React.useCallback(() => {
164
+ const onBackPress = () => {
165
+ (async (_props$applicableReas4, _paymentConfigContext4) => props.next({
166
+ paymentMode: props.paymentMode,
167
+ refId: paymentRefId,
168
+ ...(await getBaseETResponse(EntityCode.COLLECT_PAYMENT_ET, true, getEventCodeByET(ExecutionTaskID.COLLECT_PAYMENT_ET, true, (_props$applicableReas4 = props.applicableReasons) === null || _props$applicableReas4 === void 0 ? void 0 : _props$applicableReas4.success), '', props.mergedObjectiveId, ExecutionTaskID.COLLECT_PAYMENT_ET)),
169
+ screen: PAYMENT_SCREEN.INIT,
170
+ sourceScreen: PAYMENT_SCREEN.CONTACTS,
171
+ collectedAmount: {
172
+ value: props.expectedAmount,
173
+ currencyCode: (paymentConfigContext === null || paymentConfigContext === void 0 || (_paymentConfigContext4 = paymentConfigContext.sdkConfig) === null || _paymentConfigContext4 === void 0 || (_paymentConfigContext4 = _paymentConfigContext4.etConfig) === null || _paymentConfigContext4 === void 0 ? void 0 : _paymentConfigContext4.currencyCode) || ''
174
+ }
175
+ }))();
176
+ return true;
177
+ };
178
+ BackHandler.addEventListener('hardwareBackPress', onBackPress);
179
+ return () => BackHandler.removeEventListener('hardwareBackPress', onBackPress);
180
+ }, []));
181
+ useLayoutEffect(() => {
182
+ props.navigation.setOptions({
183
+ headerShown: true,
184
+ title: 'Payment Link',
185
+ headerLeft: () => {
186
+ return /*#__PURE__*/React.createElement(Icon, {
187
+ onPress: async () => {
188
+ var _props$applicableReas5, _paymentConfigContext5;
189
+ props.next({
190
+ paymentMode: props.paymentMode,
191
+ refId: paymentRefId,
192
+ ...(await getBaseETResponse(EntityCode.COLLECT_PAYMENT_ET, true, getEventCodeByET(ExecutionTaskID.COLLECT_PAYMENT_ET, true, (_props$applicableReas5 = props.applicableReasons) === null || _props$applicableReas5 === void 0 ? void 0 : _props$applicableReas5.success), '', props.mergedObjectiveId, ExecutionTaskID.COLLECT_PAYMENT_ET)),
193
+ screen: PAYMENT_SCREEN.INIT,
194
+ sourceScreen: PAYMENT_SCREEN.CONTACTS,
195
+ collectedAmount: {
196
+ value: props.expectedAmount,
197
+ currencyCode: (paymentConfigContext === null || paymentConfigContext === void 0 || (_paymentConfigContext5 = paymentConfigContext.sdkConfig) === null || _paymentConfigContext5 === void 0 || (_paymentConfigContext5 = _paymentConfigContext5.etConfig) === null || _paymentConfigContext5 === void 0 ? void 0 : _paymentConfigContext5.currencyCode) || ''
198
+ }
199
+ });
200
+ },
201
+ name: "arrow-back",
202
+ color: 'black',
203
+ size: 25,
204
+ style: {
205
+ paddingRight: 15,
206
+ paddingTop: 5
207
+ }
208
+ });
209
+ }
210
+ });
211
+ }, [props.navigation, props.title]);
212
+ const renderItem = ({
213
+ item
214
+ }) => {
215
+ return /*#__PURE__*/React.createElement(View, {
216
+ style: styles.reasonItemStyle
217
+ }, /*#__PURE__*/React.createElement(RadioButton, {
218
+ color: '#5B80F7',
219
+ value: item,
220
+ status: selectedContact === item ? 'checked' : 'unchecked',
221
+ onPress: () => {
222
+ setSelectedContact(item);
223
+ }
224
+ }), /*#__PURE__*/React.createElement(Text, {
225
+ style: [styles.reasonTextStyle, {
226
+ fontWeight: 'bold'
227
+ }],
228
+ onPress: () => {
229
+ setSelectedContact(item);
230
+ }
231
+ }, maskContact(item)));
232
+ };
233
+ const inputValidation = (data, _regex) => {
234
+ if (_regex) {
235
+ const regex = new RegExp(_regex);
236
+ return regex.test(data);
237
+ }
238
+ return false;
239
+ };
240
+ const sendPaymentLink = async contactDetails => {
241
+ var _props$applicableReas6, _paymentConfigContext6;
242
+ props.next({
243
+ paymentMode: props.paymentMode,
244
+ refId: paymentRefId,
245
+ ...(await getBaseETResponse(EntityCode.COLLECT_PAYMENT_ET, true, getEventCodeByET(ExecutionTaskID.COLLECT_PAYMENT_ET, true, (_props$applicableReas6 = props.applicableReasons) === null || _props$applicableReas6 === void 0 ? void 0 : _props$applicableReas6.success), '', props.mergedObjectiveId, ExecutionTaskID.COLLECT_PAYMENT_ET)),
246
+ screen: PAYMENT_SCREEN.PROCESS,
247
+ sourceScreen: PAYMENT_SCREEN.CONTACTS,
248
+ collectedAmount: {
249
+ value: props.expectedAmount,
250
+ currencyCode: (paymentConfigContext === null || paymentConfigContext === void 0 || (_paymentConfigContext6 = paymentConfigContext.sdkConfig) === null || _paymentConfigContext6 === void 0 || (_paymentConfigContext6 = _paymentConfigContext6.etConfig) === null || _paymentConfigContext6 === void 0 ? void 0 : _paymentConfigContext6.currencyCode) || ''
251
+ },
252
+ contactDetails
253
+ });
254
+ };
255
+ const onModalSubmit = () => {
256
+ var _paymentConfigContext7;
257
+ const regex = (manualContactDetails === null || manualContactDetails === void 0 ? void 0 : manualContactDetails.type) === 'PHONE' ? (paymentConfigContext === null || paymentConfigContext === void 0 || (_paymentConfigContext7 = paymentConfigContext.sdkConfig) === null || _paymentConfigContext7 === void 0 || (_paymentConfigContext7 = _paymentConfigContext7.etConfig) === null || _paymentConfigContext7 === void 0 ? void 0 : _paymentConfigContext7.mobilePhoneRegex) || '' : EMAIL_REGEX;
258
+ if (inputValidation(manualContact, regex)) {
259
+ setErrorDisplay(false);
260
+ (async _paymentConfigContext8 => {
261
+ const contact = (manualContactDetails === null || manualContactDetails === void 0 ? void 0 : manualContactDetails.type) === 'PHONE' ? (paymentConfigContext === null || paymentConfigContext === void 0 || (_paymentConfigContext8 = paymentConfigContext.sdkConfig) === null || _paymentConfigContext8 === void 0 || (_paymentConfigContext8 = _paymentConfigContext8.etConfig) === null || _paymentConfigContext8 === void 0 ? void 0 : _paymentConfigContext8.phoneCode) + manualContact : manualContact;
262
+ await sendPaymentLink(contact);
263
+ })();
264
+ } else {
265
+ setErrorDisplay(true);
266
+ }
267
+ };
268
+ const renderManualContactsModal = () => {
269
+ return /*#__PURE__*/React.createElement(ModalWidget, {
270
+ title: {
271
+ label: (manualContactDetails === null || manualContactDetails === void 0 ? void 0 : manualContactDetails.title) || ''
272
+ },
273
+ contentContainerStyle: {
274
+ marginBottom: 120
275
+ },
276
+ showModal: displayContactModal,
277
+ renderChildren: () => {
278
+ var _paymentConfigContext9, _paymentConfigContext10, _paymentConfigContext11;
279
+ return (manualContactDetails === null || manualContactDetails === void 0 ? void 0 : manualContactDetails.type) === 'PHONE' ? /*#__PURE__*/React.createElement(View, {
280
+ style: {
281
+ marginVertical: 10
282
+ }
283
+ }, /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(Text, {
284
+ style: [styles.inputLabel, {
285
+ marginBottom: 8
286
+ }]
287
+ }, "Phone Number")), /*#__PURE__*/React.createElement(View, {
288
+ style: [{
289
+ justifyContent: 'flex-start',
290
+ display: 'flex',
291
+ flexDirection: 'row'
292
+ }]
293
+ }, paymentConfigContext !== null && paymentConfigContext !== void 0 && (_paymentConfigContext9 = paymentConfigContext.sdkConfig) !== null && _paymentConfigContext9 !== void 0 && (_paymentConfigContext9 = _paymentConfigContext9.etConfig) !== null && _paymentConfigContext9 !== void 0 && _paymentConfigContext9.phoneCode ? /*#__PURE__*/React.createElement(TextInput, {
294
+ style: [styles.input, {
295
+ borderTopEndRadius: 0,
296
+ borderBottomEndRadius: 0
297
+ }, displayError ? {
298
+ borderColor: 'red'
299
+ } : {}],
300
+ disabled: true,
301
+ value: '(' + (paymentConfigContext === null || paymentConfigContext === void 0 || (_paymentConfigContext10 = paymentConfigContext.sdkConfig) === null || _paymentConfigContext10 === void 0 || (_paymentConfigContext10 = _paymentConfigContext10.etConfig) === null || _paymentConfigContext10 === void 0 ? void 0 : _paymentConfigContext10.phoneCode) + ')'
302
+ }) : null, /*#__PURE__*/React.createElement(TextInput, {
303
+ style: [styles.input, {
304
+ flexGrow: 1,
305
+ flex: 1
306
+ }, paymentConfigContext !== null && paymentConfigContext !== void 0 && (_paymentConfigContext11 = paymentConfigContext.sdkConfig) !== null && _paymentConfigContext11 !== void 0 && (_paymentConfigContext11 = _paymentConfigContext11.etConfig) !== null && _paymentConfigContext11 !== void 0 && _paymentConfigContext11.phoneCode ? {
307
+ borderLeftWidth: 0,
308
+ borderTopStartRadius: 0,
309
+ borderBottomStartRadius: 0
310
+ } : {}, displayError ? {
311
+ borderColor: 'red'
312
+ } : {}],
313
+ autoFocus: true,
314
+ placeholder: "Add Phone Number",
315
+ onChangeText: setManualContact,
316
+ activeUnderlineColor: "transparent"
317
+ })), displayError ? /*#__PURE__*/React.createElement(Text, {
318
+ style: {
319
+ color: 'red'
320
+ }
321
+ }, "Enter valid phone number.") : null) : /*#__PURE__*/React.createElement(View, {
322
+ style: {
323
+ marginVertical: 10
324
+ }
325
+ }, /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(Text, {
326
+ style: [styles.inputLabel, {
327
+ marginBottom: 8
328
+ }]
329
+ }, "Email Address")), /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(TextInput, {
330
+ style: [styles.input, displayError ? {
331
+ borderColor: 'red'
332
+ } : {}],
333
+ autoFocus: true,
334
+ placeholder: "Add Email Address",
335
+ onChangeText: setManualContact,
336
+ activeUnderlineColor: 'transparent'
337
+ })), displayError ? /*#__PURE__*/React.createElement(Text, {
338
+ style: {
339
+ color: 'red'
340
+ }
341
+ }, "Enter valid email address.") : null);
342
+ },
343
+ primaryButton: {
344
+ label: 'Send Payment Link',
345
+ onPress: () => {
346
+ onModalSubmit();
347
+ },
348
+ labelStyles: {
349
+ ...CommonStyles.nextButtonLabel
350
+ },
351
+ styles: {
352
+ ...CommonStyles.nextButton,
353
+ padding: 8,
354
+ borderRadius: 5,
355
+ marginVertical: 10,
356
+ marginTop: 15
357
+ }
358
+ },
359
+ secondaryButton: {
360
+ label: 'Cancel',
361
+ onPress: () => {
362
+ setErrorDisplay(false);
363
+ setDisplayContactModal(false);
364
+ },
365
+ labelStyles: {
366
+ ...CommonStyles.cancelButtonLabel
367
+ },
368
+ styles: {
369
+ ...CommonStyles.cancelButton,
370
+ padding: 8,
371
+ borderRadius: 5
372
+ }
373
+ }
374
+ });
375
+ };
376
+ return /*#__PURE__*/React.createElement(Provider, null, renderManualContactsModal(), /*#__PURE__*/React.createElement(View, {
377
+ style: CommonStyles.mainContainer
378
+ }, /*#__PURE__*/React.createElement(Text, {
379
+ style: [styles.title, {
380
+ paddingBottom: 0
381
+ }]
382
+ }, "Select or add contact details to send the payment link"), contactList.length ? /*#__PURE__*/React.createElement(View, {
383
+ style: {
384
+ marginBottom: 16,
385
+ maxHeight: 500
386
+ }
387
+ }, /*#__PURE__*/React.createElement(FlatList, {
388
+ data: contactList,
389
+ renderItem: renderItem,
390
+ keyExtractor: item => item
391
+ })) : null, (_props$onsiteLinkShar = props.onsiteLinkSharing) !== null && _props$onsiteLinkShar !== void 0 && _props$onsiteLinkShar.length ? /*#__PURE__*/React.createElement(View, {
392
+ style: [{
393
+ backgroundColor: 'white',
394
+ padding: 16,
395
+ flexDirection: 'row',
396
+ justifyContent: 'space-evenly'
397
+ }, props.onsiteLinkSharing.includes('Email') && props.onsiteLinkSharing.includes('Phone Number') ? {} : {
398
+ justifyContent: 'flex-start',
399
+ paddingStart: 55
400
+ }]
401
+ }, props.onsiteLinkSharing.includes('Email') ? /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(Text, {
402
+ style: [styles.link],
403
+ onPress: () => {
404
+ setDisplayContactModal(true);
405
+ setManualContactDetails({
406
+ title: 'Add Email Address',
407
+ type: 'EMAIL'
408
+ });
409
+ }
410
+ }, "Add Email Address")) : null, props.onsiteLinkSharing.includes('Email') && props.onsiteLinkSharing.includes('Phone Number') ? /*#__PURE__*/React.createElement(View, {
411
+ style: {
412
+ borderLeftWidth: 1,
413
+ borderColor: '#cccccc'
414
+ }
415
+ }) : null, props.onsiteLinkSharing.includes('Phone Number') ? /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(Text, {
416
+ style: [styles.link],
417
+ onPress: () => {
418
+ setDisplayContactModal(true);
419
+ setManualContactDetails({
420
+ title: 'Add Phone Number',
421
+ type: 'PHONE'
422
+ });
423
+ }
424
+ }, "Add Phone Number")) : null) : null, /*#__PURE__*/React.createElement(View, {
425
+ style: styles.btnContainer
426
+ }, /*#__PURE__*/React.createElement(View, {
427
+ style: styles.buttonParentContainer
428
+ }, /*#__PURE__*/React.createElement(Button, {
429
+ style: [CommonStyles.cancelButton, {
430
+ marginEnd: 5,
431
+ flex: 1
432
+ }],
433
+ labelStyle: {
434
+ ...CommonStyles.cancelButtonLabel,
435
+ color: '#5B80F7',
436
+ textTransform: 'capitalize'
437
+ },
438
+ mode: 'outlined',
439
+ onPress: async () => {
440
+ await getPaymentStatus(false);
441
+ }
442
+ }, "Cancel"), /*#__PURE__*/React.createElement(Button, {
443
+ style: [CommonStyles.nextButton, {
444
+ flex: 1,
445
+ marginStart: 5
446
+ }, !selectedContact ? {
447
+ backgroundColor: '#E0E3EB'
448
+ } : {}],
449
+ labelStyle: [CommonStyles.nextButtonLabel, {
450
+ textTransform: 'capitalize'
451
+ }, !selectedContact ? {
452
+ color: '#A3AAC2'
453
+ } : {}],
454
+ disabled: !selectedContact,
455
+ mode: 'contained',
456
+ onPress: async () => {
457
+ await getPaymentStatus(true);
458
+ }
459
+ }, "Send Payment Link")))));
460
+ };
461
+ export default PaymentContactDetails;
462
+ const styles = StyleSheet.create({
463
+ title: {
464
+ fontFamily: Platform.OS === 'android' ? Fonts.IBMPlexSans_400Regular : 'IBMPlexSans-Regular',
465
+ fontWeight: '400',
466
+ fontSize: 16,
467
+ lineHeight: 24,
468
+ color: '#3D445C',
469
+ margin: 20
470
+ },
471
+ reasonItemStyle: {
472
+ flexDirection: 'row',
473
+ paddingVertical: 5,
474
+ paddingStart: 20,
475
+ paddingEnd: 20,
476
+ backgroundColor: 'white',
477
+ marginBottom: 5
478
+ },
479
+ reasonTextStyle: {
480
+ flex: 1,
481
+ flexWrap: 'wrap',
482
+ fontFamily: Platform.OS === 'android' ? Fonts.IBMPlexSans_400Regular : 'IBMPlexSans-Regular',
483
+ fontStyle: 'normal',
484
+ fontSize: 14,
485
+ lineHeight: 21,
486
+ letterSpacing: 0.25,
487
+ textAlign: 'justify',
488
+ color: '#111111',
489
+ paddingTop: 5
490
+ },
491
+ link: {
492
+ color: '#5B80F7',
493
+ fontSize: 14,
494
+ fontWeight: '500',
495
+ lineHeight: 20
496
+ },
497
+ inputLabel: {
498
+ fontSize: 14,
499
+ lineHeight: 20,
500
+ fontWeight: '500',
501
+ fontFamily: Platform.OS === 'android' ? Fonts.IBMPlexSans_500Medium : 'IBMPlexSans-Medium',
502
+ color: '#3D445C'
503
+ },
504
+ input: {
505
+ // flex: 1,
506
+ fontSize: 14,
507
+ lineHeight: 24,
508
+ fontFamily: Platform.OS === 'android' ? Fonts.IBMPlexSans_400Regular : 'IBMPlexSans-Regular',
509
+ borderColor: '#E0E3EB',
510
+ borderWidth: 1,
511
+ height: 22,
512
+ borderRadius: 6,
513
+ paddingHorizontal: 13,
514
+ paddingVertical: 9,
515
+ backgroundColor: '#ffffff'
516
+ },
517
+ buttonParentContainer: {
518
+ flexDirection: 'row',
519
+ padding: 10,
520
+ paddingTop: 16,
521
+ backgroundColor: 'white',
522
+ borderTopWidth: 1,
523
+ borderTopColor: '#eeeeee'
524
+ },
525
+ btnContainer: {
526
+ justifyContent: 'flex-end',
527
+ marginBottom: 10,
528
+ flexGrow: 1
529
+ }
530
+ });
531
+ //# sourceMappingURL=PaymentContactDetails.js.map