@os1-platform/dispatch-mobile 2.1.0 → 2.1.2
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/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +5 -0
- package/android/gradlew +185 -0
- package/android/gradlew.bat +89 -0
- package/lib/commonjs/components/dispatch/DispatchExecNavigator.js +4 -3
- package/lib/commonjs/components/dispatch/DispatchExecNavigator.js.map +1 -1
- package/lib/commonjs/components/executiontasks/cancellation/CancelET.js +8 -13
- package/lib/commonjs/components/executiontasks/cancellation/CancelET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js +4 -3
- package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js.map +1 -1
- package/lib/commonjs/components/executiontasks/deliver/DeliverET.js +4 -3
- 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 +24 -102
- package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/display/DisplayModalET.js +8 -7
- package/lib/commonjs/components/executiontasks/display/DisplayModalET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/doodle/SignatureET.js +13 -36
- package/lib/commonjs/components/executiontasks/doodle/SignatureET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/dropCash/DropCashET.js +4 -3
- package/lib/commonjs/components/executiontasks/dropCash/DropCashET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js +7 -6
- package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/FormGenerator.js +6 -5
- package/lib/commonjs/components/executiontasks/forms/FormGenerator.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/DateTimeWidget.js +5 -4
- package/lib/commonjs/components/executiontasks/forms/widgets/DateTimeWidget.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/DropdownWidget.js +4 -3
- package/lib/commonjs/components/executiontasks/forms/widgets/DropdownWidget.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js +4 -3
- package/lib/commonjs/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/TimeRangeSelector.js +4 -3
- package/lib/commonjs/components/executiontasks/forms/widgets/TimeRangeSelector.js.map +1 -1
- package/lib/commonjs/components/executiontasks/httpRequest/HttpRequestET.js +4 -3
- package/lib/commonjs/components/executiontasks/httpRequest/HttpRequestET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js +22 -136
- package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js +8 -8
- package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/PaymentStyles.js +7 -6
- package/lib/commonjs/components/executiontasks/payments/PaymentStyles.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js +6 -5
- package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js +4 -3
- package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js +4 -3
- package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/pickup/PickupET.js +4 -3
- package/lib/commonjs/components/executiontasks/pickup/PickupET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js +15 -85
- package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/ScanET.js +15 -14
- package/lib/commonjs/components/executiontasks/scan/ScanET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/ScanSchema.js +2 -1
- package/lib/commonjs/components/executiontasks/scan/ScanSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/constants.js +12 -6
- package/lib/commonjs/components/executiontasks/scan/constants.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/interfaces.js +8 -4
- package/lib/commonjs/components/executiontasks/scan/interfaces.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/sub_components/CScanner.js +5 -4
- package/lib/commonjs/components/executiontasks/scan/sub_components/CScanner.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/sub_components/ERDropDown.js +6 -5
- package/lib/commonjs/components/executiontasks/scan/sub_components/ERDropDown.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/sub_components/SummaryPage.js +9 -8
- package/lib/commonjs/components/executiontasks/scan/sub_components/SummaryPage.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/utils.js +2 -2
- package/lib/commonjs/components/executiontasks/scan/utils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPET.js +9 -8
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPSchema.js +2 -1
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/validateOTP/constants.js +12 -6
- package/lib/commonjs/components/executiontasks/validateOTP/constants.js.map +1 -1
- package/lib/commonjs/components/executiontasks/validateOTP/sub-components/OTPInput.js +6 -5
- package/lib/commonjs/components/executiontasks/validateOTP/sub-components/OTPInput.js.map +1 -1
- package/lib/commonjs/components/executiontasks/validateOTP/utils.js +2 -2
- package/lib/commonjs/components/executiontasks/validateOTP/utils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/verifyLocation/GeofenceUtils.js +2 -2
- package/lib/commonjs/components/executiontasks/verifyLocation/GeofenceUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/verifyLocation/VerifyLocationET.js +4 -3
- package/lib/commonjs/components/executiontasks/verifyLocation/VerifyLocationET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpET.js +4 -3
- package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpET.js.map +1 -1
- package/lib/commonjs/components/widgets/AlertDisplay.js +9 -14
- package/lib/commonjs/components/widgets/AlertDisplay.js.map +1 -1
- package/lib/commonjs/components/widgets/CancelOrderDialog.js +6 -5
- package/lib/commonjs/components/widgets/CancelOrderDialog.js.map +1 -1
- package/lib/commonjs/components/widgets/Card.js +3 -2
- package/lib/commonjs/components/widgets/Card.js.map +1 -1
- package/lib/commonjs/components/widgets/GoBackModal.js +2 -1
- package/lib/commonjs/components/widgets/GoBackModal.js.map +1 -1
- package/lib/commonjs/components/widgets/IconButton.js +2 -1
- package/lib/commonjs/components/widgets/IconButton.js.map +1 -1
- package/lib/commonjs/components/widgets/ModalWidget.js +4 -3
- package/lib/commonjs/components/widgets/ModalWidget.js.map +1 -1
- package/lib/commonjs/components/widgets/ProgressDialog.js +3 -2
- package/lib/commonjs/components/widgets/ProgressDialog.js.map +1 -1
- package/lib/commonjs/components/widgets/SearchBar.js +2 -1
- package/lib/commonjs/components/widgets/SearchBar.js.map +1 -1
- package/lib/commonjs/components/widgets/SnackBarCustom.js +5 -3
- package/lib/commonjs/components/widgets/SnackBarCustom.js.map +1 -1
- package/lib/commonjs/components/widgets/SplitTextInput.js +4 -3
- package/lib/commonjs/components/widgets/SplitTextInput.js.map +1 -1
- package/lib/commonjs/components/widgets/TabsComponent.js +4 -3
- package/lib/commonjs/components/widgets/TabsComponent.js.map +1 -1
- package/lib/commonjs/config/DispatchSDKConfig.js +2 -1
- package/lib/commonjs/config/DispatchSDKConfig.js.map +1 -1
- package/lib/commonjs/constants/apiConstants.js +4 -2
- package/lib/commonjs/constants/apiConstants.js.map +1 -1
- package/lib/commonjs/constants/constants.js +22 -11
- package/lib/commonjs/constants/constants.js.map +1 -1
- package/lib/commonjs/constants/statuscode.js +2 -1
- package/lib/commonjs/constants/statuscode.js.map +1 -1
- package/lib/commonjs/errors/ErrorCodes.js +14 -7
- package/lib/commonjs/errors/ErrorCodes.js.map +1 -1
- package/lib/commonjs/events/EventDispatcher.js +3 -5
- package/lib/commonjs/events/EventDispatcher.js.map +1 -1
- package/lib/commonjs/events/EventListener.js +2 -1
- package/lib/commonjs/events/EventListener.js.map +1 -1
- package/lib/commonjs/events/constants.js +2 -1
- package/lib/commonjs/events/constants.js.map +1 -1
- package/lib/commonjs/events/index.js +2 -1
- package/lib/commonjs/events/index.js.map +1 -1
- package/lib/commonjs/icons/ScanIcon.js +2 -1
- package/lib/commonjs/icons/ScanIcon.js.map +1 -1
- package/lib/commonjs/icons/file.js +2 -1
- package/lib/commonjs/icons/file.js.map +1 -1
- package/lib/commonjs/index.js +2 -8
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/manager/dispatch/DispatchStateContainer.js +3 -5
- package/lib/commonjs/manager/dispatch/DispatchStateContainer.js.map +1 -1
- package/lib/commonjs/manager/dispatchCodes/EventCodeContainer.js +0 -2
- package/lib/commonjs/manager/dispatchCodes/EventCodeContainer.js.map +1 -1
- package/lib/commonjs/manager/dispatchCodes/EventCodeRepo.js +2 -4
- package/lib/commonjs/manager/dispatchCodes/EventCodeRepo.js.map +1 -1
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeContainer.js +2 -4
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeContainer.js.map +1 -1
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeRepo.js +2 -4
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeRepo.js.map +1 -1
- package/lib/commonjs/manager/location/LocationManager.js +4 -7
- package/lib/commonjs/manager/location/LocationManager.js.map +1 -1
- package/lib/commonjs/manager/sdk/DispatchSDKManager.js +2 -4
- package/lib/commonjs/manager/sdk/DispatchSDKManager.js.map +1 -1
- package/lib/commonjs/manager/sdk/DispatchSdkCache.js +0 -2
- package/lib/commonjs/manager/sdk/DispatchSdkCache.js.map +1 -1
- package/lib/commonjs/manager/sdk/callbacksHandler.js +2 -1
- package/lib/commonjs/manager/sdk/callbacksHandler.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/AppSyncManager.js +2 -4
- package/lib/commonjs/manager/syncmanager/AppSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/DBConfig.js +26 -14
- package/lib/commonjs/manager/syncmanager/DBConfig.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/NativeSyncManager.js +2 -1
- package/lib/commonjs/manager/syncmanager/NativeSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/constants.js +10 -5
- package/lib/commonjs/manager/syncmanager/constants.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/database.js +2 -2
- package/lib/commonjs/manager/syncmanager/database.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js +4 -5
- package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentManager.js +2 -4
- package/lib/commonjs/manager/syncmanager/document/DocumentManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js +2 -4
- package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/events/ETEventsManager.js +2 -4
- package/lib/commonjs/manager/syncmanager/events/ETEventsManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/events/EventsSyncManager.js +2 -4
- package/lib/commonjs/manager/syncmanager/events/EventsSyncManager.js.map +1 -1
- package/lib/commonjs/models/DispatchModels.js +2 -1
- package/lib/commonjs/models/DispatchModels.js.map +1 -1
- package/lib/commonjs/models/execTasks/ETConfig.js +12 -6
- package/lib/commonjs/models/execTasks/ETConfig.js.map +1 -1
- package/lib/commonjs/models/fcm.js.map +1 -1
- package/lib/commonjs/models/sdk.js +2 -1
- package/lib/commonjs/models/sdk.js.map +1 -1
- package/lib/commonjs/native/signature/SignatureCapture.js +2 -1
- package/lib/commonjs/native/signature/SignatureCapture.js.map +1 -1
- package/lib/commonjs/network/GraphQLClient.js +4 -48
- package/lib/commonjs/network/GraphQLClient.js.map +1 -1
- package/lib/commonjs/network/Queries.js +10 -5
- package/lib/commonjs/network/Queries.js.map +1 -1
- package/lib/commonjs/res/strings.js +2 -1
- package/lib/commonjs/res/strings.js.map +1 -1
- package/lib/commonjs/resources/Login.js +2 -1
- package/lib/commonjs/resources/Login.js.map +1 -1
- package/lib/commonjs/resources/network.js +2 -1
- package/lib/commonjs/resources/network.js.map +1 -1
- package/lib/commonjs/styles/SdkColors.js +4 -2
- package/lib/commonjs/styles/SdkColors.js.map +1 -1
- package/lib/commonjs/styles/executionTasks/CommonStyles.js +10 -6
- package/lib/commonjs/styles/executionTasks/CommonStyles.js.map +1 -1
- package/lib/commonjs/ui/screens/CancellationScreen.js +4 -3
- package/lib/commonjs/ui/screens/CancellationScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/CaptureInputScreen.js +5 -5
- package/lib/commonjs/ui/screens/CaptureInputScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/CompleteObjectiveScreen.js +4 -3
- package/lib/commonjs/ui/screens/CompleteObjectiveScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DeliverScreen.js +5 -9
- package/lib/commonjs/ui/screens/DeliverScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DisplayScreen.js +4 -3
- package/lib/commonjs/ui/screens/DisplayScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DoodleScreen.js +5 -5
- package/lib/commonjs/ui/screens/DoodleScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DropCashScreen.js +5 -5
- package/lib/commonjs/ui/screens/DropCashScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FormsScreen.js +4 -3
- package/lib/commonjs/ui/screens/FormsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/GeofenceScreen.js +4 -3
- package/lib/commonjs/ui/screens/GeofenceScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HttpRequestScreen.js +2 -1
- package/lib/commonjs/ui/screens/HttpRequestScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ImageCaptureScreen.js +4 -3
- package/lib/commonjs/ui/screens/ImageCaptureScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PaymentScreen.js +6 -6
- package/lib/commonjs/ui/screens/PaymentScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PickupScreen.js +5 -4
- package/lib/commonjs/ui/screens/PickupScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ScanScreen.js +4 -3
- package/lib/commonjs/ui/screens/ScanScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/StartWorkFlowScreen.js +7 -8
- package/lib/commonjs/ui/screens/StartWorkFlowScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ValidateOTPScreen.js +4 -3
- package/lib/commonjs/ui/screens/ValidateOTPScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/WithBaseDispatchScreen.js +4 -4
- package/lib/commonjs/ui/screens/WithBaseDispatchScreen.js.map +1 -1
- package/lib/commonjs/ui/uiConfig/RouteParams.js +2 -1
- package/lib/commonjs/ui/uiConfig/RouteParams.js.map +1 -1
- package/lib/commonjs/utils/ApiUtils.js +4 -2
- package/lib/commonjs/utils/ApiUtils.js.map +1 -1
- package/lib/commonjs/utils/Logger.js +9 -10
- package/lib/commonjs/utils/Logger.js.map +1 -1
- package/lib/commonjs/utils/NetworkUtil.js +2 -1
- package/lib/commonjs/utils/NetworkUtil.js.map +1 -1
- package/lib/commonjs/utils/SdkUtils.js +8 -12
- package/lib/commonjs/utils/SdkUtils.js.map +1 -1
- package/lib/commonjs/utils/SyncManagerUtils.js +2 -2
- package/lib/commonjs/utils/SyncManagerUtils.js.map +1 -1
- package/lib/commonjs/utils/fcm/FCM.js +4 -3
- package/lib/commonjs/utils/fcm/FCM.js.map +1 -1
- package/lib/commonjs/utils/fcm/FcmUtils.js +2 -14
- package/lib/commonjs/utils/fcm/FcmUtils.js.map +1 -1
- package/lib/commonjs/utils/helper.js +2 -1
- package/lib/commonjs/utils/helper.js.map +1 -1
- package/lib/commonjs/utils/hooks/useModal.js +4 -3
- package/lib/commonjs/utils/hooks/useModal.js.map +1 -1
- package/lib/commonjs/utils/hooks/useTimer.js +2 -1
- package/lib/commonjs/utils/hooks/useTimer.js.map +1 -1
- package/lib/commonjs/utils/loginHelper.js +2 -1
- package/lib/commonjs/utils/loginHelper.js.map +1 -1
- package/lib/commonjs/utils/storage.js +13 -71
- package/lib/commonjs/utils/storage.js.map +1 -1
- package/lib/module/components/dispatch/DispatchExecNavigator.js.map +1 -1
- package/lib/module/components/executiontasks/cancellation/CancelET.js +5 -11
- package/lib/module/components/executiontasks/cancellation/CancelET.js.map +1 -1
- package/lib/module/components/executiontasks/deliver/DeliverETInput.js.map +1 -1
- package/lib/module/components/executiontasks/deliver/SLDeliverET.js +22 -102
- package/lib/module/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
- package/lib/module/components/executiontasks/display/DisplayModalET.js +5 -5
- package/lib/module/components/executiontasks/display/DisplayModalET.js.map +1 -1
- package/lib/module/components/executiontasks/doodle/SignatureET.js +10 -34
- package/lib/module/components/executiontasks/doodle/SignatureET.js.map +1 -1
- package/lib/module/components/executiontasks/dropCash/SLDropCash.js +4 -4
- package/lib/module/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
- package/lib/module/components/executiontasks/forms/FormGenerator.js +3 -3
- package/lib/module/components/executiontasks/forms/FormGenerator.js.map +1 -1
- package/lib/module/components/executiontasks/forms/widgets/DateTimeWidget.js +1 -1
- package/lib/module/components/executiontasks/forms/widgets/DateTimeWidget.js.map +1 -1
- package/lib/module/components/executiontasks/imageCapture/CaptureUtils.js +18 -131
- package/lib/module/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
- package/lib/module/components/executiontasks/imageCapture/ImageCapture.js +3 -3
- package/lib/module/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
- package/lib/module/components/executiontasks/payments/PaymentStyles.js +6 -6
- package/lib/module/components/executiontasks/payments/PaymentStyles.js.map +1 -1
- package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentET.js +3 -3
- package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
- package/lib/module/components/executiontasks/pickup/SLPickupET.js +14 -85
- package/lib/module/components/executiontasks/pickup/SLPickupET.js.map +1 -1
- package/lib/module/components/executiontasks/scan/ScanET.js +12 -12
- package/lib/module/components/executiontasks/scan/ScanET.js.map +1 -1
- package/lib/module/components/executiontasks/scan/sub_components/CScanner.js +2 -2
- package/lib/module/components/executiontasks/scan/sub_components/CScanner.js.map +1 -1
- package/lib/module/components/executiontasks/scan/sub_components/ERDropDown.js +3 -3
- package/lib/module/components/executiontasks/scan/sub_components/ERDropDown.js.map +1 -1
- package/lib/module/components/executiontasks/scan/sub_components/SummaryPage.js +6 -6
- package/lib/module/components/executiontasks/scan/sub_components/SummaryPage.js.map +1 -1
- package/lib/module/components/executiontasks/scan/utils.js.map +1 -1
- package/lib/module/components/executiontasks/validateOTP/ValidateOTPET.js +6 -6
- package/lib/module/components/executiontasks/validateOTP/ValidateOTPET.js.map +1 -1
- package/lib/module/components/executiontasks/validateOTP/sub-components/OTPInput.js +3 -3
- package/lib/module/components/executiontasks/validateOTP/sub-components/OTPInput.js.map +1 -1
- package/lib/module/components/widgets/AlertDisplay.js +7 -12
- package/lib/module/components/widgets/AlertDisplay.js.map +1 -1
- package/lib/module/components/widgets/CancelOrderDialog.js +3 -3
- package/lib/module/components/widgets/CancelOrderDialog.js.map +1 -1
- package/lib/module/components/widgets/Card.js +1 -1
- package/lib/module/components/widgets/Card.js.map +1 -1
- package/lib/module/components/widgets/ModalWidget.js +3 -3
- package/lib/module/components/widgets/ModalWidget.js.map +1 -1
- package/lib/module/components/widgets/ProgressDialog.js +2 -2
- package/lib/module/components/widgets/ProgressDialog.js.map +1 -1
- package/lib/module/components/widgets/SnackBarCustom.js +2 -2
- package/lib/module/components/widgets/SnackBarCustom.js.map +1 -1
- package/lib/module/events/EventDispatcher.js +2 -5
- package/lib/module/events/EventDispatcher.js.map +1 -1
- package/lib/module/index.js +2 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/manager/dispatch/DispatchStateContainer.js +1 -3
- package/lib/module/manager/dispatch/DispatchStateContainer.js.map +1 -1
- package/lib/module/manager/dispatchCodes/EventCodeContainer.js +0 -2
- package/lib/module/manager/dispatchCodes/EventCodeContainer.js.map +1 -1
- package/lib/module/manager/dispatchCodes/EventCodeRepo.js +0 -2
- package/lib/module/manager/dispatchCodes/EventCodeRepo.js.map +1 -1
- package/lib/module/manager/dispatchCodes/ReasonCodeContainer.js +0 -2
- package/lib/module/manager/dispatchCodes/ReasonCodeContainer.js.map +1 -1
- package/lib/module/manager/dispatchCodes/ReasonCodeRepo.js +0 -2
- package/lib/module/manager/dispatchCodes/ReasonCodeRepo.js.map +1 -1
- package/lib/module/manager/location/LocationManager.js +0 -2
- package/lib/module/manager/location/LocationManager.js.map +1 -1
- package/lib/module/manager/sdk/DispatchSDKManager.js +0 -2
- package/lib/module/manager/sdk/DispatchSDKManager.js.map +1 -1
- package/lib/module/manager/sdk/DispatchSdkCache.js +0 -2
- package/lib/module/manager/sdk/DispatchSdkCache.js.map +1 -1
- package/lib/module/manager/syncmanager/AppSyncManager.js +0 -2
- package/lib/module/manager/syncmanager/AppSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/DBConfig.js +1 -1
- package/lib/module/manager/syncmanager/DBConfig.js.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentManager.js +0 -2
- package/lib/module/manager/syncmanager/document/DocumentManager.js.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentSyncManager.js +0 -2
- package/lib/module/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/events/ETEventsManager.js +0 -2
- package/lib/module/manager/syncmanager/events/ETEventsManager.js.map +1 -1
- package/lib/module/manager/syncmanager/events/EventsSyncManager.js +0 -2
- package/lib/module/manager/syncmanager/events/EventsSyncManager.js.map +1 -1
- package/lib/module/models/fcm.js.map +1 -1
- package/lib/module/network/GraphQLClient.js +3 -48
- package/lib/module/network/GraphQLClient.js.map +1 -1
- package/lib/module/ui/screens/CaptureInputScreen.js +1 -2
- package/lib/module/ui/screens/CaptureInputScreen.js.map +1 -1
- package/lib/module/ui/screens/DeliverScreen.js +1 -6
- package/lib/module/ui/screens/DeliverScreen.js.map +1 -1
- package/lib/module/ui/screens/DoodleScreen.js +1 -2
- package/lib/module/ui/screens/DoodleScreen.js.map +1 -1
- package/lib/module/ui/screens/DropCashScreen.js +2 -2
- package/lib/module/ui/screens/DropCashScreen.js.map +1 -1
- package/lib/module/ui/screens/PaymentScreen.js +2 -3
- package/lib/module/ui/screens/PaymentScreen.js.map +1 -1
- package/lib/module/ui/screens/PickupScreen.js +1 -1
- package/lib/module/ui/screens/PickupScreen.js.map +1 -1
- package/lib/module/ui/screens/StartWorkFlowScreen.js +4 -6
- package/lib/module/ui/screens/StartWorkFlowScreen.js.map +1 -1
- package/lib/module/ui/screens/WithBaseDispatchScreen.js +0 -1
- package/lib/module/ui/screens/WithBaseDispatchScreen.js.map +1 -1
- package/lib/module/utils/Logger.js +0 -2
- package/lib/module/utils/Logger.js.map +1 -1
- package/lib/module/utils/SdkUtils.js +7 -11
- package/lib/module/utils/SdkUtils.js.map +1 -1
- package/lib/module/utils/fcm/FcmUtils.js +0 -11
- package/lib/module/utils/fcm/FcmUtils.js.map +1 -1
- package/lib/module/utils/storage.js +10 -69
- package/lib/module/utils/storage.js.map +1 -1
- package/lib/typescript/components/executiontasks/deliver/DeliverETInput.d.ts +0 -3
- package/lib/typescript/components/executiontasks/payments/PaymentStyles.d.ts +5 -4
- package/lib/typescript/components/widgets/SnackBarCustom.d.ts +1 -1
- package/lib/typescript/index.d.ts +2 -2
- package/lib/typescript/manager/syncmanager/DBConfig.d.ts +1 -1
- package/lib/typescript/models/fcm.d.ts +0 -3
- package/lib/typescript/utils/fcm/FcmUtils.d.ts +1 -2
- package/lib/typescript/utils/storage.d.ts +2 -3
- package/package.json +8 -25
- package/dispatch-mobile.podspec +0 -35
- package/ios/DispatchSdk-Bridging-Header.h +0 -3
- package/ios/DispatchSdk.m +0 -9
- package/ios/DispatchSdk.swift +0 -8
- package/ios/DispatchSdk.xcodeproj/project.pbxproj +0 -317
- package/ios/EventEmitter.swift +0 -21
- package/ios/EventsConstant.swift +0 -13
- package/ios/RNEventEmitter.m +0 -15
- package/ios/RNEventEmitter.swift +0 -24
- package/lib/commonjs/icons/circleMark.svg +0 -3
- package/lib/commonjs/locale/Str.js +0 -18
- package/lib/commonjs/locale/Str.js.map +0 -1
- package/lib/commonjs/locale/en.json +0 -6
- package/lib/commonjs/locale/i18n.js +0 -24
- package/lib/commonjs/locale/i18n.js.map +0 -1
- package/lib/commonjs/locale/util.js +0 -27
- package/lib/commonjs/locale/util.js.map +0 -1
- package/lib/module/icons/circleMark.svg +0 -3
- package/lib/module/locale/Str.js +0 -12
- package/lib/module/locale/Str.js.map +0 -1
- package/lib/module/locale/en.json +0 -6
- package/lib/module/locale/i18n.js +0 -17
- package/lib/module/locale/i18n.js.map +0 -1
- package/lib/module/locale/util.js +0 -18
- package/lib/module/locale/util.js.map +0 -1
- package/lib/typescript/locale/Str.d.ts +0 -10
- package/lib/typescript/locale/i18n.d.ts +0 -3
- package/lib/typescript/locale/util.d.ts +0 -2
- package/src/@types/assets/index.d.ts +0 -6
- package/src/components/dispatch/DispatchExecNavigator.tsx +0 -273
- package/src/components/executiontasks/CompletedWFSchema.ts +0 -24
- package/src/components/executiontasks/ExecutionTasksIndex.ts +0 -137
- package/src/components/executiontasks/cancellation/CancelET.tsx +0 -281
- package/src/components/executiontasks/cancellation/CancellationSchema.ts +0 -30
- package/src/components/executiontasks/captureInput/CaptureInputSchema.ts +0 -52
- package/src/components/executiontasks/captureInput/CaptureText.tsx +0 -172
- package/src/components/executiontasks/captureInput/utils.ts +0 -9
- package/src/components/executiontasks/deliver/DeliverET.tsx +0 -124
- package/src/components/executiontasks/deliver/DeliverETInput.ts +0 -50
- package/src/components/executiontasks/deliver/SLDeliverET.tsx +0 -512
- package/src/components/executiontasks/display/DisplayModalET.tsx +0 -174
- package/src/components/executiontasks/display/DisplaySchema.ts +0 -29
- package/src/components/executiontasks/doodle/SignatureET.tsx +0 -320
- package/src/components/executiontasks/doodle/SignatureSchema.ts +0 -51
- package/src/components/executiontasks/dropCash/DropCashET.tsx +0 -145
- package/src/components/executiontasks/dropCash/DropCashSchema.ts +0 -22
- package/src/components/executiontasks/dropCash/SLDropCash.tsx +0 -286
- package/src/components/executiontasks/forms/FormGenerator.tsx +0 -282
- package/src/components/executiontasks/forms/FormSchema.ts +0 -29
- package/src/components/executiontasks/forms/widgets/DateTimeWidget.tsx +0 -144
- package/src/components/executiontasks/forms/widgets/DropdownWidget.tsx +0 -52
- package/src/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.tsx +0 -158
- package/src/components/executiontasks/forms/widgets/TimeRangeSelector.tsx +0 -38
- package/src/components/executiontasks/httpRequest/HttpEtUtils.ts +0 -49
- package/src/components/executiontasks/httpRequest/HttpRequestET.tsx +0 -59
- package/src/components/executiontasks/httpRequest/HttpRequestETSchema.ts +0 -42
- package/src/components/executiontasks/imageCapture/CaptureSchema.ts +0 -93
- package/src/components/executiontasks/imageCapture/CaptureUtils.ts +0 -326
- package/src/components/executiontasks/imageCapture/ImageCapture.tsx +0 -363
- package/src/components/executiontasks/payments/PaymentStyles.ts +0 -93
- package/src/components/executiontasks/payments/PaymentUtils.ts +0 -7
- package/src/components/executiontasks/payments/completePayment/CompletePaymentET.tsx +0 -237
- package/src/components/executiontasks/payments/completePayment/CompletePaymentSchema.ts +0 -23
- package/src/components/executiontasks/payments/init/InitPaymentET.tsx +0 -247
- package/src/components/executiontasks/payments/init/InitPaymentSchema.ts +0 -37
- package/src/components/executiontasks/payments/processPayment/ProcessPaymentET.tsx +0 -272
- package/src/components/executiontasks/payments/processPayment/ProcessPaymentSchema.ts +0 -38
- package/src/components/executiontasks/pickup/PickpSchema.ts +0 -28
- package/src/components/executiontasks/pickup/PickupET.tsx +0 -126
- package/src/components/executiontasks/pickup/SLPickupET.tsx +0 -367
- package/src/components/executiontasks/scan/ScanET.tsx +0 -1059
- package/src/components/executiontasks/scan/ScanSchema.ts +0 -121
- package/src/components/executiontasks/scan/constants.ts +0 -6
- package/src/components/executiontasks/scan/interfaces.ts +0 -109
- package/src/components/executiontasks/scan/modalConstant.ts +0 -120
- package/src/components/executiontasks/scan/sub_components/CScanner.tsx +0 -107
- package/src/components/executiontasks/scan/sub_components/DropDownUtils.ts +0 -119
- package/src/components/executiontasks/scan/sub_components/ERDropDown.tsx +0 -134
- package/src/components/executiontasks/scan/sub_components/SummaryPage.tsx +0 -1296
- package/src/components/executiontasks/scan/utils.ts +0 -1108
- package/src/components/executiontasks/validateOTP/ValidateOTPET.tsx +0 -436
- package/src/components/executiontasks/validateOTP/ValidateOTPSchema.ts +0 -68
- package/src/components/executiontasks/validateOTP/constants.ts +0 -24
- package/src/components/executiontasks/validateOTP/sub-components/OTPInput.tsx +0 -83
- package/src/components/executiontasks/validateOTP/utils.ts +0 -180
- package/src/components/executiontasks/verifyInput/VerifyInputSchema.ts +0 -49
- package/src/components/executiontasks/verifyLocation/GeofenceUtils.ts +0 -55
- package/src/components/executiontasks/verifyLocation/VerifyLocSchema.ts +0 -56
- package/src/components/executiontasks/verifyLocation/VerifyLocationET.tsx +0 -69
- package/src/components/executiontasks/verifyOtp/VerifyOtpET.tsx +0 -96
- package/src/components/executiontasks/verifyOtp/VerifyOtpSchema.ts +0 -27
- package/src/components/utils/index.ts +0 -18
- package/src/components/widgets/AlertDisplay.tsx +0 -38
- package/src/components/widgets/CancelOrderDialog.tsx +0 -112
- package/src/components/widgets/Card.tsx +0 -99
- package/src/components/widgets/GoBackModal.tsx +0 -49
- package/src/components/widgets/IconButton.tsx +0 -32
- package/src/components/widgets/ModalWidget.tsx +0 -157
- package/src/components/widgets/ProgressDialog.tsx +0 -54
- package/src/components/widgets/SearchBar.tsx +0 -71
- package/src/components/widgets/SnackBarCustom.tsx +0 -212
- package/src/components/widgets/SplitTextInput.tsx +0 -116
- package/src/components/widgets/TabsComponent.tsx +0 -84
- package/src/components/widgets/Toaster.ts +0 -8
- package/src/config/DispatchSDKConfig.ts +0 -4
- package/src/constants/apiConstants.ts +0 -11
- package/src/constants/constants.ts +0 -12
- package/src/constants/statuscode.ts +0 -8
- package/src/errors/BaseError.ts +0 -16
- package/src/errors/ErrorCodes.ts +0 -38
- package/src/events/EventDispatcher.ts +0 -22
- package/src/events/EventListener.ts +0 -14
- package/src/events/constants.ts +0 -7
- package/src/events/index.ts +0 -3
- package/src/events/interface.ts +0 -1
- package/src/icons/ScanIcon.tsx +0 -24
- package/src/icons/circleMark.svg +0 -3
- package/src/icons/file.tsx +0 -24
- package/src/icons/interface.ts +0 -5
- package/src/index.tsx +0 -80
- package/src/locale/Str.ts +0 -12
- package/src/locale/en.json +0 -6
- package/src/locale/i18n.ts +0 -17
- package/src/locale/util.ts +0 -20
- package/src/manager/dispatch/DispatchStateContainer.tsx +0 -842
- package/src/manager/dispatchCodes/EventCodeContainer.ts +0 -75
- package/src/manager/dispatchCodes/EventCodeRepo.ts +0 -82
- package/src/manager/dispatchCodes/ReasonCodeContainer.ts +0 -121
- package/src/manager/dispatchCodes/ReasonCodeRepo.ts +0 -90
- package/src/manager/dispatchCodes/reasonCodes.json +0 -137
- package/src/manager/jobRemoval/JobRemovalManager.ts +0 -21
- package/src/manager/location/LocationManager.ts +0 -77
- package/src/manager/sdk/DispatchSDKManager.ts +0 -99
- package/src/manager/sdk/DispatchSdkCache.ts +0 -47
- package/src/manager/sdk/callbacksHandler.ts +0 -25
- package/src/manager/syncmanager/AppSyncManager.ts +0 -187
- package/src/manager/syncmanager/DBConfig.ts +0 -180
- package/src/manager/syncmanager/NativeSyncManager.ts +0 -14
- package/src/manager/syncmanager/constants.ts +0 -5
- package/src/manager/syncmanager/database.ts +0 -93
- package/src/manager/syncmanager/document/DocumentHttpClient.ts +0 -111
- package/src/manager/syncmanager/document/DocumentManager.ts +0 -143
- package/src/manager/syncmanager/document/DocumentSyncManager.ts +0 -233
- package/src/manager/syncmanager/document/models.ts +0 -4
- package/src/manager/syncmanager/events/ETEventsManager.ts +0 -633
- package/src/manager/syncmanager/events/EventsGraphQLClient.ts +0 -0
- package/src/manager/syncmanager/events/EventsSyncManager.ts +0 -490
- package/src/manager/syncmanager/events/SyncHttpClient.ts +0 -202
- package/src/models/DispatchModels.ts +0 -97
- package/src/models/ReasonCodes.ts +0 -12
- package/src/models/auth.ts +0 -43
- package/src/models/execTasks/ETBaseModels.ts +0 -113
- package/src/models/execTasks/ETConfig.ts +0 -94
- package/src/models/execution.ts +0 -9
- package/src/models/fcm.ts +0 -6
- package/src/models/sdk.ts +0 -35
- package/src/native/signature/SignatureCapture.tsx +0 -110
- package/src/network/GraphQLClient.ts +0 -147
- package/src/network/NetworkClient.ts +0 -58
- package/src/network/NetworkUtils.ts +0 -41
- package/src/network/Queries.ts +0 -46
- package/src/network/client.ts +0 -61
- package/src/res/strings.ts +0 -1
- package/src/resources/Login.ts +0 -36
- package/src/resources/network.ts +0 -13
- package/src/styles/SdkColors.ts +0 -24
- package/src/styles/executionTasks/CommonStyles.ts +0 -188
- package/src/ui/screens/CancellationScreen.tsx +0 -144
- package/src/ui/screens/CaptureInputScreen.tsx +0 -79
- package/src/ui/screens/CompleteObjectiveScreen.tsx +0 -72
- package/src/ui/screens/DeliverScreen.tsx +0 -114
- package/src/ui/screens/DisplayScreen.tsx +0 -52
- package/src/ui/screens/DoodleScreen.tsx +0 -84
- package/src/ui/screens/DropCashScreen.tsx +0 -113
- package/src/ui/screens/ETScreensIndex.ts +0 -35
- package/src/ui/screens/FormsScreen.tsx +0 -164
- package/src/ui/screens/GeofenceScreen.tsx +0 -54
- package/src/ui/screens/HttpRequestScreen.tsx +0 -47
- package/src/ui/screens/ImageCaptureScreen.tsx +0 -77
- package/src/ui/screens/PaymentScreen.tsx +0 -191
- package/src/ui/screens/PickupScreen.tsx +0 -82
- package/src/ui/screens/ScanScreen.tsx +0 -159
- package/src/ui/screens/StartWorkFlowScreen.tsx +0 -233
- package/src/ui/screens/ValidateOTPScreen.tsx +0 -62
- package/src/ui/screens/WithBaseDispatchScreen.tsx +0 -33
- package/src/ui/uiConfig/RouteParams.ts +0 -28
- package/src/utils/ApiUtils.ts +0 -157
- package/src/utils/ExecTaskUtils.ts +0 -214
- package/src/utils/Logger.ts +0 -110
- package/src/utils/NetworkUtil.ts +0 -50
- package/src/utils/SdkUtils.ts +0 -155
- package/src/utils/SyncManagerUtils.ts +0 -223
- package/src/utils/fcm/FCM.ts +0 -118
- package/src/utils/fcm/FcmUtils.ts +0 -130
- package/src/utils/helper.ts +0 -24
- package/src/utils/hooks/useModal.tsx +0 -67
- package/src/utils/hooks/useTimer.ts +0 -44
- package/src/utils/loginHelper.ts +0 -51
- package/src/utils/storage.ts +0 -292
- package/src/utils/test.json +0 -17
- package/src/utils/utils.ts +0 -30
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
import type { DisplayETInput } from './DisplaySchema';
|
|
2
|
-
import { Image, Platform, StyleSheet, View } from 'react-native';
|
|
3
|
-
import React, { useCallback, useState } from 'react';
|
|
4
|
-
import { getBaseETResponse } from '../../../utils/ExecTaskUtils';
|
|
5
|
-
import { getEventCodeByET } from '../../../manager/dispatchCodes/EventCodeContainer';
|
|
6
|
-
import {
|
|
7
|
-
EntityCode,
|
|
8
|
-
ExecutionTaskID,
|
|
9
|
-
} from '../../../models/execTasks/ETConfig';
|
|
10
|
-
import {
|
|
11
|
-
Button,
|
|
12
|
-
Modal,
|
|
13
|
-
Paragraph,
|
|
14
|
-
Portal,
|
|
15
|
-
Provider,
|
|
16
|
-
Text,
|
|
17
|
-
Title,
|
|
18
|
-
} from 'react-native-paper';
|
|
19
|
-
import {
|
|
20
|
-
CommonStyles,
|
|
21
|
-
DeliverPickupStyles,
|
|
22
|
-
Fonts,
|
|
23
|
-
} from '../../../styles/executionTasks/CommonStyles';
|
|
24
|
-
|
|
25
|
-
const DisplayModalET = (props: DisplayETInput) => {
|
|
26
|
-
const [modalVisible, setModalVisible] = useState(props.showDialog);
|
|
27
|
-
const sendEtOutput = useCallback(
|
|
28
|
-
async (success: boolean) => {
|
|
29
|
-
setModalVisible(false);
|
|
30
|
-
const _appRC = success
|
|
31
|
-
? props.applicableReasons?.success
|
|
32
|
-
: props.applicableReasons?.failure;
|
|
33
|
-
props.onSubmit({
|
|
34
|
-
...(await getBaseETResponse(
|
|
35
|
-
EntityCode.DISPLAY,
|
|
36
|
-
success,
|
|
37
|
-
getEventCodeByET(ExecutionTaskID.DISPLAY, success, _appRC),
|
|
38
|
-
'',
|
|
39
|
-
props.mergedObjectiveId,
|
|
40
|
-
ExecutionTaskID.DISPLAY
|
|
41
|
-
)),
|
|
42
|
-
});
|
|
43
|
-
},
|
|
44
|
-
[props]
|
|
45
|
-
);
|
|
46
|
-
|
|
47
|
-
return (
|
|
48
|
-
<Provider>
|
|
49
|
-
<Portal>
|
|
50
|
-
<View style={DeliverPickupStyles.mainContainer}>
|
|
51
|
-
<Modal
|
|
52
|
-
dismissable={false}
|
|
53
|
-
visible={modalVisible}
|
|
54
|
-
contentContainerStyle={DeliverPickupStyles.modalContent}
|
|
55
|
-
>
|
|
56
|
-
<View style={DeliverPickupStyles.modalView}>
|
|
57
|
-
{props.displayType === 'WARNING' && (
|
|
58
|
-
<Title style={styles.warningTitle}>{props.title}!</Title>
|
|
59
|
-
)}
|
|
60
|
-
{props.displayType === 'ALERT' && (
|
|
61
|
-
<Title style={styles.alertTitle}>{props.title}</Title>
|
|
62
|
-
)}
|
|
63
|
-
{props.displayType === 'MESSAGE' && (
|
|
64
|
-
<Title style={styles.messageTitle}>{props.title}</Title>
|
|
65
|
-
)}
|
|
66
|
-
{props.text && (
|
|
67
|
-
<Paragraph style={styles.messageText}>{props.text}</Paragraph>
|
|
68
|
-
)}
|
|
69
|
-
{props.message && (
|
|
70
|
-
<Text style={[styles.messageText]}>{props.message}</Text>
|
|
71
|
-
)}
|
|
72
|
-
{props.image && (
|
|
73
|
-
<View style={styles.imageView}>
|
|
74
|
-
<Image
|
|
75
|
-
source={{
|
|
76
|
-
width: 200,
|
|
77
|
-
height: 300,
|
|
78
|
-
uri: props.image,
|
|
79
|
-
}}
|
|
80
|
-
/>
|
|
81
|
-
</View>
|
|
82
|
-
)}
|
|
83
|
-
<View style={styles.buttons}>
|
|
84
|
-
<Button
|
|
85
|
-
mode={'outlined'}
|
|
86
|
-
uppercase={false}
|
|
87
|
-
labelStyle={CommonStyles.nextButtonLabel}
|
|
88
|
-
style={[
|
|
89
|
-
CommonStyles.nextButton,
|
|
90
|
-
{
|
|
91
|
-
marginBottom: 5,
|
|
92
|
-
},
|
|
93
|
-
]}
|
|
94
|
-
onPress={async () => {
|
|
95
|
-
await sendEtOutput(true);
|
|
96
|
-
}}
|
|
97
|
-
testID="primary"
|
|
98
|
-
>
|
|
99
|
-
{props.positiveBtn}
|
|
100
|
-
</Button>
|
|
101
|
-
{props.negativeBtn && (
|
|
102
|
-
<Button
|
|
103
|
-
uppercase={false}
|
|
104
|
-
mode={'outlined'}
|
|
105
|
-
labelStyle={CommonStyles.cancelButtonLabel}
|
|
106
|
-
style={[CommonStyles.cancelButton, { marginTop: 5 }]}
|
|
107
|
-
onPress={async () => {
|
|
108
|
-
await sendEtOutput(false);
|
|
109
|
-
}}
|
|
110
|
-
testID="secondary"
|
|
111
|
-
>
|
|
112
|
-
{props.negativeBtn}
|
|
113
|
-
</Button>
|
|
114
|
-
)}
|
|
115
|
-
</View>
|
|
116
|
-
</View>
|
|
117
|
-
</Modal>
|
|
118
|
-
</View>
|
|
119
|
-
</Portal>
|
|
120
|
-
</Provider>
|
|
121
|
-
);
|
|
122
|
-
};
|
|
123
|
-
|
|
124
|
-
export default DisplayModalET;
|
|
125
|
-
|
|
126
|
-
const styles = StyleSheet.create({
|
|
127
|
-
warningTitle: {
|
|
128
|
-
fontFamily:
|
|
129
|
-
Platform.OS === 'android'
|
|
130
|
-
? Fonts.IBMPlexSans_600SemiBold
|
|
131
|
-
: 'IBMPlexSans-SemiBold',
|
|
132
|
-
marginTop: 0,
|
|
133
|
-
marginBottom: 15,
|
|
134
|
-
textAlign: 'center',
|
|
135
|
-
color: '#856404',
|
|
136
|
-
},
|
|
137
|
-
messageTitle: {
|
|
138
|
-
fontFamily:
|
|
139
|
-
Platform.OS === 'android'
|
|
140
|
-
? Fonts.IBMPlexSans_600SemiBold
|
|
141
|
-
: 'IBMPlexSans-SemiBold',
|
|
142
|
-
marginTop: 0,
|
|
143
|
-
marginBottom: 15,
|
|
144
|
-
textAlign: 'center',
|
|
145
|
-
color: '#000000',
|
|
146
|
-
},
|
|
147
|
-
alertTitle: {
|
|
148
|
-
fontFamily:
|
|
149
|
-
Platform.OS === 'android'
|
|
150
|
-
? Fonts.IBMPlexSans_600SemiBold
|
|
151
|
-
: 'IBMPlexSans-SemiBold',
|
|
152
|
-
marginTop: 0,
|
|
153
|
-
marginBottom: 15,
|
|
154
|
-
textAlign: 'center',
|
|
155
|
-
color: 'red',
|
|
156
|
-
},
|
|
157
|
-
messageText: {
|
|
158
|
-
fontFamily:
|
|
159
|
-
Platform.OS === 'android'
|
|
160
|
-
? Fonts.IBMPlexSans_400Regular
|
|
161
|
-
: 'IBMPlexSans-Regular',
|
|
162
|
-
marginTop: 20,
|
|
163
|
-
fontSize: 16,
|
|
164
|
-
textAlign: 'center',
|
|
165
|
-
color: '#004085',
|
|
166
|
-
},
|
|
167
|
-
buttons: {
|
|
168
|
-
marginTop: 25,
|
|
169
|
-
flexDirection: 'column',
|
|
170
|
-
},
|
|
171
|
-
imageView: {
|
|
172
|
-
padding: 10,
|
|
173
|
-
},
|
|
174
|
-
});
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
BaseETRequest,
|
|
3
|
-
BaseETResponse,
|
|
4
|
-
} from '../../../models/execTasks/ETBaseModels';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Type of display
|
|
8
|
-
*/
|
|
9
|
-
export type DisplayType = 'ALERT' | 'WARNING' | 'MESSAGE';
|
|
10
|
-
/**
|
|
11
|
-
* Text to be displayed
|
|
12
|
-
*/
|
|
13
|
-
export type DisplayText = string;
|
|
14
|
-
/**
|
|
15
|
-
* Url of image to be displayed
|
|
16
|
-
*/
|
|
17
|
-
export type DisplayImageURL = string;
|
|
18
|
-
|
|
19
|
-
export type DisplayETInput = BaseETRequest & {
|
|
20
|
-
showDialog: boolean;
|
|
21
|
-
displayType: DisplayType;
|
|
22
|
-
text?: DisplayText;
|
|
23
|
-
image?: DisplayImageURL;
|
|
24
|
-
positiveBtn: string;
|
|
25
|
-
negativeBtn?: string;
|
|
26
|
-
onSubmit: (displayOutput: DisplayETOutput) => void;
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
export type DisplayETOutput = BaseETResponse;
|
|
@@ -1,320 +0,0 @@
|
|
|
1
|
-
import React, { useRef, useState, useLayoutEffect } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
BackHandler,
|
|
4
|
-
Platform,
|
|
5
|
-
StyleSheet,
|
|
6
|
-
Text,
|
|
7
|
-
TouchableOpacity,
|
|
8
|
-
View,
|
|
9
|
-
} from 'react-native';
|
|
10
|
-
import type { SignatureInput } from './SignatureSchema';
|
|
11
|
-
import { Button, Modal, Portal, Provider } from 'react-native-paper';
|
|
12
|
-
import { getBaseETResponse } from '../../../utils/ExecTaskUtils';
|
|
13
|
-
import { getEventCodeByET } from '../../../manager/dispatchCodes/EventCodeContainer';
|
|
14
|
-
import {
|
|
15
|
-
EntityCode,
|
|
16
|
-
ExecutionTaskID,
|
|
17
|
-
} from '../../../models/execTasks/ETConfig';
|
|
18
|
-
import { showToast } from '../../widgets/Toaster';
|
|
19
|
-
import DispatchSdkCache from '../../../manager/sdk/DispatchSdkCache';
|
|
20
|
-
import {
|
|
21
|
-
CommonStyles,
|
|
22
|
-
Fonts,
|
|
23
|
-
} from '../../../styles/executionTasks/CommonStyles';
|
|
24
|
-
import { insertDocumentInDB } from '../../../utils/SyncManagerUtils';
|
|
25
|
-
import SignatureCapture from '../../../native/signature/SignatureCapture';
|
|
26
|
-
import SdkColors, { ColorTheme } from '../../../styles/SdkColors';
|
|
27
|
-
import {
|
|
28
|
-
DEFAULT_SIGN_ET_MESSAGE,
|
|
29
|
-
GO_BACK_EVENT_CODE,
|
|
30
|
-
} from '../../../constants/constants';
|
|
31
|
-
import Icon from 'react-native-vector-icons/MaterialIcons';
|
|
32
|
-
import { hasGoBackConnector } from '../../../components/utils';
|
|
33
|
-
import GoBackModal from '../../../components/widgets/GoBackModal';
|
|
34
|
-
import { useFocusEffect } from '@react-navigation/native';
|
|
35
|
-
|
|
36
|
-
const SignatureET = (props: SignatureInput) => {
|
|
37
|
-
const signatureViewRef = useRef<any>();
|
|
38
|
-
const [dragged, setDragged] = useState(0);
|
|
39
|
-
const dragRef = useRef<number>(0);
|
|
40
|
-
const [showBackModal, setShowBackModal] = useState(false);
|
|
41
|
-
|
|
42
|
-
// Handle back-button click when scanList was being viewed
|
|
43
|
-
useFocusEffect(
|
|
44
|
-
React.useCallback(() => {
|
|
45
|
-
const onBackPress = () => {
|
|
46
|
-
if (
|
|
47
|
-
props.taskMeta?.enableGoBack &&
|
|
48
|
-
hasGoBackConnector(props.applicableReasons)
|
|
49
|
-
) {
|
|
50
|
-
setShowBackModal(true);
|
|
51
|
-
return true;
|
|
52
|
-
} else {
|
|
53
|
-
props.navigation.goBack();
|
|
54
|
-
return true;
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
BackHandler.addEventListener('hardwareBackPress', onBackPress);
|
|
58
|
-
return () =>
|
|
59
|
-
BackHandler.removeEventListener('hardwareBackPress', onBackPress);
|
|
60
|
-
}, [])
|
|
61
|
-
);
|
|
62
|
-
|
|
63
|
-
useLayoutEffect(() => {
|
|
64
|
-
props.navigation.setOptions({
|
|
65
|
-
title: props.title,
|
|
66
|
-
headerLeft: () => {
|
|
67
|
-
return (
|
|
68
|
-
<Icon
|
|
69
|
-
onPress={() => {
|
|
70
|
-
if (
|
|
71
|
-
props.taskMeta?.enableGoBack &&
|
|
72
|
-
hasGoBackConnector(props.applicableReasons)
|
|
73
|
-
)
|
|
74
|
-
setShowBackModal(true);
|
|
75
|
-
else props.navigation.goBack();
|
|
76
|
-
}}
|
|
77
|
-
name="arrow-back"
|
|
78
|
-
color={'black'}
|
|
79
|
-
size={25}
|
|
80
|
-
style={{
|
|
81
|
-
paddingRight: 15,
|
|
82
|
-
paddingTop: 5,
|
|
83
|
-
}}
|
|
84
|
-
/>
|
|
85
|
-
);
|
|
86
|
-
},
|
|
87
|
-
});
|
|
88
|
-
}, [props.navigation, props.title]);
|
|
89
|
-
|
|
90
|
-
const renderModal = () => {
|
|
91
|
-
return (
|
|
92
|
-
<GoBackModal
|
|
93
|
-
showModal={showBackModal}
|
|
94
|
-
setShowModal={setShowBackModal}
|
|
95
|
-
onSuccess={async () => {
|
|
96
|
-
props.onSubmitET({
|
|
97
|
-
...(await getBaseETResponse(
|
|
98
|
-
EntityCode.DOODLE,
|
|
99
|
-
false,
|
|
100
|
-
GO_BACK_EVENT_CODE,
|
|
101
|
-
'',
|
|
102
|
-
props.mergedObjectiveId,
|
|
103
|
-
ExecutionTaskID.DOODLE
|
|
104
|
-
)),
|
|
105
|
-
});
|
|
106
|
-
setShowBackModal(false);
|
|
107
|
-
}}
|
|
108
|
-
onFailure={() => setShowBackModal(false)}
|
|
109
|
-
/>
|
|
110
|
-
);
|
|
111
|
-
};
|
|
112
|
-
|
|
113
|
-
async function saveAndSubmit(cancel: boolean, image: string) {
|
|
114
|
-
if (cancel) {
|
|
115
|
-
props.onSubmitET({
|
|
116
|
-
...(await getBaseETResponse(
|
|
117
|
-
EntityCode.DOODLE,
|
|
118
|
-
false,
|
|
119
|
-
getEventCodeByET(
|
|
120
|
-
ExecutionTaskID.DOODLE,
|
|
121
|
-
false,
|
|
122
|
-
props.applicableReasons?.failure
|
|
123
|
-
),
|
|
124
|
-
'',
|
|
125
|
-
props.mergedObjectiveId,
|
|
126
|
-
ExecutionTaskID.DOODLE
|
|
127
|
-
)),
|
|
128
|
-
});
|
|
129
|
-
} else {
|
|
130
|
-
if (image != null) {
|
|
131
|
-
const fileName = `SIG_${Date.now().toString()}.jpg`;
|
|
132
|
-
const folderName =
|
|
133
|
-
(await DispatchSdkCache.getInstance().getKeyFromCache(
|
|
134
|
-
DispatchSdkCache.KEYS.FMS_FOLDER
|
|
135
|
-
)) ?? 'NULL';
|
|
136
|
-
let insertID = await insertDocumentInDB(
|
|
137
|
-
fileName,
|
|
138
|
-
folderName,
|
|
139
|
-
// JSON.stringify(props.jobIDs),
|
|
140
|
-
// JSON.stringify(props.objRefs),
|
|
141
|
-
image,
|
|
142
|
-
props.title ?? 'Signature',
|
|
143
|
-
null
|
|
144
|
-
);
|
|
145
|
-
if (insertID) {
|
|
146
|
-
props.onSubmitET({
|
|
147
|
-
url: '',
|
|
148
|
-
file: {
|
|
149
|
-
folder: folderName,
|
|
150
|
-
name: fileName,
|
|
151
|
-
},
|
|
152
|
-
...(await getBaseETResponse(
|
|
153
|
-
EntityCode.DOODLE,
|
|
154
|
-
true,
|
|
155
|
-
getEventCodeByET(
|
|
156
|
-
ExecutionTaskID.DOODLE,
|
|
157
|
-
true,
|
|
158
|
-
props.applicableReasons?.success
|
|
159
|
-
),
|
|
160
|
-
'',
|
|
161
|
-
props.mergedObjectiveId,
|
|
162
|
-
ExecutionTaskID.DOODLE
|
|
163
|
-
)),
|
|
164
|
-
});
|
|
165
|
-
} else {
|
|
166
|
-
showToast('Failed to save signature');
|
|
167
|
-
}
|
|
168
|
-
} else {
|
|
169
|
-
showToast('Please enter signature!');
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
return (
|
|
175
|
-
<Provider>
|
|
176
|
-
{renderModal()}
|
|
177
|
-
<View style={styles.mainContainer}>
|
|
178
|
-
<View style={styles.doodleView}>
|
|
179
|
-
<Text style={styles.messageText}>
|
|
180
|
-
{props.message || DEFAULT_SIGN_ET_MESSAGE}
|
|
181
|
-
</Text>
|
|
182
|
-
<View style={styles.horizontalLine} />
|
|
183
|
-
<View>
|
|
184
|
-
{/* <Text style={styles.messageText2}>{'Received by'}</Text> */}
|
|
185
|
-
<TouchableOpacity
|
|
186
|
-
onPress={() => {
|
|
187
|
-
if (Platform.OS === 'android') {
|
|
188
|
-
setDragged(0);
|
|
189
|
-
} else {
|
|
190
|
-
dragRef.current = 0;
|
|
191
|
-
}
|
|
192
|
-
signatureViewRef.current?.resetImage();
|
|
193
|
-
}}
|
|
194
|
-
>
|
|
195
|
-
<Text style={styles.clearBtn}>{'Clear'}</Text>
|
|
196
|
-
</TouchableOpacity>
|
|
197
|
-
</View>
|
|
198
|
-
<View style={{ flex: 1 }}>
|
|
199
|
-
<SignatureCapture
|
|
200
|
-
ref={signatureViewRef}
|
|
201
|
-
rotateClockwise={false}
|
|
202
|
-
square={false}
|
|
203
|
-
viewMode={'PORTRAIT'}
|
|
204
|
-
showBorder={false}
|
|
205
|
-
showNativeButtons={false}
|
|
206
|
-
showTitleLabel={false}
|
|
207
|
-
maxSize={Math.max(
|
|
208
|
-
props.resolution.length,
|
|
209
|
-
props.resolution.breadth
|
|
210
|
-
)}
|
|
211
|
-
minStrokeWidth={8}
|
|
212
|
-
maxStrokeWidth={6}
|
|
213
|
-
strokeColor={props.penColor ?? 'black'}
|
|
214
|
-
backgroundColor={'white'}
|
|
215
|
-
style={{ flex: 1, borderColor: 'transparent', borderWidth: 1 }}
|
|
216
|
-
onSaveEvent={async (result) => {
|
|
217
|
-
if (Platform.OS === 'android') {
|
|
218
|
-
if (dragged > 0) {
|
|
219
|
-
await saveAndSubmit(false, result.encoded);
|
|
220
|
-
} else {
|
|
221
|
-
showToast('Please enter signature');
|
|
222
|
-
}
|
|
223
|
-
} else {
|
|
224
|
-
if (dragRef.current > 0) {
|
|
225
|
-
await saveAndSubmit(false, result.encoded);
|
|
226
|
-
} else {
|
|
227
|
-
showToast('Please enter signature');
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
}}
|
|
231
|
-
onDragEvent={(drag) => {
|
|
232
|
-
if (drag.dragged) {
|
|
233
|
-
if (Platform.OS === 'android') {
|
|
234
|
-
setDragged((prevState) => prevState + 1);
|
|
235
|
-
} else {
|
|
236
|
-
dragRef.current = dragRef.current + 1;
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
}}
|
|
240
|
-
/>
|
|
241
|
-
</View>
|
|
242
|
-
</View>
|
|
243
|
-
<View style={styles.bottomButtons}>
|
|
244
|
-
<Button
|
|
245
|
-
style={[CommonStyles.cancelButton, { flex: 1, marginEnd: 5 }]}
|
|
246
|
-
labelStyle={CommonStyles.cancelButtonLabel}
|
|
247
|
-
mode={'outlined'}
|
|
248
|
-
onPress={async () => {
|
|
249
|
-
await saveAndSubmit(true, '');
|
|
250
|
-
}}
|
|
251
|
-
>
|
|
252
|
-
Skip
|
|
253
|
-
</Button>
|
|
254
|
-
<Button
|
|
255
|
-
labelStyle={CommonStyles.nextButtonLabel}
|
|
256
|
-
style={[CommonStyles.nextButton, { flex: 1, marginStart: 5 }]}
|
|
257
|
-
mode={'contained'}
|
|
258
|
-
onPress={async () => signatureViewRef.current?.saveImage()}
|
|
259
|
-
>
|
|
260
|
-
Proceed
|
|
261
|
-
</Button>
|
|
262
|
-
</View>
|
|
263
|
-
</View>
|
|
264
|
-
</Provider>
|
|
265
|
-
);
|
|
266
|
-
};
|
|
267
|
-
const styles = StyleSheet.create({
|
|
268
|
-
horizontalLine: {
|
|
269
|
-
backgroundColor: '#DDDDDD',
|
|
270
|
-
width: '100%',
|
|
271
|
-
height: 1,
|
|
272
|
-
marginTop: 13,
|
|
273
|
-
marginBottom: 15,
|
|
274
|
-
},
|
|
275
|
-
doodleView: {
|
|
276
|
-
flex: 1,
|
|
277
|
-
padding: 20,
|
|
278
|
-
},
|
|
279
|
-
mainContainer: {
|
|
280
|
-
flex: 1,
|
|
281
|
-
backgroundColor: '#ffffff',
|
|
282
|
-
},
|
|
283
|
-
bottomButtons: {
|
|
284
|
-
justifyContent: 'flex-end',
|
|
285
|
-
marginBottom: 10,
|
|
286
|
-
flexDirection: 'row',
|
|
287
|
-
marginStart: 10,
|
|
288
|
-
marginEnd: 10,
|
|
289
|
-
},
|
|
290
|
-
clearBtn: {
|
|
291
|
-
color: SdkColors[ColorTheme.LIGHT].primaryButton,
|
|
292
|
-
fontFamily:
|
|
293
|
-
Platform.OS === 'android'
|
|
294
|
-
? Fonts.IBMPlexSans_600SemiBold
|
|
295
|
-
: 'IBMPlexSans-SemiBold',
|
|
296
|
-
fontSize: 15,
|
|
297
|
-
justifyContent: 'flex-end',
|
|
298
|
-
textAlign: 'right',
|
|
299
|
-
},
|
|
300
|
-
messageText: {
|
|
301
|
-
fontSize: 16,
|
|
302
|
-
lineHeight: 20,
|
|
303
|
-
color: '#474A57',
|
|
304
|
-
fontFamily:
|
|
305
|
-
Platform.OS === 'android'
|
|
306
|
-
? Fonts.IBMPlexSans_400Regular
|
|
307
|
-
: 'IBMPlexSans-Regular',
|
|
308
|
-
},
|
|
309
|
-
messageText2: {
|
|
310
|
-
flex: 1,
|
|
311
|
-
fontSize: 16,
|
|
312
|
-
lineHeight: 20,
|
|
313
|
-
color: '#999999',
|
|
314
|
-
fontFamily:
|
|
315
|
-
Platform.OS === 'android'
|
|
316
|
-
? Fonts.IBMPlexSans_400Regular
|
|
317
|
-
: 'IBMPlexSans-Regular',
|
|
318
|
-
},
|
|
319
|
-
});
|
|
320
|
-
export default SignatureET;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Length (in cm)
|
|
3
|
-
*/
|
|
4
|
-
import type {
|
|
5
|
-
BaseETRequest,
|
|
6
|
-
BaseETResponse,
|
|
7
|
-
} from '../../../models/execTasks/ETBaseModels';
|
|
8
|
-
|
|
9
|
-
export type Length = number;
|
|
10
|
-
/**
|
|
11
|
-
* Breadth (in cm)
|
|
12
|
-
*/
|
|
13
|
-
export type Breadth = number;
|
|
14
|
-
/**
|
|
15
|
-
* Maximum Size limit (in kb) of doodle image
|
|
16
|
-
*/
|
|
17
|
-
export type MaxFileSize = number;
|
|
18
|
-
/**
|
|
19
|
-
* Pen colour hex code
|
|
20
|
-
*/
|
|
21
|
-
export type PenColor = string;
|
|
22
|
-
/**
|
|
23
|
-
* Any manual instruction to display for the Operator
|
|
24
|
-
*/
|
|
25
|
-
export type Instruction = string;
|
|
26
|
-
|
|
27
|
-
export type SignatureInput = BaseETRequest & {
|
|
28
|
-
resolution: Dimension;
|
|
29
|
-
fileSizeLimit: MaxFileSize;
|
|
30
|
-
penColor?: PenColor;
|
|
31
|
-
onSubmitET: (value: SignatureOutput) => void;
|
|
32
|
-
} & {
|
|
33
|
-
jobIDs: string[];
|
|
34
|
-
objRefs: string[];
|
|
35
|
-
};
|
|
36
|
-
/**
|
|
37
|
-
* Dimensions of doodle image
|
|
38
|
-
*/
|
|
39
|
-
export interface Dimension {
|
|
40
|
-
length: Length;
|
|
41
|
-
breadth: Breadth;
|
|
42
|
-
}
|
|
43
|
-
export interface SignatureBaseResponse {
|
|
44
|
-
/**
|
|
45
|
-
* Url of doodle image
|
|
46
|
-
*/
|
|
47
|
-
url?: string;
|
|
48
|
-
file?: { folder: string; name: string };
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export type SignatureOutput = BaseETResponse & SignatureBaseResponse;
|