@os1-platform/dispatch-mobile 1.0.8 → 1.3.11
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.
- package/README.md +116 -48
- package/android/.gradle/6.8/fileChanges/last-build.bin +0 -0
- package/android/.gradle/6.8/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/6.8/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
- package/android/.gradle/checksums/checksums.lock +0 -0
- package/android/.gradle/configuration-cache/gc.properties +0 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/.idea/gradle.xml +13 -0
- package/android/.idea/misc.xml +4 -0
- package/android/.idea/vcs.xml +6 -0
- package/android/.idea/workspace.xml +131 -0
- package/android/gradle.properties +1 -1
- package/android/local.properties +8 -0
- package/android/src/main/AndroidManifest.xml +0 -1
- package/lib/commonjs/components/dispatch/DispatchExecNavigator.js +46 -39
- package/lib/commonjs/components/dispatch/DispatchExecNavigator.js.map +1 -1
- package/lib/commonjs/components/executiontasks/ExecutionTasksIndex.js +14 -24
- package/lib/commonjs/components/executiontasks/ExecutionTasksIndex.js.map +1 -1
- package/lib/commonjs/components/executiontasks/cancellation/CancelET.js +142 -23
- package/lib/commonjs/components/executiontasks/cancellation/CancelET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/cancellation/CancellationSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js +64 -16
- package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js.map +1 -1
- package/lib/commonjs/components/executiontasks/deliver/DeliverET.js +6 -16
- package/lib/commonjs/components/executiontasks/deliver/DeliverET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js +68 -26
- package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/display/DisplayModalET.js +4 -13
- package/lib/commonjs/components/executiontasks/display/DisplayModalET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/doodle/DoodleUtils.js +0 -2
- package/lib/commonjs/components/executiontasks/doodle/DoodleUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/doodle/SignatureET.js +61 -28
- package/lib/commonjs/components/executiontasks/doodle/SignatureET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/dropCash/DropCashET.js +5 -19
- package/lib/commonjs/components/executiontasks/dropCash/DropCashET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js +62 -18
- package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/FormGenerator.js +112 -28
- package/lib/commonjs/components/executiontasks/forms/FormGenerator.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/DateTimeWidget.js +3 -26
- package/lib/commonjs/components/executiontasks/forms/widgets/DateTimeWidget.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/DropdownWidget.js +49 -0
- package/lib/commonjs/components/executiontasks/forms/widgets/DropdownWidget.js.map +1 -0
- package/lib/commonjs/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js +1 -16
- package/lib/commonjs/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/TimeRangeSelector.js +0 -10
- package/lib/commonjs/components/executiontasks/forms/widgets/TimeRangeSelector.js.map +1 -1
- package/lib/commonjs/components/executiontasks/httpRequest/HttpEtUtils.js +4 -13
- package/lib/commonjs/components/executiontasks/httpRequest/HttpEtUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/httpRequest/HttpRequestET.js +0 -12
- package/lib/commonjs/components/executiontasks/httpRequest/HttpRequestET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/imageCapture/CaptureSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js +7 -35
- package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js +74 -49
- package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/PaymentStyles.js +0 -4
- package/lib/commonjs/components/executiontasks/payments/PaymentStyles.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/PaymentUtils.js +0 -2
- package/lib/commonjs/components/executiontasks/payments/PaymentUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js +64 -17
- package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js +63 -24
- package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js +71 -22
- package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/pickup/PickupET.js +5 -15
- package/lib/commonjs/components/executiontasks/pickup/PickupET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js +60 -19
- package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/ScanET.js +843 -0
- package/lib/commonjs/components/executiontasks/scan/ScanET.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/ScanSchema.js +6 -0
- package/lib/commonjs/components/executiontasks/scan/ScanSchema.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/constants.js +19 -0
- package/lib/commonjs/components/executiontasks/scan/constants.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/interfaces.js +29 -0
- package/lib/commonjs/components/executiontasks/scan/interfaces.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/CScanner.js +103 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/CScanner.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/DropDownUtils.js +74 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/DropDownUtils.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/ERDropDown.js +115 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/ERDropDown.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/ScanList.js +134 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/ScanList.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/utils.js +373 -0
- package/lib/commonjs/components/executiontasks/scan/utils.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scanner/CScanner.js +3 -21
- package/lib/commonjs/components/executiontasks/scanner/CScanner.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scanner/ScannerSchema.js +4 -9
- package/lib/commonjs/components/executiontasks/scanner/ScannerSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scanner/ScannerUtils.js +7 -36
- package/lib/commonjs/components/executiontasks/scanner/ScannerUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/DropDownSelector.js +0 -5
- package/lib/commonjs/components/executiontasks/scanner/returns/DropDownSelector.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/DropDownUtils.js +0 -9
- package/lib/commonjs/components/executiontasks/scanner/returns/DropDownUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/RTReasonSelection.js +0 -14
- package/lib/commonjs/components/executiontasks/scanner/returns/RTReasonSelection.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/RTScan.js +1 -40
- package/lib/commonjs/components/executiontasks/scanner/returns/RTScan.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/ReasonDropDown.js +0 -17
- package/lib/commonjs/components/executiontasks/scanner/returns/ReasonDropDown.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/ScanList.js +0 -28
- package/lib/commonjs/components/executiontasks/scanner/returns/ScanList.js.map +1 -1
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPET.js +334 -0
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPET.js.map +1 -0
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPSchema.js +14 -0
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPSchema.js.map +1 -0
- package/lib/commonjs/components/executiontasks/validateOTP/constants.js +37 -0
- package/lib/commonjs/components/executiontasks/validateOTP/constants.js.map +1 -0
- package/lib/commonjs/components/executiontasks/validateOTP/sub-components/OTPInput.js +59 -0
- package/lib/commonjs/components/executiontasks/validateOTP/sub-components/OTPInput.js.map +1 -0
- package/lib/commonjs/components/executiontasks/validateOTP/utils.js +147 -0
- package/lib/commonjs/components/executiontasks/validateOTP/utils.js.map +1 -0
- package/lib/commonjs/components/executiontasks/verifyLocation/GeofenceUtils.js +0 -13
- package/lib/commonjs/components/executiontasks/verifyLocation/GeofenceUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/verifyLocation/VerifyLocationET.js +4 -17
- package/lib/commonjs/components/executiontasks/verifyLocation/VerifyLocationET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpET.js +3 -18
- package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpET.js.map +1 -1
- package/lib/commonjs/components/widgets/AlertDisplay.js +0 -5
- package/lib/commonjs/components/widgets/AlertDisplay.js.map +1 -1
- package/lib/commonjs/components/widgets/CancelOrderDialog.js +0 -12
- package/lib/commonjs/components/widgets/CancelOrderDialog.js.map +1 -1
- package/lib/commonjs/components/widgets/IconButton.js +34 -0
- package/lib/commonjs/components/widgets/IconButton.js.map +1 -0
- package/lib/commonjs/components/widgets/ProgressDialog.js +0 -7
- package/lib/commonjs/components/widgets/ProgressDialog.js.map +1 -1
- package/lib/commonjs/components/widgets/SnackBarCustom.js +38 -38
- package/lib/commonjs/components/widgets/SnackBarCustom.js.map +1 -1
- package/lib/commonjs/components/widgets/SplitTextInput.js +93 -0
- package/lib/commonjs/components/widgets/SplitTextInput.js.map +1 -0
- package/lib/commonjs/components/widgets/Toaster.js +0 -2
- package/lib/commonjs/components/widgets/Toaster.js.map +1 -1
- package/lib/commonjs/config/DispatchSDKConfig.js +4 -5
- package/lib/commonjs/config/DispatchSDKConfig.js.map +1 -1
- package/lib/commonjs/constants/apiConstants.js +15 -0
- package/lib/commonjs/constants/apiConstants.js.map +1 -0
- package/lib/commonjs/constants/constants.js +7 -3
- package/lib/commonjs/constants/constants.js.map +1 -1
- package/lib/commonjs/constants/statuscode.js +3 -5
- package/lib/commonjs/constants/statuscode.js.map +1 -1
- package/lib/commonjs/errors/BaseError.js +3 -8
- package/lib/commonjs/errors/BaseError.js.map +1 -1
- package/lib/commonjs/errors/ErrorCodes.js +7 -6
- package/lib/commonjs/errors/ErrorCodes.js.map +1 -1
- package/lib/commonjs/events/EventDispatcher.js +27 -0
- package/lib/commonjs/events/EventDispatcher.js.map +1 -0
- package/lib/commonjs/events/EventListener.js +20 -0
- package/lib/commonjs/events/EventListener.js.map +1 -0
- package/lib/commonjs/events/constants.js +13 -0
- package/lib/commonjs/events/constants.js.map +1 -0
- package/lib/commonjs/events/index.js +11 -0
- package/lib/commonjs/events/index.js.map +1 -0
- package/lib/commonjs/events/interface.js +2 -0
- package/lib/commonjs/events/interface.js.map +1 -0
- package/lib/commonjs/index.js +9 -23
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/manager/dispatch/DispatchStateContainer.js +527 -177
- package/lib/commonjs/manager/dispatch/DispatchStateContainer.js.map +1 -1
- package/lib/commonjs/manager/dispatchCodes/EventCodeContainer.js +55 -4
- package/lib/commonjs/manager/dispatchCodes/EventCodeContainer.js.map +1 -1
- package/lib/commonjs/manager/dispatchCodes/EventCodeRepo.js +70 -0
- package/lib/commonjs/manager/dispatchCodes/EventCodeRepo.js.map +1 -0
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeContainer.js +3 -29
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeContainer.js.map +1 -1
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeRepo.js +6 -20
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeRepo.js.map +1 -1
- package/lib/commonjs/manager/jobRemoval/JobRemovalManager.js +27 -0
- package/lib/commonjs/manager/jobRemoval/JobRemovalManager.js.map +1 -0
- package/lib/commonjs/manager/location/LocationManager.js +3 -20
- package/lib/commonjs/manager/location/LocationManager.js.map +1 -1
- package/lib/commonjs/manager/sdk/DispatchSDKManager.js +8 -36
- package/lib/commonjs/manager/sdk/DispatchSDKManager.js.map +1 -1
- package/lib/commonjs/manager/sdk/DispatchSdkCache.js +6 -17
- package/lib/commonjs/manager/sdk/DispatchSdkCache.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/AppSyncManager.js +12 -46
- package/lib/commonjs/manager/syncmanager/AppSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/DBConfig.js +13 -7
- package/lib/commonjs/manager/syncmanager/DBConfig.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/NativeSyncManager.js +0 -2
- package/lib/commonjs/manager/syncmanager/NativeSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/database.js +28 -12
- package/lib/commonjs/manager/syncmanager/database.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js +0 -19
- package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentManager.js +3 -20
- package/lib/commonjs/manager/syncmanager/document/DocumentManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js +3 -52
- package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/events/ETEventsManager.js +59 -25
- package/lib/commonjs/manager/syncmanager/events/ETEventsManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/events/EventsSyncManager.js +77 -90
- package/lib/commonjs/manager/syncmanager/events/EventsSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/events/SyncHttpClient.js +27 -19
- package/lib/commonjs/manager/syncmanager/events/SyncHttpClient.js.map +1 -1
- package/lib/commonjs/models/DispatchModels.js +4 -5
- package/lib/commonjs/models/DispatchModels.js.map +1 -1
- package/lib/commonjs/models/ReasonCodes.js.map +1 -1
- package/lib/commonjs/models/execTasks/ETBaseModels.js.map +1 -1
- package/lib/commonjs/models/execTasks/ETConfig.js +28 -35
- package/lib/commonjs/models/execTasks/ETConfig.js.map +1 -1
- package/lib/commonjs/models/sdk.js +4 -5
- package/lib/commonjs/models/sdk.js.map +1 -1
- package/lib/commonjs/native/signature/SignatureCapture.js +3 -24
- package/lib/commonjs/native/signature/SignatureCapture.js.map +1 -1
- package/lib/commonjs/network/GraphQLClient.js +7 -35
- package/lib/commonjs/network/GraphQLClient.js.map +1 -1
- package/lib/commonjs/network/NetworkClient.js +2 -13
- package/lib/commonjs/network/NetworkClient.js.map +1 -1
- package/lib/commonjs/network/NetworkUtils.js +10 -8
- package/lib/commonjs/network/NetworkUtils.js.map +1 -1
- package/lib/commonjs/network/Queries.js +0 -2
- package/lib/commonjs/network/Queries.js.map +1 -1
- package/lib/commonjs/network/client.js +6 -21
- package/lib/commonjs/network/client.js.map +1 -1
- package/lib/commonjs/res/strings.js.map +1 -1
- package/lib/commonjs/resources/Login.js +4 -15
- package/lib/commonjs/resources/Login.js.map +1 -1
- package/lib/commonjs/resources/network.js +3 -8
- package/lib/commonjs/resources/network.js.map +1 -1
- package/lib/commonjs/styles/SdkColors.js +7 -7
- package/lib/commonjs/styles/SdkColors.js.map +1 -1
- package/lib/commonjs/styles/executionTasks/CommonStyles.js +42 -18
- package/lib/commonjs/styles/executionTasks/CommonStyles.js.map +1 -1
- package/lib/commonjs/ui/screens/CancellationScreen.js +36 -27
- package/lib/commonjs/ui/screens/CancellationScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/CaptureInputScreen.js +6 -15
- package/lib/commonjs/ui/screens/CaptureInputScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/CompleteObjectiveScreen.js +0 -19
- package/lib/commonjs/ui/screens/CompleteObjectiveScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DeliverScreen.js +6 -15
- package/lib/commonjs/ui/screens/DeliverScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DisplayScreen.js +7 -12
- package/lib/commonjs/ui/screens/DisplayScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DoodleScreen.js +6 -16
- package/lib/commonjs/ui/screens/DoodleScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DropCashScreen.js +6 -18
- package/lib/commonjs/ui/screens/DropCashScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ETScreensIndex.js +14 -16
- package/lib/commonjs/ui/screens/ETScreensIndex.js.map +1 -1
- package/lib/commonjs/ui/screens/FormsScreen.js +36 -15
- package/lib/commonjs/ui/screens/FormsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/GeofenceScreen.js +7 -13
- package/lib/commonjs/ui/screens/GeofenceScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HttpRequestScreen.js +5 -10
- package/lib/commonjs/ui/screens/HttpRequestScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ImageCaptureScreen.js +27 -14
- package/lib/commonjs/ui/screens/ImageCaptureScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PaymentScreen.js +11 -23
- package/lib/commonjs/ui/screens/PaymentScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PickupScreen.js +9 -13
- package/lib/commonjs/ui/screens/PickupScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/RTScanScreen.js +8 -27
- package/lib/commonjs/ui/screens/RTScanScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ScanScreen.js +268 -0
- package/lib/commonjs/ui/screens/ScanScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/StartWorkFlowScreen.js +21 -30
- package/lib/commonjs/ui/screens/StartWorkFlowScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ValidateOTPScreen.js +49 -0
- package/lib/commonjs/ui/screens/ValidateOTPScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/WithBaseDispatchScreen.js +0 -10
- package/lib/commonjs/ui/screens/WithBaseDispatchScreen.js.map +1 -1
- package/lib/commonjs/ui/uiConfig/RouteParams.js +9 -1
- package/lib/commonjs/ui/uiConfig/RouteParams.js.map +1 -1
- package/lib/commonjs/utils/ApiUtils.js +115 -0
- package/lib/commonjs/utils/ApiUtils.js.map +1 -0
- package/lib/commonjs/utils/ExecTaskUtils.js +93 -31
- package/lib/commonjs/utils/ExecTaskUtils.js.map +1 -1
- package/lib/commonjs/utils/Logger.js +10 -29
- package/lib/commonjs/utils/Logger.js.map +1 -1
- package/lib/commonjs/utils/NetworkUtil.js +3 -19
- package/lib/commonjs/utils/NetworkUtil.js.map +1 -1
- package/lib/commonjs/utils/SdkUtils.js +2 -31
- package/lib/commonjs/utils/SdkUtils.js.map +1 -1
- package/lib/commonjs/utils/SyncManagerUtils.js +25 -40
- package/lib/commonjs/utils/SyncManagerUtils.js.map +1 -1
- package/lib/commonjs/utils/fcm/FCM.js +35 -16
- package/lib/commonjs/utils/fcm/FCM.js.map +1 -1
- package/lib/commonjs/utils/fcm/FcmUtils.js +50 -25
- package/lib/commonjs/utils/fcm/FcmUtils.js.map +1 -1
- package/lib/commonjs/utils/helper.js +0 -5
- package/lib/commonjs/utils/helper.js.map +1 -1
- package/lib/commonjs/utils/hooks/useTimer.js +44 -0
- package/lib/commonjs/utils/hooks/useTimer.js.map +1 -0
- package/lib/commonjs/utils/loginHelper.js +6 -18
- package/lib/commonjs/utils/loginHelper.js.map +1 -1
- package/lib/commonjs/utils/storage.js +53 -32
- package/lib/commonjs/utils/storage.js.map +1 -1
- package/lib/commonjs/utils/utils.js +8 -11
- package/lib/commonjs/utils/utils.js.map +1 -1
- package/lib/module/components/dispatch/DispatchExecNavigator.js +46 -28
- package/lib/module/components/dispatch/DispatchExecNavigator.js.map +1 -1
- package/lib/module/components/executiontasks/ExecutionTasksIndex.js +3 -1
- package/lib/module/components/executiontasks/ExecutionTasksIndex.js.map +1 -1
- package/lib/module/components/executiontasks/cancellation/CancelET.js +145 -19
- package/lib/module/components/executiontasks/cancellation/CancelET.js.map +1 -1
- package/lib/module/components/executiontasks/cancellation/CancellationSchema.js.map +1 -1
- package/lib/module/components/executiontasks/captureInput/CaptureText.js +66 -9
- package/lib/module/components/executiontasks/captureInput/CaptureText.js.map +1 -1
- package/lib/module/components/executiontasks/deliver/DeliverET.js +6 -7
- package/lib/module/components/executiontasks/deliver/DeliverET.js.map +1 -1
- package/lib/module/components/executiontasks/deliver/SLDeliverET.js +69 -16
- package/lib/module/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
- package/lib/module/components/executiontasks/display/DisplayModalET.js +4 -3
- package/lib/module/components/executiontasks/display/DisplayModalET.js.map +1 -1
- package/lib/module/components/executiontasks/doodle/DoodleUtils.js.map +1 -1
- package/lib/module/components/executiontasks/doodle/SignatureET.js +64 -14
- package/lib/module/components/executiontasks/doodle/SignatureET.js.map +1 -1
- package/lib/module/components/executiontasks/dropCash/DropCashET.js +5 -6
- package/lib/module/components/executiontasks/dropCash/DropCashET.js.map +1 -1
- package/lib/module/components/executiontasks/dropCash/SLDropCash.js +62 -8
- package/lib/module/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
- package/lib/module/components/executiontasks/forms/FormGenerator.js +114 -14
- package/lib/module/components/executiontasks/forms/FormGenerator.js.map +1 -1
- package/lib/module/components/executiontasks/forms/widgets/DateTimeWidget.js +3 -15
- package/lib/module/components/executiontasks/forms/widgets/DateTimeWidget.js.map +1 -1
- package/lib/module/components/executiontasks/forms/widgets/DropdownWidget.js +39 -0
- package/lib/module/components/executiontasks/forms/widgets/DropdownWidget.js.map +1 -0
- package/lib/module/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js +1 -5
- package/lib/module/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js.map +1 -1
- package/lib/module/components/executiontasks/forms/widgets/TimeRangeSelector.js +0 -3
- package/lib/module/components/executiontasks/forms/widgets/TimeRangeSelector.js.map +1 -1
- package/lib/module/components/executiontasks/httpRequest/HttpEtUtils.js +4 -2
- package/lib/module/components/executiontasks/httpRequest/HttpEtUtils.js.map +1 -1
- package/lib/module/components/executiontasks/httpRequest/HttpRequestET.js +0 -3
- package/lib/module/components/executiontasks/httpRequest/HttpRequestET.js.map +1 -1
- package/lib/module/components/executiontasks/imageCapture/CaptureSchema.js.map +1 -1
- package/lib/module/components/executiontasks/imageCapture/CaptureUtils.js +7 -10
- package/lib/module/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
- package/lib/module/components/executiontasks/imageCapture/ImageCapture.js +75 -35
- package/lib/module/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
- package/lib/module/components/executiontasks/payments/PaymentStyles.js.map +1 -1
- package/lib/module/components/executiontasks/payments/PaymentUtils.js.map +1 -1
- package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentET.js +64 -6
- package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
- package/lib/module/components/executiontasks/payments/init/InitPaymentET.js +63 -11
- package/lib/module/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
- package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentET.js +71 -10
- package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
- package/lib/module/components/executiontasks/pickup/PickupET.js +5 -6
- package/lib/module/components/executiontasks/pickup/PickupET.js.map +1 -1
- package/lib/module/components/executiontasks/pickup/SLPickupET.js +61 -10
- package/lib/module/components/executiontasks/pickup/SLPickupET.js.map +1 -1
- package/lib/module/components/executiontasks/scan/ScanET.js +833 -0
- package/lib/module/components/executiontasks/scan/ScanET.js.map +1 -0
- package/lib/module/components/executiontasks/scan/ScanSchema.js +2 -0
- package/lib/module/components/executiontasks/scan/ScanSchema.js.map +1 -0
- package/lib/module/components/executiontasks/scan/constants.js +7 -0
- package/lib/module/components/executiontasks/scan/constants.js.map +1 -0
- package/lib/module/components/executiontasks/scan/interfaces.js +21 -0
- package/lib/module/components/executiontasks/scan/interfaces.js.map +1 -0
- package/lib/module/components/executiontasks/scan/sub_components/CScanner.js +94 -0
- package/lib/module/components/executiontasks/scan/sub_components/CScanner.js.map +1 -0
- package/lib/module/components/executiontasks/scan/sub_components/DropDownUtils.js +66 -0
- package/lib/module/components/executiontasks/scan/sub_components/DropDownUtils.js.map +1 -0
- package/lib/module/components/executiontasks/scan/sub_components/ERDropDown.js +105 -0
- package/lib/module/components/executiontasks/scan/sub_components/ERDropDown.js.map +1 -0
- package/lib/module/components/executiontasks/scan/sub_components/ScanList.js +124 -0
- package/lib/module/components/executiontasks/scan/sub_components/ScanList.js.map +1 -0
- package/lib/module/components/executiontasks/scan/utils.js +358 -0
- package/lib/module/components/executiontasks/scan/utils.js.map +1 -0
- package/lib/module/components/executiontasks/scanner/CScanner.js +3 -8
- package/lib/module/components/executiontasks/scanner/CScanner.js.map +1 -1
- package/lib/module/components/executiontasks/scanner/ScannerSchema.js +3 -3
- package/lib/module/components/executiontasks/scanner/ScannerSchema.js.map +1 -1
- package/lib/module/components/executiontasks/scanner/ScannerUtils.js +6 -18
- package/lib/module/components/executiontasks/scanner/ScannerUtils.js.map +1 -1
- package/lib/module/components/executiontasks/scanner/returns/DropDownSelector.js +0 -2
- package/lib/module/components/executiontasks/scanner/returns/DropDownSelector.js.map +1 -1
- package/lib/module/components/executiontasks/scanner/returns/DropDownUtils.js +0 -5
- package/lib/module/components/executiontasks/scanner/returns/DropDownUtils.js.map +1 -1
- package/lib/module/components/executiontasks/scanner/returns/RTReasonSelection.js +0 -3
- package/lib/module/components/executiontasks/scanner/returns/RTReasonSelection.js.map +1 -1
- package/lib/module/components/executiontasks/scanner/returns/RTScan.js +1 -19
- package/lib/module/components/executiontasks/scanner/returns/RTScan.js.map +1 -1
- package/lib/module/components/executiontasks/scanner/returns/ReasonDropDown.js +0 -7
- package/lib/module/components/executiontasks/scanner/returns/ReasonDropDown.js.map +1 -1
- package/lib/module/components/executiontasks/scanner/returns/ScanList.js +0 -15
- package/lib/module/components/executiontasks/scanner/returns/ScanList.js.map +1 -1
- package/lib/module/components/executiontasks/validateOTP/ValidateOTPET.js +325 -0
- package/lib/module/components/executiontasks/validateOTP/ValidateOTPET.js.map +1 -0
- package/lib/module/components/executiontasks/validateOTP/ValidateOTPSchema.js +8 -0
- package/lib/module/components/executiontasks/validateOTP/ValidateOTPSchema.js.map +1 -0
- package/lib/module/components/executiontasks/validateOTP/constants.js +25 -0
- package/lib/module/components/executiontasks/validateOTP/constants.js.map +1 -0
- package/lib/module/components/executiontasks/validateOTP/sub-components/OTPInput.js +49 -0
- package/lib/module/components/executiontasks/validateOTP/sub-components/OTPInput.js.map +1 -0
- package/lib/module/components/executiontasks/validateOTP/utils.js +133 -0
- package/lib/module/components/executiontasks/validateOTP/utils.js.map +1 -0
- package/lib/module/components/executiontasks/verifyLocation/GeofenceUtils.js +0 -6
- package/lib/module/components/executiontasks/verifyLocation/GeofenceUtils.js.map +1 -1
- package/lib/module/components/executiontasks/verifyLocation/VerifyLocationET.js +4 -3
- package/lib/module/components/executiontasks/verifyLocation/VerifyLocationET.js.map +1 -1
- package/lib/module/components/executiontasks/verifyOtp/VerifyOtpET.js +4 -8
- package/lib/module/components/executiontasks/verifyOtp/VerifyOtpET.js.map +1 -1
- package/lib/module/components/widgets/AlertDisplay.js.map +1 -1
- package/lib/module/components/widgets/CancelOrderDialog.js +0 -2
- package/lib/module/components/widgets/CancelOrderDialog.js.map +1 -1
- package/lib/module/components/widgets/IconButton.js +26 -0
- package/lib/module/components/widgets/IconButton.js.map +1 -0
- package/lib/module/components/widgets/ProgressDialog.js +0 -2
- package/lib/module/components/widgets/ProgressDialog.js.map +1 -1
- package/lib/module/components/widgets/SnackBarCustom.js +36 -18
- package/lib/module/components/widgets/SnackBarCustom.js.map +1 -1
- package/lib/module/components/widgets/SplitTextInput.js +84 -0
- package/lib/module/components/widgets/SplitTextInput.js.map +1 -0
- package/lib/module/components/widgets/Toaster.js.map +1 -1
- package/lib/module/config/DispatchSDKConfig.js +3 -4
- package/lib/module/config/DispatchSDKConfig.js.map +1 -1
- package/lib/module/constants/apiConstants.js +7 -0
- package/lib/module/constants/apiConstants.js.map +1 -0
- package/lib/module/constants/constants.js +4 -2
- package/lib/module/constants/constants.js.map +1 -1
- package/lib/module/constants/statuscode.js +3 -5
- package/lib/module/constants/statuscode.js.map +1 -1
- package/lib/module/errors/BaseError.js +3 -6
- package/lib/module/errors/BaseError.js.map +1 -1
- package/lib/module/errors/ErrorCodes.js +5 -5
- package/lib/module/errors/ErrorCodes.js.map +1 -1
- package/lib/module/events/EventDispatcher.js +19 -0
- package/lib/module/events/EventDispatcher.js.map +1 -0
- package/lib/module/events/EventListener.js +13 -0
- package/lib/module/events/EventListener.js.map +1 -0
- package/lib/module/events/constants.js +6 -0
- package/lib/module/events/constants.js.map +1 -0
- package/lib/module/events/index.js +3 -0
- package/lib/module/events/index.js.map +1 -0
- package/lib/module/events/interface.js +2 -0
- package/lib/module/events/interface.js.map +1 -0
- package/lib/module/index.js +4 -3
- package/lib/module/index.js.map +1 -1
- package/lib/module/manager/dispatch/DispatchStateContainer.js +529 -151
- package/lib/module/manager/dispatch/DispatchStateContainer.js.map +1 -1
- package/lib/module/manager/dispatchCodes/EventCodeContainer.js +52 -2
- package/lib/module/manager/dispatchCodes/EventCodeContainer.js.map +1 -1
- package/lib/module/manager/dispatchCodes/EventCodeRepo.js +61 -0
- package/lib/module/manager/dispatchCodes/EventCodeRepo.js.map +1 -0
- package/lib/module/manager/dispatchCodes/ReasonCodeContainer.js +3 -16
- package/lib/module/manager/dispatchCodes/ReasonCodeContainer.js.map +1 -1
- package/lib/module/manager/dispatchCodes/ReasonCodeRepo.js +6 -14
- package/lib/module/manager/dispatchCodes/ReasonCodeRepo.js.map +1 -1
- package/lib/module/manager/jobRemoval/JobRemovalManager.js +20 -0
- package/lib/module/manager/jobRemoval/JobRemovalManager.js.map +1 -0
- package/lib/module/manager/location/LocationManager.js +3 -14
- package/lib/module/manager/location/LocationManager.js.map +1 -1
- package/lib/module/manager/sdk/DispatchSDKManager.js +8 -14
- package/lib/module/manager/sdk/DispatchSDKManager.js.map +1 -1
- package/lib/module/manager/sdk/DispatchSdkCache.js +6 -13
- package/lib/module/manager/sdk/DispatchSdkCache.js.map +1 -1
- package/lib/module/manager/syncmanager/AppSyncManager.js +12 -26
- package/lib/module/manager/syncmanager/AppSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/DBConfig.js +9 -5
- package/lib/module/manager/syncmanager/DBConfig.js.map +1 -1
- package/lib/module/manager/syncmanager/NativeSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/database.js +27 -3
- package/lib/module/manager/syncmanager/database.js.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentHttpClient.js +0 -7
- package/lib/module/manager/syncmanager/document/DocumentHttpClient.js.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentManager.js +3 -14
- package/lib/module/manager/syncmanager/document/DocumentManager.js.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentSyncManager.js +3 -35
- package/lib/module/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/events/ETEventsManager.js +59 -18
- package/lib/module/manager/syncmanager/events/ETEventsManager.js.map +1 -1
- package/lib/module/manager/syncmanager/events/EventsSyncManager.js +77 -68
- package/lib/module/manager/syncmanager/events/EventsSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/events/SyncHttpClient.js +26 -11
- package/lib/module/manager/syncmanager/events/SyncHttpClient.js.map +1 -1
- package/lib/module/models/DispatchModels.js +3 -4
- package/lib/module/models/DispatchModels.js.map +1 -1
- package/lib/module/models/ReasonCodes.js.map +1 -1
- package/lib/module/models/execTasks/ETBaseModels.js.map +1 -1
- package/lib/module/models/execTasks/ETConfig.js +22 -29
- package/lib/module/models/execTasks/ETConfig.js.map +1 -1
- package/lib/module/models/sdk.js +3 -4
- package/lib/module/models/sdk.js.map +1 -1
- package/lib/module/native/signature/SignatureCapture.js +3 -18
- package/lib/module/native/signature/SignatureCapture.js.map +1 -1
- package/lib/module/network/GraphQLClient.js +6 -26
- package/lib/module/network/GraphQLClient.js.map +1 -1
- package/lib/module/network/NetworkClient.js +2 -6
- package/lib/module/network/NetworkClient.js.map +1 -1
- package/lib/module/network/NetworkUtils.js +10 -3
- package/lib/module/network/NetworkUtils.js.map +1 -1
- package/lib/module/network/Queries.js.map +1 -1
- package/lib/module/network/client.js +7 -17
- package/lib/module/network/client.js.map +1 -1
- package/lib/module/res/strings.js.map +1 -1
- package/lib/module/resources/Login.js +4 -13
- package/lib/module/resources/Login.js.map +1 -1
- package/lib/module/resources/network.js +3 -6
- package/lib/module/resources/network.js.map +1 -1
- package/lib/module/styles/SdkColors.js +6 -6
- package/lib/module/styles/SdkColors.js.map +1 -1
- package/lib/module/styles/executionTasks/CommonStyles.js +41 -7
- package/lib/module/styles/executionTasks/CommonStyles.js.map +1 -1
- package/lib/module/ui/screens/CancellationScreen.js +36 -14
- package/lib/module/ui/screens/CancellationScreen.js.map +1 -1
- package/lib/module/ui/screens/CaptureInputScreen.js +7 -4
- package/lib/module/ui/screens/CaptureInputScreen.js.map +1 -1
- package/lib/module/ui/screens/CompleteObjectiveScreen.js +0 -3
- package/lib/module/ui/screens/CompleteObjectiveScreen.js.map +1 -1
- package/lib/module/ui/screens/DeliverScreen.js +7 -4
- package/lib/module/ui/screens/DeliverScreen.js.map +1 -1
- package/lib/module/ui/screens/DisplayScreen.js +5 -4
- package/lib/module/ui/screens/DisplayScreen.js.map +1 -1
- package/lib/module/ui/screens/DoodleScreen.js +7 -4
- package/lib/module/ui/screens/DoodleScreen.js.map +1 -1
- package/lib/module/ui/screens/DropCashScreen.js +7 -7
- package/lib/module/ui/screens/DropCashScreen.js.map +1 -1
- package/lib/module/ui/screens/ETScreensIndex.js +3 -1
- package/lib/module/ui/screens/ETScreensIndex.js.map +1 -1
- package/lib/module/ui/screens/FormsScreen.js +34 -6
- package/lib/module/ui/screens/FormsScreen.js.map +1 -1
- package/lib/module/ui/screens/GeofenceScreen.js +5 -4
- package/lib/module/ui/screens/GeofenceScreen.js.map +1 -1
- package/lib/module/ui/screens/HttpRequestScreen.js +5 -3
- package/lib/module/ui/screens/HttpRequestScreen.js.map +1 -1
- package/lib/module/ui/screens/ImageCaptureScreen.js +25 -5
- package/lib/module/ui/screens/ImageCaptureScreen.js.map +1 -1
- package/lib/module/ui/screens/PaymentScreen.js +12 -10
- package/lib/module/ui/screens/PaymentScreen.js.map +1 -1
- package/lib/module/ui/screens/PickupScreen.js +7 -5
- package/lib/module/ui/screens/PickupScreen.js.map +1 -1
- package/lib/module/ui/screens/RTScanScreen.js +9 -13
- package/lib/module/ui/screens/RTScanScreen.js.map +1 -1
- package/lib/module/ui/screens/ScanScreen.js +259 -0
- package/lib/module/ui/screens/ScanScreen.js.map +1 -0
- package/lib/module/ui/screens/StartWorkFlowScreen.js +22 -9
- package/lib/module/ui/screens/StartWorkFlowScreen.js.map +1 -1
- package/lib/module/ui/screens/ValidateOTPScreen.js +39 -0
- package/lib/module/ui/screens/ValidateOTPScreen.js.map +1 -0
- package/lib/module/ui/screens/WithBaseDispatchScreen.js +0 -3
- package/lib/module/ui/screens/WithBaseDispatchScreen.js.map +1 -1
- package/lib/module/ui/uiConfig/RouteParams.js +9 -1
- package/lib/module/ui/uiConfig/RouteParams.js.map +1 -1
- package/lib/module/utils/ApiUtils.js +101 -0
- package/lib/module/utils/ApiUtils.js.map +1 -0
- package/lib/module/utils/ExecTaskUtils.js +92 -21
- package/lib/module/utils/ExecTaskUtils.js.map +1 -1
- package/lib/module/utils/Logger.js +9 -21
- package/lib/module/utils/Logger.js.map +1 -1
- package/lib/module/utils/NetworkUtil.js +3 -15
- package/lib/module/utils/NetworkUtil.js.map +1 -1
- package/lib/module/utils/SdkUtils.js +2 -15
- package/lib/module/utils/SdkUtils.js.map +1 -1
- package/lib/module/utils/SyncManagerUtils.js +25 -10
- package/lib/module/utils/SyncManagerUtils.js.map +1 -1
- package/lib/module/utils/fcm/FCM.js +35 -4
- package/lib/module/utils/fcm/FCM.js.map +1 -1
- package/lib/module/utils/fcm/FcmUtils.js +50 -7
- package/lib/module/utils/fcm/FcmUtils.js.map +1 -1
- package/lib/module/utils/helper.js +0 -3
- package/lib/module/utils/helper.js.map +1 -1
- package/lib/module/utils/hooks/useTimer.js +37 -0
- package/lib/module/utils/hooks/useTimer.js.map +1 -0
- package/lib/module/utils/loginHelper.js +6 -16
- package/lib/module/utils/loginHelper.js.map +1 -1
- package/lib/module/utils/storage.js +51 -29
- package/lib/module/utils/storage.js.map +1 -1
- package/lib/module/utils/utils.js +8 -6
- package/lib/module/utils/utils.js.map +1 -1
- package/lib/typescript/components/executiontasks/CompletedWFSchema.d.ts +2 -2
- package/lib/typescript/components/executiontasks/ExecutionTasksIndex.d.ts +6 -2
- package/lib/typescript/components/executiontasks/cancellation/CancellationSchema.d.ts +10 -5
- package/lib/typescript/components/executiontasks/captureInput/CaptureInputSchema.d.ts +7 -7
- package/lib/typescript/components/executiontasks/deliver/DeliverETInput.d.ts +7 -7
- package/lib/typescript/components/executiontasks/display/DisplaySchema.d.ts +5 -5
- package/lib/typescript/components/executiontasks/doodle/SignatureSchema.d.ts +7 -7
- package/lib/typescript/components/executiontasks/dropCash/DropCashSchema.d.ts +2 -2
- package/lib/typescript/components/executiontasks/forms/FormSchema.d.ts +2 -2
- package/lib/typescript/components/executiontasks/forms/widgets/DateTimeWidget.d.ts +1 -1
- package/lib/typescript/components/executiontasks/forms/widgets/DropdownWidget.d.ts +9 -0
- package/lib/typescript/components/executiontasks/httpRequest/HttpRequestETSchema.d.ts +6 -6
- package/lib/typescript/components/executiontasks/imageCapture/CaptureSchema.d.ts +16 -11
- package/lib/typescript/components/executiontasks/payments/completePayment/CompletePaymentSchema.d.ts +2 -2
- package/lib/typescript/components/executiontasks/payments/init/InitPaymentSchema.d.ts +3 -3
- package/lib/typescript/components/executiontasks/payments/processPayment/ProcessPaymentSchema.d.ts +2 -2
- package/lib/typescript/components/executiontasks/pickup/PickpSchema.d.ts +3 -3
- package/lib/typescript/components/executiontasks/scan/ScanET.d.ts +16 -0
- package/lib/typescript/components/executiontasks/scan/ScanSchema.d.ts +70 -0
- package/lib/typescript/components/executiontasks/scan/constants.d.ts +6 -0
- package/lib/typescript/components/executiontasks/scan/interfaces.d.ts +41 -0
- package/lib/typescript/components/executiontasks/scan/sub_components/CScanner.d.ts +7 -0
- package/lib/typescript/components/executiontasks/scan/sub_components/DropDownUtils.d.ts +7 -0
- package/lib/typescript/components/executiontasks/scan/sub_components/ERDropDown.d.ts +17 -0
- package/lib/typescript/components/executiontasks/scan/sub_components/ScanList.d.ts +8 -0
- package/lib/typescript/components/executiontasks/scan/utils.d.ts +21 -0
- package/lib/typescript/components/executiontasks/scanner/ScannerSchema.d.ts +6 -6
- package/lib/typescript/components/executiontasks/scanner/returns/DropDownUtils.d.ts +1 -2
- package/lib/typescript/components/executiontasks/scanner/returns/RTReasonSelection.d.ts +1 -1
- package/lib/typescript/components/executiontasks/scanner/returns/ScanList.d.ts +1 -1
- package/lib/typescript/components/executiontasks/validateOTP/ValidateOTPET.d.ts +4 -0
- package/lib/typescript/components/executiontasks/validateOTP/ValidateOTPSchema.d.ts +54 -0
- package/lib/typescript/components/executiontasks/validateOTP/constants.d.ts +10 -0
- package/lib/typescript/components/executiontasks/validateOTP/sub-components/OTPInput.d.ts +12 -0
- package/lib/typescript/components/executiontasks/validateOTP/utils.d.ts +7 -0
- package/lib/typescript/components/executiontasks/verifyInput/VerifyInputSchema.d.ts +8 -8
- package/lib/typescript/components/executiontasks/verifyLocation/VerifyLocSchema.d.ts +9 -9
- package/lib/typescript/components/executiontasks/verifyOtp/VerifyOtpSchema.d.ts +3 -3
- package/lib/typescript/components/widgets/IconButton.d.ts +9 -0
- package/lib/typescript/components/widgets/SnackBarCustom.d.ts +9 -5
- package/lib/typescript/components/widgets/SplitTextInput.d.ts +12 -0
- package/lib/typescript/constants/apiConstants.d.ts +6 -0
- package/lib/typescript/constants/constants.d.ts +4 -2
- package/lib/typescript/errors/ErrorCodes.d.ts +3 -1
- package/lib/typescript/events/EventDispatcher.d.ts +5 -0
- package/lib/typescript/events/EventListener.d.ts +5 -0
- package/lib/typescript/events/constants.d.ts +5 -0
- package/lib/typescript/events/index.d.ts +2 -0
- package/lib/typescript/events/interface.d.ts +1 -0
- package/lib/typescript/index.d.ts +5 -4
- package/lib/typescript/manager/dispatch/DispatchStateContainer.d.ts +21 -8
- package/lib/typescript/manager/dispatchCodes/EventCodeContainer.d.ts +12 -1
- package/lib/typescript/manager/dispatchCodes/EventCodeRepo.d.ts +13 -0
- package/lib/typescript/manager/jobRemoval/JobRemovalManager.d.ts +6 -0
- package/lib/typescript/manager/sdk/DispatchSdkCache.d.ts +2 -0
- package/lib/typescript/manager/syncmanager/AppSyncManager.d.ts +1 -0
- package/lib/typescript/manager/syncmanager/DBConfig.d.ts +22 -2
- package/lib/typescript/manager/syncmanager/database.d.ts +5 -0
- package/lib/typescript/manager/syncmanager/document/models.d.ts +1 -1
- package/lib/typescript/manager/syncmanager/events/ETEventsManager.d.ts +5 -1
- package/lib/typescript/manager/syncmanager/events/EventsSyncManager.d.ts +5 -1
- package/lib/typescript/manager/syncmanager/events/SyncHttpClient.d.ts +3 -1
- package/lib/typescript/models/DispatchModels.d.ts +56 -1
- package/lib/typescript/models/ReasonCodes.d.ts +5 -0
- package/lib/typescript/models/auth.d.ts +1 -1
- package/lib/typescript/models/execTasks/ETBaseModels.d.ts +27 -8
- package/lib/typescript/models/execTasks/ETConfig.d.ts +8 -4
- package/lib/typescript/models/sdk.d.ts +5 -0
- package/lib/typescript/native/signature/SignatureCapture.d.ts +1 -1
- package/lib/typescript/network/NetworkUtils.d.ts +1 -5
- package/lib/typescript/styles/SdkColors.d.ts +1 -0
- package/lib/typescript/styles/executionTasks/CommonStyles.d.ts +36 -0
- package/lib/typescript/ui/screens/ETScreensIndex.d.ts +3 -1
- package/lib/typescript/ui/screens/ScanScreen.d.ts +3 -0
- package/lib/typescript/ui/screens/ValidateOTPScreen.d.ts +3 -0
- package/lib/typescript/ui/uiConfig/RouteParams.d.ts +8 -0
- package/lib/typescript/utils/ApiUtils.d.ts +61 -0
- package/lib/typescript/utils/ExecTaskUtils.d.ts +7 -2
- package/lib/typescript/utils/NetworkUtil.d.ts +1 -1
- package/lib/typescript/utils/SyncManagerUtils.d.ts +3 -1
- package/lib/typescript/utils/hooks/useTimer.d.ts +5 -0
- package/lib/typescript/utils/storage.d.ts +17 -0
- package/package.json +23 -24
- package/tsconfig.json +9 -8
- package/file_unzip.js +0 -5
- package/mobile-execution-lib-0.6.4.tgz +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useCallback","useState","withBaseDispatchScreen","SLDropCash","EntityCode","ExecutionTaskID","DispatchStateContainer","RouteParams","View","CancelOrderDialog","getTotalExpected","nextStates","totalAmount","s","nextState","data","input","expectedAmount","value","minorUnit","currencyCode","DropCashScreen","route","navigation","baseETProps","showAlert","setShowAlert","sResponse","setResponse","submitOutput","etOutput","getInstance","navigateToNextTask","success","DELIVER_CASH","flex","
|
|
1
|
+
{"version":3,"names":["React","useCallback","useEffect","useState","withBaseDispatchScreen","SLDropCash","EntityCode","ExecutionTaskID","DispatchStateContainer","RouteParams","View","CancelOrderDialog","onTaskStart","getTotalExpected","nextStates","totalAmount","s","nextState","data","input","expectedAmount","value","minorUnit","currencyCode","DropCashScreen","_ref","route","navigation","baseETProps","params","NEXT_STATES","showAlert","setShowAlert","sResponse","setResponse","submitOutput","etOutput","getInstance","navigateToNextTask","success","DELIVER_CASH","createElement","style","flex","_extends","taskMeta","JSON","parse","onSubmitET","_prevState","visible","onSubmit"],"sources":["DropCashScreen.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useState } from 'react';\nimport withBaseDispatchScreen from './WithBaseDispatchScreen';\nimport type { BaseETProps } from '../../models/DispatchModels';\nimport { SLDropCash } from '../../components/executiontasks/ExecutionTasksIndex';\nimport { EntityCode, ExecutionTaskID } from '../../models/execTasks/ETConfig';\nimport DispatchStateContainer from '../../manager/dispatch/DispatchStateContainer';\nimport { RouteParams } from '../uiConfig/RouteParams';\nimport type { ETAmount } from '../../components/executiontasks/payments/init/InitPaymentSchema';\nimport { View } from 'react-native';\nimport CancelOrderDialog from '../../components/widgets/CancelOrderDialog';\nimport { onTaskStart } from '../../utils/ExecTaskUtils';\n\nfunction getTotalExpected(nextStates: any[]): ETAmount {\n let totalAmount = 0;\n for (const s of nextStates) {\n totalAmount += s.nextState.data.input.expectedAmount.value;\n }\n return {\n value: totalAmount,\n minorUnit: nextStates[0].nextState.data.input.expectedAmount.minorUnit,\n currencyCode:\n nextStates[0].nextState.data.input.expectedAmount.currencyCode,\n };\n}\n\nconst DropCashScreen = ({\n route,\n navigation,\n baseETProps,\n}: {\n route: any;\n navigation: any;\n baseETProps: BaseETProps;\n}) => {\n useEffect(() => {\n onTaskStart(route.params[RouteParams.NEXT_STATES]);\n }, []);\n const [showAlert, setShowAlert] = useState(false);\n const [sResponse, setResponse] = useState<any>();\n const submitOutput = useCallback(\n async (etOutput: any) => {\n await DispatchStateContainer.getInstance().navigateToNextTask(\n navigation,\n route,\n etOutput,\n etOutput.success,\n EntityCode.DELIVER_CASH,\n ExecutionTaskID.DELIVER_CASH,\n baseETProps,\n false\n );\n },\n [baseETProps, navigation, route]\n );\n return (\n <View style={{ flex: 1 }}>\n <SLDropCash\n {...route.params[RouteParams.NEXT_STATES][0].nextState.data.input}\n expectedAmount={getTotalExpected(route.params[RouteParams.NEXT_STATES])}\n navigation={navigation}\n taskMeta={JSON.parse(\n route.params[RouteParams.NEXT_STATES][0].nextState.data.taskMeta ||\n '{}'\n )}\n onSubmitET={async (etOutput) => {\n if (etOutput.success) {\n await submitOutput(etOutput);\n } else {\n setResponse((_prevState: any) => {\n setShowAlert(true);\n return etOutput;\n });\n }\n }}\n />\n <CancelOrderDialog\n visible={showAlert}\n onSubmit={async (value) => {\n if (value) {\n setShowAlert(false);\n await submitOutput(sResponse);\n } else {\n setShowAlert(false);\n }\n }}\n />\n </View>\n );\n};\nexport default withBaseDispatchScreen(DropCashScreen);\n"],"mappings":";AAAA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAC/D,OAAOC,sBAAsB,MAAM,0BAA0B;AAE7D,SAASC,UAAU,QAAQ,qDAAqD;AAChF,SAASC,UAAU,EAAEC,eAAe,QAAQ,iCAAiC;AAC7E,OAAOC,sBAAsB,MAAM,+CAA+C;AAClF,SAASC,WAAW,QAAQ,yBAAyB;AAErD,SAASC,IAAI,QAAQ,cAAc;AACnC,OAAOC,iBAAiB,MAAM,4CAA4C;AAC1E,SAASC,WAAW,QAAQ,2BAA2B;AAEvD,SAASC,gBAAgBA,CAACC,UAAiB,EAAY;EACrD,IAAIC,WAAW,GAAG,CAAC;EACnB,KAAK,MAAMC,CAAC,IAAIF,UAAU,EAAE;IAC1BC,WAAW,IAAIC,CAAC,CAACC,SAAS,CAACC,IAAI,CAACC,KAAK,CAACC,cAAc,CAACC,KAAK;EAC5D;EACA,OAAO;IACLA,KAAK,EAAEN,WAAW;IAClBO,SAAS,EAAER,UAAU,CAAC,CAAC,CAAC,CAACG,SAAS,CAACC,IAAI,CAACC,KAAK,CAACC,cAAc,CAACE,SAAS;IACtEC,YAAY,EACVT,UAAU,CAAC,CAAC,CAAC,CAACG,SAAS,CAACC,IAAI,CAACC,KAAK,CAACC,cAAc,CAACG;EACtD,CAAC;AACH;AAEA,MAAMC,cAAc,GAAGC,IAAA,IAQjB;EAAA,IARkB;IACtBC,KAAK;IACLC,UAAU;IACVC;EAKF,CAAC,GAAAH,IAAA;EACCvB,SAAS,CAAC,MAAM;IACdU,WAAW,CAACc,KAA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AQ,CAAC;MAC9B,CAAC,MAAM;QACLF,WAAW,CAAEe,UAAe,IAAK;UAC/BjB,YAAY,CAAC,IAAI,CAAC;UAClB,OAAOI,QAAQ;QACjB,CAAC,CAAC;MACJ;IACF;EAAE,GACF,eACFpC,KAAA,CAAAyC,aAAA,CAAC9B,iBAAiB;IAChBuC,OAAO,EAAEnB,SAAU;IACnBoB,QAAQ,EAAE,MAAO9B,KAAK,IAAK;MACzB,IAAIA,KAAK,EAAE;QACTW,YAAY,CAAC,KAAK,CAAC;QACnB,MAAMG,YAAY,CAACF,SAAS,CAAC;MAC/B,CAAC,MAAM;QACLD,YAAY,CAAC,KAAK,CAAC;MACrB;IACF;EAAE,EACF,CACG;AAEX,CAAC;AACD,eAAe5B,sBAAsB,CAACoB,cAAc,CAAC"}
|
|
@@ -12,6 +12,8 @@ import DisplayScreen from './DisplayScreen';
|
|
|
12
12
|
import CompleteObjectiveScreen from './CompleteObjectiveScreen';
|
|
13
13
|
import DropCashScreen from './DropCashScreen';
|
|
14
14
|
import RTScanScreen from './RTScanScreen';
|
|
15
|
+
import ScanScreen from './ScanScreen';
|
|
15
16
|
import HttpRequestScreen from './HttpRequestScreen';
|
|
16
|
-
|
|
17
|
+
import ValidateOTPScreen from './ValidateOTPScreen';
|
|
18
|
+
export { CancellationScreen, DeliverScreen, DoodleScreen, ImageCaptureScreen, FormsScreen, PickupScreen, StartWorkFlowScreen, CaptureInputScreen, GeofenceScreen, PaymentScreen, DisplayScreen, CompleteObjectiveScreen, DropCashScreen, RTScanScreen, ScanScreen, HttpRequestScreen, ValidateOTPScreen };
|
|
17
19
|
//# sourceMappingURL=ETScreensIndex.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["CancellationScreen","DeliverScreen","DoodleScreen","ImageCaptureScreen","FormsScreen","PickupScreen","StartWorkFlowScreen","CaptureInputScreen","GeofenceScreen","PaymentScreen","DisplayScreen","CompleteObjectiveScreen","DropCashScreen","RTScanScreen","HttpRequestScreen"],"sources":["ETScreensIndex.ts"],"sourcesContent":["import CancellationScreen from './CancellationScreen';\nimport DeliverScreen from './DeliverScreen';\nimport DoodleScreen from './DoodleScreen';\nimport ImageCaptureScreen from './ImageCaptureScreen';\nimport FormsScreen from './FormsScreen';\nimport PickupScreen from './PickupScreen';\nimport StartWorkFlowScreen from './StartWorkFlowScreen';\nimport CaptureInputScreen from './CaptureInputScreen';\nimport GeofenceScreen from './GeofenceScreen';\nimport PaymentScreen from './PaymentScreen';\nimport DisplayScreen from './DisplayScreen';\nimport CompleteObjectiveScreen from './CompleteObjectiveScreen';\nimport DropCashScreen from './DropCashScreen';\nimport RTScanScreen from './RTScanScreen';\nimport HttpRequestScreen from './HttpRequestScreen';\n\nexport {\n CancellationScreen,\n DeliverScreen,\n DoodleScreen,\n ImageCaptureScreen,\n FormsScreen,\n PickupScreen,\n StartWorkFlowScreen,\n CaptureInputScreen,\n GeofenceScreen,\n PaymentScreen,\n DisplayScreen,\n CompleteObjectiveScreen,\n DropCashScreen,\n RTScanScreen,\n HttpRequestScreen,\n};\n"],"mappings":"AAAA,OAAOA,
|
|
1
|
+
{"version":3,"names":["CancellationScreen","DeliverScreen","DoodleScreen","ImageCaptureScreen","FormsScreen","PickupScreen","StartWorkFlowScreen","CaptureInputScreen","GeofenceScreen","PaymentScreen","DisplayScreen","CompleteObjectiveScreen","DropCashScreen","RTScanScreen","ScanScreen","HttpRequestScreen","ValidateOTPScreen"],"sources":["ETScreensIndex.ts"],"sourcesContent":["import CancellationScreen from './CancellationScreen';\nimport DeliverScreen from './DeliverScreen';\nimport DoodleScreen from './DoodleScreen';\nimport ImageCaptureScreen from './ImageCaptureScreen';\nimport FormsScreen from './FormsScreen';\nimport PickupScreen from './PickupScreen';\nimport StartWorkFlowScreen from './StartWorkFlowScreen';\nimport CaptureInputScreen from './CaptureInputScreen';\nimport GeofenceScreen from './GeofenceScreen';\nimport PaymentScreen from './PaymentScreen';\nimport DisplayScreen from './DisplayScreen';\nimport CompleteObjectiveScreen from './CompleteObjectiveScreen';\nimport DropCashScreen from './DropCashScreen';\nimport RTScanScreen from './RTScanScreen';\nimport ScanScreen from './ScanScreen';\nimport HttpRequestScreen from './HttpRequestScreen';\nimport ValidateOTPScreen from './ValidateOTPScreen';\n\nexport {\n CancellationScreen,\n DeliverScreen,\n DoodleScreen,\n ImageCaptureScreen,\n FormsScreen,\n PickupScreen,\n StartWorkFlowScreen,\n CaptureInputScreen,\n GeofenceScreen,\n PaymentScreen,\n DisplayScreen,\n CompleteObjectiveScreen,\n DropCashScreen,\n RTScanScreen,\n ScanScreen,\n HttpRequestScreen,\n ValidateOTPScreen,\n};\n"],"mappings":"AAAA,OAAOA,kBAAkB,MAAM,sBAAsB;AACrD,OAAOC,aAAa,MAAM,iBAAiB;AAC3C,OAAOC,YAAY,MAAM,gBAAgB;AACzC,OAAOC,kBAAkB,MAAM,sBAAsB;AACrD,OAAOC,WAAW,MAAM,eAAe;AACvC,OAAOC,YAAY,MAAM,gBAAgB;AACzC,OAAOC,mBAAmB,MAAM,uBAAuB;AACvD,OAAOC,kBAAkB,MAAM,sBAAsB;AACrD,OAAOC,cAAc,MAAM,kBAAkB;AAC7C,OAAOC,aAAa,MAAM,iBAAiB;AAC3C,OAAOC,aAAa,MAAM,iBAAiB;AAC3C,OAAOC,uBAAuB,MAAM,2BAA2B;AAC/D,OAAOC,cAAc,MAAM,kBAAkB;AAC7C,OAAOC,YAAY,MAAM,gBAAgB;AACzC,OAAOC,UAAU,MAAM,cAAc;AACrC,OAAOC,iBAAiB,MAAM,qBAAqB;AACnD,OAAOC,iBAAiB,MAAM,qBAAqB;AAEnD,SACEhB,kBAAkB,EAClBC,aAAa,EACbC,YAAY,EACZC,kBAAkB,EAClBC,WAAW,EACXC,YAAY,EACZC,mBAAmB,EACnBC,kBAAkB,EAClBC,cAAc,EACdC,aAAa,EACbC,aAAa,EACbC,uBAAuB,EACvBC,cAAc,EACdC,YAAY,EACZC,UAAU,EACVC,iBAAiB,EACjBC,iBAAiB"}
|
|
@@ -1,28 +1,56 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
|
-
import React from 'react';
|
|
2
|
+
import React, { useEffect, useState } from 'react';
|
|
4
3
|
import withBaseDispatchScreen from './WithBaseDispatchScreen';
|
|
5
4
|
import { FormGenerator } from '../../components/executiontasks/ExecutionTasksIndex';
|
|
6
5
|
import { showToast } from '../../components/widgets/Toaster';
|
|
7
6
|
import { EntityCode, ExecutionTaskID } from '../../models/execTasks/ETConfig';
|
|
8
7
|
import DispatchStateContainer from '../../manager/dispatch/DispatchStateContainer';
|
|
9
8
|
import { RouteParams } from '../uiConfig/RouteParams';
|
|
10
|
-
|
|
9
|
+
import { handleDynamicValues, onTaskStart } from '../../utils/ExecTaskUtils';
|
|
11
10
|
const FormsScreen = _ref => {
|
|
12
11
|
let {
|
|
13
12
|
route,
|
|
14
13
|
navigation,
|
|
15
14
|
baseETProps
|
|
16
15
|
} = _ref;
|
|
17
|
-
|
|
16
|
+
const firstInput = route.params[RouteParams.NEXT_STATES][0].nextState.data.input;
|
|
17
|
+
const [_input, setInputs] = useState({
|
|
18
|
+
...firstInput
|
|
19
|
+
});
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
onTaskStart(route.params[RouteParams.NEXT_STATES]);
|
|
22
|
+
if (route.params[RouteParams.ROOT_META_DATA]) {
|
|
23
|
+
let jsonSchemaProperties = _input.jsonSchema.properties;
|
|
24
|
+
jsonSchemaProperties = handleDynamicValues(jsonSchemaProperties, route.params[RouteParams.ROOT_META_DATA]);
|
|
25
|
+
|
|
26
|
+
// _input.jsonSchema.properties = jsonSchemaProperties;
|
|
27
|
+
setInputs(prev => ({
|
|
28
|
+
...prev,
|
|
29
|
+
jsonSchema: {
|
|
30
|
+
...prev.jsonschema,
|
|
31
|
+
properties: jsonSchemaProperties
|
|
32
|
+
}
|
|
33
|
+
}));
|
|
34
|
+
}
|
|
35
|
+
}, []);
|
|
36
|
+
return /*#__PURE__*/React.createElement(FormGenerator, _extends({}, _input, {
|
|
37
|
+
navigation: navigation,
|
|
38
|
+
taskMeta: JSON.parse(route.params[RouteParams.NEXT_STATES][0].nextState.data.taskMeta || '{}'),
|
|
18
39
|
onError: error => {
|
|
19
|
-
|
|
40
|
+
let errorMessage = '';
|
|
41
|
+
if (Array.isArray(error)) {
|
|
42
|
+
error.forEach(e => {
|
|
43
|
+
errorMessage += `${e.message}\n`;
|
|
44
|
+
});
|
|
45
|
+
} else {
|
|
46
|
+
errorMessage = error.message;
|
|
47
|
+
}
|
|
48
|
+
showToast(errorMessage);
|
|
20
49
|
},
|
|
21
50
|
onSubmitET: async result => {
|
|
22
51
|
await DispatchStateContainer.getInstance().navigateToNextTask(navigation, route, result, result.success, EntityCode.FORMS, ExecutionTaskID.FORMS, baseETProps, false);
|
|
23
52
|
}
|
|
24
53
|
}));
|
|
25
54
|
};
|
|
26
|
-
|
|
27
55
|
export default withBaseDispatchScreen(FormsScreen);
|
|
28
56
|
//# sourceMappingURL=FormsScreen.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","withBaseDispatchScreen","FormGenerator","showToast","EntityCode","ExecutionTaskID","DispatchStateContainer","RouteParams","FormsScreen","route","navigation","baseETProps","params","NEXT_STATES","nextState","data","input","error","message","result","getInstance","navigateToNextTask","success","FORMS"],"sources":["FormsScreen.tsx"],"sourcesContent":["import React from 'react';\nimport withBaseDispatchScreen from './WithBaseDispatchScreen';\nimport { FormGenerator } from '../../components/executiontasks/ExecutionTasksIndex';\nimport { showToast } from '../../components/widgets/Toaster';\nimport { EntityCode, ExecutionTaskID } from '../../models/execTasks/ETConfig';\nimport type { BaseETProps } from '../../models/DispatchModels';\nimport DispatchStateContainer from '../../manager/dispatch/DispatchStateContainer';\nimport { RouteParams } from '../uiConfig/RouteParams';\n\nconst FormsScreen = ({\n route,\n navigation,\n baseETProps,\n}: {\n route: any;\n navigation: any;\n baseETProps: BaseETProps;\n}) => {\n return (\n <FormGenerator\n {...route.params[RouteParams.NEXT_STATES][0].nextState.data.
|
|
1
|
+
{"version":3,"names":["React","useEffect","useState","withBaseDispatchScreen","FormGenerator","showToast","EntityCode","ExecutionTaskID","DispatchStateContainer","RouteParams","handleDynamicValues","onTaskStart","FormsScreen","_ref","route","navigation","baseETProps","firstInput","params","NEXT_STATES","nextState","data","input","_input","setInputs","ROOT_META_DATA","jsonSchemaProperties","jsonSchema","properties","prev","jsonschema","createElement","_extends","taskMeta","JSON","parse","onError","error","errorMessage","Array","isArray","forEach","e","message","onSubmitET","result","getInstance","navigateToNextTask","success","FORMS"],"sources":["FormsScreen.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport withBaseDispatchScreen from './WithBaseDispatchScreen';\nimport { FormGenerator } from '../../components/executiontasks/ExecutionTasksIndex';\nimport { showToast } from '../../components/widgets/Toaster';\nimport { EntityCode, ExecutionTaskID } from '../../models/execTasks/ETConfig';\nimport type { BaseETProps } from '../../models/DispatchModels';\nimport DispatchStateContainer from '../../manager/dispatch/DispatchStateContainer';\nimport { RouteParams } from '../uiConfig/RouteParams';\nimport { handleDynamicValues, onTaskStart } from '../../utils/ExecTaskUtils';\n\nconst FormsScreen = ({\n route,\n navigation,\n baseETProps,\n}: {\n route: any;\n navigation: any;\n baseETProps: BaseETProps;\n}) => {\n const firstInput =\n route.params[RouteParams.NEXT_STATES][0].nextState.data.input;\n const [_input, setInputs] = useState({ ...firstInput });\n useEffect(() => {\n onTaskStart(route.params[RouteParams.NEXT_STATES]);\n if (route.params[RouteParams.ROOT_META_DATA]) {\n let jsonSchemaProperties = _input.jsonSchema.properties;\n jsonSchemaProperties = handleDynamicValues(\n jsonSchemaProperties,\n route.params[RouteParams.ROOT_META_DATA]\n );\n\n // _input.jsonSchema.properties = jsonSchemaProperties;\n setInputs((prev: any) => ({\n ...prev,\n jsonSchema: { ...prev.jsonschema, properties: jsonSchemaProperties },\n }));\n }\n }, []);\n\n return (\n <FormGenerator\n {..._input}\n navigation={navigation}\n taskMeta={JSON.parse(\n route.params[RouteParams.NEXT_STATES][0].nextState.data.taskMeta || '{}'\n )}\n onError={(error: any) => {\n let errorMessage = '';\n if (Array.isArray(error)) {\n error.forEach((e) => {\n errorMessage += `${e.message}\\n`;\n });\n } else {\n errorMessage = error.message;\n }\n showToast(errorMessage);\n }}\n onSubmitET={async (result) => {\n await DispatchStateContainer.getInstance().navigateToNextTask(\n navigation,\n route,\n result,\n result.success,\n EntityCode.FORMS,\n ExecutionTaskID.FORMS,\n baseETProps,\n false\n );\n }}\n />\n );\n};\nexport default withBaseDispatchScreen(FormsScreen);\n"],"mappings":";AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAClD,OAAOC,sBAAsB,MAAM,0BAA0B;AAC7D,SAASC,aAAa,QAAQ,qDAAqD;AACnF,SAASC,SAAS,QAAQ,kCAAkC;AAC5D,SAASC,UAAU,EAAEC,eAAe,QAAQ,iCAAiC;AAE7E,OAAOC,sBAAsB,MAAM,+CAA+C;AAClF,SAASC,WAAW,QAAQ,yBAAyB;AACrD,SAASC,mBAAmB,EAAEC,WAAW,QAAQ,2BAA2B;AAE5E,MAAMC,WAAW,GAAGC,IAAA,IAQd;EAAA,IARe;IACnBC,KAAK;IACLC,UAAU;IACVC;EAKF,CAAC,GAAAH,IAAA;EACC,MAAMI,UAAU,GACdH,KAAK,CAACI,MAAM,CAACT,WAAW,CAACU,WAAW,CAAC,CAAC,CAAC,CAAC,CAACC,SAAS,CAACC,IAAI,CAACC,KAAK;EAC/D,MAAM,CAACC,MAAM,EAAEC,SAAS,CAAC,GAAGtB,QAAQ,CAAC;IAAE,GAAGe;EAAW,CAAC,CAAC;EACvDhB,SAAS,CAAC,MAAM;IACdU,WAAW,CAACG,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AM,EACNA,MAAM,CAACG,OAAO,EACd1C,UAAU,CAAC2C,KAAK,EAChB1C,eAAe,CAAC0C,KAAK,EACrBjC,WAAW,EACX,KAAK,CACN;IACH;EAAE,GACF;AAEN,CAAC;AACD,eAAeb,sBAAsB,CAACS,WAAW,CAAC"}
|
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
2
|
import withBaseDispatchScreen from './WithBaseDispatchScreen';
|
|
4
|
-
import React from 'react';
|
|
3
|
+
import React, { useEffect } from 'react';
|
|
5
4
|
import { VerifyLocationET } from '../../components/executiontasks/ExecutionTasksIndex';
|
|
6
5
|
import { showToast } from '../../components/widgets/Toaster';
|
|
7
6
|
import { EntityCode, ExecutionTaskID } from '../../models/execTasks/ETConfig';
|
|
8
7
|
import DispatchStateContainer from '../../manager/dispatch/DispatchStateContainer';
|
|
9
8
|
import { RouteParams } from '../uiConfig/RouteParams';
|
|
10
|
-
|
|
9
|
+
import { onTaskStart } from '../../utils/ExecTaskUtils';
|
|
11
10
|
const GeofenceScreen = _ref => {
|
|
12
11
|
let {
|
|
13
12
|
route,
|
|
14
13
|
navigation,
|
|
15
14
|
baseETProps
|
|
16
15
|
} = _ref;
|
|
16
|
+
useEffect(() => {
|
|
17
|
+
onTaskStart(route.params[RouteParams.NEXT_STATES]);
|
|
18
|
+
}, []);
|
|
17
19
|
return /*#__PURE__*/React.createElement(VerifyLocationET, _extends({}, route.params[RouteParams.NEXT_STATES][0].nextState.data.input, {
|
|
18
20
|
onSubmitET: async resp => {
|
|
19
21
|
try {
|
|
@@ -25,6 +27,5 @@ const GeofenceScreen = _ref => {
|
|
|
25
27
|
}
|
|
26
28
|
}));
|
|
27
29
|
};
|
|
28
|
-
|
|
29
30
|
export default withBaseDispatchScreen(GeofenceScreen);
|
|
30
31
|
//# sourceMappingURL=GeofenceScreen.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["withBaseDispatchScreen","React","VerifyLocationET","showToast","EntityCode","ExecutionTaskID","DispatchStateContainer","RouteParams","GeofenceScreen","route","navigation","baseETProps","params","NEXT_STATES","nextState","data","input","resp","getInstance","navigateToNextTask","success","VERIFY_LOCATION","error","showProgress","message"],"sources":["GeofenceScreen.tsx"],"sourcesContent":["import withBaseDispatchScreen from './WithBaseDispatchScreen';\nimport React from 'react';\nimport { VerifyLocationET } from '../../components/executiontasks/ExecutionTasksIndex';\nimport { showToast } from '../../components/widgets/Toaster';\nimport { EntityCode, ExecutionTaskID } from '../../models/execTasks/ETConfig';\nimport type { BaseETProps } from '../../models/DispatchModels';\nimport DispatchStateContainer from '../../manager/dispatch/DispatchStateContainer';\nimport { RouteParams } from '../uiConfig/RouteParams';\n\nconst GeofenceScreen = ({\n route,\n navigation,\n baseETProps,\n}: {\n route: any;\n navigation: any;\n baseETProps: BaseETProps;\n}) => {\n return (\n <VerifyLocationET\n {...route.params[RouteParams.NEXT_STATES][0].nextState.data.input}\n onSubmitET={async (resp) => {\n try {\n await DispatchStateContainer.getInstance().navigateToNextTask(\n navigation,\n route,\n resp,\n resp.success,\n EntityCode.VERIFY_LOCATION,\n ExecutionTaskID.VERIFY_LOCATION,\n baseETProps,\n false\n );\n } catch (error: any) {\n baseETProps.showProgress(false);\n showToast('Error ' + error.message);\n }\n }}\n />\n );\n};\n\nexport default withBaseDispatchScreen(GeofenceScreen);\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["withBaseDispatchScreen","React","useEffect","VerifyLocationET","showToast","EntityCode","ExecutionTaskID","DispatchStateContainer","RouteParams","onTaskStart","GeofenceScreen","_ref","route","navigation","baseETProps","params","NEXT_STATES","createElement","_extends","nextState","data","input","onSubmitET","resp","getInstance","navigateToNextTask","success","VERIFY_LOCATION","error","showProgress","message"],"sources":["GeofenceScreen.tsx"],"sourcesContent":["import withBaseDispatchScreen from './WithBaseDispatchScreen';\nimport React, { useEffect } from 'react';\nimport { VerifyLocationET } from '../../components/executiontasks/ExecutionTasksIndex';\nimport { showToast } from '../../components/widgets/Toaster';\nimport { EntityCode, ExecutionTaskID } from '../../models/execTasks/ETConfig';\nimport type { BaseETProps } from '../../models/DispatchModels';\nimport DispatchStateContainer from '../../manager/dispatch/DispatchStateContainer';\nimport { RouteParams } from '../uiConfig/RouteParams';\nimport { onTaskStart } from '../../utils/ExecTaskUtils';\n\nconst GeofenceScreen = ({\n route,\n navigation,\n baseETProps,\n}: {\n route: any;\n navigation: any;\n baseETProps: BaseETProps;\n}) => {\n useEffect(() => {\n onTaskStart(route.params[RouteParams.NEXT_STATES]);\n }, []);\n return (\n <VerifyLocationET\n {...route.params[RouteParams.NEXT_STATES][0].nextState.data.input}\n onSubmitET={async (resp) => {\n try {\n await DispatchStateContainer.getInstance().navigateToNextTask(\n navigation,\n route,\n resp,\n resp.success,\n EntityCode.VERIFY_LOCATION,\n ExecutionTaskID.VERIFY_LOCATION,\n baseETProps,\n false\n );\n } catch (error: any) {\n baseETProps.showProgress(false);\n showToast('Error ' + error.message);\n }\n }}\n />\n );\n};\n\nexport default withBaseDispatchScreen(GeofenceScreen);\n"],"mappings":";AAAA,OAAOA,sBAAsB,MAAM,0BAA0B;AAC7D,OAAOC,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,SAASC,gBAAgB,QAAQ,qDAAqD;AACtF,SAASC,SAAS,QAAQ,kCAAkC;AAC5D,SAASC,UAAU,EAAEC,eAAe,QAAQ,iCAAiC;AAE7E,OAAOC,sBAAsB,MAAM,+CAA+C;AAClF,SAASC,WAAW,QAAQ,yBAAyB;AACrD,SAASC,WAAW,QAAQ,2BAA2B;AAEvD,MAAMC,cAAc,GAAGC,IAAA,IAQjB;EAAA,IARkB;IACtBC,KAAK;IACLC,UAAU;IACVC;EAKF,CAAC,GAAAH,IAAA;EACCT,SAAS,CAAC,MAAM;IACdO,WAAW,CAACG,KAAK,CAACG,MAAM,CAACP,WAAW,CAACQ,WAAW,CAAC,CAAC;EACpD,CAAC,EAAE,EAAE,CAAC;EACN,oBACEf,KAAA,CAAAgB,aAAA,CAACd,gBAAgB,EAAAe,QAAA,KACXN,KAAK,CAACG,MAAM,CAACP,WAAW,CAACQ,WAAW,CAAC,CAAC,CAAC,CAAC,CAACG,SAAS,CAACC,IAAI,CAACC,KAAK;IACjEC,UAAU,EAAE,MAAOC,IAAI,IAAK;MAC1B,IAAI;QACF,MAAMhB,sBAAsB,CAACiB,WAAW,EAAE,CAACC,kBAAkB,CAC3DZ,UAAU,EACVD,KAAK,EACLW,IAAI,EACJA,IAAI,CAACG,OAAO,EACZrB,UAAU,CAACsB,eAAe,EAC1BrB,eAAe,CAACqB,eAAe,EAC/Bb,WAAW,EACX,KAAK,CACN;MACH,CAAC,CAAC,OAAOc,KAAU,EAAE;QACnBd,WAAW,CAACe,YAAY,CAAC,KAAK,CAAC;QAC/BzB,SAAS,CAAC,QAAQ,GAAGwB,KAAK,CAACE,OAAO,CAAC;MACrC;IACF;EAAE,GACF;AAEN,CAAC;AAED,eAAe9B,sBAAsB,CAACU,cAAc,CAAC"}
|
|
@@ -1,23 +1,25 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
2
|
import WithBaseDispatchScreen from './WithBaseDispatchScreen';
|
|
4
3
|
import { HttpRequestET } from '../../components/executiontasks/ExecutionTasksIndex';
|
|
5
4
|
import { RouteParams } from '../uiConfig/RouteParams';
|
|
6
5
|
import DispatchStateContainer from '../../manager/dispatch/DispatchStateContainer';
|
|
7
6
|
import { EntityCode, ExecutionTaskID } from '../../models/execTasks/ETConfig';
|
|
8
|
-
|
|
7
|
+
import { useEffect } from 'react';
|
|
8
|
+
import { onTaskStart } from '../../utils/ExecTaskUtils';
|
|
9
9
|
const HttpRequestScreen = _ref => {
|
|
10
10
|
let {
|
|
11
11
|
route,
|
|
12
12
|
navigation,
|
|
13
13
|
baseETProps
|
|
14
14
|
} = _ref;
|
|
15
|
+
useEffect(() => {
|
|
16
|
+
onTaskStart(route.params[RouteParams.NEXT_STATES]);
|
|
17
|
+
}, []);
|
|
15
18
|
return /*#__PURE__*/React.createElement(HttpRequestET, _extends({}, route.params[RouteParams.NEXT_STATES][0].nextState.data.input, {
|
|
16
19
|
onSubmitET: async response => {
|
|
17
20
|
await DispatchStateContainer.getInstance().navigateToNextTask(navigation, route, response, response.success, EntityCode.HTTP_REQUEST_ET, ExecutionTaskID.HTTP_REQUEST_ET, baseETProps, false);
|
|
18
21
|
}
|
|
19
22
|
}));
|
|
20
23
|
};
|
|
21
|
-
|
|
22
24
|
export default WithBaseDispatchScreen(HttpRequestScreen);
|
|
23
25
|
//# sourceMappingURL=HttpRequestScreen.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["WithBaseDispatchScreen","HttpRequestET","RouteParams","DispatchStateContainer","EntityCode","ExecutionTaskID","HttpRequestScreen","route","navigation","baseETProps","params","NEXT_STATES","nextState","data","input","response","getInstance","navigateToNextTask","success","HTTP_REQUEST_ET"],"sources":["HttpRequestScreen.tsx"],"sourcesContent":["import WithBaseDispatchScreen from './WithBaseDispatchScreen';\nimport type { BaseETProps } from '../../models/DispatchModels';\nimport { HttpRequestET } from '../../components/executiontasks/ExecutionTasksIndex';\nimport { RouteParams } from '../uiConfig/RouteParams';\nimport DispatchStateContainer from '../../manager/dispatch/DispatchStateContainer';\nimport { EntityCode, ExecutionTaskID } from '../../models/execTasks/ETConfig';\n\nconst HttpRequestScreen = ({\n route,\n navigation,\n baseETProps,\n}: {\n route: any;\n navigation: any;\n baseETProps: BaseETProps;\n}) => {\n return (\n <HttpRequestET\n {...route.params[RouteParams.NEXT_STATES][0].nextState.data.input}\n onSubmitET={async (response) => {\n await DispatchStateContainer.getInstance().navigateToNextTask(\n navigation,\n route,\n response,\n response.success,\n EntityCode.HTTP_REQUEST_ET,\n ExecutionTaskID.HTTP_REQUEST_ET,\n baseETProps,\n false\n );\n }}\n />\n );\n};\nexport default WithBaseDispatchScreen(HttpRequestScreen);\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["WithBaseDispatchScreen","HttpRequestET","RouteParams","DispatchStateContainer","EntityCode","ExecutionTaskID","useEffect","onTaskStart","HttpRequestScreen","_ref","route","navigation","baseETProps","params","NEXT_STATES","React","createElement","_extends","nextState","data","input","onSubmitET","response","getInstance","navigateToNextTask","success","HTTP_REQUEST_ET"],"sources":["HttpRequestScreen.tsx"],"sourcesContent":["import WithBaseDispatchScreen from './WithBaseDispatchScreen';\nimport type { BaseETProps } from '../../models/DispatchModels';\nimport { HttpRequestET } from '../../components/executiontasks/ExecutionTasksIndex';\nimport { RouteParams } from '../uiConfig/RouteParams';\nimport DispatchStateContainer from '../../manager/dispatch/DispatchStateContainer';\nimport { EntityCode, ExecutionTaskID } from '../../models/execTasks/ETConfig';\nimport { useEffect } from 'react';\nimport { onTaskStart } from '../../utils/ExecTaskUtils';\n\nconst HttpRequestScreen = ({\n route,\n navigation,\n baseETProps,\n}: {\n route: any;\n navigation: any;\n baseETProps: BaseETProps;\n}) => {\n useEffect(() => {\n onTaskStart(route.params[RouteParams.NEXT_STATES]);\n }, []);\n return (\n <HttpRequestET\n {...route.params[RouteParams.NEXT_STATES][0].nextState.data.input}\n onSubmitET={async (response) => {\n await DispatchStateContainer.getInstance().navigateToNextTask(\n navigation,\n route,\n response,\n response.success,\n EntityCode.HTTP_REQUEST_ET,\n ExecutionTaskID.HTTP_REQUEST_ET,\n baseETProps,\n false\n );\n }}\n />\n );\n};\nexport default WithBaseDispatchScreen(HttpRequestScreen);\n"],"mappings":";AAAA,OAAOA,sBAAsB,MAAM,0BAA0B;AAE7D,SAASC,aAAa,QAAQ,qDAAqD;AACnF,SAASC,WAAW,QAAQ,yBAAyB;AACrD,OAAOC,sBAAsB,MAAM,+CAA+C;AAClF,SAASC,UAAU,EAAEC,eAAe,QAAQ,iCAAiC;AAC7E,SAASC,SAAS,QAAQ,OAAO;AACjC,SAASC,WAAW,QAAQ,2BAA2B;AAEvD,MAAMC,iBAAiB,GAAGC,IAAA,IAQpB;EAAA,IARqB;IACzBC,KAAK;IACLC,UAAU;IACVC;EAKF,CAAC,GAAAH,IAAA;EACCH,SAAS,CAAC,MAAM;IACdC,WAAW,CAACG,KAAK,CAACG,MAAM,CAACX,WAAW,CAACY,WAAW,CAAC,CAAC;EACpD,CAAC,EAAE,EAAE,CAAC;EACN,oBACEC,KAAA,CAAAC,aAAA,CAACf,aAAa,EAAAgB,QAAA,KACRP,KAAK,CAACG,MAAM,CAACX,WAAW,CAACY,WAAW,CAAC,CAAC,CAAC,CAAC,CAACI,SAAS,CAACC,IAAI,CAACC,KAAK;IACjEC,UAAU,EAAE,MAAOC,QAAQ,IAAK;MAC9B,MAAMnB,sBAAsB,CAACoB,WAAW,EAAE,CAACC,kBAAkB,CAC3Db,UAAU,EACVD,KAAK,EACLY,QAAQ,EACRA,QAAQ,CAACG,OAAO,EAChBrB,UAAU,CAACsB,eAAe,EAC1BrB,eAAe,CAACqB,eAAe,EAC/Bd,WAAW,EACX,KAAK,CACN;IACH;EAAE,GACF;AAEN,CAAC;AACD,eAAeZ,sBAAsB,CAACQ,iBAAiB,CAAC"}
|
|
@@ -1,20 +1,41 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
|
-
import React from 'react';
|
|
2
|
+
import React, { useEffect, useState } from 'react';
|
|
4
3
|
import ImageCapture from '../../components/executiontasks/imageCapture/ImageCapture';
|
|
5
4
|
import { EntityCode, ExecutionTaskID } from '../../models/execTasks/ETConfig';
|
|
6
5
|
import withBaseDispatchScreen from './WithBaseDispatchScreen';
|
|
7
6
|
import DispatchStateContainer from '../../manager/dispatch/DispatchStateContainer';
|
|
8
7
|
import { RouteParams } from '../uiConfig/RouteParams';
|
|
9
8
|
import { getJobIDs, getObjectiveRefs } from '../../components/executiontasks/doodle/DoodleUtils';
|
|
10
|
-
|
|
9
|
+
import { onTaskStart } from '../../utils/ExecTaskUtils';
|
|
11
10
|
const ImageCaptureScreen = _ref => {
|
|
12
11
|
let {
|
|
13
12
|
route,
|
|
14
13
|
navigation,
|
|
15
14
|
baseETProps
|
|
16
15
|
} = _ref;
|
|
17
|
-
|
|
16
|
+
const firstInput = route.params[RouteParams.NEXT_STATES][0].nextState.data.input;
|
|
17
|
+
const [inputs, setInputs] = useState(firstInput);
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
onTaskStart(route.params[RouteParams.NEXT_STATES]);
|
|
20
|
+
let _captureCountLimit = 0;
|
|
21
|
+
for (let nextStateData of route.params[RouteParams.NEXT_STATES]) {
|
|
22
|
+
const _input = nextStateData.nextState.data.input;
|
|
23
|
+
/**
|
|
24
|
+
* Combining all the required data, incase the objectives are merged
|
|
25
|
+
*/
|
|
26
|
+
if (_input.captureCountLimit) {
|
|
27
|
+
_captureCountLimit += _input.captureCountLimit;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
_captureCountLimit = _captureCountLimit < route.params[RouteParams.NEXT_STATES].length ? route.params[RouteParams.NEXT_STATES].length : _captureCountLimit;
|
|
31
|
+
setInputs(prev => ({
|
|
32
|
+
...prev,
|
|
33
|
+
captureCountLimit: _captureCountLimit
|
|
34
|
+
}));
|
|
35
|
+
}, []);
|
|
36
|
+
return /*#__PURE__*/React.createElement(ImageCapture, _extends({}, inputs, {
|
|
37
|
+
navigation: navigation,
|
|
38
|
+
taskMeta: JSON.parse(route.params[RouteParams.NEXT_STATES][0].nextState.data.taskMeta || '{}'),
|
|
18
39
|
jobIds: getJobIDs(route.params[RouteParams.NEXT_STATES]),
|
|
19
40
|
objRefs: getObjectiveRefs(route.params[RouteParams.NEXT_STATES]),
|
|
20
41
|
onSubmitET: async imageDataList => {
|
|
@@ -22,6 +43,5 @@ const ImageCaptureScreen = _ref => {
|
|
|
22
43
|
}
|
|
23
44
|
}));
|
|
24
45
|
};
|
|
25
|
-
|
|
26
46
|
export default withBaseDispatchScreen(ImageCaptureScreen);
|
|
27
47
|
//# sourceMappingURL=ImageCaptureScreen.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","ImageCapture","EntityCode","ExecutionTaskID","withBaseDispatchScreen","DispatchStateContainer","RouteParams","getJobIDs","getObjectiveRefs","ImageCaptureScreen","route","navigation","baseETProps","params","NEXT_STATES","nextState","data","input","imageDataList","getInstance","navigateToNextTask","success","IMAGE_CAPTURE"],"sources":["ImageCaptureScreen.tsx"],"sourcesContent":["import React from 'react';\nimport ImageCapture from '../../components/executiontasks/imageCapture/ImageCapture';\nimport { EntityCode, ExecutionTaskID } from '../../models/execTasks/ETConfig';\nimport type { BaseETProps } from '../../models/DispatchModels';\nimport withBaseDispatchScreen from './WithBaseDispatchScreen';\nimport DispatchStateContainer from '../../manager/dispatch/DispatchStateContainer';\nimport { RouteParams } from '../uiConfig/RouteParams';\nimport {\n getJobIDs,\n getObjectiveRefs,\n} from '../../components/executiontasks/doodle/DoodleUtils';\n\nconst ImageCaptureScreen = ({\n route,\n navigation,\n baseETProps,\n}: {\n route: any;\n navigation: any;\n baseETProps: BaseETProps;\n}) => {\n return (\n <ImageCapture\n {...route.params[RouteParams.NEXT_STATES][0].nextState.data.
|
|
1
|
+
{"version":3,"names":["React","useEffect","useState","ImageCapture","EntityCode","ExecutionTaskID","withBaseDispatchScreen","DispatchStateContainer","RouteParams","getJobIDs","getObjectiveRefs","onTaskStart","ImageCaptureScreen","_ref","route","navigation","baseETProps","firstInput","params","NEXT_STATES","nextState","data","input","inputs","setInputs","_captureCountLimit","nextStateData","_input","captureCountLimit","length","prev","createElement","_extends","taskMeta","JSON","parse","jobIds","objRefs","onSubmitET","imageDataList","getInstance","navigateToNextTask","success","IMAGE_CAPTURE"],"sources":["ImageCaptureScreen.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport ImageCapture from '../../components/executiontasks/imageCapture/ImageCapture';\nimport { EntityCode, ExecutionTaskID } from '../../models/execTasks/ETConfig';\nimport type { BaseETProps } from '../../models/DispatchModels';\nimport withBaseDispatchScreen from './WithBaseDispatchScreen';\nimport DispatchStateContainer from '../../manager/dispatch/DispatchStateContainer';\nimport { RouteParams } from '../uiConfig/RouteParams';\nimport {\n getJobIDs,\n getObjectiveRefs,\n} from '../../components/executiontasks/doodle/DoodleUtils';\nimport { onTaskStart } from '../../utils/ExecTaskUtils';\n\nconst ImageCaptureScreen = ({\n route,\n navigation,\n baseETProps,\n}: {\n route: any;\n navigation: any;\n baseETProps: BaseETProps;\n}) => {\n const firstInput =\n route.params[RouteParams.NEXT_STATES][0].nextState.data.input;\n const [inputs, setInputs] = useState(firstInput);\n\n useEffect(() => {\n onTaskStart(route.params[RouteParams.NEXT_STATES]);\n let _captureCountLimit = 0;\n\n for (let nextStateData of route.params[RouteParams.NEXT_STATES]) {\n const _input = nextStateData.nextState.data.input;\n /**\n * Combining all the required data, incase the objectives are merged\n */\n if (_input.captureCountLimit) {\n _captureCountLimit += _input.captureCountLimit;\n }\n }\n _captureCountLimit =\n _captureCountLimit < route.params[RouteParams.NEXT_STATES].length\n ? route.params[RouteParams.NEXT_STATES].length\n : _captureCountLimit;\n\n setInputs((prev: any) => ({\n ...prev,\n captureCountLimit: _captureCountLimit,\n }));\n }, []);\n\n return (\n <ImageCapture\n {...inputs}\n navigation={navigation}\n taskMeta={JSON.parse(\n route.params[RouteParams.NEXT_STATES][0].nextState.data.taskMeta || '{}'\n )}\n jobIds={getJobIDs(route.params[RouteParams.NEXT_STATES])}\n objRefs={getObjectiveRefs(route.params[RouteParams.NEXT_STATES])}\n onSubmitET={async (imageDataList) => {\n await DispatchStateContainer.getInstance().navigateToNextTask(\n navigation,\n route,\n imageDataList,\n imageDataList.success,\n EntityCode.IMAGE_CAPTURE,\n ExecutionTaskID.IMAGE_CAPTURE,\n baseETProps,\n false\n );\n }}\n />\n );\n};\n\nexport default withBaseDispatchScreen(ImageCaptureScreen);\n"],"mappings":";AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAClD,OAAOC,YAAY,MAAM,2DAA2D;AACpF,SAASC,UAAU,EAAEC,eAAe,QAAQ,iCAAiC;AAE7E,OAAOC,sBAAsB,MAAM,0BAA0B;AAC7D,OAAOC,sBAAsB,MAAM,+CAA+C;AAClF,SAASC,WAAW,QAAQ,yBAAyB;AACrD,SACEC,SAAS,EACTC,gBAAgB,QACX,oDAAoD;AAC3D,SAASC,WAAW,QAAQ,2BAA2B;AAEvD,MAAMC,kBAAkB,GAAGC,IAAA,IAQrB;EAAA,IARsB;IAC1BC,KAAK;IACLC,UAAU;IACVC;EAKF,CAAC,GAAAH,IAAA;EACC,MAAMI,UAAU,GACdH,KAAK,CAACI,MAAM,CAACV,WAAW,CAACW,WAAW,CAAC,CAAC,CAAC,CAAC,CAACC,SAAS,CAACC,IAAI,CAACC,KAAK;EAC/D,MAAM,CAACC,MAAM,EAAEC,SAAS,CAAC,GAAGtB,QAAQ,CAACe,UAAU,CAAC;EAEhDhB,SAAS,CAAC,MAAM;IACdU,WAAW,CAACG,KAAK,CAACI,MAAM,CAACV,WAAW,CAACW,WAAW,CAAC,CAAC;IAClD,IAAIM,kBAAkB,GAAG,CAAC;IAE1B,KAAK,IAAIC,aAAa,IAAIZ,KAAK,CAACI,MAAM,CAACV,WAAW,CAACW,WAAW,CAAC,EAAE;MAC/D,MAAMQ,MAAM,GAAGD,aAAa,CAACN,SAAS,CAACC,IAAI,CAACC,KAA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extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
2
|
import React, { useCallback, useState } from 'react';
|
|
4
3
|
import withBaseDispatchScreen from './WithBaseDispatchScreen';
|
|
5
4
|
import { EntityCode, ExecutionTaskID } from '../../models/execTasks/ETConfig';
|
|
@@ -7,30 +6,33 @@ import { CompletePaymentET, InitPaymentET, ProcessPaymentET } from '../../compon
|
|
|
7
6
|
import DispatchStateContainer from '../../manager/dispatch/DispatchStateContainer';
|
|
8
7
|
import { RouteParams } from '../uiConfig/RouteParams';
|
|
9
8
|
import { View } from 'react-native';
|
|
10
|
-
import { getBaseETResponse, getEntityCodeByET } from '../../utils/ExecTaskUtils';
|
|
9
|
+
import { getBaseETResponse, getEntityCodeByET, onTaskStart } from '../../utils/ExecTaskUtils';
|
|
11
10
|
import CancelOrderDialog from '../../components/widgets/CancelOrderDialog';
|
|
12
11
|
import { getEventCodeByET } from '../../manager/dispatchCodes/EventCodeContainer';
|
|
13
12
|
import { useEffect } from 'react';
|
|
14
|
-
|
|
15
13
|
const PaymentScreen = _ref => {
|
|
16
14
|
let {
|
|
17
15
|
navigation,
|
|
18
16
|
route,
|
|
19
17
|
baseETProps
|
|
20
18
|
} = _ref;
|
|
19
|
+
useEffect(() => {
|
|
20
|
+
onTaskStart(route.params[RouteParams.NEXT_STATES]);
|
|
21
|
+
}, []);
|
|
21
22
|
let currentState = route.params[RouteParams.NEXT_STATES][0].nextState;
|
|
22
23
|
const [showAlert, setShowAlert] = useState(false);
|
|
23
24
|
const [sResponse, setResponse] = useState();
|
|
24
25
|
const submitOutput = useCallback(async etOutput => {
|
|
25
26
|
await DispatchStateContainer.getInstance().navigateToNextTask(navigation, route, etOutput, etOutput.success, getEntityCodeByET(currentState.taskId), currentState.taskId, baseETProps, false);
|
|
26
27
|
}, [baseETProps, currentState.taskId, navigation, route]);
|
|
27
|
-
|
|
28
28
|
if (currentState.taskId === ExecutionTaskID.INIT_PAYMENT) {
|
|
29
29
|
return /*#__PURE__*/React.createElement(View, {
|
|
30
30
|
style: {
|
|
31
31
|
flex: 1
|
|
32
32
|
}
|
|
33
33
|
}, /*#__PURE__*/React.createElement(InitPaymentET, _extends({}, route.params[RouteParams.NEXT_STATES][0].nextState.data.input, {
|
|
34
|
+
navigation: navigation,
|
|
35
|
+
taskMeta: JSON.parse(route.params[RouteParams.NEXT_STATES][0].nextState.data.taskMeta || '{}'),
|
|
34
36
|
onSubmitET: async etOutput => {
|
|
35
37
|
if (etOutput.success) {
|
|
36
38
|
await submitOutput(etOutput);
|
|
@@ -54,16 +56,14 @@ const PaymentScreen = _ref => {
|
|
|
54
56
|
}));
|
|
55
57
|
} else if (currentState.taskId === ExecutionTaskID.PROCESS_PAYMENT) {
|
|
56
58
|
var _input2;
|
|
57
|
-
|
|
58
59
|
let _input = route.params[RouteParams.NEXT_STATES][0].nextState.data.input;
|
|
59
|
-
|
|
60
60
|
if (((_input2 = _input) === null || _input2 === void 0 ? void 0 : _input2.paymentMode) === 'CASH') {
|
|
61
61
|
useEffect(() => {
|
|
62
62
|
let isMounted = true;
|
|
63
|
-
|
|
64
63
|
(async () => {
|
|
65
64
|
if (isMounted) {
|
|
66
|
-
|
|
65
|
+
var _input$applicableReas;
|
|
66
|
+
const baseData = await getBaseETResponse(EntityCode.PROCESS_PAYMENT, true, getEventCodeByET(ExecutionTaskID.PROCESS_PAYMENT, true, (_input$applicableReas = _input.applicableReasons) === null || _input$applicableReas === void 0 ? void 0 : _input$applicableReas.success), '');
|
|
67
67
|
_input = {
|
|
68
68
|
paymentMode: _input.paymentMode,
|
|
69
69
|
collectedAmount: _input.amount,
|
|
@@ -74,7 +74,6 @@ const PaymentScreen = _ref => {
|
|
|
74
74
|
await submitOutput(_input);
|
|
75
75
|
}
|
|
76
76
|
})();
|
|
77
|
-
|
|
78
77
|
return () => {
|
|
79
78
|
isMounted = false;
|
|
80
79
|
};
|
|
@@ -85,6 +84,8 @@ const PaymentScreen = _ref => {
|
|
|
85
84
|
flex: 1
|
|
86
85
|
}
|
|
87
86
|
}, /*#__PURE__*/React.createElement(ProcessPaymentET, _extends({}, route.params[RouteParams.NEXT_STATES][0].nextState.data.input, {
|
|
87
|
+
navigation: navigation,
|
|
88
|
+
taskMeta: JSON.parse(route.params[RouteParams.NEXT_STATES][0].nextState.data.taskMeta || '{}'),
|
|
88
89
|
onSubmitET: async etOutput => {
|
|
89
90
|
if (etOutput.success) {
|
|
90
91
|
await submitOutput(etOutput);
|
|
@@ -108,12 +109,13 @@ const PaymentScreen = _ref => {
|
|
|
108
109
|
}));
|
|
109
110
|
} else {
|
|
110
111
|
return /*#__PURE__*/React.createElement(CompletePaymentET, _extends({}, route.params[RouteParams.NEXT_STATES][0].nextState.data.input, {
|
|
112
|
+
navigation: navigation,
|
|
113
|
+
taskMeta: JSON.parse(route.params[RouteParams.NEXT_STATES][0].nextState.data.taskMeta || '{}'),
|
|
111
114
|
onSubmitET: async etOut => {
|
|
112
115
|
await DispatchStateContainer.getInstance().navigateToNextTask(navigation, route, etOut, etOut.success, EntityCode.COMPLETE_PAYMENT, ExecutionTaskID.COMPLETE_PAYMENT, baseETProps, false);
|
|
113
116
|
}
|
|
114
117
|
}));
|
|
115
118
|
}
|
|
116
119
|
};
|
|
117
|
-
|
|
118
120
|
export default withBaseDispatchScreen(PaymentScreen);
|
|
119
121
|
//# sourceMappingURL=PaymentScreen.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useCallback","useState","withBaseDispatchScreen","EntityCode","ExecutionTaskID","CompletePaymentET","InitPaymentET","ProcessPaymentET","DispatchStateContainer","RouteParams","View","getBaseETResponse","getEntityCodeByET","CancelOrderDialog","getEventCodeByET","useEffect","PaymentScreen","navigation","route","baseETProps","currentState","params","NEXT_STATES","nextState","showAlert","setShowAlert","sResponse","setResponse","submitOutput","etOutput","getInstance","navigateToNextTask","success","taskId","INIT_PAYMENT","flex","data","input","_prevState","value","PROCESS_PAYMENT","_input","paymentMode","isMounted","baseData","collectedAmount","amount","transactionId","tenantTransactionId","etOut","COMPLETE_PAYMENT"],"sources":["PaymentScreen.tsx"],"sourcesContent":["import React, { useCallback, useState } from 'react';\nimport withBaseDispatchScreen from './WithBaseDispatchScreen';\nimport type { BaseETProps } from '../../models/DispatchModels';\nimport type { state } from 'mobile-execution-lib';\nimport { EntityCode, ExecutionTaskID } from '../../models/execTasks/ETConfig';\nimport {\n CompletePaymentET,\n InitPaymentET,\n ProcessPaymentET,\n} from '../../components/executiontasks/ExecutionTasksIndex';\nimport DispatchStateContainer from '../../manager/dispatch/DispatchStateContainer';\nimport { RouteParams } from '../uiConfig/RouteParams';\nimport { View } from 'react-native';\nimport {\n getBaseETResponse,\n getEntityCodeByET,\n} from '../../utils/ExecTaskUtils';\nimport CancelOrderDialog from '../../components/widgets/CancelOrderDialog';\nimport { getEventCodeByET } from '../../manager/dispatchCodes/EventCodeContainer';\nimport { useEffect } from 'react';\n\nconst PaymentScreen = ({\n navigation,\n route,\n baseETProps,\n}: {\n route: any;\n navigation: any;\n baseETProps: BaseETProps;\n}) => {\n let currentState: state = route.params[RouteParams.NEXT_STATES][0]\n .nextState as state;\n const [showAlert, setShowAlert] = useState(false);\n const [sResponse, setResponse] = useState<any>();\n\n const submitOutput = useCallback(\n async (etOutput: any) => {\n await DispatchStateContainer.getInstance().navigateToNextTask(\n navigation,\n route,\n etOutput,\n etOutput.success,\n getEntityCodeByET(currentState.taskId),\n currentState.taskId,\n baseETProps,\n false\n );\n },\n [baseETProps, currentState.taskId, navigation, route]\n );\n\n if (currentState.taskId === ExecutionTaskID.INIT_PAYMENT) {\n return (\n <View style={{ flex: 1 }}>\n <InitPaymentET\n {...route.params[RouteParams.NEXT_STATES][0].nextState.data.input}\n onSubmitET={async (etOutput) => {\n if (etOutput.success) {\n await submitOutput(etOutput);\n } else {\n setResponse((_prevState: any) => {\n setShowAlert(true);\n return etOutput;\n });\n }\n }}\n />\n <CancelOrderDialog\n visible={showAlert}\n onSubmit={async (value) => {\n if (value) {\n setShowAlert(false);\n await submitOutput(sResponse);\n } else {\n setShowAlert(false);\n }\n }}\n />\n </View>\n );\n } else if (currentState.taskId === ExecutionTaskID.PROCESS_PAYMENT) {\n let _input = route.params[RouteParams.NEXT_STATES][0].nextState.data.input;\n if (_input?.paymentMode === 'CASH') {\n useEffect(() => {\n let isMounted = true;\n (async () => {\n if (isMounted) {\n const baseData = await getBaseETResponse(\n EntityCode.PROCESS_PAYMENT,\n true,\n getEventCodeByET(ExecutionTaskID.PROCESS_PAYMENT, true),\n ''\n );\n _input = {\n paymentMode: _input.paymentMode,\n collectedAmount: _input.amount,\n transactionId: _input.transactionId,\n tenantTransactionId: _input.transactionId,\n ...baseData,\n };\n await submitOutput(_input);\n }\n })();\n return () => {\n isMounted = false;\n };\n }, []);\n return <></>;\n } else\n return (\n <View style={{ flex: 1 }}>\n <ProcessPaymentET\n {...route.params[RouteParams.NEXT_STATES][0].nextState.data.input}\n onSubmitET={async (etOutput) => {\n if (etOutput.success) {\n await submitOutput(etOutput);\n } else {\n setResponse((_prevState: any) => {\n setShowAlert(true);\n return etOutput;\n });\n }\n }}\n />\n <CancelOrderDialog\n visible={showAlert}\n onSubmit={async (value) => {\n if (value) {\n setShowAlert(false);\n await submitOutput(sResponse);\n } else {\n setShowAlert(false);\n }\n }}\n />\n </View>\n );\n } else {\n return (\n <CompletePaymentET\n {...route.params[RouteParams.NEXT_STATES][0].nextState.data.input}\n onSubmitET={async (etOut) => {\n await DispatchStateContainer.getInstance().navigateToNextTask(\n navigation,\n route,\n etOut,\n etOut.success,\n EntityCode.COMPLETE_PAYMENT,\n ExecutionTaskID.COMPLETE_PAYMENT,\n baseETProps,\n false\n );\n }}\n />\n );\n }\n};\n\nexport default withBaseDispatchScreen(PaymentScreen);\n"],"mappings":";;AAAA,OAAOA,K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AW,CAACa,WAAzB,EAAsC,CAAtC,EAAyCC,SAAzC,CAAmDa,IAAnD,CAAwDC,KAD9D;MAEE,UAAU,EAAE,MAAOY,KAAP,IAAiB;QAC3B,MAAMzC,sBAAsB,CAACsB,WAAvB,GAAqCC,kBAArC,CACJd,UADI,EAEJC,KAFI,EAGJ+B,KAHI,EAIJA,KAAK,CAACjB,OAJF,EAKJ7B,UAAU,CAAC+C,gBALP,EAMJ9C,eAAe,CAAC8C,gBANZ,EAOJ/B,WAPI,EAQJ,KARI,CAAN;MAUD;IAbH,GADF;EAiBD;AACF,CAvID;;AAyIA,eAAejB,sBAAsB,CAACc,aAAD,CAArC"}
|
|
1
|
+
{"version":3,"names":["React","useCallback","useState","withBaseDispatchScreen","EntityCode","ExecutionTaskID","CompletePaymentET","InitPaymentET","ProcessPaymentET","DispatchStateContainer","RouteParams","View","getBaseETResponse","getEntityCodeByET","onTaskStart","CancelOrderDialog","getEventCodeByET","useEffect","PaymentScreen","_ref","navigation","route","baseETProps","params","NEXT_STATES","currentState","nextState","showAlert","setShowAlert","sResponse","setResponse","submitOutput","etOutput","getInstance","navigateToNextTask","success","taskId","INIT_PAYMENT","createElement","style","flex","_extends","data","input","taskMeta","JSON","parse","onSubmitET","_prevState","visible","onSubmit","value","PROCESS_PAYMENT","_input2","_input","paymentMode","isMounted","_input$applicableReas","baseData","applicableReasons","collectedAmount","amount","transactionId","tenantTransactionId","Fragment","etOut","COMPLETE_PAYMENT"],"sources":["PaymentScreen.tsx"],"sourcesContent":["import React, { useCallback, useState } from 'react';\nimport withBaseDispatchScreen from './WithBaseDispatchScreen';\nimport type { BaseETProps } from '../../models/DispatchModels';\nimport type { state } from '@os1-platform/mobile-execution-lib';\nimport { EntityCode, ExecutionTaskID } from '../../models/execTasks/ETConfig';\nimport {\n CompletePaymentET,\n InitPaymentET,\n ProcessPaymentET,\n} from '../../components/executiontasks/ExecutionTasksIndex';\nimport DispatchStateContainer from '../../manager/dispatch/DispatchStateContainer';\nimport { RouteParams } from '../uiConfig/RouteParams';\nimport { View } from 'react-native';\nimport {\n getBaseETResponse,\n getEntityCodeByET,\n onTaskStart,\n} from '../../utils/ExecTaskUtils';\nimport CancelOrderDialog from '../../components/widgets/CancelOrderDialog';\nimport { getEventCodeByET } from '../../manager/dispatchCodes/EventCodeContainer';\nimport { useEffect } from 'react';\n\nconst PaymentScreen = ({\n navigation,\n route,\n baseETProps,\n}: {\n route: any;\n navigation: any;\n baseETProps: BaseETProps;\n}) => {\n useEffect(() => {\n onTaskStart(route.params[RouteParams.NEXT_STATES]);\n }, []);\n let currentState: state = route.params[RouteParams.NEXT_STATES][0]\n .nextState as state;\n const [showAlert, setShowAlert] = useState(false);\n const [sResponse, setResponse] = useState<any>();\n\n const submitOutput = useCallback(\n async (etOutput: any) => {\n await DispatchStateContainer.getInstance().navigateToNextTask(\n navigation,\n route,\n etOutput,\n etOutput.success,\n getEntityCodeByET(currentState.taskId),\n currentState.taskId,\n baseETProps,\n false\n );\n },\n [baseETProps, currentState.taskId, navigation, route]\n );\n\n if (currentState.taskId === ExecutionTaskID.INIT_PAYMENT) {\n return (\n <View style={{ flex: 1 }}>\n <InitPaymentET\n {...route.params[RouteParams.NEXT_STATES][0].nextState.data.input}\n navigation={navigation}\n taskMeta={JSON.parse(\n route.params[RouteParams.NEXT_STATES][0].nextState.data.taskMeta ||\n '{}'\n )}\n onSubmitET={async (etOutput) => {\n if (etOutput.success) {\n await submitOutput(etOutput);\n } else {\n setResponse((_prevState: any) => {\n setShowAlert(true);\n return etOutput;\n });\n }\n }}\n />\n <CancelOrderDialog\n visible={showAlert}\n onSubmit={async (value) => {\n if (value) {\n setShowAlert(false);\n await submitOutput(sResponse);\n } else {\n setShowAlert(false);\n }\n }}\n />\n </View>\n );\n } else if (currentState.taskId === ExecutionTaskID.PROCESS_PAYMENT) {\n let _input = route.params[RouteParams.NEXT_STATES][0].nextState.data.input;\n if (_input?.paymentMode === 'CASH') {\n useEffect(() => {\n let isMounted = true;\n (async () => {\n if (isMounted) {\n const baseData = await getBaseETResponse(\n EntityCode.PROCESS_PAYMENT,\n true,\n getEventCodeByET(\n ExecutionTaskID.PROCESS_PAYMENT,\n true,\n _input.applicableReasons?.success\n ),\n ''\n );\n _input = {\n paymentMode: _input.paymentMode,\n collectedAmount: _input.amount,\n transactionId: _input.transactionId,\n tenantTransactionId: _input.transactionId,\n ...baseData,\n };\n await submitOutput(_input);\n }\n })();\n return () => {\n isMounted = false;\n };\n }, []);\n return <></>;\n } else\n return (\n <View style={{ flex: 1 }}>\n <ProcessPaymentET\n {...route.params[RouteParams.NEXT_STATES][0].nextState.data.input}\n navigation={navigation}\n taskMeta={JSON.parse(\n route.params[RouteParams.NEXT_STATES][0].nextState.data\n .taskMeta || '{}'\n )}\n onSubmitET={async (etOutput) => {\n if (etOutput.success) {\n await submitOutput(etOutput);\n } else {\n setResponse((_prevState: any) => {\n setShowAlert(true);\n return etOutput;\n });\n }\n }}\n />\n <CancelOrderDialog\n visible={showAlert}\n onSubmit={async (value) => {\n if (value) {\n setShowAlert(false);\n await submitOutput(sResponse);\n } else {\n setShowAlert(false);\n }\n }}\n />\n </View>\n );\n } else {\n return (\n <CompletePaymentET\n {...route.params[RouteParams.NEXT_STATES][0].nextState.data.input}\n navigation={navigation}\n taskMeta={JSON.parse(\n route.params[RouteParams.NEXT_STATES][0].nextState.data.taskMeta ||\n '{}'\n )}\n onSubmitET={async (etOut) => {\n await DispatchStateContainer.getInstance().navigateToNextTask(\n navigation,\n route,\n etOut,\n etOut.success,\n EntityCode.COMPLETE_PAYMENT,\n ExecutionTaskID.COMPLETE_PAYMENT,\n baseETProps,\n false\n );\n }}\n />\n );\n }\n};\n\nexport default withBaseDispatchScreen(PaymentScreen);\n"],"mappings":";AAAA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,QAAQ,QAAQ,OAAO;AACpD,OAAOC,sBAAsB,MAAM,0BAA0B;AAG7D,SAASC,UAAU,EAAEC,eAAe,QAAQ,iCAAiC;AAC7E,S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ACL4C,KAAK,EACLA,KAAK,CAAC9B,OAAO,EACb/B,UAAU,CAAC8D,gBAAgB,EAC3B7D,eAAe,CAAC6D,gBAAgB,EAChC5C,WAAW,EACX,KAAK,CACN;MACH;IAAE,GACF;EAEN;AACF,CAAC;AAED,eAAenB,sBAAsB,CAACe,aAAa,CAAC"}
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
|
-
import React from 'react';
|
|
2
|
+
import React, { useEffect } from 'react';
|
|
4
3
|
import withBaseDispatchScreen from './WithBaseDispatchScreen';
|
|
5
4
|
import { EntityCode, ExecutionTaskID } from '../../models/execTasks/ETConfig';
|
|
6
5
|
import DispatchStateContainer from '../../manager/dispatch/DispatchStateContainer';
|
|
7
6
|
import SLPickupET from '../../components/executiontasks/pickup/SLPickupET';
|
|
8
7
|
import { RouteParams } from '../uiConfig/RouteParams';
|
|
9
|
-
|
|
8
|
+
import { onTaskStart } from '../../utils/ExecTaskUtils';
|
|
10
9
|
const PickupScreen = _ref => {
|
|
11
10
|
var _route$params$RoutePa, _route$params$RoutePa2;
|
|
12
|
-
|
|
13
11
|
let {
|
|
14
12
|
route,
|
|
15
13
|
navigation,
|
|
16
14
|
baseETProps
|
|
17
15
|
} = _ref;
|
|
16
|
+
useEffect(() => {
|
|
17
|
+
onTaskStart(route.params[RouteParams.NEXT_STATES]);
|
|
18
|
+
}, []);
|
|
18
19
|
const length = route.params[RouteParams.NEXT_STATES].length;
|
|
19
20
|
const items = length === 1 ? route.params[RouteParams.NEXT_STATES][0].nextState.data.input.items : [];
|
|
20
21
|
const message = route === null || route === void 0 ? void 0 : (_route$params$RoutePa = route.params[RouteParams.NEXT_STATES][0].nextState.data) === null || _route$params$RoutePa === void 0 ? void 0 : (_route$params$RoutePa2 = _route$params$RoutePa.input) === null || _route$params$RoutePa2 === void 0 ? void 0 : _route$params$RoutePa2.message;
|
|
@@ -22,11 +23,12 @@ const PickupScreen = _ref => {
|
|
|
22
23
|
message: message,
|
|
23
24
|
items: items,
|
|
24
25
|
pickupCount: length,
|
|
26
|
+
navigation: navigation,
|
|
27
|
+
taskMeta: JSON.parse(route.params[RouteParams.NEXT_STATES][0].nextState.data.taskMeta || '{}'),
|
|
25
28
|
onSubmitET: async pickupOutput => {
|
|
26
29
|
await DispatchStateContainer.getInstance().navigateToNextTask(navigation, route, pickupOutput, pickupOutput.success, EntityCode.PICKUP, ExecutionTaskID.PICKUP, baseETProps, false);
|
|
27
30
|
}
|
|
28
31
|
}));
|
|
29
32
|
};
|
|
30
|
-
|
|
31
33
|
export default withBaseDispatchScreen(PickupScreen);
|
|
32
34
|
//# sourceMappingURL=PickupScreen.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","withBaseDispatchScreen","EntityCode","ExecutionTaskID","DispatchStateContainer","SLPickupET","RouteParams","PickupScreen","route","navigation","baseETProps","
|
|
1
|
+
{"version":3,"names":["React","useEffect","withBaseDispatchScreen","EntityCode","ExecutionTaskID","DispatchStateContainer","SLPickupET","RouteParams","onTaskStart","PickupScreen","_ref","_route$params$RoutePa","_route$params$RoutePa2","route","navigation","baseETProps","params","NEXT_STATES","length","items","nextState","data","input","message","createElement","_extends","pickupCount","taskMeta","JSON","parse","onSubmitET","pickupOutput","getInstance","navigateToNextTask","success","PICKUP"],"sources":["PickupScreen.tsx"],"sourcesContent":["import React, { useEffect } from 'react';\nimport withBaseDispatchScreen from './WithBaseDispatchScreen';\nimport type { BaseETProps } from '../../models/DispatchModels';\nimport { EntityCode, ExecutionTaskID } from '../../models/execTasks/ETConfig';\nimport DispatchStateContainer from '../../manager/dispatch/DispatchStateContainer';\nimport SLPickupET from '../../components/executiontasks/pickup/SLPickupET';\nimport { RouteParams } from '../uiConfig/RouteParams';\nimport { onTaskStart } from '../../utils/ExecTaskUtils';\n\nconst PickupScreen = ({\n route,\n navigation,\n baseETProps,\n}: {\n route: any;\n navigation: any;\n baseETProps: BaseETProps;\n}) => {\n useEffect(() => {\n onTaskStart(route.params[RouteParams.NEXT_STATES]);\n }, []);\n const length = route.params[RouteParams.NEXT_STATES].length;\n const items =\n length === 1\n ? route.params[RouteParams.NEXT_STATES][0].nextState.data.input.items\n : [];\n const message =\n route?.params[RouteParams.NEXT_STATES][0].nextState.data?.input?.message;\n\n return (\n <SLPickupET\n {...route.params[RouteParams.NEXT_STATES][0].nextState.data.input}\n message={message}\n items={items}\n pickupCount={length}\n navigation={navigation}\n taskMeta={JSON.parse(\n route.params[RouteParams.NEXT_STATES][0].nextState.data.taskMeta || '{}'\n )}\n onSubmitET={async (pickupOutput) => {\n await DispatchStateContainer.getInstance().navigateToNextTask(\n navigation,\n route,\n pickupOutput,\n pickupOutput.success,\n EntityCode.PICKUP,\n ExecutionTaskID.PICKUP,\n baseETProps,\n false\n );\n }}\n />\n );\n};\nexport default withBaseDispatchScreen(PickupScreen);\n"],"mappings":";AAAA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,OAAOC,sBAAsB,MAAM,0BAA0B;AAE7D,SAASC,UAAU,EAAEC,eAAe,QAAQ,iCAAiC;AAC7E,OAAOC,sBAAsB,MAAM,+CAA+C;AAClF,OAAOC,UAAU,MAAM,mDAAmD;AAC1E,SAASC,WAAW,QAAQ,yBAAyB;AACrD,SAASC,WAAW,QAAQ,2BAA2B;AAEvD,MAAMC,YAAY,GAAGC,IAAA,IAQf;EAAA,IAAAC,qBAAA,EAAAC,sBAAA;EAAA,IARgB;IACpBC,KAAK;IACLC,UAAU;IACVC;EAKF,CAAC,GAAAL,IAAA;EACCT,SAAS,CAAC,MAAM;IACdO,WAAW,CAACK,KAAK,CAACG,MAAM,CAACT,WAAW,CAACU,WAAW,CAAC,CAAC;EACpD,CAAC,EAAE,EAAE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