@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,317 +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 _ScannerSchema = require("../ScannerSchema");
|
|
13
|
-
|
|
14
|
-
var ScannerUtils = _interopRequireWildcard(require("../ScannerUtils"));
|
|
15
|
-
|
|
16
|
-
var _utils = require("../../../../utils/utils");
|
|
17
|
-
|
|
18
|
-
var _reactNativePaper = require("react-native-paper");
|
|
19
|
-
|
|
20
|
-
var _Toaster = require("../../../widgets/Toaster");
|
|
21
|
-
|
|
22
|
-
var _CommonStyles = require("../../../../styles/executionTasks/CommonStyles");
|
|
23
|
-
|
|
24
|
-
var _CScanner = _interopRequireDefault(require("../CScanner"));
|
|
25
|
-
|
|
26
|
-
var _SnackBarCustom = _interopRequireDefault(require("../../../widgets/SnackBarCustom"));
|
|
27
|
-
|
|
28
|
-
var _ScanList = _interopRequireDefault(require("./ScanList"));
|
|
29
|
-
|
|
30
|
-
var _native = require("@react-navigation/native");
|
|
31
|
-
|
|
32
|
-
var _ReasonDropDown = _interopRequireDefault(require("./ReasonDropDown"));
|
|
33
|
-
|
|
34
|
-
var _DropDownUtils = require("./DropDownUtils");
|
|
35
|
-
|
|
36
|
-
var _ProgressDialog = _interopRequireDefault(require("../../../widgets/ProgressDialog"));
|
|
37
|
-
|
|
38
|
-
var _strings = require("../../../../res/strings");
|
|
39
|
-
|
|
40
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
41
|
-
|
|
42
|
-
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); }
|
|
43
|
-
|
|
44
|
-
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; }
|
|
45
|
-
|
|
46
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
47
|
-
|
|
48
|
-
const RTScan = props => {
|
|
49
|
-
const [isVisible, setVisible] = (0, _react.useState)(_reactNative.Platform.OS === 'ios');
|
|
50
|
-
const [scansMap, setScanMap] = (0, _react.useState)();
|
|
51
|
-
const [scanList, setScanList] = (0, _react.useState)([]);
|
|
52
|
-
const [scanText, setScanText] = (0, _react.useState)('');
|
|
53
|
-
const [prevScanText, setPrevScanText] = (0, _react.useState)('');
|
|
54
|
-
const [snackBar, showSnackBar] = (0, _react.useState)(false);
|
|
55
|
-
const [showScannedList, setShowScannedList] = (0, _react.useState)(false);
|
|
56
|
-
const [selectedReason, setSelectedReason] = (0, _react.useState)();
|
|
57
|
-
const [reasonItems, setReasonItems] = (0, _react.useState)();
|
|
58
|
-
const [showProgress, setShowProgress] = (0, _react.useState)(false);
|
|
59
|
-
/**
|
|
60
|
-
* function for updating the scans list
|
|
61
|
-
*/
|
|
62
|
-
|
|
63
|
-
const updateList = (0, _react.useCallback)((scannedItem, action) => {
|
|
64
|
-
switch (action) {
|
|
65
|
-
case ScannerUtils.SCAN_ACTIONS.CHANGE_STATUS:
|
|
66
|
-
setScanMap(prevState => {
|
|
67
|
-
const details = prevState === null || prevState === void 0 ? void 0 : prevState.get(scannedItem);
|
|
68
|
-
|
|
69
|
-
if (details) {
|
|
70
|
-
details.scanStatus = _ScannerSchema.SCAN_STATUS.TO_BE_SCANNED;
|
|
71
|
-
prevState === null || prevState === void 0 ? void 0 : prevState.set(scannedItem, details);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
setScanList((0, ScannerUtils.getItemsToBeScanned)(prevState));
|
|
75
|
-
return prevState;
|
|
76
|
-
});
|
|
77
|
-
break;
|
|
78
|
-
|
|
79
|
-
case ScannerUtils.SCAN_ACTIONS.DELETE:
|
|
80
|
-
setScanMap(prevState => {
|
|
81
|
-
prevState === null || prevState === void 0 ? void 0 : prevState.delete(scannedItem);
|
|
82
|
-
setScanList((0, ScannerUtils.getItemsToBeScanned)(prevState));
|
|
83
|
-
return prevState;
|
|
84
|
-
});
|
|
85
|
-
break;
|
|
86
|
-
|
|
87
|
-
default:
|
|
88
|
-
break;
|
|
89
|
-
}
|
|
90
|
-
}, []);
|
|
91
|
-
(0, _react.useEffect)(() => {
|
|
92
|
-
(async () => {
|
|
93
|
-
var _props$scans;
|
|
94
|
-
|
|
95
|
-
setShowProgress(true);
|
|
96
|
-
let response = await (0, _DropDownUtils.getDropDownItems)(props.applicableReasons);
|
|
97
|
-
setReasonItems(response);
|
|
98
|
-
const toBeScanned = new Map();
|
|
99
|
-
(_props$scans = props.scans) === null || _props$scans === void 0 ? void 0 : _props$scans.forEach(s => {
|
|
100
|
-
toBeScanned.set(s, {
|
|
101
|
-
value: s,
|
|
102
|
-
scanStatus: _ScannerSchema.SCAN_STATUS.TO_BE_SCANNED
|
|
103
|
-
});
|
|
104
|
-
});
|
|
105
|
-
setScanMap(toBeScanned);
|
|
106
|
-
setScanList((0, ScannerUtils.getItemsToBeScanned)(toBeScanned));
|
|
107
|
-
setShowProgress(false);
|
|
108
|
-
})();
|
|
109
|
-
}, [props.applicableReasons, props.scans]);
|
|
110
|
-
(0, _native.useFocusEffect)(_react.default.useCallback(() => {
|
|
111
|
-
const onBackPress = () => {
|
|
112
|
-
if (showScannedList) {
|
|
113
|
-
setShowScannedList(false);
|
|
114
|
-
return true;
|
|
115
|
-
} else {
|
|
116
|
-
return false;
|
|
117
|
-
}
|
|
118
|
-
};
|
|
119
|
-
|
|
120
|
-
_reactNative.BackHandler.addEventListener('hardwareBackPress', onBackPress);
|
|
121
|
-
|
|
122
|
-
return () => _reactNative.BackHandler.removeEventListener('hardwareBackPress', onBackPress);
|
|
123
|
-
}, [showScannedList]));
|
|
124
|
-
(0, _react.useEffect)(() => {
|
|
125
|
-
let timeout;
|
|
126
|
-
|
|
127
|
-
if (!isVisible) {
|
|
128
|
-
timeout = setTimeout(() => {
|
|
129
|
-
setVisible(true);
|
|
130
|
-
}, 500);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
return () => {
|
|
134
|
-
clearTimeout(timeout);
|
|
135
|
-
};
|
|
136
|
-
}, [isVisible]);
|
|
137
|
-
const addScans = (0, _react.useCallback)(async scan => {
|
|
138
|
-
if (props.preSelectReasonCode && !selectedReason) {
|
|
139
|
-
(0, _Toaster.showToast)('Please select Reason first');
|
|
140
|
-
return;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
if ((0, _utils.isEmptyOrBlank)(scan)) {
|
|
144
|
-
(0, _Toaster.showToast)('Empty AWB Code');
|
|
145
|
-
return;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
if ((0, ScannerUtils.isScannedAlready)(scan, scansMap)) {
|
|
149
|
-
(0, _Toaster.showToast)('Already added');
|
|
150
|
-
return;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
setShowProgress(true);
|
|
154
|
-
let isValidated = await ScannerUtils.checkForValidation(scan, props.validation, props.scans);
|
|
155
|
-
setShowProgress(false);
|
|
156
|
-
|
|
157
|
-
if (props.preSelectReasonCode) {
|
|
158
|
-
if (isValidated) {
|
|
159
|
-
showSnackBar(true);
|
|
160
|
-
setScanMap(prevState => {
|
|
161
|
-
const scannedValue = scan;
|
|
162
|
-
setPrevScanText(scannedValue);
|
|
163
|
-
setScanText('');
|
|
164
|
-
prevState === null || prevState === void 0 ? void 0 : prevState.set(scannedValue, {
|
|
165
|
-
value: scannedValue,
|
|
166
|
-
timestamp: Date.now(),
|
|
167
|
-
validated: true,
|
|
168
|
-
reasonCode: selectedReason === null || selectedReason === void 0 ? void 0 : selectedReason.reasonCode,
|
|
169
|
-
reasonText: selectedReason === null || selectedReason === void 0 ? void 0 : selectedReason.reasonText,
|
|
170
|
-
success: selectedReason === null || selectedReason === void 0 ? void 0 : selectedReason.success,
|
|
171
|
-
scanStatus: selectedReason !== null && selectedReason !== void 0 && selectedReason.success ? _ScannerSchema.SCAN_STATUS.ACCEPTED : _ScannerSchema.SCAN_STATUS.REJECTED
|
|
172
|
-
});
|
|
173
|
-
setScanList((0, ScannerUtils.getItemsToBeScanned)(prevState));
|
|
174
|
-
return prevState;
|
|
175
|
-
});
|
|
176
|
-
} else {
|
|
177
|
-
(0, _Toaster.showToast)('Invalid Waybill');
|
|
178
|
-
}
|
|
179
|
-
} else {
|
|
180
|
-
showSnackBar(true);
|
|
181
|
-
setScanMap(prevState => {
|
|
182
|
-
const scannedValue = scan;
|
|
183
|
-
setPrevScanText(scannedValue);
|
|
184
|
-
setScanText('');
|
|
185
|
-
prevState === null || prevState === void 0 ? void 0 : prevState.set(scannedValue, {
|
|
186
|
-
value: scannedValue,
|
|
187
|
-
timestamp: Date.now(),
|
|
188
|
-
validated: isValidated,
|
|
189
|
-
scanStatus: _ScannerSchema.SCAN_STATUS.NONE
|
|
190
|
-
});
|
|
191
|
-
setScanList((0, ScannerUtils.getItemsToBeScanned)(prevState));
|
|
192
|
-
return prevState;
|
|
193
|
-
});
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
setShowProgress(false);
|
|
197
|
-
}, [props.preSelectReasonCode, props.scans, props.validation, scansMap, selectedReason]);
|
|
198
|
-
|
|
199
|
-
const _handleBarCodeScanned = async scan => {
|
|
200
|
-
if (!(0, _utils.isEmptyOrBlank)(scan)) {
|
|
201
|
-
setVisible(false);
|
|
202
|
-
await addScans(scan);
|
|
203
|
-
}
|
|
204
|
-
};
|
|
205
|
-
|
|
206
|
-
if (showScannedList) {
|
|
207
|
-
return /*#__PURE__*/_react.default.createElement(_ScanList.default, _extends({
|
|
208
|
-
reasons: reasonItems ?? [],
|
|
209
|
-
scanList: scanList,
|
|
210
|
-
filterList: updateList
|
|
211
|
-
}, props));
|
|
212
|
-
} else return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
213
|
-
style: _CommonStyles.CommonStyles.mainContainer
|
|
214
|
-
}, /*#__PURE__*/_react.default.createElement(_ProgressDialog.default, {
|
|
215
|
-
visible: showProgress,
|
|
216
|
-
label: _strings.PLEASE_WAIT
|
|
217
|
-
}), props.preSelectReasonCode && /*#__PURE__*/_react.default.createElement(_ReasonDropDown.default, {
|
|
218
|
-
style: {
|
|
219
|
-
padding: 10
|
|
220
|
-
},
|
|
221
|
-
selectedReason: selectedReason,
|
|
222
|
-
items: reasonItems ?? [],
|
|
223
|
-
onItemChange: reasonItem => {
|
|
224
|
-
if (reasonItem !== null) setSelectedReason(reasonItem);
|
|
225
|
-
}
|
|
226
|
-
}), isVisible ? /*#__PURE__*/_react.default.createElement(_CScanner.default, {
|
|
227
|
-
barCodeTypes: (0, ScannerUtils.getBarCodeTypes)(props),
|
|
228
|
-
onScanned: _handleBarCodeScanned
|
|
229
|
-
}) : null, /*#__PURE__*/_react.default.createElement(_SnackBarCustom.default, {
|
|
230
|
-
message: `Shipment ${prevScanText} scanned successfully`,
|
|
231
|
-
visible: snackBar,
|
|
232
|
-
onDismiss: () => {
|
|
233
|
-
showSnackBar(false);
|
|
234
|
-
}
|
|
235
|
-
}), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
236
|
-
style: styles.bottomView
|
|
237
|
-
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
238
|
-
style: {
|
|
239
|
-
marginBottom: 10,
|
|
240
|
-
flexDirection: 'row'
|
|
241
|
-
}
|
|
242
|
-
}, /*#__PURE__*/_react.default.createElement(_reactNative.TextInput, {
|
|
243
|
-
returnKeyType: 'done',
|
|
244
|
-
onSubmitEditing: async () => {
|
|
245
|
-
await addScans(scanText);
|
|
246
|
-
},
|
|
247
|
-
value: scanText,
|
|
248
|
-
onChangeText: setScanText,
|
|
249
|
-
style: {
|
|
250
|
-
borderBottomColor: 'black',
|
|
251
|
-
borderBottomWidth: 1,
|
|
252
|
-
marginEnd: 20,
|
|
253
|
-
flex: 1,
|
|
254
|
-
fontSize: 16,
|
|
255
|
-
fontFamily: _CommonStyles.Fonts.IBMPlexSans_600SemiBold
|
|
256
|
-
},
|
|
257
|
-
placeholder: 'Enter AWB code'
|
|
258
|
-
}), /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
|
|
259
|
-
style: {
|
|
260
|
-
alignSelf: 'center',
|
|
261
|
-
justifyContent: 'center',
|
|
262
|
-
paddingStart: 17,
|
|
263
|
-
paddingEnd: 17,
|
|
264
|
-
paddingTop: 9,
|
|
265
|
-
paddingBottom: 9,
|
|
266
|
-
borderWidth: 1,
|
|
267
|
-
borderRadius: 6,
|
|
268
|
-
borderColor: '#E0E3EB'
|
|
269
|
-
},
|
|
270
|
-
onPress: async () => {
|
|
271
|
-
await addScans(scanText);
|
|
272
|
-
}
|
|
273
|
-
}, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
274
|
-
style: {
|
|
275
|
-
fontSize: 14,
|
|
276
|
-
fontFamily: _CommonStyles.Fonts.IBMPlexSans_500Medium,
|
|
277
|
-
lineHeight: 20,
|
|
278
|
-
color: '#3D445C'
|
|
279
|
-
}
|
|
280
|
-
}, 'ADD'))), /*#__PURE__*/_react.default.createElement(_reactNativePaper.Button, {
|
|
281
|
-
labelStyle: _CommonStyles.CommonStyles.nextButtonLabel,
|
|
282
|
-
style: _CommonStyles.CommonStyles.nextButton,
|
|
283
|
-
uppercase: false,
|
|
284
|
-
onPress: () => {
|
|
285
|
-
setShowScannedList(!showScannedList);
|
|
286
|
-
}
|
|
287
|
-
}, `View Scanned Shipments`)));
|
|
288
|
-
};
|
|
289
|
-
|
|
290
|
-
var _default = RTScan;
|
|
291
|
-
exports.default = _default;
|
|
292
|
-
|
|
293
|
-
const styles = _reactNative.StyleSheet.create({
|
|
294
|
-
bottomView: {
|
|
295
|
-
justifyContent: 'flex-end',
|
|
296
|
-
marginTop: 10,
|
|
297
|
-
marginBottom: 10,
|
|
298
|
-
marginStart: 15,
|
|
299
|
-
marginEnd: 15
|
|
300
|
-
},
|
|
301
|
-
addButtonLabel: {
|
|
302
|
-
color: '#3D445C',
|
|
303
|
-
fontFamily: _CommonStyles.Fonts.IBMPlexSans_600SemiBold,
|
|
304
|
-
fontSize: 16,
|
|
305
|
-
fontWeight: '600',
|
|
306
|
-
lineHeight: 20,
|
|
307
|
-
letterSpacing: 1.56,
|
|
308
|
-
textAlign: 'center',
|
|
309
|
-
fontStyle: 'normal'
|
|
310
|
-
},
|
|
311
|
-
centerView: {
|
|
312
|
-
flex: 1,
|
|
313
|
-
justifyContent: 'center',
|
|
314
|
-
alignContent: 'center'
|
|
315
|
-
}
|
|
316
|
-
});
|
|
317
|
-
//# sourceMappingURL=RTScan.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["RTScan","props","isVisible","setVisible","useState","Platform","OS","scansMap","setScanMap","scanList","setScanList","scanText","setScanText","prevScanText","setPrevScanText","snackBar","showSnackBar","showScannedList","setShowScannedList","selectedReason","setSelectedReason","reasonItems","setReasonItems","showProgress","setShowProgress","updateList","useCallback","scannedItem","action","SCAN_ACTIONS","CHANGE_STATUS","prevState","details","get","scanStatus","SCAN_STATUS","TO_BE_SCANNED","set","getItemsToBeScanned","DELETE","delete","useEffect","response","getDropDownItems","applicableReasons","toBeScanned","Map","scans","forEach","s","value","useFocusEffect","React","onBackPress","BackHandler","addEventListener","removeEventListener","timeout","setTimeout","clearTimeout","addScans","scan","preSelectReasonCode","showToast","isEmptyOrBlank","isScannedAlready","isValidated","ScannerUtils","checkForValidation","validation","scannedValue","timestamp","Date","now","validated","reasonCode","reasonText","success","ACCEPTED","REJECTED","NONE","_handleBarCodeScanned","CommonStyles","mainContainer","PLEASE_WAIT","padding","reasonItem","getBarCodeTypes","styles","bottomView","marginBottom","flexDirection","borderBottomColor","borderBottomWidth","marginEnd","flex","fontSize","fontFamily","Fonts","IBMPlexSans_600SemiBold","alignSelf","justifyContent","paddingStart","paddingEnd","paddingTop","paddingBottom","borderWidth","borderRadius","borderColor","IBMPlexSans_500Medium","lineHeight","color","nextButtonLabel","nextButton","StyleSheet","create","marginTop","marginStart","addButtonLabel","fontWeight","letterSpacing","textAlign","fontStyle","centerView","alignContent"],"sources":["RTScan.tsx"],"sourcesContent":["import {\n BackHandler,\n Platform,\n StyleSheet,\n Text,\n TextInput,\n TouchableOpacity,\n View,\n} from 'react-native';\nimport React, { useCallback, useEffect, useState } from 'react';\nimport type { ScannedItemData, ScannerInput } from '../ScannerSchema';\nimport { SCAN_STATUS } from '../ScannerSchema';\nimport * as ScannerUtils from '../ScannerUtils';\nimport {\n getBarCodeTypes,\n getItemsToBeScanned,\n isScannedAlready,\n SCAN_ACTIONS,\n} from '../ScannerUtils';\nimport { isEmptyOrBlank } from '../../../../utils/utils';\nimport { Button } from 'react-native-paper';\nimport { showToast } from '../../../widgets/Toaster';\nimport {\n CommonStyles,\n Fonts,\n} from '../../../../styles/executionTasks/CommonStyles';\nimport CScanner from '../CScanner';\nimport SnackBarCustom from '../../../widgets/SnackBarCustom';\nimport ScanList from './ScanList';\nimport { useFocusEffect } from '@react-navigation/native';\nimport DropDownPicker, { ReasonItem } from './ReasonDropDown';\nimport { getDropDownItems } from './DropDownUtils';\nimport ProgressDialog from '../../../widgets/ProgressDialog';\nimport { PLEASE_WAIT } from '../../../../res/strings';\n\nconst RTScan = (props: ScannerInput) => {\n const [isVisible, setVisible] = useState(Platform.OS === 'ios');\n const [scansMap, setScanMap] = useState<Map<string, ScannedItemData>>();\n const [scanList, setScanList] = useState<ScannedItemData[]>([]);\n const [scanText, setScanText] = useState('');\n const [prevScanText, setPrevScanText] = useState('');\n const [snackBar, showSnackBar] = useState(false);\n const [showScannedList, setShowScannedList] = useState(false);\n const [selectedReason, setSelectedReason] = useState<ReasonItem>();\n const [reasonItems, setReasonItems] = useState<ReasonItem[]>();\n const [showProgress, setShowProgress] = useState(false);\n\n /**\n * function for updating the scans list\n */\n const updateList = useCallback(\n (scannedItem: string, action: SCAN_ACTIONS) => {\n switch (action) {\n case SCAN_ACTIONS.CHANGE_STATUS:\n setScanMap((prevState) => {\n const details = prevState?.get(scannedItem);\n if (details) {\n details.scanStatus = SCAN_STATUS.TO_BE_SCANNED;\n prevState?.set(scannedItem, details);\n }\n setScanList(getItemsToBeScanned(prevState));\n return prevState;\n });\n break;\n case SCAN_ACTIONS.DELETE:\n setScanMap((prevState) => {\n prevState?.delete(scannedItem);\n setScanList(getItemsToBeScanned(prevState));\n return prevState;\n });\n break;\n default:\n break;\n }\n },\n []\n );\n\n useEffect(() => {\n (async () => {\n setShowProgress(true);\n let response = await getDropDownItems(props.applicableReasons);\n setReasonItems(response);\n const toBeScanned: Map<string, ScannedItemData> = new Map<\n string,\n ScannedItemData\n >();\n props.scans?.forEach((s) => {\n toBeScanned.set(s, { value: s, scanStatus: SCAN_STATUS.TO_BE_SCANNED });\n });\n setScanMap(toBeScanned);\n setScanList(getItemsToBeScanned(toBeScanned));\n setShowProgress(false);\n })();\n }, [props.applicableReasons, props.scans]);\n\n useFocusEffect(\n React.useCallback(() => {\n const onBackPress = () => {\n if (showScannedList) {\n setShowScannedList(false);\n return true;\n } else {\n return false;\n }\n };\n BackHandler.addEventListener('hardwareBackPress', onBackPress);\n return () =>\n BackHandler.removeEventListener('hardwareBackPress', onBackPress);\n }, [showScannedList])\n );\n useEffect(() => {\n let timeout: ReturnType<typeof setTimeout>;\n if (!isVisible) {\n timeout = setTimeout(() => {\n setVisible(true);\n }, 500);\n }\n return () => {\n clearTimeout(timeout);\n };\n }, [isVisible]);\n\n const addScans = useCallback(\n async (scan: string) => {\n if (props.preSelectReasonCode && !selectedReason) {\n showToast('Please select Reason first');\n return;\n }\n if (isEmptyOrBlank(scan)) {\n showToast('Empty AWB Code');\n return;\n }\n if (isScannedAlready(scan, scansMap)) {\n showToast('Already added');\n return;\n }\n setShowProgress(true);\n let isValidated = await ScannerUtils.checkForValidation(\n scan,\n props.validation,\n props.scans\n );\n setShowProgress(false);\n if (props.preSelectReasonCode) {\n if (isValidated) {\n showSnackBar(true);\n setScanMap((prevState) => {\n const scannedValue = scan;\n setPrevScanText(scannedValue);\n setScanText('');\n prevState?.set(scannedValue, {\n value: scannedValue,\n timestamp: Date.now(),\n validated: true,\n reasonCode: selectedReason?.reasonCode,\n reasonText: selectedReason?.reasonText,\n success: selectedReason?.success,\n scanStatus: selectedReason?.success\n ? SCAN_STATUS.ACCEPTED\n : SCAN_STATUS.REJECTED,\n });\n setScanList(getItemsToBeScanned(prevState));\n return prevState;\n });\n } else {\n showToast('Invalid Waybill');\n }\n } else {\n showSnackBar(true);\n setScanMap((prevState) => {\n const scannedValue = scan;\n setPrevScanText(scannedValue);\n setScanText('');\n prevState?.set(scannedValue, {\n value: scannedValue,\n timestamp: Date.now(),\n validated: isValidated,\n scanStatus: SCAN_STATUS.NONE,\n });\n setScanList(getItemsToBeScanned(prevState));\n return prevState;\n });\n }\n setShowProgress(false);\n },\n [\n props.preSelectReasonCode,\n props.scans,\n props.validation,\n scansMap,\n selectedReason,\n ]\n );\n\n const _handleBarCodeScanned = async (scan: string) => {\n if (!isEmptyOrBlank(scan)) {\n setVisible(false);\n await addScans(scan);\n }\n };\n if (showScannedList) {\n return (\n <ScanList\n reasons={reasonItems ?? []}\n scanList={scanList}\n filterList={updateList}\n {...props}\n />\n );\n } else\n return (\n <View style={CommonStyles.mainContainer}>\n <ProgressDialog visible={showProgress} label={PLEASE_WAIT} />\n {props.preSelectReasonCode && (\n <DropDownPicker\n style={{ padding: 10 }}\n selectedReason={selectedReason}\n items={reasonItems ?? []}\n onItemChange={(reasonItem: ReasonItem | null) => {\n if (reasonItem !== null) setSelectedReason(reasonItem);\n }}\n />\n )}\n {isVisible ? (\n <CScanner\n barCodeTypes={getBarCodeTypes(props)}\n onScanned={_handleBarCodeScanned}\n />\n ) : null}\n\n <SnackBarCustom\n message={`Shipment ${prevScanText} scanned successfully`}\n visible={snackBar}\n onDismiss={() => {\n showSnackBar(false);\n }}\n />\n <View style={styles.bottomView}>\n <View style={{ marginBottom: 10, flexDirection: 'row' }}>\n <TextInput\n returnKeyType={'done'}\n onSubmitEditing={async () => {\n await addScans(scanText);\n }}\n value={scanText}\n onChangeText={setScanText}\n style={{\n borderBottomColor: 'black',\n borderBottomWidth: 1,\n marginEnd: 20,\n flex: 1,\n fontSize: 16,\n fontFamily: Fonts.IBMPlexSans_600SemiBold,\n }}\n placeholder={'Enter AWB code'}\n />\n <TouchableOpacity\n style={{\n alignSelf: 'center',\n justifyContent: 'center',\n paddingStart: 17,\n paddingEnd: 17,\n paddingTop: 9,\n paddingBottom: 9,\n borderWidth: 1,\n borderRadius: 6,\n borderColor: '#E0E3EB',\n }}\n onPress={async () => {\n await addScans(scanText);\n }}\n >\n <Text\n style={{\n fontSize: 14,\n fontFamily: Fonts.IBMPlexSans_500Medium,\n lineHeight: 20,\n color: '#3D445C',\n }}\n >\n {'ADD'}\n </Text>\n </TouchableOpacity>\n </View>\n\n <Button\n labelStyle={CommonStyles.nextButtonLabel}\n style={CommonStyles.nextButton}\n uppercase={false}\n onPress={() => {\n setShowScannedList(!showScannedList);\n }}\n >\n {`View Scanned Shipments`}\n </Button>\n </View>\n </View>\n );\n};\nexport default RTScan;\n\nconst styles = StyleSheet.create({\n bottomView: {\n justifyContent: 'flex-end',\n marginTop: 10,\n marginBottom: 10,\n marginStart: 15,\n marginEnd: 15,\n },\n\n addButtonLabel: {\n color: '#3D445C',\n fontFamily: Fonts.IBMPlexSans_600SemiBold,\n fontSize: 16,\n fontWeight: '600',\n lineHeight: 20,\n letterSpacing: 1.56,\n textAlign: 'center',\n fontStyle: 'normal',\n },\n centerView: {\n flex: 1,\n justifyContent: 'center',\n alignContent: 'center',\n },\n});\n"],"mappings":";;;;;;;AAAA;;AASA;;AAEA;;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AD;IACE,KAAK,EAAE;MACLqF,QAAQ,EAAE,EADL;MAELC,UAAU,EAAEC,mBAAA,CAAMW,qBAFb;MAGLC,UAAU,EAAE,EAHP;MAILC,KAAK,EAAE;IAJF;EADT,GAQG,KARH,CAhBF,CAlBF,CADF,eAgDE,6BAAC,wBAAD;IACE,UAAU,EAAE7B,0BAAA,CAAa8B,eAD3B;IAEE,KAAK,EAAE9B,0BAAA,CAAa+B,UAFtB;IAGE,SAAS,EAAE,KAHb;IAIE,OAAO,EAAE,MAAM;MACb/F,kBAAkB,CAAC,CAACD,eAAF,CAAlB;IACD;EANH,GAQI,wBARJ,CAhDF,CA1BF,CADF;AAwFH,CAxQD;;eAyQejB,M;;;AAEf,MAAMwF,MAAM,GAAG0B,uBAAA,CAAWC,MAAX,CAAkB;EAC/B1B,UAAU,EAAE;IACVY,cAAc,EAAE,UADN;IAEVe,SAAS,EAAE,EAFD;IAGV1B,YAAY,EAAE,EAHJ;IAIV2B,WAAW,EAAE,EAJH;IAKVvB,SAAS,EAAE;EALD,CADmB;EAS/BwB,cAAc,EAAE;IACdP,KAAK,EAAE,SADO;IAEdd,UAAU,EAAEC,mBAAA,CAAMC,uBAFJ;IAGdH,QAAQ,EAAE,EAHI;IAIduB,UAAU,EAAE,KAJE;IAKdT,UAAU,EAAE,EALE;IAMdU,aAAa,EAAE,IAND;IAOdC,SAAS,EAAE,QAPG;IAQdC,SAAS,EAAE;EARG,CATe;EAmB/BC,UAAU,EAAE;IACV5B,IAAI,EAAE,CADI;IAEVM,cAAc,EAAE,QAFN;IAGVuB,YAAY,EAAE;EAHJ;AAnBmB,CAAlB,CAAf"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["getDropDownItems","reasonItem","length","items","forEach","it","push","label","reasonText","value","reasonCode","icon","success","findReasonByCode","code","reasonItems","i","ReasonDropDown","props","open","setOpen","useState","selectedReason","setSelectedReason","style","styles","headerText","backgroundColor","fontSize","fontFamily","Fonts","IBMPlexSans_400Regular","onItemChange","React","memo","StyleSheet","create","IBMPlexSans_600SemiBold","marginTop","marginBottom"],"sources":["ReasonDropDown.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport { Fonts } from '../../../../styles/executionTasks/CommonStyles';\nimport { StyleSheet, Text, View } from 'react-native';\nimport DropDownPicker from 'react-native-dropdown-picker';\nimport FIcon from 'react-native-vector-icons/FontAwesome';\n\nfunction getDropDownItems(reasonItem: ReasonItem[]) {\n if (!reasonItem || reasonItem.length === 0) return [];\n let items: { label: string; value: string; icon: () => void }[] = [];\n\n reasonItem.forEach((it) => {\n items.push({\n label: it.reasonText,\n value: it.reasonCode,\n icon: () => (\n <FIcon\n size={10}\n name={'circle'}\n color={it.success ? '#10B981' : '#DC2626'}\n />\n ),\n });\n });\n return items;\n}\n\nfunction findReasonByCode(\n code: string,\n reasonItems: ReasonItem[]\n): ReasonItem | null {\n if (!reasonItems || reasonItems.length === 0) return null;\n for (let i = 0; i < reasonItems.length; i++) {\n if (reasonItems[i].reasonCode === code) {\n return reasonItems[i];\n }\n }\n return null;\n}\n\nconst ReasonDropDown = (props: DropDownPickerProps) => {\n const [open, setOpen] = useState(false);\n const [selectedReason, setSelectedReason] = useState(\n props.selectedReason?.reasonText ?? null\n );\n\n return (\n <View style={props.style}>\n <Text style={styles.headerText}>{'Choose reason code'}</Text>\n <DropDownPicker\n dropDownContainerStyle={{ backgroundColor: '#ffffff' }}\n placeholder={selectedReason ?? ''}\n open={open}\n value={selectedReason}\n items={getDropDownItems(props.items)}\n setOpen={setOpen}\n setValue={setSelectedReason}\n textStyle={{\n fontSize: 16,\n fontFamily: Fonts.IBMPlexSans_400Regular,\n }}\n labelStyle={{\n fontSize: 16,\n fontFamily: Fonts.IBMPlexSans_400Regular,\n }}\n onChangeValue={(value) => {\n if (value) {\n props.onItemChange(findReasonByCode(value, props.items));\n }\n }}\n />\n </View>\n );\n};\nexport default React.memo(ReasonDropDown);\n\nexport interface DropDownPickerProps {\n style: object;\n items: ReasonItem[];\n selectedReason?: ReasonItem;\n onItemChange: (selectedReason: ReasonItem | null) => void;\n}\n\nexport interface ReasonItem {\n reasonText: string;\n reasonCode: string;\n success: boolean;\n}\n\nconst styles = StyleSheet.create({\n headerText: {\n fontSize: 16,\n fontFamily: Fonts.IBMPlexSans_600SemiBold,\n marginTop: 10,\n marginBottom: 10,\n },\n});\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAEA,SAASA,gBAAT,CAA0BC,UAA1B,EAAoD;EAClD,IAAI,CAACA,UAAD,IAAeA,UAAU,CAACC,MAAX,KAAsB,CAAzC,EAA4C,OAAO,EAAP;EAC5C,IAAIC,KAA2D,GAAG,EAAlE;EAEAF,UAAU,CAACG,OAAX,CAAoBC,EAAD,IAAQ;IACzBF,KAAK,CAACG,IAAN,CAAW;MACTC,KAAK,EAAEF,EAAE,CAACG,UADD;MAETC,KAAK,EAAEJ,EAAE,CAACK,UAFD;MAGTC,IAAI,EAAE,mBACJ,6BAAC,oBAAD;QACE,IAAI,EAAE,EADR;QAEE,IAAI,EAAE,QAFR;QAGE,KAAK,EAAEN,EAAE,CAACO,OAAH,GAAa,SAAb,GAAyB;MAHlC;IAJO,CAAX;EAWD,CAZD;EAaA,OAAOT,KAAP;AACD;;AAED,SAASU,gBAAT,CACEC,IADF,EAEEC,WAFF,EAGqB;EACnB,IAAI,CAACA,WAAD,IAAgBA,WAAW,CAACb,MAAZ,KAAuB,CAA3C,EAA8C,OAAO,IAAP;;EAC9C,KAAK,IAAIc,CAAC,GAAG,CAAb,EAAgBA,CAAC,GAAGD,WAAW,CAACb,MAAhC,EAAwCc,CAAC,EAAzC,EAA6C;IAC3C,IAAID,WAAW,CAACC,CAAD,CAAX,CAAeN,UAAf,KAA8BI,IAAlC,EAAwC;MACtC,OAAOC,WAAW,CAACC,CAAD,CAAlB;IACD;EACF;;EACD,OAAO,IAAP;AACD;;AAED,MAAMC,cAAc,GAAIC,KAAD,IAAgC;EAAA;;EACrD,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B,CAAlB,CAAf"}
|
|
@@ -1,276 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
|
|
10
|
-
var _reactNative = require("react-native");
|
|
11
|
-
|
|
12
|
-
var _CommonStyles = require("../../../../styles/executionTasks/CommonStyles");
|
|
13
|
-
|
|
14
|
-
var _reactNativePaper = require("react-native-paper");
|
|
15
|
-
|
|
16
|
-
var _ScannerSchema = require("../ScannerSchema");
|
|
17
|
-
|
|
18
|
-
var _FontAwesome = _interopRequireDefault(require("react-native-vector-icons/FontAwesome"));
|
|
19
|
-
|
|
20
|
-
var _ScannerUtils = require("../ScannerUtils");
|
|
21
|
-
|
|
22
|
-
var _RTReasonSelection = _interopRequireDefault(require("./RTReasonSelection"));
|
|
23
|
-
|
|
24
|
-
var _Toaster = require("../../../widgets/Toaster");
|
|
25
|
-
|
|
26
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
|
-
|
|
28
|
-
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); }
|
|
29
|
-
|
|
30
|
-
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; }
|
|
31
|
-
|
|
32
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
33
|
-
|
|
34
|
-
const StatusView = props => {
|
|
35
|
-
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
36
|
-
style: [styles.wbnStatusView, {
|
|
37
|
-
backgroundColor: props.backgroundColor
|
|
38
|
-
}]
|
|
39
|
-
}, /*#__PURE__*/_react.default.createElement(_FontAwesome.default, {
|
|
40
|
-
name: 'circle',
|
|
41
|
-
color: props.iconColor
|
|
42
|
-
}), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
43
|
-
style: {
|
|
44
|
-
color: props.color,
|
|
45
|
-
marginStart: 5
|
|
46
|
-
}
|
|
47
|
-
}, props.text));
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
const ItemStatus = props => {
|
|
51
|
-
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
52
|
-
style: styles.itemStatusView
|
|
53
|
-
}, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
54
|
-
style: styles.text1
|
|
55
|
-
}, props.status), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
56
|
-
style: styles.text2
|
|
57
|
-
}, props.count));
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
const ScannedItemStatus = props => {
|
|
61
|
-
switch (props.scanStatus) {
|
|
62
|
-
case _ScannerSchema.SCAN_STATUS.ACCEPTED:
|
|
63
|
-
return /*#__PURE__*/_react.default.createElement(StatusView, {
|
|
64
|
-
text: props.text,
|
|
65
|
-
color: '#10B981',
|
|
66
|
-
backgroundColor: '#ECFDF5',
|
|
67
|
-
iconColor: '#10B981'
|
|
68
|
-
});
|
|
69
|
-
|
|
70
|
-
case _ScannerSchema.SCAN_STATUS.REJECTED:
|
|
71
|
-
return /*#__PURE__*/_react.default.createElement(StatusView, {
|
|
72
|
-
text: props.text,
|
|
73
|
-
color: '#DC2626',
|
|
74
|
-
backgroundColor: '#FEF2F2',
|
|
75
|
-
iconColor: '#DC2626'
|
|
76
|
-
});
|
|
77
|
-
|
|
78
|
-
case _ScannerSchema.SCAN_STATUS.TO_BE_SCANNED:
|
|
79
|
-
return /*#__PURE__*/_react.default.createElement(StatusView, {
|
|
80
|
-
text: props.text,
|
|
81
|
-
color: '#999999',
|
|
82
|
-
backgroundColor: '#F9F9F9',
|
|
83
|
-
iconColor: '#999999'
|
|
84
|
-
});
|
|
85
|
-
|
|
86
|
-
default:
|
|
87
|
-
return null;
|
|
88
|
-
}
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
class Item extends _react.default.Component {
|
|
92
|
-
render() {
|
|
93
|
-
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
94
|
-
style: styles.rowItem
|
|
95
|
-
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
96
|
-
style: {
|
|
97
|
-
flex: 1,
|
|
98
|
-
flexDirection: 'row'
|
|
99
|
-
}
|
|
100
|
-
}, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
101
|
-
style: {
|
|
102
|
-
marginEnd: 20
|
|
103
|
-
}
|
|
104
|
-
}, this.props.data.value), /*#__PURE__*/_react.default.createElement(ScannedItemStatus, {
|
|
105
|
-
scanStatus: this.props.data.scanStatus,
|
|
106
|
-
text: (0, _ScannerUtils.getScannedItemStatus)(this.props.data.scanStatus)
|
|
107
|
-
})), this.props.data.scanStatus !== _ScannerSchema.SCAN_STATUS.TO_BE_SCANNED && /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, null, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
108
|
-
style: {
|
|
109
|
-
fontSize: 16,
|
|
110
|
-
color: '#5B80F7',
|
|
111
|
-
fontFamily: _CommonStyles.Fonts.IBMPlexSans_500Medium
|
|
112
|
-
},
|
|
113
|
-
onPress: () => {
|
|
114
|
-
this.props.refreshList(this.props.data.value, this.props.data.reasonCode ? _ScannerUtils.SCAN_ACTIONS.CHANGE_STATUS : _ScannerUtils.SCAN_ACTIONS.DELETE);
|
|
115
|
-
}
|
|
116
|
-
}, 'Undo')));
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
const ScanList = props => {
|
|
122
|
-
const [reasonSelectionPage, showReasonSelectionPage] = (0, _react.useState)(false);
|
|
123
|
-
|
|
124
|
-
const renderItem = _ref => {
|
|
125
|
-
let {
|
|
126
|
-
item
|
|
127
|
-
} = _ref;
|
|
128
|
-
return /*#__PURE__*/_react.default.createElement(Item, {
|
|
129
|
-
data: item,
|
|
130
|
-
refreshList: props.filterList
|
|
131
|
-
});
|
|
132
|
-
};
|
|
133
|
-
|
|
134
|
-
const handleSubmit = async () => {
|
|
135
|
-
if (props.preSelectReasonCode && props.scans && props.scans.length > 0) {
|
|
136
|
-
if (props.scanList && props.scanList.length > 0) {
|
|
137
|
-
const totalScanned = (0, _ScannerUtils.getScannedItemCount)(props.scanList, _ScannerSchema.SCAN_STATUS.ACCEPTED) + (0, _ScannerUtils.getScannedItemCount)(props.scanList, _ScannerSchema.SCAN_STATUS.REJECTED);
|
|
138
|
-
|
|
139
|
-
if (totalScanned === props.scans.length) {
|
|
140
|
-
props.onSubmitET(props.scanList);
|
|
141
|
-
} else {
|
|
142
|
-
showReasonSelectionPage(true);
|
|
143
|
-
}
|
|
144
|
-
} else {
|
|
145
|
-
(0, _Toaster.showToast)('No shipments scanned!');
|
|
146
|
-
}
|
|
147
|
-
} else {
|
|
148
|
-
if (props.scanMode === 'SINGLE') {
|
|
149
|
-
if (props.scanList && props.scanList.length > 0) {
|
|
150
|
-
props.onSubmitET(await (0, _ScannerUtils.getScannerETOutput)(props.scanList));
|
|
151
|
-
} else {
|
|
152
|
-
(0, _Toaster.showToast)(`Nothing scanned yet`);
|
|
153
|
-
}
|
|
154
|
-
} else {
|
|
155
|
-
if (props.scanCountLimit && props.scanCountLimit > 0) {
|
|
156
|
-
if (props.scanList && props.scanList.length <= props.scanCountLimit) {
|
|
157
|
-
props.onSubmitET(await (0, _ScannerUtils.getScannerETOutput)(props.scanList));
|
|
158
|
-
} else {
|
|
159
|
-
(0, _Toaster.showToast)(`Max Scans count reached`);
|
|
160
|
-
}
|
|
161
|
-
} else {
|
|
162
|
-
if (props.scanList && props.scanList.length > 0) {
|
|
163
|
-
props.onSubmitET(await (0, _ScannerUtils.getScannerETOutput)(props.scanList));
|
|
164
|
-
} else {
|
|
165
|
-
(0, _Toaster.showToast)(`Nothing scanned yet`);
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
};
|
|
171
|
-
|
|
172
|
-
if (reasonSelectionPage) {
|
|
173
|
-
return /*#__PURE__*/_react.default.createElement(_RTReasonSelection.default, _extends({}, props, {
|
|
174
|
-
showReasonSelectionPage: showReasonSelectionPage
|
|
175
|
-
}));
|
|
176
|
-
} else return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
177
|
-
style: _CommonStyles.CommonStyles.mainContainer
|
|
178
|
-
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
179
|
-
style: {
|
|
180
|
-
flexDirection: 'row',
|
|
181
|
-
marginStart: 10,
|
|
182
|
-
marginEnd: 10,
|
|
183
|
-
marginTop: 10
|
|
184
|
-
}
|
|
185
|
-
}, /*#__PURE__*/_react.default.createElement(ItemStatus, {
|
|
186
|
-
status: 'Completed',
|
|
187
|
-
count: (0, _ScannerUtils.getScannedItemCount)(props.scanList, _ScannerSchema.SCAN_STATUS.ACCEPTED)
|
|
188
|
-
}), props.preSelectReasonCode && /*#__PURE__*/_react.default.createElement(ItemStatus, {
|
|
189
|
-
status: 'Rejected',
|
|
190
|
-
count: (0, _ScannerUtils.getScannedItemCount)(props.scanList, _ScannerSchema.SCAN_STATUS.REJECTED)
|
|
191
|
-
}), props.scans && props.scans.length >= 0 && /*#__PURE__*/_react.default.createElement(ItemStatus, {
|
|
192
|
-
status: 'To be scanned',
|
|
193
|
-
count: (0, _ScannerUtils.getScannedItemCount)(props.scanList, _ScannerSchema.SCAN_STATUS.TO_BE_SCANNED)
|
|
194
|
-
})), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
195
|
-
style: {
|
|
196
|
-
flex: 1
|
|
197
|
-
}
|
|
198
|
-
}, /*#__PURE__*/_react.default.createElement(_reactNative.FlatList, {
|
|
199
|
-
data: props.scanList,
|
|
200
|
-
renderItem: renderItem,
|
|
201
|
-
keyExtractor: item => item.value
|
|
202
|
-
})), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
203
|
-
style: {
|
|
204
|
-
justifyContent: 'flex-end',
|
|
205
|
-
marginStart: 10,
|
|
206
|
-
marginEnd: 10,
|
|
207
|
-
marginBottom: 10
|
|
208
|
-
}
|
|
209
|
-
}, /*#__PURE__*/_react.default.createElement(_reactNative.Text, null, `${(0, _ScannerUtils.getScannedItemCount)(props.scanList, _ScannerSchema.SCAN_STATUS.REJECTED) + (0, _ScannerUtils.getScannedItemCount)(props.scanList, _ScannerSchema.SCAN_STATUS.ACCEPTED)} shipments scanned. If you have more please continue scanning.`), /*#__PURE__*/_react.default.createElement(_reactNativePaper.Button, {
|
|
210
|
-
onPress: async () => {
|
|
211
|
-
await handleSubmit();
|
|
212
|
-
},
|
|
213
|
-
style: [_CommonStyles.CommonStyles.nextButton, {
|
|
214
|
-
marginTop: 10
|
|
215
|
-
}],
|
|
216
|
-
labelStyle: _CommonStyles.CommonStyles.nextButtonLabel
|
|
217
|
-
}, 'Complete Scan')));
|
|
218
|
-
};
|
|
219
|
-
|
|
220
|
-
var _default = ScanList;
|
|
221
|
-
exports.default = _default;
|
|
222
|
-
|
|
223
|
-
const styles = _reactNative.StyleSheet.create({
|
|
224
|
-
rowItem: {
|
|
225
|
-
padding: 14,
|
|
226
|
-
flexDirection: 'row',
|
|
227
|
-
backgroundColor: '#ffffff',
|
|
228
|
-
alignItems: 'center',
|
|
229
|
-
marginTop: 10,
|
|
230
|
-
marginStart: 10,
|
|
231
|
-
marginEnd: 10
|
|
232
|
-
},
|
|
233
|
-
text1: {
|
|
234
|
-
fontFamily: _CommonStyles.Fonts.IBMPlexSans_400Regular,
|
|
235
|
-
fontSize: 18,
|
|
236
|
-
textAlign: 'center'
|
|
237
|
-
},
|
|
238
|
-
text2: {
|
|
239
|
-
fontFamily: _CommonStyles.Fonts.IBMPlexSans_600SemiBold,
|
|
240
|
-
fontSize: 18,
|
|
241
|
-
textAlign: 'center'
|
|
242
|
-
},
|
|
243
|
-
itemStatus: {},
|
|
244
|
-
itemStatusView: {
|
|
245
|
-
backgroundColor: '#ffffff',
|
|
246
|
-
flex: 1,
|
|
247
|
-
justifyContent: 'center',
|
|
248
|
-
alignItems: 'center',
|
|
249
|
-
padding: 8,
|
|
250
|
-
borderRightWidth: 0.6,
|
|
251
|
-
borderRightColor: '#E4E4E4'
|
|
252
|
-
},
|
|
253
|
-
wbnStatusView: {
|
|
254
|
-
flexDirection: 'row',
|
|
255
|
-
paddingEnd: 6,
|
|
256
|
-
paddingStart: 6,
|
|
257
|
-
paddingTop: 3,
|
|
258
|
-
paddingBottom: 3,
|
|
259
|
-
borderRadius: 10,
|
|
260
|
-
alignItems: 'center',
|
|
261
|
-
justifyContent: 'center'
|
|
262
|
-
},
|
|
263
|
-
topContainer: {
|
|
264
|
-
flexDirection: 'row',
|
|
265
|
-
marginStart: 10,
|
|
266
|
-
marginEnd: 10,
|
|
267
|
-
marginTop: 10
|
|
268
|
-
},
|
|
269
|
-
bottomContainer: {
|
|
270
|
-
justifyContent: 'flex-end',
|
|
271
|
-
marginStart: 10,
|
|
272
|
-
marginEnd: 10,
|
|
273
|
-
marginBottom: 10
|
|
274
|
-
}
|
|
275
|
-
});
|
|
276
|
-
//# sourceMappingURL=ScanList.js.map
|