@os1-platform/dispatch-mobile 2.1.2 → 2.1.4
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/6.8/fileChanges/last-build.bin +0 -0
- package/android/.gradle/6.8/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/6.8/gc.properties +0 -0
- package/android/.gradle/checksums/checksums.lock +0 -0
- package/android/.gradle/configuration-cache/gc.properties +0 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/.idea/gradle.xml +13 -0
- package/android/.idea/misc.xml +10 -0
- package/android/.idea/vcs.xml +6 -0
- package/dispatch-mobile.podspec +35 -0
- package/ios/DispatchSdk-Bridging-Header.h +3 -0
- package/ios/DispatchSdk.m +9 -0
- package/ios/DispatchSdk.swift +8 -0
- package/ios/DispatchSdk.xcodeproj/project.pbxproj +317 -0
- package/ios/EventEmitter.swift +21 -0
- package/ios/EventsConstant.swift +13 -0
- package/ios/RNEventEmitter.m +15 -0
- package/ios/RNEventEmitter.swift +24 -0
- package/lib/commonjs/components/dispatch/DispatchExecNavigator.js +3 -4
- package/lib/commonjs/components/dispatch/DispatchExecNavigator.js.map +1 -1
- package/lib/commonjs/components/executiontasks/cancellation/CancelET.js +13 -8
- package/lib/commonjs/components/executiontasks/cancellation/CancelET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js +3 -4
- package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js.map +1 -1
- package/lib/commonjs/components/executiontasks/deliver/DeliverET.js +3 -4
- 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 +112 -27
- package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/display/DisplayModalET.js +7 -8
- package/lib/commonjs/components/executiontasks/display/DisplayModalET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/doodle/SignatureET.js +113 -48
- package/lib/commonjs/components/executiontasks/doodle/SignatureET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/doodle/SignatureSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/dropCash/DropCashET.js +3 -4
- package/lib/commonjs/components/executiontasks/dropCash/DropCashET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/dropCash/DropCashSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js +7 -8
- package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/FormGenerator.js +23 -24
- package/lib/commonjs/components/executiontasks/forms/FormGenerator.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/FormSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/DateTimeWidget.js +4 -5
- package/lib/commonjs/components/executiontasks/forms/widgets/DateTimeWidget.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/DropdownWidget.js +3 -4
- package/lib/commonjs/components/executiontasks/forms/widgets/DropdownWidget.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js +3 -4
- package/lib/commonjs/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/TimeRangeSelector.js +3 -4
- package/lib/commonjs/components/executiontasks/forms/widgets/TimeRangeSelector.js.map +1 -1
- package/lib/commonjs/components/executiontasks/httpRequest/HttpRequestET.js +3 -4
- 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 +138 -25
- package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js +228 -132
- package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
- package/lib/commonjs/components/executiontasks/imageCapture/camera.svg +3 -0
- package/lib/commonjs/components/executiontasks/imageCapture/circle-xmark.svg +5 -0
- package/lib/commonjs/components/executiontasks/payments/PaymentStyles.js +6 -7
- package/lib/commonjs/components/executiontasks/payments/PaymentStyles.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js +6 -7
- package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js +4 -5
- package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/init/InitPaymentSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js +4 -5
- package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/pickup/PickpSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/pickup/PickupET.js +3 -4
- package/lib/commonjs/components/executiontasks/pickup/PickupET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js +89 -17
- package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/ScanET.js +14 -15
- package/lib/commonjs/components/executiontasks/scan/ScanET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/ScanSchema.js +1 -2
- package/lib/commonjs/components/executiontasks/scan/ScanSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/constants.js +6 -12
- package/lib/commonjs/components/executiontasks/scan/constants.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/interfaces.js +4 -8
- package/lib/commonjs/components/executiontasks/scan/interfaces.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/sub_components/CScanner.js +4 -5
- package/lib/commonjs/components/executiontasks/scan/sub_components/CScanner.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/sub_components/ERDropDown.js +5 -6
- package/lib/commonjs/components/executiontasks/scan/sub_components/ERDropDown.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/sub_components/SummaryPage.js +8 -9
- 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 +8 -9
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPSchema.js +1 -2
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/validateOTP/constants.js +6 -12
- package/lib/commonjs/components/executiontasks/validateOTP/constants.js.map +1 -1
- package/lib/commonjs/components/executiontasks/validateOTP/sub-components/OTPInput.js +5 -6
- 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 +3 -4
- package/lib/commonjs/components/executiontasks/verifyLocation/VerifyLocationET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpET.js +3 -4
- package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpET.js.map +1 -1
- package/lib/commonjs/components/widgets/AlertDisplay.js +14 -9
- package/lib/commonjs/components/widgets/AlertDisplay.js.map +1 -1
- package/lib/commonjs/components/widgets/CancelOrderDialog.js +5 -6
- package/lib/commonjs/components/widgets/CancelOrderDialog.js.map +1 -1
- package/lib/commonjs/components/widgets/Card.js +2 -3
- package/lib/commonjs/components/widgets/Card.js.map +1 -1
- package/lib/commonjs/components/widgets/GoBackModal.js +1 -2
- package/lib/commonjs/components/widgets/GoBackModal.js.map +1 -1
- package/lib/commonjs/components/widgets/IconButton.js +1 -2
- package/lib/commonjs/components/widgets/IconButton.js.map +1 -1
- package/lib/commonjs/components/widgets/ModalWidget.js +3 -4
- package/lib/commonjs/components/widgets/ModalWidget.js.map +1 -1
- package/lib/commonjs/components/widgets/ProgressDialog.js +2 -3
- package/lib/commonjs/components/widgets/ProgressDialog.js.map +1 -1
- package/lib/commonjs/components/widgets/SearchBar.js +1 -2
- package/lib/commonjs/components/widgets/SearchBar.js.map +1 -1
- package/lib/commonjs/components/widgets/SnackBarCustom.js +3 -5
- package/lib/commonjs/components/widgets/SnackBarCustom.js.map +1 -1
- package/lib/commonjs/components/widgets/SplitTextInput.js +3 -4
- package/lib/commonjs/components/widgets/SplitTextInput.js.map +1 -1
- package/lib/commonjs/components/widgets/TabsComponent.js +3 -4
- package/lib/commonjs/components/widgets/TabsComponent.js.map +1 -1
- package/lib/commonjs/config/DispatchSDKConfig.js +1 -2
- package/lib/commonjs/config/DispatchSDKConfig.js.map +1 -1
- package/lib/commonjs/constants/apiConstants.js +2 -4
- package/lib/commonjs/constants/apiConstants.js.map +1 -1
- package/lib/commonjs/constants/constants.js +11 -22
- package/lib/commonjs/constants/constants.js.map +1 -1
- package/lib/commonjs/constants/statuscode.js +1 -2
- package/lib/commonjs/constants/statuscode.js.map +1 -1
- package/lib/commonjs/errors/ErrorCodes.js +7 -14
- package/lib/commonjs/errors/ErrorCodes.js.map +1 -1
- package/lib/commonjs/events/EventDispatcher.js +5 -3
- package/lib/commonjs/events/EventDispatcher.js.map +1 -1
- package/lib/commonjs/events/EventListener.js +1 -2
- package/lib/commonjs/events/EventListener.js.map +1 -1
- package/lib/commonjs/events/constants.js +1 -2
- package/lib/commonjs/events/constants.js.map +1 -1
- package/lib/commonjs/events/index.js +1 -2
- package/lib/commonjs/events/index.js.map +1 -1
- package/lib/commonjs/icons/ScanIcon.js +1 -2
- package/lib/commonjs/icons/ScanIcon.js.map +1 -1
- package/lib/commonjs/icons/circleMark.svg +3 -0
- package/lib/commonjs/icons/file.js +1 -2
- package/lib/commonjs/icons/file.js.map +1 -1
- package/lib/commonjs/index.js +15 -2
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/locale/Str.js +21 -0
- package/lib/commonjs/locale/Str.js.map +1 -0
- package/lib/commonjs/locale/en.json +7 -0
- package/lib/commonjs/locale/i18n.js +32 -0
- package/lib/commonjs/locale/i18n.js.map +1 -0
- package/lib/commonjs/locale/util.js +27 -0
- package/lib/commonjs/locale/util.js.map +1 -0
- package/lib/commonjs/manager/dispatch/DispatchStateContainer.js +5 -3
- package/lib/commonjs/manager/dispatch/DispatchStateContainer.js.map +1 -1
- package/lib/commonjs/manager/dispatchCodes/EventCodeContainer.js +2 -0
- package/lib/commonjs/manager/dispatchCodes/EventCodeContainer.js.map +1 -1
- package/lib/commonjs/manager/dispatchCodes/EventCodeRepo.js +4 -2
- package/lib/commonjs/manager/dispatchCodes/EventCodeRepo.js.map +1 -1
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeContainer.js +4 -2
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeContainer.js.map +1 -1
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeRepo.js +4 -2
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeRepo.js.map +1 -1
- package/lib/commonjs/manager/location/LocationManager.js +7 -4
- package/lib/commonjs/manager/location/LocationManager.js.map +1 -1
- package/lib/commonjs/manager/sdk/DispatchSDKManager.js +4 -2
- package/lib/commonjs/manager/sdk/DispatchSDKManager.js.map +1 -1
- package/lib/commonjs/manager/sdk/DispatchSdkCache.js +2 -0
- package/lib/commonjs/manager/sdk/DispatchSdkCache.js.map +1 -1
- package/lib/commonjs/manager/sdk/callbacksHandler.js +1 -2
- package/lib/commonjs/manager/sdk/callbacksHandler.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/AppSyncManager.js +4 -2
- package/lib/commonjs/manager/syncmanager/AppSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/DBConfig.js +15 -26
- package/lib/commonjs/manager/syncmanager/DBConfig.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/NativeSyncManager.js +1 -2
- package/lib/commonjs/manager/syncmanager/NativeSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/constants.js +5 -10
- 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 +5 -4
- package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentManager.js +4 -2
- package/lib/commonjs/manager/syncmanager/document/DocumentManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js +4 -2
- package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/events/ETEventsManager.js +15 -3
- package/lib/commonjs/manager/syncmanager/events/ETEventsManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/events/EventsSyncManager.js +4 -2
- package/lib/commonjs/manager/syncmanager/events/EventsSyncManager.js.map +1 -1
- package/lib/commonjs/models/DispatchModels.js +1 -2
- package/lib/commonjs/models/DispatchModels.js.map +1 -1
- package/lib/commonjs/models/execTasks/ETConfig.js +6 -12
- 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 +1 -2
- package/lib/commonjs/models/sdk.js.map +1 -1
- package/lib/commonjs/native/signature/SignatureCapture.js +1 -2
- package/lib/commonjs/native/signature/SignatureCapture.js.map +1 -1
- package/lib/commonjs/network/GraphQLClient.js +48 -4
- package/lib/commonjs/network/GraphQLClient.js.map +1 -1
- package/lib/commonjs/network/Queries.js +5 -10
- package/lib/commonjs/network/Queries.js.map +1 -1
- package/lib/commonjs/res/strings.js +1 -2
- package/lib/commonjs/res/strings.js.map +1 -1
- package/lib/commonjs/resources/Login.js +1 -2
- package/lib/commonjs/resources/Login.js.map +1 -1
- package/lib/commonjs/resources/network.js +1 -2
- package/lib/commonjs/resources/network.js.map +1 -1
- package/lib/commonjs/styles/SdkColors.js +2 -4
- package/lib/commonjs/styles/SdkColors.js.map +1 -1
- package/lib/commonjs/styles/executionTasks/CommonStyles.js +8 -11
- package/lib/commonjs/styles/executionTasks/CommonStyles.js.map +1 -1
- package/lib/commonjs/ui/screens/CancellationScreen.js +3 -4
- 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 +3 -4
- package/lib/commonjs/ui/screens/CompleteObjectiveScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DeliverScreen.js +36 -10
- package/lib/commonjs/ui/screens/DeliverScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DisplayScreen.js +3 -4
- package/lib/commonjs/ui/screens/DisplayScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DoodleScreen.js +27 -6
- package/lib/commonjs/ui/screens/DoodleScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DropCashScreen.js +29 -10
- package/lib/commonjs/ui/screens/DropCashScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FormsScreen.js +25 -5
- package/lib/commonjs/ui/screens/FormsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/GeofenceScreen.js +3 -4
- package/lib/commonjs/ui/screens/GeofenceScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HttpRequestScreen.js +1 -2
- package/lib/commonjs/ui/screens/HttpRequestScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ImageCaptureScreen.js +27 -9
- package/lib/commonjs/ui/screens/ImageCaptureScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PaymentScreen.js +31 -10
- package/lib/commonjs/ui/screens/PaymentScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PickupScreen.js +38 -10
- package/lib/commonjs/ui/screens/PickupScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ScanScreen.js +3 -4
- package/lib/commonjs/ui/screens/ScanScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/StartWorkFlowScreen.js +8 -7
- package/lib/commonjs/ui/screens/StartWorkFlowScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ValidateOTPScreen.js +3 -4
- 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 +1 -2
- package/lib/commonjs/ui/uiConfig/RouteParams.js.map +1 -1
- package/lib/commonjs/utils/ApiUtils.js +2 -4
- package/lib/commonjs/utils/ApiUtils.js.map +1 -1
- package/lib/commonjs/utils/Logger.js +10 -9
- package/lib/commonjs/utils/Logger.js.map +1 -1
- package/lib/commonjs/utils/NetworkUtil.js +1 -2
- package/lib/commonjs/utils/NetworkUtil.js.map +1 -1
- package/lib/commonjs/utils/SdkUtils.js +12 -8
- 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 +3 -4
- package/lib/commonjs/utils/fcm/FCM.js.map +1 -1
- package/lib/commonjs/utils/fcm/FcmUtils.js +14 -2
- package/lib/commonjs/utils/fcm/FcmUtils.js.map +1 -1
- package/lib/commonjs/utils/helper.js +46 -4
- package/lib/commonjs/utils/helper.js.map +1 -1
- package/lib/commonjs/utils/hooks/useModal.js +3 -4
- package/lib/commonjs/utils/hooks/useModal.js.map +1 -1
- package/lib/commonjs/utils/hooks/useTimer.js +1 -2
- package/lib/commonjs/utils/hooks/useTimer.js.map +1 -1
- package/lib/commonjs/utils/loginHelper.js +1 -2
- package/lib/commonjs/utils/loginHelper.js.map +1 -1
- package/lib/commonjs/utils/storage.js +71 -13
- 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 +11 -5
- 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 +112 -25
- 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 +111 -45
- package/lib/module/components/executiontasks/doodle/SignatureET.js.map +1 -1
- package/lib/module/components/executiontasks/doodle/SignatureSchema.js.map +1 -1
- package/lib/module/components/executiontasks/dropCash/DropCashSchema.js.map +1 -1
- package/lib/module/components/executiontasks/dropCash/SLDropCash.js +5 -5
- package/lib/module/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
- package/lib/module/components/executiontasks/forms/FormGenerator.js +21 -21
- package/lib/module/components/executiontasks/forms/FormGenerator.js.map +1 -1
- package/lib/module/components/executiontasks/forms/FormSchema.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/CaptureSchema.js.map +1 -1
- package/lib/module/components/executiontasks/imageCapture/CaptureUtils.js +133 -21
- package/lib/module/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
- package/lib/module/components/executiontasks/imageCapture/ImageCapture.js +226 -130
- package/lib/module/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
- package/lib/module/components/executiontasks/imageCapture/camera.svg +3 -0
- package/lib/module/components/executiontasks/imageCapture/circle-xmark.svg +5 -0
- 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 +4 -4
- package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
- package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentSchema.js.map +1 -1
- package/lib/module/components/executiontasks/payments/init/InitPaymentET.js +1 -1
- package/lib/module/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
- package/lib/module/components/executiontasks/payments/init/InitPaymentSchema.js.map +1 -1
- package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentET.js +1 -1
- package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
- package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentSchema.js.map +1 -1
- package/lib/module/components/executiontasks/pickup/PickpSchema.js.map +1 -1
- package/lib/module/components/executiontasks/pickup/SLPickupET.js +89 -16
- 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 +12 -7
- 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/constants/constants.js +1 -1
- package/lib/module/constants/constants.js.map +1 -1
- package/lib/module/events/EventDispatcher.js +5 -2
- package/lib/module/events/EventDispatcher.js.map +1 -1
- package/lib/module/icons/circleMark.svg +3 -0
- package/lib/module/index.js +4 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/locale/Str.js +15 -0
- package/lib/module/locale/Str.js.map +1 -0
- package/lib/module/locale/en.json +7 -0
- package/lib/module/locale/i18n.js +25 -0
- package/lib/module/locale/i18n.js.map +1 -0
- package/lib/module/locale/util.js +18 -0
- package/lib/module/locale/util.js.map +1 -0
- package/lib/module/manager/dispatch/DispatchStateContainer.js +3 -1
- package/lib/module/manager/dispatch/DispatchStateContainer.js.map +1 -1
- package/lib/module/manager/dispatchCodes/EventCodeContainer.js +2 -0
- package/lib/module/manager/dispatchCodes/EventCodeContainer.js.map +1 -1
- package/lib/module/manager/dispatchCodes/EventCodeRepo.js +2 -0
- package/lib/module/manager/dispatchCodes/EventCodeRepo.js.map +1 -1
- package/lib/module/manager/dispatchCodes/ReasonCodeContainer.js +2 -0
- package/lib/module/manager/dispatchCodes/ReasonCodeContainer.js.map +1 -1
- package/lib/module/manager/dispatchCodes/ReasonCodeRepo.js +2 -0
- package/lib/module/manager/dispatchCodes/ReasonCodeRepo.js.map +1 -1
- package/lib/module/manager/location/LocationManager.js +2 -0
- package/lib/module/manager/location/LocationManager.js.map +1 -1
- package/lib/module/manager/sdk/DispatchSDKManager.js +2 -0
- package/lib/module/manager/sdk/DispatchSDKManager.js.map +1 -1
- package/lib/module/manager/sdk/DispatchSdkCache.js +2 -0
- package/lib/module/manager/sdk/DispatchSdkCache.js.map +1 -1
- package/lib/module/manager/syncmanager/AppSyncManager.js +2 -0
- package/lib/module/manager/syncmanager/AppSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/DBConfig.js +1 -0
- package/lib/module/manager/syncmanager/DBConfig.js.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentManager.js +2 -0
- package/lib/module/manager/syncmanager/document/DocumentManager.js.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentSyncManager.js +2 -0
- package/lib/module/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/events/ETEventsManager.js +13 -1
- package/lib/module/manager/syncmanager/events/ETEventsManager.js.map +1 -1
- package/lib/module/manager/syncmanager/events/EventsSyncManager.js +2 -0
- 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 +48 -3
- package/lib/module/network/GraphQLClient.js.map +1 -1
- package/lib/module/styles/executionTasks/CommonStyles.js +2 -1
- package/lib/module/styles/executionTasks/CommonStyles.js.map +1 -1
- package/lib/module/ui/screens/CaptureInputScreen.js +2 -1
- package/lib/module/ui/screens/CaptureInputScreen.js.map +1 -1
- package/lib/module/ui/screens/DeliverScreen.js +33 -6
- package/lib/module/ui/screens/DeliverScreen.js.map +1 -1
- package/lib/module/ui/screens/DoodleScreen.js +24 -2
- package/lib/module/ui/screens/DoodleScreen.js.map +1 -1
- package/lib/module/ui/screens/DropCashScreen.js +26 -6
- package/lib/module/ui/screens/DropCashScreen.js.map +1 -1
- package/lib/module/ui/screens/FormsScreen.js +22 -1
- package/lib/module/ui/screens/FormsScreen.js.map +1 -1
- package/lib/module/ui/screens/ImageCaptureScreen.js +24 -5
- package/lib/module/ui/screens/ImageCaptureScreen.js.map +1 -1
- package/lib/module/ui/screens/PaymentScreen.js +28 -6
- package/lib/module/ui/screens/PaymentScreen.js.map +1 -1
- package/lib/module/ui/screens/PickupScreen.js +35 -6
- package/lib/module/ui/screens/PickupScreen.js.map +1 -1
- package/lib/module/ui/screens/StartWorkFlowScreen.js +6 -4
- package/lib/module/ui/screens/StartWorkFlowScreen.js.map +1 -1
- package/lib/module/ui/screens/WithBaseDispatchScreen.js +1 -0
- package/lib/module/ui/screens/WithBaseDispatchScreen.js.map +1 -1
- package/lib/module/utils/Logger.js +2 -0
- package/lib/module/utils/Logger.js.map +1 -1
- package/lib/module/utils/SdkUtils.js +11 -7
- package/lib/module/utils/SdkUtils.js.map +1 -1
- package/lib/module/utils/fcm/FcmUtils.js +11 -0
- package/lib/module/utils/fcm/FcmUtils.js.map +1 -1
- package/lib/module/utils/helper.js +46 -4
- package/lib/module/utils/helper.js.map +1 -1
- package/lib/module/utils/storage.js +69 -10
- package/lib/module/utils/storage.js.map +1 -1
- package/lib/typescript/components/executiontasks/deliver/DeliverETInput.d.ts +5 -0
- package/lib/typescript/components/executiontasks/doodle/SignatureSchema.d.ts +1 -0
- package/lib/typescript/components/executiontasks/dropCash/DropCashSchema.d.ts +1 -0
- package/lib/typescript/components/executiontasks/forms/FormSchema.d.ts +1 -0
- package/lib/typescript/components/executiontasks/imageCapture/CaptureSchema.d.ts +1 -0
- package/lib/typescript/components/executiontasks/imageCapture/CaptureUtils.d.ts +6 -1
- package/lib/typescript/components/executiontasks/imageCapture/ImageCapture.d.ts +1 -2
- package/lib/typescript/components/executiontasks/payments/PaymentStyles.d.ts +4 -5
- package/lib/typescript/components/executiontasks/payments/completePayment/CompletePaymentSchema.d.ts +1 -0
- package/lib/typescript/components/executiontasks/payments/init/InitPaymentSchema.d.ts +1 -0
- package/lib/typescript/components/executiontasks/payments/processPayment/ProcessPaymentSchema.d.ts +1 -0
- package/lib/typescript/components/executiontasks/pickup/PickpSchema.d.ts +2 -0
- package/lib/typescript/components/widgets/SnackBarCustom.d.ts +1 -1
- package/lib/typescript/constants/constants.d.ts +1 -1
- package/lib/typescript/index.d.ts +4 -2
- package/lib/typescript/locale/Str.d.ts +13 -0
- package/lib/typescript/locale/i18n.d.ts +3 -0
- package/lib/typescript/locale/util.d.ts +2 -0
- package/lib/typescript/manager/syncmanager/DBConfig.d.ts +2 -1
- package/lib/typescript/models/fcm.d.ts +3 -0
- package/lib/typescript/styles/executionTasks/CommonStyles.d.ts +1 -0
- package/lib/typescript/utils/fcm/FcmUtils.d.ts +2 -1
- package/lib/typescript/utils/helper.d.ts +4 -3
- package/lib/typescript/utils/storage.d.ts +3 -2
- package/package.json +22 -7
- package/src/@types/assets/index.d.ts +6 -0
- package/src/components/dispatch/DispatchExecNavigator.tsx +273 -0
- package/src/components/executiontasks/CompletedWFSchema.ts +24 -0
- package/src/components/executiontasks/ExecutionTasksIndex.ts +137 -0
- package/src/components/executiontasks/cancellation/CancelET.tsx +281 -0
- package/src/components/executiontasks/cancellation/CancellationSchema.ts +30 -0
- package/src/components/executiontasks/captureInput/CaptureInputSchema.ts +52 -0
- package/src/components/executiontasks/captureInput/CaptureText.tsx +172 -0
- package/src/components/executiontasks/captureInput/utils.ts +9 -0
- package/src/components/executiontasks/deliver/DeliverET.tsx +124 -0
- package/src/components/executiontasks/deliver/DeliverETInput.ts +52 -0
- package/src/components/executiontasks/deliver/SLDeliverET.tsx +522 -0
- package/src/components/executiontasks/display/DisplayModalET.tsx +174 -0
- package/src/components/executiontasks/display/DisplaySchema.ts +29 -0
- package/src/components/executiontasks/doodle/SignatureET.tsx +325 -0
- package/src/components/executiontasks/doodle/SignatureSchema.ts +52 -0
- package/src/components/executiontasks/dropCash/DropCashET.tsx +145 -0
- package/src/components/executiontasks/dropCash/DropCashSchema.ts +23 -0
- package/src/components/executiontasks/dropCash/SLDropCash.tsx +286 -0
- package/src/components/executiontasks/forms/FormGenerator.tsx +277 -0
- package/src/components/executiontasks/forms/FormSchema.ts +30 -0
- package/src/components/executiontasks/forms/widgets/DateTimeWidget.tsx +144 -0
- package/src/components/executiontasks/forms/widgets/DropdownWidget.tsx +52 -0
- package/src/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.tsx +158 -0
- package/src/components/executiontasks/forms/widgets/TimeRangeSelector.tsx +38 -0
- package/src/components/executiontasks/httpRequest/HttpEtUtils.ts +49 -0
- package/src/components/executiontasks/httpRequest/HttpRequestET.tsx +59 -0
- package/src/components/executiontasks/httpRequest/HttpRequestETSchema.ts +42 -0
- package/src/components/executiontasks/imageCapture/CaptureSchema.ts +94 -0
- package/src/components/executiontasks/imageCapture/CaptureUtils.ts +321 -0
- package/src/components/executiontasks/imageCapture/ImageCapture.tsx +457 -0
- package/src/components/executiontasks/imageCapture/camera.svg +3 -0
- package/src/components/executiontasks/imageCapture/circle-xmark.svg +5 -0
- package/src/components/executiontasks/payments/PaymentStyles.ts +93 -0
- package/src/components/executiontasks/payments/PaymentUtils.ts +7 -0
- package/src/components/executiontasks/payments/completePayment/CompletePaymentET.tsx +238 -0
- package/src/components/executiontasks/payments/completePayment/CompletePaymentSchema.ts +24 -0
- package/src/components/executiontasks/payments/init/InitPaymentET.tsx +246 -0
- package/src/components/executiontasks/payments/init/InitPaymentSchema.ts +38 -0
- package/src/components/executiontasks/payments/processPayment/ProcessPaymentET.tsx +273 -0
- package/src/components/executiontasks/payments/processPayment/ProcessPaymentSchema.ts +39 -0
- package/src/components/executiontasks/pickup/PickpSchema.ts +30 -0
- package/src/components/executiontasks/pickup/PickupET.tsx +126 -0
- package/src/components/executiontasks/pickup/SLPickupET.tsx +372 -0
- package/src/components/executiontasks/scan/ScanET.tsx +1059 -0
- package/src/components/executiontasks/scan/ScanSchema.ts +121 -0
- package/src/components/executiontasks/scan/constants.ts +6 -0
- package/src/components/executiontasks/scan/interfaces.ts +109 -0
- package/src/components/executiontasks/scan/modalConstant.ts +120 -0
- package/src/components/executiontasks/scan/sub_components/CScanner.tsx +107 -0
- package/src/components/executiontasks/scan/sub_components/DropDownUtils.ts +119 -0
- package/src/components/executiontasks/scan/sub_components/ERDropDown.tsx +134 -0
- package/src/components/executiontasks/scan/sub_components/SummaryPage.tsx +1296 -0
- package/src/components/executiontasks/scan/utils.ts +1108 -0
- package/src/components/executiontasks/validateOTP/ValidateOTPET.tsx +436 -0
- package/src/components/executiontasks/validateOTP/ValidateOTPSchema.ts +68 -0
- package/src/components/executiontasks/validateOTP/constants.ts +24 -0
- package/src/components/executiontasks/validateOTP/sub-components/OTPInput.tsx +83 -0
- package/src/components/executiontasks/validateOTP/utils.ts +180 -0
- package/src/components/executiontasks/verifyInput/VerifyInputSchema.ts +49 -0
- package/src/components/executiontasks/verifyLocation/GeofenceUtils.ts +55 -0
- package/src/components/executiontasks/verifyLocation/VerifyLocSchema.ts +56 -0
- package/src/components/executiontasks/verifyLocation/VerifyLocationET.tsx +69 -0
- package/src/components/executiontasks/verifyOtp/VerifyOtpET.tsx +96 -0
- package/src/components/executiontasks/verifyOtp/VerifyOtpSchema.ts +27 -0
- package/src/components/utils/index.ts +18 -0
- package/src/components/widgets/AlertDisplay.tsx +38 -0
- package/src/components/widgets/CancelOrderDialog.tsx +112 -0
- package/src/components/widgets/Card.tsx +99 -0
- package/src/components/widgets/GoBackModal.tsx +49 -0
- package/src/components/widgets/IconButton.tsx +32 -0
- package/src/components/widgets/ModalWidget.tsx +157 -0
- package/src/components/widgets/ProgressDialog.tsx +54 -0
- package/src/components/widgets/SearchBar.tsx +71 -0
- package/src/components/widgets/SnackBarCustom.tsx +212 -0
- package/src/components/widgets/SplitTextInput.tsx +116 -0
- package/src/components/widgets/TabsComponent.tsx +84 -0
- package/src/components/widgets/Toaster.ts +8 -0
- package/src/config/DispatchSDKConfig.ts +4 -0
- package/src/constants/apiConstants.ts +11 -0
- package/src/constants/constants.ts +12 -0
- package/src/constants/statuscode.ts +8 -0
- package/src/errors/BaseError.ts +16 -0
- package/src/errors/ErrorCodes.ts +38 -0
- package/src/events/EventDispatcher.ts +22 -0
- package/src/events/EventListener.ts +14 -0
- package/src/events/constants.ts +7 -0
- package/src/events/index.ts +3 -0
- package/src/events/interface.ts +1 -0
- package/src/icons/ScanIcon.tsx +24 -0
- package/src/icons/circleMark.svg +3 -0
- package/src/icons/file.tsx +24 -0
- package/src/icons/interface.ts +5 -0
- package/src/index.tsx +82 -0
- package/src/locale/Str.ts +15 -0
- package/src/locale/en.json +7 -0
- package/src/locale/i18n.ts +26 -0
- package/src/locale/util.ts +20 -0
- package/src/manager/dispatch/DispatchStateContainer.tsx +842 -0
- package/src/manager/dispatchCodes/EventCodeContainer.ts +75 -0
- package/src/manager/dispatchCodes/EventCodeRepo.ts +82 -0
- package/src/manager/dispatchCodes/ReasonCodeContainer.ts +121 -0
- package/src/manager/dispatchCodes/ReasonCodeRepo.ts +90 -0
- package/src/manager/dispatchCodes/reasonCodes.json +137 -0
- package/src/manager/jobRemoval/JobRemovalManager.ts +21 -0
- package/src/manager/location/LocationManager.ts +77 -0
- package/src/manager/sdk/DispatchSDKManager.ts +99 -0
- package/src/manager/sdk/DispatchSdkCache.ts +47 -0
- package/src/manager/sdk/callbacksHandler.ts +25 -0
- package/src/manager/syncmanager/AppSyncManager.ts +187 -0
- package/src/manager/syncmanager/DBConfig.ts +181 -0
- package/src/manager/syncmanager/NativeSyncManager.ts +14 -0
- package/src/manager/syncmanager/constants.ts +5 -0
- package/src/manager/syncmanager/database.ts +93 -0
- package/src/manager/syncmanager/document/DocumentHttpClient.ts +111 -0
- package/src/manager/syncmanager/document/DocumentManager.ts +143 -0
- package/src/manager/syncmanager/document/DocumentSyncManager.ts +233 -0
- package/src/manager/syncmanager/document/models.ts +4 -0
- package/src/manager/syncmanager/events/ETEventsManager.ts +647 -0
- package/src/manager/syncmanager/events/EventsGraphQLClient.ts +0 -0
- package/src/manager/syncmanager/events/EventsSyncManager.ts +490 -0
- package/src/manager/syncmanager/events/SyncHttpClient.ts +202 -0
- package/src/models/DispatchModels.ts +97 -0
- package/src/models/ReasonCodes.ts +12 -0
- package/src/models/auth.ts +43 -0
- package/src/models/execTasks/ETBaseModels.ts +113 -0
- package/src/models/execTasks/ETConfig.ts +94 -0
- package/src/models/execution.ts +9 -0
- package/src/models/fcm.ts +6 -0
- package/src/models/sdk.ts +35 -0
- package/src/native/signature/SignatureCapture.tsx +110 -0
- package/src/network/GraphQLClient.ts +147 -0
- package/src/network/NetworkClient.ts +58 -0
- package/src/network/NetworkUtils.ts +41 -0
- package/src/network/Queries.ts +46 -0
- package/src/network/client.ts +61 -0
- package/src/res/strings.ts +1 -0
- package/src/resources/Login.ts +36 -0
- package/src/resources/network.ts +13 -0
- package/src/styles/SdkColors.ts +24 -0
- package/src/styles/executionTasks/CommonStyles.ts +189 -0
- package/src/ui/screens/CancellationScreen.tsx +144 -0
- package/src/ui/screens/CaptureInputScreen.tsx +79 -0
- package/src/ui/screens/CompleteObjectiveScreen.tsx +72 -0
- package/src/ui/screens/DeliverScreen.tsx +136 -0
- package/src/ui/screens/DisplayScreen.tsx +52 -0
- package/src/ui/screens/DoodleScreen.tsx +107 -0
- package/src/ui/screens/DropCashScreen.tsx +132 -0
- package/src/ui/screens/ETScreensIndex.ts +35 -0
- package/src/ui/screens/FormsScreen.tsx +186 -0
- package/src/ui/screens/GeofenceScreen.tsx +54 -0
- package/src/ui/screens/HttpRequestScreen.tsx +47 -0
- package/src/ui/screens/ImageCaptureScreen.tsx +95 -0
- package/src/ui/screens/PaymentScreen.tsx +213 -0
- package/src/ui/screens/PickupScreen.tsx +112 -0
- package/src/ui/screens/ScanScreen.tsx +159 -0
- package/src/ui/screens/StartWorkFlowScreen.tsx +233 -0
- package/src/ui/screens/ValidateOTPScreen.tsx +62 -0
- package/src/ui/screens/WithBaseDispatchScreen.tsx +33 -0
- package/src/ui/uiConfig/RouteParams.ts +28 -0
- package/src/utils/ApiUtils.ts +157 -0
- package/src/utils/ExecTaskUtils.ts +214 -0
- package/src/utils/Logger.ts +110 -0
- package/src/utils/NetworkUtil.ts +50 -0
- package/src/utils/SdkUtils.ts +155 -0
- package/src/utils/SyncManagerUtils.ts +223 -0
- package/src/utils/fcm/FCM.ts +118 -0
- package/src/utils/fcm/FcmUtils.ts +130 -0
- package/src/utils/helper.ts +67 -0
- package/src/utils/hooks/useModal.tsx +67 -0
- package/src/utils/hooks/useTimer.ts +44 -0
- package/src/utils/loginHelper.ts +51 -0
- package/src/utils/storage.ts +292 -0
- package/src/utils/test.json +17 -0
- package/src/utils/utils.ts +30 -0
- package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +0 -5
- package/android/gradlew +0 -185
- package/android/gradlew.bat +0 -89
|
@@ -6,9 +6,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
|
-
var
|
|
9
|
+
var _CaptureUtils = _interopRequireWildcard(require("./CaptureUtils"));
|
|
10
|
+
var CaptureUtils = _CaptureUtils;
|
|
10
11
|
var _Toaster = require("../../widgets/Toaster");
|
|
11
|
-
var _SdkColors = _interopRequireWildcard(require("../../../styles/SdkColors"));
|
|
12
12
|
var _MaterialIcons = _interopRequireDefault(require("react-native-vector-icons/MaterialIcons"));
|
|
13
13
|
var _CommonStyles = require("../../../styles/executionTasks/CommonStyles");
|
|
14
14
|
var _ExecTaskUtils = require("../../../utils/ExecTaskUtils");
|
|
@@ -20,42 +20,25 @@ var _Logger = _interopRequireWildcard(require("../../../utils/Logger"));
|
|
|
20
20
|
var _utils = require("../../../components/utils");
|
|
21
21
|
var _GoBackModal = _interopRequireDefault(require("../../../components/widgets/GoBackModal"));
|
|
22
22
|
var _native = require("@react-navigation/native");
|
|
23
|
+
var _circleXmark = _interopRequireDefault(require("./circle-xmark.svg"));
|
|
24
|
+
var _camera = _interopRequireDefault(require("./camera.svg"));
|
|
23
25
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
24
|
-
function _getRequireWildcardCache(
|
|
25
|
-
function _interopRequireWildcard(
|
|
26
|
-
const ImageItem = _ref => {
|
|
27
|
-
let {
|
|
28
|
-
item,
|
|
29
|
-
onPress
|
|
30
|
-
} = _ref;
|
|
31
|
-
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
32
|
-
style: {
|
|
33
|
-
marginEnd: 8
|
|
34
|
-
}
|
|
35
|
-
}, /*#__PURE__*/_react.default.createElement(_reactNative.Image, {
|
|
36
|
-
source: {
|
|
37
|
-
uri: item.path
|
|
38
|
-
},
|
|
39
|
-
style: styles.image
|
|
40
|
-
}), /*#__PURE__*/_react.default.createElement(_MaterialIcons.default, {
|
|
41
|
-
onPress: onPress,
|
|
42
|
-
name: "highlight-remove",
|
|
43
|
-
color: 'red',
|
|
44
|
-
size: 32,
|
|
45
|
-
style: {
|
|
46
|
-
position: 'absolute',
|
|
47
|
-
right: 5,
|
|
48
|
-
top: 5
|
|
49
|
-
}
|
|
50
|
-
}));
|
|
51
|
-
};
|
|
26
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
27
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
52
28
|
const ImageCapture = props => {
|
|
29
|
+
let numberOfImagesToCapture;
|
|
30
|
+
if (props.captureMode == "SINGLE") {
|
|
31
|
+
numberOfImagesToCapture = 1;
|
|
32
|
+
} else if (props.captureMode === 'MULTI' && props.captureCountLimit && props.captureCountLimit > 0) {
|
|
33
|
+
numberOfImagesToCapture = props.captureCountLimit;
|
|
34
|
+
}
|
|
53
35
|
const [images, setImages] = (0, _react.useState)([]);
|
|
36
|
+
const [imagesDummy, setImagesDummy] = (0, _react.useState)([]);
|
|
54
37
|
const [showCapture, setShowCapture] = (0, _react.useState)(true);
|
|
55
38
|
const [disableProceed, setDisableProceed] = (0, _react.useState)(false);
|
|
56
39
|
const [showBackModal, setShowBackModal] = (0, _react.useState)(false);
|
|
57
|
-
|
|
58
|
-
|
|
40
|
+
const [buttonProceed, setButtonProceed] = (0, _react.useState)(false);
|
|
41
|
+
const [numColumns, setNumColumns] = (0, _react.useState)(numberOfImagesToCapture <= 2 ? 1 : 2);
|
|
59
42
|
(0, _native.useFocusEffect)(_react.default.useCallback(() => {
|
|
60
43
|
const onBackPress = () => {
|
|
61
44
|
var _props$taskMeta;
|
|
@@ -90,6 +73,91 @@ const ImageCapture = props => {
|
|
|
90
73
|
}
|
|
91
74
|
});
|
|
92
75
|
}, [props.navigation, props.title]);
|
|
76
|
+
(0, _react.useEffect)(() => {
|
|
77
|
+
if (images.length === 0) {
|
|
78
|
+
let arr = [];
|
|
79
|
+
for (let i = 0; i < numberOfImagesToCapture; i++) {
|
|
80
|
+
arr.push({
|
|
81
|
+
path: ''
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
setImages(arr);
|
|
85
|
+
}
|
|
86
|
+
}, [images]);
|
|
87
|
+
const ImageItem = _ref => {
|
|
88
|
+
var _imagesDummy$index, _imagesDummy$index2, _imagesDummy$index3, _imagesDummy$index4;
|
|
89
|
+
let {
|
|
90
|
+
item,
|
|
91
|
+
index,
|
|
92
|
+
onPress
|
|
93
|
+
} = _ref;
|
|
94
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
95
|
+
style: {
|
|
96
|
+
width: numColumns == 2 ? '43%' : '88%',
|
|
97
|
+
height: numColumns == 2 ? 160 : numberOfImagesToCapture == 1 ? 336 : 180,
|
|
98
|
+
backgroundColor: 'white',
|
|
99
|
+
alignItems: 'center',
|
|
100
|
+
alignSelf: 'center',
|
|
101
|
+
borderWidth: 1,
|
|
102
|
+
borderColor: '#A3AAC2',
|
|
103
|
+
borderStyle: 'dashed',
|
|
104
|
+
borderRadius: 3,
|
|
105
|
+
marginTop: '6%',
|
|
106
|
+
marginStart: numColumns == 2 ? 17 : numberOfImagesToCapture == 1 ? 0 : 0
|
|
107
|
+
}
|
|
108
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
109
|
+
style: {
|
|
110
|
+
alignItems: 'center',
|
|
111
|
+
width: '80%',
|
|
112
|
+
height: '98%',
|
|
113
|
+
borderRadius: 3
|
|
114
|
+
}
|
|
115
|
+
}, (imagesDummy === null || imagesDummy === void 0 ? void 0 : imagesDummy.length) > index && (_imagesDummy$index = imagesDummy[index]) !== null && _imagesDummy$index !== void 0 && _imagesDummy$index.path ? null : /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
|
|
116
|
+
onPress: onPress
|
|
117
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
118
|
+
style: {
|
|
119
|
+
marginTop: numColumns === 2 ? '32%' : numberOfImagesToCapture === 1 ? '50%' : '20%'
|
|
120
|
+
}
|
|
121
|
+
}, /*#__PURE__*/_react.default.createElement(_camera.default, null))), /*#__PURE__*/_react.default.createElement(_reactNativePaper.Button, {
|
|
122
|
+
onPress: () => captureImage(index),
|
|
123
|
+
uppercase: false,
|
|
124
|
+
labelStyle: [{
|
|
125
|
+
fontFamily: _CommonStyles.Fonts.IBMPlexSans_500Medium,
|
|
126
|
+
fontStyle: 'normal',
|
|
127
|
+
fontWeight: 'normal',
|
|
128
|
+
fontSize: 14,
|
|
129
|
+
letterSpacing: 0.25,
|
|
130
|
+
color: '#5B80F7'
|
|
131
|
+
}]
|
|
132
|
+
}, (imagesDummy === null || imagesDummy === void 0 ? void 0 : imagesDummy.length) > index && (_imagesDummy$index2 = imagesDummy[index]) !== null && _imagesDummy$index2 !== void 0 && _imagesDummy$index2.path ? null : 'Click Photo'), /*#__PURE__*/_react.default.createElement(_reactNative.Image, {
|
|
133
|
+
source: {
|
|
134
|
+
uri: (imagesDummy === null || imagesDummy === void 0 ? void 0 : imagesDummy.length) > index ? (_imagesDummy$index3 = imagesDummy[index]) === null || _imagesDummy$index3 === void 0 ? void 0 : _imagesDummy$index3.path : item === null || item === void 0 ? void 0 : item.path
|
|
135
|
+
},
|
|
136
|
+
style: {
|
|
137
|
+
height: numColumns == 2 ? '75%' : numberOfImagesToCapture == 1 ? '85%' : '85%',
|
|
138
|
+
width: numColumns == 2 ? '105%' : '118%',
|
|
139
|
+
borderRadius: 10,
|
|
140
|
+
bottom: numColumns == 2 ? '6%' : numberOfImagesToCapture == 1 ? '2%' : '11%'
|
|
141
|
+
}
|
|
142
|
+
}), /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
|
|
143
|
+
onPress: onPress,
|
|
144
|
+
style: {
|
|
145
|
+
position: 'absolute',
|
|
146
|
+
top: numColumns == 2 ? '17%' : '9%',
|
|
147
|
+
marginRight: '2%'
|
|
148
|
+
}
|
|
149
|
+
}, (imagesDummy === null || imagesDummy === void 0 ? void 0 : imagesDummy.length) > index && ((_imagesDummy$index4 = imagesDummy[index]) === null || _imagesDummy$index4 === void 0 ? void 0 : _imagesDummy$index4.path) && /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
150
|
+
style: {
|
|
151
|
+
width: 25,
|
|
152
|
+
height: 25,
|
|
153
|
+
backgroundColor: 'white',
|
|
154
|
+
borderRadius: 15,
|
|
155
|
+
alignItems: 'center',
|
|
156
|
+
justifyContent: 'center',
|
|
157
|
+
marginLeft: numColumns == 2 ? '78%' : '96%'
|
|
158
|
+
}
|
|
159
|
+
}, /*#__PURE__*/_react.default.createElement(_circleXmark.default, null)))));
|
|
160
|
+
};
|
|
93
161
|
const renderModal = () => {
|
|
94
162
|
return /*#__PURE__*/_react.default.createElement(_GoBackModal.default, {
|
|
95
163
|
showModal: showBackModal,
|
|
@@ -106,17 +174,10 @@ const ImageCapture = props => {
|
|
|
106
174
|
const handleSubmit = async () => {
|
|
107
175
|
try {
|
|
108
176
|
setDisableProceed(true);
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
return;
|
|
114
|
-
}
|
|
115
|
-
if (props.captureMode === 'MULTI' && props.captureCountLimit && props.captureCountLimit > 0 && images.length > CaptureUtils.getMaxImagesCount(props)) {
|
|
116
|
-
(0, _Toaster.showToast)(`Max ${props.captureCountLimit} image(s) allowed.`);
|
|
117
|
-
return;
|
|
118
|
-
}
|
|
119
|
-
props.onSubmitET(await (0, CaptureUtils.getCaptureOutput)(images, props));
|
|
177
|
+
let imagesArray = imagesDummy.filter(item => item != null && item.path != null && item.path.length != 0);
|
|
178
|
+
console.log('imagesArray:', JSON.stringify(imagesArray));
|
|
179
|
+
if (imagesArray.length > 0) {
|
|
180
|
+
props.onSubmitET(await (0, _CaptureUtils.getCaptureOutput)(imagesArray, props));
|
|
120
181
|
} else {
|
|
121
182
|
(0, _Toaster.showToast)('No Images captured');
|
|
122
183
|
}
|
|
@@ -127,56 +188,80 @@ const ImageCapture = props => {
|
|
|
127
188
|
setDisableProceed(false);
|
|
128
189
|
}
|
|
129
190
|
};
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
191
|
+
|
|
192
|
+
// useEffect(() => {
|
|
193
|
+
// if (props.captureMode === 'SINGLE') {
|
|
194
|
+
// if (images.length > 0) {
|
|
195
|
+
// setShowCapture(false);
|
|
196
|
+
// } else setShowCapture(true);
|
|
197
|
+
// } else if (
|
|
198
|
+
// props.captureMode === 'MULTI' &&
|
|
199
|
+
// props.captureCountLimit &&
|
|
200
|
+
// props.captureCountLimit > 0
|
|
201
|
+
// ) {
|
|
202
|
+
// if (images.length === CaptureUtils.getMaxImagesCount(props)) {
|
|
203
|
+
// setShowCapture(false);
|
|
204
|
+
// } else setShowCapture(true);
|
|
205
|
+
// } else {
|
|
206
|
+
// if (images.length > 0) {
|
|
207
|
+
// setShowCapture(true);
|
|
208
|
+
// }
|
|
209
|
+
// }
|
|
210
|
+
// }, [images, props, showCapture]);
|
|
211
|
+
|
|
212
|
+
const captureImage = (0, _react.useCallback)(async index => {
|
|
213
|
+
// // if (!showCapture) {
|
|
214
|
+
// // showToast(`Max Image Limit reached`);
|
|
215
|
+
// // return;
|
|
216
|
+
// // }
|
|
217
|
+
// console.log("captureImage", CaptureUtils);
|
|
150
218
|
let imageDataResponse = await CaptureUtils.captureImage(props.resolution.breadth, props.resolution.length, props.fileSizeLimit);
|
|
151
219
|
if (imageDataResponse != null) {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
220
|
+
setButtonProceed(true);
|
|
221
|
+
let imgArray = [];
|
|
222
|
+
imgArray = imagesDummy;
|
|
223
|
+
imgArray[index] = {
|
|
224
|
+
id: CaptureUtils.getImagesFileName(),
|
|
225
|
+
// @ts-ignore
|
|
226
|
+
path: imageDataResponse.uri,
|
|
227
|
+
url: '',
|
|
228
|
+
timestamp: Date.now()
|
|
229
|
+
};
|
|
230
|
+
setImagesDummy([...imgArray]);
|
|
231
|
+
console.log("images211:", JSON.stringify(imgArray));
|
|
232
|
+
}
|
|
233
|
+
}, [props.resolution.breadth, props.resolution.length, props.fileSizeLimit]);
|
|
234
|
+
const deleteImage = async index => {
|
|
235
|
+
let imageDummyArray = [];
|
|
236
|
+
imageDummyArray = imagesDummy;
|
|
237
|
+
imageDummyArray[index].path = "";
|
|
238
|
+
setImagesDummy([...imageDummyArray]);
|
|
239
|
+
let initialProceedValue = false;
|
|
240
|
+
for (let i = 0; i < imageDummyArray.length; i++) {
|
|
241
|
+
var _imageDummyArray$i;
|
|
242
|
+
if ((_imageDummyArray$i = imageDummyArray[i]) !== null && _imageDummyArray$i !== void 0 && _imageDummyArray$i.path) {
|
|
243
|
+
initialProceedValue = true;
|
|
244
|
+
}
|
|
161
245
|
}
|
|
162
|
-
|
|
163
|
-
const deleteImage = async imageData => {
|
|
246
|
+
setButtonProceed(initialProceedValue);
|
|
164
247
|
try {
|
|
165
|
-
|
|
166
|
-
|
|
248
|
+
// setImagesDummy(filteredImages);
|
|
249
|
+
// setButtonProceed(false);
|
|
167
250
|
} catch (err) {
|
|
168
251
|
_Logger.default.getInstance().logEvent('deleteImageError', err.message, _Logger.LOG_TYPE.SDK_ERROR);
|
|
169
|
-
|
|
252
|
+
console.error("Error updating state after deletion:", err);
|
|
170
253
|
}
|
|
171
254
|
};
|
|
172
255
|
const renderItem = _ref2 => {
|
|
173
256
|
let {
|
|
174
|
-
item
|
|
257
|
+
item,
|
|
258
|
+
index
|
|
175
259
|
} = _ref2;
|
|
176
260
|
return /*#__PURE__*/_react.default.createElement(ImageItem, {
|
|
177
261
|
item: item,
|
|
262
|
+
index: index,
|
|
178
263
|
onPress: async () => {
|
|
179
|
-
await deleteImage(
|
|
264
|
+
await deleteImage(index);
|
|
180
265
|
}
|
|
181
266
|
});
|
|
182
267
|
};
|
|
@@ -186,56 +271,62 @@ const ImageCapture = props => {
|
|
|
186
271
|
style: styles.etMessageView
|
|
187
272
|
}, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
188
273
|
style: styles.etMessage
|
|
189
|
-
},
|
|
190
|
-
style:
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
274
|
+
}, "Take a photo of the shipments. Please ensure the items are clearly visible.")), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
275
|
+
style: {
|
|
276
|
+
backgroundColor: 'white',
|
|
277
|
+
width: 360,
|
|
278
|
+
height: numColumns == 2 ? '82%' : numberOfImagesToCapture == 1 ? '63%' : '70%',
|
|
279
|
+
alignSelf: 'center',
|
|
280
|
+
marginTop: '5%',
|
|
281
|
+
borderRadius: 7,
|
|
282
|
+
borderColor: '#E0E3EB',
|
|
283
|
+
borderWidth: 0.5
|
|
284
|
+
}
|
|
285
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.FlatList, {
|
|
197
286
|
data: images,
|
|
287
|
+
numColumns: numColumns,
|
|
198
288
|
renderItem: renderItem,
|
|
199
|
-
keyExtractor: item => item.id
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
uppercase: false,
|
|
203
|
-
labelStyle: [{
|
|
204
|
-
fontFamily: _CommonStyles.Fonts.IBMPlexSans_400Regular,
|
|
205
|
-
fontStyle: 'normal',
|
|
206
|
-
fontWeight: 'normal',
|
|
207
|
-
fontSize: 14,
|
|
208
|
-
alignItems: 'center',
|
|
209
|
-
textAlign: 'center',
|
|
210
|
-
letterSpacing: 0.25,
|
|
211
|
-
color: _SdkColors.default[_SdkColors.ColorTheme.LIGHT].primaryButton
|
|
212
|
-
}]
|
|
213
|
-
}, images.length > 0 ? 'Click more' : 'Click Picture')), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
214
|
-
style: [_CommonStyles.CommonStyles.bottom, {
|
|
215
|
-
marginStart: 10,
|
|
216
|
-
marginEnd: 10
|
|
217
|
-
}]
|
|
218
|
-
}, /*#__PURE__*/_react.default.createElement(_reactNativePaper.Button, {
|
|
219
|
-
disabled: disableProceed,
|
|
220
|
-
style: _CommonStyles.CommonStyles.nextButton,
|
|
221
|
-
mode: "contained",
|
|
222
|
-
labelStyle: _CommonStyles.CommonStyles.nextButtonLabel,
|
|
223
|
-
onPress: async () => {
|
|
224
|
-
await handleSubmit();
|
|
289
|
+
keyExtractor: item => item === null || item === void 0 ? void 0 : item.id,
|
|
290
|
+
contentContainerStyle: {
|
|
291
|
+
paddingBottom: '30%'
|
|
225
292
|
}
|
|
226
|
-
}
|
|
293
|
+
})), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
294
|
+
style: styles.bottomButtons
|
|
295
|
+
}, props.isSelfLoop == false && /*#__PURE__*/_react.default.createElement(_reactNativePaper.Button, {
|
|
227
296
|
style: [_CommonStyles.CommonStyles.cancelButton, {
|
|
228
|
-
|
|
297
|
+
flexGrow: 1,
|
|
298
|
+
marginStart: '3%'
|
|
229
299
|
}],
|
|
230
300
|
mode: "outlined",
|
|
231
|
-
labelStyle: _CommonStyles.CommonStyles.cancelButtonLabel,
|
|
301
|
+
labelStyle: [_CommonStyles.CommonStyles.cancelButtonLabel, {
|
|
302
|
+
textTransform: 'capitalize'
|
|
303
|
+
}],
|
|
232
304
|
onPress: async () => {
|
|
233
305
|
var _props$applicableReas;
|
|
234
306
|
props.onSubmitET({
|
|
235
307
|
...(await (0, _ExecTaskUtils.getBaseETResponse)(_ETConfig.EntityCode.IMAGE_CAPTURE, false, (0, _EventCodeContainer.getEventCodeByET)(_ETConfig.ExecutionTaskID.IMAGE_CAPTURE, false, (_props$applicableReas = props.applicableReasons) === null || _props$applicableReas === void 0 ? void 0 : _props$applicableReas.failure), '', props.mergedObjectiveId, _ETConfig.ExecutionTaskID.IMAGE_CAPTURE))
|
|
236
308
|
});
|
|
237
309
|
}
|
|
238
|
-
}, "Cancel")
|
|
310
|
+
}, "Cancel"), /*#__PURE__*/_react.default.createElement(_reactNativePaper.Button, {
|
|
311
|
+
labelStyle: {
|
|
312
|
+
color: buttonProceed ? '#ffff' : '#A3AAC2',
|
|
313
|
+
fontFamily: _CommonStyles.Fonts.IBMPlexSans_500Medium,
|
|
314
|
+
fontSize: 14,
|
|
315
|
+
lineHeight: 20,
|
|
316
|
+
textAlign: 'center',
|
|
317
|
+
textTransform: 'capitalize'
|
|
318
|
+
},
|
|
319
|
+
style: {
|
|
320
|
+
flexGrow: 1,
|
|
321
|
+
marginHorizontal: '3%',
|
|
322
|
+
backgroundColor: buttonProceed ? '#5B80F7' : '#E0E3EB'
|
|
323
|
+
},
|
|
324
|
+
disabled: !buttonProceed,
|
|
325
|
+
mode: "contained",
|
|
326
|
+
onPress: async () => {
|
|
327
|
+
await handleSubmit();
|
|
328
|
+
}
|
|
329
|
+
}, "Proceed"))));
|
|
239
330
|
};
|
|
240
331
|
const styles = _reactNative.StyleSheet.create({
|
|
241
332
|
imageEtContainer: {
|
|
@@ -243,39 +334,44 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
243
334
|
marginStart: 16,
|
|
244
335
|
marginEnd: 16,
|
|
245
336
|
borderWidth: 1,
|
|
246
|
-
borderColor: '
|
|
337
|
+
borderColor: '#A3AAC2',
|
|
247
338
|
padding: 10,
|
|
248
339
|
marginTop: 15,
|
|
249
340
|
borderStyle: 'dashed',
|
|
250
341
|
backgroundColor: '#FFFFFF',
|
|
251
342
|
alignItems: 'center',
|
|
252
343
|
justifyContent: 'center',
|
|
253
|
-
height:
|
|
344
|
+
height: 370,
|
|
345
|
+
borderRadius: 5
|
|
254
346
|
},
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
347
|
+
bottomButtons: {
|
|
348
|
+
width: "100%",
|
|
349
|
+
justifyContent: "space-between",
|
|
350
|
+
flexDirection: 'row',
|
|
351
|
+
backgroundColor: "white",
|
|
352
|
+
paddingVertical: 12,
|
|
353
|
+
bottom: 0,
|
|
354
|
+
position: "absolute",
|
|
355
|
+
borderTopColor: "#A3AAC2",
|
|
356
|
+
borderTopWidth: 0.5
|
|
258
357
|
},
|
|
259
358
|
etMessage: {
|
|
260
|
-
textAlign: 'center',
|
|
359
|
+
// textAlign: 'center',
|
|
261
360
|
fontStyle: 'normal',
|
|
262
|
-
fontWeight: '
|
|
263
|
-
fontSize:
|
|
361
|
+
fontWeight: '400',
|
|
362
|
+
fontSize: 16,
|
|
264
363
|
display: 'flex',
|
|
265
364
|
alignItems: 'center',
|
|
266
|
-
letterSpacing: 0.25,
|
|
267
365
|
color: '#000000',
|
|
268
|
-
fontFamily: _CommonStyles.Fonts.
|
|
366
|
+
fontFamily: _CommonStyles.Fonts.IBMPlexSans_400Regular
|
|
269
367
|
},
|
|
270
368
|
etMessageView: {
|
|
271
|
-
marginTop:
|
|
272
|
-
paddingStart:
|
|
273
|
-
paddingEnd: 40,
|
|
369
|
+
marginTop: 17,
|
|
370
|
+
paddingStart: 17,
|
|
274
371
|
paddingTop: 15,
|
|
275
372
|
paddingBottom: 15,
|
|
276
373
|
backgroundColor: '#ffffff'
|
|
277
374
|
}
|
|
278
375
|
});
|
|
279
|
-
var _default = ImageCapture;
|
|
280
|
-
exports.default = _default;
|
|
376
|
+
var _default = exports.default = ImageCapture;
|
|
281
377
|
//# sourceMappingURL=ImageCapture.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","CaptureUtils","_Toaster","_SdkColors","_MaterialIcons","_interopRequireDefault","_CommonStyles","_ExecTaskUtils","_ETConfig","_EventCodeContainer","_constants","_reactNativePaper","_Logger","_utils","_GoBackModal","_native","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","ImageItem","_ref","item","onPress","createElement","View","style","marginEnd","Image","source","uri","path","styles","image","name","color","size","position","right","top","ImageCapture","props","images","setImages","useState","showCapture","setShowCapture","disableProceed","setDisableProceed","showBackModal","setShowBackModal","useFocusEffect","React","useCallback","onBackPress","_props$taskMeta","taskMeta","enableGoBack","hasGoBackConnector","applicableReasons","navigation","goBack","BackHandler","addEventListener","removeEventListener","useLayoutEffect","setOptions","title","headerLeft","_props$taskMeta2","paddingRight","paddingTop","renderModal","showModal","setShowModal","onSuccess","onSubmitET","getBaseETResponse","EntityCode","IMAGE_CAPTURE","GO_BACK_EVENT_CODE","mergedObjectiveId","ExecutionTaskID","onFailure","handleSubmit","length","_props$additionalMult","additionalMultiConfig","minCaptureCount","captureCount","showToast","captureMode","captureCountLimit","getMaxImagesCount","getCaptureOutput","error","message","useEffect","captureImage","imageDataResponse","resolution","breadth","fileSizeLimit","prevState","id","getImagesFileName","url","timestamp","Date","now","deleteImage","imageData","filteredImages","err","Logger","getInstance","logEvent","LOG_TYPE","SDK_ERROR","renderItem","_ref2","Provider","CommonStyles","mainContainer","etMessageView","Text","etMessage","imageEtContainer","FlatList","horizontal","data","keyExtractor","Button","uppercase","labelStyle","fontFamily","Fonts","IBMPlexSans_400Regular","fontStyle","fontWeight","fontSize","alignItems","textAlign","letterSpacing","SdkColors","ColorTheme","LIGHT","primaryButton","bottom","marginStart","disabled","nextButton","mode","nextButtonLabel","cancelButton","marginTop","cancelButtonLabel","_props$applicableReas","getEventCodeByET","failure","StyleSheet","create","display","borderWidth","borderColor","padding","borderStyle","backgroundColor","justifyContent","height","width","IBMPlexSans_600SemiBold","paddingStart","paddingEnd","paddingBottom","_default","exports"],"sources":["ImageCapture.tsx"],"sourcesContent":["import React, {\n useCallback,\n useEffect,\n useState,\n useLayoutEffect,\n} from 'react';\nimport {\n BackHandler,\n FlatList,\n Image,\n StyleSheet,\n Text,\n View,\n} from 'react-native';\nimport type { CaptureInput, ImageData } from './CaptureSchema';\nimport * as CaptureUtils from './CaptureUtils';\nimport { getCaptureOutput } from './CaptureUtils';\nimport { showToast } from '../../widgets/Toaster';\nimport SdkColors, { ColorTheme } from '../../../styles/SdkColors';\nimport Icon from 'react-native-vector-icons/MaterialIcons';\nimport {\n CommonStyles,\n Fonts,\n} from '../../../styles/executionTasks/CommonStyles';\nimport { getBaseETResponse } from '../../../utils/ExecTaskUtils';\nimport {\n EntityCode,\n ExecutionTaskID,\n} from '../../../models/execTasks/ETConfig';\nimport { getEventCodeByET } from '../../../manager/dispatchCodes/EventCodeContainer';\nimport { GO_BACK_EVENT_CODE } from '../../../constants/constants';\nimport { Button, Modal, Portal, Provider } from 'react-native-paper';\nimport Logger, { LOG_TYPE } from '../../../utils/Logger';\nimport { hasGoBackConnector } from '../../../components/utils';\nimport GoBackModal from '../../../components/widgets/GoBackModal';\nimport { useFocusEffect } from '@react-navigation/native';\n\nconst ImageItem = ({ item, onPress }: { item: ImageData; onPress: any }) => (\n <View style={{ marginEnd: 8 }}>\n <Image source={{ uri: item.path }} style={styles.image} />\n <Icon\n onPress={onPress}\n name=\"highlight-remove\"\n color={'red'}\n size={32}\n style={{\n position: 'absolute',\n right: 5,\n top: 5,\n }}\n />\n </View>\n);\n\nconst ImageCapture = (props: CaptureInput) => {\n const [images, setImages] = useState<Array<ImageData>>([]);\n const [showCapture, setShowCapture] = useState(true);\n const [disableProceed, setDisableProceed] = useState(false);\n const [showBackModal, setShowBackModal] = useState(false);\n\n // Handle back-button click\n useFocusEffect(\n React.useCallback(() => {\n const onBackPress = () => {\n if (\n props.taskMeta?.enableGoBack &&\n hasGoBackConnector(props.applicableReasons)\n ) {\n setShowBackModal(true);\n return true;\n } else {\n props.navigation.goBack();\n return true;\n }\n };\n BackHandler.addEventListener('hardwareBackPress', onBackPress);\n return () =>\n BackHandler.removeEventListener('hardwareBackPress', onBackPress);\n }, [])\n );\n\n useLayoutEffect(() => {\n props.navigation.setOptions({\n title: props.title,\n headerLeft: () => {\n return (\n <Icon\n onPress={() => {\n if (\n props.taskMeta?.enableGoBack &&\n hasGoBackConnector(props.applicableReasons)\n )\n setShowBackModal(true);\n else props.navigation.goBack();\n }}\n name=\"arrow-back\"\n color={'black'}\n size={25}\n style={{\n paddingRight: 15,\n paddingTop: 5,\n }}\n />\n );\n },\n });\n }, [props.navigation, props.title]);\n\n const renderModal = () => {\n return (\n <GoBackModal\n showModal={showBackModal}\n setShowModal={setShowBackModal}\n onSuccess={async () => {\n props.onSubmitET({\n ...(await getBaseETResponse(\n EntityCode.IMAGE_CAPTURE,\n false,\n GO_BACK_EVENT_CODE,\n '',\n props.mergedObjectiveId,\n ExecutionTaskID.IMAGE_CAPTURE\n )),\n });\n setShowBackModal(false);\n }}\n onFailure={() => setShowBackModal(false)}\n />\n );\n };\n\n const handleSubmit = async () => {\n try {\n setDisableProceed(true);\n if (images.length > 0) {\n if (\n props.additionalMultiConfig?.minCaptureCount === 'N' &&\n images.length < props.captureCount\n ) {\n showToast(\n `Min ${props.captureCount} image(s) required to be captured.`\n );\n return;\n }\n if (\n props.captureMode === 'MULTI' &&\n props.captureCountLimit &&\n props.captureCountLimit > 0 &&\n images.length > CaptureUtils.getMaxImagesCount(props)\n ) {\n showToast(`Max ${props.captureCountLimit} image(s) allowed.`);\n return;\n }\n props.onSubmitET(await getCaptureOutput(images, props));\n } else {\n showToast('No Images captured');\n }\n } catch (error: any) {\n setDisableProceed(false);\n showToast(error.message);\n } finally {\n setDisableProceed(false);\n }\n };\n\n useEffect(() => {\n if (props.captureMode === 'SINGLE') {\n if (images.length > 0) {\n setShowCapture(false);\n } else setShowCapture(true);\n } else if (\n props.captureMode === 'MULTI' &&\n props.captureCountLimit &&\n props.captureCountLimit > 0\n ) {\n if (images.length === CaptureUtils.getMaxImagesCount(props)) {\n setShowCapture(false);\n } else setShowCapture(true);\n } else {\n if (images.length > 0) {\n setShowCapture(true);\n }\n }\n }, [images, props, showCapture]);\n\n const captureImage = useCallback(async () => {\n if (!showCapture) {\n showToast(`Max Image Limit reached`);\n return;\n }\n let imageDataResponse = await CaptureUtils.captureImage(\n props.resolution.breadth,\n props.resolution.length,\n props.fileSizeLimit\n );\n if (imageDataResponse != null) {\n setImages((prevState) => {\n return [\n ...prevState,\n {\n id: CaptureUtils.getImagesFileName(), // @ts-ignore\n path: imageDataResponse.uri,\n url: '',\n timestamp: Date.now(),\n },\n ];\n });\n }\n }, [props, showCapture]);\n\n const deleteImage = async (imageData: ImageData) => {\n try {\n let filteredImages = await CaptureUtils.deleteImage(imageData, images);\n setImages(filteredImages);\n } catch (err: any) {\n Logger.getInstance().logEvent(\n 'deleteImageError',\n err.message,\n LOG_TYPE.SDK_ERROR\n );\n return;\n }\n };\n\n const renderItem = ({ item }: { item: ImageData }) => {\n return (\n <ImageItem\n item={item}\n onPress={async () => {\n await deleteImage(item);\n }}\n />\n );\n };\n return (\n <Provider>\n {renderModal()}\n <View style={CommonStyles.mainContainer}>\n {props.message && (\n <View style={styles.etMessageView}>\n <Text style={styles.etMessage}>{props.message}</Text>\n </View>\n )}\n <View style={styles.imageEtContainer}>\n {images.length === 0 && (\n <Icon name={'photo-camera'} size={24} color={'#666666'} />\n )}\n {images.length > 0 && (\n <FlatList\n horizontal\n data={images}\n renderItem={renderItem}\n keyExtractor={(item) => item.id}\n />\n )}\n <Button\n onPress={() => captureImage()}\n uppercase={false}\n labelStyle={[\n {\n fontFamily: Fonts.IBMPlexSans_400Regular,\n fontStyle: 'normal',\n fontWeight: 'normal',\n fontSize: 14,\n alignItems: 'center',\n textAlign: 'center',\n letterSpacing: 0.25,\n color: SdkColors[ColorTheme.LIGHT].primaryButton,\n },\n ]}\n >\n {images.length > 0 ? 'Click more' : 'Click Picture'}\n </Button>\n </View>\n <View style={[CommonStyles.bottom, { marginStart: 10, marginEnd: 10 }]}>\n <Button\n disabled={disableProceed}\n style={CommonStyles.nextButton}\n mode=\"contained\"\n labelStyle={CommonStyles.nextButtonLabel}\n onPress={async () => {\n await handleSubmit();\n }}\n >\n Proceed\n </Button>\n <Button\n style={[CommonStyles.cancelButton, { marginTop: 10 }]}\n mode=\"outlined\"\n labelStyle={CommonStyles.cancelButtonLabel}\n onPress={async () => {\n props.onSubmitET({\n ...(await getBaseETResponse(\n EntityCode.IMAGE_CAPTURE,\n false,\n getEventCodeByET(\n ExecutionTaskID.IMAGE_CAPTURE,\n false,\n props.applicableReasons?.failure\n ),\n '',\n props.mergedObjectiveId,\n ExecutionTaskID.IMAGE_CAPTURE\n )),\n });\n }}\n >\n Cancel\n </Button>\n </View>\n </View>\n </Provider>\n );\n};\n\nconst styles = StyleSheet.create({\n imageEtContainer: {\n display: 'flex',\n marginStart: 16,\n marginEnd: 16,\n borderWidth: 1,\n borderColor: 'rgba(0, 0, 0, 0.1)',\n padding: 10,\n marginTop: 15,\n borderStyle: 'dashed',\n backgroundColor: '#FFFFFF',\n alignItems: 'center',\n justifyContent: 'center',\n height: 300,\n },\n image: {\n height: 250,\n width: 200,\n },\n etMessage: {\n textAlign: 'center',\n fontStyle: 'normal',\n fontWeight: '600',\n fontSize: 18,\n display: 'flex',\n alignItems: 'center',\n letterSpacing: 0.25,\n color: '#000000',\n fontFamily: Fonts.IBMPlexSans_600SemiBold,\n },\n etMessageView: {\n marginTop: 14,\n paddingStart: 40,\n paddingEnd: 40,\n paddingTop: 15,\n paddingBottom: 15,\n backgroundColor: '#ffffff',\n },\n});\n\nexport default ImageCapture;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAMA,IAAAC,YAAA,GAAAD,OAAA;AASA,IAAAE,YAAA,GAAAH,uBAAA,CAAAC,OAAA;AAEA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,UAAA,GAAAL,uBAAA,CAAAC,OAAA;AACA,IAAAK,cAAA,GAAAC,sBAA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ACjBC,QAAQ,EAAE,EAAE;IACZsB,OAAO,EAAE,MAAM;IACfrB,UAAU,EAAE,QAAQ;IACpBE,aAAa,EAAE,IAAI;IACnB5G,KAAK,EAAE,SAAS;IAChBoG,UAAU,EAAEC,mBAAK,CAACmC;EACpB,CAAC;EACD/C,aAAa,EAAE;IACb+B,SAAS,EAAE,EAAE;IACbiB,YAAY,EAAE,EAAE;IAChBC,UAAU,EAAE,EAAE;IACdtG,UAAU,EAAE,EAAE;IACduG,aAAa,EAAE,EAAE;IACjBP,eAAe,EAAE;EACnB;AACF,CAAC,CAAC;AAAC,IAAAQ,QAAA,GAEYvI,YAAY;AAAAwI,OAAA,CAAAhL,OAAA,GAAA+K,QAAA"}
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_CaptureUtils","CaptureUtils","_Toaster","_MaterialIcons","_interopRequireDefault","_CommonStyles","_ExecTaskUtils","_ETConfig","_EventCodeContainer","_constants","_reactNativePaper","_Logger","_utils","_GoBackModal","_native","_circleXmark","_camera","obj","__esModule","default","_getRequireWildcardCache","e","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","ImageCapture","props","numberOfImagesToCapture","captureMode","captureCountLimit","images","setImages","useState","imagesDummy","setImagesDummy","showCapture","setShowCapture","disableProceed","setDisableProceed","showBackModal","setShowBackModal","buttonProceed","setButtonProceed","numColumns","setNumColumns","useFocusEffect","React","useCallback","onBackPress","_props$taskMeta","taskMeta","enableGoBack","hasGoBackConnector","applicableReasons","navigation","goBack","BackHandler","addEventListener","removeEventListener","useLayoutEffect","setOptions","title","headerLeft","createElement","onPress","_props$taskMeta2","name","color","size","style","paddingRight","paddingTop","useEffect","length","arr","push","path","ImageItem","_ref","_imagesDummy$index","_imagesDummy$index2","_imagesDummy$index3","_imagesDummy$index4","item","index","View","width","height","backgroundColor","alignItems","alignSelf","borderWidth","borderColor","borderStyle","borderRadius","marginTop","marginStart","TouchableOpacity","Button","captureImage","uppercase","labelStyle","fontFamily","Fonts","IBMPlexSans_500Medium","fontStyle","fontWeight","fontSize","letterSpacing","Image","source","uri","bottom","position","top","marginRight","justifyContent","marginLeft","renderModal","showModal","setShowModal","onSuccess","onSubmitET","getBaseETResponse","EntityCode","IMAGE_CAPTURE","GO_BACK_EVENT_CODE","mergedObjectiveId","ExecutionTaskID","onFailure","handleSubmit","imagesArray","filter","console","log","JSON","stringify","getCaptureOutput","showToast","error","message","imageDataResponse","resolution","breadth","fileSizeLimit","imgArray","id","getImagesFileName","url","timestamp","Date","now","deleteImage","imageDummyArray","initialProceedValue","_imageDummyArray$i","err","Logger","getInstance","logEvent","LOG_TYPE","SDK_ERROR","renderItem","_ref2","Provider","CommonStyles","mainContainer","styles","etMessageView","Text","etMessage","FlatList","data","keyExtractor","contentContainerStyle","paddingBottom","bottomButtons","isSelfLoop","cancelButton","flexGrow","mode","cancelButtonLabel","textTransform","_props$applicableReas","getEventCodeByET","failure","lineHeight","textAlign","marginHorizontal","disabled","StyleSheet","create","imageEtContainer","display","marginEnd","padding","flexDirection","paddingVertical","borderTopColor","borderTopWidth","IBMPlexSans_400Regular","paddingStart","_default","exports"],"sources":["ImageCapture.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useState, useLayoutEffect } from 'react';\nimport { BackHandler, FlatList, Image, Platform, StyleSheet, Text, TouchableOpacity, View } from 'react-native';\nimport * as CaptureUtils from './CaptureUtils';\nimport { getCaptureOutput } from './CaptureUtils';\nimport { showToast } from '../../widgets/Toaster';\nimport SdkColors, { ColorTheme } from '../../../styles/SdkColors';\nimport Icon from 'react-native-vector-icons/Feather';\nimport Iconn from 'react-native-vector-icons/MaterialIcons';\nimport { CommonStyles, Fonts } from '../../../styles/executionTasks/CommonStyles';\nimport { getBaseETResponse } from '../../../utils/ExecTaskUtils';\nimport { EntityCode, ExecutionTaskID } from '../../../models/execTasks/ETConfig';\nimport { getEventCodeByET } from '../../../manager/dispatchCodes/EventCodeContainer';\nimport { GO_BACK_EVENT_CODE } from '../../../constants/constants';\nimport { Button, Provider } from 'react-native-paper';\nimport Logger, { LOG_TYPE } from '../../../utils/Logger';\nimport { hasGoBackConnector } from '../../../components/utils';\nimport GoBackModal from '../../../components/widgets/GoBackModal';\nimport { useFocusEffect } from '@react-navigation/native';\nimport Circle from \"./circle-xmark.svg\"\n\nimport CameraIcon from \"./camera.svg\"\n\nconst ImageCapture = (props: any) => {\n let numberOfImagesToCapture: any;\n if (props.captureMode == \"SINGLE\") {\n numberOfImagesToCapture = 1;\n } else if (props.captureMode === 'MULTI' && props.captureCountLimit && props.captureCountLimit > 0) {\n numberOfImagesToCapture = props.captureCountLimit;\n }\n\n const [images, setImages] = useState([]);\n const [imagesDummy, setImagesDummy] = useState<any[]>([]);\n const [showCapture, setShowCapture] = useState(true);\n const [disableProceed, setDisableProceed] = useState(false);\n const [showBackModal, setShowBackModal] = useState(false);\n const [buttonProceed, setButtonProceed] = useState(false);\n const [numColumns, setNumColumns] = useState(numberOfImagesToCapture <= 2 ? 1 : 2);\n\n useFocusEffect(\n React.useCallback(() => {\n const onBackPress = () => {\n if (\n props.taskMeta?.enableGoBack &&\n hasGoBackConnector(props.applicableReasons)\n ) {\n setShowBackModal(true);\n return true;\n } else {\n props.navigation.goBack();\n return true;\n }\n };\n BackHandler.addEventListener('hardwareBackPress', onBackPress);\n return () =>\n BackHandler.removeEventListener('hardwareBackPress', onBackPress);\n }, [])\n );\n\n useLayoutEffect(() => {\n props.navigation.setOptions({\n title: props.title,\n headerLeft: () => {\n return (\n <Iconn\n onPress={() => {\n if (\n props.taskMeta?.enableGoBack &&\n hasGoBackConnector(props.applicableReasons)\n )\n setShowBackModal(true);\n else props.navigation.goBack();\n }}\n name=\"arrow-back\"\n color={'black'}\n size={25}\n style={{\n paddingRight: 15,\n paddingTop: 5,\n }}\n />\n );\n },\n });\n }, [props.navigation, props.title]);\n\n useEffect(() => {\n\n if (images.length === 0) {\n let arr: any = [];\n for (let i = 0; i < numberOfImagesToCapture; i++) {\n arr.push({ path: '' });\n }\n setImages(arr);\n }\n }, [images]);\n\n\n interface ImageItemProps {\n item: { path: string };\n index: number;\n onPress: () => void;\n }\n\n const ImageItem: React.FC<ImageItemProps> = ({ item, index, onPress }) => {\n\n return (\n <View\n style={{\n width: numColumns == 2 ? '43%' : '88%',\n height: numColumns == 2 ? 160 : numberOfImagesToCapture == 1 ? 336 : 180,\n backgroundColor: 'white',\n alignItems: 'center',\n alignSelf: 'center',\n borderWidth: 1,\n borderColor: '#A3AAC2',\n borderStyle: 'dashed',\n borderRadius: 3,\n marginTop: '6%',\n marginStart: numColumns == 2 ? 17 : numberOfImagesToCapture == 1 ? 0 : 0,\n }}\n >\n <View\n style={{\n alignItems: 'center',\n width: '80%',\n height: '98%',\n borderRadius: 3,\n }}\n >\n {imagesDummy?.length > index && imagesDummy[index]?.path ? null : (\n <TouchableOpacity\n onPress={onPress}>\n<View\nstyle={{\n marginTop:\n numColumns === 2 ? '32%' : numberOfImagesToCapture === 1 ? '50%' : '20%',\n}}\n>\n<CameraIcon />\n</View>\n</TouchableOpacity>\n \n )}\n <Button\n onPress={() => captureImage(index)}\n uppercase={false}\n labelStyle={[\n {\n fontFamily: Fonts.IBMPlexSans_500Medium,\n fontStyle: 'normal',\n fontWeight: 'normal',\n fontSize: 14,\n letterSpacing: 0.25,\n color: '#5B80F7',\n },\n ]}\n >\n {imagesDummy?.length > index && imagesDummy[index]?.path ? null : 'Click Photo'}\n </Button>\n <Image\n source={{\n uri: imagesDummy?.length > index ? imagesDummy[index]?.path : item?.path,\n }}\n style={{\n height: numColumns == 2 ? '75%' : numberOfImagesToCapture == 1 ? '85%' : '85%',\n width: numColumns == 2 ? '105%' : '118%',\n borderRadius: 10,\n bottom:\n numColumns == 2 ? '6%' : numberOfImagesToCapture == 1 ? '2%' : '11%',\n }}\n />\n <TouchableOpacity\n onPress={onPress}\n style={{\n position: 'absolute',\n top: numColumns == 2 ? '17%' : '9%',\n marginRight: '2%',\n }}\n >\n {imagesDummy?.length > index && imagesDummy[index]?.path && (\n <View\n style={{\n width: 25,\n height: 25,\n backgroundColor: 'white',\n borderRadius: 15,\n alignItems: 'center',\n justifyContent: 'center',\n marginLeft: numColumns == 2 ? '78%' : '96%',\n }}\n >\n <Circle />\n </View>\n )}\n </TouchableOpacity>\n </View>\n </View>\n );\n };\n\n const renderModal = () => {\n return (\n <GoBackModal\n showModal={showBackModal}\n setShowModal={setShowBackModal}\n onSuccess={async () => {\n props.onSubmitET({\n ...(await getBaseETResponse(\n EntityCode.IMAGE_CAPTURE,\n false,\n GO_BACK_EVENT_CODE,\n '',\n props.mergedObjectiveId,\n ExecutionTaskID.IMAGE_CAPTURE\n )),\n });\n setShowBackModal(false);\n }}\n onFailure={() => setShowBackModal(false)}\n />\n );\n };\n\n const handleSubmit = async () => {\n try {\n setDisableProceed(true);\n let imagesArray = imagesDummy.filter(item => item != null && item.path != null && item.path.length != 0);\n console.log('imagesArray:', JSON.stringify(imagesArray));\n\n if (imagesArray.length > 0) {\n props.onSubmitET(await getCaptureOutput(imagesArray, props));\n } else {\n showToast('No Images captured');\n }\n } catch (error: any) {\n setDisableProceed(false);\n showToast(error.message);\n } finally {\n setDisableProceed(false);\n }\n };\n\n // useEffect(() => {\n // if (props.captureMode === 'SINGLE') {\n // if (images.length > 0) {\n // setShowCapture(false);\n // } else setShowCapture(true);\n // } else if (\n // props.captureMode === 'MULTI' &&\n // props.captureCountLimit &&\n // props.captureCountLimit > 0\n // ) {\n // if (images.length === CaptureUtils.getMaxImagesCount(props)) {\n // setShowCapture(false);\n // } else setShowCapture(true);\n // } else {\n // if (images.length > 0) {\n // setShowCapture(true);\n // }\n // }\n // }, [images, props, showCapture]);\n\n const captureImage = useCallback(async (index) => {\n // // if (!showCapture) {\n // // showToast(`Max Image Limit reached`);\n // // return;\n // // }\n // console.log(\"captureImage\", CaptureUtils);\n let imageDataResponse = await CaptureUtils.captureImage(\n props.resolution.breadth,\n props.resolution.length,\n props.fileSizeLimit\n );\n\n if (imageDataResponse != null) {\n setButtonProceed(true);\n\n let imgArray = [];\n imgArray = imagesDummy;\n imgArray[index] = {\n id: CaptureUtils.getImagesFileName(),\n // @ts-ignore\n path: imageDataResponse.uri,\n url: '',\n timestamp: Date.now(),\n };\n setImagesDummy([...imgArray])\n console.log(\"images211:\", JSON.stringify(imgArray));\n\n }\n }, [props.resolution.breadth, props.resolution.length, props.fileSizeLimit]);\n\n\n const deleteImage = async (index: any) => {\n let imageDummyArray = [];\n imageDummyArray = imagesDummy\n imageDummyArray[index].path = \"\"\n setImagesDummy([...imageDummyArray])\n\n let initialProceedValue = false;\n for (let i = 0; i < imageDummyArray.length; i++) {\n if (imageDummyArray[i]?.path) {\n initialProceedValue = true\n }\n }\n setButtonProceed(initialProceedValue);\n\n try {\n // setImagesDummy(filteredImages);\n // setButtonProceed(false);\n } catch (err: any) {\n Logger.getInstance().logEvent('deleteImageError', err.message, LOG_TYPE.SDK_ERROR);\n console.error(\"Error updating state after deletion:\", err);\n }\n };\n\n const renderItem = ({ item, index }: { item: any; index: any }) => {\n return (\n <ImageItem\n item={item}\n index={index}\n onPress={async () => {\n await deleteImage(index);\n }}\n />\n );\n };\n\n return (\n <Provider>\n {renderModal()}\n <View style={CommonStyles.mainContainer}>\n {props.message && (\n <View style={styles.etMessageView}>\n <Text style={styles.etMessage}>\n Take a photo of the shipments. Please ensure the items are clearly visible.\n </Text>\n </View>\n )}\n <View\n style={{\n backgroundColor: 'white',\n width: 360,\n height: numColumns == 2 ? '82%' : numberOfImagesToCapture == 1 ? '63%' : '70%',\n alignSelf: 'center',\n marginTop: '5%',\n borderRadius: 7,\n borderColor: '#E0E3EB',\n borderWidth: 0.5,\n }}\n >\n <FlatList\n data={images}\n numColumns={numColumns}\n renderItem={renderItem}\n keyExtractor={(item) => item?.id}\n contentContainerStyle={{ paddingBottom: '30%' }}\n />\n </View>\n <View style={styles.bottomButtons}>\n {(props.isSelfLoop == false) && <Button\n style={[CommonStyles.cancelButton, { flexGrow: 1, marginStart: '3%' }]}\n mode=\"outlined\"\n labelStyle={[CommonStyles.cancelButtonLabel, { textTransform: 'capitalize' }]}\n onPress={async () => {\n props.onSubmitET({\n ...(await getBaseETResponse(\n EntityCode.IMAGE_CAPTURE,\n false,\n getEventCodeByET(ExecutionTaskID.IMAGE_CAPTURE, false, props.applicableReasons?.failure),\n '',\n props.mergedObjectiveId,\n ExecutionTaskID.IMAGE_CAPTURE\n )),\n });\n }}\n >\n Cancel\n </Button>\n }\n <Button\n labelStyle={{\n color: buttonProceed ? '#ffff' : '#A3AAC2',\n fontFamily: Fonts.IBMPlexSans_500Medium,\n fontSize: 14,\n lineHeight: 20,\n textAlign: 'center',\n textTransform: 'capitalize',\n }}\n style={{\n flexGrow: 1,\n marginHorizontal: '3%',\n backgroundColor: buttonProceed ? '#5B80F7' : '#E0E3EB',\n }}\n disabled={!buttonProceed}\n mode=\"contained\"\n onPress={async () => {\n await handleSubmit();\n }}\n >\n Proceed\n </Button>\n </View>\n </View>\n </Provider>\n );\n};\n\nconst styles = StyleSheet.create({\n\n imageEtContainer: {\n display: 'flex',\n marginStart: 16,\n marginEnd: 16,\n borderWidth: 1,\n borderColor: '#A3AAC2',\n padding: 10,\n marginTop: 15,\n borderStyle: 'dashed',\n backgroundColor: '#FFFFFF',\n alignItems: 'center',\n justifyContent: 'center',\n height: 370,\n borderRadius: 5\n },\n\n bottomButtons: {\n width: \"100%\",\n justifyContent: \"space-between\",\n flexDirection: 'row',\n backgroundColor: \"white\",\n paddingVertical: 12,\n bottom: 0,\n position: \"absolute\",\n borderTopColor: \"#A3AAC2\",\n borderTopWidth: 0.5\n },\n etMessage: {\n // textAlign: 'center',\n fontStyle: 'normal',\n fontWeight: '400',\n fontSize: 16,\n display: 'flex',\n alignItems: 'center',\n color: '#000000',\n fontFamily: Fonts.IBMPlexSans_400Regular\n },\n etMessageView: {\n marginTop: 17,\n paddingStart: 17,\n paddingTop: 15,\n paddingBottom: 15,\n backgroundColor: '#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C,UAAU,EAAE,QAAQ;IACpB2B,cAAc,EAAE,QAAQ;IACxB7B,MAAM,EAAE,GAAG;IACXO,YAAY,EAAE;EAChB,CAAC;EAEDkF,aAAa,EAAE;IACb1F,KAAK,EAAE,MAAM;IACb8B,cAAc,EAAE,eAAe;IAC/BgF,aAAa,EAAE,KAAK;IACpB5G,eAAe,EAAE,OAAO;IACxB6G,eAAe,EAAE,EAAE;IACnBrF,MAAM,EAAE,CAAC;IACTC,QAAQ,EAAE,UAAU;IACpBqF,cAAc,EAAE,SAAS;IACzBC,cAAc,EAAE;EAClB,CAAC;EACD7B,SAAS,EAAE;IACT;IACAjE,SAAS,EAAE,QAAQ;IACnBC,UAAU,EAAE,KAAK;IACjBC,QAAQ,EAAE,EAAE;IACZsF,OAAO,EAAE,MAAM;IACfxG,UAAU,EAAE,QAAQ;IACpBtB,KAAK,EAAE,SAAS;IAChBmC,UAAU,EAAEC,mBAAK,CAACiG;EACpB,CAAC;EACDhC,aAAa,EAAE;IACbzE,SAAS,EAAE,EAAE;IACb0G,YAAY,EAAE,EAAE;IAChBlI,UAAU,EAAE,EAAE;IACdwG,aAAa,EAAE,EAAE;IACjBvF,eAAe,EAAE;EACnB;AACF,CAAC,CAAC;AAAC,IAAAkH,QAAA,GAAAC,OAAA,CAAAtM,OAAA,GAEYoB,YAAY"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M18 3.75H15.1875L14.8571 2.8707C14.4922 1.89648 13.5586 1.25 12.5156 1.25H8.48438C7.44141 1.25 6.51172 1.89492 6.14453 2.86914L5.8125 3.75H3C1.61914 3.75 0.5 4.87109 0.5 6.25V16.25C0.5 17.6309 1.61914 18.75 3 18.75H18C19.3809 18.75 20.5 17.6309 20.5 16.25V6.25C20.5 4.87109 19.3789 3.75 18 3.75ZM19.25 16.25C19.25 16.9375 18.6875 17.5 18 17.5H3C2.3125 17.5 1.75 16.9375 1.75 16.25V6.25C1.75 5.5625 2.3125 5 3 5H6.68164L7.31094 3.31328C7.49219 2.82422 7.92578 2.5 8.48047 2.5H12.5156C13.0375 2.5 13.5043 2.82426 13.6867 3.31328L14.3203 5H18C18.6875 5 19.25 5.5625 19.25 6.25V16.25ZM10.5 6.5625C7.91406 6.5625 5.8125 8.66406 5.8125 11.25C5.8125 13.8359 7.91211 15.9375 10.5 15.9375C13.0879 15.9375 15.1875 13.8379 15.1875 11.25C15.1875 8.66211 13.0898 6.5625 10.5 6.5625ZM10.5 14.6875C8.60547 14.6875 7.0625 13.1445 7.0625 11.25C7.0625 9.35547 8.60547 7.8125 10.5 7.8125C12.3945 7.8125 13.9375 9.35547 13.9375 11.25C13.9375 13.1445 12.3945 14.6875 10.5 14.6875Z" fill="#525B7A"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g id="FA-Icon/Light/circle-xmark">
|
|
3
|
+
<path id="Vector" d="M11.0512 6.34874C10.8559 6.15381 10.5393 6.15381 10.3443 6.34874L8.69804 7.99239L7.05117 6.34874C6.85586 6.15381 6.53929 6.15381 6.34429 6.34874C6.14929 6.54367 6.14898 6.85961 6.34429 7.05423L7.99179 8.69727L6.34492 10.3409C6.14961 10.5359 6.14961 10.8518 6.34492 11.0464C6.54011 11.2412 6.85648 11.2415 7.05179 11.0464L8.69804 9.40214L10.3446 11.0455C10.5398 11.2403 10.8562 11.2405 11.0515 11.0455C11.2468 10.8506 11.2468 10.5346 11.0515 10.34L9.40429 8.69727L11.0509 7.05392C11.248 6.86024 11.248 6.54211 11.0512 6.34874ZM8.69804 0.712891C4.27929 0.712891 0.698044 4.28715 0.698044 8.69727C0.698044 13.1074 4.27929 16.6816 8.69804 16.6816C13.1168 16.6816 16.698 13.1074 16.698 8.69727C16.698 4.28715 13.1168 0.712891 8.69804 0.712891ZM8.69804 15.6836C4.83867 15.6836 1.69804 12.5491 1.69804 8.69727C1.69804 4.84543 4.83867 1.71094 8.69804 1.71094C12.5574 1.71094 15.698 4.84543 15.698 8.69727C15.698 12.5491 12.5574 15.6836 8.69804 15.6836Z" fill="#DC2626"/>
|
|
4
|
+
</g>
|
|
5
|
+
</svg>
|