@os1-platform/dispatch-mobile 1.0.8 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +310 -74
- package/android/.gradle/7.0.2/fileChanges/last-build.bin +0 -0
- package/android/.gradle/7.0.2/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/7.0.2/gc.properties +0 -0
- package/android/.gradle/7.2/dependencies-accessors/dependencies-accessors.lock +0 -0
- package/android/.gradle/7.2/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/7.2/executionHistory/executionHistory.bin +0 -0
- package/android/.gradle/7.2/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/7.2/fileChanges/last-build.bin +0 -0
- package/android/.gradle/7.2/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/7.2/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/7.2/fileHashes/resourceHashesCache.bin +0 -0
- package/android/.gradle/7.2/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
- package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
- package/android/.gradle/checksums/checksums.lock +0 -0
- package/android/.gradle/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/checksums/sha1-checksums.bin +0 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/.idea/compiler.xml +6 -0
- package/android/.idea/gradle.xml +18 -0
- package/android/.idea/jarRepositories.xml +35 -0
- package/android/.idea/kotlinc.xml +6 -0
- package/android/.idea/misc.xml +9 -0
- package/android/.idea/vcs.xml +6 -0
- package/android/gradle.properties +1 -1
- package/android/local.properties +8 -0
- package/android/src/main/AndroidManifest.xml +0 -1
- package/android/src/main/java/com/dispatchsdk/DispatchSdkPackage.kt +3 -1
- package/android/src/main/java/com/dispatchsdk/sharedPref/SharedPreferenceModule.kt +166 -0
- package/lib/commonjs/@types/assets/index.d.js +2 -0
- package/lib/commonjs/@types/assets/index.d.js.map +1 -0
- package/lib/commonjs/components/dispatch/DispatchExecNavigator.js +50 -43
- package/lib/commonjs/components/dispatch/DispatchExecNavigator.js.map +1 -1
- package/lib/commonjs/components/executiontasks/ExecutionTasksIndex.js +10 -48
- package/lib/commonjs/components/executiontasks/ExecutionTasksIndex.js.map +1 -1
- package/lib/commonjs/components/executiontasks/cancellation/CancelET.js +142 -23
- package/lib/commonjs/components/executiontasks/cancellation/CancelET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/cancellation/CancellationSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js +66 -18
- package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js.map +1 -1
- package/lib/commonjs/components/executiontasks/captureInput/utils.js +13 -0
- package/lib/commonjs/components/executiontasks/captureInput/utils.js.map +1 -0
- package/lib/commonjs/components/executiontasks/deliver/DeliverET.js +6 -16
- package/lib/commonjs/components/executiontasks/deliver/DeliverET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/deliver/DeliverETInput.js.map +1 -1
- package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js +212 -95
- package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/display/DisplayModalET.js +16 -25
- package/lib/commonjs/components/executiontasks/display/DisplayModalET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/doodle/SignatureET.js +65 -29
- package/lib/commonjs/components/executiontasks/doodle/SignatureET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/dropCash/DropCashET.js +5 -19
- package/lib/commonjs/components/executiontasks/dropCash/DropCashET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js +74 -30
- package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/FormGenerator.js +139 -50
- package/lib/commonjs/components/executiontasks/forms/FormGenerator.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/DateTimeWidget.js +3 -26
- package/lib/commonjs/components/executiontasks/forms/widgets/DateTimeWidget.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/DropdownWidget.js +49 -0
- package/lib/commonjs/components/executiontasks/forms/widgets/DropdownWidget.js.map +1 -0
- package/lib/commonjs/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js +2 -17
- package/lib/commonjs/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/TimeRangeSelector.js +0 -10
- package/lib/commonjs/components/executiontasks/forms/widgets/TimeRangeSelector.js.map +1 -1
- package/lib/commonjs/components/executiontasks/httpRequest/HttpEtUtils.js +5 -14
- package/lib/commonjs/components/executiontasks/httpRequest/HttpEtUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/httpRequest/HttpRequestET.js +3 -15
- package/lib/commonjs/components/executiontasks/httpRequest/HttpRequestET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/imageCapture/CaptureSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js +11 -36
- package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js +73 -48
- package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/PaymentStyles.js +0 -4
- package/lib/commonjs/components/executiontasks/payments/PaymentStyles.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/PaymentUtils.js +0 -2
- package/lib/commonjs/components/executiontasks/payments/PaymentUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js +76 -29
- package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js +63 -24
- package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js +71 -22
- package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/pickup/PickupET.js +5 -15
- package/lib/commonjs/components/executiontasks/pickup/PickupET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js +138 -32
- package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/ScanET.js +741 -0
- package/lib/commonjs/components/executiontasks/scan/ScanET.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/ScanSchema.js +19 -0
- package/lib/commonjs/components/executiontasks/scan/ScanSchema.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/constants.js +19 -0
- package/lib/commonjs/components/executiontasks/scan/constants.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/interfaces.js +43 -0
- package/lib/commonjs/components/executiontasks/scan/interfaces.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/modalConstant.js +104 -0
- package/lib/commonjs/components/executiontasks/scan/modalConstant.js.map +1 -0
- package/lib/commonjs/components/executiontasks/{scanner → scan/sub_components}/CScanner.js +9 -29
- package/lib/commonjs/components/executiontasks/scan/sub_components/CScanner.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/DropDownUtils.js +109 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/DropDownUtils.js.map +1 -0
- package/lib/commonjs/components/executiontasks/{scanner/returns/ReasonDropDown.js → scan/sub_components/ERDropDown.js} +72 -55
- package/lib/commonjs/components/executiontasks/scan/sub_components/ERDropDown.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/SummaryPage.js +1099 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/SummaryPage.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/utils.js +762 -0
- package/lib/commonjs/components/executiontasks/scan/utils.js.map +1 -0
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPET.js +333 -0
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPET.js.map +1 -0
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPSchema.js +14 -0
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPSchema.js.map +1 -0
- package/lib/commonjs/components/executiontasks/validateOTP/constants.js +37 -0
- package/lib/commonjs/components/executiontasks/validateOTP/constants.js.map +1 -0
- package/lib/commonjs/components/executiontasks/validateOTP/sub-components/OTPInput.js +63 -0
- package/lib/commonjs/components/executiontasks/validateOTP/sub-components/OTPInput.js.map +1 -0
- package/lib/commonjs/components/executiontasks/validateOTP/utils.js +147 -0
- package/lib/commonjs/components/executiontasks/validateOTP/utils.js.map +1 -0
- package/lib/commonjs/components/executiontasks/verifyLocation/GeofenceUtils.js +0 -13
- package/lib/commonjs/components/executiontasks/verifyLocation/GeofenceUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/verifyLocation/VerifyLocationET.js +4 -17
- package/lib/commonjs/components/executiontasks/verifyLocation/VerifyLocationET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpET.js +3 -18
- package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpSchema.js.map +1 -1
- package/lib/commonjs/components/utils/index.js +14 -0
- package/lib/commonjs/components/utils/index.js.map +1 -0
- package/lib/commonjs/components/widgets/AlertDisplay.js +0 -5
- package/lib/commonjs/components/widgets/AlertDisplay.js.map +1 -1
- package/lib/commonjs/components/widgets/CancelOrderDialog.js +0 -12
- package/lib/commonjs/components/widgets/CancelOrderDialog.js.map +1 -1
- package/lib/commonjs/components/widgets/Card.js +88 -0
- package/lib/commonjs/components/widgets/Card.js.map +1 -0
- package/lib/commonjs/components/widgets/GoBackModal.js +48 -0
- package/lib/commonjs/components/widgets/GoBackModal.js.map +1 -0
- package/lib/commonjs/components/widgets/IconButton.js +34 -0
- package/lib/commonjs/components/widgets/IconButton.js.map +1 -0
- package/lib/commonjs/components/widgets/ModalWidget.js +99 -0
- package/lib/commonjs/components/widgets/ModalWidget.js.map +1 -0
- package/lib/commonjs/components/widgets/ProgressDialog.js +0 -7
- package/lib/commonjs/components/widgets/ProgressDialog.js.map +1 -1
- package/lib/commonjs/components/widgets/SearchBar.js +74 -0
- package/lib/commonjs/components/widgets/SearchBar.js.map +1 -0
- package/lib/commonjs/components/widgets/SnackBarCustom.js +48 -40
- package/lib/commonjs/components/widgets/SnackBarCustom.js.map +1 -1
- package/lib/commonjs/components/widgets/SplitTextInput.js +93 -0
- package/lib/commonjs/components/widgets/SplitTextInput.js.map +1 -0
- package/lib/commonjs/components/widgets/TabsComponent.js +64 -0
- package/lib/commonjs/components/widgets/TabsComponent.js.map +1 -0
- package/lib/commonjs/components/widgets/Toaster.js +0 -2
- package/lib/commonjs/components/widgets/Toaster.js.map +1 -1
- package/lib/commonjs/config/DispatchSDKConfig.js +4 -5
- package/lib/commonjs/config/DispatchSDKConfig.js.map +1 -1
- package/lib/commonjs/constants/apiConstants.js +17 -0
- package/lib/commonjs/constants/apiConstants.js.map +1 -0
- package/lib/commonjs/constants/constants.js +7 -3
- package/lib/commonjs/constants/constants.js.map +1 -1
- package/lib/commonjs/constants/statuscode.js +3 -5
- package/lib/commonjs/constants/statuscode.js.map +1 -1
- package/lib/commonjs/errors/BaseError.js +3 -8
- package/lib/commonjs/errors/BaseError.js.map +1 -1
- package/lib/commonjs/errors/ErrorCodes.js +7 -6
- package/lib/commonjs/errors/ErrorCodes.js.map +1 -1
- package/lib/commonjs/events/EventDispatcher.js +23 -0
- package/lib/commonjs/events/EventDispatcher.js.map +1 -0
- package/lib/commonjs/events/EventListener.js +20 -0
- package/lib/commonjs/events/EventListener.js.map +1 -0
- package/lib/commonjs/events/constants.js +15 -0
- package/lib/commonjs/events/constants.js.map +1 -0
- package/lib/commonjs/events/index.js +11 -0
- package/lib/commonjs/events/index.js.map +1 -0
- package/lib/commonjs/events/interface.js +2 -0
- package/lib/commonjs/events/interface.js.map +1 -0
- package/lib/commonjs/index.js +40 -35
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/manager/dispatch/DispatchStateContainer.js +328 -272
- package/lib/commonjs/manager/dispatch/DispatchStateContainer.js.map +1 -1
- package/lib/commonjs/manager/dispatchCodes/EventCodeContainer.js +55 -4
- package/lib/commonjs/manager/dispatchCodes/EventCodeContainer.js.map +1 -1
- package/lib/commonjs/manager/dispatchCodes/EventCodeRepo.js +70 -0
- package/lib/commonjs/manager/dispatchCodes/EventCodeRepo.js.map +1 -0
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeContainer.js +3 -29
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeContainer.js.map +1 -1
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeRepo.js +6 -20
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeRepo.js.map +1 -1
- package/lib/commonjs/manager/jobRemoval/JobRemovalManager.js +23 -0
- package/lib/commonjs/manager/jobRemoval/JobRemovalManager.js.map +1 -0
- package/lib/commonjs/manager/location/LocationManager.js +3 -20
- package/lib/commonjs/manager/location/LocationManager.js.map +1 -1
- package/lib/commonjs/manager/sdk/DispatchSDKManager.js +23 -37
- package/lib/commonjs/manager/sdk/DispatchSDKManager.js.map +1 -1
- package/lib/commonjs/manager/sdk/DispatchSdkCache.js +6 -17
- package/lib/commonjs/manager/sdk/DispatchSdkCache.js.map +1 -1
- package/lib/commonjs/manager/sdk/callbacksHandler.js +26 -0
- package/lib/commonjs/manager/sdk/callbacksHandler.js.map +1 -0
- package/lib/commonjs/manager/syncmanager/AppSyncManager.js +26 -46
- package/lib/commonjs/manager/syncmanager/AppSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/DBConfig.js +48 -9
- package/lib/commonjs/manager/syncmanager/DBConfig.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/NativeSyncManager.js +0 -2
- package/lib/commonjs/manager/syncmanager/NativeSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/constants.js +17 -0
- package/lib/commonjs/manager/syncmanager/constants.js.map +1 -0
- package/lib/commonjs/manager/syncmanager/database.js +28 -12
- package/lib/commonjs/manager/syncmanager/database.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js +11 -36
- package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentManager.js +8 -26
- package/lib/commonjs/manager/syncmanager/document/DocumentManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js +19 -58
- package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/events/ETEventsManager.js +414 -29
- package/lib/commonjs/manager/syncmanager/events/ETEventsManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/events/EventsSyncManager.js +208 -103
- package/lib/commonjs/manager/syncmanager/events/EventsSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/events/SyncHttpClient.js +157 -36
- package/lib/commonjs/manager/syncmanager/events/SyncHttpClient.js.map +1 -1
- package/lib/commonjs/models/DispatchModels.js +4 -5
- package/lib/commonjs/models/DispatchModels.js.map +1 -1
- package/lib/commonjs/models/ReasonCodes.js.map +1 -1
- package/lib/commonjs/models/execTasks/ETBaseModels.js +4 -0
- package/lib/commonjs/models/execTasks/ETBaseModels.js.map +1 -1
- package/lib/commonjs/models/execTasks/ETConfig.js +28 -35
- package/lib/commonjs/models/execTasks/ETConfig.js.map +1 -1
- package/lib/commonjs/models/sdk.js +4 -5
- package/lib/commonjs/models/sdk.js.map +1 -1
- package/lib/commonjs/native/signature/SignatureCapture.js +3 -24
- package/lib/commonjs/native/signature/SignatureCapture.js.map +1 -1
- package/lib/commonjs/network/GraphQLClient.js +7 -35
- package/lib/commonjs/network/GraphQLClient.js.map +1 -1
- package/lib/commonjs/network/NetworkClient.js +2 -13
- package/lib/commonjs/network/NetworkClient.js.map +1 -1
- package/lib/commonjs/network/NetworkUtils.js +10 -8
- package/lib/commonjs/network/NetworkUtils.js.map +1 -1
- package/lib/commonjs/network/Queries.js +0 -2
- package/lib/commonjs/network/Queries.js.map +1 -1
- package/lib/commonjs/network/client.js +6 -21
- package/lib/commonjs/network/client.js.map +1 -1
- package/lib/commonjs/res/strings.js.map +1 -1
- package/lib/commonjs/resources/Login.js +4 -15
- package/lib/commonjs/resources/Login.js.map +1 -1
- package/lib/commonjs/resources/network.js +3 -8
- package/lib/commonjs/resources/network.js.map +1 -1
- package/lib/commonjs/styles/SdkColors.js +10 -8
- package/lib/commonjs/styles/SdkColors.js.map +1 -1
- package/lib/commonjs/styles/executionTasks/CommonStyles.js +58 -25
- package/lib/commonjs/styles/executionTasks/CommonStyles.js.map +1 -1
- package/lib/commonjs/ui/screens/CancellationScreen.js +67 -27
- package/lib/commonjs/ui/screens/CancellationScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/CaptureInputScreen.js +15 -16
- package/lib/commonjs/ui/screens/CaptureInputScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/CompleteObjectiveScreen.js +11 -23
- package/lib/commonjs/ui/screens/CompleteObjectiveScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DeliverScreen.js +30 -17
- package/lib/commonjs/ui/screens/DeliverScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DisplayScreen.js +17 -13
- package/lib/commonjs/ui/screens/DisplayScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DoodleScreen.js +17 -20
- package/lib/commonjs/ui/screens/DoodleScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DropCashScreen.js +43 -31
- package/lib/commonjs/ui/screens/DropCashScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ETScreensIndex.js +10 -19
- package/lib/commonjs/ui/screens/ETScreensIndex.js.map +1 -1
- package/lib/commonjs/ui/screens/FormsScreen.js +105 -17
- package/lib/commonjs/ui/screens/FormsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/GeofenceScreen.js +16 -14
- package/lib/commonjs/ui/screens/GeofenceScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HttpRequestScreen.js +14 -11
- package/lib/commonjs/ui/screens/HttpRequestScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ImageCaptureScreen.js +38 -17
- package/lib/commonjs/ui/screens/ImageCaptureScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PaymentScreen.js +28 -29
- package/lib/commonjs/ui/screens/PaymentScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PickupScreen.js +41 -19
- package/lib/commonjs/ui/screens/PickupScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ScanScreen.js +121 -0
- package/lib/commonjs/ui/screens/ScanScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/StartWorkFlowScreen.js +64 -38
- package/lib/commonjs/ui/screens/StartWorkFlowScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ValidateOTPScreen.js +55 -0
- package/lib/commonjs/ui/screens/ValidateOTPScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/WithBaseDispatchScreen.js +0 -10
- package/lib/commonjs/ui/screens/WithBaseDispatchScreen.js.map +1 -1
- package/lib/commonjs/ui/uiConfig/RouteParams.js +24 -1
- package/lib/commonjs/ui/uiConfig/RouteParams.js.map +1 -1
- package/lib/commonjs/utils/ApiUtils.js +129 -0
- package/lib/commonjs/utils/ApiUtils.js.map +1 -0
- package/lib/commonjs/utils/ExecTaskUtils.js +111 -41
- package/lib/commonjs/utils/ExecTaskUtils.js.map +1 -1
- package/lib/commonjs/utils/Logger.js +10 -29
- package/lib/commonjs/utils/Logger.js.map +1 -1
- package/lib/commonjs/utils/NetworkUtil.js +3 -19
- package/lib/commonjs/utils/NetworkUtil.js.map +1 -1
- package/lib/commonjs/utils/SdkUtils.js +2 -31
- package/lib/commonjs/utils/SdkUtils.js.map +1 -1
- package/lib/commonjs/utils/SyncManagerUtils.js +61 -43
- package/lib/commonjs/utils/SyncManagerUtils.js.map +1 -1
- package/lib/commonjs/utils/fcm/FCM.js +59 -11
- package/lib/commonjs/utils/fcm/FCM.js.map +1 -1
- package/lib/commonjs/utils/fcm/FcmUtils.js +82 -21
- package/lib/commonjs/utils/fcm/FcmUtils.js.map +1 -1
- package/lib/commonjs/utils/helper.js +0 -5
- package/lib/commonjs/utils/helper.js.map +1 -1
- package/lib/commonjs/utils/hooks/useModal.js +53 -0
- package/lib/commonjs/utils/hooks/useModal.js.map +1 -0
- package/lib/commonjs/utils/hooks/useTimer.js +44 -0
- package/lib/commonjs/utils/hooks/useTimer.js.map +1 -0
- package/lib/commonjs/utils/loginHelper.js +6 -18
- package/lib/commonjs/utils/loginHelper.js.map +1 -1
- package/lib/commonjs/utils/storage.js +87 -31
- package/lib/commonjs/utils/storage.js.map +1 -1
- package/lib/commonjs/utils/utils.js +8 -11
- package/lib/commonjs/utils/utils.js.map +1 -1
- package/lib/module/@types/assets/index.d.js +2 -0
- package/lib/module/@types/assets/index.d.js.map +1 -0
- package/lib/module/components/dispatch/DispatchExecNavigator.js +50 -32
- package/lib/module/components/dispatch/DispatchExecNavigator.js.map +1 -1
- package/lib/module/components/executiontasks/ExecutionTasksIndex.js +3 -5
- package/lib/module/components/executiontasks/ExecutionTasksIndex.js.map +1 -1
- package/lib/module/components/executiontasks/cancellation/CancelET.js +145 -19
- package/lib/module/components/executiontasks/cancellation/CancelET.js.map +1 -1
- package/lib/module/components/executiontasks/cancellation/CancellationSchema.js.map +1 -1
- package/lib/module/components/executiontasks/captureInput/CaptureText.js +68 -10
- package/lib/module/components/executiontasks/captureInput/CaptureText.js.map +1 -1
- package/lib/module/components/executiontasks/captureInput/utils.js +7 -0
- package/lib/module/components/executiontasks/captureInput/utils.js.map +1 -0
- package/lib/module/components/executiontasks/deliver/DeliverET.js +6 -7
- package/lib/module/components/executiontasks/deliver/DeliverET.js.map +1 -1
- package/lib/module/components/executiontasks/deliver/DeliverETInput.js.map +1 -1
- package/lib/module/components/executiontasks/deliver/SLDeliverET.js +214 -86
- package/lib/module/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
- package/lib/module/components/executiontasks/display/DisplayModalET.js +16 -15
- package/lib/module/components/executiontasks/display/DisplayModalET.js.map +1 -1
- package/lib/module/components/executiontasks/doodle/SignatureET.js +68 -15
- package/lib/module/components/executiontasks/doodle/SignatureET.js.map +1 -1
- package/lib/module/components/executiontasks/dropCash/DropCashET.js +5 -6
- package/lib/module/components/executiontasks/dropCash/DropCashET.js.map +1 -1
- package/lib/module/components/executiontasks/dropCash/SLDropCash.js +75 -20
- package/lib/module/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
- package/lib/module/components/executiontasks/forms/FormGenerator.js +142 -37
- package/lib/module/components/executiontasks/forms/FormGenerator.js.map +1 -1
- package/lib/module/components/executiontasks/forms/widgets/DateTimeWidget.js +3 -15
- package/lib/module/components/executiontasks/forms/widgets/DateTimeWidget.js.map +1 -1
- package/lib/module/components/executiontasks/forms/widgets/DropdownWidget.js +39 -0
- package/lib/module/components/executiontasks/forms/widgets/DropdownWidget.js.map +1 -0
- package/lib/module/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js +2 -6
- package/lib/module/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js.map +1 -1
- package/lib/module/components/executiontasks/forms/widgets/TimeRangeSelector.js +0 -3
- package/lib/module/components/executiontasks/forms/widgets/TimeRangeSelector.js.map +1 -1
- package/lib/module/components/executiontasks/httpRequest/HttpEtUtils.js +6 -4
- package/lib/module/components/executiontasks/httpRequest/HttpEtUtils.js.map +1 -1
- package/lib/module/components/executiontasks/httpRequest/HttpRequestET.js +3 -6
- package/lib/module/components/executiontasks/httpRequest/HttpRequestET.js.map +1 -1
- package/lib/module/components/executiontasks/imageCapture/CaptureSchema.js.map +1 -1
- package/lib/module/components/executiontasks/imageCapture/CaptureUtils.js +11 -11
- package/lib/module/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
- package/lib/module/components/executiontasks/imageCapture/ImageCapture.js +75 -35
- package/lib/module/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
- package/lib/module/components/executiontasks/payments/PaymentStyles.js.map +1 -1
- package/lib/module/components/executiontasks/payments/PaymentUtils.js.map +1 -1
- package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentET.js +77 -18
- package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
- package/lib/module/components/executiontasks/payments/init/InitPaymentET.js +64 -11
- package/lib/module/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
- package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentET.js +72 -11
- package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
- package/lib/module/components/executiontasks/pickup/PickupET.js +5 -6
- package/lib/module/components/executiontasks/pickup/PickupET.js.map +1 -1
- package/lib/module/components/executiontasks/pickup/SLPickupET.js +141 -25
- package/lib/module/components/executiontasks/pickup/SLPickupET.js.map +1 -1
- package/lib/module/components/executiontasks/scan/ScanET.js +732 -0
- package/lib/module/components/executiontasks/scan/ScanET.js.map +1 -0
- package/lib/module/components/executiontasks/scan/ScanSchema.js +17 -0
- package/lib/module/components/executiontasks/scan/ScanSchema.js.map +1 -0
- package/lib/module/components/executiontasks/scan/constants.js +7 -0
- package/lib/module/components/executiontasks/scan/constants.js.map +1 -0
- package/lib/module/components/executiontasks/scan/interfaces.js +33 -0
- package/lib/module/components/executiontasks/scan/interfaces.js.map +1 -0
- package/lib/module/components/executiontasks/scan/modalConstant.js +94 -0
- package/lib/module/components/executiontasks/scan/modalConstant.js.map +1 -0
- package/lib/module/components/executiontasks/{scanner → scan/sub_components}/CScanner.js +9 -16
- package/lib/module/components/executiontasks/scan/sub_components/CScanner.js.map +1 -0
- package/lib/module/components/executiontasks/scan/sub_components/DropDownUtils.js +101 -0
- package/lib/module/components/executiontasks/scan/sub_components/DropDownUtils.js.map +1 -0
- package/lib/module/components/executiontasks/scan/sub_components/ERDropDown.js +107 -0
- package/lib/module/components/executiontasks/scan/sub_components/ERDropDown.js.map +1 -0
- package/lib/module/components/executiontasks/scan/sub_components/SummaryPage.js +1092 -0
- package/lib/module/components/executiontasks/scan/sub_components/SummaryPage.js.map +1 -0
- package/lib/module/components/executiontasks/scan/utils.js +726 -0
- package/lib/module/components/executiontasks/scan/utils.js.map +1 -0
- package/lib/module/components/executiontasks/validateOTP/ValidateOTPET.js +324 -0
- package/lib/module/components/executiontasks/validateOTP/ValidateOTPET.js.map +1 -0
- package/lib/module/components/executiontasks/validateOTP/ValidateOTPSchema.js +8 -0
- package/lib/module/components/executiontasks/validateOTP/ValidateOTPSchema.js.map +1 -0
- package/lib/module/components/executiontasks/validateOTP/constants.js +25 -0
- package/lib/module/components/executiontasks/validateOTP/constants.js.map +1 -0
- package/lib/module/components/executiontasks/validateOTP/sub-components/OTPInput.js +53 -0
- package/lib/module/components/executiontasks/validateOTP/sub-components/OTPInput.js.map +1 -0
- package/lib/module/components/executiontasks/validateOTP/utils.js +133 -0
- package/lib/module/components/executiontasks/validateOTP/utils.js.map +1 -0
- package/lib/module/components/executiontasks/verifyLocation/GeofenceUtils.js +0 -6
- package/lib/module/components/executiontasks/verifyLocation/GeofenceUtils.js.map +1 -1
- package/lib/module/components/executiontasks/verifyLocation/VerifyLocationET.js +4 -3
- package/lib/module/components/executiontasks/verifyLocation/VerifyLocationET.js.map +1 -1
- package/lib/module/components/executiontasks/verifyOtp/VerifyOtpET.js +5 -9
- package/lib/module/components/executiontasks/verifyOtp/VerifyOtpET.js.map +1 -1
- package/lib/module/components/executiontasks/verifyOtp/VerifyOtpSchema.js.map +1 -1
- package/lib/module/components/utils/index.js +8 -0
- package/lib/module/components/utils/index.js.map +1 -0
- package/lib/module/components/widgets/AlertDisplay.js.map +1 -1
- package/lib/module/components/widgets/CancelOrderDialog.js +0 -2
- package/lib/module/components/widgets/CancelOrderDialog.js.map +1 -1
- package/lib/module/components/widgets/Card.js +80 -0
- package/lib/module/components/widgets/Card.js.map +1 -0
- package/lib/module/components/widgets/GoBackModal.js +40 -0
- package/lib/module/components/widgets/GoBackModal.js.map +1 -0
- package/lib/module/components/widgets/IconButton.js +26 -0
- package/lib/module/components/widgets/IconButton.js.map +1 -0
- package/lib/module/components/widgets/ModalWidget.js +92 -0
- package/lib/module/components/widgets/ModalWidget.js.map +1 -0
- package/lib/module/components/widgets/ProgressDialog.js +0 -2
- package/lib/module/components/widgets/ProgressDialog.js.map +1 -1
- package/lib/module/components/widgets/SearchBar.js +66 -0
- package/lib/module/components/widgets/SearchBar.js.map +1 -0
- package/lib/module/components/widgets/SnackBarCustom.js +46 -20
- package/lib/module/components/widgets/SnackBarCustom.js.map +1 -1
- package/lib/module/components/widgets/SplitTextInput.js +84 -0
- package/lib/module/components/widgets/SplitTextInput.js.map +1 -0
- package/lib/module/components/widgets/TabsComponent.js +55 -0
- package/lib/module/components/widgets/TabsComponent.js.map +1 -0
- package/lib/module/components/widgets/Toaster.js.map +1 -1
- package/lib/module/config/DispatchSDKConfig.js +3 -4
- package/lib/module/config/DispatchSDKConfig.js.map +1 -1
- package/lib/module/constants/apiConstants.js +9 -0
- package/lib/module/constants/apiConstants.js.map +1 -0
- package/lib/module/constants/constants.js +4 -2
- package/lib/module/constants/constants.js.map +1 -1
- package/lib/module/constants/statuscode.js +3 -5
- package/lib/module/constants/statuscode.js.map +1 -1
- package/lib/module/errors/BaseError.js +3 -6
- package/lib/module/errors/BaseError.js.map +1 -1
- package/lib/module/errors/ErrorCodes.js +5 -5
- package/lib/module/errors/ErrorCodes.js.map +1 -1
- package/lib/module/events/EventDispatcher.js +16 -0
- package/lib/module/events/EventDispatcher.js.map +1 -0
- package/lib/module/events/EventListener.js +13 -0
- package/lib/module/events/EventListener.js.map +1 -0
- package/lib/module/events/constants.js +8 -0
- package/lib/module/events/constants.js.map +1 -0
- package/lib/module/events/index.js +3 -0
- package/lib/module/events/index.js.map +1 -0
- package/lib/module/events/interface.js +2 -0
- package/lib/module/events/interface.js.map +1 -0
- package/lib/module/index.js +9 -5
- package/lib/module/index.js.map +1 -1
- package/lib/module/manager/dispatch/DispatchStateContainer.js +334 -247
- package/lib/module/manager/dispatch/DispatchStateContainer.js.map +1 -1
- package/lib/module/manager/dispatchCodes/EventCodeContainer.js +52 -2
- package/lib/module/manager/dispatchCodes/EventCodeContainer.js.map +1 -1
- package/lib/module/manager/dispatchCodes/EventCodeRepo.js +61 -0
- package/lib/module/manager/dispatchCodes/EventCodeRepo.js.map +1 -0
- package/lib/module/manager/dispatchCodes/ReasonCodeContainer.js +3 -16
- package/lib/module/manager/dispatchCodes/ReasonCodeContainer.js.map +1 -1
- package/lib/module/manager/dispatchCodes/ReasonCodeRepo.js +6 -14
- package/lib/module/manager/dispatchCodes/ReasonCodeRepo.js.map +1 -1
- package/lib/module/manager/jobRemoval/JobRemovalManager.js +22 -0
- package/lib/module/manager/jobRemoval/JobRemovalManager.js.map +1 -0
- package/lib/module/manager/location/LocationManager.js +3 -14
- package/lib/module/manager/location/LocationManager.js.map +1 -1
- package/lib/module/manager/sdk/DispatchSDKManager.js +23 -15
- package/lib/module/manager/sdk/DispatchSDKManager.js.map +1 -1
- package/lib/module/manager/sdk/DispatchSdkCache.js +6 -13
- package/lib/module/manager/sdk/DispatchSdkCache.js.map +1 -1
- package/lib/module/manager/sdk/callbacksHandler.js +19 -0
- package/lib/module/manager/sdk/callbacksHandler.js.map +1 -0
- package/lib/module/manager/syncmanager/AppSyncManager.js +26 -26
- package/lib/module/manager/syncmanager/AppSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/DBConfig.js +41 -7
- package/lib/module/manager/syncmanager/DBConfig.js.map +1 -1
- package/lib/module/manager/syncmanager/NativeSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/constants.js +6 -0
- package/lib/module/manager/syncmanager/constants.js.map +1 -0
- package/lib/module/manager/syncmanager/database.js +27 -3
- package/lib/module/manager/syncmanager/database.js.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentHttpClient.js +11 -24
- package/lib/module/manager/syncmanager/document/DocumentHttpClient.js.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentManager.js +8 -20
- package/lib/module/manager/syncmanager/document/DocumentManager.js.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentSyncManager.js +19 -41
- package/lib/module/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/events/ETEventsManager.js +415 -22
- package/lib/module/manager/syncmanager/events/ETEventsManager.js.map +1 -1
- package/lib/module/manager/syncmanager/events/EventsSyncManager.js +209 -82
- package/lib/module/manager/syncmanager/events/EventsSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/events/SyncHttpClient.js +152 -24
- package/lib/module/manager/syncmanager/events/SyncHttpClient.js.map +1 -1
- package/lib/module/models/DispatchModels.js +3 -4
- package/lib/module/models/DispatchModels.js.map +1 -1
- package/lib/module/models/ReasonCodes.js.map +1 -1
- package/lib/module/models/execTasks/ETBaseModels.js +1 -1
- package/lib/module/models/execTasks/ETBaseModels.js.map +1 -1
- package/lib/module/models/execTasks/ETConfig.js +22 -29
- package/lib/module/models/execTasks/ETConfig.js.map +1 -1
- package/lib/module/models/sdk.js +3 -4
- package/lib/module/models/sdk.js.map +1 -1
- package/lib/module/native/signature/SignatureCapture.js +3 -18
- package/lib/module/native/signature/SignatureCapture.js.map +1 -1
- package/lib/module/network/GraphQLClient.js +6 -26
- package/lib/module/network/GraphQLClient.js.map +1 -1
- package/lib/module/network/NetworkClient.js +2 -6
- package/lib/module/network/NetworkClient.js.map +1 -1
- package/lib/module/network/NetworkUtils.js +10 -3
- package/lib/module/network/NetworkUtils.js.map +1 -1
- package/lib/module/network/Queries.js.map +1 -1
- package/lib/module/network/client.js +7 -17
- package/lib/module/network/client.js.map +1 -1
- package/lib/module/res/strings.js.map +1 -1
- package/lib/module/resources/Login.js +4 -13
- package/lib/module/resources/Login.js.map +1 -1
- package/lib/module/resources/network.js +3 -6
- package/lib/module/resources/network.js.map +1 -1
- package/lib/module/styles/SdkColors.js +9 -7
- package/lib/module/styles/SdkColors.js.map +1 -1
- package/lib/module/styles/executionTasks/CommonStyles.js +57 -14
- package/lib/module/styles/executionTasks/CommonStyles.js.map +1 -1
- package/lib/module/ui/screens/CancellationScreen.js +68 -15
- package/lib/module/ui/screens/CancellationScreen.js.map +1 -1
- package/lib/module/ui/screens/CaptureInputScreen.js +17 -6
- package/lib/module/ui/screens/CaptureInputScreen.js.map +1 -1
- package/lib/module/ui/screens/CompleteObjectiveScreen.js +12 -8
- package/lib/module/ui/screens/CompleteObjectiveScreen.js.map +1 -1
- package/lib/module/ui/screens/DeliverScreen.js +32 -7
- package/lib/module/ui/screens/DeliverScreen.js.map +1 -1
- package/lib/module/ui/screens/DisplayScreen.js +16 -6
- package/lib/module/ui/screens/DisplayScreen.js.map +1 -1
- package/lib/module/ui/screens/DoodleScreen.js +19 -9
- package/lib/module/ui/screens/DoodleScreen.js.map +1 -1
- package/lib/module/ui/screens/DropCashScreen.js +45 -19
- package/lib/module/ui/screens/DropCashScreen.js.map +1 -1
- package/lib/module/ui/screens/ETScreensIndex.js +3 -2
- package/lib/module/ui/screens/ETScreensIndex.js.map +1 -1
- package/lib/module/ui/screens/FormsScreen.js +104 -9
- package/lib/module/ui/screens/FormsScreen.js.map +1 -1
- package/lib/module/ui/screens/GeofenceScreen.js +15 -6
- package/lib/module/ui/screens/GeofenceScreen.js.map +1 -1
- package/lib/module/ui/screens/HttpRequestScreen.js +15 -5
- package/lib/module/ui/screens/HttpRequestScreen.js.map +1 -1
- package/lib/module/ui/screens/ImageCaptureScreen.js +37 -9
- package/lib/module/ui/screens/ImageCaptureScreen.js.map +1 -1
- package/lib/module/ui/screens/PaymentScreen.js +30 -17
- package/lib/module/ui/screens/PaymentScreen.js.map +1 -1
- package/lib/module/ui/screens/PickupScreen.js +40 -12
- package/lib/module/ui/screens/PickupScreen.js.map +1 -1
- package/lib/module/ui/screens/ScanScreen.js +111 -0
- package/lib/module/ui/screens/ScanScreen.js.map +1 -0
- package/lib/module/ui/screens/StartWorkFlowScreen.js +64 -16
- package/lib/module/ui/screens/StartWorkFlowScreen.js.map +1 -1
- package/lib/module/ui/screens/ValidateOTPScreen.js +45 -0
- package/lib/module/ui/screens/ValidateOTPScreen.js.map +1 -0
- package/lib/module/ui/screens/WithBaseDispatchScreen.js +0 -3
- package/lib/module/ui/screens/WithBaseDispatchScreen.js.map +1 -1
- package/lib/module/ui/uiConfig/RouteParams.js +23 -1
- package/lib/module/ui/uiConfig/RouteParams.js.map +1 -1
- package/lib/module/utils/ApiUtils.js +116 -0
- package/lib/module/utils/ApiUtils.js.map +1 -0
- package/lib/module/utils/ExecTaskUtils.js +110 -31
- package/lib/module/utils/ExecTaskUtils.js.map +1 -1
- package/lib/module/utils/Logger.js +9 -21
- package/lib/module/utils/Logger.js.map +1 -1
- package/lib/module/utils/NetworkUtil.js +3 -15
- package/lib/module/utils/NetworkUtil.js.map +1 -1
- package/lib/module/utils/SdkUtils.js +2 -15
- package/lib/module/utils/SdkUtils.js.map +1 -1
- package/lib/module/utils/SyncManagerUtils.js +62 -14
- package/lib/module/utils/SyncManagerUtils.js.map +1 -1
- package/lib/module/utils/fcm/FCM.js +63 -3
- package/lib/module/utils/fcm/FCM.js.map +1 -1
- package/lib/module/utils/fcm/FcmUtils.js +86 -7
- package/lib/module/utils/fcm/FcmUtils.js.map +1 -1
- package/lib/module/utils/helper.js +0 -3
- package/lib/module/utils/helper.js.map +1 -1
- package/lib/module/utils/hooks/useModal.js +43 -0
- package/lib/module/utils/hooks/useModal.js.map +1 -0
- package/lib/module/utils/hooks/useTimer.js +37 -0
- package/lib/module/utils/hooks/useTimer.js.map +1 -0
- package/lib/module/utils/loginHelper.js +6 -16
- package/lib/module/utils/loginHelper.js.map +1 -1
- package/lib/module/utils/storage.js +86 -29
- package/lib/module/utils/storage.js.map +1 -1
- package/lib/module/utils/utils.js +8 -6
- package/lib/module/utils/utils.js.map +1 -1
- package/lib/typescript/components/dispatch/DispatchExecNavigator.d.ts +2 -2
- package/lib/typescript/components/executiontasks/CompletedWFSchema.d.ts +2 -2
- package/lib/typescript/components/executiontasks/ExecutionTasksIndex.d.ts +6 -7
- package/lib/typescript/components/executiontasks/cancellation/CancelET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/cancellation/CancellationSchema.d.ts +10 -5
- package/lib/typescript/components/executiontasks/captureInput/CaptureInputSchema.d.ts +7 -7
- package/lib/typescript/components/executiontasks/captureInput/CaptureText.d.ts +2 -2
- package/lib/typescript/components/executiontasks/captureInput/utils.d.ts +1 -0
- package/lib/typescript/components/executiontasks/deliver/DeliverET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/deliver/DeliverETInput.d.ts +8 -7
- package/lib/typescript/components/executiontasks/deliver/SLDeliverET.d.ts +3 -3
- package/lib/typescript/components/executiontasks/display/DisplayModalET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/display/DisplaySchema.d.ts +5 -5
- package/lib/typescript/components/executiontasks/doodle/SignatureET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/doodle/SignatureSchema.d.ts +7 -7
- package/lib/typescript/components/executiontasks/dropCash/DropCashET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/dropCash/DropCashSchema.d.ts +2 -2
- package/lib/typescript/components/executiontasks/dropCash/SLDropCash.d.ts +2 -2
- package/lib/typescript/components/executiontasks/forms/FormGenerator.d.ts +2 -2
- package/lib/typescript/components/executiontasks/forms/FormSchema.d.ts +2 -2
- package/lib/typescript/components/executiontasks/forms/widgets/DateTimeWidget.d.ts +3 -3
- package/lib/typescript/components/executiontasks/forms/widgets/DropdownWidget.d.ts +9 -0
- package/lib/typescript/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.d.ts +2 -2
- package/lib/typescript/components/executiontasks/forms/widgets/TimeRangeSelector.d.ts +2 -2
- package/lib/typescript/components/executiontasks/httpRequest/HttpEtUtils.d.ts +1 -1
- package/lib/typescript/components/executiontasks/httpRequest/HttpRequestET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/httpRequest/HttpRequestETSchema.d.ts +6 -6
- package/lib/typescript/components/executiontasks/imageCapture/CaptureSchema.d.ts +17 -11
- package/lib/typescript/components/executiontasks/imageCapture/ImageCapture.d.ts +2 -2
- package/lib/typescript/components/executiontasks/payments/completePayment/CompletePaymentET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/payments/completePayment/CompletePaymentSchema.d.ts +2 -2
- package/lib/typescript/components/executiontasks/payments/init/InitPaymentET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/payments/init/InitPaymentSchema.d.ts +3 -3
- package/lib/typescript/components/executiontasks/payments/processPayment/ProcessPaymentET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/payments/processPayment/ProcessPaymentSchema.d.ts +2 -2
- package/lib/typescript/components/executiontasks/pickup/PickpSchema.d.ts +3 -3
- package/lib/typescript/components/executiontasks/pickup/PickupET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/pickup/SLPickupET.d.ts +3 -3
- package/lib/typescript/components/executiontasks/scan/ScanET.d.ts +16 -0
- package/lib/typescript/components/executiontasks/scan/ScanSchema.d.ts +86 -0
- package/lib/typescript/components/executiontasks/scan/constants.d.ts +6 -0
- package/lib/typescript/components/executiontasks/scan/interfaces.d.ts +94 -0
- package/lib/typescript/components/executiontasks/scan/modalConstant.d.ts +37 -0
- package/lib/typescript/components/executiontasks/{scanner → scan/sub_components}/CScanner.d.ts +1 -1
- package/lib/typescript/components/executiontasks/scan/sub_components/DropDownUtils.d.ts +7 -0
- package/lib/typescript/components/executiontasks/scan/sub_components/ERDropDown.d.ts +17 -0
- package/lib/typescript/components/executiontasks/scan/sub_components/SummaryPage.d.ts +21 -0
- package/lib/typescript/components/executiontasks/scan/utils.d.ts +37 -0
- package/lib/typescript/components/executiontasks/validateOTP/ValidateOTPET.d.ts +4 -0
- package/lib/typescript/components/executiontasks/validateOTP/ValidateOTPSchema.d.ts +54 -0
- package/lib/typescript/components/executiontasks/validateOTP/constants.d.ts +10 -0
- package/lib/typescript/components/executiontasks/validateOTP/sub-components/OTPInput.d.ts +12 -0
- package/lib/typescript/components/executiontasks/validateOTP/utils.d.ts +7 -0
- package/lib/typescript/components/executiontasks/verifyInput/VerifyInputSchema.d.ts +8 -8
- package/lib/typescript/components/executiontasks/verifyLocation/VerifyLocSchema.d.ts +9 -9
- package/lib/typescript/components/executiontasks/verifyLocation/VerifyLocationET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/verifyOtp/VerifyOtpET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/verifyOtp/VerifyOtpSchema.d.ts +6 -6
- package/lib/typescript/components/utils/index.d.ts +2 -0
- package/lib/typescript/components/widgets/CancelOrderDialog.d.ts +2 -2
- package/lib/typescript/components/widgets/Card.d.ts +17 -0
- package/lib/typescript/components/widgets/GoBackModal.d.ts +9 -0
- package/lib/typescript/components/widgets/IconButton.d.ts +9 -0
- package/lib/typescript/components/widgets/ModalWidget.d.ts +30 -0
- package/lib/typescript/components/widgets/ProgressDialog.d.ts +2 -2
- package/lib/typescript/components/widgets/SearchBar.d.ts +10 -0
- package/lib/typescript/components/widgets/SnackBarCustom.d.ts +10 -5
- package/lib/typescript/components/widgets/SplitTextInput.d.ts +12 -0
- package/lib/typescript/components/widgets/TabsComponent.d.ts +15 -0
- package/lib/typescript/constants/apiConstants.d.ts +7 -0
- package/lib/typescript/constants/constants.d.ts +4 -2
- package/lib/typescript/errors/ErrorCodes.d.ts +3 -1
- package/lib/typescript/events/EventDispatcher.d.ts +3 -0
- package/lib/typescript/events/EventListener.d.ts +5 -0
- package/lib/typescript/events/constants.d.ts +7 -0
- package/lib/typescript/events/index.d.ts +2 -0
- package/lib/typescript/events/interface.d.ts +1 -0
- package/lib/typescript/index.d.ts +12 -9
- package/lib/typescript/manager/dispatch/DispatchStateContainer.d.ts +38 -17
- package/lib/typescript/manager/dispatchCodes/EventCodeContainer.d.ts +12 -1
- package/lib/typescript/manager/dispatchCodes/EventCodeRepo.d.ts +13 -0
- package/lib/typescript/manager/jobRemoval/JobRemovalManager.d.ts +0 -0
- package/lib/typescript/manager/sdk/DispatchSdkCache.d.ts +1 -0
- package/lib/typescript/manager/sdk/callbacksHandler.d.ts +13 -0
- package/lib/typescript/manager/syncmanager/AppSyncManager.d.ts +3 -1
- package/lib/typescript/manager/syncmanager/DBConfig.d.ts +80 -4
- package/lib/typescript/manager/syncmanager/constants.d.ts +5 -0
- package/lib/typescript/manager/syncmanager/database.d.ts +5 -0
- package/lib/typescript/manager/syncmanager/document/DocumentManager.d.ts +1 -1
- package/lib/typescript/manager/syncmanager/document/DocumentSyncManager.d.ts +1 -1
- package/lib/typescript/manager/syncmanager/document/models.d.ts +1 -1
- package/lib/typescript/manager/syncmanager/events/ETEventsManager.d.ts +15 -2
- package/lib/typescript/manager/syncmanager/events/EventsSyncManager.d.ts +4 -2
- package/lib/typescript/manager/syncmanager/events/SyncHttpClient.d.ts +6 -3
- package/lib/typescript/models/DispatchModels.d.ts +59 -5
- package/lib/typescript/models/ReasonCodes.d.ts +5 -0
- package/lib/typescript/models/auth.d.ts +1 -1
- package/lib/typescript/models/execTasks/ETBaseModels.d.ts +44 -20
- package/lib/typescript/models/execTasks/ETConfig.d.ts +8 -4
- package/lib/typescript/models/sdk.d.ts +12 -0
- package/lib/typescript/native/signature/SignatureCapture.d.ts +2 -2
- package/lib/typescript/network/NetworkUtils.d.ts +1 -5
- package/lib/typescript/styles/SdkColors.d.ts +2 -0
- package/lib/typescript/styles/executionTasks/CommonStyles.d.ts +50 -5
- package/lib/typescript/ui/screens/CancellationScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/CaptureInputScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/CompleteObjectiveScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/DeliverScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/DisplayScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/DoodleScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/DropCashScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/ETScreensIndex.d.ts +3 -2
- package/lib/typescript/ui/screens/FormsScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/GeofenceScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/HttpRequestScreen.d.ts +1 -1
- package/lib/typescript/ui/screens/ImageCaptureScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/PaymentScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/PickupScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/ScanScreen.d.ts +3 -0
- package/lib/typescript/ui/screens/StartWorkFlowScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/ValidateOTPScreen.d.ts +3 -0
- package/lib/typescript/ui/screens/WithBaseDispatchScreen.d.ts +2 -2
- package/lib/typescript/ui/uiConfig/RouteParams.d.ts +14 -0
- package/lib/typescript/utils/ApiUtils.d.ts +61 -0
- package/lib/typescript/utils/ExecTaskUtils.d.ts +10 -4
- package/lib/typescript/utils/NetworkUtil.d.ts +1 -1
- package/lib/typescript/utils/SyncManagerUtils.d.ts +4 -3
- package/lib/typescript/utils/hooks/useModal.d.ts +6 -0
- package/lib/typescript/utils/hooks/useTimer.d.ts +5 -0
- package/lib/typescript/utils/storage.d.ts +32 -0
- package/package.json +26 -26
- package/tsconfig.json +9 -9
- package/file_unzip.js +0 -5
- package/lib/commonjs/components/executiontasks/doodle/DoodleUtils.js +0 -28
- package/lib/commonjs/components/executiontasks/doodle/DoodleUtils.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/CScanner.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/ScannerSchema.js +0 -32
- package/lib/commonjs/components/executiontasks/scanner/ScannerSchema.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/ScannerUtils.js +0 -193
- package/lib/commonjs/components/executiontasks/scanner/ScannerUtils.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/DropDownSelector.js +0 -20
- package/lib/commonjs/components/executiontasks/scanner/returns/DropDownSelector.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/DropDownUtils.js +0 -49
- package/lib/commonjs/components/executiontasks/scanner/returns/DropDownUtils.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/RTReasonSelection.js +0 -107
- package/lib/commonjs/components/executiontasks/scanner/returns/RTReasonSelection.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/RTScan.js +0 -317
- package/lib/commonjs/components/executiontasks/scanner/returns/RTScan.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/ReasonDropDown.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/ScanList.js +0 -276
- package/lib/commonjs/components/executiontasks/scanner/returns/ScanList.js.map +0 -1
- package/lib/commonjs/ui/screens/RTScanScreen.js +0 -118
- package/lib/commonjs/ui/screens/RTScanScreen.js.map +0 -1
- package/lib/module/components/executiontasks/doodle/DoodleUtils.js +0 -19
- package/lib/module/components/executiontasks/doodle/DoodleUtils.js.map +0 -1
- package/lib/module/components/executiontasks/scanner/CScanner.js.map +0 -1
- package/lib/module/components/executiontasks/scanner/ScannerSchema.js +0 -24
- package/lib/module/components/executiontasks/scanner/ScannerSchema.js.map +0 -1
- package/lib/module/components/executiontasks/scanner/ScannerUtils.js +0 -158
- package/lib/module/components/executiontasks/scanner/ScannerUtils.js.map +0 -1
- package/lib/module/components/executiontasks/scanner/returns/DropDownSelector.js +0 -9
- package/lib/module/components/executiontasks/scanner/returns/DropDownSelector.js.map +0 -1
- package/lib/module/components/executiontasks/scanner/returns/DropDownUtils.js +0 -38
- package/lib/module/components/executiontasks/scanner/returns/DropDownUtils.js.map +0 -1
- package/lib/module/components/executiontasks/scanner/returns/RTReasonSelection.js +0 -86
- package/lib/module/components/executiontasks/scanner/returns/RTReasonSelection.js.map +0 -1
- package/lib/module/components/executiontasks/scanner/returns/RTScan.js +0 -287
- package/lib/module/components/executiontasks/scanner/returns/RTScan.js.map +0 -1
- package/lib/module/components/executiontasks/scanner/returns/ReasonDropDown.js +0 -80
- package/lib/module/components/executiontasks/scanner/returns/ReasonDropDown.js.map +0 -1
- package/lib/module/components/executiontasks/scanner/returns/ScanList.js +0 -253
- package/lib/module/components/executiontasks/scanner/returns/ScanList.js.map +0 -1
- package/lib/module/ui/screens/RTScanScreen.js +0 -93
- package/lib/module/ui/screens/RTScanScreen.js.map +0 -1
- package/lib/typescript/components/executiontasks/doodle/DoodleUtils.d.ts +0 -3
- package/lib/typescript/components/executiontasks/scanner/ScannerSchema.d.ts +0 -75
- package/lib/typescript/components/executiontasks/scanner/ScannerUtils.d.ts +0 -15
- package/lib/typescript/components/executiontasks/scanner/returns/DropDownSelector.d.ts +0 -3
- package/lib/typescript/components/executiontasks/scanner/returns/DropDownUtils.d.ts +0 -3
- package/lib/typescript/components/executiontasks/scanner/returns/RTReasonSelection.d.ts +0 -7
- package/lib/typescript/components/executiontasks/scanner/returns/RTScan.d.ts +0 -4
- package/lib/typescript/components/executiontasks/scanner/returns/ReasonDropDown.d.ts +0 -14
- package/lib/typescript/components/executiontasks/scanner/returns/ScanList.d.ts +0 -17
- package/lib/typescript/ui/screens/RTScanScreen.d.ts +0 -3
- package/mobile-execution-lib-0.6.4.tgz +0 -0
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.getJobIDs = getJobIDs;
|
|
7
|
-
exports.getObjectiveRefs = getObjectiveRefs;
|
|
8
|
-
|
|
9
|
-
function getJobIDs(nextStates) {
|
|
10
|
-
let result = [];
|
|
11
|
-
if (!nextStates || nextStates.length === 0) return result;else {
|
|
12
|
-
nextStates.forEach(s => {
|
|
13
|
-
result.push(s.jobId);
|
|
14
|
-
});
|
|
15
|
-
return result;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
function getObjectiveRefs(nextStates) {
|
|
20
|
-
let result = [];
|
|
21
|
-
if (!nextStates || nextStates.length === 0) return result;else {
|
|
22
|
-
nextStates.forEach(s => {
|
|
23
|
-
result.push(s.objRef);
|
|
24
|
-
});
|
|
25
|
-
return result;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
//# sourceMappingURL=DoodleUtils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["getJobIDs","nextStates","result","length","forEach","s","push","jobId","getObjectiveRefs","objRef"],"sources":["DoodleUtils.ts"],"sourcesContent":["import type { stateWithObjRef } from '../../../models/DispatchModels';\n\nexport function getJobIDs(nextStates: stateWithObjRef[]): string[] {\n let result: string[] = [];\n if (!nextStates || nextStates.length === 0) return result;\n else {\n nextStates.forEach((s) => {\n result.push(s.jobId);\n });\n return result;\n }\n}\n\nexport function getObjectiveRefs(nextStates: stateWithObjRef[]): string[] {\n let result: string[] = [];\n if (!nextStates || nextStates.length === 0) return result;\n else {\n nextStates.forEach((s) => {\n result.push(s.objRef);\n });\n return result;\n }\n}\n"],"mappings":";;;;;;;;AAEO,SAASA,SAAT,CAAmBC,UAAnB,EAA4D;EACjE,IAAIC,MAAgB,GAAG,EAAvB;EACA,IAAI,CAACD,UAAD,IAAeA,UAAU,CAACE,MAAX,KAAsB,CAAzC,EAA4C,OAAOD,MAAP,CAA5C,KACK;IACHD,UAAU,CAACG,OAAX,CAAoBC,CAAD,IAAO;MACxBH,MAAM,CAACI,IAAP,CAAYD,CAAC,CAACE,KAAd;IACD,CAFD;IAGA,OAAOL,MAAP;EACD;AACF;;AAEM,SAASM,gBAAT,CAA0BP,UAA1B,EAAmE;EACxE,IAAIC,MAAgB,GAAG,EAAvB;EACA,IAAI,CAACD,UAAD,IAAeA,UAAU,CAACE,MAAX,KAAsB,CAAzC,EAA4C,OAAOD,MAAP,CAA5C,KACK;IACHD,UAAU,CAACG,OAAX,CAAoBC,CAAD,IAAO;MACxBH,MAAM,CAACI,IAAP,CAAYD,CAAC,CAACI,MAAd;IACD,CAFD;IAGA,OAAOP,MAAP;EACD;AACF"}
|
|
@@ -1 +0,0 @@
|
|
|
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 AWB Code on shipment'}</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":"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"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.SCAN_STATUS = void 0;
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Type of scan
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Mode of scanning
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Max limit of items to be scanned in multi-scan mode
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Regex to validate scanned strings
|
|
22
|
-
*/
|
|
23
|
-
let SCAN_STATUS;
|
|
24
|
-
exports.SCAN_STATUS = SCAN_STATUS;
|
|
25
|
-
|
|
26
|
-
(function (SCAN_STATUS) {
|
|
27
|
-
SCAN_STATUS[SCAN_STATUS["ACCEPTED"] = 0] = "ACCEPTED";
|
|
28
|
-
SCAN_STATUS[SCAN_STATUS["REJECTED"] = 1] = "REJECTED";
|
|
29
|
-
SCAN_STATUS[SCAN_STATUS["TO_BE_SCANNED"] = 2] = "TO_BE_SCANNED";
|
|
30
|
-
SCAN_STATUS[SCAN_STATUS["NONE"] = 3] = "NONE";
|
|
31
|
-
})(SCAN_STATUS || (exports.SCAN_STATUS = SCAN_STATUS = {}));
|
|
32
|
-
//# sourceMappingURL=ScannerSchema.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["SCAN_STATUS"],"sources":["ScannerSchema.ts"],"sourcesContent":["/**\n * Type of scan\n */\nimport type {\n BaseETRequest,\n BaseETResponse,\n} from '../../../models/execTasks/ETBaseModels';\nimport type { Headers, HTTPMethod } from '../httpRequest/HttpRequestETSchema';\n\nexport type ScanType = 'BARCODE' | 'QRCODE';\n/**\n * Mode of scanning\n */\nexport type ScanMode = 'SINGLE' | 'MULTI';\n/**\n * Max limit of items to be scanned in multi-scan mode\n */\nexport type MaxScanCount = number;\n/**\n * Regex to validate scanned strings\n */\nexport type ValidationRegex = string;\n\nexport type ScannerInput = BaseETRequest & {\n scanType: ScanType;\n scanMode: ScanMode;\n preSelectReasonCode?: boolean;\n scans?: string[];\n scanCountLimit?: MaxScanCount;\n onSubmitET: (scanETOutput: ScannerOutput | ScannedItemData[]) => void;\n\n validation?: API | ValidationRegex;\n};\n\nexport interface API {\n uri: string;\n timeout?: number;\n httpMethod: HTTPMethod;\n headers?: Headers[];\n responseJsonLogic: object;\n}\n\nexport interface ScanData {\n /**\n * Value of scanned item\n */\n value: string;\n /**\n * Boolean to denote if scan was validate successfully\n */\n validated?: boolean;\n /**\n * Epoch timestamp for the scan\n */\n timestamp: number;\n}\n\nexport interface ScannedItemData {\n /**\n * Value of scanned item\n */\n value: string;\n /**\n * Boolean to denote if scan was validate successfully\n */\n validated?: boolean;\n /**\n * Epoch timestamp for the scan\n */\n timestamp?: number;\n reasonCode?: string;\n reasonText?: string;\n success?: boolean;\n scanStatus: SCAN_STATUS;\n}\nexport enum SCAN_STATUS {\n ACCEPTED,\n REJECTED,\n TO_BE_SCANNED,\n NONE,\n}\n\nexport type ScannerOutput = BaseETResponse & {\n scans: ScanData[];\n};\n"],"mappings":";;;;;;;AAAA;AACA;AACA;;AAQA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;IAuDYA,W;;;WAAAA,W;EAAAA,W,CAAAA,W;EAAAA,W,CAAAA,W;EAAAA,W,CAAAA,W;EAAAA,W,CAAAA,W;GAAAA,W,2BAAAA,W"}
|
|
@@ -1,193 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.SCAN_ACTIONS = void 0;
|
|
7
|
-
exports.canScanMore = canScanMore;
|
|
8
|
-
exports.checkForValidation = checkForValidation;
|
|
9
|
-
exports.getBarCodeTypes = getBarCodeTypes;
|
|
10
|
-
exports.getItemsToBeScanned = getItemsToBeScanned;
|
|
11
|
-
exports.getScannedItemCount = getScannedItemCount;
|
|
12
|
-
exports.getScannedItemStatus = getScannedItemStatus;
|
|
13
|
-
exports.getScannedList = getScannedList;
|
|
14
|
-
exports.getScannerETOutput = getScannerETOutput;
|
|
15
|
-
exports.isScannedAlready = isScannedAlready;
|
|
16
|
-
|
|
17
|
-
var _ScannerSchema = require("./ScannerSchema");
|
|
18
|
-
|
|
19
|
-
var _expoBarcodeScanner = require("expo-barcode-scanner");
|
|
20
|
-
|
|
21
|
-
var _ExecTaskUtils = require("../../../utils/ExecTaskUtils");
|
|
22
|
-
|
|
23
|
-
var _EventCodeContainer = require("../../../manager/dispatchCodes/EventCodeContainer");
|
|
24
|
-
|
|
25
|
-
var _ETConfig = require("../../../models/execTasks/ETConfig");
|
|
26
|
-
|
|
27
|
-
var _HttpEtUtils = require("../httpRequest/HttpEtUtils");
|
|
28
|
-
|
|
29
|
-
var jsonLogic = _interopRequireWildcard(require("json-logic-js"));
|
|
30
|
-
|
|
31
|
-
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
|
-
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
|
-
async function checkForValidation(data, validationRule, shipments) {
|
|
36
|
-
if (shipments && shipments.length > 0) {
|
|
37
|
-
const found = shipments.find(s => s === data);
|
|
38
|
-
return found !== undefined;
|
|
39
|
-
} else if (validationRule && typeof validationRule === 'string') {
|
|
40
|
-
const regex = new RegExp(validationRule);
|
|
41
|
-
return regex.test(data);
|
|
42
|
-
} else if (validationRule && typeof validationRule === 'object') {
|
|
43
|
-
try {
|
|
44
|
-
const validation = validationRule;
|
|
45
|
-
const apiResponse = await (0, _HttpEtUtils.getApiResponse)({
|
|
46
|
-
errorJsonPath: '',
|
|
47
|
-
responseJsonPath: '',
|
|
48
|
-
uri: validation.uri,
|
|
49
|
-
httpMethod: validation.httpMethod,
|
|
50
|
-
timeout: validation.timeout,
|
|
51
|
-
headers: validation.headers
|
|
52
|
-
});
|
|
53
|
-
return jsonLogic.apply(validation.responseJsonLogic, apiResponse.data);
|
|
54
|
-
} catch (error) {
|
|
55
|
-
return false;
|
|
56
|
-
}
|
|
57
|
-
} else return false;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
function isScannedAlready(value, scansMap) {
|
|
61
|
-
var _scansMap$get;
|
|
62
|
-
|
|
63
|
-
if (!scansMap || scansMap.size === 0) return false;
|
|
64
|
-
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
|
-
}
|
|
66
|
-
|
|
67
|
-
function getBarCodeTypes(input) {
|
|
68
|
-
if (input.scanType === 'QRCODE') {
|
|
69
|
-
return [_expoBarcodeScanner.BarCodeScanner.Constants.BarCodeType.qr];
|
|
70
|
-
} else {
|
|
71
|
-
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
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
async function getScannerETOutput(scanList) {
|
|
76
|
-
return {
|
|
77
|
-
scans: getScannedItems(scanList),
|
|
78
|
-
...(await (0, _ExecTaskUtils.getBaseETResponse)(_ETConfig.EntityCode.SCAN, true, (0, _EventCodeContainer.getEventCodeByET)(_ETConfig.ExecutionTaskID.SCAN, true), ''))
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
function getScannedItems(scanList) {
|
|
83
|
-
const items = [];
|
|
84
|
-
if (!scanList || scanList.length === 0) return items;else {
|
|
85
|
-
scanList.forEach(ite => {
|
|
86
|
-
items.push({
|
|
87
|
-
value: ite.value,
|
|
88
|
-
validated: ite.validated,
|
|
89
|
-
timestamp: ite.timestamp ?? Date.now()
|
|
90
|
-
});
|
|
91
|
-
});
|
|
92
|
-
return items;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
function canScanMore(scanMode, size, limit) {
|
|
97
|
-
if (scanMode === 'SINGLE') {
|
|
98
|
-
return size <= 0;
|
|
99
|
-
} else {
|
|
100
|
-
//multi scan mode
|
|
101
|
-
if (limit && limit > 0) {
|
|
102
|
-
return size !== limit;
|
|
103
|
-
} else {
|
|
104
|
-
return true;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
function getScannedList(rtScans) {
|
|
110
|
-
if (!rtScans || rtScans.length === 0) return [];
|
|
111
|
-
let result = [];
|
|
112
|
-
rtScans.forEach(s => {
|
|
113
|
-
result.push({
|
|
114
|
-
value: s.value,
|
|
115
|
-
validated: s.validated,
|
|
116
|
-
timestamp: s.timestamp ?? Date.now()
|
|
117
|
-
});
|
|
118
|
-
});
|
|
119
|
-
return result;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
function getItemsToBeScanned(scansMap) {
|
|
123
|
-
if (!scansMap || scansMap.size === 0) return [];else {
|
|
124
|
-
const result = [];
|
|
125
|
-
scansMap.forEach(value => {
|
|
126
|
-
result.push(value);
|
|
127
|
-
});
|
|
128
|
-
return result;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
let SCAN_ACTIONS;
|
|
133
|
-
exports.SCAN_ACTIONS = SCAN_ACTIONS;
|
|
134
|
-
|
|
135
|
-
(function (SCAN_ACTIONS) {
|
|
136
|
-
SCAN_ACTIONS[SCAN_ACTIONS["DELETE"] = 0] = "DELETE";
|
|
137
|
-
SCAN_ACTIONS[SCAN_ACTIONS["CHANGE_STATUS"] = 1] = "CHANGE_STATUS";
|
|
138
|
-
})(SCAN_ACTIONS || (exports.SCAN_ACTIONS = SCAN_ACTIONS = {}));
|
|
139
|
-
|
|
140
|
-
function getScannedItemCount(scannedList, status) {
|
|
141
|
-
if (!scannedList || scannedList.length === 0) return 0;
|
|
142
|
-
let completed = 0;
|
|
143
|
-
let rejected = 0;
|
|
144
|
-
let toBeScanned = 0;
|
|
145
|
-
scannedList.forEach(r => {
|
|
146
|
-
switch (r.scanStatus) {
|
|
147
|
-
case _ScannerSchema.SCAN_STATUS.ACCEPTED:
|
|
148
|
-
case _ScannerSchema.SCAN_STATUS.NONE:
|
|
149
|
-
completed++;
|
|
150
|
-
break;
|
|
151
|
-
|
|
152
|
-
case _ScannerSchema.SCAN_STATUS.TO_BE_SCANNED:
|
|
153
|
-
toBeScanned++;
|
|
154
|
-
break;
|
|
155
|
-
|
|
156
|
-
case _ScannerSchema.SCAN_STATUS.REJECTED:
|
|
157
|
-
rejected++;
|
|
158
|
-
break;
|
|
159
|
-
|
|
160
|
-
default:
|
|
161
|
-
break;
|
|
162
|
-
}
|
|
163
|
-
});
|
|
164
|
-
|
|
165
|
-
switch (status) {
|
|
166
|
-
case _ScannerSchema.SCAN_STATUS.ACCEPTED:
|
|
167
|
-
case _ScannerSchema.SCAN_STATUS.NONE:
|
|
168
|
-
return completed;
|
|
169
|
-
|
|
170
|
-
case _ScannerSchema.SCAN_STATUS.TO_BE_SCANNED:
|
|
171
|
-
return toBeScanned;
|
|
172
|
-
|
|
173
|
-
case _ScannerSchema.SCAN_STATUS.REJECTED:
|
|
174
|
-
return rejected;
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
function getScannedItemStatus(scanStatus) {
|
|
179
|
-
switch (scanStatus) {
|
|
180
|
-
case _ScannerSchema.SCAN_STATUS.TO_BE_SCANNED:
|
|
181
|
-
return 'To be Scanned';
|
|
182
|
-
|
|
183
|
-
case _ScannerSchema.SCAN_STATUS.ACCEPTED:
|
|
184
|
-
return 'Completed';
|
|
185
|
-
|
|
186
|
-
case _ScannerSchema.SCAN_STATUS.REJECTED:
|
|
187
|
-
return 'Rejected';
|
|
188
|
-
|
|
189
|
-
case _ScannerSchema.SCAN_STATUS.NONE:
|
|
190
|
-
return '';
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
//# sourceMappingURL=ScannerUtils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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":"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"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
|
-
var _reactNative = require("react-native");
|
|
11
|
-
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
|
-
const DropDownSelector = () => {
|
|
15
|
-
return /*#__PURE__*/_react.default.createElement(_reactNative.View, null);
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
var _default = DropDownSelector;
|
|
19
|
-
exports.default = _default;
|
|
20
|
-
//# sourceMappingURL=DropDownSelector.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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":";;;;;;;AAAA;;AACA;;;;AAEA,MAAMA,gBAAgB,GAAG,MAAM;EAC7B,oBAAO,6BAAC,iBAAD,OAAP;AACD,CAFD;;eAIeA,gB"}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.getDropDownItems = getDropDownItems;
|
|
7
|
-
|
|
8
|
-
var _ETConfig = require("../../../../models/execTasks/ETConfig");
|
|
9
|
-
|
|
10
|
-
var _ReasonCodeContainer = _interopRequireDefault(require("../../../../manager/dispatchCodes/ReasonCodeContainer"));
|
|
11
|
-
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
|
-
async function getDropDownItems(reasonsList) {
|
|
15
|
-
if (!reasonsList) return [];
|
|
16
|
-
let reasons = [];
|
|
17
|
-
|
|
18
|
-
if (reasonsList[_ETConfig.BaseEventCodes.ENTITY_SUCCESS]) {
|
|
19
|
-
//todo all Image Icon for success and Failure
|
|
20
|
-
for (const r of reasonsList[_ETConfig.BaseEventCodes.ENTITY_SUCCESS]) {
|
|
21
|
-
let reasonByCode = await _ReasonCodeContainer.default.getInstance().getReasonByCode(r);
|
|
22
|
-
|
|
23
|
-
if (reasonByCode) {
|
|
24
|
-
reasons.push({
|
|
25
|
-
reasonText: (reasonByCode === null || reasonByCode === void 0 ? void 0 : reasonByCode.description) ?? 'NO DESCRIPTION FOUND',
|
|
26
|
-
reasonCode: r,
|
|
27
|
-
success: true
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
if (reasonsList[_ETConfig.BaseEventCodes.ENTITY_FAILURE]) {
|
|
34
|
-
for (const r of reasonsList[_ETConfig.BaseEventCodes.ENTITY_FAILURE]) {
|
|
35
|
-
let reasonByCode = await _ReasonCodeContainer.default.getInstance().getReasonByCode(r);
|
|
36
|
-
|
|
37
|
-
if (reasonByCode) {
|
|
38
|
-
reasons.push({
|
|
39
|
-
reasonText: (reasonByCode === null || reasonByCode === void 0 ? void 0 : reasonByCode.description) ?? 'NO DESCRIPTION FOUND',
|
|
40
|
-
reasonCode: r,
|
|
41
|
-
success: false
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
return reasons;
|
|
48
|
-
}
|
|
49
|
-
//# sourceMappingURL=DropDownUtils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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 type { ApplicableReasons } from '../../../../models/execTasks/ETBaseModels';\nimport { BaseEventCodes } from '../../../../models/execTasks/ETConfig';\nimport ReasonCodeContainer from '../../../../manager/dispatchCodes/ReasonCodeContainer';\n\nexport async function getDropDownItems(\n reasonsList?: ApplicableReasons\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":";;;;;;;AAEA;;AACA;;;;AAEO,eAAeA,gBAAf,CACLC,WADK,EAEkB;EACvB,IAAI,CAACA,WAAL,EAAkB,OAAO,EAAP;EAClB,IAAIC,OAAqB,GAAG,EAA5B;;EACA,IAAID,WAAW,CAACE,wBAAA,CAAeC,cAAhB,CAAf,EAAgD;IAC9C;IACA,KAAK,MAAMC,CAAX,IAAgBJ,WAAW,CAACE,wBAAA,CAAeC,cAAhB,CAA3B,EAA4D;MAC1D,IAAIE,YAAY,GACd,MAAMC,4BAAA,CAAoBC,WAApB,GAAkCC,eAAlC,CAAkDJ,CAAlD,CADR;;MAEA,IAAIC,YAAJ,EAAkB;QAChBJ,OAAO,CAACQ,IAAR,CAAa;UACXC,UAAU,EAAE,CAAAL,YAAY,SAAZ,IAAAA,YAAY,WAAZ,YAAAA,YAAY,CAAEM,WAAd,KAA6B,sBAD9B;UAEXC,UAAU,EAAER,CAFD;UAGXS,OAAO,EAAE;QAHE,CAAb;MAKD;IACF;EACF;;EACD,IAAIb,WAAW,CAACE,wBAAA,CAAeY,cAAhB,CAAf,EAAgD;IAC9C,KAAK,MAAMV,CAAX,IAAgBJ,WAAW,CAACE,wBAAA,CAAeY,cAAhB,CAA3B,EAA4D;MAC1D,IAAIT,YAAY,GACd,MAAMC,4BAAA,CAAoBC,WAApB,GAAkCC,eAAlC,CAAkDJ,CAAlD,CADR;;MAEA,IAAIC,YAAJ,EAAkB;QAChBJ,OAAO,CAACQ,IAAR,CAAa;UACXC,UAAU,EAAE,CAAAL,YAAY,SAAZ,IAAAA,YAAY,WAAZ,YAAAA,YAAY,CAAEM,WAAd,KAA6B,sBAD9B;UAEXC,UAAU,EAAER,CAFD;UAGXS,OAAO,EAAE;QAHE,CAAb;MAKD;IACF;EACF;;EACD,OAAOZ,OAAP;AACD"}
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _reactNative = require("react-native");
|
|
9
|
-
|
|
10
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
|
|
12
|
-
var _CommonStyles = require("../../../../styles/executionTasks/CommonStyles");
|
|
13
|
-
|
|
14
|
-
var _reactNativePaper = require("react-native-paper");
|
|
15
|
-
|
|
16
|
-
var _ReasonDropDown = _interopRequireDefault(require("./ReasonDropDown"));
|
|
17
|
-
|
|
18
|
-
var _ScannerUtils = require("../ScannerUtils");
|
|
19
|
-
|
|
20
|
-
var _ScannerSchema = require("../ScannerSchema");
|
|
21
|
-
|
|
22
|
-
var _Toaster = require("../../../widgets/Toaster");
|
|
23
|
-
|
|
24
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
|
-
|
|
26
|
-
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
|
-
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
|
-
const RTReasonSelection = props => {
|
|
31
|
-
const [selectedReason, setSelectedReason] = (0, _react.useState)();
|
|
32
|
-
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
33
|
-
style: _CommonStyles.CommonStyles.mainContainer
|
|
34
|
-
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
35
|
-
style: {
|
|
36
|
-
flex: 1,
|
|
37
|
-
marginTop: 20,
|
|
38
|
-
marginBottom: 20,
|
|
39
|
-
backgroundColor: '#ffffff',
|
|
40
|
-
padding: 18
|
|
41
|
-
}
|
|
42
|
-
}, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
43
|
-
style: {
|
|
44
|
-
lineHeight: 20,
|
|
45
|
-
fontFamily: _CommonStyles.Fonts.IBMPlexSans_600SemiBold,
|
|
46
|
-
color: '#111111',
|
|
47
|
-
fontSize: 16
|
|
48
|
-
}
|
|
49
|
-
}, `${(0, _ScannerUtils.getScannedItemCount)(props.scanList, _ScannerSchema.SCAN_STATUS.TO_BE_SCANNED)} items not scanned`), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
50
|
-
style: {
|
|
51
|
-
marginTop: 5,
|
|
52
|
-
lineHeight: 20,
|
|
53
|
-
fontFamily: _CommonStyles.Fonts.IBMPlexSans_400Regular,
|
|
54
|
-
color: '#111111',
|
|
55
|
-
fontSize: 14,
|
|
56
|
-
marginBottom: 10
|
|
57
|
-
}
|
|
58
|
-
}, ` Do you want to proceed without scanning these shipments?`), /*#__PURE__*/_react.default.createElement(_ReasonDropDown.default, {
|
|
59
|
-
items: props.reasons,
|
|
60
|
-
onItemChange: reasonItem => {
|
|
61
|
-
if (reasonItem !== null) setSelectedReason(reasonItem);
|
|
62
|
-
},
|
|
63
|
-
style: {},
|
|
64
|
-
selectedReason: selectedReason
|
|
65
|
-
})), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
66
|
-
style: {
|
|
67
|
-
flex: 1,
|
|
68
|
-
marginStart: 16,
|
|
69
|
-
marginEnd: 16,
|
|
70
|
-
marginBottom: 16,
|
|
71
|
-
justifyContent: 'flex-end'
|
|
72
|
-
}
|
|
73
|
-
}, /*#__PURE__*/_react.default.createElement(_reactNativePaper.Button, {
|
|
74
|
-
labelStyle: _CommonStyles.CommonStyles.nextButtonLabel,
|
|
75
|
-
style: [_CommonStyles.CommonStyles.nextButton, {
|
|
76
|
-
marginBottom: 10
|
|
77
|
-
}],
|
|
78
|
-
mode: 'contained',
|
|
79
|
-
onPress: async () => {
|
|
80
|
-
if (selectedReason && props.scanList && props.scanList.length > 0) {
|
|
81
|
-
const scanResults = props.scanList.map(sc => {
|
|
82
|
-
if (sc.scanStatus === _ScannerSchema.SCAN_STATUS.TO_BE_SCANNED) {
|
|
83
|
-
sc.reasonCode = selectedReason.reasonCode;
|
|
84
|
-
sc.reasonText = selectedReason.reasonText;
|
|
85
|
-
sc.success = selectedReason.success;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
return sc;
|
|
89
|
-
});
|
|
90
|
-
props.onSubmitET(scanResults);
|
|
91
|
-
} else {
|
|
92
|
-
(0, _Toaster.showToast)('No reason code selected!');
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}, "Proceed"), /*#__PURE__*/_react.default.createElement(_reactNativePaper.Button, {
|
|
96
|
-
style: [_CommonStyles.CommonStyles.cancelButton],
|
|
97
|
-
labelStyle: _CommonStyles.CommonStyles.cancelButtonLabel,
|
|
98
|
-
mode: 'outlined',
|
|
99
|
-
onPress: async () => {
|
|
100
|
-
props.showReasonSelectionPage(false);
|
|
101
|
-
}
|
|
102
|
-
}, "Cancel")));
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
var _default = RTReasonSelection;
|
|
106
|
-
exports.default = _default;
|
|
107
|
-
//# sourceMappingURL=RTReasonSelection.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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":"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"}
|