@os1-platform/dispatch-mobile 1.0.8 → 1.3.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +116 -48
- package/android/.gradle/6.8/fileChanges/last-build.bin +0 -0
- package/android/.gradle/6.8/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/6.8/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
- package/android/.gradle/checksums/checksums.lock +0 -0
- package/android/.gradle/configuration-cache/gc.properties +0 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/.idea/gradle.xml +13 -0
- package/android/.idea/misc.xml +4 -0
- package/android/.idea/vcs.xml +6 -0
- package/android/.idea/workspace.xml +131 -0
- package/android/gradle.properties +1 -1
- package/android/local.properties +8 -0
- package/android/src/main/AndroidManifest.xml +0 -1
- package/lib/commonjs/components/dispatch/DispatchExecNavigator.js +46 -39
- package/lib/commonjs/components/dispatch/DispatchExecNavigator.js.map +1 -1
- package/lib/commonjs/components/executiontasks/ExecutionTasksIndex.js +14 -24
- package/lib/commonjs/components/executiontasks/ExecutionTasksIndex.js.map +1 -1
- package/lib/commonjs/components/executiontasks/cancellation/CancelET.js +142 -23
- package/lib/commonjs/components/executiontasks/cancellation/CancelET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/cancellation/CancellationSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js +64 -16
- package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js.map +1 -1
- package/lib/commonjs/components/executiontasks/deliver/DeliverET.js +6 -16
- package/lib/commonjs/components/executiontasks/deliver/DeliverET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js +68 -26
- package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/display/DisplayModalET.js +4 -13
- package/lib/commonjs/components/executiontasks/display/DisplayModalET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/doodle/DoodleUtils.js +0 -2
- package/lib/commonjs/components/executiontasks/doodle/DoodleUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/doodle/SignatureET.js +61 -28
- package/lib/commonjs/components/executiontasks/doodle/SignatureET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/dropCash/DropCashET.js +5 -19
- package/lib/commonjs/components/executiontasks/dropCash/DropCashET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js +62 -18
- package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/FormGenerator.js +112 -28
- package/lib/commonjs/components/executiontasks/forms/FormGenerator.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/DateTimeWidget.js +3 -26
- package/lib/commonjs/components/executiontasks/forms/widgets/DateTimeWidget.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/DropdownWidget.js +49 -0
- package/lib/commonjs/components/executiontasks/forms/widgets/DropdownWidget.js.map +1 -0
- package/lib/commonjs/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js +1 -16
- package/lib/commonjs/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/TimeRangeSelector.js +0 -10
- package/lib/commonjs/components/executiontasks/forms/widgets/TimeRangeSelector.js.map +1 -1
- package/lib/commonjs/components/executiontasks/httpRequest/HttpEtUtils.js +4 -13
- package/lib/commonjs/components/executiontasks/httpRequest/HttpEtUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/httpRequest/HttpRequestET.js +0 -12
- package/lib/commonjs/components/executiontasks/httpRequest/HttpRequestET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/imageCapture/CaptureSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js +7 -35
- package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js +74 -49
- package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/PaymentStyles.js +0 -4
- package/lib/commonjs/components/executiontasks/payments/PaymentStyles.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/PaymentUtils.js +0 -2
- package/lib/commonjs/components/executiontasks/payments/PaymentUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js +64 -17
- package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js +63 -24
- package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js +71 -22
- package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/pickup/PickupET.js +5 -15
- package/lib/commonjs/components/executiontasks/pickup/PickupET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js +60 -19
- package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/ScanET.js +843 -0
- package/lib/commonjs/components/executiontasks/scan/ScanET.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/ScanSchema.js +6 -0
- package/lib/commonjs/components/executiontasks/scan/ScanSchema.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/constants.js +19 -0
- package/lib/commonjs/components/executiontasks/scan/constants.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/interfaces.js +29 -0
- package/lib/commonjs/components/executiontasks/scan/interfaces.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/CScanner.js +103 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/CScanner.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/DropDownUtils.js +74 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/DropDownUtils.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/ERDropDown.js +115 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/ERDropDown.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/ScanList.js +134 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/ScanList.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/utils.js +373 -0
- package/lib/commonjs/components/executiontasks/scan/utils.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scanner/CScanner.js +3 -21
- package/lib/commonjs/components/executiontasks/scanner/CScanner.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scanner/ScannerSchema.js +4 -9
- package/lib/commonjs/components/executiontasks/scanner/ScannerSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scanner/ScannerUtils.js +7 -36
- package/lib/commonjs/components/executiontasks/scanner/ScannerUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/DropDownSelector.js +0 -5
- package/lib/commonjs/components/executiontasks/scanner/returns/DropDownSelector.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/DropDownUtils.js +0 -9
- package/lib/commonjs/components/executiontasks/scanner/returns/DropDownUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/RTReasonSelection.js +0 -14
- package/lib/commonjs/components/executiontasks/scanner/returns/RTReasonSelection.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/RTScan.js +1 -40
- package/lib/commonjs/components/executiontasks/scanner/returns/RTScan.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/ReasonDropDown.js +0 -17
- package/lib/commonjs/components/executiontasks/scanner/returns/ReasonDropDown.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/ScanList.js +0 -28
- package/lib/commonjs/components/executiontasks/scanner/returns/ScanList.js.map +1 -1
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPET.js +334 -0
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPET.js.map +1 -0
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPSchema.js +14 -0
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPSchema.js.map +1 -0
- package/lib/commonjs/components/executiontasks/validateOTP/constants.js +37 -0
- package/lib/commonjs/components/executiontasks/validateOTP/constants.js.map +1 -0
- package/lib/commonjs/components/executiontasks/validateOTP/sub-components/OTPInput.js +59 -0
- package/lib/commonjs/components/executiontasks/validateOTP/sub-components/OTPInput.js.map +1 -0
- package/lib/commonjs/components/executiontasks/validateOTP/utils.js +147 -0
- package/lib/commonjs/components/executiontasks/validateOTP/utils.js.map +1 -0
- package/lib/commonjs/components/executiontasks/verifyLocation/GeofenceUtils.js +0 -13
- package/lib/commonjs/components/executiontasks/verifyLocation/GeofenceUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/verifyLocation/VerifyLocationET.js +4 -17
- package/lib/commonjs/components/executiontasks/verifyLocation/VerifyLocationET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpET.js +3 -18
- package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpET.js.map +1 -1
- package/lib/commonjs/components/widgets/AlertDisplay.js +0 -5
- package/lib/commonjs/components/widgets/AlertDisplay.js.map +1 -1
- package/lib/commonjs/components/widgets/CancelOrderDialog.js +0 -12
- package/lib/commonjs/components/widgets/CancelOrderDialog.js.map +1 -1
- package/lib/commonjs/components/widgets/IconButton.js +34 -0
- package/lib/commonjs/components/widgets/IconButton.js.map +1 -0
- package/lib/commonjs/components/widgets/ProgressDialog.js +0 -7
- package/lib/commonjs/components/widgets/ProgressDialog.js.map +1 -1
- package/lib/commonjs/components/widgets/SnackBarCustom.js +38 -38
- package/lib/commonjs/components/widgets/SnackBarCustom.js.map +1 -1
- package/lib/commonjs/components/widgets/SplitTextInput.js +93 -0
- package/lib/commonjs/components/widgets/SplitTextInput.js.map +1 -0
- package/lib/commonjs/components/widgets/Toaster.js +0 -2
- package/lib/commonjs/components/widgets/Toaster.js.map +1 -1
- package/lib/commonjs/config/DispatchSDKConfig.js +4 -5
- package/lib/commonjs/config/DispatchSDKConfig.js.map +1 -1
- package/lib/commonjs/constants/apiConstants.js +15 -0
- package/lib/commonjs/constants/apiConstants.js.map +1 -0
- package/lib/commonjs/constants/constants.js +7 -3
- package/lib/commonjs/constants/constants.js.map +1 -1
- package/lib/commonjs/constants/statuscode.js +3 -5
- package/lib/commonjs/constants/statuscode.js.map +1 -1
- package/lib/commonjs/errors/BaseError.js +3 -8
- package/lib/commonjs/errors/BaseError.js.map +1 -1
- package/lib/commonjs/errors/ErrorCodes.js +7 -6
- package/lib/commonjs/errors/ErrorCodes.js.map +1 -1
- package/lib/commonjs/events/EventDispatcher.js +27 -0
- package/lib/commonjs/events/EventDispatcher.js.map +1 -0
- package/lib/commonjs/events/EventListener.js +20 -0
- package/lib/commonjs/events/EventListener.js.map +1 -0
- package/lib/commonjs/events/constants.js +13 -0
- package/lib/commonjs/events/constants.js.map +1 -0
- package/lib/commonjs/events/index.js +11 -0
- package/lib/commonjs/events/index.js.map +1 -0
- package/lib/commonjs/events/interface.js +2 -0
- package/lib/commonjs/events/interface.js.map +1 -0
- package/lib/commonjs/index.js +9 -23
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/manager/dispatch/DispatchStateContainer.js +527 -177
- package/lib/commonjs/manager/dispatch/DispatchStateContainer.js.map +1 -1
- package/lib/commonjs/manager/dispatchCodes/EventCodeContainer.js +55 -4
- package/lib/commonjs/manager/dispatchCodes/EventCodeContainer.js.map +1 -1
- package/lib/commonjs/manager/dispatchCodes/EventCodeRepo.js +70 -0
- package/lib/commonjs/manager/dispatchCodes/EventCodeRepo.js.map +1 -0
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeContainer.js +3 -29
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeContainer.js.map +1 -1
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeRepo.js +6 -20
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeRepo.js.map +1 -1
- package/lib/commonjs/manager/jobRemoval/JobRemovalManager.js +27 -0
- package/lib/commonjs/manager/jobRemoval/JobRemovalManager.js.map +1 -0
- package/lib/commonjs/manager/location/LocationManager.js +3 -20
- package/lib/commonjs/manager/location/LocationManager.js.map +1 -1
- package/lib/commonjs/manager/sdk/DispatchSDKManager.js +8 -36
- package/lib/commonjs/manager/sdk/DispatchSDKManager.js.map +1 -1
- package/lib/commonjs/manager/sdk/DispatchSdkCache.js +6 -17
- package/lib/commonjs/manager/sdk/DispatchSdkCache.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/AppSyncManager.js +12 -46
- package/lib/commonjs/manager/syncmanager/AppSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/DBConfig.js +13 -7
- package/lib/commonjs/manager/syncmanager/DBConfig.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/NativeSyncManager.js +0 -2
- package/lib/commonjs/manager/syncmanager/NativeSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/database.js +28 -12
- package/lib/commonjs/manager/syncmanager/database.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js +0 -19
- package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentManager.js +3 -20
- package/lib/commonjs/manager/syncmanager/document/DocumentManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js +3 -52
- package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/events/ETEventsManager.js +59 -25
- package/lib/commonjs/manager/syncmanager/events/ETEventsManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/events/EventsSyncManager.js +77 -90
- package/lib/commonjs/manager/syncmanager/events/EventsSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/events/SyncHttpClient.js +27 -19
- package/lib/commonjs/manager/syncmanager/events/SyncHttpClient.js.map +1 -1
- package/lib/commonjs/models/DispatchModels.js +4 -5
- package/lib/commonjs/models/DispatchModels.js.map +1 -1
- package/lib/commonjs/models/ReasonCodes.js.map +1 -1
- package/lib/commonjs/models/execTasks/ETBaseModels.js.map +1 -1
- package/lib/commonjs/models/execTasks/ETConfig.js +28 -35
- package/lib/commonjs/models/execTasks/ETConfig.js.map +1 -1
- package/lib/commonjs/models/sdk.js +4 -5
- package/lib/commonjs/models/sdk.js.map +1 -1
- package/lib/commonjs/native/signature/SignatureCapture.js +3 -24
- package/lib/commonjs/native/signature/SignatureCapture.js.map +1 -1
- package/lib/commonjs/network/GraphQLClient.js +7 -35
- package/lib/commonjs/network/GraphQLClient.js.map +1 -1
- package/lib/commonjs/network/NetworkClient.js +2 -13
- package/lib/commonjs/network/NetworkClient.js.map +1 -1
- package/lib/commonjs/network/NetworkUtils.js +10 -8
- package/lib/commonjs/network/NetworkUtils.js.map +1 -1
- package/lib/commonjs/network/Queries.js +0 -2
- package/lib/commonjs/network/Queries.js.map +1 -1
- package/lib/commonjs/network/client.js +6 -21
- package/lib/commonjs/network/client.js.map +1 -1
- package/lib/commonjs/res/strings.js.map +1 -1
- package/lib/commonjs/resources/Login.js +4 -15
- package/lib/commonjs/resources/Login.js.map +1 -1
- package/lib/commonjs/resources/network.js +3 -8
- package/lib/commonjs/resources/network.js.map +1 -1
- package/lib/commonjs/styles/SdkColors.js +7 -7
- package/lib/commonjs/styles/SdkColors.js.map +1 -1
- package/lib/commonjs/styles/executionTasks/CommonStyles.js +42 -18
- package/lib/commonjs/styles/executionTasks/CommonStyles.js.map +1 -1
- package/lib/commonjs/ui/screens/CancellationScreen.js +36 -27
- package/lib/commonjs/ui/screens/CancellationScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/CaptureInputScreen.js +6 -15
- package/lib/commonjs/ui/screens/CaptureInputScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/CompleteObjectiveScreen.js +0 -19
- package/lib/commonjs/ui/screens/CompleteObjectiveScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DeliverScreen.js +6 -15
- package/lib/commonjs/ui/screens/DeliverScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DisplayScreen.js +7 -12
- package/lib/commonjs/ui/screens/DisplayScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DoodleScreen.js +6 -16
- package/lib/commonjs/ui/screens/DoodleScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DropCashScreen.js +6 -18
- package/lib/commonjs/ui/screens/DropCashScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ETScreensIndex.js +14 -16
- package/lib/commonjs/ui/screens/ETScreensIndex.js.map +1 -1
- package/lib/commonjs/ui/screens/FormsScreen.js +36 -15
- package/lib/commonjs/ui/screens/FormsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/GeofenceScreen.js +7 -13
- package/lib/commonjs/ui/screens/GeofenceScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HttpRequestScreen.js +5 -10
- package/lib/commonjs/ui/screens/HttpRequestScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ImageCaptureScreen.js +27 -14
- package/lib/commonjs/ui/screens/ImageCaptureScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PaymentScreen.js +11 -23
- package/lib/commonjs/ui/screens/PaymentScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PickupScreen.js +9 -13
- package/lib/commonjs/ui/screens/PickupScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/RTScanScreen.js +8 -27
- package/lib/commonjs/ui/screens/RTScanScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ScanScreen.js +268 -0
- package/lib/commonjs/ui/screens/ScanScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/StartWorkFlowScreen.js +21 -30
- package/lib/commonjs/ui/screens/StartWorkFlowScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ValidateOTPScreen.js +49 -0
- package/lib/commonjs/ui/screens/ValidateOTPScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/WithBaseDispatchScreen.js +0 -10
- package/lib/commonjs/ui/screens/WithBaseDispatchScreen.js.map +1 -1
- package/lib/commonjs/ui/uiConfig/RouteParams.js +9 -1
- package/lib/commonjs/ui/uiConfig/RouteParams.js.map +1 -1
- package/lib/commonjs/utils/ApiUtils.js +115 -0
- package/lib/commonjs/utils/ApiUtils.js.map +1 -0
- package/lib/commonjs/utils/ExecTaskUtils.js +93 -31
- package/lib/commonjs/utils/ExecTaskUtils.js.map +1 -1
- package/lib/commonjs/utils/Logger.js +10 -29
- package/lib/commonjs/utils/Logger.js.map +1 -1
- package/lib/commonjs/utils/NetworkUtil.js +3 -19
- package/lib/commonjs/utils/NetworkUtil.js.map +1 -1
- package/lib/commonjs/utils/SdkUtils.js +2 -31
- package/lib/commonjs/utils/SdkUtils.js.map +1 -1
- package/lib/commonjs/utils/SyncManagerUtils.js +25 -40
- package/lib/commonjs/utils/SyncManagerUtils.js.map +1 -1
- package/lib/commonjs/utils/fcm/FCM.js +35 -16
- package/lib/commonjs/utils/fcm/FCM.js.map +1 -1
- package/lib/commonjs/utils/fcm/FcmUtils.js +50 -25
- package/lib/commonjs/utils/fcm/FcmUtils.js.map +1 -1
- package/lib/commonjs/utils/helper.js +0 -5
- package/lib/commonjs/utils/helper.js.map +1 -1
- package/lib/commonjs/utils/hooks/useTimer.js +44 -0
- package/lib/commonjs/utils/hooks/useTimer.js.map +1 -0
- package/lib/commonjs/utils/loginHelper.js +6 -18
- package/lib/commonjs/utils/loginHelper.js.map +1 -1
- package/lib/commonjs/utils/storage.js +53 -32
- package/lib/commonjs/utils/storage.js.map +1 -1
- package/lib/commonjs/utils/utils.js +8 -11
- package/lib/commonjs/utils/utils.js.map +1 -1
- package/lib/module/components/dispatch/DispatchExecNavigator.js +46 -28
- package/lib/module/components/dispatch/DispatchExecNavigator.js.map +1 -1
- package/lib/module/components/executiontasks/ExecutionTasksIndex.js +3 -1
- package/lib/module/components/executiontasks/ExecutionTasksIndex.js.map +1 -1
- package/lib/module/components/executiontasks/cancellation/CancelET.js +145 -19
- package/lib/module/components/executiontasks/cancellation/CancelET.js.map +1 -1
- package/lib/module/components/executiontasks/cancellation/CancellationSchema.js.map +1 -1
- package/lib/module/components/executiontasks/captureInput/CaptureText.js +66 -9
- package/lib/module/components/executiontasks/captureInput/CaptureText.js.map +1 -1
- package/lib/module/components/executiontasks/deliver/DeliverET.js +6 -7
- package/lib/module/components/executiontasks/deliver/DeliverET.js.map +1 -1
- package/lib/module/components/executiontasks/deliver/SLDeliverET.js +69 -16
- package/lib/module/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
- package/lib/module/components/executiontasks/display/DisplayModalET.js +4 -3
- package/lib/module/components/executiontasks/display/DisplayModalET.js.map +1 -1
- package/lib/module/components/executiontasks/doodle/DoodleUtils.js.map +1 -1
- package/lib/module/components/executiontasks/doodle/SignatureET.js +64 -14
- package/lib/module/components/executiontasks/doodle/SignatureET.js.map +1 -1
- package/lib/module/components/executiontasks/dropCash/DropCashET.js +5 -6
- package/lib/module/components/executiontasks/dropCash/DropCashET.js.map +1 -1
- package/lib/module/components/executiontasks/dropCash/SLDropCash.js +62 -8
- package/lib/module/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
- package/lib/module/components/executiontasks/forms/FormGenerator.js +114 -14
- package/lib/module/components/executiontasks/forms/FormGenerator.js.map +1 -1
- package/lib/module/components/executiontasks/forms/widgets/DateTimeWidget.js +3 -15
- package/lib/module/components/executiontasks/forms/widgets/DateTimeWidget.js.map +1 -1
- package/lib/module/components/executiontasks/forms/widgets/DropdownWidget.js +39 -0
- package/lib/module/components/executiontasks/forms/widgets/DropdownWidget.js.map +1 -0
- package/lib/module/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js +1 -5
- package/lib/module/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js.map +1 -1
- package/lib/module/components/executiontasks/forms/widgets/TimeRangeSelector.js +0 -3
- package/lib/module/components/executiontasks/forms/widgets/TimeRangeSelector.js.map +1 -1
- package/lib/module/components/executiontasks/httpRequest/HttpEtUtils.js +4 -2
- package/lib/module/components/executiontasks/httpRequest/HttpEtUtils.js.map +1 -1
- package/lib/module/components/executiontasks/httpRequest/HttpRequestET.js +0 -3
- package/lib/module/components/executiontasks/httpRequest/HttpRequestET.js.map +1 -1
- package/lib/module/components/executiontasks/imageCapture/CaptureSchema.js.map +1 -1
- package/lib/module/components/executiontasks/imageCapture/CaptureUtils.js +7 -10
- package/lib/module/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
- package/lib/module/components/executiontasks/imageCapture/ImageCapture.js +75 -35
- package/lib/module/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
- package/lib/module/components/executiontasks/payments/PaymentStyles.js.map +1 -1
- package/lib/module/components/executiontasks/payments/PaymentUtils.js.map +1 -1
- package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentET.js +64 -6
- package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
- package/lib/module/components/executiontasks/payments/init/InitPaymentET.js +63 -11
- package/lib/module/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
- package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentET.js +71 -10
- package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
- package/lib/module/components/executiontasks/pickup/PickupET.js +5 -6
- package/lib/module/components/executiontasks/pickup/PickupET.js.map +1 -1
- package/lib/module/components/executiontasks/pickup/SLPickupET.js +61 -10
- package/lib/module/components/executiontasks/pickup/SLPickupET.js.map +1 -1
- package/lib/module/components/executiontasks/scan/ScanET.js +833 -0
- package/lib/module/components/executiontasks/scan/ScanET.js.map +1 -0
- package/lib/module/components/executiontasks/scan/ScanSchema.js +2 -0
- package/lib/module/components/executiontasks/scan/ScanSchema.js.map +1 -0
- package/lib/module/components/executiontasks/scan/constants.js +7 -0
- package/lib/module/components/executiontasks/scan/constants.js.map +1 -0
- package/lib/module/components/executiontasks/scan/interfaces.js +21 -0
- package/lib/module/components/executiontasks/scan/interfaces.js.map +1 -0
- package/lib/module/components/executiontasks/scan/sub_components/CScanner.js +94 -0
- package/lib/module/components/executiontasks/scan/sub_components/CScanner.js.map +1 -0
- package/lib/module/components/executiontasks/scan/sub_components/DropDownUtils.js +66 -0
- package/lib/module/components/executiontasks/scan/sub_components/DropDownUtils.js.map +1 -0
- package/lib/module/components/executiontasks/scan/sub_components/ERDropDown.js +105 -0
- package/lib/module/components/executiontasks/scan/sub_components/ERDropDown.js.map +1 -0
- package/lib/module/components/executiontasks/scan/sub_components/ScanList.js +124 -0
- package/lib/module/components/executiontasks/scan/sub_components/ScanList.js.map +1 -0
- package/lib/module/components/executiontasks/scan/utils.js +358 -0
- package/lib/module/components/executiontasks/scan/utils.js.map +1 -0
- package/lib/module/components/executiontasks/scanner/CScanner.js +3 -8
- package/lib/module/components/executiontasks/scanner/CScanner.js.map +1 -1
- package/lib/module/components/executiontasks/scanner/ScannerSchema.js +3 -3
- package/lib/module/components/executiontasks/scanner/ScannerSchema.js.map +1 -1
- package/lib/module/components/executiontasks/scanner/ScannerUtils.js +6 -18
- package/lib/module/components/executiontasks/scanner/ScannerUtils.js.map +1 -1
- package/lib/module/components/executiontasks/scanner/returns/DropDownSelector.js +0 -2
- package/lib/module/components/executiontasks/scanner/returns/DropDownSelector.js.map +1 -1
- package/lib/module/components/executiontasks/scanner/returns/DropDownUtils.js +0 -5
- package/lib/module/components/executiontasks/scanner/returns/DropDownUtils.js.map +1 -1
- package/lib/module/components/executiontasks/scanner/returns/RTReasonSelection.js +0 -3
- package/lib/module/components/executiontasks/scanner/returns/RTReasonSelection.js.map +1 -1
- package/lib/module/components/executiontasks/scanner/returns/RTScan.js +1 -19
- package/lib/module/components/executiontasks/scanner/returns/RTScan.js.map +1 -1
- package/lib/module/components/executiontasks/scanner/returns/ReasonDropDown.js +0 -7
- package/lib/module/components/executiontasks/scanner/returns/ReasonDropDown.js.map +1 -1
- package/lib/module/components/executiontasks/scanner/returns/ScanList.js +0 -15
- package/lib/module/components/executiontasks/scanner/returns/ScanList.js.map +1 -1
- package/lib/module/components/executiontasks/validateOTP/ValidateOTPET.js +325 -0
- package/lib/module/components/executiontasks/validateOTP/ValidateOTPET.js.map +1 -0
- package/lib/module/components/executiontasks/validateOTP/ValidateOTPSchema.js +8 -0
- package/lib/module/components/executiontasks/validateOTP/ValidateOTPSchema.js.map +1 -0
- package/lib/module/components/executiontasks/validateOTP/constants.js +25 -0
- package/lib/module/components/executiontasks/validateOTP/constants.js.map +1 -0
- package/lib/module/components/executiontasks/validateOTP/sub-components/OTPInput.js +49 -0
- package/lib/module/components/executiontasks/validateOTP/sub-components/OTPInput.js.map +1 -0
- package/lib/module/components/executiontasks/validateOTP/utils.js +133 -0
- package/lib/module/components/executiontasks/validateOTP/utils.js.map +1 -0
- package/lib/module/components/executiontasks/verifyLocation/GeofenceUtils.js +0 -6
- package/lib/module/components/executiontasks/verifyLocation/GeofenceUtils.js.map +1 -1
- package/lib/module/components/executiontasks/verifyLocation/VerifyLocationET.js +4 -3
- package/lib/module/components/executiontasks/verifyLocation/VerifyLocationET.js.map +1 -1
- package/lib/module/components/executiontasks/verifyOtp/VerifyOtpET.js +4 -8
- package/lib/module/components/executiontasks/verifyOtp/VerifyOtpET.js.map +1 -1
- package/lib/module/components/widgets/AlertDisplay.js.map +1 -1
- package/lib/module/components/widgets/CancelOrderDialog.js +0 -2
- package/lib/module/components/widgets/CancelOrderDialog.js.map +1 -1
- package/lib/module/components/widgets/IconButton.js +26 -0
- package/lib/module/components/widgets/IconButton.js.map +1 -0
- package/lib/module/components/widgets/ProgressDialog.js +0 -2
- package/lib/module/components/widgets/ProgressDialog.js.map +1 -1
- package/lib/module/components/widgets/SnackBarCustom.js +36 -18
- package/lib/module/components/widgets/SnackBarCustom.js.map +1 -1
- package/lib/module/components/widgets/SplitTextInput.js +84 -0
- package/lib/module/components/widgets/SplitTextInput.js.map +1 -0
- package/lib/module/components/widgets/Toaster.js.map +1 -1
- package/lib/module/config/DispatchSDKConfig.js +3 -4
- package/lib/module/config/DispatchSDKConfig.js.map +1 -1
- package/lib/module/constants/apiConstants.js +7 -0
- package/lib/module/constants/apiConstants.js.map +1 -0
- package/lib/module/constants/constants.js +4 -2
- package/lib/module/constants/constants.js.map +1 -1
- package/lib/module/constants/statuscode.js +3 -5
- package/lib/module/constants/statuscode.js.map +1 -1
- package/lib/module/errors/BaseError.js +3 -6
- package/lib/module/errors/BaseError.js.map +1 -1
- package/lib/module/errors/ErrorCodes.js +5 -5
- package/lib/module/errors/ErrorCodes.js.map +1 -1
- package/lib/module/events/EventDispatcher.js +19 -0
- package/lib/module/events/EventDispatcher.js.map +1 -0
- package/lib/module/events/EventListener.js +13 -0
- package/lib/module/events/EventListener.js.map +1 -0
- package/lib/module/events/constants.js +6 -0
- package/lib/module/events/constants.js.map +1 -0
- package/lib/module/events/index.js +3 -0
- package/lib/module/events/index.js.map +1 -0
- package/lib/module/events/interface.js +2 -0
- package/lib/module/events/interface.js.map +1 -0
- package/lib/module/index.js +4 -3
- package/lib/module/index.js.map +1 -1
- package/lib/module/manager/dispatch/DispatchStateContainer.js +529 -151
- package/lib/module/manager/dispatch/DispatchStateContainer.js.map +1 -1
- package/lib/module/manager/dispatchCodes/EventCodeContainer.js +52 -2
- package/lib/module/manager/dispatchCodes/EventCodeContainer.js.map +1 -1
- package/lib/module/manager/dispatchCodes/EventCodeRepo.js +61 -0
- package/lib/module/manager/dispatchCodes/EventCodeRepo.js.map +1 -0
- package/lib/module/manager/dispatchCodes/ReasonCodeContainer.js +3 -16
- package/lib/module/manager/dispatchCodes/ReasonCodeContainer.js.map +1 -1
- package/lib/module/manager/dispatchCodes/ReasonCodeRepo.js +6 -14
- package/lib/module/manager/dispatchCodes/ReasonCodeRepo.js.map +1 -1
- package/lib/module/manager/jobRemoval/JobRemovalManager.js +20 -0
- package/lib/module/manager/jobRemoval/JobRemovalManager.js.map +1 -0
- package/lib/module/manager/location/LocationManager.js +3 -14
- package/lib/module/manager/location/LocationManager.js.map +1 -1
- package/lib/module/manager/sdk/DispatchSDKManager.js +8 -14
- package/lib/module/manager/sdk/DispatchSDKManager.js.map +1 -1
- package/lib/module/manager/sdk/DispatchSdkCache.js +6 -13
- package/lib/module/manager/sdk/DispatchSdkCache.js.map +1 -1
- package/lib/module/manager/syncmanager/AppSyncManager.js +12 -26
- package/lib/module/manager/syncmanager/AppSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/DBConfig.js +9 -5
- package/lib/module/manager/syncmanager/DBConfig.js.map +1 -1
- package/lib/module/manager/syncmanager/NativeSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/database.js +27 -3
- package/lib/module/manager/syncmanager/database.js.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentHttpClient.js +0 -7
- package/lib/module/manager/syncmanager/document/DocumentHttpClient.js.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentManager.js +3 -14
- package/lib/module/manager/syncmanager/document/DocumentManager.js.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentSyncManager.js +3 -35
- package/lib/module/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/events/ETEventsManager.js +59 -18
- package/lib/module/manager/syncmanager/events/ETEventsManager.js.map +1 -1
- package/lib/module/manager/syncmanager/events/EventsSyncManager.js +77 -68
- package/lib/module/manager/syncmanager/events/EventsSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/events/SyncHttpClient.js +26 -11
- package/lib/module/manager/syncmanager/events/SyncHttpClient.js.map +1 -1
- package/lib/module/models/DispatchModels.js +3 -4
- package/lib/module/models/DispatchModels.js.map +1 -1
- package/lib/module/models/ReasonCodes.js.map +1 -1
- package/lib/module/models/execTasks/ETBaseModels.js.map +1 -1
- package/lib/module/models/execTasks/ETConfig.js +22 -29
- package/lib/module/models/execTasks/ETConfig.js.map +1 -1
- package/lib/module/models/sdk.js +3 -4
- package/lib/module/models/sdk.js.map +1 -1
- package/lib/module/native/signature/SignatureCapture.js +3 -18
- package/lib/module/native/signature/SignatureCapture.js.map +1 -1
- package/lib/module/network/GraphQLClient.js +6 -26
- package/lib/module/network/GraphQLClient.js.map +1 -1
- package/lib/module/network/NetworkClient.js +2 -6
- package/lib/module/network/NetworkClient.js.map +1 -1
- package/lib/module/network/NetworkUtils.js +10 -3
- package/lib/module/network/NetworkUtils.js.map +1 -1
- package/lib/module/network/Queries.js.map +1 -1
- package/lib/module/network/client.js +7 -17
- package/lib/module/network/client.js.map +1 -1
- package/lib/module/res/strings.js.map +1 -1
- package/lib/module/resources/Login.js +4 -13
- package/lib/module/resources/Login.js.map +1 -1
- package/lib/module/resources/network.js +3 -6
- package/lib/module/resources/network.js.map +1 -1
- package/lib/module/styles/SdkColors.js +6 -6
- package/lib/module/styles/SdkColors.js.map +1 -1
- package/lib/module/styles/executionTasks/CommonStyles.js +41 -7
- package/lib/module/styles/executionTasks/CommonStyles.js.map +1 -1
- package/lib/module/ui/screens/CancellationScreen.js +36 -14
- package/lib/module/ui/screens/CancellationScreen.js.map +1 -1
- package/lib/module/ui/screens/CaptureInputScreen.js +7 -4
- package/lib/module/ui/screens/CaptureInputScreen.js.map +1 -1
- package/lib/module/ui/screens/CompleteObjectiveScreen.js +0 -3
- package/lib/module/ui/screens/CompleteObjectiveScreen.js.map +1 -1
- package/lib/module/ui/screens/DeliverScreen.js +7 -4
- package/lib/module/ui/screens/DeliverScreen.js.map +1 -1
- package/lib/module/ui/screens/DisplayScreen.js +5 -4
- package/lib/module/ui/screens/DisplayScreen.js.map +1 -1
- package/lib/module/ui/screens/DoodleScreen.js +7 -4
- package/lib/module/ui/screens/DoodleScreen.js.map +1 -1
- package/lib/module/ui/screens/DropCashScreen.js +7 -7
- package/lib/module/ui/screens/DropCashScreen.js.map +1 -1
- package/lib/module/ui/screens/ETScreensIndex.js +3 -1
- package/lib/module/ui/screens/ETScreensIndex.js.map +1 -1
- package/lib/module/ui/screens/FormsScreen.js +34 -6
- package/lib/module/ui/screens/FormsScreen.js.map +1 -1
- package/lib/module/ui/screens/GeofenceScreen.js +5 -4
- package/lib/module/ui/screens/GeofenceScreen.js.map +1 -1
- package/lib/module/ui/screens/HttpRequestScreen.js +5 -3
- package/lib/module/ui/screens/HttpRequestScreen.js.map +1 -1
- package/lib/module/ui/screens/ImageCaptureScreen.js +25 -5
- package/lib/module/ui/screens/ImageCaptureScreen.js.map +1 -1
- package/lib/module/ui/screens/PaymentScreen.js +12 -10
- package/lib/module/ui/screens/PaymentScreen.js.map +1 -1
- package/lib/module/ui/screens/PickupScreen.js +7 -5
- package/lib/module/ui/screens/PickupScreen.js.map +1 -1
- package/lib/module/ui/screens/RTScanScreen.js +9 -13
- package/lib/module/ui/screens/RTScanScreen.js.map +1 -1
- package/lib/module/ui/screens/ScanScreen.js +259 -0
- package/lib/module/ui/screens/ScanScreen.js.map +1 -0
- package/lib/module/ui/screens/StartWorkFlowScreen.js +22 -9
- package/lib/module/ui/screens/StartWorkFlowScreen.js.map +1 -1
- package/lib/module/ui/screens/ValidateOTPScreen.js +39 -0
- package/lib/module/ui/screens/ValidateOTPScreen.js.map +1 -0
- package/lib/module/ui/screens/WithBaseDispatchScreen.js +0 -3
- package/lib/module/ui/screens/WithBaseDispatchScreen.js.map +1 -1
- package/lib/module/ui/uiConfig/RouteParams.js +9 -1
- package/lib/module/ui/uiConfig/RouteParams.js.map +1 -1
- package/lib/module/utils/ApiUtils.js +101 -0
- package/lib/module/utils/ApiUtils.js.map +1 -0
- package/lib/module/utils/ExecTaskUtils.js +92 -21
- package/lib/module/utils/ExecTaskUtils.js.map +1 -1
- package/lib/module/utils/Logger.js +9 -21
- package/lib/module/utils/Logger.js.map +1 -1
- package/lib/module/utils/NetworkUtil.js +3 -15
- package/lib/module/utils/NetworkUtil.js.map +1 -1
- package/lib/module/utils/SdkUtils.js +2 -15
- package/lib/module/utils/SdkUtils.js.map +1 -1
- package/lib/module/utils/SyncManagerUtils.js +25 -10
- package/lib/module/utils/SyncManagerUtils.js.map +1 -1
- package/lib/module/utils/fcm/FCM.js +35 -4
- package/lib/module/utils/fcm/FCM.js.map +1 -1
- package/lib/module/utils/fcm/FcmUtils.js +50 -7
- package/lib/module/utils/fcm/FcmUtils.js.map +1 -1
- package/lib/module/utils/helper.js +0 -3
- package/lib/module/utils/helper.js.map +1 -1
- package/lib/module/utils/hooks/useTimer.js +37 -0
- package/lib/module/utils/hooks/useTimer.js.map +1 -0
- package/lib/module/utils/loginHelper.js +6 -16
- package/lib/module/utils/loginHelper.js.map +1 -1
- package/lib/module/utils/storage.js +51 -29
- package/lib/module/utils/storage.js.map +1 -1
- package/lib/module/utils/utils.js +8 -6
- package/lib/module/utils/utils.js.map +1 -1
- package/lib/typescript/components/executiontasks/CompletedWFSchema.d.ts +2 -2
- package/lib/typescript/components/executiontasks/ExecutionTasksIndex.d.ts +6 -2
- package/lib/typescript/components/executiontasks/cancellation/CancellationSchema.d.ts +10 -5
- package/lib/typescript/components/executiontasks/captureInput/CaptureInputSchema.d.ts +7 -7
- package/lib/typescript/components/executiontasks/deliver/DeliverETInput.d.ts +7 -7
- package/lib/typescript/components/executiontasks/display/DisplaySchema.d.ts +5 -5
- package/lib/typescript/components/executiontasks/doodle/SignatureSchema.d.ts +7 -7
- package/lib/typescript/components/executiontasks/dropCash/DropCashSchema.d.ts +2 -2
- package/lib/typescript/components/executiontasks/forms/FormSchema.d.ts +2 -2
- package/lib/typescript/components/executiontasks/forms/widgets/DateTimeWidget.d.ts +1 -1
- package/lib/typescript/components/executiontasks/forms/widgets/DropdownWidget.d.ts +9 -0
- package/lib/typescript/components/executiontasks/httpRequest/HttpRequestETSchema.d.ts +6 -6
- package/lib/typescript/components/executiontasks/imageCapture/CaptureSchema.d.ts +16 -11
- package/lib/typescript/components/executiontasks/payments/completePayment/CompletePaymentSchema.d.ts +2 -2
- package/lib/typescript/components/executiontasks/payments/init/InitPaymentSchema.d.ts +3 -3
- package/lib/typescript/components/executiontasks/payments/processPayment/ProcessPaymentSchema.d.ts +2 -2
- package/lib/typescript/components/executiontasks/pickup/PickpSchema.d.ts +3 -3
- package/lib/typescript/components/executiontasks/scan/ScanET.d.ts +16 -0
- package/lib/typescript/components/executiontasks/scan/ScanSchema.d.ts +70 -0
- package/lib/typescript/components/executiontasks/scan/constants.d.ts +6 -0
- package/lib/typescript/components/executiontasks/scan/interfaces.d.ts +41 -0
- package/lib/typescript/components/executiontasks/scan/sub_components/CScanner.d.ts +7 -0
- package/lib/typescript/components/executiontasks/scan/sub_components/DropDownUtils.d.ts +7 -0
- package/lib/typescript/components/executiontasks/scan/sub_components/ERDropDown.d.ts +17 -0
- package/lib/typescript/components/executiontasks/scan/sub_components/ScanList.d.ts +8 -0
- package/lib/typescript/components/executiontasks/scan/utils.d.ts +21 -0
- package/lib/typescript/components/executiontasks/scanner/ScannerSchema.d.ts +6 -6
- package/lib/typescript/components/executiontasks/scanner/returns/DropDownUtils.d.ts +1 -2
- package/lib/typescript/components/executiontasks/scanner/returns/RTReasonSelection.d.ts +1 -1
- package/lib/typescript/components/executiontasks/scanner/returns/ScanList.d.ts +1 -1
- package/lib/typescript/components/executiontasks/validateOTP/ValidateOTPET.d.ts +4 -0
- package/lib/typescript/components/executiontasks/validateOTP/ValidateOTPSchema.d.ts +54 -0
- package/lib/typescript/components/executiontasks/validateOTP/constants.d.ts +10 -0
- package/lib/typescript/components/executiontasks/validateOTP/sub-components/OTPInput.d.ts +12 -0
- package/lib/typescript/components/executiontasks/validateOTP/utils.d.ts +7 -0
- package/lib/typescript/components/executiontasks/verifyInput/VerifyInputSchema.d.ts +8 -8
- package/lib/typescript/components/executiontasks/verifyLocation/VerifyLocSchema.d.ts +9 -9
- package/lib/typescript/components/executiontasks/verifyOtp/VerifyOtpSchema.d.ts +3 -3
- package/lib/typescript/components/widgets/IconButton.d.ts +9 -0
- package/lib/typescript/components/widgets/SnackBarCustom.d.ts +9 -5
- package/lib/typescript/components/widgets/SplitTextInput.d.ts +12 -0
- package/lib/typescript/constants/apiConstants.d.ts +6 -0
- package/lib/typescript/constants/constants.d.ts +4 -2
- package/lib/typescript/errors/ErrorCodes.d.ts +3 -1
- package/lib/typescript/events/EventDispatcher.d.ts +5 -0
- package/lib/typescript/events/EventListener.d.ts +5 -0
- package/lib/typescript/events/constants.d.ts +5 -0
- package/lib/typescript/events/index.d.ts +2 -0
- package/lib/typescript/events/interface.d.ts +1 -0
- package/lib/typescript/index.d.ts +5 -4
- package/lib/typescript/manager/dispatch/DispatchStateContainer.d.ts +21 -8
- package/lib/typescript/manager/dispatchCodes/EventCodeContainer.d.ts +12 -1
- package/lib/typescript/manager/dispatchCodes/EventCodeRepo.d.ts +13 -0
- package/lib/typescript/manager/jobRemoval/JobRemovalManager.d.ts +6 -0
- package/lib/typescript/manager/sdk/DispatchSdkCache.d.ts +2 -0
- package/lib/typescript/manager/syncmanager/AppSyncManager.d.ts +1 -0
- package/lib/typescript/manager/syncmanager/DBConfig.d.ts +22 -2
- package/lib/typescript/manager/syncmanager/database.d.ts +5 -0
- package/lib/typescript/manager/syncmanager/document/models.d.ts +1 -1
- package/lib/typescript/manager/syncmanager/events/ETEventsManager.d.ts +5 -1
- package/lib/typescript/manager/syncmanager/events/EventsSyncManager.d.ts +5 -1
- package/lib/typescript/manager/syncmanager/events/SyncHttpClient.d.ts +3 -1
- package/lib/typescript/models/DispatchModels.d.ts +56 -1
- package/lib/typescript/models/ReasonCodes.d.ts +5 -0
- package/lib/typescript/models/auth.d.ts +1 -1
- package/lib/typescript/models/execTasks/ETBaseModels.d.ts +27 -8
- package/lib/typescript/models/execTasks/ETConfig.d.ts +8 -4
- package/lib/typescript/models/sdk.d.ts +5 -0
- package/lib/typescript/native/signature/SignatureCapture.d.ts +1 -1
- package/lib/typescript/network/NetworkUtils.d.ts +1 -5
- package/lib/typescript/styles/SdkColors.d.ts +1 -0
- package/lib/typescript/styles/executionTasks/CommonStyles.d.ts +36 -0
- package/lib/typescript/ui/screens/ETScreensIndex.d.ts +3 -1
- package/lib/typescript/ui/screens/ScanScreen.d.ts +3 -0
- package/lib/typescript/ui/screens/ValidateOTPScreen.d.ts +3 -0
- package/lib/typescript/ui/uiConfig/RouteParams.d.ts +8 -0
- package/lib/typescript/utils/ApiUtils.d.ts +61 -0
- package/lib/typescript/utils/ExecTaskUtils.d.ts +7 -2
- package/lib/typescript/utils/NetworkUtil.d.ts +1 -1
- package/lib/typescript/utils/SyncManagerUtils.d.ts +3 -1
- package/lib/typescript/utils/hooks/useTimer.d.ts +5 -0
- package/lib/typescript/utils/storage.d.ts +17 -0
- package/package.json +23 -24
- package/tsconfig.json +9 -8
- package/file_unzip.js +0 -5
- package/mobile-execution-lib-0.6.4.tgz +0 -0
|
@@ -4,29 +4,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
|
|
10
8
|
var _reactNative = require("react-native");
|
|
11
|
-
|
|
12
9
|
var _expoCamera = require("expo-camera");
|
|
13
|
-
|
|
14
10
|
var _utils = require("../../../utils/utils");
|
|
15
|
-
|
|
16
11
|
var _CaptureUtils = require("../imageCapture/CaptureUtils");
|
|
17
|
-
|
|
18
12
|
var _reactNativePaper = require("react-native-paper");
|
|
19
|
-
|
|
20
13
|
var _expoBlur = require("expo-blur");
|
|
21
|
-
|
|
22
14
|
var _reactNativeSafeAreaContext = require("react-native-safe-area-context");
|
|
23
|
-
|
|
24
15
|
var _CommonStyles = require("../../../styles/executionTasks/CommonStyles");
|
|
25
|
-
|
|
26
16
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
27
|
-
|
|
28
17
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
29
|
-
|
|
30
18
|
function Hint(_ref) {
|
|
31
19
|
let {
|
|
32
20
|
children
|
|
@@ -39,7 +27,6 @@ function Hint(_ref) {
|
|
|
39
27
|
style: styles.headerText
|
|
40
28
|
}, children));
|
|
41
29
|
}
|
|
42
|
-
|
|
43
30
|
const CScanner = props => {
|
|
44
31
|
const [isVisible, setVisible] = (0, _react.useState)(true);
|
|
45
32
|
const [hasPermission, setHasPermission] = (0, _react.useState)(null);
|
|
@@ -52,14 +39,12 @@ const CScanner = props => {
|
|
|
52
39
|
setHasPermission(response);
|
|
53
40
|
})();
|
|
54
41
|
}, []);
|
|
55
|
-
|
|
56
42
|
const _handleBarCodeScanned = scan => {
|
|
57
43
|
if (!(0, _utils.isEmptyOrBlank)(scan.data)) {
|
|
58
44
|
setVisible(false);
|
|
59
45
|
props.onScanned(scan.data);
|
|
60
46
|
}
|
|
61
47
|
};
|
|
62
|
-
|
|
63
48
|
if (!hasPermission) {
|
|
64
49
|
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
65
50
|
style: {
|
|
@@ -70,7 +55,6 @@ const CScanner = props => {
|
|
|
70
55
|
}, /*#__PURE__*/_react.default.createElement(_reactNativePaper.Title, null, 'No Permissions for Camera. Please provide camera permissions from app\
|
|
71
56
|
settings.'));
|
|
72
57
|
}
|
|
73
|
-
|
|
74
58
|
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
75
59
|
style: styles.container
|
|
76
60
|
}, isVisible ? /*#__PURE__*/_react.default.createElement(_expoCamera.Camera, {
|
|
@@ -83,14 +67,12 @@ const CScanner = props => {
|
|
|
83
67
|
style: [styles.header, {
|
|
84
68
|
bottom: 16 + bottom
|
|
85
69
|
}]
|
|
86
|
-
}, /*#__PURE__*/_react.default.createElement(Hint, null, 'or \nScan
|
|
87
|
-
};
|
|
88
|
-
|
|
70
|
+
}, /*#__PURE__*/_react.default.createElement(Hint, null, 'or \nScan Shipment ID')));
|
|
71
|
+
};
|
|
89
72
|
|
|
73
|
+
// exporting Scanner as Pure Component
|
|
90
74
|
var _default = /*#__PURE__*/(0, _react.memo)(CScanner);
|
|
91
|
-
|
|
92
75
|
exports.default = _default;
|
|
93
|
-
|
|
94
76
|
const styles = _reactNative.StyleSheet.create({
|
|
95
77
|
container: {
|
|
96
78
|
flex: 1,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Hint","children","styles","hint","headerText","CScanner","props","isVisible","setVisible","useState","hasPermission","setHasPermission","bottom","useSafeAreaInsets","useEffect","response","checkCameraPermissionUtil","_handleBarCodeScanned","scan","isEmptyOrBlank","data","onScanned","flex","justifyContent","alignItems","container","barCodeTypes","StyleSheet","absoluteFill","header","memo","create","backgroundColor","paddingHorizontal","paddingVertical","overflow","color","textAlign","fontSize","fontWeight","position","left","right","fontFamily","Fonts","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
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_expoCamera","_utils","_CaptureUtils","_reactNativePaper","_expoBlur","_reactNativeSafeAreaContext","_CommonStyles","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","Hint","_ref","children","createElement","BlurView","style","styles","hint","intensity","tint","Text","headerText","CScanner","props","isVisible","setVisible","useState","hasPermission","setHasPermission","bottom","useSafeAreaInsets","useEffect","response","checkCameraPermissionUtil","_handleBarCodeScanned","scan","isEmptyOrBlank","data","onScanned","View","flex","justifyContent","alignItems","Title","container","Camera","barCodeScannerSettings","barCodeTypes","onBarCodeScanned","StyleSheet","absoluteFill","header","_default","memo","exports","create","backgroundColor","paddingHorizontal","paddingVertical","overflow","color","textAlign","fontSize","fontWeight","position","left","right","fontFamily","Fonts","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,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AACA,IAAAK,iBAAA,GAAAL,OAAA;AACA,IAAAM,SAAA,GAAAN,OAAA;AACA,IAAAO,2BAAA,GAAAP,OAAA;AACA,IAAAQ,aAAA,GAAAR,OAAA;AAAoE,SAAAS,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAX,wBAAAe,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAA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
*/
|
|
11
|
-
|
|
12
10
|
/**
|
|
13
11
|
* Mode of scanning
|
|
14
12
|
*/
|
|
15
|
-
|
|
16
13
|
/**
|
|
17
14
|
* Max limit of items to be scanned in multi-scan mode
|
|
18
15
|
*/
|
|
19
|
-
|
|
20
16
|
/**
|
|
21
17
|
* Regex to validate scanned strings
|
|
22
18
|
*/
|
|
23
|
-
let SCAN_STATUS
|
|
24
|
-
exports.SCAN_STATUS = SCAN_STATUS;
|
|
25
|
-
|
|
26
|
-
(function (SCAN_STATUS) {
|
|
19
|
+
let SCAN_STATUS = /*#__PURE__*/function (SCAN_STATUS) {
|
|
27
20
|
SCAN_STATUS[SCAN_STATUS["ACCEPTED"] = 0] = "ACCEPTED";
|
|
28
21
|
SCAN_STATUS[SCAN_STATUS["REJECTED"] = 1] = "REJECTED";
|
|
29
22
|
SCAN_STATUS[SCAN_STATUS["TO_BE_SCANNED"] = 2] = "TO_BE_SCANNED";
|
|
30
23
|
SCAN_STATUS[SCAN_STATUS["NONE"] = 3] = "NONE";
|
|
31
|
-
|
|
24
|
+
return SCAN_STATUS;
|
|
25
|
+
}({});
|
|
26
|
+
exports.SCAN_STATUS = SCAN_STATUS;
|
|
32
27
|
//# sourceMappingURL=ScannerSchema.js.map
|
|
@@ -1 +1 @@
|
|
|
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":"
|
|
1
|
+
{"version":3,"names":["SCAN_STATUS","exports"],"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;AAFA,IAyDYA,WAAW,0BAAXA,WAAW;EAAXA,WAAW,CAAXA,WAAW;EAAXA,WAAW,CAAXA,WAAW;EAAXA,WAAW,CAAXA,WAAW;EAAXA,WAAW,CAAXA,WAAW;EAAA,OAAXA,WAAW;AAAA;AAAAC,OAAA,CAAAD,WAAA,GAAAA,WAAA"}
|
|
@@ -13,25 +13,15 @@ exports.getScannedItemStatus = getScannedItemStatus;
|
|
|
13
13
|
exports.getScannedList = getScannedList;
|
|
14
14
|
exports.getScannerETOutput = getScannerETOutput;
|
|
15
15
|
exports.isScannedAlready = isScannedAlready;
|
|
16
|
-
|
|
17
16
|
var _ScannerSchema = require("./ScannerSchema");
|
|
18
|
-
|
|
19
17
|
var _expoBarcodeScanner = require("expo-barcode-scanner");
|
|
20
|
-
|
|
21
18
|
var _ExecTaskUtils = require("../../../utils/ExecTaskUtils");
|
|
22
|
-
|
|
23
19
|
var _EventCodeContainer = require("../../../manager/dispatchCodes/EventCodeContainer");
|
|
24
|
-
|
|
25
20
|
var _ETConfig = require("../../../models/execTasks/ETConfig");
|
|
26
|
-
|
|
27
21
|
var _HttpEtUtils = require("../httpRequest/HttpEtUtils");
|
|
28
|
-
|
|
29
22
|
var jsonLogic = _interopRequireWildcard(require("json-logic-js"));
|
|
30
|
-
|
|
31
23
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
32
|
-
|
|
33
24
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
34
|
-
|
|
35
25
|
async function checkForValidation(data, validationRule, shipments) {
|
|
36
26
|
if (shipments && shipments.length > 0) {
|
|
37
27
|
const found = shipments.find(s => s === data);
|
|
@@ -56,14 +46,11 @@ async function checkForValidation(data, validationRule, shipments) {
|
|
|
56
46
|
}
|
|
57
47
|
} else return false;
|
|
58
48
|
}
|
|
59
|
-
|
|
60
49
|
function isScannedAlready(value, scansMap) {
|
|
61
50
|
var _scansMap$get;
|
|
62
|
-
|
|
63
51
|
if (!scansMap || scansMap.size === 0) return false;
|
|
64
52
|
return scansMap.has(value) && ((_scansMap$get = scansMap.get(value)) === null || _scansMap$get === void 0 ? void 0 : _scansMap$get.scanStatus) !== _ScannerSchema.SCAN_STATUS.TO_BE_SCANNED;
|
|
65
53
|
}
|
|
66
|
-
|
|
67
54
|
function getBarCodeTypes(input) {
|
|
68
55
|
if (input.scanType === 'QRCODE') {
|
|
69
56
|
return [_expoBarcodeScanner.BarCodeScanner.Constants.BarCodeType.qr];
|
|
@@ -71,14 +58,14 @@ function getBarCodeTypes(input) {
|
|
|
71
58
|
return [_expoBarcodeScanner.BarCodeScanner.Constants.BarCodeType.code128, _expoBarcodeScanner.BarCodeScanner.Constants.BarCodeType.code39, _expoBarcodeScanner.BarCodeScanner.Constants.BarCodeType.code93, _expoBarcodeScanner.BarCodeScanner.Constants.BarCodeType.codabar, _expoBarcodeScanner.BarCodeScanner.Constants.BarCodeType.itf14, _expoBarcodeScanner.BarCodeScanner.Constants.BarCodeType.upc_a, _expoBarcodeScanner.BarCodeScanner.Constants.BarCodeType.ean8, _expoBarcodeScanner.BarCodeScanner.Constants.BarCodeType.ean13, _expoBarcodeScanner.BarCodeScanner.Constants.BarCodeType.upc_e, _expoBarcodeScanner.BarCodeScanner.Constants.BarCodeType.upc_ean];
|
|
72
59
|
}
|
|
73
60
|
}
|
|
74
|
-
|
|
75
61
|
async function getScannerETOutput(scanList) {
|
|
76
62
|
return {
|
|
77
63
|
scans: getScannedItems(scanList),
|
|
78
|
-
...(await (0, _ExecTaskUtils.getBaseETResponse)(_ETConfig.EntityCode.SCAN, true,
|
|
64
|
+
...(await (0, _ExecTaskUtils.getBaseETResponse)(_ETConfig.EntityCode.SCAN, true,
|
|
65
|
+
//this component is not used, if utilized, add applicableReasons.success in getEventCodeByET as 3rd param
|
|
66
|
+
(0, _EventCodeContainer.getEventCodeByET)(_ETConfig.ExecutionTaskID.SCAN, true), ''))
|
|
79
67
|
};
|
|
80
68
|
}
|
|
81
|
-
|
|
82
69
|
function getScannedItems(scanList) {
|
|
83
70
|
const items = [];
|
|
84
71
|
if (!scanList || scanList.length === 0) return items;else {
|
|
@@ -92,7 +79,6 @@ function getScannedItems(scanList) {
|
|
|
92
79
|
return items;
|
|
93
80
|
}
|
|
94
81
|
}
|
|
95
|
-
|
|
96
82
|
function canScanMore(scanMode, size, limit) {
|
|
97
83
|
if (scanMode === 'SINGLE') {
|
|
98
84
|
return size <= 0;
|
|
@@ -105,7 +91,6 @@ function canScanMore(scanMode, size, limit) {
|
|
|
105
91
|
}
|
|
106
92
|
}
|
|
107
93
|
}
|
|
108
|
-
|
|
109
94
|
function getScannedList(rtScans) {
|
|
110
95
|
if (!rtScans || rtScans.length === 0) return [];
|
|
111
96
|
let result = [];
|
|
@@ -118,7 +103,6 @@ function getScannedList(rtScans) {
|
|
|
118
103
|
});
|
|
119
104
|
return result;
|
|
120
105
|
}
|
|
121
|
-
|
|
122
106
|
function getItemsToBeScanned(scansMap) {
|
|
123
107
|
if (!scansMap || scansMap.size === 0) return [];else {
|
|
124
108
|
const result = [];
|
|
@@ -128,15 +112,12 @@ function getItemsToBeScanned(scansMap) {
|
|
|
128
112
|
return result;
|
|
129
113
|
}
|
|
130
114
|
}
|
|
131
|
-
|
|
132
|
-
let SCAN_ACTIONS;
|
|
133
|
-
exports.SCAN_ACTIONS = SCAN_ACTIONS;
|
|
134
|
-
|
|
135
|
-
(function (SCAN_ACTIONS) {
|
|
115
|
+
let SCAN_ACTIONS = /*#__PURE__*/function (SCAN_ACTIONS) {
|
|
136
116
|
SCAN_ACTIONS[SCAN_ACTIONS["DELETE"] = 0] = "DELETE";
|
|
137
117
|
SCAN_ACTIONS[SCAN_ACTIONS["CHANGE_STATUS"] = 1] = "CHANGE_STATUS";
|
|
138
|
-
|
|
139
|
-
|
|
118
|
+
return SCAN_ACTIONS;
|
|
119
|
+
}({});
|
|
120
|
+
exports.SCAN_ACTIONS = SCAN_ACTIONS;
|
|
140
121
|
function getScannedItemCount(scannedList, status) {
|
|
141
122
|
if (!scannedList || scannedList.length === 0) return 0;
|
|
142
123
|
let completed = 0;
|
|
@@ -148,44 +129,34 @@ function getScannedItemCount(scannedList, status) {
|
|
|
148
129
|
case _ScannerSchema.SCAN_STATUS.NONE:
|
|
149
130
|
completed++;
|
|
150
131
|
break;
|
|
151
|
-
|
|
152
132
|
case _ScannerSchema.SCAN_STATUS.TO_BE_SCANNED:
|
|
153
133
|
toBeScanned++;
|
|
154
134
|
break;
|
|
155
|
-
|
|
156
135
|
case _ScannerSchema.SCAN_STATUS.REJECTED:
|
|
157
136
|
rejected++;
|
|
158
137
|
break;
|
|
159
|
-
|
|
160
138
|
default:
|
|
161
139
|
break;
|
|
162
140
|
}
|
|
163
141
|
});
|
|
164
|
-
|
|
165
142
|
switch (status) {
|
|
166
143
|
case _ScannerSchema.SCAN_STATUS.ACCEPTED:
|
|
167
144
|
case _ScannerSchema.SCAN_STATUS.NONE:
|
|
168
145
|
return completed;
|
|
169
|
-
|
|
170
146
|
case _ScannerSchema.SCAN_STATUS.TO_BE_SCANNED:
|
|
171
147
|
return toBeScanned;
|
|
172
|
-
|
|
173
148
|
case _ScannerSchema.SCAN_STATUS.REJECTED:
|
|
174
149
|
return rejected;
|
|
175
150
|
}
|
|
176
151
|
}
|
|
177
|
-
|
|
178
152
|
function getScannedItemStatus(scanStatus) {
|
|
179
153
|
switch (scanStatus) {
|
|
180
154
|
case _ScannerSchema.SCAN_STATUS.TO_BE_SCANNED:
|
|
181
155
|
return 'To be Scanned';
|
|
182
|
-
|
|
183
156
|
case _ScannerSchema.SCAN_STATUS.ACCEPTED:
|
|
184
157
|
return 'Completed';
|
|
185
|
-
|
|
186
158
|
case _ScannerSchema.SCAN_STATUS.REJECTED:
|
|
187
159
|
return 'Rejected';
|
|
188
|
-
|
|
189
160
|
case _ScannerSchema.SCAN_STATUS.NONE:
|
|
190
161
|
return '';
|
|
191
162
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["checkForValidation","data","validationRule","shipments","length","found","find","s","undefined","regex","RegExp","test","validation","apiResponse","getApiResponse","errorJsonPath","responseJsonPath","uri","httpMethod","timeout","headers","jsonLogic","apply","responseJsonLogic","error","isScannedAlready","value","scansMap","size","has","get","scanStatus","SCAN_STATUS","TO_BE_SCANNED","getBarCodeTypes","input","scanType","BarCodeScanner","Constants","BarCodeType","qr","code128","code39","code93","codabar","itf14","upc_a","ean8","ean13","upc_e","upc_ean","getScannerETOutput","scanList","scans","getScannedItems","getBaseETResponse","EntityCode","SCAN","getEventCodeByET","ExecutionTaskID","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 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;;AACA;;AACA;;AACA;;AACA;;AAIA;;AAEA;;;;;;AAEO,eAAeA,kBAAf,CACLC,IADK,EAELC,cAFK,EAGLC,SAHK,EAIL;EACA,IAAIA,SAAS,IAAIA,SAAS,CAACC,MAAV,GAAmB,CAApC,EAAuC;IACrC,MAAMC,KAAK,GAAGF,SAAS,CAACG,IAAV,CAAgBC,CAAD,IAAOA,CAAC,KAAKN,IAA5B,CAAd;IACA,OAAOI,KAAK,KAAKG,SAAjB;EACD,CAHD,MAG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,CACLC,WADK,EAELC,MAFK,EAGL;EACA,IAAI,CAACD,WAAD,IAAgBA,WAAW,CAACzE,MAAZ,KAAuB,CAA3C,EAA8C,OAAO,CAAP;EAC9C,IAAI2E,SAAS,GAAG,CAAhB;EACA,IAAIC,QAAQ,GAAG,CAAf;EACA,IAAIC,WAAW,GAAG,CAAlB;EACAJ,WAAW,CAAChB,OAAZ,CAAqBqB,CAAD,IAAO;IACzB,QAAQA,CAAC,CAACnD,UAAV;MACE,KAAKC,0BAAA,CAAYmD,QAAjB;MACA,KAAKnD,0BAAA,CAAYoD,IAAjB;QACEL,SAAS;QACT;;MACF,KAAK/C,0BAAA,CAAYC,aAAjB;QACEgD,WAAW;QACX;;MACF,KAAKjD,0BAAA,CAAYqD,QAAjB;QACEL,QAAQ;QACR;;MACF;QACE;IAZJ;EAcD,CAfD;;EAgBA,QAAQF,MAAR;IACE,KAAK9C,0BAAA,CAAYmD,QAAjB;IACA,KAAKnD,0BAAA,CAAYoD,IAAjB;MACE,OAAOL,SAAP;;IACF,KAAK/C,0BAAA,CAAYC,aAAjB;MACE,OAAOgD,WAAP;;IACF,KAAKjD,0BAAA,CAAYqD,QAAjB;MACE,OAAOL,QAAP;EAPJ;AASD;;AACM,SAASM,oBAAT,CAA8BvD,UAA9B,EAAuD;EAC5D,QAAQA,UAAR;IACE,KAAKC,0BAAA,CAAYC,aAAjB;MACE,OAAO,eAAP;;IACF,KAAKD,0BAAA,CAAYmD,QAAjB;MACE,OAAO,WAAP;;IACF,KAAKnD,0BAAA,CAAYqD,QAAjB;MACE,OAAO,UAAP;;IACF,KAAKrD,0BAAA,CAAYoD,IAAjB;MACE,OAAO,EAAP;EARJ;AAUD"}
|
|
1
|
+
{"version":3,"names":["_ScannerSchema","require","_expoBarcodeScanner","_ExecTaskUtils","_EventCodeContainer","_ETConfig","_HttpEtUtils","jsonLogic","_interopRequireWildcard","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","checkForValidation","data","validationRule","shipments","length","found","find","s","undefined","regex","RegExp","test","validation","apiResponse","getApiResponse","errorJsonPath","responseJsonPath","uri","httpMethod","timeout","headers","apply","responseJsonLogic","error","isScannedAlready","value","scansMap","_scansMap$get","size","scanStatus","SCAN_STATUS","TO_BE_SCANNED","getBarCodeTypes","input","scanType","BarCodeScanner","Constants","BarCodeType","qr","code128","code39","code93","codabar","itf14","upc_a","ean8","ean13","upc_e","upc_ean","getScannerETOutput","scanList","scans","getScannedItems","getBaseETResponse","EntityCode","SCAN","getEventCodeByET","ExecutionTaskID","items","forEach","ite","push","validated","timestamp","Date","now","canScanMore","scanMode","limit","getScannedList","rtScans","result","getItemsToBeScanned","SCAN_ACTIONS","exports","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,IAAAA,cAAA,GAAAC,OAAA;AACA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AU;IAChB,KAAKC,0BAAW,CAACC,aAAa;MAC5B,OAAO,eAAe;IACxB,KAAKD,0BAAW,CAACoD,QAAQ;MACvB,OAAO,WAAW;IACpB,KAAKpD,0BAAW,CAACsD,QAAQ;MACvB,OAAO,UAAU;IACnB,KAAKtD,0BAAW,CAACqD,IAAI;MACnB,OAAO,EAAE;EAAC;AAEhB"}
|
|
@@ -4,17 +4,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _reactNative = require("react-native");
|
|
11
|
-
|
|
12
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
10
|
const DropDownSelector = () => {
|
|
15
11
|
return /*#__PURE__*/_react.default.createElement(_reactNative.View, null);
|
|
16
12
|
};
|
|
17
|
-
|
|
18
13
|
var _default = DropDownSelector;
|
|
19
14
|
exports.default = _default;
|
|
20
15
|
//# sourceMappingURL=DropDownSelector.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["DropDownSelector"],"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":"
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","obj","__esModule","default","DropDownSelector","createElement","View","_default","exports"],"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,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAAoC,SAAAD,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAEpC,MAAMG,gBAAgB,GAAGA,CAAA,KAAM;EAC7B,oBAAOP,MAAA,CAAAM,OAAA,CAAAE,aAAA,CAACL,YAAA,CAAAM,IAAI,OAAQ;AACtB,CAAC;AAAC,IAAAC,QAAA,GAEaH,gBAAgB;AAAAI,OAAA,CAAAL,OAAA,GAAAI,QAAA"}
|
|
@@ -4,22 +4,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.getDropDownItems = getDropDownItems;
|
|
7
|
-
|
|
8
7
|
var _ETConfig = require("../../../../models/execTasks/ETConfig");
|
|
9
|
-
|
|
10
8
|
var _ReasonCodeContainer = _interopRequireDefault(require("../../../../manager/dispatchCodes/ReasonCodeContainer"));
|
|
11
|
-
|
|
12
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
10
|
async function getDropDownItems(reasonsList) {
|
|
15
11
|
if (!reasonsList) return [];
|
|
16
12
|
let reasons = [];
|
|
17
|
-
|
|
18
13
|
if (reasonsList[_ETConfig.BaseEventCodes.ENTITY_SUCCESS]) {
|
|
19
14
|
//todo all Image Icon for success and Failure
|
|
20
15
|
for (const r of reasonsList[_ETConfig.BaseEventCodes.ENTITY_SUCCESS]) {
|
|
21
16
|
let reasonByCode = await _ReasonCodeContainer.default.getInstance().getReasonByCode(r);
|
|
22
|
-
|
|
23
17
|
if (reasonByCode) {
|
|
24
18
|
reasons.push({
|
|
25
19
|
reasonText: (reasonByCode === null || reasonByCode === void 0 ? void 0 : reasonByCode.description) ?? 'NO DESCRIPTION FOUND',
|
|
@@ -29,11 +23,9 @@ async function getDropDownItems(reasonsList) {
|
|
|
29
23
|
}
|
|
30
24
|
}
|
|
31
25
|
}
|
|
32
|
-
|
|
33
26
|
if (reasonsList[_ETConfig.BaseEventCodes.ENTITY_FAILURE]) {
|
|
34
27
|
for (const r of reasonsList[_ETConfig.BaseEventCodes.ENTITY_FAILURE]) {
|
|
35
28
|
let reasonByCode = await _ReasonCodeContainer.default.getInstance().getReasonByCode(r);
|
|
36
|
-
|
|
37
29
|
if (reasonByCode) {
|
|
38
30
|
reasons.push({
|
|
39
31
|
reasonText: (reasonByCode === null || reasonByCode === void 0 ? void 0 : reasonByCode.description) ?? 'NO DESCRIPTION FOUND',
|
|
@@ -43,7 +35,6 @@ async function getDropDownItems(reasonsList) {
|
|
|
43
35
|
}
|
|
44
36
|
}
|
|
45
37
|
}
|
|
46
|
-
|
|
47
38
|
return reasons;
|
|
48
39
|
}
|
|
49
40
|
//# sourceMappingURL=DropDownUtils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getDropDownItems","reasonsList","reasons","BaseEventCodes","ENTITY_SUCCESS","r","reasonByCode","ReasonCodeContainer","getInstance","getReasonByCode","push","reasonText","description","reasonCode","success","ENTITY_FAILURE"],"sources":["DropDownUtils.ts"],"sourcesContent":["import type { ReasonItem } from './ReasonDropDown';\nimport
|
|
1
|
+
{"version":3,"names":["_ETConfig","require","_ReasonCodeContainer","_interopRequireDefault","obj","__esModule","default","getDropDownItems","reasonsList","reasons","BaseEventCodes","ENTITY_SUCCESS","r","reasonByCode","ReasonCodeContainer","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,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,oBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAAwF,SAAAE,uBAAAC,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAEjF,eAAeG,gBAAgBA,CACpCC,WAAiB,EACM;EACvB,IAAI,CAACA,WAAW,EAAE,OAAO,EAAE;EAC3B,IAAIC,OAAqB,GAAG,EAAE;EAC9B,IAAID,WAAW,CAACE,wBAAc,CAACC,cAAc,CAAC,EAAE;IAC9C;IACA,KAAK,MAAMC,CAAC,IAAIJ,WAAW,CAACE,wBAAc,CAACC,cAAc,CAAC,EAAE;MAC1D,IAAIE,YAAY,GACd,MAAMC,4BAAmB,CAACC,WAAW,EAAE,CAACC,eAAe,CAACJ,CAAC,CAAC;MAC5D,IAAIC,YAAY,EAAE;QAChBJ,OAAO,CAACQ,IAAI,CAAC;UACXC,UAAU,EAAE,CAAAL,YAAY,aAAZA,YAAY,uBAAZA,YAAY,CAAEM,WAAW,KAAI,sBAAsB;UAC/DC,UAAU,EAAER,CAAC;UACbS,OAAO,EAAE;QACX,CAAC,CAAC;MACJ;IACF;EACF;EACA,IAAIb,WAAW,CAACE,wBAAc,CAACY,cAAc,CAAC,EAAE;IAC9C,KAAK,MAAMV,CAAC,IAAIJ,WAAW,CAACE,wBAAc,CAACY,cAAc,CAAC,EAAE;MAC1D,IAAIT,YAAY,GACd,MAAMC,4BAAmB,CAACC,WAAW,EAAE,CAACC,eAAe,CAACJ,CAAC,CAAC;MAC5D,IAAIC,YAAY,EAAE;QAChBJ,OAAO,CAACQ,IAAI,CAAC;UACXC,UAAU,EAAE,CAAAL,YAAY,aAAZA,YAAY,uBAAZA,YAAY,CAAEM,WAAW,KAAI,sBAAsB;UAC/DC,UAAU,EAAER,CAAC;UACbS,OAAO,EAAE;QACX,CAAC,CAAC;MACJ;IACF;EACF;EACA,OAAOZ,OAAO;AAChB"}
|
|
@@ -4,29 +4,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _reactNative = require("react-native");
|
|
9
|
-
|
|
10
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
|
|
12
9
|
var _CommonStyles = require("../../../../styles/executionTasks/CommonStyles");
|
|
13
|
-
|
|
14
10
|
var _reactNativePaper = require("react-native-paper");
|
|
15
|
-
|
|
16
11
|
var _ReasonDropDown = _interopRequireDefault(require("./ReasonDropDown"));
|
|
17
|
-
|
|
18
12
|
var _ScannerUtils = require("../ScannerUtils");
|
|
19
|
-
|
|
20
13
|
var _ScannerSchema = require("../ScannerSchema");
|
|
21
|
-
|
|
22
14
|
var _Toaster = require("../../../widgets/Toaster");
|
|
23
|
-
|
|
24
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
|
-
|
|
26
16
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
27
|
-
|
|
28
17
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
29
|
-
|
|
30
18
|
const RTReasonSelection = props => {
|
|
31
19
|
const [selectedReason, setSelectedReason] = (0, _react.useState)();
|
|
32
20
|
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
@@ -84,7 +72,6 @@ const RTReasonSelection = props => {
|
|
|
84
72
|
sc.reasonText = selectedReason.reasonText;
|
|
85
73
|
sc.success = selectedReason.success;
|
|
86
74
|
}
|
|
87
|
-
|
|
88
75
|
return sc;
|
|
89
76
|
});
|
|
90
77
|
props.onSubmitET(scanResults);
|
|
@@ -101,7 +88,6 @@ const RTReasonSelection = props => {
|
|
|
101
88
|
}
|
|
102
89
|
}, "Cancel")));
|
|
103
90
|
};
|
|
104
|
-
|
|
105
91
|
var _default = RTReasonSelection;
|
|
106
92
|
exports.default = _default;
|
|
107
93
|
//# sourceMappingURL=RTReasonSelection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["RTReasonSelection","props","selectedReason","setSelectedReason","useState","CommonStyles","mainContainer","flex","marginTop","marginBottom","backgroundColor","padding","lineHeight","fontFamily","Fonts","IBMPlexSans_600SemiBold","color","fontSize","getScannedItemCount","scanList","SCAN_STATUS","TO_BE_SCANNED","IBMPlexSans_400Regular","reasons","reasonItem","marginStart","marginEnd","justifyContent","nextButtonLabel","nextButton","length","scanResults","map","sc","scanStatus","reasonCode","reasonText","success","onSubmitET","showToast","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 showReasonSelectionPage: (show: boolean) => void;\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_react","_interopRequireWildcard","_CommonStyles","_reactNativePaper","_ReasonDropDown","_interopRequireDefault","_ScannerUtils","_ScannerSchema","_Toaster","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","RTReasonSelection","props","selectedReason","setSelectedReason","useState","createElement","View","style","CommonStyles","mainContainer","flex","marginTop","marginBottom","backgroundColor","padding","Text","lineHeight","fontFamily","Fonts","IBMPlexSans_600SemiBold","color","fontSize","getScannedItemCount","scanList","SCAN_STATUS","TO_BE_SCANNED","IBMPlexSans_400Regular","items","reasons","onItemChange","reasonItem","marginStart","marginEnd","justifyContent","Button","labelStyle","nextButtonLabel","nextButton","mode","onPress","length","scanResults","map","sc","scanStatus","reasonCode","reasonText","success","onSubmitET","showToast","cancelButton","cancelButtonLabel","showReasonSelectionPage","_default","exports"],"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 showReasonSelectionPage: (show: boolean) => void;\n};\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,aAAA,GAAAH,OAAA;AAIA,IAAAI,iBAAA,GAAAJ,OAAA;AACA,IAAAK,eAAA,GAAAC,sBAAA,CAAAN,OAAA;AAEA,IAAAO,aAAA,GAAAP,OAAA;AACA,IAAAQ,cAAA,GAAAR,OAAA;AACA,IAAAS,QAAA,GAAAT,OAAA;AAAqD,SAAAM,uBAAAI,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAZ,wBAAAQ,GAAA,EAAAI,WAAA,SAAAA,WAAA,IAAAJ,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAQ,KAAA,GAAAL,wBAAA,CAAAC,WAAA,OAAAI,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAT,GAAA,YAAAQ,KAAA,CAAAE,GAAA,CAAAV,GAAA,SAAAW,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAh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