@os1-platform/dispatch-mobile 1.0.8 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +310 -74
- package/android/.gradle/7.0.2/fileChanges/last-build.bin +0 -0
- package/android/.gradle/7.0.2/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/7.0.2/gc.properties +0 -0
- package/android/.gradle/7.2/dependencies-accessors/dependencies-accessors.lock +0 -0
- package/android/.gradle/7.2/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/7.2/executionHistory/executionHistory.bin +0 -0
- package/android/.gradle/7.2/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/7.2/fileChanges/last-build.bin +0 -0
- package/android/.gradle/7.2/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/7.2/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/7.2/fileHashes/resourceHashesCache.bin +0 -0
- package/android/.gradle/7.2/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
- package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
- package/android/.gradle/checksums/checksums.lock +0 -0
- package/android/.gradle/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/checksums/sha1-checksums.bin +0 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/.idea/compiler.xml +6 -0
- package/android/.idea/gradle.xml +18 -0
- package/android/.idea/jarRepositories.xml +35 -0
- package/android/.idea/kotlinc.xml +6 -0
- package/android/.idea/misc.xml +9 -0
- package/android/.idea/vcs.xml +6 -0
- package/android/gradle.properties +1 -1
- package/android/local.properties +8 -0
- package/android/src/main/AndroidManifest.xml +0 -1
- package/android/src/main/java/com/dispatchsdk/DispatchSdkPackage.kt +3 -1
- package/android/src/main/java/com/dispatchsdk/sharedPref/SharedPreferenceModule.kt +166 -0
- package/lib/commonjs/@types/assets/index.d.js +2 -0
- package/lib/commonjs/@types/assets/index.d.js.map +1 -0
- package/lib/commonjs/components/dispatch/DispatchExecNavigator.js +50 -43
- package/lib/commonjs/components/dispatch/DispatchExecNavigator.js.map +1 -1
- package/lib/commonjs/components/executiontasks/ExecutionTasksIndex.js +10 -48
- 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 +66 -18
- package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js.map +1 -1
- package/lib/commonjs/components/executiontasks/captureInput/utils.js +13 -0
- package/lib/commonjs/components/executiontasks/captureInput/utils.js.map +1 -0
- 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/DeliverETInput.js.map +1 -1
- package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js +212 -95
- package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/display/DisplayModalET.js +16 -25
- package/lib/commonjs/components/executiontasks/display/DisplayModalET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/doodle/SignatureET.js +65 -29
- 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 +74 -30
- package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/FormGenerator.js +139 -50
- 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 +2 -17
- 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 +5 -14
- package/lib/commonjs/components/executiontasks/httpRequest/HttpEtUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/httpRequest/HttpRequestET.js +3 -15
- 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 +11 -36
- package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js +73 -48
- 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 +76 -29
- 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 +138 -32
- package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/ScanET.js +741 -0
- package/lib/commonjs/components/executiontasks/scan/ScanET.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/ScanSchema.js +19 -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 +43 -0
- package/lib/commonjs/components/executiontasks/scan/interfaces.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/modalConstant.js +104 -0
- package/lib/commonjs/components/executiontasks/scan/modalConstant.js.map +1 -0
- package/lib/commonjs/components/executiontasks/{scanner → scan/sub_components}/CScanner.js +9 -29
- package/lib/commonjs/components/executiontasks/scan/sub_components/CScanner.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/DropDownUtils.js +109 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/DropDownUtils.js.map +1 -0
- package/lib/commonjs/components/executiontasks/{scanner/returns/ReasonDropDown.js → scan/sub_components/ERDropDown.js} +72 -55
- package/lib/commonjs/components/executiontasks/scan/sub_components/ERDropDown.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/SummaryPage.js +1099 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/SummaryPage.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/utils.js +762 -0
- package/lib/commonjs/components/executiontasks/scan/utils.js.map +1 -0
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPET.js +333 -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 +63 -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/executiontasks/verifyOtp/VerifyOtpSchema.js.map +1 -1
- package/lib/commonjs/components/utils/index.js +14 -0
- package/lib/commonjs/components/utils/index.js.map +1 -0
- 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/Card.js +88 -0
- package/lib/commonjs/components/widgets/Card.js.map +1 -0
- package/lib/commonjs/components/widgets/GoBackModal.js +48 -0
- package/lib/commonjs/components/widgets/GoBackModal.js.map +1 -0
- package/lib/commonjs/components/widgets/IconButton.js +34 -0
- package/lib/commonjs/components/widgets/IconButton.js.map +1 -0
- package/lib/commonjs/components/widgets/ModalWidget.js +99 -0
- package/lib/commonjs/components/widgets/ModalWidget.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/SearchBar.js +74 -0
- package/lib/commonjs/components/widgets/SearchBar.js.map +1 -0
- package/lib/commonjs/components/widgets/SnackBarCustom.js +48 -40
- 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/TabsComponent.js +64 -0
- package/lib/commonjs/components/widgets/TabsComponent.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 +17 -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 +23 -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 +15 -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 +40 -35
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/manager/dispatch/DispatchStateContainer.js +328 -272
- 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 +23 -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 +23 -37
- 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/sdk/callbacksHandler.js +26 -0
- package/lib/commonjs/manager/sdk/callbacksHandler.js.map +1 -0
- package/lib/commonjs/manager/syncmanager/AppSyncManager.js +26 -46
- package/lib/commonjs/manager/syncmanager/AppSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/DBConfig.js +48 -9
- 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/constants.js +17 -0
- package/lib/commonjs/manager/syncmanager/constants.js.map +1 -0
- 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 +11 -36
- package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentManager.js +8 -26
- package/lib/commonjs/manager/syncmanager/document/DocumentManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js +19 -58
- package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/events/ETEventsManager.js +414 -29
- package/lib/commonjs/manager/syncmanager/events/ETEventsManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/events/EventsSyncManager.js +208 -103
- package/lib/commonjs/manager/syncmanager/events/EventsSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/events/SyncHttpClient.js +157 -36
- 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 +4 -0
- 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 +10 -8
- package/lib/commonjs/styles/SdkColors.js.map +1 -1
- package/lib/commonjs/styles/executionTasks/CommonStyles.js +58 -25
- package/lib/commonjs/styles/executionTasks/CommonStyles.js.map +1 -1
- package/lib/commonjs/ui/screens/CancellationScreen.js +67 -27
- package/lib/commonjs/ui/screens/CancellationScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/CaptureInputScreen.js +15 -16
- package/lib/commonjs/ui/screens/CaptureInputScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/CompleteObjectiveScreen.js +11 -23
- package/lib/commonjs/ui/screens/CompleteObjectiveScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DeliverScreen.js +30 -17
- package/lib/commonjs/ui/screens/DeliverScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DisplayScreen.js +17 -13
- package/lib/commonjs/ui/screens/DisplayScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DoodleScreen.js +17 -20
- package/lib/commonjs/ui/screens/DoodleScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DropCashScreen.js +43 -31
- package/lib/commonjs/ui/screens/DropCashScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ETScreensIndex.js +10 -19
- package/lib/commonjs/ui/screens/ETScreensIndex.js.map +1 -1
- package/lib/commonjs/ui/screens/FormsScreen.js +105 -17
- package/lib/commonjs/ui/screens/FormsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/GeofenceScreen.js +16 -14
- package/lib/commonjs/ui/screens/GeofenceScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HttpRequestScreen.js +14 -11
- package/lib/commonjs/ui/screens/HttpRequestScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ImageCaptureScreen.js +38 -17
- package/lib/commonjs/ui/screens/ImageCaptureScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PaymentScreen.js +28 -29
- package/lib/commonjs/ui/screens/PaymentScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PickupScreen.js +41 -19
- package/lib/commonjs/ui/screens/PickupScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ScanScreen.js +121 -0
- package/lib/commonjs/ui/screens/ScanScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/StartWorkFlowScreen.js +64 -38
- package/lib/commonjs/ui/screens/StartWorkFlowScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ValidateOTPScreen.js +55 -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 +24 -1
- package/lib/commonjs/ui/uiConfig/RouteParams.js.map +1 -1
- package/lib/commonjs/utils/ApiUtils.js +129 -0
- package/lib/commonjs/utils/ApiUtils.js.map +1 -0
- package/lib/commonjs/utils/ExecTaskUtils.js +111 -41
- 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 +61 -43
- package/lib/commonjs/utils/SyncManagerUtils.js.map +1 -1
- package/lib/commonjs/utils/fcm/FCM.js +59 -11
- package/lib/commonjs/utils/fcm/FCM.js.map +1 -1
- package/lib/commonjs/utils/fcm/FcmUtils.js +82 -21
- 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/useModal.js +53 -0
- package/lib/commonjs/utils/hooks/useModal.js.map +1 -0
- 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 +87 -31
- 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/@types/assets/index.d.js +2 -0
- package/lib/module/@types/assets/index.d.js.map +1 -0
- package/lib/module/components/dispatch/DispatchExecNavigator.js +50 -32
- package/lib/module/components/dispatch/DispatchExecNavigator.js.map +1 -1
- package/lib/module/components/executiontasks/ExecutionTasksIndex.js +3 -5
- 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 +68 -10
- package/lib/module/components/executiontasks/captureInput/CaptureText.js.map +1 -1
- package/lib/module/components/executiontasks/captureInput/utils.js +7 -0
- package/lib/module/components/executiontasks/captureInput/utils.js.map +1 -0
- 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/DeliverETInput.js.map +1 -1
- package/lib/module/components/executiontasks/deliver/SLDeliverET.js +214 -86
- package/lib/module/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
- package/lib/module/components/executiontasks/display/DisplayModalET.js +16 -15
- package/lib/module/components/executiontasks/display/DisplayModalET.js.map +1 -1
- package/lib/module/components/executiontasks/doodle/SignatureET.js +68 -15
- 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 +75 -20
- package/lib/module/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
- package/lib/module/components/executiontasks/forms/FormGenerator.js +142 -37
- 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 +2 -6
- 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 +6 -4
- package/lib/module/components/executiontasks/httpRequest/HttpEtUtils.js.map +1 -1
- package/lib/module/components/executiontasks/httpRequest/HttpRequestET.js +3 -6
- 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 +11 -11
- 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 +77 -18
- package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
- package/lib/module/components/executiontasks/payments/init/InitPaymentET.js +64 -11
- package/lib/module/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
- package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentET.js +72 -11
- 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 +141 -25
- package/lib/module/components/executiontasks/pickup/SLPickupET.js.map +1 -1
- package/lib/module/components/executiontasks/scan/ScanET.js +732 -0
- package/lib/module/components/executiontasks/scan/ScanET.js.map +1 -0
- package/lib/module/components/executiontasks/scan/ScanSchema.js +17 -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 +33 -0
- package/lib/module/components/executiontasks/scan/interfaces.js.map +1 -0
- package/lib/module/components/executiontasks/scan/modalConstant.js +94 -0
- package/lib/module/components/executiontasks/scan/modalConstant.js.map +1 -0
- package/lib/module/components/executiontasks/{scanner → scan/sub_components}/CScanner.js +9 -16
- package/lib/module/components/executiontasks/scan/sub_components/CScanner.js.map +1 -0
- package/lib/module/components/executiontasks/scan/sub_components/DropDownUtils.js +101 -0
- package/lib/module/components/executiontasks/scan/sub_components/DropDownUtils.js.map +1 -0
- package/lib/module/components/executiontasks/scan/sub_components/ERDropDown.js +107 -0
- package/lib/module/components/executiontasks/scan/sub_components/ERDropDown.js.map +1 -0
- package/lib/module/components/executiontasks/scan/sub_components/SummaryPage.js +1092 -0
- package/lib/module/components/executiontasks/scan/sub_components/SummaryPage.js.map +1 -0
- package/lib/module/components/executiontasks/scan/utils.js +726 -0
- package/lib/module/components/executiontasks/scan/utils.js.map +1 -0
- package/lib/module/components/executiontasks/validateOTP/ValidateOTPET.js +324 -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 +53 -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 +5 -9
- package/lib/module/components/executiontasks/verifyOtp/VerifyOtpET.js.map +1 -1
- package/lib/module/components/executiontasks/verifyOtp/VerifyOtpSchema.js.map +1 -1
- package/lib/module/components/utils/index.js +8 -0
- package/lib/module/components/utils/index.js.map +1 -0
- 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/Card.js +80 -0
- package/lib/module/components/widgets/Card.js.map +1 -0
- package/lib/module/components/widgets/GoBackModal.js +40 -0
- package/lib/module/components/widgets/GoBackModal.js.map +1 -0
- package/lib/module/components/widgets/IconButton.js +26 -0
- package/lib/module/components/widgets/IconButton.js.map +1 -0
- package/lib/module/components/widgets/ModalWidget.js +92 -0
- package/lib/module/components/widgets/ModalWidget.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/SearchBar.js +66 -0
- package/lib/module/components/widgets/SearchBar.js.map +1 -0
- package/lib/module/components/widgets/SnackBarCustom.js +46 -20
- 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/TabsComponent.js +55 -0
- package/lib/module/components/widgets/TabsComponent.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 +9 -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 +16 -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 +8 -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 +9 -5
- package/lib/module/index.js.map +1 -1
- package/lib/module/manager/dispatch/DispatchStateContainer.js +334 -247
- 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 +22 -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 +23 -15
- 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/sdk/callbacksHandler.js +19 -0
- package/lib/module/manager/sdk/callbacksHandler.js.map +1 -0
- package/lib/module/manager/syncmanager/AppSyncManager.js +26 -26
- package/lib/module/manager/syncmanager/AppSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/DBConfig.js +41 -7
- 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/constants.js +6 -0
- package/lib/module/manager/syncmanager/constants.js.map +1 -0
- 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 +11 -24
- package/lib/module/manager/syncmanager/document/DocumentHttpClient.js.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentManager.js +8 -20
- package/lib/module/manager/syncmanager/document/DocumentManager.js.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentSyncManager.js +19 -41
- package/lib/module/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/events/ETEventsManager.js +415 -22
- package/lib/module/manager/syncmanager/events/ETEventsManager.js.map +1 -1
- package/lib/module/manager/syncmanager/events/EventsSyncManager.js +209 -82
- package/lib/module/manager/syncmanager/events/EventsSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/events/SyncHttpClient.js +152 -24
- 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 +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 +9 -7
- package/lib/module/styles/SdkColors.js.map +1 -1
- package/lib/module/styles/executionTasks/CommonStyles.js +57 -14
- package/lib/module/styles/executionTasks/CommonStyles.js.map +1 -1
- package/lib/module/ui/screens/CancellationScreen.js +68 -15
- package/lib/module/ui/screens/CancellationScreen.js.map +1 -1
- package/lib/module/ui/screens/CaptureInputScreen.js +17 -6
- package/lib/module/ui/screens/CaptureInputScreen.js.map +1 -1
- package/lib/module/ui/screens/CompleteObjectiveScreen.js +12 -8
- package/lib/module/ui/screens/CompleteObjectiveScreen.js.map +1 -1
- package/lib/module/ui/screens/DeliverScreen.js +32 -7
- package/lib/module/ui/screens/DeliverScreen.js.map +1 -1
- package/lib/module/ui/screens/DisplayScreen.js +16 -6
- package/lib/module/ui/screens/DisplayScreen.js.map +1 -1
- package/lib/module/ui/screens/DoodleScreen.js +19 -9
- package/lib/module/ui/screens/DoodleScreen.js.map +1 -1
- package/lib/module/ui/screens/DropCashScreen.js +45 -19
- package/lib/module/ui/screens/DropCashScreen.js.map +1 -1
- package/lib/module/ui/screens/ETScreensIndex.js +3 -2
- package/lib/module/ui/screens/ETScreensIndex.js.map +1 -1
- package/lib/module/ui/screens/FormsScreen.js +104 -9
- package/lib/module/ui/screens/FormsScreen.js.map +1 -1
- package/lib/module/ui/screens/GeofenceScreen.js +15 -6
- package/lib/module/ui/screens/GeofenceScreen.js.map +1 -1
- package/lib/module/ui/screens/HttpRequestScreen.js +15 -5
- package/lib/module/ui/screens/HttpRequestScreen.js.map +1 -1
- package/lib/module/ui/screens/ImageCaptureScreen.js +37 -9
- package/lib/module/ui/screens/ImageCaptureScreen.js.map +1 -1
- package/lib/module/ui/screens/PaymentScreen.js +30 -17
- package/lib/module/ui/screens/PaymentScreen.js.map +1 -1
- package/lib/module/ui/screens/PickupScreen.js +40 -12
- package/lib/module/ui/screens/PickupScreen.js.map +1 -1
- package/lib/module/ui/screens/ScanScreen.js +111 -0
- package/lib/module/ui/screens/ScanScreen.js.map +1 -0
- package/lib/module/ui/screens/StartWorkFlowScreen.js +64 -16
- package/lib/module/ui/screens/StartWorkFlowScreen.js.map +1 -1
- package/lib/module/ui/screens/ValidateOTPScreen.js +45 -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 +23 -1
- package/lib/module/ui/uiConfig/RouteParams.js.map +1 -1
- package/lib/module/utils/ApiUtils.js +116 -0
- package/lib/module/utils/ApiUtils.js.map +1 -0
- package/lib/module/utils/ExecTaskUtils.js +110 -31
- 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 +62 -14
- package/lib/module/utils/SyncManagerUtils.js.map +1 -1
- package/lib/module/utils/fcm/FCM.js +63 -3
- package/lib/module/utils/fcm/FCM.js.map +1 -1
- package/lib/module/utils/fcm/FcmUtils.js +86 -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/useModal.js +43 -0
- package/lib/module/utils/hooks/useModal.js.map +1 -0
- 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 +86 -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/dispatch/DispatchExecNavigator.d.ts +2 -2
- package/lib/typescript/components/executiontasks/CompletedWFSchema.d.ts +2 -2
- package/lib/typescript/components/executiontasks/ExecutionTasksIndex.d.ts +6 -7
- package/lib/typescript/components/executiontasks/cancellation/CancelET.d.ts +2 -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/captureInput/CaptureText.d.ts +2 -2
- package/lib/typescript/components/executiontasks/captureInput/utils.d.ts +1 -0
- package/lib/typescript/components/executiontasks/deliver/DeliverET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/deliver/DeliverETInput.d.ts +8 -7
- package/lib/typescript/components/executiontasks/deliver/SLDeliverET.d.ts +3 -3
- package/lib/typescript/components/executiontasks/display/DisplayModalET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/display/DisplaySchema.d.ts +5 -5
- package/lib/typescript/components/executiontasks/doodle/SignatureET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/doodle/SignatureSchema.d.ts +7 -7
- package/lib/typescript/components/executiontasks/dropCash/DropCashET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/dropCash/DropCashSchema.d.ts +2 -2
- package/lib/typescript/components/executiontasks/dropCash/SLDropCash.d.ts +2 -2
- package/lib/typescript/components/executiontasks/forms/FormGenerator.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 +3 -3
- package/lib/typescript/components/executiontasks/forms/widgets/DropdownWidget.d.ts +9 -0
- package/lib/typescript/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.d.ts +2 -2
- package/lib/typescript/components/executiontasks/forms/widgets/TimeRangeSelector.d.ts +2 -2
- package/lib/typescript/components/executiontasks/httpRequest/HttpEtUtils.d.ts +1 -1
- package/lib/typescript/components/executiontasks/httpRequest/HttpRequestET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/httpRequest/HttpRequestETSchema.d.ts +6 -6
- package/lib/typescript/components/executiontasks/imageCapture/CaptureSchema.d.ts +17 -11
- package/lib/typescript/components/executiontasks/imageCapture/ImageCapture.d.ts +2 -2
- package/lib/typescript/components/executiontasks/payments/completePayment/CompletePaymentET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/payments/completePayment/CompletePaymentSchema.d.ts +2 -2
- package/lib/typescript/components/executiontasks/payments/init/InitPaymentET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/payments/init/InitPaymentSchema.d.ts +3 -3
- package/lib/typescript/components/executiontasks/payments/processPayment/ProcessPaymentET.d.ts +2 -2
- 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/pickup/PickupET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/pickup/SLPickupET.d.ts +3 -3
- package/lib/typescript/components/executiontasks/scan/ScanET.d.ts +16 -0
- package/lib/typescript/components/executiontasks/scan/ScanSchema.d.ts +86 -0
- package/lib/typescript/components/executiontasks/scan/constants.d.ts +6 -0
- package/lib/typescript/components/executiontasks/scan/interfaces.d.ts +94 -0
- package/lib/typescript/components/executiontasks/scan/modalConstant.d.ts +37 -0
- package/lib/typescript/components/executiontasks/{scanner → scan/sub_components}/CScanner.d.ts +1 -1
- 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/SummaryPage.d.ts +21 -0
- package/lib/typescript/components/executiontasks/scan/utils.d.ts +37 -0
- 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/verifyLocation/VerifyLocationET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/verifyOtp/VerifyOtpET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/verifyOtp/VerifyOtpSchema.d.ts +6 -6
- package/lib/typescript/components/utils/index.d.ts +2 -0
- package/lib/typescript/components/widgets/CancelOrderDialog.d.ts +2 -2
- package/lib/typescript/components/widgets/Card.d.ts +17 -0
- package/lib/typescript/components/widgets/GoBackModal.d.ts +9 -0
- package/lib/typescript/components/widgets/IconButton.d.ts +9 -0
- package/lib/typescript/components/widgets/ModalWidget.d.ts +30 -0
- package/lib/typescript/components/widgets/ProgressDialog.d.ts +2 -2
- package/lib/typescript/components/widgets/SearchBar.d.ts +10 -0
- package/lib/typescript/components/widgets/SnackBarCustom.d.ts +10 -5
- package/lib/typescript/components/widgets/SplitTextInput.d.ts +12 -0
- package/lib/typescript/components/widgets/TabsComponent.d.ts +15 -0
- package/lib/typescript/constants/apiConstants.d.ts +7 -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 +3 -0
- package/lib/typescript/events/EventListener.d.ts +5 -0
- package/lib/typescript/events/constants.d.ts +7 -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 +12 -9
- package/lib/typescript/manager/dispatch/DispatchStateContainer.d.ts +38 -17
- 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 +0 -0
- package/lib/typescript/manager/sdk/DispatchSdkCache.d.ts +1 -0
- package/lib/typescript/manager/sdk/callbacksHandler.d.ts +13 -0
- package/lib/typescript/manager/syncmanager/AppSyncManager.d.ts +3 -1
- package/lib/typescript/manager/syncmanager/DBConfig.d.ts +80 -4
- package/lib/typescript/manager/syncmanager/constants.d.ts +5 -0
- package/lib/typescript/manager/syncmanager/database.d.ts +5 -0
- package/lib/typescript/manager/syncmanager/document/DocumentManager.d.ts +1 -1
- package/lib/typescript/manager/syncmanager/document/DocumentSyncManager.d.ts +1 -1
- package/lib/typescript/manager/syncmanager/document/models.d.ts +1 -1
- package/lib/typescript/manager/syncmanager/events/ETEventsManager.d.ts +15 -2
- package/lib/typescript/manager/syncmanager/events/EventsSyncManager.d.ts +4 -2
- package/lib/typescript/manager/syncmanager/events/SyncHttpClient.d.ts +6 -3
- package/lib/typescript/models/DispatchModels.d.ts +59 -5
- 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 +44 -20
- package/lib/typescript/models/execTasks/ETConfig.d.ts +8 -4
- package/lib/typescript/models/sdk.d.ts +12 -0
- package/lib/typescript/native/signature/SignatureCapture.d.ts +2 -2
- package/lib/typescript/network/NetworkUtils.d.ts +1 -5
- package/lib/typescript/styles/SdkColors.d.ts +2 -0
- package/lib/typescript/styles/executionTasks/CommonStyles.d.ts +50 -5
- package/lib/typescript/ui/screens/CancellationScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/CaptureInputScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/CompleteObjectiveScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/DeliverScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/DisplayScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/DoodleScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/DropCashScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/ETScreensIndex.d.ts +3 -2
- package/lib/typescript/ui/screens/FormsScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/GeofenceScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/HttpRequestScreen.d.ts +1 -1
- package/lib/typescript/ui/screens/ImageCaptureScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/PaymentScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/PickupScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/ScanScreen.d.ts +3 -0
- package/lib/typescript/ui/screens/StartWorkFlowScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/ValidateOTPScreen.d.ts +3 -0
- package/lib/typescript/ui/screens/WithBaseDispatchScreen.d.ts +2 -2
- package/lib/typescript/ui/uiConfig/RouteParams.d.ts +14 -0
- package/lib/typescript/utils/ApiUtils.d.ts +61 -0
- package/lib/typescript/utils/ExecTaskUtils.d.ts +10 -4
- package/lib/typescript/utils/NetworkUtil.d.ts +1 -1
- package/lib/typescript/utils/SyncManagerUtils.d.ts +4 -3
- package/lib/typescript/utils/hooks/useModal.d.ts +6 -0
- package/lib/typescript/utils/hooks/useTimer.d.ts +5 -0
- package/lib/typescript/utils/storage.d.ts +32 -0
- package/package.json +26 -26
- package/tsconfig.json +9 -9
- package/file_unzip.js +0 -5
- package/lib/commonjs/components/executiontasks/doodle/DoodleUtils.js +0 -28
- package/lib/commonjs/components/executiontasks/doodle/DoodleUtils.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/CScanner.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/ScannerSchema.js +0 -32
- package/lib/commonjs/components/executiontasks/scanner/ScannerSchema.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/ScannerUtils.js +0 -193
- package/lib/commonjs/components/executiontasks/scanner/ScannerUtils.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/DropDownSelector.js +0 -20
- package/lib/commonjs/components/executiontasks/scanner/returns/DropDownSelector.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/DropDownUtils.js +0 -49
- package/lib/commonjs/components/executiontasks/scanner/returns/DropDownUtils.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/RTReasonSelection.js +0 -107
- package/lib/commonjs/components/executiontasks/scanner/returns/RTReasonSelection.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/RTScan.js +0 -317
- package/lib/commonjs/components/executiontasks/scanner/returns/RTScan.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/ReasonDropDown.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/ScanList.js +0 -276
- package/lib/commonjs/components/executiontasks/scanner/returns/ScanList.js.map +0 -1
- package/lib/commonjs/ui/screens/RTScanScreen.js +0 -118
- package/lib/commonjs/ui/screens/RTScanScreen.js.map +0 -1
- package/lib/module/components/executiontasks/doodle/DoodleUtils.js +0 -19
- package/lib/module/components/executiontasks/doodle/DoodleUtils.js.map +0 -1
- package/lib/module/components/executiontasks/scanner/CScanner.js.map +0 -1
- package/lib/module/components/executiontasks/scanner/ScannerSchema.js +0 -24
- package/lib/module/components/executiontasks/scanner/ScannerSchema.js.map +0 -1
- package/lib/module/components/executiontasks/scanner/ScannerUtils.js +0 -158
- package/lib/module/components/executiontasks/scanner/ScannerUtils.js.map +0 -1
- package/lib/module/components/executiontasks/scanner/returns/DropDownSelector.js +0 -9
- package/lib/module/components/executiontasks/scanner/returns/DropDownSelector.js.map +0 -1
- package/lib/module/components/executiontasks/scanner/returns/DropDownUtils.js +0 -38
- package/lib/module/components/executiontasks/scanner/returns/DropDownUtils.js.map +0 -1
- package/lib/module/components/executiontasks/scanner/returns/RTReasonSelection.js +0 -86
- package/lib/module/components/executiontasks/scanner/returns/RTReasonSelection.js.map +0 -1
- package/lib/module/components/executiontasks/scanner/returns/RTScan.js +0 -287
- package/lib/module/components/executiontasks/scanner/returns/RTScan.js.map +0 -1
- package/lib/module/components/executiontasks/scanner/returns/ReasonDropDown.js +0 -80
- package/lib/module/components/executiontasks/scanner/returns/ReasonDropDown.js.map +0 -1
- package/lib/module/components/executiontasks/scanner/returns/ScanList.js +0 -253
- package/lib/module/components/executiontasks/scanner/returns/ScanList.js.map +0 -1
- package/lib/module/ui/screens/RTScanScreen.js +0 -93
- package/lib/module/ui/screens/RTScanScreen.js.map +0 -1
- package/lib/typescript/components/executiontasks/doodle/DoodleUtils.d.ts +0 -3
- package/lib/typescript/components/executiontasks/scanner/ScannerSchema.d.ts +0 -75
- package/lib/typescript/components/executiontasks/scanner/ScannerUtils.d.ts +0 -15
- package/lib/typescript/components/executiontasks/scanner/returns/DropDownSelector.d.ts +0 -3
- package/lib/typescript/components/executiontasks/scanner/returns/DropDownUtils.d.ts +0 -3
- package/lib/typescript/components/executiontasks/scanner/returns/RTReasonSelection.d.ts +0 -7
- package/lib/typescript/components/executiontasks/scanner/returns/RTScan.d.ts +0 -4
- package/lib/typescript/components/executiontasks/scanner/returns/ReasonDropDown.d.ts +0 -14
- package/lib/typescript/components/executiontasks/scanner/returns/ScanList.d.ts +0 -17
- package/lib/typescript/ui/screens/RTScanScreen.d.ts +0 -3
- package/mobile-execution-lib-0.6.4.tgz +0 -0
|
@@ -1,19 +1,30 @@
|
|
|
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 { DisplayModalET } from '../../components/executiontasks/ExecutionTasksIndex';
|
|
6
5
|
import { EntityCode, ExecutionTaskID } from '../../models/execTasks/ETConfig';
|
|
7
6
|
import DispatchStateContainer from '../../manager/dispatch/DispatchStateContainer';
|
|
8
|
-
import { RouteParams } from '../uiConfig/RouteParams';
|
|
9
|
-
|
|
7
|
+
import { RouteParams, getDataFromNextState } from '../uiConfig/RouteParams';
|
|
8
|
+
import { onTaskStart } from '../../utils/ExecTaskUtils';
|
|
10
9
|
const DisplayScreen = _ref => {
|
|
11
10
|
let {
|
|
12
11
|
route,
|
|
13
12
|
navigation,
|
|
14
13
|
baseETProps
|
|
15
14
|
} = _ref;
|
|
16
|
-
|
|
15
|
+
const nextState = route.params[RouteParams.NEXT_STATES];
|
|
16
|
+
const {
|
|
17
|
+
taskMeta,
|
|
18
|
+
mergedObjectiveId,
|
|
19
|
+
input,
|
|
20
|
+
wfMeta
|
|
21
|
+
} = getDataFromNextState(nextState);
|
|
22
|
+
useEffect(() => {
|
|
23
|
+
onTaskStart(nextState, route.params[RouteParams.ROOT_META_DATA].customEventsData);
|
|
24
|
+
}, []);
|
|
25
|
+
return /*#__PURE__*/React.createElement(DisplayModalET, _extends({}, input, {
|
|
26
|
+
mergedObjectiveId: mergedObjectiveId,
|
|
27
|
+
taskMeta: taskMeta,
|
|
17
28
|
positiveBtn: 'Submit',
|
|
18
29
|
showDialog: true,
|
|
19
30
|
negativeBtn: 'Cancel',
|
|
@@ -22,6 +33,5 @@ const DisplayScreen = _ref => {
|
|
|
22
33
|
}
|
|
23
34
|
}));
|
|
24
35
|
};
|
|
25
|
-
|
|
26
36
|
export default withBaseDispatchScreen(DisplayScreen);
|
|
27
37
|
//# sourceMappingURL=DisplayScreen.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","withBaseDispatchScreen","DisplayModalET","EntityCode","ExecutionTaskID","DispatchStateContainer","RouteParams","DisplayScreen","route","navigation","baseETProps","params","NEXT_STATES","
|
|
1
|
+
{"version":3,"names":["React","useEffect","withBaseDispatchScreen","DisplayModalET","EntityCode","ExecutionTaskID","DispatchStateContainer","RouteParams","getDataFromNextState","onTaskStart","DisplayScreen","_ref","route","navigation","baseETProps","nextState","params","NEXT_STATES","taskMeta","mergedObjectiveId","input","wfMeta","ROOT_META_DATA","customEventsData","createElement","_extends","positiveBtn","showDialog","negativeBtn","onSubmit","displayOutput","getInstance","navigateToNextTask","success","DISPLAY"],"sources":["DisplayScreen.tsx"],"sourcesContent":["import React, { useEffect } from 'react';\nimport withBaseDispatchScreen from './WithBaseDispatchScreen';\nimport { DisplayModalET } from '../../components/executiontasks/ExecutionTasksIndex';\nimport type { BaseETProps } from '../../models/DispatchModels';\nimport { EntityCode, ExecutionTaskID } from '../../models/execTasks/ETConfig';\nimport DispatchStateContainer from '../../manager/dispatch/DispatchStateContainer';\nimport { RouteParams, getDataFromNextState } from '../uiConfig/RouteParams';\nimport { onTaskStart } from '../../utils/ExecTaskUtils';\n\nconst DisplayScreen = ({\n route,\n navigation,\n baseETProps,\n}: {\n route: any;\n navigation: any;\n baseETProps: BaseETProps;\n}) => {\n const nextState = route.params[RouteParams.NEXT_STATES];\n const { taskMeta, mergedObjectiveId, input, wfMeta } =\n getDataFromNextState(nextState);\n useEffect(() => {\n onTaskStart(\n nextState,\n route.params[RouteParams.ROOT_META_DATA].customEventsData\n );\n }, []);\n return (\n <DisplayModalET\n {...input}\n mergedObjectiveId={mergedObjectiveId}\n taskMeta={taskMeta}\n positiveBtn={'Submit'}\n showDialog={true}\n negativeBtn={'Cancel'}\n onSubmit={async (displayOutput) => {\n await DispatchStateContainer.getInstance().navigateToNextTask(\n navigation,\n route,\n displayOutput,\n displayOutput.success,\n EntityCode.DISPLAY,\n ExecutionTaskID.DISPLAY,\n baseETProps,\n false\n );\n }}\n />\n );\n};\n\nexport default withBaseDispatchScreen(DisplayScreen);\n"],"mappings":";AAAA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,OAAOC,sBAAsB,MAAM,0BAA0B;AAC7D,SAASC,cAAc,QAAQ,qDAAqD;AAEpF,SAASC,UAAU,EAAEC,eAAe,QAAQ,iCAAiC;AAC7E,OAAOC,sBAAsB,MAAM,+CAA+C;AAClF,SAASC,WAAW,EAAEC,oBAAoB,QAAQ,yBAAyB;AAC3E,SAASC,WAAW,QAAQ,2BAA2B;AAEvD,MAAMC,aAAa,GAAGC,IAAA,IAQhB;EAAA,IARiB;IACrBC,KAAK;IACLC,UAAU;IACVC;EAKF,CAAC,GAAAH,IAAA;EACC,MAAMI,SAAS,GAAGH,KAAK,CAACI,MAAM,CAACT,WAAW,CAACU,WAAW,CAAC;EACvD,MAAM;IAAEC,QAAQ;IAAEC,iBAAiB;IAAEC,KAAK;IAAEC;EAAO,CAAC,GAClDb,oBAAoB,CAACO,SAAS,CAAC;EACjCd,SAAS,CAAC,MAAM;IACdQ,WAAW,CACTM,SAAS,EACTH,KAAK,CAACI,MAAM,CAACT,WAAW,CAACe,cAAc,CAAC,CAACC,gBAC3C,CAAC;EACH,CAAC,EAAE,EAAE,CAAC;EACN,oBACEvB,KAAA,CAAAwB,aAAA,CAACrB,cAAc,EAAAsB,QAAA,KACTL,KAAK;IACTD,iBAAiB,EAAEA,iBAAkB;IACrCD,QAAQ,EAAEA,QAAS;IACnBQ,WAAW,EAAE,QAAS;IACtBC,UAAU,EAAE,IAAK;IACjBC,WAAW,EAAE,QAAS;IACtBC,QAAQ,EAAE,MAAOC,aAAa,IAAK;MACjC,MAAMxB,sBAAsB,CAACyB,WAAW,CAAC,CAAC,CAACC,kBAAkB,CAC3DnB,UAAU,EACVD,KAAK,EACLkB,aAAa,EACbA,aAAa,CAACG,OAAO,EACrB7B,UAAU,CAAC8B,OAAO,EAClB7B,eAAe,CAAC6B,OAAO,EACvBpB,WAAW,EACX,KACF,CAAC;IACH;EAAE,EACH,CAAC;AAEN,CAAC;AAED,eAAeZ,sBAAsB,CAACQ,aAAa,CAAC"}
|
|
@@ -1,21 +1,29 @@
|
|
|
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 SignatureET from '../../components/executiontasks/doodle/SignatureET';
|
|
4
|
-
import React, { useCallback, useState } from 'react';
|
|
3
|
+
import React, { useCallback, useEffect, useState } from 'react';
|
|
5
4
|
import withBaseDispatchScreen from './WithBaseDispatchScreen';
|
|
6
5
|
import { EntityCode, ExecutionTaskID } from '../../models/execTasks/ETConfig';
|
|
7
6
|
import DispatchStateContainer from '../../manager/dispatch/DispatchStateContainer';
|
|
8
|
-
import { RouteParams } from '../uiConfig/RouteParams';
|
|
7
|
+
import { RouteParams, getDataFromNextState } from '../uiConfig/RouteParams';
|
|
9
8
|
import { View } from 'react-native';
|
|
10
9
|
import CancelOrderDialog from '../../components/widgets/CancelOrderDialog';
|
|
11
|
-
import {
|
|
12
|
-
|
|
10
|
+
import { onTaskStart } from '../../utils/ExecTaskUtils';
|
|
13
11
|
const DoodleScreen = _ref => {
|
|
14
12
|
let {
|
|
15
13
|
route,
|
|
16
14
|
navigation,
|
|
17
15
|
baseETProps
|
|
18
16
|
} = _ref;
|
|
17
|
+
const nextState = route.params[RouteParams.NEXT_STATES];
|
|
18
|
+
const {
|
|
19
|
+
taskMeta,
|
|
20
|
+
mergedObjectiveId,
|
|
21
|
+
input,
|
|
22
|
+
wfMeta
|
|
23
|
+
} = getDataFromNextState(nextState);
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
onTaskStart(nextState, route.params[RouteParams.ROOT_META_DATA].customEventsData);
|
|
26
|
+
}, []);
|
|
19
27
|
const [showAlert, setShowAlert] = useState(false);
|
|
20
28
|
const [sResponse, setResponse] = useState();
|
|
21
29
|
const submitOutput = useCallback(async base64Data => {
|
|
@@ -25,9 +33,12 @@ const DoodleScreen = _ref => {
|
|
|
25
33
|
style: {
|
|
26
34
|
flex: 1
|
|
27
35
|
}
|
|
28
|
-
}, /*#__PURE__*/React.createElement(SignatureET, _extends({},
|
|
29
|
-
jobIDs
|
|
30
|
-
objRefs
|
|
36
|
+
}, /*#__PURE__*/React.createElement(SignatureET, _extends({}, input, {
|
|
37
|
+
// jobIDs={getJobIDs(route.params[RouteParams.NEXT_STATES])}
|
|
38
|
+
// objRefs={getObjectiveRefs(route.params[RouteParams.NEXT_STATES])}
|
|
39
|
+
navigation: navigation,
|
|
40
|
+
taskMeta: taskMeta,
|
|
41
|
+
mergedObjectiveId: mergedObjectiveId,
|
|
31
42
|
onSubmitET: async base64Data => {
|
|
32
43
|
if (base64Data.success) {
|
|
33
44
|
await submitOutput(base64Data);
|
|
@@ -51,6 +62,5 @@ const DoodleScreen = _ref => {
|
|
|
51
62
|
}
|
|
52
63
|
}));
|
|
53
64
|
};
|
|
54
|
-
|
|
55
65
|
export default withBaseDispatchScreen(DoodleScreen);
|
|
56
66
|
//# sourceMappingURL=DoodleScreen.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["SignatureET","React","useCallback","useState","withBaseDispatchScreen","EntityCode","ExecutionTaskID","DispatchStateContainer","RouteParams","View","CancelOrderDialog","
|
|
1
|
+
{"version":3,"names":["SignatureET","React","useCallback","useEffect","useState","withBaseDispatchScreen","EntityCode","ExecutionTaskID","DispatchStateContainer","RouteParams","getDataFromNextState","View","CancelOrderDialog","onTaskStart","DoodleScreen","_ref","route","navigation","baseETProps","nextState","params","NEXT_STATES","taskMeta","mergedObjectiveId","input","wfMeta","ROOT_META_DATA","customEventsData","showAlert","setShowAlert","sResponse","setResponse","submitOutput","base64Data","getInstance","navigateToNextTask","success","DOODLE","createElement","style","flex","_extends","onSubmitET","_prevState","label","visible","onSubmit","value"],"sources":["DoodleScreen.tsx"],"sourcesContent":["import SignatureET from '../../components/executiontasks/doodle/SignatureET';\nimport React, { useCallback, useEffect, useState } 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 { RouteParams, getDataFromNextState } from '../uiConfig/RouteParams';\nimport { View } from 'react-native';\nimport CancelOrderDialog from '../../components/widgets/CancelOrderDialog';\nimport { onTaskStart } from '../../utils/ExecTaskUtils';\n\nconst DoodleScreen = ({\n route,\n navigation,\n baseETProps,\n}: {\n route: any;\n navigation: any;\n baseETProps: BaseETProps;\n}) => {\n const nextState = route.params[RouteParams.NEXT_STATES];\n const { taskMeta, mergedObjectiveId, input, wfMeta } =\n getDataFromNextState(nextState);\n useEffect(() => {\n onTaskStart(\n nextState,\n route.params[RouteParams.ROOT_META_DATA].customEventsData\n );\n }, []);\n const [showAlert, setShowAlert] = useState(false);\n const [sResponse, setResponse] = useState<any>();\n const submitOutput = useCallback(\n async (base64Data: any) => {\n await DispatchStateContainer.getInstance().navigateToNextTask(\n navigation,\n route,\n base64Data,\n base64Data.success,\n EntityCode.DOODLE,\n ExecutionTaskID.DOODLE,\n baseETProps,\n false\n );\n },\n [baseETProps, navigation, route]\n );\n\n return (\n <View style={{ flex: 1 }}>\n <SignatureET\n {...input}\n // jobIDs={getJobIDs(route.params[RouteParams.NEXT_STATES])}\n // objRefs={getObjectiveRefs(route.params[RouteParams.NEXT_STATES])}\n navigation={navigation}\n taskMeta={taskMeta}\n mergedObjectiveId={mergedObjectiveId}\n onSubmitET={async (base64Data) => {\n if (base64Data.success) {\n await submitOutput(base64Data);\n } else {\n setResponse((_prevState: any) => {\n setShowAlert(true);\n return base64Data;\n });\n }\n }}\n />\n <CancelOrderDialog\n label={'Cancel Signature'}\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};\n\nexport default withBaseDispatchScreen(DoodleScreen);\n"],"mappings":";AAAA,OAAOA,WAAW,MAAM,oDAAoD;AAC5E,OAAOC,KAAK,IAAIC,WA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EAAED,KAAK,CACjC,CAAC;EAED,oBACEf,KAAA,CAAAqC,aAAA,CAAC3B,IAAI;IAAC4B,KAAK,EAAE;MAAEC,IAAI,EAAE;IAAE;EAAE,gBACvBvC,KAAA,CAAAqC,aAAA,CAACtC,WAAW,EAAAyC,QAAA,KACNjB,KAAK;IACT;IACA;IACAP,UAAU,EAAEA,UAAW;IACvBK,QAAQ,EAAEA,QAAS;IACnBC,iBAAiB,EAAEA,iBAAkB;IACrCmB,UAAU,EAAE,MAAOT,UAAU,IAAK;MAChC,IAAIA,UAAU,CAACG,OAAO,EAAE;QACtB,MAAMJ,YAAY,CAACC,UAAU,CAAC;MAChC,CAAC,MAAM;QACLF,WAAW,CAAEY,UAAe,IAAK;UAC/Bd,YAAY,CAAC,IAAI,CAAC;UAClB,OAAOI,UAAU;QACnB,CAAC,CAAC;MACJ;IACF;EAAE,EACH,CAAC,eACFhC,KAAA,CAAAqC,aAAA,CAAC1B,iBAAiB;IAChBgC,KAAK,EAAE,kBAAmB;IAC1BC,OAAO,EAAEjB,SAAU;IACnBkB,QAAQ,EAAE,MAAOC,KAAK,IAAK;MACzB,IAAIA,KAAK,EAAE;QACTlB,YAAY,CAAC,KAAK,CAAC;QACnB,MAAMG,YAAY,CAACF,SAAS,CAAC;MAC/B,CAAC,MAAM;QACLD,YAAY,CAAC,KAAK,CAAC;MACrB;IACF;EAAE,CACH,CACG,CAAC;AAEX,CAAC;AAED,eAAexB,sBAAsB,CAACS,YAAY,CAAC"}
|
|
@@ -1,27 +1,28 @@
|
|
|
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, { useCallback, useState } from 'react';
|
|
2
|
+
import React, { useCallback, useEffect, useState } from 'react';
|
|
4
3
|
import withBaseDispatchScreen from './WithBaseDispatchScreen';
|
|
5
4
|
import { SLDropCash } from '../../components/executiontasks/ExecutionTasksIndex';
|
|
6
5
|
import { EntityCode, ExecutionTaskID } from '../../models/execTasks/ETConfig';
|
|
7
6
|
import DispatchStateContainer from '../../manager/dispatch/DispatchStateContainer';
|
|
8
|
-
import { RouteParams } from '../uiConfig/RouteParams';
|
|
7
|
+
import { RouteParams, getDataFromNextState } from '../uiConfig/RouteParams';
|
|
9
8
|
import { View } from 'react-native';
|
|
10
9
|
import CancelOrderDialog from '../../components/widgets/CancelOrderDialog';
|
|
10
|
+
import { onTaskStart } from '../../utils/ExecTaskUtils';
|
|
11
|
+
import { DispatchExecutor } from '@os1-platform/platform-coreos-execution-engine-sdk';
|
|
11
12
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
13
|
+
// OLD CODE
|
|
14
|
+
// function getTotalExpected(nextStates: any[]): ETAmount {
|
|
15
|
+
// let totalAmount = 0;
|
|
16
|
+
// for (const s of nextStates) {
|
|
17
|
+
// totalAmount += s.nextState.data.input.expectedAmount.value;
|
|
18
|
+
// }
|
|
19
|
+
// return {
|
|
20
|
+
// value: totalAmount,
|
|
21
|
+
// minorUnit: nextStates[0].nextState.data.input.expectedAmount.minorUnit,
|
|
22
|
+
// currencyCode:
|
|
23
|
+
// nextStates[0].nextState.data.input.expectedAmount.currencyCode,
|
|
24
|
+
// };
|
|
25
|
+
// }
|
|
25
26
|
|
|
26
27
|
const DropCashScreen = _ref => {
|
|
27
28
|
let {
|
|
@@ -29,6 +30,29 @@ const DropCashScreen = _ref => {
|
|
|
29
30
|
navigation,
|
|
30
31
|
baseETProps
|
|
31
32
|
} = _ref;
|
|
33
|
+
const nextState = route.params[RouteParams.NEXT_STATES];
|
|
34
|
+
const {
|
|
35
|
+
taskMeta,
|
|
36
|
+
mergedObjectiveId,
|
|
37
|
+
input,
|
|
38
|
+
wfMeta
|
|
39
|
+
} = getDataFromNextState(nextState);
|
|
40
|
+
const [expectedAmount, setExpectedAmount] = useState({
|
|
41
|
+
value: 0,
|
|
42
|
+
minorUnit: input.expectedAmount.minorUnit,
|
|
43
|
+
currencyCode: input.expectedAmount.currencyCode
|
|
44
|
+
});
|
|
45
|
+
const getTotalExpected = async () => {
|
|
46
|
+
const totalAmount = await DispatchExecutor.getTotalAmountMWI(mergedObjectiveId);
|
|
47
|
+
setExpectedAmount({
|
|
48
|
+
...expectedAmount,
|
|
49
|
+
value: totalAmount
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
useEffect(() => {
|
|
53
|
+
onTaskStart(nextState, route.params[RouteParams.ROOT_META_DATA].customEventsData);
|
|
54
|
+
getTotalExpected();
|
|
55
|
+
}, []);
|
|
32
56
|
const [showAlert, setShowAlert] = useState(false);
|
|
33
57
|
const [sResponse, setResponse] = useState();
|
|
34
58
|
const submitOutput = useCallback(async etOutput => {
|
|
@@ -38,8 +62,11 @@ const DropCashScreen = _ref => {
|
|
|
38
62
|
style: {
|
|
39
63
|
flex: 1
|
|
40
64
|
}
|
|
41
|
-
}, /*#__PURE__*/React.createElement(SLDropCash, _extends({},
|
|
42
|
-
expectedAmount:
|
|
65
|
+
}, /*#__PURE__*/React.createElement(SLDropCash, _extends({}, input, {
|
|
66
|
+
expectedAmount: expectedAmount,
|
|
67
|
+
navigation: navigation,
|
|
68
|
+
mergedObjectiveId: mergedObjectiveId,
|
|
69
|
+
taskMeta: taskMeta,
|
|
43
70
|
onSubmitET: async etOutput => {
|
|
44
71
|
if (etOutput.success) {
|
|
45
72
|
await submitOutput(etOutput);
|
|
@@ -62,6 +89,5 @@ const DropCashScreen = _ref => {
|
|
|
62
89
|
}
|
|
63
90
|
}));
|
|
64
91
|
};
|
|
65
|
-
|
|
66
92
|
export default withBaseDispatchScreen(DropCashScreen);
|
|
67
93
|
//# sourceMappingURL=DropCashScreen.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useCallback","useState","withBaseDispatchScreen","SLDropCash","EntityCode","ExecutionTaskID","DispatchStateContainer","RouteParams","View","CancelOrderDialog","
|
|
1
|
+
{"version":3,"names":["React","useCallback","useEffect","useState","withBaseDispatchScreen","SLDropCash","EntityCode","ExecutionTaskID","DispatchStateContainer","RouteParams","getDataFromNextState","View","CancelOrderDialog","onTaskStart","DispatchExecutor","DropCashScreen","_ref","route","navigation","baseETProps","nextState","params","NEXT_STATES","taskMeta","mergedObjectiveId","input","wfMeta","expectedAmount","setExpectedAmount","value","minorUnit","currencyCode","getTotalExpected","totalAmount","getTotalAmountMWI","ROOT_META_DATA","customEventsData","showAlert","setShowAlert","sResponse","setResponse","submitOutput","etOutput","getInstance","navigateToNextTask","success","DELIVER_CASH","createElement","style","flex","_extends","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, getDataFromNextState } 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\nimport { DispatchExecutor } from '@os1-platform/platform-coreos-execution-engine-sdk';\n\n// OLD CODE\n// function 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 const nextState = route.params[RouteParams.NEXT_STATES];\n const { taskMeta, mergedObjectiveId, input, wfMeta } =\n getDataFromNextState(nextState);\n\n const [expectedAmount, setExpectedAmount] = useState<ETAmount>({\n value: 0,\n minorUnit: input.expectedAmount.minorUnit,\n currencyCode: input.expectedAmount.currencyCode,\n });\n\n const getTotalExpected = async () => {\n const totalAmount: number = await DispatchExecutor.getTotalAmountMWI(\n mergedObjectiveId\n );\n setExpectedAmount({ ...expectedAmount, value: totalAmount });\n };\n\n useEffect(() => {\n onTaskStart(\n nextState,\n route.params[RouteParams.ROOT_META_DATA].customEventsData\n );\n getTotalExpected();\n }, []);\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 {...input}\n expectedAmount={expectedAmount}\n navigation={navigation}\n mergedObjectiveId={mergedObjectiveId}\n taskMeta={taskMeta}\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,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AAEhB,SAAU;IACnBiB,QAAQ,EAAE,MAAOzB,KAAK,IAAK;MACzB,IAAIA,KAAK,EAAE;QACTS,YAAY,CAAC,KAAK,CAAC;QACnB,MAAMG,YAAY,CAACF,SAAS,CAAC;MAC/B,CAAC,MAAM;QACLD,YAAY,CAAC,KAAK,CAAC;MACrB;IACF;EAAE,CACH,CACG,CAAC;AAEX,CAAC;AACD,eAAelC,sBAAsB,CAACW,cAAc,CAAC"}
|
|
@@ -11,7 +11,8 @@ import PaymentScreen from './PaymentScreen';
|
|
|
11
11
|
import DisplayScreen from './DisplayScreen';
|
|
12
12
|
import CompleteObjectiveScreen from './CompleteObjectiveScreen';
|
|
13
13
|
import DropCashScreen from './DropCashScreen';
|
|
14
|
-
import
|
|
14
|
+
import ScanScreen from './ScanScreen';
|
|
15
15
|
import HttpRequestScreen from './HttpRequestScreen';
|
|
16
|
-
|
|
16
|
+
import ValidateOTPScreen from './ValidateOTPScreen';
|
|
17
|
+
export { CancellationScreen, DeliverScreen, DoodleScreen, ImageCaptureScreen, FormsScreen, PickupScreen, StartWorkFlowScreen, CaptureInputScreen, GeofenceScreen, PaymentScreen, DisplayScreen, CompleteObjectiveScreen, DropCashScreen, ScanScreen, HttpRequestScreen, ValidateOTPScreen };
|
|
17
18
|
//# sourceMappingURL=ETScreensIndex.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["CancellationScreen","DeliverScreen","DoodleScreen","ImageCaptureScreen","FormsScreen","PickupScreen","StartWorkFlowScreen","CaptureInputScreen","GeofenceScreen","PaymentScreen","DisplayScreen","CompleteObjectiveScreen","DropCashScreen","
|
|
1
|
+
{"version":3,"names":["CancellationScreen","DeliverScreen","DoodleScreen","ImageCaptureScreen","FormsScreen","PickupScreen","StartWorkFlowScreen","CaptureInputScreen","GeofenceScreen","PaymentScreen","DisplayScreen","CompleteObjectiveScreen","DropCashScreen","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 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 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,UAAU,MAAM,cAAc;AACrC,OAAOC,iBAAiB,MAAM,qBAAqB;AACnD,OAAOC,iBAAiB,MAAM,qBAAqB;AAEnD,SACEf,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,UAAU,EACVC,iBAAiB,EACjBC,iBAAiB"}
|
|
@@ -1,28 +1,123 @@
|
|
|
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
|
-
import { showToast } from '../../components/widgets/Toaster';
|
|
7
5
|
import { EntityCode, ExecutionTaskID } from '../../models/execTasks/ETConfig';
|
|
8
6
|
import DispatchStateContainer from '../../manager/dispatch/DispatchStateContainer';
|
|
9
|
-
import { RouteParams } from '../uiConfig/RouteParams';
|
|
10
|
-
|
|
7
|
+
import { RouteParams, getDataFromNextState } from '../uiConfig/RouteParams';
|
|
8
|
+
import { handleDynamicValues, onTaskStart } from '../../utils/ExecTaskUtils';
|
|
9
|
+
import { View } from 'react-native';
|
|
10
|
+
import SnackBarCustom, { SnackBarType } from '../../components/widgets/SnackBarCustom';
|
|
11
|
+
import callbackHandler from '../../manager/sdk/callbacksHandler';
|
|
12
|
+
import { DispatchExecutor as dispatchExecutor } from '@os1-platform/platform-coreos-execution-engine-sdk';
|
|
11
13
|
const FormsScreen = _ref => {
|
|
12
14
|
let {
|
|
13
15
|
route,
|
|
14
16
|
navigation,
|
|
15
17
|
baseETProps
|
|
16
18
|
} = _ref;
|
|
17
|
-
|
|
19
|
+
const [snackBar, setSnackBar] = useState({
|
|
20
|
+
show: false,
|
|
21
|
+
type: SnackBarType.SUCCESS,
|
|
22
|
+
message: ''
|
|
23
|
+
});
|
|
24
|
+
const nextState = route.params[RouteParams.NEXT_STATES];
|
|
25
|
+
const {
|
|
26
|
+
taskMeta,
|
|
27
|
+
mergedObjectiveId,
|
|
28
|
+
input,
|
|
29
|
+
wfMeta
|
|
30
|
+
} = getDataFromNextState(nextState);
|
|
31
|
+
const [_input, setInputs] = useState(input);
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
(async () => {
|
|
34
|
+
onTaskStart(route.params[RouteParams.NEXT_STATES], route.params[RouteParams.ROOT_META_DATA].customEventsData);
|
|
35
|
+
if (route.params[RouteParams.ROOT_META_DATA]) {
|
|
36
|
+
var _phoneNumbers$value;
|
|
37
|
+
//Call objectiveDetails fn and fetch sds ids
|
|
38
|
+
const {
|
|
39
|
+
contact
|
|
40
|
+
} = await dispatchExecutor.getObjectiveTaskDetails(mergedObjectiveId[0], route.params[RouteParams.ROOT_META_DATA].statusFilter);
|
|
41
|
+
|
|
42
|
+
// run callback to get corresponding phone numbers
|
|
43
|
+
const phoneNumbers = await callbackHandler.getPhoneNumbers(contact);
|
|
44
|
+
if (phoneNumbers && (_phoneNumbers$value = phoneNumbers.value) !== null && _phoneNumbers$value !== void 0 && _phoneNumbers$value.length) {
|
|
45
|
+
route.params[RouteParams.ROOT_META_DATA].meta[phoneNumbers.key] = phoneNumbers.value;
|
|
46
|
+
}
|
|
47
|
+
let jsonSchemaProperties = JSON.parse(JSON.stringify(_input.jsonSchema.properties));
|
|
48
|
+
jsonSchemaProperties = handleDynamicValues(jsonSchemaProperties, route.params[RouteParams.ROOT_META_DATA]);
|
|
49
|
+
setInputs(prev => {
|
|
50
|
+
const dynamicInput = {
|
|
51
|
+
...prev,
|
|
52
|
+
jsonSchema: {
|
|
53
|
+
...prev.jsonSchema,
|
|
54
|
+
properties: jsonSchemaProperties
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
return dynamicInput;
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
})();
|
|
61
|
+
}, []);
|
|
62
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FormGenerator, _extends({}, _input, {
|
|
63
|
+
navigation: navigation,
|
|
64
|
+
mergedObjectiveId: mergedObjectiveId,
|
|
65
|
+
taskMeta: taskMeta,
|
|
18
66
|
onError: error => {
|
|
19
|
-
|
|
67
|
+
const errorMessage = transformErrorMessage(error);
|
|
68
|
+
setSnackBar({
|
|
69
|
+
show: true,
|
|
70
|
+
type: SnackBarType.FAILURE,
|
|
71
|
+
message: errorMessage
|
|
72
|
+
});
|
|
20
73
|
},
|
|
21
74
|
onSubmitET: async result => {
|
|
22
75
|
await DispatchStateContainer.getInstance().navigateToNextTask(navigation, route, result, result.success, EntityCode.FORMS, ExecutionTaskID.FORMS, baseETProps, false);
|
|
23
76
|
}
|
|
24
|
-
}))
|
|
77
|
+
})), /*#__PURE__*/React.createElement(View, {
|
|
78
|
+
style: {
|
|
79
|
+
justifyContent: 'flex-end'
|
|
80
|
+
}
|
|
81
|
+
}, /*#__PURE__*/React.createElement(SnackBarCustom, {
|
|
82
|
+
type: snackBar.type,
|
|
83
|
+
message: `${snackBar.message}`,
|
|
84
|
+
visible: snackBar.show,
|
|
85
|
+
onDismiss: () => {
|
|
86
|
+
setSnackBar({
|
|
87
|
+
show: false,
|
|
88
|
+
message: '',
|
|
89
|
+
type: SnackBarType.SUCCESS
|
|
90
|
+
});
|
|
91
|
+
},
|
|
92
|
+
customBottom: 20
|
|
93
|
+
})));
|
|
25
94
|
};
|
|
26
|
-
|
|
27
95
|
export default withBaseDispatchScreen(FormsScreen);
|
|
96
|
+
const transformErrorMessage = error => {
|
|
97
|
+
let errorMessage = '';
|
|
98
|
+
if (Array.isArray(error)) {
|
|
99
|
+
if (error.length === 1) {
|
|
100
|
+
const e = error[0];
|
|
101
|
+
if (e.name === 'required') {
|
|
102
|
+
errorMessage = `${convertToPascalCaseWithSpace(e.property)} is required`;
|
|
103
|
+
} else errorMessage = `${e.property} ${e.message}`;
|
|
104
|
+
} else {
|
|
105
|
+
errorMessage = 'Form Validation Failed';
|
|
106
|
+
}
|
|
107
|
+
} else {
|
|
108
|
+
errorMessage = `${error.property} ${error.message}`;
|
|
109
|
+
}
|
|
110
|
+
return errorMessage;
|
|
111
|
+
};
|
|
112
|
+
function convertToPascalCaseWithSpace(inputString) {
|
|
113
|
+
// Capitalize the first letter of each word while preserving spaces
|
|
114
|
+
return inputString.split(/[^a-zA-Z0-9]+/).filter(word => word.length > 0).map((word, index) => capitalizeWord(word, index === 0)).join(' ');
|
|
115
|
+
}
|
|
116
|
+
function capitalizeWord(word, isFirstWord) {
|
|
117
|
+
if (isFirstWord) {
|
|
118
|
+
return word.charAt(0).toUpperCase() + word.slice(1);
|
|
119
|
+
} else {
|
|
120
|
+
return word;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
28
123
|
//# 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.input}\n onError={(error: any) => {\n showToast(error.message);\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,KAAP,MAAkB,OAAlB;AACA,OAAOC,sBAAP,MAAmC,0BAAnC;AACA,SAASC,aAAT,QAA8B,qDAA9B;AACA,SAASC,SAAT,QAA0B,kCAA1B;AACA,SAASC,UAAT,EAAqBC,eAArB,QAA4C,iCAA5C;AAEA,OAAOC,sBAAP,MAAmC,+CAAnC;AACA,SAASC,WAAT,QAA4B,yBAA5B;;AAEA,MAAMC,WAAW,GAAG,QAQd;EAAA,IARe;IACnBC,KADmB;IAEnBC,UAFmB;IAGnBC;EAHmB,CAQf;EACJ,oBACE,oBAAC,aAAD,eACMF,KAAK,CAACG,MAAN,CAAaL,WAAW,CAACM,WAAzB,EAAsC,CAAtC,EAAyCC,SAAzC,CAAmDC,IAAnD,CAAwDC,KAD9D;IAEE,OAAO,EAAGC,KAAD,IAAgB;MACvBd,SAAS,CAACc,KAAK,CAACC,OAAP,CAAT;IACD,CAJH;IAKE,UAAU,EAAE,MAAOC,MAAP,IAAkB;MAC5B,MAAMb,sBAAsB,CAACc,WAAvB,GAAqCC,kBAArC,CACJX,UADI,EAEJD,KAFI,EAGJU,MAHI,EAIJA,MAAM,CAACG,OAJH,EAKJlB,UAAU,CAACmB,KALP,EAMJlB,eAAe,CAACkB,KANZ,EAOJZ,WAPI,EAQJ,KARI,CAAN;IAUD;EAhBH,GADF;AAoBD,CA7BD;;AA8BA,eAAeV,sBAAsB,CAACO,WAAD,CAArC"}
|
|
1
|
+
{"version":3,"names":["React","useEffect","useState","withBaseDispatchScreen","FormGenerator","EntityCode","ExecutionTaskID","DispatchStateContainer","RouteParams","getDataFromNextState","handleDynamicValues","onTaskStart","View","SnackBarCustom","SnackBarType","callbackHandler","DispatchExecutor","dispatchExecutor","FormsScreen","_ref","route","navigation","baseETProps","snackBar","setSnackBar","show","type","SUCCESS","message","nextState","params","NEXT_STATES","taskMeta","mergedObjectiveId","input","wfMeta","_input","setInputs","ROOT_META_DATA","customEventsData","_phoneNumbers$value","contact","getObjectiveTaskDetails","statusFilter","phoneNumbers","getPhoneNumbers","value","length","meta","key","jsonSchemaProperties","JSON","parse","stringify","jsonSchema","properties","prev","dynamicInput","createElement","Fragment","_extends","onError","error","errorMessage","transformErrorMessage","FAILURE","onSubmitET","result","getInstance","navigateToNextTask","success","FORMS","style","justifyContent","visible","onDismiss","customBottom","Array","isArray","e","name","convertToPascalCaseWithSpace","property","inputString","split","filter","word","map","index","capitalizeWord","join","isFirstWord","charAt","toUpperCase","slice"],"sources":["FormsScreen.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport withBaseDispatchScreen from './WithBaseDispatchScreen';\nimport { FormGenerator } from '../../components/executiontasks/ExecutionTasksIndex';\nimport { EntityCode, ExecutionTaskID } from '../../models/execTasks/ETConfig';\nimport type { BaseETProps } from '../../models/DispatchModels';\nimport DispatchStateContainer from '../../manager/dispatch/DispatchStateContainer';\nimport { RouteParams, getDataFromNextState } from '../uiConfig/RouteParams';\nimport { handleDynamicValues, onTaskStart } from '../../utils/ExecTaskUtils';\nimport { View } from 'react-native';\nimport SnackBarCustom, {\n SnackBarType,\n} from '../../components/widgets/SnackBarCustom';\nimport callbackHandler from '../../manager/sdk/callbacksHandler';\nimport { DispatchExecutor as dispatchExecutor } from '@os1-platform/platform-coreos-execution-engine-sdk';\nimport { AjvError } from '@rjsf/core';\n\nconst FormsScreen = ({\n route,\n navigation,\n baseETProps,\n}: {\n route: any;\n navigation: any;\n baseETProps: BaseETProps;\n}) => {\n const [snackBar, setSnackBar] = useState({\n show: false,\n type: SnackBarType.SUCCESS,\n message: '',\n });\n const nextState = route.params[RouteParams.NEXT_STATES];\n const { taskMeta, mergedObjectiveId, input, wfMeta } =\n getDataFromNextState(nextState);\n const [_input, setInputs] = useState(input);\n useEffect(() => {\n (async () => {\n onTaskStart(\n route.params[RouteParams.NEXT_STATES],\n route.params[RouteParams.ROOT_META_DATA].customEventsData\n );\n\n if (route.params[RouteParams.ROOT_META_DATA]) {\n //Call objectiveDetails fn and fetch sds ids\n const { contact } = await dispatchExecutor.getObjectiveTaskDetails(\n mergedObjectiveId[0],\n route.params[RouteParams.ROOT_META_DATA].statusFilter\n );\n\n // run callback to get corresponding phone numbers\n const phoneNumbers = await callbackHandler.getPhoneNumbers(contact);\n\n if (phoneNumbers && phoneNumbers.value?.length) {\n route.params[RouteParams.ROOT_META_DATA].meta[phoneNumbers.key] =\n phoneNumbers.value;\n }\n\n let jsonSchemaProperties = JSON.parse(\n JSON.stringify(_input.jsonSchema.properties)\n );\n\n jsonSchemaProperties = handleDynamicValues(\n jsonSchemaProperties,\n route.params[RouteParams.ROOT_META_DATA]\n );\n\n setInputs((prev: any) => {\n const dynamicInput = {\n ...prev,\n jsonSchema: {\n ...prev.jsonSchema,\n properties: jsonSchemaProperties,\n },\n };\n return dynamicInput;\n });\n }\n })();\n }, []);\n\n return (\n <>\n <FormGenerator\n {..._input}\n navigation={navigation}\n mergedObjectiveId={mergedObjectiveId}\n taskMeta={taskMeta}\n onError={(error: AjvError[] | AjvError) => {\n const errorMessage = transformErrorMessage(error);\n\n setSnackBar({\n show: true,\n type: SnackBarType.FAILURE,\n message: errorMessage,\n });\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 <View style={{ justifyContent: 'flex-end' }}>\n <SnackBarCustom\n type={snackBar.type}\n message={`${snackBar.message}`}\n visible={snackBar.show}\n onDismiss={() => {\n setSnackBar({\n show: false,\n message: '',\n type: SnackBarType.SUCCESS,\n });\n }}\n customBottom={20}\n />\n </View>\n </>\n );\n};\nexport default withBaseDispatchScreen(FormsScreen);\n\nconst transformErrorMessage = (error: AjvError[] | AjvError): string => {\n let errorMessage = '';\n if (Array.isArray(error)) {\n if (error.length === 1) {\n const e = error[0];\n if (e.name === 'required') {\n errorMessage = `${convertToPascalCaseWithSpace(\n e.property\n )} is required`;\n } else errorMessage = `${e.property} ${e.message}`;\n } else {\n errorMessage = 'Form Validation Failed';\n }\n } else {\n errorMessage = `${error.property} ${error.message}`;\n }\n\n return errorMessage;\n};\n\nfunction convertToPascalCaseWithSpace(inputString: string): string {\n // Capitalize the first letter of each word while preserving spaces\n return inputString\n .split(/[^a-zA-Z0-9]+/)\n .filter((word) => word.length > 0)\n .map((word, index) => capitalizeWord(word, index === 0))\n .join(' ');\n}\n\nfunction capitalizeWord(word: string, isFirstWord: boolean): string {\n if (isFirstWord) {\n return word.charAt(0).toUpperCase() + word.slice(1);\n } else {\n return word;\n }\n}\n"],"mappings":";AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAClD,OAAOC,sBAAsB,MAAM,0BAA0B;AAC7D,SAASC,aAAa,QAAQ,qDAAqD;AACnF,SAASC,UAAU,EAAEC,eAAe,QAAQ,iCAAiC;AAE7E,OAAOC,sBAAsB,MAAM,+CAA+C;AAClF,SAASC,WAAW,EAAEC,oBAAoB,QAAQ,yBAAyB;AAC3E,SAASC,mBAAmB,EAAEC,WAAW,QAAQ,2BAA2B;AAC5E,SAASC,IAAI,QAAQ,cAAc;AACnC,OAAOC,cAAc,IACnBC,YAAY,QACP,yCAAyC;AAChD,OAAOC,eAAe,MAAM,oCAAoC;AAChE,SAASC,gBAAgB,IAAIC,gBAAgB,QAAQ,oDAAoD;AAGzG,MAAMC,WAAW,GAAGC,IAAA,IAQd;EAAA,IARe;IACnBC,KAAK;IACLC,UAAU;IACVC;EAKF,CAAC,GAAAH,IA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C,eAAe,CAAC,CACtBC,MAAM,CAAEC,IAAI,IAAKA,IAAI,CAACvC,MAAM,GAAG,CAAC,CAAC,CACjCwC,GAAG,CAAC,CAACD,IAAI,EAAEE,KAAK,KAAKC,cAAc,CAACH,IAAI,EAAEE,KAAK,KAAK,CAAC,CAAC,CAAC,CACvDE,IAAI,CAAC,GAAG,CAAC;AACd;AAEA,SAASD,cAAcA,CAACH,IAAY,EAAEK,WAAoB,EAAU;EAClE,IAAIA,WAAW,EAAE;IACf,OAAOL,IAAI,CAACM,MAAM,CAAC,CAAC,CAAC,CAACC,WAAW,CAAC,CAAC,GAAGP,IAAI,CAACQ,KAAK,CAAC,CAAC,CAAC;EACrD,CAAC,MAAM;IACL,OAAOR,IAAI;EACb;AACF"}
|
|
@@ -1,20 +1,30 @@
|
|
|
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
|
-
import { RouteParams } from '../uiConfig/RouteParams';
|
|
10
|
-
|
|
8
|
+
import { RouteParams, getDataFromNextState } from '../uiConfig/RouteParams';
|
|
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;
|
|
17
|
-
|
|
16
|
+
const nextState = route.params[RouteParams.NEXT_STATES];
|
|
17
|
+
const {
|
|
18
|
+
taskMeta,
|
|
19
|
+
mergedObjectiveId,
|
|
20
|
+
input,
|
|
21
|
+
wfMeta
|
|
22
|
+
} = getDataFromNextState(nextState);
|
|
23
|
+
useEffect(() => {
|
|
24
|
+
onTaskStart(nextState, route.params[RouteParams.ROOT_META_DATA].customEventsData);
|
|
25
|
+
}, []);
|
|
26
|
+
return /*#__PURE__*/React.createElement(VerifyLocationET, _extends({}, input, {
|
|
27
|
+
mergedObjectiveId: mergedObjectiveId,
|
|
18
28
|
onSubmitET: async resp => {
|
|
19
29
|
try {
|
|
20
30
|
await DispatchStateContainer.getInstance().navigateToNextTask(navigation, route, resp, resp.success, EntityCode.VERIFY_LOCATION, ExecutionTaskID.VERIFY_LOCATION, baseETProps, false);
|
|
@@ -25,6 +35,5 @@ const GeofenceScreen = _ref => {
|
|
|
25
35
|
}
|
|
26
36
|
}));
|
|
27
37
|
};
|
|
28
|
-
|
|
29
38
|
export default withBaseDispatchScreen(GeofenceScreen);
|
|
30
39
|
//# 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","
|
|
1
|
+
{"version":3,"names":["withBaseDispatchScreen","React","useEffect","VerifyLocationET","showToast","EntityCode","ExecutionTaskID","DispatchStateContainer","RouteParams","getDataFromNextState","onTaskStart","GeofenceScreen","_ref","route","navigation","baseETProps","nextState","params","NEXT_STATES","taskMeta","mergedObjectiveId","input","wfMeta","ROOT_META_DATA","customEventsData","createElement","_extends","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, getDataFromNextState } 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 const nextState = route.params[RouteParams.NEXT_STATES];\n const { taskMeta, mergedObjectiveId, input, wfMeta } =\n getDataFromNextState(nextState);\n useEffect(() => {\n onTaskStart(\n nextState,\n route.params[RouteParams.ROOT_META_DATA].customEventsData\n );\n }, []);\n return (\n <VerifyLocationET\n {...input}\n mergedObjectiveId={mergedObjectiveId}\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,EAAEC,oBAAoB,QAAQ,yBAAyB;AAC3E,SAASC,WAAW,QAAQ,2BAA2B;AAEvD,MAAMC,cAAc,GAAGC,IAAA,IAQjB;EAAA,IARkB;IACtBC,KAAK;IACLC,UAAU;IACVC;EAKF,CAAC,GAAAH,IAAA;EACC,MAAMI,SAAS,GAAGH,KAAK,CAACI,MAAM,CAACT,WAAW,CAACU,WAAW,CAAC;EACvD,MAAM;IAAEC,QAAQ;IAAEC,iBAAiB;IAAEC,KAAK;IAAEC;EAAO,CAAC,GAClDb,oBAAoB,CAACO,SAAS,CAAC;EACjCd,SAAS,CAAC,MAAM;IACdQ,WAAW,CACTM,SAAS,EACTH,KAAK,CAACI,MAAM,CAACT,WAAW,CAACe,cAAc,CAAC,CAACC,gBAC3C,CAAC;EACH,CAAC,EAAE,EAAE,CAAC;EACN,oBACEvB,KAAA,CAAAwB,aAAA,CAACtB,gBAAgB,EAAAuB,QAAA,KACXL,KAAK;IACTD,iBAAiB,EAAEA,iBAAkB;IACrCO,UAAU,EAAE,MAAOC,IAAI,IAAK;MAC1B,IAAI;QACF,MAAMrB,sBAAsB,CAACsB,WAAW,CAAC,CAAC,CAACC,kBAAkB,CAC3DhB,UAAU,EACVD,KAAK,EACLe,IAAI,EACJA,IAAI,CAACG,OAAO,EACZ1B,UAAU,CAAC2B,eAAe,EAC1B1B,eAAe,CAAC0B,eAAe,EAC/BjB,WAAW,EACX,KACF,CAAC;MACH,CAAC,CAAC,OAAOkB,KAAU,EAAE;QACnBlB,WAAW,CAACmB,YAAY,CAAC,KAAK,CAAC;QAC/B9B,SAAS,CAAC,QAAQ,GAAG6B,KAAK,CAACE,OAAO,CAAC;MACrC;IACF;EAAE,EACH,CAAC;AAEN,CAAC;AAED,eAAenC,sBAAsB,CAACW,cAAc,CAAC"}
|
|
@@ -1,23 +1,33 @@
|
|
|
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
|
-
import { RouteParams } from '../uiConfig/RouteParams';
|
|
4
|
+
import { RouteParams, getDataFromNextState } 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
|
-
|
|
15
|
+
const nextState = route.params[RouteParams.NEXT_STATES];
|
|
16
|
+
const {
|
|
17
|
+
taskMeta,
|
|
18
|
+
mergedObjectiveId,
|
|
19
|
+
input,
|
|
20
|
+
wfMeta
|
|
21
|
+
} = getDataFromNextState(nextState);
|
|
22
|
+
useEffect(() => {
|
|
23
|
+
onTaskStart(route.params[RouteParams.NEXT_STATES], route.params[RouteParams.ROOT_META_DATA].customEventsData);
|
|
24
|
+
}, []);
|
|
25
|
+
return /*#__PURE__*/React.createElement(HttpRequestET, _extends({}, input, {
|
|
26
|
+
mergedObjectiveId: mergedObjectiveId,
|
|
16
27
|
onSubmitET: async response => {
|
|
17
28
|
await DispatchStateContainer.getInstance().navigateToNextTask(navigation, route, response, response.success, EntityCode.HTTP_REQUEST_ET, ExecutionTaskID.HTTP_REQUEST_ET, baseETProps, false);
|
|
18
29
|
}
|
|
19
30
|
}));
|
|
20
31
|
};
|
|
21
|
-
|
|
22
32
|
export default WithBaseDispatchScreen(HttpRequestScreen);
|
|
23
33
|
//# sourceMappingURL=HttpRequestScreen.js.map
|