@os1-platform/dispatch-mobile 1.3.11 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +198 -30
- package/android/.gradle/7.0.2/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/7.2/dependencies-accessors/dependencies-accessors.lock +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 -2
- 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/.idea/compiler.xml +6 -0
- package/android/.idea/gradle.xml +6 -1
- package/android/.idea/jarRepositories.xml +35 -0
- package/android/.idea/kotlinc.xml +6 -0
- package/android/.idea/misc.xml +6 -1
- package/android/local.properties +1 -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 +4 -4
- package/lib/commonjs/components/dispatch/DispatchExecNavigator.js.map +1 -1
- package/lib/commonjs/components/executiontasks/ExecutionTasksIndex.js +0 -28
- package/lib/commonjs/components/executiontasks/ExecutionTasksIndex.js.map +1 -1
- package/lib/commonjs/components/executiontasks/cancellation/CancelET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js +35 -35
- 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 +3 -7
- 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 +181 -112
- package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/display/DisplayModalET.js +16 -16
- package/lib/commonjs/components/executiontasks/display/DisplayModalET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/doodle/SignatureET.js +37 -34
- package/lib/commonjs/components/executiontasks/doodle/SignatureET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/dropCash/DropCashET.js +2 -2
- package/lib/commonjs/components/executiontasks/dropCash/DropCashET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js +52 -52
- package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/FormGenerator.js +71 -66
- package/lib/commonjs/components/executiontasks/forms/FormGenerator.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/DateTimeWidget.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/DropdownWidget.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/TimeRangeSelector.js.map +1 -1
- package/lib/commonjs/components/executiontasks/httpRequest/HttpEtUtils.js +2 -2
- package/lib/commonjs/components/executiontasks/httpRequest/HttpEtUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/httpRequest/HttpRequestET.js +3 -3
- 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 +6 -3
- package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js +34 -34
- package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/PaymentUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js +54 -54
- package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js +33 -33
- package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js +33 -33
- package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/pickup/PickupET.js +3 -7
- package/lib/commonjs/components/executiontasks/pickup/PickupET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js +106 -47
- package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/ScanET.js +326 -428
- package/lib/commonjs/components/executiontasks/scan/ScanET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/ScanSchema.js +13 -0
- package/lib/commonjs/components/executiontasks/scan/ScanSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/interfaces.js +15 -1
- package/lib/commonjs/components/executiontasks/scan/interfaces.js.map +1 -1
- 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/scan/sub_components/CScanner.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/sub_components/DropDownUtils.js +72 -37
- package/lib/commonjs/components/executiontasks/scan/sub_components/DropDownUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/sub_components/ERDropDown.js +9 -7
- package/lib/commonjs/components/executiontasks/scan/sub_components/ERDropDown.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/sub_components/SummaryPage.js +1096 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/SummaryPage.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/utils.js +548 -159
- package/lib/commonjs/components/executiontasks/scan/utils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPET.js +52 -53
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/validateOTP/sub-components/OTPInput.js +4 -0
- package/lib/commonjs/components/executiontasks/validateOTP/sub-components/OTPInput.js.map +1 -1
- package/lib/commonjs/components/executiontasks/validateOTP/utils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/verifyLocation/GeofenceUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/verifyLocation/VerifyLocationET.js +1 -1
- package/lib/commonjs/components/executiontasks/verifyLocation/VerifyLocationET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpET.js +1 -1
- 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.map +1 -1
- 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.map +1 -1
- 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.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 +12 -4
- package/lib/commonjs/components/widgets/SnackBarCustom.js.map +1 -1
- package/lib/commonjs/components/widgets/SplitTextInput.js.map +1 -1
- package/lib/commonjs/components/widgets/TabsComponent.js +64 -0
- package/lib/commonjs/components/widgets/TabsComponent.js.map +1 -0
- package/lib/commonjs/constants/apiConstants.js +3 -1
- package/lib/commonjs/constants/apiConstants.js.map +1 -1
- package/lib/commonjs/constants/constants.js +2 -2
- package/lib/commonjs/constants/constants.js.map +1 -1
- package/lib/commonjs/events/EventDispatcher.js +1 -5
- package/lib/commonjs/events/EventDispatcher.js.map +1 -1
- package/lib/commonjs/events/constants.js +3 -1
- package/lib/commonjs/events/constants.js.map +1 -1
- package/lib/commonjs/events/interface.js.map +1 -1
- package/lib/commonjs/icons/file.js +24 -0
- package/lib/commonjs/icons/file.js.map +1 -0
- package/lib/commonjs/icons/interface.js +2 -0
- package/lib/commonjs/icons/interface.js.map +1 -0
- package/lib/commonjs/index.js +32 -13
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/manager/dispatch/DispatchStateContainer.js +315 -609
- package/lib/commonjs/manager/dispatch/DispatchStateContainer.js.map +1 -1
- package/lib/commonjs/manager/dispatchCodes/EventCodeContainer.js.map +1 -1
- package/lib/commonjs/manager/dispatchCodes/EventCodeRepo.js.map +1 -1
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeContainer.js.map +1 -1
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeRepo.js.map +1 -1
- package/lib/commonjs/manager/jobRemoval/JobRemovalManager.js +21 -25
- package/lib/commonjs/manager/jobRemoval/JobRemovalManager.js.map +1 -1
- package/lib/commonjs/manager/location/LocationManager.js.map +1 -1
- package/lib/commonjs/manager/sdk/DispatchSDKManager.js +15 -1
- package/lib/commonjs/manager/sdk/DispatchSDKManager.js.map +1 -1
- package/lib/commonjs/manager/sdk/DispatchSdkCache.js +2 -2
- 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 +15 -1
- package/lib/commonjs/manager/syncmanager/AppSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/DBConfig.js +36 -3
- package/lib/commonjs/manager/syncmanager/DBConfig.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.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js +11 -17
- package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentManager.js +5 -6
- package/lib/commonjs/manager/syncmanager/document/DocumentManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js +16 -6
- package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/events/ETEventsManager.js +377 -26
- package/lib/commonjs/manager/syncmanager/events/ETEventsManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/events/EventsSyncManager.js +183 -65
- package/lib/commonjs/manager/syncmanager/events/EventsSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/events/SyncHttpClient.js +150 -37
- package/lib/commonjs/manager/syncmanager/events/SyncHttpClient.js.map +1 -1
- package/lib/commonjs/models/DispatchModels.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/sdk.js.map +1 -1
- package/lib/commonjs/native/signature/SignatureCapture.js.map +1 -1
- package/lib/commonjs/network/GraphQLClient.js.map +1 -1
- package/lib/commonjs/network/NetworkClient.js.map +1 -1
- package/lib/commonjs/network/NetworkUtils.js.map +1 -1
- package/lib/commonjs/network/client.js.map +1 -1
- package/lib/commonjs/resources/Login.js.map +1 -1
- package/lib/commonjs/resources/network.js.map +1 -1
- package/lib/commonjs/styles/SdkColors.js +4 -2
- package/lib/commonjs/styles/SdkColors.js.map +1 -1
- package/lib/commonjs/styles/executionTasks/CommonStyles.js +19 -10
- package/lib/commonjs/styles/executionTasks/CommonStyles.js.map +1 -1
- package/lib/commonjs/ui/screens/CancellationScreen.js +38 -7
- package/lib/commonjs/ui/screens/CancellationScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/CaptureInputScreen.js +11 -3
- package/lib/commonjs/ui/screens/CaptureInputScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/CompleteObjectiveScreen.js +11 -4
- package/lib/commonjs/ui/screens/CompleteObjectiveScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DeliverScreen.js +26 -4
- package/lib/commonjs/ui/screens/DeliverScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DisplayScreen.js +11 -2
- package/lib/commonjs/ui/screens/DisplayScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DoodleScreen.js +13 -6
- package/lib/commonjs/ui/screens/DoodleScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DropCashScreen.js +39 -15
- package/lib/commonjs/ui/screens/DropCashScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ETScreensIndex.js +0 -7
- package/lib/commonjs/ui/screens/ETScreensIndex.js.map +1 -1
- package/lib/commonjs/ui/screens/FormsScreen.js +95 -28
- package/lib/commonjs/ui/screens/FormsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/GeofenceScreen.js +10 -2
- package/lib/commonjs/ui/screens/GeofenceScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HttpRequestScreen.js +10 -2
- package/lib/commonjs/ui/screens/HttpRequestScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ImageCaptureScreen.js +26 -18
- package/lib/commonjs/ui/screens/ImageCaptureScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PaymentScreen.js +22 -11
- package/lib/commonjs/ui/screens/PaymentScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PickupScreen.js +34 -8
- package/lib/commonjs/ui/screens/PickupScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ScanScreen.js +72 -219
- package/lib/commonjs/ui/screens/ScanScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/StartWorkFlowScreen.js +51 -16
- package/lib/commonjs/ui/screens/StartWorkFlowScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ValidateOTPScreen.js +13 -7
- package/lib/commonjs/ui/screens/ValidateOTPScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/WithBaseDispatchScreen.js.map +1 -1
- package/lib/commonjs/ui/uiConfig/RouteParams.js +20 -5
- package/lib/commonjs/ui/uiConfig/RouteParams.js.map +1 -1
- package/lib/commonjs/utils/ApiUtils.js +16 -2
- package/lib/commonjs/utils/ApiUtils.js.map +1 -1
- package/lib/commonjs/utils/ExecTaskUtils.js +33 -25
- package/lib/commonjs/utils/ExecTaskUtils.js.map +1 -1
- package/lib/commonjs/utils/Logger.js.map +1 -1
- package/lib/commonjs/utils/NetworkUtil.js.map +1 -1
- package/lib/commonjs/utils/SdkUtils.js.map +1 -1
- package/lib/commonjs/utils/SyncManagerUtils.js +37 -4
- package/lib/commonjs/utils/SyncManagerUtils.js.map +1 -1
- package/lib/commonjs/utils/fcm/FCM.js +64 -35
- package/lib/commonjs/utils/fcm/FCM.js.map +1 -1
- package/lib/commonjs/utils/fcm/FcmUtils.js +82 -46
- package/lib/commonjs/utils/fcm/FcmUtils.js.map +1 -1
- 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/loginHelper.js.map +1 -1
- package/lib/commonjs/utils/storage.js +37 -2
- package/lib/commonjs/utils/storage.js.map +1 -1
- 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 +4 -4
- package/lib/module/components/dispatch/DispatchExecNavigator.js.map +1 -1
- package/lib/module/components/executiontasks/ExecutionTasksIndex.js +1 -5
- package/lib/module/components/executiontasks/ExecutionTasksIndex.js.map +1 -1
- package/lib/module/components/executiontasks/cancellation/CancelET.js.map +1 -1
- package/lib/module/components/executiontasks/captureInput/CaptureText.js +38 -37
- 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 +4 -8
- 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 +183 -114
- package/lib/module/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
- package/lib/module/components/executiontasks/display/DisplayModalET.js +16 -16
- package/lib/module/components/executiontasks/display/DisplayModalET.js.map +1 -1
- package/lib/module/components/executiontasks/doodle/SignatureET.js +39 -36
- package/lib/module/components/executiontasks/doodle/SignatureET.js.map +1 -1
- package/lib/module/components/executiontasks/dropCash/DropCashET.js +2 -2
- package/lib/module/components/executiontasks/dropCash/DropCashET.js.map +1 -1
- package/lib/module/components/executiontasks/dropCash/SLDropCash.js +53 -52
- package/lib/module/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
- package/lib/module/components/executiontasks/forms/FormGenerator.js +73 -68
- package/lib/module/components/executiontasks/forms/FormGenerator.js.map +1 -1
- package/lib/module/components/executiontasks/forms/widgets/DateTimeWidget.js.map +1 -1
- package/lib/module/components/executiontasks/forms/widgets/DropdownWidget.js.map +1 -1
- package/lib/module/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js +1 -1
- package/lib/module/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js.map +1 -1
- package/lib/module/components/executiontasks/forms/widgets/TimeRangeSelector.js.map +1 -1
- package/lib/module/components/executiontasks/httpRequest/HttpEtUtils.js +3 -3
- package/lib/module/components/executiontasks/httpRequest/HttpEtUtils.js.map +1 -1
- package/lib/module/components/executiontasks/httpRequest/HttpRequestET.js +3 -3
- package/lib/module/components/executiontasks/httpRequest/HttpRequestET.js.map +1 -1
- package/lib/module/components/executiontasks/imageCapture/CaptureSchema.js.map +1 -1
- package/lib/module/components/executiontasks/imageCapture/CaptureUtils.js +6 -3
- package/lib/module/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
- package/lib/module/components/executiontasks/imageCapture/ImageCapture.js +36 -36
- package/lib/module/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
- package/lib/module/components/executiontasks/payments/PaymentUtils.js.map +1 -1
- package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentET.js +55 -54
- package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
- package/lib/module/components/executiontasks/payments/init/InitPaymentET.js +35 -34
- package/lib/module/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
- package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentET.js +35 -35
- package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
- package/lib/module/components/executiontasks/pickup/PickupET.js +4 -8
- package/lib/module/components/executiontasks/pickup/PickupET.js.map +1 -1
- package/lib/module/components/executiontasks/pickup/SLPickupET.js +108 -49
- package/lib/module/components/executiontasks/pickup/SLPickupET.js.map +1 -1
- package/lib/module/components/executiontasks/scan/ScanET.js +332 -433
- package/lib/module/components/executiontasks/scan/ScanET.js.map +1 -1
- package/lib/module/components/executiontasks/scan/ScanSchema.js +16 -1
- package/lib/module/components/executiontasks/scan/ScanSchema.js.map +1 -1
- package/lib/module/components/executiontasks/scan/interfaces.js +12 -0
- package/lib/module/components/executiontasks/scan/interfaces.js.map +1 -1
- 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/scan/sub_components/CScanner.js.map +1 -1
- package/lib/module/components/executiontasks/scan/sub_components/DropDownUtils.js +72 -37
- package/lib/module/components/executiontasks/scan/sub_components/DropDownUtils.js.map +1 -1
- package/lib/module/components/executiontasks/scan/sub_components/ERDropDown.js +9 -7
- package/lib/module/components/executiontasks/scan/sub_components/ERDropDown.js.map +1 -1
- package/lib/module/components/executiontasks/scan/sub_components/SummaryPage.js +1089 -0
- package/lib/module/components/executiontasks/scan/sub_components/SummaryPage.js.map +1 -0
- package/lib/module/components/executiontasks/scan/utils.js +528 -160
- package/lib/module/components/executiontasks/scan/utils.js.map +1 -1
- package/lib/module/components/executiontasks/validateOTP/ValidateOTPET.js +54 -55
- package/lib/module/components/executiontasks/validateOTP/ValidateOTPET.js.map +1 -1
- package/lib/module/components/executiontasks/validateOTP/sub-components/OTPInput.js +4 -0
- package/lib/module/components/executiontasks/validateOTP/sub-components/OTPInput.js.map +1 -1
- package/lib/module/components/executiontasks/validateOTP/utils.js.map +1 -1
- package/lib/module/components/executiontasks/verifyLocation/GeofenceUtils.js.map +1 -1
- package/lib/module/components/executiontasks/verifyLocation/VerifyLocationET.js +1 -1
- package/lib/module/components/executiontasks/verifyLocation/VerifyLocationET.js.map +1 -1
- package/lib/module/components/executiontasks/verifyOtp/VerifyOtpET.js +2 -2
- 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.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.map +1 -1
- 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.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 +12 -4
- package/lib/module/components/widgets/SnackBarCustom.js.map +1 -1
- package/lib/module/components/widgets/SplitTextInput.js.map +1 -1
- package/lib/module/components/widgets/TabsComponent.js +55 -0
- package/lib/module/components/widgets/TabsComponent.js.map +1 -0
- package/lib/module/constants/apiConstants.js +3 -1
- package/lib/module/constants/apiConstants.js.map +1 -1
- package/lib/module/constants/constants.js +2 -2
- package/lib/module/constants/constants.js.map +1 -1
- package/lib/module/events/EventDispatcher.js +0 -3
- package/lib/module/events/EventDispatcher.js.map +1 -1
- package/lib/module/events/constants.js +3 -1
- package/lib/module/events/constants.js.map +1 -1
- package/lib/module/events/interface.js.map +1 -1
- package/lib/module/icons/file.js +16 -0
- package/lib/module/icons/file.js.map +1 -0
- package/lib/module/icons/interface.js +2 -0
- package/lib/module/icons/interface.js.map +1 -0
- package/lib/module/index.js +6 -3
- package/lib/module/index.js.map +1 -1
- package/lib/module/manager/dispatch/DispatchStateContainer.js +319 -610
- package/lib/module/manager/dispatch/DispatchStateContainer.js.map +1 -1
- package/lib/module/manager/dispatchCodes/EventCodeContainer.js.map +1 -1
- package/lib/module/manager/dispatchCodes/EventCodeRepo.js.map +1 -1
- package/lib/module/manager/dispatchCodes/ReasonCodeContainer.js.map +1 -1
- package/lib/module/manager/dispatchCodes/ReasonCodeRepo.js.map +1 -1
- package/lib/module/manager/jobRemoval/JobRemovalManager.js +21 -19
- package/lib/module/manager/jobRemoval/JobRemovalManager.js.map +1 -1
- package/lib/module/manager/location/LocationManager.js.map +1 -1
- package/lib/module/manager/sdk/DispatchSDKManager.js +15 -1
- package/lib/module/manager/sdk/DispatchSDKManager.js.map +1 -1
- package/lib/module/manager/sdk/DispatchSdkCache.js +2 -2
- 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 +15 -1
- package/lib/module/manager/syncmanager/AppSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/DBConfig.js +32 -2
- package/lib/module/manager/syncmanager/DBConfig.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.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentHttpClient.js +11 -17
- package/lib/module/manager/syncmanager/document/DocumentHttpClient.js.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentManager.js +5 -6
- package/lib/module/manager/syncmanager/document/DocumentManager.js.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentSyncManager.js +16 -6
- package/lib/module/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/events/ETEventsManager.js +377 -25
- package/lib/module/manager/syncmanager/events/ETEventsManager.js.map +1 -1
- package/lib/module/manager/syncmanager/events/EventsSyncManager.js +183 -65
- package/lib/module/manager/syncmanager/events/EventsSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/events/SyncHttpClient.js +147 -34
- package/lib/module/manager/syncmanager/events/SyncHttpClient.js.map +1 -1
- package/lib/module/models/DispatchModels.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/sdk.js.map +1 -1
- package/lib/module/native/signature/SignatureCapture.js.map +1 -1
- package/lib/module/network/GraphQLClient.js.map +1 -1
- package/lib/module/network/NetworkClient.js.map +1 -1
- package/lib/module/network/NetworkUtils.js.map +1 -1
- package/lib/module/network/client.js.map +1 -1
- package/lib/module/resources/Login.js.map +1 -1
- package/lib/module/resources/network.js.map +1 -1
- package/lib/module/styles/SdkColors.js +4 -2
- package/lib/module/styles/SdkColors.js.map +1 -1
- package/lib/module/styles/executionTasks/CommonStyles.js +19 -10
- package/lib/module/styles/executionTasks/CommonStyles.js.map +1 -1
- package/lib/module/ui/screens/CancellationScreen.js +39 -8
- package/lib/module/ui/screens/CancellationScreen.js.map +1 -1
- package/lib/module/ui/screens/CaptureInputScreen.js +12 -4
- package/lib/module/ui/screens/CaptureInputScreen.js.map +1 -1
- package/lib/module/ui/screens/CompleteObjectiveScreen.js +12 -5
- package/lib/module/ui/screens/CompleteObjectiveScreen.js.map +1 -1
- package/lib/module/ui/screens/DeliverScreen.js +27 -5
- package/lib/module/ui/screens/DeliverScreen.js.map +1 -1
- package/lib/module/ui/screens/DisplayScreen.js +12 -3
- package/lib/module/ui/screens/DisplayScreen.js.map +1 -1
- package/lib/module/ui/screens/DoodleScreen.js +14 -7
- package/lib/module/ui/screens/DoodleScreen.js.map +1 -1
- package/lib/module/ui/screens/DropCashScreen.js +42 -16
- package/lib/module/ui/screens/DropCashScreen.js.map +1 -1
- package/lib/module/ui/screens/ETScreensIndex.js +1 -2
- package/lib/module/ui/screens/ETScreensIndex.js.map +1 -1
- package/lib/module/ui/screens/FormsScreen.js +96 -29
- package/lib/module/ui/screens/FormsScreen.js.map +1 -1
- package/lib/module/ui/screens/GeofenceScreen.js +11 -3
- package/lib/module/ui/screens/GeofenceScreen.js.map +1 -1
- package/lib/module/ui/screens/HttpRequestScreen.js +11 -3
- package/lib/module/ui/screens/HttpRequestScreen.js.map +1 -1
- package/lib/module/ui/screens/ImageCaptureScreen.js +27 -19
- package/lib/module/ui/screens/ImageCaptureScreen.js.map +1 -1
- package/lib/module/ui/screens/PaymentScreen.js +23 -12
- package/lib/module/ui/screens/PaymentScreen.js.map +1 -1
- package/lib/module/ui/screens/PickupScreen.js +36 -10
- package/lib/module/ui/screens/PickupScreen.js.map +1 -1
- package/lib/module/ui/screens/ScanScreen.js +74 -222
- package/lib/module/ui/screens/ScanScreen.js.map +1 -1
- package/lib/module/ui/screens/StartWorkFlowScreen.js +51 -16
- package/lib/module/ui/screens/StartWorkFlowScreen.js.map +1 -1
- package/lib/module/ui/screens/ValidateOTPScreen.js +14 -8
- package/lib/module/ui/screens/ValidateOTPScreen.js.map +1 -1
- package/lib/module/ui/screens/WithBaseDispatchScreen.js.map +1 -1
- package/lib/module/ui/uiConfig/RouteParams.js +19 -5
- package/lib/module/ui/uiConfig/RouteParams.js.map +1 -1
- package/lib/module/utils/ApiUtils.js +17 -2
- package/lib/module/utils/ApiUtils.js.map +1 -1
- package/lib/module/utils/ExecTaskUtils.js +33 -25
- package/lib/module/utils/ExecTaskUtils.js.map +1 -1
- package/lib/module/utils/Logger.js.map +1 -1
- package/lib/module/utils/NetworkUtil.js.map +1 -1
- package/lib/module/utils/SdkUtils.js.map +1 -1
- package/lib/module/utils/SyncManagerUtils.js +37 -4
- package/lib/module/utils/SyncManagerUtils.js.map +1 -1
- package/lib/module/utils/fcm/FCM.js +64 -35
- package/lib/module/utils/fcm/FCM.js.map +1 -1
- package/lib/module/utils/fcm/FcmUtils.js +82 -46
- package/lib/module/utils/fcm/FcmUtils.js.map +1 -1
- 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/loginHelper.js.map +1 -1
- package/lib/module/utils/storage.js +37 -2
- package/lib/module/utils/storage.js.map +1 -1
- package/lib/module/utils/utils.js.map +1 -1
- package/lib/typescript/components/dispatch/DispatchExecNavigator.d.ts +2 -2
- package/lib/typescript/components/executiontasks/ExecutionTasksIndex.d.ts +3 -8
- package/lib/typescript/components/executiontasks/cancellation/CancelET.d.ts +2 -2
- 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 +1 -0
- 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/doodle/SignatureET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/dropCash/DropCashET.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/widgets/DateTimeWidget.d.ts +2 -2
- package/lib/typescript/components/executiontasks/forms/widgets/DropdownWidget.d.ts +2 -2
- 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/imageCapture/CaptureSchema.d.ts +1 -0
- 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/init/InitPaymentET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/payments/processPayment/ProcessPaymentET.d.ts +2 -2
- 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 +3 -3
- package/lib/typescript/components/executiontasks/scan/ScanSchema.d.ts +25 -9
- package/lib/typescript/components/executiontasks/scan/interfaces.d.ts +54 -1
- package/lib/typescript/components/executiontasks/scan/modalConstant.d.ts +37 -0
- package/lib/typescript/components/executiontasks/scan/sub_components/CScanner.d.ts +1 -1
- package/lib/typescript/components/executiontasks/scan/sub_components/DropDownUtils.d.ts +1 -1
- package/lib/typescript/components/executiontasks/scan/sub_components/ERDropDown.d.ts +1 -1
- package/lib/typescript/components/executiontasks/scan/sub_components/SummaryPage.d.ts +21 -0
- package/lib/typescript/components/executiontasks/scan/utils.d.ts +29 -13
- package/lib/typescript/components/executiontasks/validateOTP/ValidateOTPET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/validateOTP/sub-components/OTPInput.d.ts +2 -2
- 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 +3 -3
- 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 +2 -2
- 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 +3 -2
- package/lib/typescript/components/widgets/SplitTextInput.d.ts +2 -2
- package/lib/typescript/components/widgets/TabsComponent.d.ts +15 -0
- package/lib/typescript/constants/apiConstants.d.ts +1 -0
- package/lib/typescript/constants/constants.d.ts +2 -2
- package/lib/typescript/events/EventDispatcher.d.ts +0 -2
- package/lib/typescript/events/constants.d.ts +2 -0
- package/lib/typescript/events/interface.d.ts +1 -1
- package/lib/typescript/icons/file.d.ts +4 -0
- package/lib/typescript/icons/interface.d.ts +5 -0
- package/lib/typescript/index.d.ts +8 -6
- package/lib/typescript/manager/dispatch/DispatchStateContainer.d.ts +27 -19
- package/lib/typescript/manager/jobRemoval/JobRemovalManager.d.ts +0 -6
- package/lib/typescript/manager/sdk/DispatchSdkCache.d.ts +0 -1
- package/lib/typescript/manager/sdk/callbacksHandler.d.ts +13 -0
- package/lib/typescript/manager/syncmanager/AppSyncManager.d.ts +2 -1
- package/lib/typescript/manager/syncmanager/DBConfig.d.ts +63 -7
- package/lib/typescript/manager/syncmanager/constants.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/events/ETEventsManager.d.ts +11 -2
- package/lib/typescript/manager/syncmanager/events/EventsSyncManager.d.ts +3 -5
- package/lib/typescript/manager/syncmanager/events/SyncHttpClient.d.ts +4 -3
- package/lib/typescript/models/DispatchModels.d.ts +40 -41
- package/lib/typescript/models/execTasks/ETBaseModels.d.ts +21 -16
- package/lib/typescript/models/sdk.d.ts +7 -0
- package/lib/typescript/native/signature/SignatureCapture.d.ts +1 -1
- package/lib/typescript/styles/SdkColors.d.ts +1 -0
- package/lib/typescript/styles/executionTasks/CommonStyles.d.ts +16 -7
- 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 +1 -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 +2 -2
- package/lib/typescript/ui/screens/StartWorkFlowScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/ValidateOTPScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/WithBaseDispatchScreen.d.ts +2 -2
- package/lib/typescript/ui/uiConfig/RouteParams.d.ts +10 -4
- package/lib/typescript/utils/ExecTaskUtils.d.ts +5 -4
- package/lib/typescript/utils/SyncManagerUtils.d.ts +4 -5
- package/lib/typescript/utils/hooks/useModal.d.ts +6 -0
- package/lib/typescript/utils/storage.d.ts +15 -0
- package/package.json +5 -4
- package/tsconfig.json +0 -1
- package/android/.gradle/6.8/fileHashes/fileHashes.lock +0 -0
- package/android/.idea/workspace.xml +0 -131
- package/lib/commonjs/components/executiontasks/doodle/DoodleUtils.js +0 -26
- package/lib/commonjs/components/executiontasks/doodle/DoodleUtils.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scan/sub_components/ScanList.js +0 -134
- package/lib/commonjs/components/executiontasks/scan/sub_components/ScanList.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/CScanner.js +0 -105
- package/lib/commonjs/components/executiontasks/scanner/CScanner.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/ScannerSchema.js +0 -27
- package/lib/commonjs/components/executiontasks/scanner/ScannerSchema.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/ScannerUtils.js +0 -164
- package/lib/commonjs/components/executiontasks/scanner/ScannerUtils.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/DropDownSelector.js +0 -15
- package/lib/commonjs/components/executiontasks/scanner/returns/DropDownSelector.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/DropDownUtils.js +0 -40
- package/lib/commonjs/components/executiontasks/scanner/returns/DropDownUtils.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/RTReasonSelection.js +0 -93
- package/lib/commonjs/components/executiontasks/scanner/returns/RTReasonSelection.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/RTScan.js +0 -278
- package/lib/commonjs/components/executiontasks/scanner/returns/RTScan.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/ReasonDropDown.js +0 -83
- package/lib/commonjs/components/executiontasks/scanner/returns/ReasonDropDown.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/ScanList.js +0 -248
- package/lib/commonjs/components/executiontasks/scanner/returns/ScanList.js.map +0 -1
- package/lib/commonjs/ui/screens/RTScanScreen.js +0 -99
- 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/scan/sub_components/ScanList.js +0 -124
- package/lib/module/components/executiontasks/scan/sub_components/ScanList.js.map +0 -1
- package/lib/module/components/executiontasks/scanner/CScanner.js +0 -96
- 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 -146
- package/lib/module/components/executiontasks/scanner/ScannerUtils.js.map +0 -1
- package/lib/module/components/executiontasks/scanner/returns/DropDownSelector.js +0 -7
- package/lib/module/components/executiontasks/scanner/returns/DropDownSelector.js.map +0 -1
- package/lib/module/components/executiontasks/scanner/returns/DropDownUtils.js +0 -33
- package/lib/module/components/executiontasks/scanner/returns/DropDownUtils.js.map +0 -1
- package/lib/module/components/executiontasks/scanner/returns/RTReasonSelection.js +0 -83
- package/lib/module/components/executiontasks/scanner/returns/RTReasonSelection.js.map +0 -1
- package/lib/module/components/executiontasks/scanner/returns/RTScan.js +0 -269
- package/lib/module/components/executiontasks/scanner/returns/RTScan.js.map +0 -1
- package/lib/module/components/executiontasks/scanner/returns/ReasonDropDown.js +0 -73
- package/lib/module/components/executiontasks/scanner/returns/ReasonDropDown.js.map +0 -1
- package/lib/module/components/executiontasks/scanner/returns/ScanList.js +0 -238
- package/lib/module/components/executiontasks/scanner/returns/ScanList.js.map +0 -1
- package/lib/module/ui/screens/RTScanScreen.js +0 -89
- 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/scan/sub_components/ScanList.d.ts +0 -8
- package/lib/typescript/components/executiontasks/scanner/CScanner.d.ts +0 -7
- 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 -2
- 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/android/.gradle/{6.8 → 7.0.2}/fileChanges/last-build.bin +0 -0
- /package/android/.gradle/{6.8 → 7.0.2}/gc.properties +0 -0
- /package/android/.gradle/{configuration-cache → 7.2/dependencies-accessors}/gc.properties +0 -0
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import React, { memo, useEffect, useState } from 'react';
|
|
2
|
-
import { StyleSheet, Text, View } from 'react-native';
|
|
3
|
-
import { Camera } from 'expo-camera';
|
|
4
|
-
import { isEmptyOrBlank } from '../../../utils/utils';
|
|
5
|
-
import { checkCameraPermissionUtil } from '../imageCapture/CaptureUtils';
|
|
6
|
-
import { Title } from 'react-native-paper';
|
|
7
|
-
import { BlurView } from 'expo-blur';
|
|
8
|
-
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
9
|
-
import { Fonts } from '../../../styles/executionTasks/CommonStyles';
|
|
10
|
-
function Hint(_ref) {
|
|
11
|
-
let {
|
|
12
|
-
children
|
|
13
|
-
} = _ref;
|
|
14
|
-
return /*#__PURE__*/React.createElement(BlurView, {
|
|
15
|
-
style: styles.hint,
|
|
16
|
-
intensity: 50,
|
|
17
|
-
tint: "dark"
|
|
18
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
19
|
-
style: styles.headerText
|
|
20
|
-
}, children));
|
|
21
|
-
}
|
|
22
|
-
const CScanner = props => {
|
|
23
|
-
const [isVisible, setVisible] = useState(true);
|
|
24
|
-
const [hasPermission, setHasPermission] = useState(null);
|
|
25
|
-
const {
|
|
26
|
-
bottom
|
|
27
|
-
} = useSafeAreaInsets();
|
|
28
|
-
useEffect(() => {
|
|
29
|
-
(async () => {
|
|
30
|
-
let response = await checkCameraPermissionUtil();
|
|
31
|
-
setHasPermission(response);
|
|
32
|
-
})();
|
|
33
|
-
}, []);
|
|
34
|
-
const _handleBarCodeScanned = scan => {
|
|
35
|
-
if (!isEmptyOrBlank(scan.data)) {
|
|
36
|
-
setVisible(false);
|
|
37
|
-
props.onScanned(scan.data);
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
if (!hasPermission) {
|
|
41
|
-
return /*#__PURE__*/React.createElement(View, {
|
|
42
|
-
style: {
|
|
43
|
-
flex: 1,
|
|
44
|
-
justifyContent: 'center',
|
|
45
|
-
alignItems: 'center'
|
|
46
|
-
}
|
|
47
|
-
}, /*#__PURE__*/React.createElement(Title, null, 'No Permissions for Camera. Please provide camera permissions from app\
|
|
48
|
-
settings.'));
|
|
49
|
-
}
|
|
50
|
-
return /*#__PURE__*/React.createElement(View, {
|
|
51
|
-
style: styles.container
|
|
52
|
-
}, isVisible ? /*#__PURE__*/React.createElement(Camera, {
|
|
53
|
-
barCodeScannerSettings: {
|
|
54
|
-
barCodeTypes: props.barCodeTypes
|
|
55
|
-
},
|
|
56
|
-
onBarCodeScanned: _handleBarCodeScanned,
|
|
57
|
-
style: StyleSheet.absoluteFill
|
|
58
|
-
}) : null, /*#__PURE__*/React.createElement(View, {
|
|
59
|
-
style: [styles.header, {
|
|
60
|
-
bottom: 16 + bottom
|
|
61
|
-
}]
|
|
62
|
-
}, /*#__PURE__*/React.createElement(Hint, null, 'or \nScan Shipment ID')));
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
// exporting Scanner as Pure Component
|
|
66
|
-
export default /*#__PURE__*/memo(CScanner);
|
|
67
|
-
const styles = StyleSheet.create({
|
|
68
|
-
container: {
|
|
69
|
-
flex: 1,
|
|
70
|
-
backgroundColor: '#000',
|
|
71
|
-
justifyContent: 'center',
|
|
72
|
-
alignItems: 'center'
|
|
73
|
-
},
|
|
74
|
-
hint: {
|
|
75
|
-
paddingHorizontal: 16,
|
|
76
|
-
paddingVertical: 20,
|
|
77
|
-
overflow: 'hidden',
|
|
78
|
-
justifyContent: 'center',
|
|
79
|
-
alignItems: 'center'
|
|
80
|
-
},
|
|
81
|
-
headerText: {
|
|
82
|
-
color: '#fff',
|
|
83
|
-
backgroundColor: 'transparent',
|
|
84
|
-
textAlign: 'center',
|
|
85
|
-
fontSize: 16,
|
|
86
|
-
fontWeight: '500'
|
|
87
|
-
},
|
|
88
|
-
header: {
|
|
89
|
-
position: 'absolute',
|
|
90
|
-
left: 0,
|
|
91
|
-
right: 0,
|
|
92
|
-
alignItems: 'center',
|
|
93
|
-
fontFamily: Fonts.IBMPlexSans_600SemiBold
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
//# sourceMappingURL=CScanner.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","memo","useEffect","useState","StyleSheet","Text","View","Camera","isEmptyOrBlank","checkCameraPermissionUtil","Title","BlurView","useSafeAreaInsets","Fonts","Hint","_ref","children","createElement","style","styles","hint","intensity","tint","headerText","CScanner","props","isVisible","setVisible","hasPermission","setHasPermission","bottom","response","_handleBarCodeScanned","scan","data","onScanned","flex","justifyContent","alignItems","container","barCodeScannerSettings","barCodeTypes","onBarCodeScanned","absoluteFill","header","create","backgroundColor","paddingHorizontal","paddingVertical","overflow","color","textAlign","fontSize","fontWeight","position","left","right","fontFamily","IBMPlexSans_600SemiBold"],"sources":["CScanner.tsx"],"sourcesContent":["import React, { memo, useEffect, useState } from 'react';\nimport { StyleSheet, Text, View } from 'react-native';\nimport { BarCodeScanningResult, Camera } from 'expo-camera';\nimport { isEmptyOrBlank } from '../../../utils/utils';\nimport { checkCameraPermissionUtil } from '../imageCapture/CaptureUtils';\nimport { Title } from 'react-native-paper';\nimport { BlurView } from 'expo-blur';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\nimport { Fonts } from '../../../styles/executionTasks/CommonStyles';\n\nfunction Hint({ children }: { children: string }) {\n return (\n <BlurView style={styles.hint} intensity={50} tint=\"dark\">\n <Text style={styles.headerText}>{children}</Text>\n </BlurView>\n );\n}\nconst CScanner = (props: CScannerProps) => {\n const [isVisible, setVisible] = useState(true);\n const [hasPermission, setHasPermission] = useState<boolean | null>(null);\n const { bottom } = useSafeAreaInsets();\n\n useEffect(() => {\n (async () => {\n let response = await checkCameraPermissionUtil();\n setHasPermission(response);\n })();\n }, []);\n\n const _handleBarCodeScanned = (scan: BarCodeScanningResult) => {\n if (!isEmptyOrBlank(scan.data)) {\n setVisible(false);\n props.onScanned(scan.data);\n }\n };\n\n if (!hasPermission) {\n return (\n <View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>\n <Title>\n {\n 'No Permissions for Camera. Please provide camera permissions from app\\\n settings.'\n }\n </Title>\n </View>\n );\n }\n return (\n <View style={styles.container}>\n {isVisible ? (\n <Camera\n barCodeScannerSettings={{\n barCodeTypes: props.barCodeTypes,\n }}\n onBarCodeScanned={_handleBarCodeScanned}\n style={StyleSheet.absoluteFill}\n />\n ) : null}\n <View style={[styles.header, { bottom: 16 + bottom }]}>\n <Hint>{'or \\nScan Shipment ID'}</Hint>\n </View>\n </View>\n );\n};\n\n// exporting Scanner as Pure Component\nexport default memo(CScanner);\n\nexport interface CScannerProps {\n barCodeTypes: any[];\n onScanned: (value: string) => void;\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n backgroundColor: '#000',\n justifyContent: 'center',\n alignItems: 'center',\n },\n hint: {\n paddingHorizontal: 16,\n paddingVertical: 20,\n overflow: 'hidden',\n justifyContent: 'center',\n alignItems: 'center',\n },\n\n headerText: {\n color: '#fff',\n backgroundColor: 'transparent',\n textAlign: 'center',\n fontSize: 16,\n fontWeight: '500',\n },\n header: {\n position: 'absolute',\n left: 0,\n right: 0,\n alignItems: 'center',\n fontFamily: Fonts.IBMPlexSans_600SemiBold,\n },\n});\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,IAAI,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AACxD,SAASC,UAAU,EAAEC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AACrD,SAAgCC,MAAM,QAAQ,aAAa;AAC3D,SAASC,cAAc,QAAQ,sBAAsB;AACrD,SAASC,yBAAyB,QAAQ,8BAA8B;AACxE,SAASC,KAAK,QAAQ,oBAAoB;AAC1C,SAASC,QAAQ,Q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AC;IACRlB,UAAU,EAAE,QAAQ;IACpBmB,UAAU,EAAE5C,KAAK,CAAC6C;EACpB;AACF,CAAC,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Type of scan
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Mode of scanning
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Max limit of items to be scanned in multi-scan mode
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Regex to validate scanned strings
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
export let SCAN_STATUS = /*#__PURE__*/function (SCAN_STATUS) {
|
|
18
|
-
SCAN_STATUS[SCAN_STATUS["ACCEPTED"] = 0] = "ACCEPTED";
|
|
19
|
-
SCAN_STATUS[SCAN_STATUS["REJECTED"] = 1] = "REJECTED";
|
|
20
|
-
SCAN_STATUS[SCAN_STATUS["TO_BE_SCANNED"] = 2] = "TO_BE_SCANNED";
|
|
21
|
-
SCAN_STATUS[SCAN_STATUS["NONE"] = 3] = "NONE";
|
|
22
|
-
return SCAN_STATUS;
|
|
23
|
-
}({});
|
|
24
|
-
//# sourceMappingURL=ScannerSchema.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["SCAN_STATUS"],"sources":["ScannerSchema.ts"],"sourcesContent":["/**\n * Type of scan\n */\nimport type {\n BaseETRequest,\n BaseETResponse,\n} from '../../../models/execTasks/ETBaseModels';\nimport type { Headers, HTTPMethod } from '../httpRequest/HttpRequestETSchema';\n\nexport type ScanType = 'BARCODE' | 'QRCODE';\n/**\n * Mode of scanning\n */\nexport type ScanMode = 'SINGLE' | 'MULTI';\n/**\n * Max limit of items to be scanned in multi-scan mode\n */\nexport type MaxScanCount = number;\n/**\n * Regex to validate scanned strings\n */\nexport type ValidationRegex = string;\n\nexport type ScannerInput = BaseETRequest & {\n scanType: ScanType;\n scanMode: ScanMode;\n preSelectReasonCode?: boolean;\n scans?: string[];\n scanCountLimit?: MaxScanCount;\n onSubmitET: (scanETOutput: ScannerOutput | ScannedItemData[]) => void;\n\n validation?: API | ValidationRegex;\n};\n\nexport interface API {\n uri: string;\n timeout?: number;\n httpMethod: HTTPMethod;\n headers?: Headers[];\n responseJsonLogic: object;\n}\n\nexport interface ScanData {\n /**\n * Value of scanned item\n */\n value: string;\n /**\n * Boolean to denote if scan was validate successfully\n */\n validated?: boolean;\n /**\n * Epoch timestamp for the scan\n */\n timestamp: number;\n}\n\nexport interface ScannedItemData {\n /**\n * Value of scanned item\n */\n value: string;\n /**\n * Boolean to denote if scan was validate successfully\n */\n validated?: boolean;\n /**\n * Epoch timestamp for the scan\n */\n timestamp?: number;\n reasonCode?: string;\n reasonText?: string;\n success?: boolean;\n scanStatus: SCAN_STATUS;\n}\nexport enum SCAN_STATUS {\n ACCEPTED,\n REJECTED,\n TO_BE_SCANNED,\n NONE,\n}\n\nexport type ScannerOutput = BaseETResponse & {\n scans: ScanData[];\n};\n"],"mappings":"AAAA;AACA;AACA;;AAQA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAuDA,WAAYA,WAAW,0BAAXA,WAAW;EAAXA,WAAW,CAAXA,WAAW;EAAXA,WAAW,CAAXA,WAAW;EAAXA,WAAW,CAAXA,WAAW;EAAXA,WAAW,CAAXA,WAAW;EAAA,OAAXA,WAAW;AAAA"}
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
import { SCAN_STATUS } from './ScannerSchema';
|
|
2
|
-
import { BarCodeScanner } from 'expo-barcode-scanner';
|
|
3
|
-
import { getBaseETResponse } from '../../../utils/ExecTaskUtils';
|
|
4
|
-
import { getEventCodeByET } from '../../../manager/dispatchCodes/EventCodeContainer';
|
|
5
|
-
import { EntityCode, ExecutionTaskID } from '../../../models/execTasks/ETConfig';
|
|
6
|
-
import { getApiResponse } from '../httpRequest/HttpEtUtils';
|
|
7
|
-
import * as jsonLogic from 'json-logic-js';
|
|
8
|
-
export async function checkForValidation(data, validationRule, shipments) {
|
|
9
|
-
if (shipments && shipments.length > 0) {
|
|
10
|
-
const found = shipments.find(s => s === data);
|
|
11
|
-
return found !== undefined;
|
|
12
|
-
} else if (validationRule && typeof validationRule === 'string') {
|
|
13
|
-
const regex = new RegExp(validationRule);
|
|
14
|
-
return regex.test(data);
|
|
15
|
-
} else if (validationRule && typeof validationRule === 'object') {
|
|
16
|
-
try {
|
|
17
|
-
const validation = validationRule;
|
|
18
|
-
const apiResponse = await getApiResponse({
|
|
19
|
-
errorJsonPath: '',
|
|
20
|
-
responseJsonPath: '',
|
|
21
|
-
uri: validation.uri,
|
|
22
|
-
httpMethod: validation.httpMethod,
|
|
23
|
-
timeout: validation.timeout,
|
|
24
|
-
headers: validation.headers
|
|
25
|
-
});
|
|
26
|
-
return jsonLogic.apply(validation.responseJsonLogic, apiResponse.data);
|
|
27
|
-
} catch (error) {
|
|
28
|
-
return false;
|
|
29
|
-
}
|
|
30
|
-
} else return false;
|
|
31
|
-
}
|
|
32
|
-
export function isScannedAlready(value, scansMap) {
|
|
33
|
-
var _scansMap$get;
|
|
34
|
-
if (!scansMap || scansMap.size === 0) return false;
|
|
35
|
-
return scansMap.has(value) && ((_scansMap$get = scansMap.get(value)) === null || _scansMap$get === void 0 ? void 0 : _scansMap$get.scanStatus) !== SCAN_STATUS.TO_BE_SCANNED;
|
|
36
|
-
}
|
|
37
|
-
export function getBarCodeTypes(input) {
|
|
38
|
-
if (input.scanType === 'QRCODE') {
|
|
39
|
-
return [BarCodeScanner.Constants.BarCodeType.qr];
|
|
40
|
-
} else {
|
|
41
|
-
return [BarCodeScanner.Constants.BarCodeType.code128, BarCodeScanner.Constants.BarCodeType.code39, BarCodeScanner.Constants.BarCodeType.code93, BarCodeScanner.Constants.BarCodeType.codabar, BarCodeScanner.Constants.BarCodeType.itf14, BarCodeScanner.Constants.BarCodeType.upc_a, BarCodeScanner.Constants.BarCodeType.ean8, BarCodeScanner.Constants.BarCodeType.ean13, BarCodeScanner.Constants.BarCodeType.upc_e, BarCodeScanner.Constants.BarCodeType.upc_ean];
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
export async function getScannerETOutput(scanList) {
|
|
45
|
-
return {
|
|
46
|
-
scans: getScannedItems(scanList),
|
|
47
|
-
...(await getBaseETResponse(EntityCode.SCAN, true,
|
|
48
|
-
//this component is not used, if utilized, add applicableReasons.success in getEventCodeByET as 3rd param
|
|
49
|
-
getEventCodeByET(ExecutionTaskID.SCAN, true), ''))
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
function getScannedItems(scanList) {
|
|
53
|
-
const items = [];
|
|
54
|
-
if (!scanList || scanList.length === 0) return items;else {
|
|
55
|
-
scanList.forEach(ite => {
|
|
56
|
-
items.push({
|
|
57
|
-
value: ite.value,
|
|
58
|
-
validated: ite.validated,
|
|
59
|
-
timestamp: ite.timestamp ?? Date.now()
|
|
60
|
-
});
|
|
61
|
-
});
|
|
62
|
-
return items;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
export function canScanMore(scanMode, size, limit) {
|
|
66
|
-
if (scanMode === 'SINGLE') {
|
|
67
|
-
return size <= 0;
|
|
68
|
-
} else {
|
|
69
|
-
//multi scan mode
|
|
70
|
-
if (limit && limit > 0) {
|
|
71
|
-
return size !== limit;
|
|
72
|
-
} else {
|
|
73
|
-
return true;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
export function getScannedList(rtScans) {
|
|
78
|
-
if (!rtScans || rtScans.length === 0) return [];
|
|
79
|
-
let result = [];
|
|
80
|
-
rtScans.forEach(s => {
|
|
81
|
-
result.push({
|
|
82
|
-
value: s.value,
|
|
83
|
-
validated: s.validated,
|
|
84
|
-
timestamp: s.timestamp ?? Date.now()
|
|
85
|
-
});
|
|
86
|
-
});
|
|
87
|
-
return result;
|
|
88
|
-
}
|
|
89
|
-
export function getItemsToBeScanned(scansMap) {
|
|
90
|
-
if (!scansMap || scansMap.size === 0) return [];else {
|
|
91
|
-
const result = [];
|
|
92
|
-
scansMap.forEach(value => {
|
|
93
|
-
result.push(value);
|
|
94
|
-
});
|
|
95
|
-
return result;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
export let SCAN_ACTIONS = /*#__PURE__*/function (SCAN_ACTIONS) {
|
|
99
|
-
SCAN_ACTIONS[SCAN_ACTIONS["DELETE"] = 0] = "DELETE";
|
|
100
|
-
SCAN_ACTIONS[SCAN_ACTIONS["CHANGE_STATUS"] = 1] = "CHANGE_STATUS";
|
|
101
|
-
return SCAN_ACTIONS;
|
|
102
|
-
}({});
|
|
103
|
-
export function getScannedItemCount(scannedList, status) {
|
|
104
|
-
if (!scannedList || scannedList.length === 0) return 0;
|
|
105
|
-
let completed = 0;
|
|
106
|
-
let rejected = 0;
|
|
107
|
-
let toBeScanned = 0;
|
|
108
|
-
scannedList.forEach(r => {
|
|
109
|
-
switch (r.scanStatus) {
|
|
110
|
-
case SCAN_STATUS.ACCEPTED:
|
|
111
|
-
case SCAN_STATUS.NONE:
|
|
112
|
-
completed++;
|
|
113
|
-
break;
|
|
114
|
-
case SCAN_STATUS.TO_BE_SCANNED:
|
|
115
|
-
toBeScanned++;
|
|
116
|
-
break;
|
|
117
|
-
case SCAN_STATUS.REJECTED:
|
|
118
|
-
rejected++;
|
|
119
|
-
break;
|
|
120
|
-
default:
|
|
121
|
-
break;
|
|
122
|
-
}
|
|
123
|
-
});
|
|
124
|
-
switch (status) {
|
|
125
|
-
case SCAN_STATUS.ACCEPTED:
|
|
126
|
-
case SCAN_STATUS.NONE:
|
|
127
|
-
return completed;
|
|
128
|
-
case SCAN_STATUS.TO_BE_SCANNED:
|
|
129
|
-
return toBeScanned;
|
|
130
|
-
case SCAN_STATUS.REJECTED:
|
|
131
|
-
return rejected;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
export function getScannedItemStatus(scanStatus) {
|
|
135
|
-
switch (scanStatus) {
|
|
136
|
-
case SCAN_STATUS.TO_BE_SCANNED:
|
|
137
|
-
return 'To be Scanned';
|
|
138
|
-
case SCAN_STATUS.ACCEPTED:
|
|
139
|
-
return 'Completed';
|
|
140
|
-
case SCAN_STATUS.REJECTED:
|
|
141
|
-
return 'Rejected';
|
|
142
|
-
case SCAN_STATUS.NONE:
|
|
143
|
-
return '';
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
//# sourceMappingURL=ScannerUtils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["SCAN_STATUS","BarCodeScanner","getBaseETResponse","getEventCodeByET","EntityCode","ExecutionTaskID","getApiResponse","jsonLogic","checkForValidation","data","validationRule","shipments","length","found","find","s","undefined","regex","RegExp","test","validation","apiResponse","errorJsonPath","responseJsonPath","uri","httpMethod","timeout","headers","apply","responseJsonLogic","error","isScannedAlready","value","scansMap","_scansMap$get","size","has","get","scanStatus","TO_BE_SCANNED","getBarCodeTypes","input","scanType","Constants","BarCodeType","qr","code128","code39","code93","codabar","itf14","upc_a","ean8","ean13","upc_e","upc_ean","getScannerETOutput","scanList","scans","getScannedItems","SCAN","items","forEach","ite","push","validated","timestamp","Date","now","canScanMore","scanMode","limit","getScannedList","rtScans","result","getItemsToBeScanned","SCAN_ACTIONS","getScannedItemCount","scannedList","status","completed","rejected","toBeScanned","r","ACCEPTED","NONE","REJECTED","getScannedItemStatus"],"sources":["ScannerUtils.ts"],"sourcesContent":["import type {\n API,\n ScanData,\n ScanMode,\n ScannedItemData,\n ScannerInput,\n ScannerOutput,\n} from './ScannerSchema';\nimport { SCAN_STATUS } from './ScannerSchema';\nimport { BarCodeScanner } from 'expo-barcode-scanner';\nimport { getBaseETResponse } from '../../../utils/ExecTaskUtils';\nimport { getEventCodeByET } from '../../../manager/dispatchCodes/EventCodeContainer';\nimport {\n EntityCode,\n ExecutionTaskID,\n} from '../../../models/execTasks/ETConfig';\nimport { getApiResponse } from '../httpRequest/HttpEtUtils';\nimport type { RulesLogic } from 'json-logic-js';\nimport * as jsonLogic from 'json-logic-js';\n\nexport async function checkForValidation(\n data: string,\n validationRule: API | string | undefined,\n shipments: string[] | undefined\n) {\n if (shipments && shipments.length > 0) {\n const found = shipments.find((s) => s === data);\n return found !== undefined;\n } else if (validationRule && typeof validationRule === 'string') {\n const regex = new RegExp(validationRule);\n return regex.test(data);\n } else if (validationRule && typeof validationRule === 'object') {\n try {\n const validation = validationRule as API;\n const apiResponse = await getApiResponse({\n errorJsonPath: '',\n responseJsonPath: '',\n uri: validation.uri,\n httpMethod: validation.httpMethod,\n timeout: validation.timeout,\n headers: validation.headers,\n });\n return jsonLogic.apply(\n <RulesLogic>validation.responseJsonLogic,\n apiResponse.data\n );\n } catch (error: any) {\n return false;\n }\n } else return false;\n}\nexport function isScannedAlready(\n value: string,\n scansMap?: Map<string, ScannedItemData>\n) {\n if (!scansMap || scansMap.size === 0) return false;\n return (\n scansMap.has(value) &&\n scansMap.get(value)?.scanStatus !== SCAN_STATUS.TO_BE_SCANNED\n );\n}\n\nexport function getBarCodeTypes(input: ScannerInput): any[] {\n if (input.scanType === 'QRCODE') {\n return [BarCodeScanner.Constants.BarCodeType.qr];\n } else {\n return [\n BarCodeScanner.Constants.BarCodeType.code128,\n BarCodeScanner.Constants.BarCodeType.code39,\n BarCodeScanner.Constants.BarCodeType.code93,\n BarCodeScanner.Constants.BarCodeType.codabar,\n BarCodeScanner.Constants.BarCodeType.itf14,\n BarCodeScanner.Constants.BarCodeType.upc_a,\n BarCodeScanner.Constants.BarCodeType.ean8,\n BarCodeScanner.Constants.BarCodeType.ean13,\n BarCodeScanner.Constants.BarCodeType.upc_e,\n BarCodeScanner.Constants.BarCodeType.upc_ean,\n ];\n }\n}\n\nexport async function getScannerETOutput(\n scanList: ScannedItemData[]\n): Promise<ScannerOutput> {\n return {\n scans: getScannedItems(scanList),\n ...(await getBaseETResponse(\n EntityCode.SCAN,\n true,\n //this component is not used, if utilized, add applicableReasons.success in getEventCodeByET as 3rd param\n getEventCodeByET(ExecutionTaskID.SCAN, true),\n ''\n )),\n };\n}\n\nfunction getScannedItems(scanList: ScannedItemData[]): ScanData[] {\n const items: ScanData[] = [];\n if (!scanList || scanList.length === 0) return items;\n else {\n scanList.forEach((ite) => {\n items.push({\n value: ite.value,\n validated: ite.validated,\n timestamp: ite.timestamp ?? Date.now(),\n });\n });\n\n return items;\n }\n}\n\nexport function canScanMore(\n scanMode: ScanMode,\n size: number,\n limit?: number\n): boolean {\n if (scanMode === 'SINGLE') {\n return size <= 0;\n } else {\n //multi scan mode\n if (limit && limit > 0) {\n return size !== limit;\n } else {\n return true;\n }\n }\n}\nexport function getScannedList(rtScans?: ScannedItemData[]): ScanData[] {\n if (!rtScans || rtScans.length === 0) return [];\n let result: ScanData[] = [];\n rtScans.forEach((s) => {\n result.push({\n value: s.value,\n validated: s.validated,\n timestamp: s.timestamp ?? Date.now(),\n });\n });\n return result;\n}\nexport function getItemsToBeScanned(scansMap?: Map<string, ScannedItemData>) {\n if (!scansMap || scansMap.size === 0) return [];\n else {\n const result: ScannedItemData[] = [];\n scansMap.forEach((value) => {\n result.push(value);\n });\n return result;\n }\n}\n\nexport enum SCAN_ACTIONS {\n DELETE,\n CHANGE_STATUS,\n}\n\nexport function getScannedItemCount(\n scannedList: ScannedItemData[] | undefined,\n status: SCAN_STATUS\n) {\n if (!scannedList || scannedList.length === 0) return 0;\n let completed = 0;\n let rejected = 0;\n let toBeScanned = 0;\n scannedList.forEach((r) => {\n switch (r.scanStatus) {\n case SCAN_STATUS.ACCEPTED:\n case SCAN_STATUS.NONE:\n completed++;\n break;\n case SCAN_STATUS.TO_BE_SCANNED:\n toBeScanned++;\n break;\n case SCAN_STATUS.REJECTED:\n rejected++;\n break;\n default:\n break;\n }\n });\n switch (status) {\n case SCAN_STATUS.ACCEPTED:\n case SCAN_STATUS.NONE:\n return completed;\n case SCAN_STATUS.TO_BE_SCANNED:\n return toBeScanned;\n case SCAN_STATUS.REJECTED:\n return rejected;\n }\n}\nexport function getScannedItemStatus(scanStatus: SCAN_STATUS) {\n switch (scanStatus) {\n case SCAN_STATUS.TO_BE_SCANNED:\n return 'To be Scanned';\n case SCAN_STATUS.ACCEPTED:\n return 'Completed';\n case SCAN_STATUS.REJECTED:\n return 'Rejected';\n case SCAN_STATUS.NONE:\n return '';\n }\n}\n"],"mappings":"AAQA,SAASA,WAAW,QAAQ,iBAAiB;AAC7C,SAASC,cAAc,QAAQ,sBAAsB;AACrD,SAASC,iBAAiB,QAAQ,8BAA8B;AAChE,SAASC,gBAAgB,QAAQ,mDAAmD;AACpF,SACEC,UAAU,EACVC,eAAe,QACV,oCAAoC;AAC3C,SAASC,cAAc,QAAQ,4BAA4B;AAE3D,OAAO,KAAKC,SAAS,MAAM,eAAe;AAE1C,OAAO,eAAeC,kBAAkBA,CACtCC,IAAY,EACZC,cAAwC,EACxCC,SAA+B,EAC/B;EACA,IAAIA,SAAS,IAAIA,SAAS,CAACC,MAAM,GAAG,CAAC,EAAE;IACrC,MAAMC,KAAK,GAAGF,SAAS,CAACG,IAAI,CAAEC,CAAC,IAAKA,CAAC,KAAKN,IAAI,CAAC;IAC/C,OAAOI,KAAK,KAAKG,SAAS;EAC5B,CAAC,MAAM,IAAIN,cAAc,IAAI,OAAOA,cAAc,KAAK,QAAQ,EAAE;IAC/D,MAAMO,KAAK,GAAG,IAAIC,MAAM,CAACR,cAAc,CAAC;IACxC,OAAOO,KAAK,CAACE,IAAI,CAACV,IAAI,CAAC;EACzB,CAAC,MAAM,IAAIC,cAAc,IAAI,OAAOA,cAAc,KAAK,QAAQ,EAAE;IAC/D,IAAI;MACF,MAAMU,UAAU,GAAGV,cAAqB;MACxC,MAAMW,WAAW,GAAG,MAAMf,cAAc,CAAC;QACvCgB,aAAa,EAAE,EAAE;QACjBC,gBAAgB,EAAE,EAAE;QACpBC,GAAG,EAAEJ,UAAU,CAACI,GAAG;QACnBC,UAAU,EAAEL,UAAU,CAACK,UAAU;QACjCC,OAAO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,KAAKhF,WAAW,CAACuC,aAAa;QAC5B2C,WAAW,EAAE;QACb;MACF,KAAKlF,WAAW,CAACsF,QAAQ;QACvBL,QAAQ,EAAE;QACV;MACF;QACE;IAAM;EAEZ,CAAC,CAAC;EACF,QAAQF,MAAM;IACZ,KAAK/E,WAAW,CAACoF,QAAQ;IACzB,KAAKpF,WAAW,CAACqF,IAAI;MACnB,OAAOL,SAAS;IAClB,KAAKhF,WAAW,CAACuC,aAAa;MAC5B,OAAO2C,WAAW;IACpB,KAAKlF,WAAW,CAACsF,QAAQ;MACvB,OAAOL,QAAQ;EAAC;AAEtB;AACA,OAAO,SAASM,oBAAoBA,CAACjD,UAAuB,EAAE;EAC5D,QAAQA,UAAU;IAChB,KAAKtC,WAAW,CAACuC,aAAa;MAC5B,OAAO,eAAe;IACxB,KAAKvC,WAAW,CAACoF,QAAQ;MACvB,OAAO,WAAW;IACpB,KAAKpF,WAAW,CAACsF,QAAQ;MACvB,OAAO,UAAU;IACnB,KAAKtF,WAAW,CAACqF,IAAI;MACnB,OAAO,EAAE;EAAC;AAEhB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","DropDownSelector","createElement"],"sources":["DropDownSelector.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\n\nconst DropDownSelector = () => {\n return <View></View>;\n};\n\nexport default DropDownSelector;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AAEnC,MAAMC,gBAAgB,GAAGA,CAAA,KAAM;EAC7B,oBAAOF,KAAA,CAAAG,aAAA,CAACF,IAAI,OAAQ;AACtB,CAAC;AAED,eAAeC,gBAAgB"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { BaseEventCodes } from '../../../../models/execTasks/ETConfig';
|
|
2
|
-
import ReasonCodeContainer from '../../../../manager/dispatchCodes/ReasonCodeContainer';
|
|
3
|
-
export async function getDropDownItems(reasonsList) {
|
|
4
|
-
if (!reasonsList) return [];
|
|
5
|
-
let reasons = [];
|
|
6
|
-
if (reasonsList[BaseEventCodes.ENTITY_SUCCESS]) {
|
|
7
|
-
//todo all Image Icon for success and Failure
|
|
8
|
-
for (const r of reasonsList[BaseEventCodes.ENTITY_SUCCESS]) {
|
|
9
|
-
let reasonByCode = await ReasonCodeContainer.getInstance().getReasonByCode(r);
|
|
10
|
-
if (reasonByCode) {
|
|
11
|
-
reasons.push({
|
|
12
|
-
reasonText: (reasonByCode === null || reasonByCode === void 0 ? void 0 : reasonByCode.description) ?? 'NO DESCRIPTION FOUND',
|
|
13
|
-
reasonCode: r,
|
|
14
|
-
success: true
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
if (reasonsList[BaseEventCodes.ENTITY_FAILURE]) {
|
|
20
|
-
for (const r of reasonsList[BaseEventCodes.ENTITY_FAILURE]) {
|
|
21
|
-
let reasonByCode = await ReasonCodeContainer.getInstance().getReasonByCode(r);
|
|
22
|
-
if (reasonByCode) {
|
|
23
|
-
reasons.push({
|
|
24
|
-
reasonText: (reasonByCode === null || reasonByCode === void 0 ? void 0 : reasonByCode.description) ?? 'NO DESCRIPTION FOUND',
|
|
25
|
-
reasonCode: r,
|
|
26
|
-
success: false
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
return reasons;
|
|
32
|
-
}
|
|
33
|
-
//# sourceMappingURL=DropDownUtils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["BaseEventCodes","ReasonCodeContainer","getDropDownItems","reasonsList","reasons","ENTITY_SUCCESS","r","reasonByCode","getInstance","getReasonByCode","push","reasonText","description","reasonCode","success","ENTITY_FAILURE"],"sources":["DropDownUtils.ts"],"sourcesContent":["import type { ReasonItem } from './ReasonDropDown';\nimport { BaseEventCodes } from '../../../../models/execTasks/ETConfig';\nimport ReasonCodeContainer from '../../../../manager/dispatchCodes/ReasonCodeContainer';\n\nexport async function getDropDownItems(\n reasonsList?: any //add applicable reason type when used\n): Promise<ReasonItem[]> {\n if (!reasonsList) return [];\n let reasons: ReasonItem[] = [];\n if (reasonsList[BaseEventCodes.ENTITY_SUCCESS]) {\n //todo all Image Icon for success and Failure\n for (const r of reasonsList[BaseEventCodes.ENTITY_SUCCESS]) {\n let reasonByCode =\n await ReasonCodeContainer.getInstance().getReasonByCode(r);\n if (reasonByCode) {\n reasons.push({\n reasonText: reasonByCode?.description ?? 'NO DESCRIPTION FOUND',\n reasonCode: r,\n success: true,\n });\n }\n }\n }\n if (reasonsList[BaseEventCodes.ENTITY_FAILURE]) {\n for (const r of reasonsList[BaseEventCodes.ENTITY_FAILURE]) {\n let reasonByCode =\n await ReasonCodeContainer.getInstance().getReasonByCode(r);\n if (reasonByCode) {\n reasons.push({\n reasonText: reasonByCode?.description ?? 'NO DESCRIPTION FOUND',\n reasonCode: r,\n success: false,\n });\n }\n }\n }\n return reasons;\n}\n"],"mappings":"AACA,SAASA,cAAc,QAAQ,uCAAuC;AACtE,OAAOC,mBAAmB,MAAM,uDAAuD;AAEvF,OAAO,eAAeC,gBAAgBA,CACpCC,WAAiB,EACM;EACvB,IAAI,CAACA,WAAW,EAAE,OAAO,EAAE;EAC3B,IAAIC,OAAqB,GAAG,EAAE;EAC9B,IAAID,WAAW,CAACH,cAAc,CAACK,cAAc,CAAC,EAAE;IAC9C;IACA,KAAK,MAAMC,CAAC,IAAIH,WAAW,CAACH,cAAc,CAACK,cAAc,CAAC,EAAE;MAC1D,IAAIE,YAAY,GACd,MAAMN,mBAAmB,CAACO,WAAW,EAAE,CAACC,eAAe,CAACH,CAAC,CAAC;MAC5D,IAAIC,YAAY,EAAE;QAChBH,OAAO,CAACM,IAAI,CAAC;UACXC,UAAU,EAAE,CAAAJ,YAAY,aAAZA,YAAY,uBAAZA,YAAY,CAAEK,WAAW,KAAI,sBAAsB;UAC/DC,UAAU,EAAEP,CAAC;UACbQ,OAAO,EAAE;QACX,CAAC,CAAC;MACJ;IACF;EACF;EACA,IAAIX,WAAW,CAACH,cAAc,CAACe,cAAc,CAAC,EAAE;IAC9C,KAAK,MAAMT,CAAC,IAAIH,WAAW,CAACH,cAAc,CAACe,cAAc,CAAC,EAAE;MAC1D,IAAIR,YAAY,GACd,MAAMN,mBAAmB,CAACO,WAAW,EAAE,CAACC,eAAe,CAACH,CAAC,CAAC;MAC5D,IAAIC,YAAY,EAAE;QAChBH,OAAO,CAACM,IAAI,CAAC;UACXC,UAAU,EAAE,CAAAJ,YAAY,aAAZA,YAAY,uBAAZA,YAAY,CAAEK,WAAW,KAAI,sBAAsB;UAC/DC,UAAU,EAAEP,CAAC;UACbQ,OAAO,EAAE;QACX,CAAC,CAAC;MACJ;IACF;EACF;EACA,OAAOV,OAAO;AAChB"}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { Text, View } from 'react-native';
|
|
2
|
-
import React, { useState } from 'react';
|
|
3
|
-
import { CommonStyles, Fonts } from '../../../../styles/executionTasks/CommonStyles';
|
|
4
|
-
import { Button } from 'react-native-paper';
|
|
5
|
-
import DropDownPicker from './ReasonDropDown';
|
|
6
|
-
import { getScannedItemCount } from '../ScannerUtils';
|
|
7
|
-
import { SCAN_STATUS } from '../ScannerSchema';
|
|
8
|
-
import { showToast } from '../../../widgets/Toaster';
|
|
9
|
-
const RTReasonSelection = props => {
|
|
10
|
-
const [selectedReason, setSelectedReason] = useState();
|
|
11
|
-
return /*#__PURE__*/React.createElement(View, {
|
|
12
|
-
style: CommonStyles.mainContainer
|
|
13
|
-
}, /*#__PURE__*/React.createElement(View, {
|
|
14
|
-
style: {
|
|
15
|
-
flex: 1,
|
|
16
|
-
marginTop: 20,
|
|
17
|
-
marginBottom: 20,
|
|
18
|
-
backgroundColor: '#ffffff',
|
|
19
|
-
padding: 18
|
|
20
|
-
}
|
|
21
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
22
|
-
style: {
|
|
23
|
-
lineHeight: 20,
|
|
24
|
-
fontFamily: Fonts.IBMPlexSans_600SemiBold,
|
|
25
|
-
color: '#111111',
|
|
26
|
-
fontSize: 16
|
|
27
|
-
}
|
|
28
|
-
}, `${getScannedItemCount(props.scanList, SCAN_STATUS.TO_BE_SCANNED)} items not scanned`), /*#__PURE__*/React.createElement(Text, {
|
|
29
|
-
style: {
|
|
30
|
-
marginTop: 5,
|
|
31
|
-
lineHeight: 20,
|
|
32
|
-
fontFamily: Fonts.IBMPlexSans_400Regular,
|
|
33
|
-
color: '#111111',
|
|
34
|
-
fontSize: 14,
|
|
35
|
-
marginBottom: 10
|
|
36
|
-
}
|
|
37
|
-
}, ` Do you want to proceed without scanning these shipments?`), /*#__PURE__*/React.createElement(DropDownPicker, {
|
|
38
|
-
items: props.reasons,
|
|
39
|
-
onItemChange: reasonItem => {
|
|
40
|
-
if (reasonItem !== null) setSelectedReason(reasonItem);
|
|
41
|
-
},
|
|
42
|
-
style: {},
|
|
43
|
-
selectedReason: selectedReason
|
|
44
|
-
})), /*#__PURE__*/React.createElement(View, {
|
|
45
|
-
style: {
|
|
46
|
-
flex: 1,
|
|
47
|
-
marginStart: 16,
|
|
48
|
-
marginEnd: 16,
|
|
49
|
-
marginBottom: 16,
|
|
50
|
-
justifyContent: 'flex-end'
|
|
51
|
-
}
|
|
52
|
-
}, /*#__PURE__*/React.createElement(Button, {
|
|
53
|
-
labelStyle: CommonStyles.nextButtonLabel,
|
|
54
|
-
style: [CommonStyles.nextButton, {
|
|
55
|
-
marginBottom: 10
|
|
56
|
-
}],
|
|
57
|
-
mode: 'contained',
|
|
58
|
-
onPress: async () => {
|
|
59
|
-
if (selectedReason && props.scanList && props.scanList.length > 0) {
|
|
60
|
-
const scanResults = props.scanList.map(sc => {
|
|
61
|
-
if (sc.scanStatus === SCAN_STATUS.TO_BE_SCANNED) {
|
|
62
|
-
sc.reasonCode = selectedReason.reasonCode;
|
|
63
|
-
sc.reasonText = selectedReason.reasonText;
|
|
64
|
-
sc.success = selectedReason.success;
|
|
65
|
-
}
|
|
66
|
-
return sc;
|
|
67
|
-
});
|
|
68
|
-
props.onSubmitET(scanResults);
|
|
69
|
-
} else {
|
|
70
|
-
showToast('No reason code selected!');
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}, "Proceed"), /*#__PURE__*/React.createElement(Button, {
|
|
74
|
-
style: [CommonStyles.cancelButton],
|
|
75
|
-
labelStyle: CommonStyles.cancelButtonLabel,
|
|
76
|
-
mode: 'outlined',
|
|
77
|
-
onPress: async () => {
|
|
78
|
-
props.showReasonSelectionPage(false);
|
|
79
|
-
}
|
|
80
|
-
}, "Cancel")));
|
|
81
|
-
};
|
|
82
|
-
export default RTReasonSelection;
|
|
83
|
-
//# sourceMappingURL=RTReasonSelection.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["Text","View","React","useState","CommonStyles","Fonts","Button","DropDownPicker","getScannedItemCount","SCAN_STATUS","showToast","RTReasonSelection","props","selectedReason","setSelectedReason","createElement","style","mainContainer","flex","marginTop","marginBottom","backgroundColor","padding","lineHeight","fontFamily","IBMPlexSans_600SemiBold","color","fontSize","scanList","TO_BE_SCANNED","IBMPlexSans_400Regular","items","reasons","onItemChange","reasonItem","marginStart","marginEnd","justifyContent","labelStyle","nextButtonLabel","nextButton","mode","onPress","length","scanResults","map","sc","scanStatus","reasonCode","reasonText","success","onSubmitET","cancelButton","cancelButtonLabel","showReasonSelectionPage"],"sources":["RTReasonSelection.tsx"],"sourcesContent":["import { Text, View } from 'react-native';\nimport React, { useState } from 'react';\nimport {\n CommonStyles,\n Fonts,\n} from '../../../../styles/executionTasks/CommonStyles';\nimport { Button } from 'react-native-paper';\nimport DropDownPicker, { ReasonItem } from './ReasonDropDown';\nimport type { ScanListProps } from './ScanList';\nimport { getScannedItemCount } from '../ScannerUtils';\nimport { SCAN_STATUS } from '../ScannerSchema';\nimport { showToast } from '../../../widgets/Toaster';\n\nconst RTReasonSelection = (props: RTReasonSelectionProps) => {\n const [selectedReason, setSelectedReason] = useState<ReasonItem>();\n\n return (\n <View style={CommonStyles.mainContainer}>\n <View\n style={{\n flex: 1,\n marginTop: 20,\n marginBottom: 20,\n backgroundColor: '#ffffff',\n padding: 18,\n }}\n >\n <Text\n style={{\n lineHeight: 20,\n fontFamily: Fonts.IBMPlexSans_600SemiBold,\n color: '#111111',\n fontSize: 16,\n }}\n >{`${getScannedItemCount(\n props.scanList,\n SCAN_STATUS.TO_BE_SCANNED\n )} items not scanned`}</Text>\n <Text\n style={{\n marginTop: 5,\n lineHeight: 20,\n fontFamily: Fonts.IBMPlexSans_400Regular,\n color: '#111111',\n fontSize: 14,\n marginBottom: 10,\n }}\n >{` Do you want to proceed without scanning these shipments?`}</Text>\n\n <DropDownPicker\n items={props.reasons}\n onItemChange={(reasonItem: ReasonItem | null) => {\n if (reasonItem !== null) setSelectedReason(reasonItem);\n }}\n style={{}}\n selectedReason={selectedReason}\n />\n </View>\n\n <View\n style={{\n flex: 1,\n marginStart: 16,\n marginEnd: 16,\n marginBottom: 16,\n justifyContent: 'flex-end',\n }}\n >\n <Button\n labelStyle={CommonStyles.nextButtonLabel}\n style={[CommonStyles.nextButton, { marginBottom: 10 }]}\n mode={'contained'}\n onPress={async () => {\n if (selectedReason && props.scanList && props.scanList.length > 0) {\n const scanResults = props.scanList.map((sc) => {\n if (sc.scanStatus === SCAN_STATUS.TO_BE_SCANNED) {\n sc.reasonCode = selectedReason.reasonCode;\n sc.reasonText = selectedReason.reasonText;\n sc.success = selectedReason.success;\n }\n return sc;\n });\n props.onSubmitET(scanResults);\n } else {\n showToast('No reason code selected!');\n }\n }}\n >\n Proceed\n </Button>\n <Button\n style={[CommonStyles.cancelButton]}\n labelStyle={CommonStyles.cancelButtonLabel}\n mode={'outlined'}\n onPress={async () => {\n props.showReasonSelectionPage(false);\n }}\n >\n Cancel\n </Button>\n </View>\n </View>\n );\n};\nexport default RTReasonSelection;\n\ntype RTReasonSelectionProps = ScanListProps & {\n show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