@os1-platform/dispatch-mobile 1.0.7 → 1.3.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +90 -26
- package/android/.gradle/6.8/fileChanges/last-build.bin +0 -0
- package/android/.gradle/6.8/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/6.8/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
- package/android/.gradle/checksums/checksums.lock +0 -0
- package/android/.gradle/configuration-cache/gc.properties +0 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/.idea/gradle.xml +13 -0
- package/android/.idea/misc.xml +4 -0
- package/android/.idea/vcs.xml +6 -0
- package/android/.idea/workspace.xml +131 -0
- package/android/gradle.properties +1 -1
- package/android/local.properties +8 -0
- package/android/src/main/AndroidManifest.xml +0 -1
- package/lib/commonjs/components/dispatch/DispatchExecNavigator.js +46 -39
- package/lib/commonjs/components/dispatch/DispatchExecNavigator.js.map +1 -1
- package/lib/commonjs/components/executiontasks/ExecutionTasksIndex.js +14 -24
- package/lib/commonjs/components/executiontasks/ExecutionTasksIndex.js.map +1 -1
- package/lib/commonjs/components/executiontasks/cancellation/CancelET.js +142 -23
- package/lib/commonjs/components/executiontasks/cancellation/CancelET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/cancellation/CancellationSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js +64 -16
- package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js.map +1 -1
- package/lib/commonjs/components/executiontasks/deliver/DeliverET.js +6 -16
- package/lib/commonjs/components/executiontasks/deliver/DeliverET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js +68 -26
- package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/display/DisplayModalET.js +4 -13
- package/lib/commonjs/components/executiontasks/display/DisplayModalET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/doodle/DoodleUtils.js +0 -2
- package/lib/commonjs/components/executiontasks/doodle/DoodleUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/doodle/SignatureET.js +61 -28
- package/lib/commonjs/components/executiontasks/doodle/SignatureET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/dropCash/DropCashET.js +5 -19
- package/lib/commonjs/components/executiontasks/dropCash/DropCashET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js +62 -18
- package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/FormGenerator.js +112 -28
- package/lib/commonjs/components/executiontasks/forms/FormGenerator.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/DateTimeWidget.js +3 -26
- package/lib/commonjs/components/executiontasks/forms/widgets/DateTimeWidget.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/DropdownWidget.js +49 -0
- package/lib/commonjs/components/executiontasks/forms/widgets/DropdownWidget.js.map +1 -0
- package/lib/commonjs/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js +1 -16
- package/lib/commonjs/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/TimeRangeSelector.js +0 -10
- package/lib/commonjs/components/executiontasks/forms/widgets/TimeRangeSelector.js.map +1 -1
- package/lib/commonjs/components/executiontasks/httpRequest/HttpEtUtils.js +4 -13
- package/lib/commonjs/components/executiontasks/httpRequest/HttpEtUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/httpRequest/HttpRequestET.js +0 -12
- package/lib/commonjs/components/executiontasks/httpRequest/HttpRequestET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/imageCapture/CaptureSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js +7 -35
- package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js +74 -49
- package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/PaymentStyles.js +0 -4
- package/lib/commonjs/components/executiontasks/payments/PaymentStyles.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/PaymentUtils.js +0 -2
- package/lib/commonjs/components/executiontasks/payments/PaymentUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js +64 -17
- package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js +63 -24
- package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js +71 -22
- package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/pickup/PickupET.js +5 -15
- package/lib/commonjs/components/executiontasks/pickup/PickupET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js +60 -19
- package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/ScanET.js +843 -0
- package/lib/commonjs/components/executiontasks/scan/ScanET.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/ScanSchema.js +6 -0
- package/lib/commonjs/components/executiontasks/scan/ScanSchema.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/constants.js +19 -0
- package/lib/commonjs/components/executiontasks/scan/constants.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/interfaces.js +29 -0
- package/lib/commonjs/components/executiontasks/scan/interfaces.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/CScanner.js +103 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/CScanner.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/DropDownUtils.js +74 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/DropDownUtils.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/ERDropDown.js +115 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/ERDropDown.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/ScanList.js +134 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/ScanList.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/utils.js +373 -0
- package/lib/commonjs/components/executiontasks/scan/utils.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scanner/CScanner.js +3 -21
- package/lib/commonjs/components/executiontasks/scanner/CScanner.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scanner/ScannerSchema.js +4 -9
- package/lib/commonjs/components/executiontasks/scanner/ScannerSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scanner/ScannerUtils.js +7 -36
- package/lib/commonjs/components/executiontasks/scanner/ScannerUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/DropDownSelector.js +0 -5
- package/lib/commonjs/components/executiontasks/scanner/returns/DropDownSelector.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/DropDownUtils.js +0 -9
- package/lib/commonjs/components/executiontasks/scanner/returns/DropDownUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/RTReasonSelection.js +0 -14
- package/lib/commonjs/components/executiontasks/scanner/returns/RTReasonSelection.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/RTScan.js +1 -40
- package/lib/commonjs/components/executiontasks/scanner/returns/RTScan.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/ReasonDropDown.js +0 -17
- package/lib/commonjs/components/executiontasks/scanner/returns/ReasonDropDown.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/ScanList.js +0 -28
- package/lib/commonjs/components/executiontasks/scanner/returns/ScanList.js.map +1 -1
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPET.js +334 -0
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPET.js.map +1 -0
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPSchema.js +14 -0
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPSchema.js.map +1 -0
- package/lib/commonjs/components/executiontasks/validateOTP/constants.js +37 -0
- package/lib/commonjs/components/executiontasks/validateOTP/constants.js.map +1 -0
- package/lib/commonjs/components/executiontasks/validateOTP/sub-components/OTPInput.js +59 -0
- package/lib/commonjs/components/executiontasks/validateOTP/sub-components/OTPInput.js.map +1 -0
- package/lib/commonjs/components/executiontasks/validateOTP/utils.js +147 -0
- package/lib/commonjs/components/executiontasks/validateOTP/utils.js.map +1 -0
- package/lib/commonjs/components/executiontasks/verifyLocation/GeofenceUtils.js +0 -13
- package/lib/commonjs/components/executiontasks/verifyLocation/GeofenceUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/verifyLocation/VerifyLocationET.js +4 -17
- package/lib/commonjs/components/executiontasks/verifyLocation/VerifyLocationET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpET.js +3 -18
- package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpET.js.map +1 -1
- package/lib/commonjs/components/widgets/AlertDisplay.js +0 -5
- package/lib/commonjs/components/widgets/AlertDisplay.js.map +1 -1
- package/lib/commonjs/components/widgets/CancelOrderDialog.js +0 -12
- package/lib/commonjs/components/widgets/CancelOrderDialog.js.map +1 -1
- package/lib/commonjs/components/widgets/IconButton.js +34 -0
- package/lib/commonjs/components/widgets/IconButton.js.map +1 -0
- package/lib/commonjs/components/widgets/ProgressDialog.js +0 -7
- package/lib/commonjs/components/widgets/ProgressDialog.js.map +1 -1
- package/lib/commonjs/components/widgets/SnackBarCustom.js +38 -38
- package/lib/commonjs/components/widgets/SnackBarCustom.js.map +1 -1
- package/lib/commonjs/components/widgets/SplitTextInput.js +93 -0
- package/lib/commonjs/components/widgets/SplitTextInput.js.map +1 -0
- package/lib/commonjs/components/widgets/Toaster.js +0 -2
- package/lib/commonjs/components/widgets/Toaster.js.map +1 -1
- package/lib/commonjs/config/DispatchSDKConfig.js +4 -5
- package/lib/commonjs/config/DispatchSDKConfig.js.map +1 -1
- package/lib/commonjs/constants/apiConstants.js +15 -0
- package/lib/commonjs/constants/apiConstants.js.map +1 -0
- package/lib/commonjs/constants/constants.js +7 -3
- package/lib/commonjs/constants/constants.js.map +1 -1
- package/lib/commonjs/constants/statuscode.js +3 -5
- package/lib/commonjs/constants/statuscode.js.map +1 -1
- package/lib/commonjs/errors/BaseError.js +3 -8
- package/lib/commonjs/errors/BaseError.js.map +1 -1
- package/lib/commonjs/errors/ErrorCodes.js +7 -6
- package/lib/commonjs/errors/ErrorCodes.js.map +1 -1
- package/lib/commonjs/events/EventDispatcher.js +27 -0
- package/lib/commonjs/events/EventDispatcher.js.map +1 -0
- package/lib/commonjs/events/EventListener.js +20 -0
- package/lib/commonjs/events/EventListener.js.map +1 -0
- package/lib/commonjs/events/constants.js +13 -0
- package/lib/commonjs/events/constants.js.map +1 -0
- package/lib/commonjs/events/index.js +11 -0
- package/lib/commonjs/events/index.js.map +1 -0
- package/lib/commonjs/events/interface.js +2 -0
- package/lib/commonjs/events/interface.js.map +1 -0
- package/lib/commonjs/index.js +9 -23
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/manager/dispatch/DispatchStateContainer.js +527 -177
- package/lib/commonjs/manager/dispatch/DispatchStateContainer.js.map +1 -1
- package/lib/commonjs/manager/dispatchCodes/EventCodeContainer.js +55 -4
- package/lib/commonjs/manager/dispatchCodes/EventCodeContainer.js.map +1 -1
- package/lib/commonjs/manager/dispatchCodes/EventCodeRepo.js +70 -0
- package/lib/commonjs/manager/dispatchCodes/EventCodeRepo.js.map +1 -0
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeContainer.js +3 -29
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeContainer.js.map +1 -1
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeRepo.js +6 -20
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeRepo.js.map +1 -1
- package/lib/commonjs/manager/jobRemoval/JobRemovalManager.js +27 -0
- package/lib/commonjs/manager/jobRemoval/JobRemovalManager.js.map +1 -0
- package/lib/commonjs/manager/location/LocationManager.js +3 -20
- package/lib/commonjs/manager/location/LocationManager.js.map +1 -1
- package/lib/commonjs/manager/sdk/DispatchSDKManager.js +8 -36
- package/lib/commonjs/manager/sdk/DispatchSDKManager.js.map +1 -1
- package/lib/commonjs/manager/sdk/DispatchSdkCache.js +6 -17
- package/lib/commonjs/manager/sdk/DispatchSdkCache.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/AppSyncManager.js +12 -46
- package/lib/commonjs/manager/syncmanager/AppSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/DBConfig.js +13 -7
- package/lib/commonjs/manager/syncmanager/DBConfig.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/NativeSyncManager.js +0 -2
- package/lib/commonjs/manager/syncmanager/NativeSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/database.js +28 -12
- package/lib/commonjs/manager/syncmanager/database.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js +0 -19
- package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentManager.js +3 -20
- package/lib/commonjs/manager/syncmanager/document/DocumentManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js +3 -52
- package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/events/ETEventsManager.js +59 -25
- package/lib/commonjs/manager/syncmanager/events/ETEventsManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/events/EventsSyncManager.js +77 -90
- package/lib/commonjs/manager/syncmanager/events/EventsSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/events/SyncHttpClient.js +27 -19
- package/lib/commonjs/manager/syncmanager/events/SyncHttpClient.js.map +1 -1
- package/lib/commonjs/models/DispatchModels.js +4 -5
- package/lib/commonjs/models/DispatchModels.js.map +1 -1
- package/lib/commonjs/models/ReasonCodes.js.map +1 -1
- package/lib/commonjs/models/execTasks/ETBaseModels.js.map +1 -1
- package/lib/commonjs/models/execTasks/ETConfig.js +28 -35
- package/lib/commonjs/models/execTasks/ETConfig.js.map +1 -1
- package/lib/commonjs/models/sdk.js +4 -5
- package/lib/commonjs/models/sdk.js.map +1 -1
- package/lib/commonjs/native/signature/SignatureCapture.js +3 -24
- package/lib/commonjs/native/signature/SignatureCapture.js.map +1 -1
- package/lib/commonjs/network/GraphQLClient.js +7 -35
- package/lib/commonjs/network/GraphQLClient.js.map +1 -1
- package/lib/commonjs/network/NetworkClient.js +2 -13
- package/lib/commonjs/network/NetworkClient.js.map +1 -1
- package/lib/commonjs/network/NetworkUtils.js +10 -8
- package/lib/commonjs/network/NetworkUtils.js.map +1 -1
- package/lib/commonjs/network/Queries.js +0 -2
- package/lib/commonjs/network/Queries.js.map +1 -1
- package/lib/commonjs/network/client.js +6 -21
- package/lib/commonjs/network/client.js.map +1 -1
- package/lib/commonjs/res/strings.js.map +1 -1
- package/lib/commonjs/resources/Login.js +4 -15
- package/lib/commonjs/resources/Login.js.map +1 -1
- package/lib/commonjs/resources/network.js +3 -8
- package/lib/commonjs/resources/network.js.map +1 -1
- package/lib/commonjs/styles/SdkColors.js +7 -7
- package/lib/commonjs/styles/SdkColors.js.map +1 -1
- package/lib/commonjs/styles/executionTasks/CommonStyles.js +42 -18
- package/lib/commonjs/styles/executionTasks/CommonStyles.js.map +1 -1
- package/lib/commonjs/ui/screens/CancellationScreen.js +36 -27
- package/lib/commonjs/ui/screens/CancellationScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/CaptureInputScreen.js +6 -15
- package/lib/commonjs/ui/screens/CaptureInputScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/CompleteObjectiveScreen.js +0 -19
- package/lib/commonjs/ui/screens/CompleteObjectiveScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DeliverScreen.js +6 -15
- package/lib/commonjs/ui/screens/DeliverScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DisplayScreen.js +7 -12
- package/lib/commonjs/ui/screens/DisplayScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DoodleScreen.js +6 -16
- package/lib/commonjs/ui/screens/DoodleScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DropCashScreen.js +6 -18
- package/lib/commonjs/ui/screens/DropCashScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ETScreensIndex.js +14 -16
- package/lib/commonjs/ui/screens/ETScreensIndex.js.map +1 -1
- package/lib/commonjs/ui/screens/FormsScreen.js +36 -15
- package/lib/commonjs/ui/screens/FormsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/GeofenceScreen.js +7 -13
- package/lib/commonjs/ui/screens/GeofenceScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HttpRequestScreen.js +5 -10
- package/lib/commonjs/ui/screens/HttpRequestScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ImageCaptureScreen.js +27 -14
- package/lib/commonjs/ui/screens/ImageCaptureScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PaymentScreen.js +11 -23
- package/lib/commonjs/ui/screens/PaymentScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PickupScreen.js +9 -13
- package/lib/commonjs/ui/screens/PickupScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/RTScanScreen.js +8 -27
- package/lib/commonjs/ui/screens/RTScanScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ScanScreen.js +268 -0
- package/lib/commonjs/ui/screens/ScanScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/StartWorkFlowScreen.js +21 -30
- package/lib/commonjs/ui/screens/StartWorkFlowScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ValidateOTPScreen.js +49 -0
- package/lib/commonjs/ui/screens/ValidateOTPScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/WithBaseDispatchScreen.js +0 -10
- package/lib/commonjs/ui/screens/WithBaseDispatchScreen.js.map +1 -1
- package/lib/commonjs/ui/uiConfig/RouteParams.js +9 -1
- package/lib/commonjs/ui/uiConfig/RouteParams.js.map +1 -1
- package/lib/commonjs/utils/ApiUtils.js +115 -0
- package/lib/commonjs/utils/ApiUtils.js.map +1 -0
- package/lib/commonjs/utils/ExecTaskUtils.js +93 -31
- package/lib/commonjs/utils/ExecTaskUtils.js.map +1 -1
- package/lib/commonjs/utils/Logger.js +10 -29
- package/lib/commonjs/utils/Logger.js.map +1 -1
- package/lib/commonjs/utils/NetworkUtil.js +3 -19
- package/lib/commonjs/utils/NetworkUtil.js.map +1 -1
- package/lib/commonjs/utils/SdkUtils.js +2 -31
- package/lib/commonjs/utils/SdkUtils.js.map +1 -1
- package/lib/commonjs/utils/SyncManagerUtils.js +25 -40
- package/lib/commonjs/utils/SyncManagerUtils.js.map +1 -1
- package/lib/commonjs/utils/fcm/FCM.js +35 -16
- package/lib/commonjs/utils/fcm/FCM.js.map +1 -1
- package/lib/commonjs/utils/fcm/FcmUtils.js +50 -25
- package/lib/commonjs/utils/fcm/FcmUtils.js.map +1 -1
- package/lib/commonjs/utils/helper.js +0 -5
- package/lib/commonjs/utils/helper.js.map +1 -1
- package/lib/commonjs/utils/hooks/useTimer.js +44 -0
- package/lib/commonjs/utils/hooks/useTimer.js.map +1 -0
- package/lib/commonjs/utils/loginHelper.js +6 -18
- package/lib/commonjs/utils/loginHelper.js.map +1 -1
- package/lib/commonjs/utils/storage.js +53 -32
- package/lib/commonjs/utils/storage.js.map +1 -1
- package/lib/commonjs/utils/utils.js +8 -11
- package/lib/commonjs/utils/utils.js.map +1 -1
- package/lib/module/components/dispatch/DispatchExecNavigator.js +46 -28
- package/lib/module/components/dispatch/DispatchExecNavigator.js.map +1 -1
- package/lib/module/components/executiontasks/ExecutionTasksIndex.js +3 -1
- package/lib/module/components/executiontasks/ExecutionTasksIndex.js.map +1 -1
- package/lib/module/components/executiontasks/cancellation/CancelET.js +145 -19
- package/lib/module/components/executiontasks/cancellation/CancelET.js.map +1 -1
- package/lib/module/components/executiontasks/cancellation/CancellationSchema.js.map +1 -1
- package/lib/module/components/executiontasks/captureInput/CaptureText.js +66 -9
- package/lib/module/components/executiontasks/captureInput/CaptureText.js.map +1 -1
- package/lib/module/components/executiontasks/deliver/DeliverET.js +6 -7
- package/lib/module/components/executiontasks/deliver/DeliverET.js.map +1 -1
- package/lib/module/components/executiontasks/deliver/SLDeliverET.js +69 -16
- package/lib/module/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
- package/lib/module/components/executiontasks/display/DisplayModalET.js +4 -3
- package/lib/module/components/executiontasks/display/DisplayModalET.js.map +1 -1
- package/lib/module/components/executiontasks/doodle/DoodleUtils.js.map +1 -1
- package/lib/module/components/executiontasks/doodle/SignatureET.js +64 -14
- package/lib/module/components/executiontasks/doodle/SignatureET.js.map +1 -1
- package/lib/module/components/executiontasks/dropCash/DropCashET.js +5 -6
- package/lib/module/components/executiontasks/dropCash/DropCashET.js.map +1 -1
- package/lib/module/components/executiontasks/dropCash/SLDropCash.js +62 -8
- package/lib/module/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
- package/lib/module/components/executiontasks/forms/FormGenerator.js +114 -14
- package/lib/module/components/executiontasks/forms/FormGenerator.js.map +1 -1
- package/lib/module/components/executiontasks/forms/widgets/DateTimeWidget.js +3 -15
- package/lib/module/components/executiontasks/forms/widgets/DateTimeWidget.js.map +1 -1
- package/lib/module/components/executiontasks/forms/widgets/DropdownWidget.js +39 -0
- package/lib/module/components/executiontasks/forms/widgets/DropdownWidget.js.map +1 -0
- package/lib/module/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js +1 -5
- package/lib/module/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js.map +1 -1
- package/lib/module/components/executiontasks/forms/widgets/TimeRangeSelector.js +0 -3
- package/lib/module/components/executiontasks/forms/widgets/TimeRangeSelector.js.map +1 -1
- package/lib/module/components/executiontasks/httpRequest/HttpEtUtils.js +4 -2
- package/lib/module/components/executiontasks/httpRequest/HttpEtUtils.js.map +1 -1
- package/lib/module/components/executiontasks/httpRequest/HttpRequestET.js +0 -3
- package/lib/module/components/executiontasks/httpRequest/HttpRequestET.js.map +1 -1
- package/lib/module/components/executiontasks/imageCapture/CaptureSchema.js.map +1 -1
- package/lib/module/components/executiontasks/imageCapture/CaptureUtils.js +7 -10
- package/lib/module/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
- package/lib/module/components/executiontasks/imageCapture/ImageCapture.js +75 -35
- package/lib/module/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
- package/lib/module/components/executiontasks/payments/PaymentStyles.js.map +1 -1
- package/lib/module/components/executiontasks/payments/PaymentUtils.js.map +1 -1
- package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentET.js +64 -6
- package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
- package/lib/module/components/executiontasks/payments/init/InitPaymentET.js +63 -11
- package/lib/module/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
- package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentET.js +71 -10
- package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
- package/lib/module/components/executiontasks/pickup/PickupET.js +5 -6
- package/lib/module/components/executiontasks/pickup/PickupET.js.map +1 -1
- package/lib/module/components/executiontasks/pickup/SLPickupET.js +61 -10
- package/lib/module/components/executiontasks/pickup/SLPickupET.js.map +1 -1
- package/lib/module/components/executiontasks/scan/ScanET.js +833 -0
- package/lib/module/components/executiontasks/scan/ScanET.js.map +1 -0
- package/lib/module/components/executiontasks/scan/ScanSchema.js +2 -0
- package/lib/module/components/executiontasks/scan/ScanSchema.js.map +1 -0
- package/lib/module/components/executiontasks/scan/constants.js +7 -0
- package/lib/module/components/executiontasks/scan/constants.js.map +1 -0
- package/lib/module/components/executiontasks/scan/interfaces.js +21 -0
- package/lib/module/components/executiontasks/scan/interfaces.js.map +1 -0
- package/lib/module/components/executiontasks/scan/sub_components/CScanner.js +94 -0
- package/lib/module/components/executiontasks/scan/sub_components/CScanner.js.map +1 -0
- package/lib/module/components/executiontasks/scan/sub_components/DropDownUtils.js +66 -0
- package/lib/module/components/executiontasks/scan/sub_components/DropDownUtils.js.map +1 -0
- package/lib/module/components/executiontasks/scan/sub_components/ERDropDown.js +105 -0
- package/lib/module/components/executiontasks/scan/sub_components/ERDropDown.js.map +1 -0
- package/lib/module/components/executiontasks/scan/sub_components/ScanList.js +124 -0
- package/lib/module/components/executiontasks/scan/sub_components/ScanList.js.map +1 -0
- package/lib/module/components/executiontasks/scan/utils.js +358 -0
- package/lib/module/components/executiontasks/scan/utils.js.map +1 -0
- package/lib/module/components/executiontasks/scanner/CScanner.js +3 -8
- package/lib/module/components/executiontasks/scanner/CScanner.js.map +1 -1
- package/lib/module/components/executiontasks/scanner/ScannerSchema.js +3 -3
- package/lib/module/components/executiontasks/scanner/ScannerSchema.js.map +1 -1
- package/lib/module/components/executiontasks/scanner/ScannerUtils.js +6 -18
- package/lib/module/components/executiontasks/scanner/ScannerUtils.js.map +1 -1
- package/lib/module/components/executiontasks/scanner/returns/DropDownSelector.js +0 -2
- package/lib/module/components/executiontasks/scanner/returns/DropDownSelector.js.map +1 -1
- package/lib/module/components/executiontasks/scanner/returns/DropDownUtils.js +0 -5
- package/lib/module/components/executiontasks/scanner/returns/DropDownUtils.js.map +1 -1
- package/lib/module/components/executiontasks/scanner/returns/RTReasonSelection.js +0 -3
- package/lib/module/components/executiontasks/scanner/returns/RTReasonSelection.js.map +1 -1
- package/lib/module/components/executiontasks/scanner/returns/RTScan.js +1 -19
- package/lib/module/components/executiontasks/scanner/returns/RTScan.js.map +1 -1
- package/lib/module/components/executiontasks/scanner/returns/ReasonDropDown.js +0 -7
- package/lib/module/components/executiontasks/scanner/returns/ReasonDropDown.js.map +1 -1
- package/lib/module/components/executiontasks/scanner/returns/ScanList.js +0 -15
- package/lib/module/components/executiontasks/scanner/returns/ScanList.js.map +1 -1
- package/lib/module/components/executiontasks/validateOTP/ValidateOTPET.js +325 -0
- package/lib/module/components/executiontasks/validateOTP/ValidateOTPET.js.map +1 -0
- package/lib/module/components/executiontasks/validateOTP/ValidateOTPSchema.js +8 -0
- package/lib/module/components/executiontasks/validateOTP/ValidateOTPSchema.js.map +1 -0
- package/lib/module/components/executiontasks/validateOTP/constants.js +25 -0
- package/lib/module/components/executiontasks/validateOTP/constants.js.map +1 -0
- package/lib/module/components/executiontasks/validateOTP/sub-components/OTPInput.js +49 -0
- package/lib/module/components/executiontasks/validateOTP/sub-components/OTPInput.js.map +1 -0
- package/lib/module/components/executiontasks/validateOTP/utils.js +133 -0
- package/lib/module/components/executiontasks/validateOTP/utils.js.map +1 -0
- package/lib/module/components/executiontasks/verifyLocation/GeofenceUtils.js +0 -6
- package/lib/module/components/executiontasks/verifyLocation/GeofenceUtils.js.map +1 -1
- package/lib/module/components/executiontasks/verifyLocation/VerifyLocationET.js +4 -3
- package/lib/module/components/executiontasks/verifyLocation/VerifyLocationET.js.map +1 -1
- package/lib/module/components/executiontasks/verifyOtp/VerifyOtpET.js +4 -8
- package/lib/module/components/executiontasks/verifyOtp/VerifyOtpET.js.map +1 -1
- package/lib/module/components/widgets/AlertDisplay.js.map +1 -1
- package/lib/module/components/widgets/CancelOrderDialog.js +0 -2
- package/lib/module/components/widgets/CancelOrderDialog.js.map +1 -1
- package/lib/module/components/widgets/IconButton.js +26 -0
- package/lib/module/components/widgets/IconButton.js.map +1 -0
- package/lib/module/components/widgets/ProgressDialog.js +0 -2
- package/lib/module/components/widgets/ProgressDialog.js.map +1 -1
- package/lib/module/components/widgets/SnackBarCustom.js +36 -18
- package/lib/module/components/widgets/SnackBarCustom.js.map +1 -1
- package/lib/module/components/widgets/SplitTextInput.js +84 -0
- package/lib/module/components/widgets/SplitTextInput.js.map +1 -0
- package/lib/module/components/widgets/Toaster.js.map +1 -1
- package/lib/module/config/DispatchSDKConfig.js +3 -4
- package/lib/module/config/DispatchSDKConfig.js.map +1 -1
- package/lib/module/constants/apiConstants.js +7 -0
- package/lib/module/constants/apiConstants.js.map +1 -0
- package/lib/module/constants/constants.js +4 -2
- package/lib/module/constants/constants.js.map +1 -1
- package/lib/module/constants/statuscode.js +3 -5
- package/lib/module/constants/statuscode.js.map +1 -1
- package/lib/module/errors/BaseError.js +3 -6
- package/lib/module/errors/BaseError.js.map +1 -1
- package/lib/module/errors/ErrorCodes.js +5 -5
- package/lib/module/errors/ErrorCodes.js.map +1 -1
- package/lib/module/events/EventDispatcher.js +19 -0
- package/lib/module/events/EventDispatcher.js.map +1 -0
- package/lib/module/events/EventListener.js +13 -0
- package/lib/module/events/EventListener.js.map +1 -0
- package/lib/module/events/constants.js +6 -0
- package/lib/module/events/constants.js.map +1 -0
- package/lib/module/events/index.js +3 -0
- package/lib/module/events/index.js.map +1 -0
- package/lib/module/events/interface.js +2 -0
- package/lib/module/events/interface.js.map +1 -0
- package/lib/module/index.js +4 -3
- package/lib/module/index.js.map +1 -1
- package/lib/module/manager/dispatch/DispatchStateContainer.js +529 -151
- package/lib/module/manager/dispatch/DispatchStateContainer.js.map +1 -1
- package/lib/module/manager/dispatchCodes/EventCodeContainer.js +52 -2
- package/lib/module/manager/dispatchCodes/EventCodeContainer.js.map +1 -1
- package/lib/module/manager/dispatchCodes/EventCodeRepo.js +61 -0
- package/lib/module/manager/dispatchCodes/EventCodeRepo.js.map +1 -0
- package/lib/module/manager/dispatchCodes/ReasonCodeContainer.js +3 -16
- package/lib/module/manager/dispatchCodes/ReasonCodeContainer.js.map +1 -1
- package/lib/module/manager/dispatchCodes/ReasonCodeRepo.js +6 -14
- package/lib/module/manager/dispatchCodes/ReasonCodeRepo.js.map +1 -1
- package/lib/module/manager/jobRemoval/JobRemovalManager.js +20 -0
- package/lib/module/manager/jobRemoval/JobRemovalManager.js.map +1 -0
- package/lib/module/manager/location/LocationManager.js +3 -14
- package/lib/module/manager/location/LocationManager.js.map +1 -1
- package/lib/module/manager/sdk/DispatchSDKManager.js +8 -14
- package/lib/module/manager/sdk/DispatchSDKManager.js.map +1 -1
- package/lib/module/manager/sdk/DispatchSdkCache.js +6 -13
- package/lib/module/manager/sdk/DispatchSdkCache.js.map +1 -1
- package/lib/module/manager/syncmanager/AppSyncManager.js +12 -26
- package/lib/module/manager/syncmanager/AppSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/DBConfig.js +9 -5
- package/lib/module/manager/syncmanager/DBConfig.js.map +1 -1
- package/lib/module/manager/syncmanager/NativeSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/database.js +27 -3
- package/lib/module/manager/syncmanager/database.js.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentHttpClient.js +0 -7
- package/lib/module/manager/syncmanager/document/DocumentHttpClient.js.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentManager.js +3 -14
- package/lib/module/manager/syncmanager/document/DocumentManager.js.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentSyncManager.js +3 -35
- package/lib/module/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/events/ETEventsManager.js +59 -18
- package/lib/module/manager/syncmanager/events/ETEventsManager.js.map +1 -1
- package/lib/module/manager/syncmanager/events/EventsSyncManager.js +77 -68
- package/lib/module/manager/syncmanager/events/EventsSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/events/SyncHttpClient.js +26 -11
- package/lib/module/manager/syncmanager/events/SyncHttpClient.js.map +1 -1
- package/lib/module/models/DispatchModels.js +3 -4
- package/lib/module/models/DispatchModels.js.map +1 -1
- package/lib/module/models/ReasonCodes.js.map +1 -1
- package/lib/module/models/execTasks/ETBaseModels.js.map +1 -1
- package/lib/module/models/execTasks/ETConfig.js +22 -29
- package/lib/module/models/execTasks/ETConfig.js.map +1 -1
- package/lib/module/models/sdk.js +3 -4
- package/lib/module/models/sdk.js.map +1 -1
- package/lib/module/native/signature/SignatureCapture.js +3 -18
- package/lib/module/native/signature/SignatureCapture.js.map +1 -1
- package/lib/module/network/GraphQLClient.js +6 -26
- package/lib/module/network/GraphQLClient.js.map +1 -1
- package/lib/module/network/NetworkClient.js +2 -6
- package/lib/module/network/NetworkClient.js.map +1 -1
- package/lib/module/network/NetworkUtils.js +10 -3
- package/lib/module/network/NetworkUtils.js.map +1 -1
- package/lib/module/network/Queries.js.map +1 -1
- package/lib/module/network/client.js +7 -17
- package/lib/module/network/client.js.map +1 -1
- package/lib/module/res/strings.js.map +1 -1
- package/lib/module/resources/Login.js +4 -13
- package/lib/module/resources/Login.js.map +1 -1
- package/lib/module/resources/network.js +3 -6
- package/lib/module/resources/network.js.map +1 -1
- package/lib/module/styles/SdkColors.js +6 -6
- package/lib/module/styles/SdkColors.js.map +1 -1
- package/lib/module/styles/executionTasks/CommonStyles.js +41 -7
- package/lib/module/styles/executionTasks/CommonStyles.js.map +1 -1
- package/lib/module/ui/screens/CancellationScreen.js +36 -14
- package/lib/module/ui/screens/CancellationScreen.js.map +1 -1
- package/lib/module/ui/screens/CaptureInputScreen.js +7 -4
- package/lib/module/ui/screens/CaptureInputScreen.js.map +1 -1
- package/lib/module/ui/screens/CompleteObjectiveScreen.js +0 -3
- package/lib/module/ui/screens/CompleteObjectiveScreen.js.map +1 -1
- package/lib/module/ui/screens/DeliverScreen.js +7 -4
- package/lib/module/ui/screens/DeliverScreen.js.map +1 -1
- package/lib/module/ui/screens/DisplayScreen.js +5 -4
- package/lib/module/ui/screens/DisplayScreen.js.map +1 -1
- package/lib/module/ui/screens/DoodleScreen.js +7 -4
- package/lib/module/ui/screens/DoodleScreen.js.map +1 -1
- package/lib/module/ui/screens/DropCashScreen.js +7 -7
- package/lib/module/ui/screens/DropCashScreen.js.map +1 -1
- package/lib/module/ui/screens/ETScreensIndex.js +3 -1
- package/lib/module/ui/screens/ETScreensIndex.js.map +1 -1
- package/lib/module/ui/screens/FormsScreen.js +34 -6
- package/lib/module/ui/screens/FormsScreen.js.map +1 -1
- package/lib/module/ui/screens/GeofenceScreen.js +5 -4
- package/lib/module/ui/screens/GeofenceScreen.js.map +1 -1
- package/lib/module/ui/screens/HttpRequestScreen.js +5 -3
- package/lib/module/ui/screens/HttpRequestScreen.js.map +1 -1
- package/lib/module/ui/screens/ImageCaptureScreen.js +25 -5
- package/lib/module/ui/screens/ImageCaptureScreen.js.map +1 -1
- package/lib/module/ui/screens/PaymentScreen.js +12 -10
- package/lib/module/ui/screens/PaymentScreen.js.map +1 -1
- package/lib/module/ui/screens/PickupScreen.js +7 -5
- package/lib/module/ui/screens/PickupScreen.js.map +1 -1
- package/lib/module/ui/screens/RTScanScreen.js +9 -13
- package/lib/module/ui/screens/RTScanScreen.js.map +1 -1
- package/lib/module/ui/screens/ScanScreen.js +259 -0
- package/lib/module/ui/screens/ScanScreen.js.map +1 -0
- package/lib/module/ui/screens/StartWorkFlowScreen.js +22 -9
- package/lib/module/ui/screens/StartWorkFlowScreen.js.map +1 -1
- package/lib/module/ui/screens/ValidateOTPScreen.js +39 -0
- package/lib/module/ui/screens/ValidateOTPScreen.js.map +1 -0
- package/lib/module/ui/screens/WithBaseDispatchScreen.js +0 -3
- package/lib/module/ui/screens/WithBaseDispatchScreen.js.map +1 -1
- package/lib/module/ui/uiConfig/RouteParams.js +9 -1
- package/lib/module/ui/uiConfig/RouteParams.js.map +1 -1
- package/lib/module/utils/ApiUtils.js +101 -0
- package/lib/module/utils/ApiUtils.js.map +1 -0
- package/lib/module/utils/ExecTaskUtils.js +92 -21
- package/lib/module/utils/ExecTaskUtils.js.map +1 -1
- package/lib/module/utils/Logger.js +9 -21
- package/lib/module/utils/Logger.js.map +1 -1
- package/lib/module/utils/NetworkUtil.js +3 -15
- package/lib/module/utils/NetworkUtil.js.map +1 -1
- package/lib/module/utils/SdkUtils.js +2 -15
- package/lib/module/utils/SdkUtils.js.map +1 -1
- package/lib/module/utils/SyncManagerUtils.js +25 -10
- package/lib/module/utils/SyncManagerUtils.js.map +1 -1
- package/lib/module/utils/fcm/FCM.js +35 -4
- package/lib/module/utils/fcm/FCM.js.map +1 -1
- package/lib/module/utils/fcm/FcmUtils.js +50 -7
- package/lib/module/utils/fcm/FcmUtils.js.map +1 -1
- package/lib/module/utils/helper.js +0 -3
- package/lib/module/utils/helper.js.map +1 -1
- package/lib/module/utils/hooks/useTimer.js +37 -0
- package/lib/module/utils/hooks/useTimer.js.map +1 -0
- package/lib/module/utils/loginHelper.js +6 -16
- package/lib/module/utils/loginHelper.js.map +1 -1
- package/lib/module/utils/storage.js +51 -29
- package/lib/module/utils/storage.js.map +1 -1
- package/lib/module/utils/utils.js +8 -6
- package/lib/module/utils/utils.js.map +1 -1
- package/lib/typescript/components/executiontasks/CompletedWFSchema.d.ts +2 -2
- package/lib/typescript/components/executiontasks/ExecutionTasksIndex.d.ts +6 -2
- package/lib/typescript/components/executiontasks/cancellation/CancellationSchema.d.ts +10 -5
- package/lib/typescript/components/executiontasks/captureInput/CaptureInputSchema.d.ts +7 -7
- package/lib/typescript/components/executiontasks/deliver/DeliverETInput.d.ts +7 -7
- package/lib/typescript/components/executiontasks/display/DisplaySchema.d.ts +5 -5
- package/lib/typescript/components/executiontasks/doodle/SignatureSchema.d.ts +7 -7
- package/lib/typescript/components/executiontasks/dropCash/DropCashSchema.d.ts +2 -2
- package/lib/typescript/components/executiontasks/forms/FormSchema.d.ts +2 -2
- package/lib/typescript/components/executiontasks/forms/widgets/DateTimeWidget.d.ts +1 -1
- package/lib/typescript/components/executiontasks/forms/widgets/DropdownWidget.d.ts +9 -0
- package/lib/typescript/components/executiontasks/httpRequest/HttpRequestETSchema.d.ts +6 -6
- package/lib/typescript/components/executiontasks/imageCapture/CaptureSchema.d.ts +16 -11
- package/lib/typescript/components/executiontasks/payments/completePayment/CompletePaymentSchema.d.ts +2 -2
- package/lib/typescript/components/executiontasks/payments/init/InitPaymentSchema.d.ts +3 -3
- package/lib/typescript/components/executiontasks/payments/processPayment/ProcessPaymentSchema.d.ts +2 -2
- package/lib/typescript/components/executiontasks/pickup/PickpSchema.d.ts +3 -3
- package/lib/typescript/components/executiontasks/scan/ScanET.d.ts +16 -0
- package/lib/typescript/components/executiontasks/scan/ScanSchema.d.ts +70 -0
- package/lib/typescript/components/executiontasks/scan/constants.d.ts +6 -0
- package/lib/typescript/components/executiontasks/scan/interfaces.d.ts +41 -0
- package/lib/typescript/components/executiontasks/scan/sub_components/CScanner.d.ts +7 -0
- package/lib/typescript/components/executiontasks/scan/sub_components/DropDownUtils.d.ts +7 -0
- package/lib/typescript/components/executiontasks/scan/sub_components/ERDropDown.d.ts +17 -0
- package/lib/typescript/components/executiontasks/scan/sub_components/ScanList.d.ts +8 -0
- package/lib/typescript/components/executiontasks/scan/utils.d.ts +21 -0
- package/lib/typescript/components/executiontasks/scanner/ScannerSchema.d.ts +6 -6
- package/lib/typescript/components/executiontasks/scanner/returns/DropDownUtils.d.ts +1 -2
- package/lib/typescript/components/executiontasks/scanner/returns/RTReasonSelection.d.ts +1 -1
- package/lib/typescript/components/executiontasks/scanner/returns/ScanList.d.ts +1 -1
- package/lib/typescript/components/executiontasks/validateOTP/ValidateOTPET.d.ts +4 -0
- package/lib/typescript/components/executiontasks/validateOTP/ValidateOTPSchema.d.ts +54 -0
- package/lib/typescript/components/executiontasks/validateOTP/constants.d.ts +10 -0
- package/lib/typescript/components/executiontasks/validateOTP/sub-components/OTPInput.d.ts +12 -0
- package/lib/typescript/components/executiontasks/validateOTP/utils.d.ts +7 -0
- package/lib/typescript/components/executiontasks/verifyInput/VerifyInputSchema.d.ts +8 -8
- package/lib/typescript/components/executiontasks/verifyLocation/VerifyLocSchema.d.ts +9 -9
- package/lib/typescript/components/executiontasks/verifyOtp/VerifyOtpSchema.d.ts +3 -3
- package/lib/typescript/components/widgets/IconButton.d.ts +9 -0
- package/lib/typescript/components/widgets/SnackBarCustom.d.ts +9 -5
- package/lib/typescript/components/widgets/SplitTextInput.d.ts +12 -0
- package/lib/typescript/constants/apiConstants.d.ts +6 -0
- package/lib/typescript/constants/constants.d.ts +4 -2
- package/lib/typescript/errors/ErrorCodes.d.ts +3 -1
- package/lib/typescript/events/EventDispatcher.d.ts +5 -0
- package/lib/typescript/events/EventListener.d.ts +5 -0
- package/lib/typescript/events/constants.d.ts +5 -0
- package/lib/typescript/events/index.d.ts +2 -0
- package/lib/typescript/events/interface.d.ts +1 -0
- package/lib/typescript/index.d.ts +5 -4
- package/lib/typescript/manager/dispatch/DispatchStateContainer.d.ts +21 -8
- package/lib/typescript/manager/dispatchCodes/EventCodeContainer.d.ts +12 -1
- package/lib/typescript/manager/dispatchCodes/EventCodeRepo.d.ts +13 -0
- package/lib/typescript/manager/jobRemoval/JobRemovalManager.d.ts +6 -0
- package/lib/typescript/manager/sdk/DispatchSdkCache.d.ts +2 -0
- package/lib/typescript/manager/syncmanager/AppSyncManager.d.ts +1 -0
- package/lib/typescript/manager/syncmanager/DBConfig.d.ts +22 -2
- package/lib/typescript/manager/syncmanager/database.d.ts +5 -0
- package/lib/typescript/manager/syncmanager/document/models.d.ts +1 -1
- package/lib/typescript/manager/syncmanager/events/ETEventsManager.d.ts +5 -1
- package/lib/typescript/manager/syncmanager/events/EventsSyncManager.d.ts +5 -1
- package/lib/typescript/manager/syncmanager/events/SyncHttpClient.d.ts +3 -1
- package/lib/typescript/models/DispatchModels.d.ts +56 -1
- package/lib/typescript/models/ReasonCodes.d.ts +5 -0
- package/lib/typescript/models/auth.d.ts +1 -1
- package/lib/typescript/models/execTasks/ETBaseModels.d.ts +27 -8
- package/lib/typescript/models/execTasks/ETConfig.d.ts +8 -4
- package/lib/typescript/models/sdk.d.ts +5 -0
- package/lib/typescript/native/signature/SignatureCapture.d.ts +1 -1
- package/lib/typescript/network/NetworkUtils.d.ts +1 -5
- package/lib/typescript/styles/SdkColors.d.ts +1 -0
- package/lib/typescript/styles/executionTasks/CommonStyles.d.ts +36 -0
- package/lib/typescript/ui/screens/ETScreensIndex.d.ts +3 -1
- package/lib/typescript/ui/screens/ScanScreen.d.ts +3 -0
- package/lib/typescript/ui/screens/ValidateOTPScreen.d.ts +3 -0
- package/lib/typescript/ui/uiConfig/RouteParams.d.ts +8 -0
- package/lib/typescript/utils/ApiUtils.d.ts +61 -0
- package/lib/typescript/utils/ExecTaskUtils.d.ts +7 -2
- package/lib/typescript/utils/NetworkUtil.d.ts +1 -1
- package/lib/typescript/utils/SyncManagerUtils.d.ts +3 -1
- package/lib/typescript/utils/hooks/useTimer.d.ts +5 -0
- package/lib/typescript/utils/storage.d.ts +17 -0
- package/package.json +23 -24
- package/tsconfig.json +9 -8
- package/file_unzip.js +0 -5
- package/mobile-execution-lib-0.6.4.tgz +0 -0
|
@@ -1,24 +1,82 @@
|
|
|
1
|
-
import React, { useRef } from 'react';
|
|
1
|
+
import React, { useRef, useState, useLayoutEffect } from 'react';
|
|
2
2
|
import { KeyboardAvoidingView, ScrollView, Text, View } from 'react-native';
|
|
3
3
|
import ReactNativeForm, { defaultProps, FormContext } from 'rjsf-native';
|
|
4
4
|
import DateTimeWidget from './widgets/DateTimeWidget';
|
|
5
5
|
import TimeRangeSelector from './widgets/TimeRangeSelector';
|
|
6
6
|
import QRBarcodeScannerWidget from './widgets/QRBarcodeScannerWidget';
|
|
7
|
-
import
|
|
7
|
+
import DropdownWidget from './widgets/DropdownWidget';
|
|
8
|
+
import { Button, Modal, Portal, Provider } from 'react-native-paper';
|
|
8
9
|
import { getBaseETResponse } from '../../../utils/ExecTaskUtils';
|
|
9
10
|
import { getEventCodeByET } from '../../../manager/dispatchCodes/EventCodeContainer';
|
|
10
11
|
import { EntityCode, ExecutionTaskID } from '../../../models/execTasks/ETConfig';
|
|
11
12
|
import { CommonStyles, Fonts } from '../../../styles/executionTasks/CommonStyles';
|
|
12
13
|
import SdkColors, { ColorTheme } from '../../../styles/SdkColors';
|
|
14
|
+
import Icon from 'react-native-vector-icons/MaterialIcons';
|
|
15
|
+
import { GO_BACK_EVENT_CODE } from '../../../constants/constants';
|
|
13
16
|
const customWidgets = {
|
|
14
17
|
datePicker: DateTimeWidget,
|
|
15
18
|
timeRangeSelector: TimeRangeSelector,
|
|
16
|
-
scanner: QRBarcodeScannerWidget
|
|
19
|
+
scanner: QRBarcodeScannerWidget,
|
|
20
|
+
select: DropdownWidget
|
|
17
21
|
};
|
|
18
|
-
|
|
19
22
|
const FormGenerator = props => {
|
|
20
23
|
const form = useRef(null);
|
|
21
|
-
|
|
24
|
+
const [showBackModal, setShowBackModal] = useState(false);
|
|
25
|
+
const [onCancel, setOnCancel] = useState(false);
|
|
26
|
+
useLayoutEffect(() => {
|
|
27
|
+
props.navigation.setOptions({
|
|
28
|
+
title: props.title,
|
|
29
|
+
headerLeft: () => {
|
|
30
|
+
var _props$taskMeta;
|
|
31
|
+
return props !== null && props !== void 0 && (_props$taskMeta = props.taskMeta) !== null && _props$taskMeta !== void 0 && _props$taskMeta.enableGoBack ? /*#__PURE__*/React.createElement(Icon, {
|
|
32
|
+
onPress: async () => {
|
|
33
|
+
setShowBackModal(true);
|
|
34
|
+
},
|
|
35
|
+
name: "arrow-back",
|
|
36
|
+
color: 'black',
|
|
37
|
+
size: 25,
|
|
38
|
+
style: {
|
|
39
|
+
paddingRight: 15,
|
|
40
|
+
paddingTop: 5
|
|
41
|
+
}
|
|
42
|
+
}) : null;
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
}, [props.navigation, props.title]);
|
|
46
|
+
const renderModal = () => {
|
|
47
|
+
return /*#__PURE__*/React.createElement(Portal, null, /*#__PURE__*/React.createElement(Modal, {
|
|
48
|
+
visible: showBackModal,
|
|
49
|
+
dismissable: true,
|
|
50
|
+
contentContainerStyle: CommonStyles.modalContent
|
|
51
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
52
|
+
style: CommonStyles.modalView
|
|
53
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
54
|
+
style: CommonStyles.subText
|
|
55
|
+
}, 'Are you sure you want to go back?'), /*#__PURE__*/React.createElement(Button, {
|
|
56
|
+
labelStyle: CommonStyles.nextButtonLabel,
|
|
57
|
+
style: {
|
|
58
|
+
...CommonStyles.nextButton,
|
|
59
|
+
marginTop: 10
|
|
60
|
+
},
|
|
61
|
+
uppercase: false,
|
|
62
|
+
onPress: async () => {
|
|
63
|
+
props.onSubmitET({
|
|
64
|
+
...(await getBaseETResponse(EntityCode.VALIDATE_OTP_ET, false, GO_BACK_EVENT_CODE, '')),
|
|
65
|
+
data: {}
|
|
66
|
+
});
|
|
67
|
+
setShowBackModal(false);
|
|
68
|
+
}
|
|
69
|
+
}, "Yes"), /*#__PURE__*/React.createElement(Button, {
|
|
70
|
+
labelStyle: CommonStyles.cancelButtonLabel,
|
|
71
|
+
style: {
|
|
72
|
+
...CommonStyles.cancelButton,
|
|
73
|
+
marginTop: 10
|
|
74
|
+
},
|
|
75
|
+
uppercase: false,
|
|
76
|
+
onPress: () => setShowBackModal(false)
|
|
77
|
+
}, "No"))));
|
|
78
|
+
};
|
|
79
|
+
return /*#__PURE__*/React.createElement(Provider, null, renderModal(), /*#__PURE__*/React.createElement(KeyboardAvoidingView, {
|
|
22
80
|
style: CommonStyles.mainContainer
|
|
23
81
|
}, /*#__PURE__*/React.createElement(ScrollView, {
|
|
24
82
|
style: {
|
|
@@ -37,7 +95,8 @@ const FormGenerator = props => {
|
|
|
37
95
|
borderWidth: 1
|
|
38
96
|
}
|
|
39
97
|
}, /*#__PURE__*/React.createElement(FormContext.Provider, {
|
|
40
|
-
value: {
|
|
98
|
+
value: {
|
|
99
|
+
...defaultProps,
|
|
41
100
|
requiredTitle: '*',
|
|
42
101
|
theme: {
|
|
43
102
|
primaryColor: SdkColors[ColorTheme.LIGHT].primaryButton,
|
|
@@ -50,18 +109,38 @@ const FormGenerator = props => {
|
|
|
50
109
|
}
|
|
51
110
|
}
|
|
52
111
|
}, /*#__PURE__*/React.createElement(ReactNativeForm, {
|
|
53
|
-
widgets: customWidgets
|
|
112
|
+
widgets: customWidgets
|
|
113
|
+
// @ts-ignore
|
|
54
114
|
,
|
|
55
|
-
ref: form
|
|
115
|
+
ref: form
|
|
116
|
+
// @ts-ignore
|
|
56
117
|
,
|
|
57
118
|
schema: props.jsonSchema,
|
|
58
119
|
showErrorList: false,
|
|
59
120
|
uiSchema: props.uiSchema,
|
|
60
|
-
onError:
|
|
121
|
+
onError: async error => {
|
|
122
|
+
if (onCancel === false) props.onError(error);else {
|
|
123
|
+
var _props$applicableReas;
|
|
124
|
+
props.onSubmitET({
|
|
125
|
+
...(await getBaseETResponse(EntityCode.FORMS, false, getEventCodeByET(ExecutionTaskID.FORMS, false, (_props$applicableReas = props.applicableReasons) === null || _props$applicableReas === void 0 ? void 0 : _props$applicableReas.failure), '')),
|
|
126
|
+
data: {}
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
},
|
|
61
130
|
onSubmit: async response => {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
131
|
+
if (onCancel === true) {
|
|
132
|
+
var _props$applicableReas2;
|
|
133
|
+
props.onSubmitET({
|
|
134
|
+
...(await getBaseETResponse(EntityCode.FORMS, false, getEventCodeByET(ExecutionTaskID.FORMS, false, (_props$applicableReas2 = props.applicableReasons) === null || _props$applicableReas2 === void 0 ? void 0 : _props$applicableReas2.failure), '')),
|
|
135
|
+
data: response.formData
|
|
136
|
+
});
|
|
137
|
+
} else {
|
|
138
|
+
var _props$applicableReas3;
|
|
139
|
+
props.onSubmitET({
|
|
140
|
+
...(await getBaseETResponse(EntityCode.FORMS, true, getEventCodeByET(ExecutionTaskID.FORMS, true, (_props$applicableReas3 = props.applicableReasons) === null || _props$applicableReas3 === void 0 ? void 0 : _props$applicableReas3.success), '')),
|
|
141
|
+
data: response.formData
|
|
142
|
+
});
|
|
143
|
+
}
|
|
65
144
|
}
|
|
66
145
|
}, /*#__PURE__*/React.createElement(Text, null))))), /*#__PURE__*/React.createElement(View, {
|
|
67
146
|
style: [{
|
|
@@ -79,12 +158,33 @@ const FormGenerator = props => {
|
|
|
79
158
|
mode: 'contained',
|
|
80
159
|
onPress: () => {
|
|
81
160
|
if (form.current) {
|
|
161
|
+
setOnCancel(false);
|
|
162
|
+
// @ts-ignore
|
|
163
|
+
form.current.submit();
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}, "Submit"))), /*#__PURE__*/React.createElement(View, {
|
|
167
|
+
style: [{
|
|
168
|
+
margin: 10
|
|
169
|
+
}]
|
|
170
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
171
|
+
style: {
|
|
172
|
+
flexDirection: 'row'
|
|
173
|
+
}
|
|
174
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
175
|
+
style: [CommonStyles.cancelButton, {
|
|
176
|
+
flex: 1
|
|
177
|
+
}],
|
|
178
|
+
labelStyle: CommonStyles.cancelButtonLabel,
|
|
179
|
+
mode: 'outlined',
|
|
180
|
+
onPress: () => {
|
|
181
|
+
if (form.current) {
|
|
182
|
+
setOnCancel(true);
|
|
82
183
|
// @ts-ignore
|
|
83
184
|
form.current.submit();
|
|
84
185
|
}
|
|
85
186
|
}
|
|
86
|
-
}, "
|
|
187
|
+
}, "Cancel")))));
|
|
87
188
|
};
|
|
88
|
-
|
|
89
189
|
export default FormGenerator;
|
|
90
190
|
//# sourceMappingURL=FormGenerator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useRef","KeyboardAvoidingView","ScrollView","Text","View","ReactNativeForm","defaultProps","FormContext","DateTimeWidget","TimeRangeSelector","QRBarcodeScannerWidget","Button","getBaseETResponse","getEventCodeByET","EntityCode","ExecutionTaskID","CommonStyles","Fonts","SdkColors","ColorTheme","customWidgets","datePicker","timeRangeSelector","scanner","FormGenerator","props","form","mainContainer","flex","backgroundColor","padding","marginTop","marginStart","marginEnd","borderRadius","borderColor","borderWidth","requiredTitle","theme","primaryColor","LIGHT","primaryButton","highlightColor","textColor","placeholderTextColor","errorColor","fontFamily","IBMPlexSans_600SemiBold","jsonSchema","uiSchema","onError","response","onSubmitET","FORMS","data","formData","margin","flexDirection","nextButton","nextButtonLabel","current","submit"],"sources":["FormGenerator.tsx"],"sourcesContent":["import React, { useRef } from 'react';\nimport { KeyboardAvoidingView, ScrollView, Text, View } from 'react-native';\nimport ReactNativeForm, { defaultProps, FormContext } from 'rjsf-native';\nimport DateTimeWidget from './widgets/DateTimeWidget';\nimport TimeRangeSelector from './widgets/TimeRangeSelector';\nimport QRBarcodeScannerWidget from './widgets/QRBarcodeScannerWidget';\nimport { Button } from 'react-native-paper';\nimport type { FormInputSchema } from './FormSchema';\nimport { getBaseETResponse } from '../../../utils/ExecTaskUtils';\nimport { getEventCodeByET } from '../../../manager/dispatchCodes/EventCodeContainer';\nimport {\n EntityCode,\n ExecutionTaskID,\n} from '../../../models/execTasks/ETConfig';\nimport {\n CommonStyles,\n Fonts,\n} from '../../../styles/executionTasks/CommonStyles';\nimport SdkColors, { ColorTheme } from '../../../styles/SdkColors';\n\nconst customWidgets = {\n datePicker: DateTimeWidget,\n timeRangeSelector: TimeRangeSelector,\n scanner: QRBarcodeScannerWidget,\n};\n\nconst FormGenerator = (props: FormInputSchema) => {\n const form = useRef(null);\n return (\n <KeyboardAvoidingView style={CommonStyles.mainContainer}>\n <ScrollView style={{ flex: 1 }}>\n <View\n style={{\n flex: 1,\n backgroundColor: 'white',\n padding: 20,\n marginTop: 20,\n marginStart: 15,\n marginEnd: 15,\n borderRadius: 10,\n borderColor: 'rgba(0, 0, 0, 0.1)',\n borderWidth: 1,\n }}\n >\n <FormContext.Provider\n value={{\n ...defaultProps,\n requiredTitle: '*',\n theme: {\n primaryColor: SdkColors[ColorTheme.LIGHT].primaryButton,\n highlightColor: SdkColors[ColorTheme.LIGHT].primaryButton,\n borderColor: SdkColors[ColorTheme.LIGHT].primaryButton,\n textColor: '#111111',\n placeholderTextColor: '#111111',\n errorColor: '#b00020',\n fontFamily: Fonts.IBMPlexSans_600SemiBold,\n },\n }}\n >\n <ReactNativeForm\n widgets={customWidgets}\n // @ts-ignore\n ref={form}\n // @ts-ignore\n schema={props.jsonSchema}\n showErrorList={false}\n uiSchema={props.uiSchema}\n onError={props.onError}\n onSubmit={async (response) => {\n props.onSubmitET({\n ...(await getBaseETResponse(\n EntityCode.FORMS,\n true,\n getEventCodeByET(ExecutionTaskID.FORMS, true),\n ''\n )),\n data: response.formData,\n });\n }}\n >\n <Text>{}</Text>\n </ReactNativeForm>\n </FormContext.Provider>\n </View>\n </ScrollView>\n <View style={[{ margin: 10 }]}>\n <View style={{ flexDirection: 'row' }}>\n <Button\n style={[CommonStyles.nextButton, { flex: 1 }]}\n labelStyle={CommonStyles.nextButtonLabel}\n mode={'contained'}\n onPress={() => {\n if (form.current) {\n // @ts-ignore\n form.current.submit();\n }\n }}\n >\n Submit\n </Button>\n </View>\n </View>\n </KeyboardAvoidingView>\n );\n};\n\nexport default FormGenerator;\n"],"mappings":"AAAA,OAAOA,KAAP,IAAgBC,MAAhB,QAA8B,OAA9B;AACA,SAASC,oBAAT,EAA+BC,UAA/B,EAA2CC,IAA3C,EAAiDC,IAAjD,QAA6D,cAA7D;AACA,OAAOC,eAAP,IAA0BC,YAA1B,EAAwCC,WAAxC,QAA2D,aAA3D;AACA,OAAOC,cAAP,MAA2B,0BAA3B;AACA,OAAOC,iBAAP,MAA8B,6BAA9B;AACA,OAAOC,sBAAP,MAAmC,kCAAnC;AACA,SAASC,MAAT,QAAuB,oBAAvB;AAEA,SAASC,iBAAT,QAAkC,8BAAlC;AACA,SAASC,gBAAT,QAAiC,mDAAjC;AACA,SACEC,UADF,EAEEC,eAFF,QAGO,oCAHP;AAIA,SACEC,YADF,EAEEC,KAFF,QAGO,6CAHP;AAIA,OAAOC,SAAP,IAAoBC,UAApB,QAAsC,2BAAtC;AAEA,MAAMC,aAAa,GAAG;EACpBC,UAAU,EAAEb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AO,EAAExB,KAAK,CAACyB,OARjB;IASE,QAAQ,EAAE,MAAOC,QAAP,IAAoB;MAC5B1B,KAAK,CAAC2B,UAAN,CAAiB,EACf,IAAI,MAAMxC,iBAAiB,CACzBE,UAAU,CAACuC,KADc,EAEzB,IAFyB,EAGzBxC,gBAAgB,CAACE,eAAe,CAACsC,KAAjB,EAAwB,IAAxB,CAHS,EAIzB,EAJyB,CAA3B,CADe;QAOfC,IAAI,EAAEH,QAAQ,CAACI;MAPA,CAAjB;IASD;EAnBH,gBAqBE,oBAAC,IAAD,OArBF,CAfF,CAbF,CADF,CADF,eAwDE,oBAAC,IAAD;IAAM,KAAK,EAAE,CAAC;MAAEC,MAAM,EAAE;IAAV,CAAD;EAAb,gBACE,oBAAC,IAAD;IAAM,KAAK,EAAE;MAAEC,aAAa,EAAE;IAAjB;EAAb,gBACE,oBAAC,MAAD;IACE,KAAK,EAAE,CAACzC,YAAY,CAAC0C,UAAd,EAA0B;MAAE9B,IAAI,EAAE;IAAR,CAA1B,CADT;IAEE,UAAU,EAAEZ,YAAY,CAAC2C,eAF3B;IAGE,IAAI,EAAE,WAHR;IAIE,OAAO,EAAE,MAAM;MACb,IAAIjC,IAAI,CAACkC,OAAT,EAAkB;QAChB;QACAlC,IAAI,CAACkC,OAAL,CAAaC,MAAb;MACD;IACF;EATH,YADF,CADF,CAxDF,CADF;AA4ED,CA9ED;;AAgFA,eAAerC,aAAf"}
|
|
1
|
+
{"version":3,"names":["React","useRef","useState","useLayoutEffect","KeyboardAvoidingView","ScrollView","Text","View","ReactNativeForm","defaultProps","FormContext","DateTimeWidget","TimeRangeSelector","QRBarcodeScannerWidget","DropdownWidget","Button","Modal","Portal","Provider","getBaseETResponse","getEventCodeByET","EntityCode","ExecutionTaskID","CommonStyles","Fonts","SdkColors","ColorTheme","Icon","GO_BACK_EVENT_CODE","customWidgets","datePicker","timeRangeSelector","scanner","select","FormGenerator","props","form","showBackModal","setShowBackModal","onCancel","setOnCancel","navigation","setOptions","title","headerLeft","_props$taskMeta","taskMeta","enableGoBack","createElement","onPress","name","color","size","style","paddingRight","paddingTop","renderModal","visible","dismissable","contentContainerStyle","modalContent","modalView","subText","labelStyle","nextButtonLabel","nextButton","marginTop","uppercase","onSubmitET","VALIDATE_OTP_ET","data","cancelButtonLabel","cancelButton","mainContainer","flex","backgroundColor","padding","marginStart","marginEnd","borderRadius","borderColor","borderWidth","value","requiredTitle","theme","primaryColor","LIGHT","primaryButton","highlightColor","textColor","placeholderTextColor","errorColor","fontFamily","IBMPlexSans_600SemiBold","widgets","ref","schema","jsonSchema","showErrorList","uiSchema","onError","error","_props$applicableReas","FORMS","applicableReasons","failure","onSubmit","response","_props$applicableReas2","formData","_props$applicableReas3","success","margin","flexDirection","mode","current","submit"],"sources":["FormGenerator.tsx"],"sourcesContent":["import React, { useRef, useState, useLayoutEffect } from 'react';\nimport { KeyboardAvoidingView, ScrollView, Text, View } from 'react-native';\nimport ReactNativeForm, { defaultProps, FormContext } from 'rjsf-native';\nimport DateTimeWidget from './widgets/DateTimeWidget';\nimport TimeRangeSelector from './widgets/TimeRangeSelector';\nimport QRBarcodeScannerWidget from './widgets/QRBarcodeScannerWidget';\nimport DropdownWidget from './widgets/DropdownWidget';\nimport { Button, Modal, Portal, Provider } from 'react-native-paper';\nimport type { FormInputSchema } from './FormSchema';\nimport { getBaseETResponse } from '../../../utils/ExecTaskUtils';\nimport { getEventCodeByET } from '../../../manager/dispatchCodes/EventCodeContainer';\nimport {\n EntityCode,\n ExecutionTaskID,\n} from '../../../models/execTasks/ETConfig';\nimport {\n CommonStyles,\n Fonts,\n} from '../../../styles/executionTasks/CommonStyles';\nimport SdkColors, { ColorTheme } from '../../../styles/SdkColors';\nimport Icon from 'react-native-vector-icons/MaterialIcons';\nimport { GO_BACK_EVENT_CODE } from '../../../constants/constants';\n\nconst customWidgets = {\n datePicker: DateTimeWidget,\n timeRangeSelector: TimeRangeSelector,\n scanner: QRBarcodeScannerWidget,\n select: DropdownWidget,\n};\n\nconst FormGenerator = (props: FormInputSchema) => {\n const form = useRef(null);\n const [showBackModal, setShowBackModal] = useState(false);\n const [onCancel, setOnCancel] = useState(false);\n useLayoutEffect(() => {\n props.navigation.setOptions({\n title: props.title,\n headerLeft: () =>\n props?.taskMeta?.enableGoBack ? (\n <Icon\n onPress={async () => {\n setShowBackModal(true);\n }}\n name=\"arrow-back\"\n color={'black'}\n size={25}\n style={{\n paddingRight: 15,\n paddingTop: 5,\n }}\n />\n ) : null,\n });\n }, [props.navigation, props.title]);\n\n const renderModal = () => {\n return (\n <Portal>\n <Modal\n visible={showBackModal}\n dismissable={true}\n contentContainerStyle={CommonStyles.modalContent}\n >\n <View style={CommonStyles.modalView}>\n <Text style={CommonStyles.subText}>\n {'Are you sure you want to go back?'}\n </Text>\n <Button\n labelStyle={CommonStyles.nextButtonLabel}\n style={{ ...CommonStyles.nextButton, marginTop: 10 }}\n uppercase={false}\n onPress={async () => {\n props.onSubmitET({\n ...(await getBaseETResponse(\n EntityCode.VALIDATE_OTP_ET,\n false,\n GO_BACK_EVENT_CODE,\n ''\n )),\n data: {},\n });\n setShowBackModal(false);\n }}\n >\n Yes\n </Button>\n <Button\n labelStyle={CommonStyles.cancelButtonLabel}\n style={{ ...CommonStyles.cancelButton, marginTop: 10 }}\n uppercase={false}\n onPress={() => setShowBackModal(false)}\n >\n No\n </Button>\n </View>\n </Modal>\n </Portal>\n );\n };\n\n return (\n <Provider>\n {renderModal()}\n <KeyboardAvoidingView style={CommonStyles.mainContainer}>\n <ScrollView style={{ flex: 1 }}>\n <View\n style={{\n flex: 1,\n backgroundColor: 'white',\n padding: 20,\n marginTop: 20,\n marginStart: 15,\n marginEnd: 15,\n borderRadius: 10,\n borderColor: 'rgba(0, 0, 0, 0.1)',\n borderWidth: 1,\n }}\n >\n <FormContext.Provider\n value={{\n ...defaultProps,\n requiredTitle: '*',\n theme: {\n primaryColor: SdkColors[ColorTheme.LIGHT].primaryButton,\n highlightColor: SdkColors[ColorTheme.LIGHT].primaryButton,\n borderColor: SdkColors[ColorTheme.LIGHT].primaryButton,\n textColor: '#111111',\n placeholderTextColor: '#111111',\n errorColor: '#b00020',\n fontFamily: Fonts.IBMPlexSans_600SemiBold,\n },\n }}\n >\n <ReactNativeForm\n widgets={customWidgets}\n // @ts-ignore\n ref={form}\n // @ts-ignore\n schema={props.jsonSchema}\n showErrorList={false}\n uiSchema={props.uiSchema}\n onError={async (error) => {\n if (onCancel === false) props.onError(error);\n else {\n props.onSubmitET({\n ...(await getBaseETResponse(\n EntityCode.FORMS,\n false,\n getEventCodeByET(\n ExecutionTaskID.FORMS,\n false,\n props.applicableReasons?.failure\n ),\n ''\n )),\n data: {},\n });\n }\n }}\n onSubmit={async (response) => {\n if (onCancel === true) {\n props.onSubmitET({\n ...(await getBaseETResponse(\n EntityCode.FORMS,\n false,\n getEventCodeByET(\n ExecutionTaskID.FORMS,\n false,\n props.applicableReasons?.failure\n ),\n ''\n )),\n data: response.formData,\n });\n } else {\n props.onSubmitET({\n ...(await getBaseETResponse(\n EntityCode.FORMS,\n true,\n getEventCodeByET(\n ExecutionTaskID.FORMS,\n true,\n props.applicableReasons?.success\n ),\n ''\n )),\n data: response.formData,\n });\n }\n }}\n >\n <Text>{}</Text>\n </ReactNativeForm>\n </FormContext.Provider>\n </View>\n </ScrollView>\n <View style={[{ margin: 10 }]}>\n <View style={{ flexDirection: 'row' }}>\n <Button\n style={[CommonStyles.nextButton, { flex: 1 }]}\n labelStyle={CommonStyles.nextButtonLabel}\n mode={'contained'}\n onPress={() => {\n if (form.current) {\n setOnCancel(false);\n // @ts-ignore\n form.current.submit();\n }\n }}\n >\n Submit\n </Button>\n </View>\n </View>\n <View style={[{ margin: 10 }]}>\n <View style={{ flexDirection: 'row' }}>\n <Button\n style={[CommonStyles.cancelButton, { flex: 1 }]}\n labelStyle={CommonStyles.cancelButtonLabel}\n mode={'outlined'}\n onPress={() => {\n if (form.current) {\n setOnCancel(true);\n // @ts-ignore\n form.current.submit();\n }\n }}\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AC,KAAK,CAAC;QAClB;QACAJ,IAAI,CAAC+E,OAAO,CAACC,MAAM,EAAE;MACvB;IACF;EAAE,GACH,QAED,CAAS,CACJ,CACF,eACPpH,KAAA,CAAAgD,aAAA,CAACzC,IAAI;IAAC8C,KAAK,EAAE,CAAC;MAAE2D,MAAM,EAAE;IAAG,CAAC;EAAE,gBAC5BhH,KAAA,CAAAgD,aAAA,CAACzC,IAAI;IAAC8C,KAAK,EAAE;MAAE4D,aAAa,EAAE;IAAM;EAAE,gBACpCjH,KAAA,CAAAgD,aAAA,CAACjC,MAAM;IACLsC,KAAK,EAAE,CAAC9B,YAAY,CAACiD,YAAY,EAAE;MAAEE,IAAI,EAAE;IAAE,CAAC,CAAE;IAChDX,UAAU,EAAExC,YAAY,CAACgD,iBAAkB;IAC3C2C,IAAI,EAAE,UAAW;IACjBjE,OAAO,EAAEA,CAAA,KAAM;MACb,IAAIb,IAAI,CAAC+E,OAAO,EAAE;QAChB3E,WAAW,CAAC,IAAI,CAAC;QACjB;QACAJ,IAAI,CAAC+E,OAAO,CAACC,MAAM,EAAE;MACvB;IACF;EAAE,GACH,QAED,CAAS,CACJ,CACF,CACc,CACd;AAEf,CAAC;AAED,eAAelF,aAAa"}
|
|
@@ -8,7 +8,6 @@ const MODES = {
|
|
|
8
8
|
TIME: 'time',
|
|
9
9
|
DATETIME: 'datetime'
|
|
10
10
|
};
|
|
11
|
-
|
|
12
11
|
const DateTimeWidget = _ref => {
|
|
13
12
|
let {
|
|
14
13
|
id,
|
|
@@ -32,10 +31,8 @@ const DateTimeWidget = _ref => {
|
|
|
32
31
|
borderWidth: focused ? 2 : 1.5,
|
|
33
32
|
color: theme.textColor
|
|
34
33
|
};
|
|
35
|
-
|
|
36
34
|
const onDateChange = (_event, selectedDate) => {
|
|
37
35
|
setShow(Platform.OS === 'ios');
|
|
38
|
-
|
|
39
36
|
if (selectedDate) {
|
|
40
37
|
const currentDate = selectedDate;
|
|
41
38
|
let dateTimeValue = getValueBasedOnMode(options, currentDate);
|
|
@@ -43,7 +40,6 @@ const DateTimeWidget = _ref => {
|
|
|
43
40
|
onChange(dateTimeValue);
|
|
44
41
|
}
|
|
45
42
|
};
|
|
46
|
-
|
|
47
43
|
return /*#__PURE__*/React.createElement(View, {
|
|
48
44
|
style: styles.container
|
|
49
45
|
}, /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
@@ -62,7 +58,8 @@ const DateTimeWidget = _ref => {
|
|
|
62
58
|
placeholderTextColor: theme.placeholderTextColor,
|
|
63
59
|
style: [styles.input, themedStyle]
|
|
64
60
|
})), show && /*#__PURE__*/React.createElement(DateTimePicker, {
|
|
65
|
-
testID: "dateTimePicker"
|
|
61
|
+
testID: "dateTimePicker"
|
|
62
|
+
// @ts-ignore
|
|
66
63
|
,
|
|
67
64
|
mode: getWidgetType(options.mode),
|
|
68
65
|
minimumDate: options.mode === 'date' ? new Date() : undefined,
|
|
@@ -74,41 +71,31 @@ const DateTimeWidget = _ref => {
|
|
|
74
71
|
textColor: 'red'
|
|
75
72
|
}));
|
|
76
73
|
};
|
|
77
|
-
|
|
78
74
|
function getWidgetType(mode) {
|
|
79
75
|
switch (mode) {
|
|
80
76
|
case 'date':
|
|
81
77
|
return MODES.DATE;
|
|
82
|
-
|
|
83
78
|
case 'time':
|
|
84
79
|
return MODES.TIME;
|
|
85
|
-
|
|
86
80
|
case 'datetime':
|
|
87
81
|
return MODES.DATETIME;
|
|
88
|
-
|
|
89
82
|
default:
|
|
90
83
|
return MODES.DATE;
|
|
91
84
|
}
|
|
92
85
|
}
|
|
93
|
-
|
|
94
86
|
function getValueBasedOnMode(uiOptions, date) {
|
|
95
87
|
if (!date) return '';
|
|
96
|
-
|
|
97
88
|
switch (uiOptions.mode) {
|
|
98
89
|
case 'date':
|
|
99
90
|
return date.toISOString().substring(0, 10);
|
|
100
|
-
|
|
101
91
|
case 'time':
|
|
102
92
|
return date.toLocaleTimeString().slice(0, 5);
|
|
103
|
-
|
|
104
93
|
case 'datetime':
|
|
105
94
|
return date.toLocaleString();
|
|
106
|
-
|
|
107
95
|
default:
|
|
108
96
|
return date.toLocaleString();
|
|
109
97
|
}
|
|
110
98
|
}
|
|
111
|
-
|
|
112
99
|
const styles = StyleSheet.create({
|
|
113
100
|
container: {
|
|
114
101
|
flex: 1
|
|
@@ -124,6 +111,7 @@ const styles = StyleSheet.create({
|
|
|
124
111
|
color: '#111111'
|
|
125
112
|
}
|
|
126
113
|
});
|
|
114
|
+
|
|
127
115
|
/**
|
|
128
116
|
* max and min date has to be implemented
|
|
129
117
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useState","Platform","StyleSheet","TextInput","TouchableOpacity","View","DateTimePicker","useFormContext","SdkColors","ColorTheme","MODES","DATE","TIME","DATETIME","DateTimeWidget","id","label","value","onChange","onFocus","autofocus","options","rawErrors","maxDate","show","setShow","date","setDate","theme","focused","setFocused","themedStyle","borderColor","length","errorColor","highlightColor","borderWidth","color","textColor","onDateChange","_event","selectedDate","OS","currentDate","dateTimeValue","getValueBasedOnMode","styles","container","placeholderTextColor","input","
|
|
1
|
+
{"version":3,"names":["React","useState","Platform","StyleSheet","TextInput","TouchableOpacity","View","DateTimePicker","useFormContext","SdkColors","ColorTheme","MODES","DATE","TIME","DATETIME","DateTimeWidget","_ref","id","label","value","onChange","onFocus","autofocus","options","rawErrors","maxDate","show","setShow","date","setDate","theme","focused","setFocused","themedStyle","borderColor","length","errorColor","highlightColor","borderWidth","color","textColor","onDateChange","_event","selectedDate","OS","currentDate","dateTimeValue","getValueBasedOnMode","createElement","style","styles","container","onPress","editable","onTouchStart","placeholder","selectionColor","autoFocus","placeholderTextColor","input","testID","mode","getWidgetType","minimumDate","Date","undefined","maximumDate","is24Hour","display","uiOptions","toISOString","substring","toLocaleTimeString","slice","toLocaleString","create","flex","LIGHT","primaryButton","paddingHorizontal","paddingTop","paddingBottom","borderRadius","fontSize"],"sources":["DateTimeWidget.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport {\n Platform,\n StyleSheet,\n TextInput,\n TouchableOpacity,\n View,\n} from 'react-native';\nimport DateTimePicker, { Event } from '@react-native-community/datetimepicker';\nimport type { WidgetProps } from '@rjsf/core';\nimport { useFormContext } from 'rjsf-native';\nimport SdkColors, { ColorTheme } from '../../../../styles/SdkColors';\n\nconst MODES = {\n DATE: 'date',\n TIME: 'time',\n DATETIME: 'datetime',\n};\n\ntype DateWidgetProps = WidgetProps & {\n minDate?: Date;\n maxDate?: Date;\n};\n\nconst DateTimeWidget = ({\n id,\n label,\n value,\n onChange,\n onFocus,\n autofocus,\n options,\n rawErrors,\n maxDate,\n}: DateWidgetProps) => {\n const [show, setShow] = useState(false);\n const [date, setDate] = useState<Date | null>(null);\n const { theme } = useFormContext();\n const [focused, setFocused] = useState(false);\n\n const themedStyle = {\n borderColor:\n rawErrors?.length > 0\n ? theme.errorColor\n : focused\n ? theme.highlightColor\n : theme.borderColor,\n borderWidth: focused ? 2 : 1.5,\n color: theme.textColor,\n };\n const onDateChange = (_event: Event, selectedDate?: Date) => {\n setShow(Platform.OS === 'ios');\n if (selectedDate) {\n const currentDate = selectedDate;\n let dateTimeValue = getValueBasedOnMode(options, currentDate);\n setDate(currentDate);\n onChange(dateTimeValue);\n }\n };\n\n return (\n <View style={styles.container}>\n <TouchableOpacity onPress={() => setShow(true)}>\n <TextInput\n editable={false}\n onTouchStart={() => setShow(true)}\n value={getValueBasedOnMode(options, date)}\n placeholder={label}\n selectionColor={'#6200EE'}\n autoFocus={autofocus}\n onFocus={() => {\n setFocused(true);\n onFocus(id, value);\n }}\n placeholderTextColor={theme.placeholderTextColor}\n style={[styles.input, themedStyle]}\n />\n </TouchableOpacity>\n {show && (\n <DateTimePicker\n testID=\"dateTimePicker\"\n // @ts-ignore\n mode={getWidgetType(options.mode)}\n minimumDate={options.mode === 'date' ? new Date() : undefined}\n maximumDate={maxDate}\n is24Hour={false}\n display=\"default\"\n onChange={onDateChange}\n value={date ?? new Date()}\n textColor={'red'}\n />\n )}\n </View>\n );\n};\n\nfunction getWidgetType(mode: string): string {\n switch (mode) {\n case 'date':\n return MODES.DATE;\n case 'time':\n return MODES.TIME;\n case 'datetime':\n return MODES.DATETIME;\n default:\n return MODES.DATE;\n }\n}\n\nfunction getValueBasedOnMode(uiOptions: any, date: Date | null): string {\n if (!date) return '';\n switch (uiOptions.mode) {\n case 'date':\n return date.toISOString().substring(0, 10);\n case 'time':\n return date.toLocaleTimeString().slice(0, 5);\n case 'datetime':\n return date.toLocaleString();\n default:\n return date.toLocaleString();\n }\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n },\n input: {\n borderColor: SdkColors[ColorTheme.LIGHT].primaryButton,\n borderWidth: 1,\n paddingHorizontal: 16,\n paddingTop: 15,\n paddingBottom: 15,\n borderRadius: 4,\n fontSize: 16,\n color: '#111111',\n },\n});\n\n/**\n * max and min date has to be implemented\n */\n\nexport default DateTimeWidget;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,SACEC,QAAQ,EACRC,UAAU,EACVC,SAAS,EACTC,gBAAgB,EAChBC,IAAI,QACC,cAAc;AACrB,OAAOC,cAAc,MAAiB,wCAAwC;AAE9E,SAASC,cAAc,QAAQ,aAAa;AAC5C,OAAOC,SAAS,IAAIC,UAAU,QAAQ,8BAA8B;AAEpE,MAAMC,KAAK,GAAG;EACZC,IAAI,EAAE,MAAM;EACZC,IAAI,EAAE,MAAM;EACZC,QAAQ,EAAE;AACZ,CAAC;AAOD,MAAMC,cAAc,GAAGC,IAAA,IAUA;EAAA,IAVC;IACtBC,EAAE;IACFC,KAAK;IACLC,KAAK;IACLC,QAAQ;IACRC,OAAO;IACPC,SAAS;IACTC,OAAO;IACPC,SAAS;IACTC;EACe,CAAC,GAAAT,IAAA;EAChB,MAAM,CAACU,IAAI,EAAEC,OAAO,CAAC,GAAG1B,QAAQ,CAAC,KAAK,CAAC;EACvC,MAAM,CAAC2B,IAAI,EAAEC,OAAO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AM;MACT,OAAO3C,IAAI,CAAC4C,kBAAkB,EAAE,CAACC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;IAC9C,KAAK,UAAU;MACb,OAAO7C,IAAI,CAAC8C,cAAc,EAAE;IAC9B;MACE,OAAO9C,IAAI,CAAC8C,cAAc,EAAE;EAAC;AAEnC;AAEA,MAAMxB,MAAM,GAAG/C,UAAU,CAACwE,MAAM,CAAC;EAC/BxB,SAAS,EAAE;IACTyB,IAAI,EAAE;EACR,CAAC;EACDjB,KAAK,EAAE;IACLzB,WAAW,EAAEzB,SAAS,CAACC,UAAU,CAACmE,KAAK,CAAC,CAACC,aAAa;IACtDxC,WAAW,EAAE,CAAC;IACdyC,iBAAiB,EAAE,EAAE;IACrBC,UAAU,EAAE,EAAE;IACdC,aAAa,EAAE,EAAE;IACjBC,YAAY,EAAE,CAAC;IACfC,QAAQ,EAAE,EAAE;IACZ5C,KAAK,EAAE;EACT;AACF,CAAC,CAAC;;AAEF;AACA;AACA;;AAEA,eAAexB,cAAc"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { StyleSheet, View } from 'react-native';
|
|
3
|
+
import DropDownPicker from 'react-native-dropdown-picker';
|
|
4
|
+
import SdkColors, { ColorTheme } from '../../../../styles/SdkColors';
|
|
5
|
+
const DropdownWidget = props => {
|
|
6
|
+
const [open, setOpen] = useState(false);
|
|
7
|
+
const [dropdownValue, setDropdownValue] = useState(props.value);
|
|
8
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
9
|
+
style: styles.container
|
|
10
|
+
}, /*#__PURE__*/React.createElement(DropDownPicker, {
|
|
11
|
+
style: styles.input
|
|
12
|
+
//@ts-ignore
|
|
13
|
+
,
|
|
14
|
+
items: props.options.enumOptions,
|
|
15
|
+
open: open,
|
|
16
|
+
setOpen: setOpen,
|
|
17
|
+
value: dropdownValue,
|
|
18
|
+
setValue: setDropdownValue,
|
|
19
|
+
listMode: 'SCROLLVIEW',
|
|
20
|
+
onChangeValue: value => props.onChange(value)
|
|
21
|
+
}));
|
|
22
|
+
};
|
|
23
|
+
const styles = StyleSheet.create({
|
|
24
|
+
container: {
|
|
25
|
+
flex: 1
|
|
26
|
+
},
|
|
27
|
+
input: {
|
|
28
|
+
borderColor: SdkColors[ColorTheme.LIGHT].primaryButton,
|
|
29
|
+
borderWidth: 1,
|
|
30
|
+
paddingHorizontal: 16,
|
|
31
|
+
paddingTop: 15,
|
|
32
|
+
paddingBottom: 15,
|
|
33
|
+
borderRadius: 4,
|
|
34
|
+
fontSize: 16,
|
|
35
|
+
color: '#111111'
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
export default DropdownWidget;
|
|
39
|
+
//# sourceMappingURL=DropdownWidget.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useState","StyleSheet","View","DropDownPicker","SdkColors","ColorTheme","DropdownWidget","props","open","setOpen","dropdownValue","setDropdownValue","value","createElement","style","styles","container","input","items","options","enumOptions","setValue","listMode","onChangeValue","onChange","create","flex","borderColor","LIGHT","primaryButton","borderWidth","paddingHorizontal","paddingTop","paddingBottom","borderRadius","fontSize","color"],"sources":["DropdownWidget.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport { StyleSheet, View } from 'react-native';\nimport DropDownPicker from 'react-native-dropdown-picker';\nimport type { WidgetProps } from '@rjsf/core';\nimport SdkColors, { ColorTheme } from '../../../../styles/SdkColors';\n\ntype enumOptions = {\n label: string;\n value: string;\n};\n\ntype DropdownWidgetProps = WidgetProps & {\n options: { [key: string]: any };\n};\n\nconst DropdownWidget = (props: DropdownWidgetProps) => {\n const [open, setOpen] = useState(false);\n const [dropdownValue, setDropdownValue] = useState(props.value);\n return (\n <View style={styles.container}>\n <DropDownPicker\n style={styles.input}\n //@ts-ignore\n items={props.options.enumOptions}\n open={open}\n setOpen={setOpen}\n value={dropdownValue}\n setValue={setDropdownValue}\n listMode={'SCROLLVIEW'}\n onChangeValue={(value) => props.onChange(value)}\n />\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n },\n input: {\n borderColor: SdkColors[ColorTheme.LIGHT].primaryButton,\n borderWidth: 1,\n paddingHorizontal: 16,\n paddingTop: 15,\n paddingBottom: 15,\n borderRadius: 4,\n fontSize: 16,\n color: '#111111',\n },\n});\n\nexport default DropdownWidget;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,OAAOC,cAAc,MAAM,8BAA8B;AAEzD,OAAOC,SAAS,IAAIC,UAAU,QAAQ,8BAA8B;AAWpE,MAAMC,cAAc,GAAIC,KAA0B,IAAK;EACrD,MAAM,CAACC,IAAI,EAAEC,OAAO,CAAC,GAAGT,QAAQ,CAAC,KAAK,CAAC;EACvC,MAAM,CAACU,aAAa,EAAEC,gBAAgB,CAAC,GAAGX,QAAQ,CAACO,KAAK,CAACK,KAAK,CAAC;EAC/D,oBACEb,KAAA,CAAAc,aAAA,CAACX,IAAI;IAACY,KAAK,EAAEC,MAAM,CAACC;EAAU,gBAC5BjB,KAAA,CAAAc,aAAA,CAACV,cAAc;IACbW,KAAK,EAAEC,MAAM,CAACE;IACd;IAAA;IACAC,KAAK,EAAEX,KAAK,CAACY,OAAO,CAACC,WAAY;IACjCZ,IAAI,EAAEA,IAAK;IACXC,OAAO,EAAEA,OAAQ;IACjBG,KAAK,EAAEF,aAAc;IACrBW,QAAQ,EAAEV,gBAAiB;IAC3BW,QAAQ,EAAE,YAAa;IACvBC,aAAa,EAAGX,KAAK,IAAKL,KAAK,CAACiB,QAAQ,CAACZ,KAAK;EAAE,EAChD,CACG;AAEX,CAAC;AAED,MAAMG,MAAM,GAAGd,UAAU,CAACwB,MAAM,CAAC;EAC/BT,SAAS,EAAE;IACTU,IAAI,EAAE;EACR,CAAC;EACDT,KAAK,EAAE;IACLU,WAAW,EAAEvB,SAAS,CAACC,UAAU,CAACuB,KAAK,CAAC,CAACC,aAAa;IACtDC,WAAW,EAAE,CAAC;IACdC,iBAAiB,EAAE,EAAE;IACrBC,UAAU,EAAE,EAAE;IACdC,aAAa,EAAE,EAAE;IACjBC,YAAY,EAAE,CAAC;IACfC,QAAQ,EAAE,EAAE;IACZC,KAAK,EAAE;EACT;AACF,CAAC,CAAC;AAEF,eAAe9B,cAAc"}
|
|
@@ -3,7 +3,6 @@ import { Modal, StyleSheet, Text, TextInput, TouchableOpacity, View } from 'reac
|
|
|
3
3
|
import { useFormContext } from 'rjsf-native';
|
|
4
4
|
import { AntDesign } from '@expo/vector-icons';
|
|
5
5
|
import CScanner from '../../scanner/CScanner';
|
|
6
|
-
|
|
7
6
|
const QRBarcodeScannerWidget = _ref => {
|
|
8
7
|
let {
|
|
9
8
|
id,
|
|
@@ -48,12 +47,10 @@ const QRBarcodeScannerWidget = _ref => {
|
|
|
48
47
|
onChange(data);
|
|
49
48
|
}
|
|
50
49
|
/**
|
|
51
|
-
* Failure case impl
|
|
52
|
-
,
|
|
50
|
+
* Failure case impl.*/,
|
|
53
51
|
onModalClose: () => setShow(false)
|
|
54
52
|
}));
|
|
55
53
|
};
|
|
56
|
-
|
|
57
54
|
function ScannerDialog(props) {
|
|
58
55
|
const [modalVisible, setModalVisible] = useState(true);
|
|
59
56
|
return /*#__PURE__*/React.createElement(View, {
|
|
@@ -89,7 +86,6 @@ function ScannerDialog(props) {
|
|
|
89
86
|
}
|
|
90
87
|
})))));
|
|
91
88
|
}
|
|
92
|
-
|
|
93
89
|
const styles = StyleSheet.create({
|
|
94
90
|
centeredView: {
|
|
95
91
|
flex: 1,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useState","Modal","StyleSheet","Text","TextInput","TouchableOpacity","View","useFormContext","AntDesign","CScanner","QRBarcodeScannerWidget","id","label","value","onChange","onFocus","autofocus","rawErrors","show","setShow","scannerOutput","setScannerOutput","theme","focused","setFocused","themedStyle","borderColor","length","errorColor","highlightColor","borderWidth","color","textColor","styles","container","placeholderTextColor","input","data","
|
|
1
|
+
{"version":3,"names":["React","useState","Modal","StyleSheet","Text","TextInput","TouchableOpacity","View","useFormContext","AntDesign","CScanner","QRBarcodeScannerWidget","_ref","id","label","value","onChange","onFocus","autofocus","rawErrors","show","setShow","scannerOutput","setScannerOutput","theme","focused","setFocused","themedStyle","borderColor","length","errorColor","highlightColor","borderWidth","color","textColor","createElement","style","styles","container","onPress","editable","onTouchStart","placeholder","autoFocus","selectionColor","placeholderTextColor","input","ScannerDialog","onSubmitDialog","data","onModalClose","props","modalVisible","setModalVisible","centeredView","animationType","transparent","visible","onRequestClose","modalContent","modalText","barCodeTypes","onScanned","result","name","size","create","flex","justifyContent","alignItems","marginTop","margin","backgroundColor","borderRadius","padding","shadowColor","shadowOffset","width","height","shadowOpacity","shadowRadius","elevation","marginBottom","textAlign","paddingHorizontal","paddingTop","paddingBottom","fontSize"],"sources":["QRBarcodeScannerWidget.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport {\n Modal,\n StyleSheet,\n Text,\n TextInput,\n TouchableOpacity,\n View,\n} from 'react-native';\nimport type { WidgetProps } from '@rjsf/core';\nimport { useFormContext } from 'rjsf-native';\nimport { AntDesign } from '@expo/vector-icons';\nimport CScanner from '../../scanner/CScanner';\n\nconst QRBarcodeScannerWidget = ({\n id,\n label,\n value,\n onChange,\n onFocus,\n autofocus,\n rawErrors,\n}: WidgetProps) => {\n const [show, setShow] = useState(false);\n const [scannerOutput, setScannerOutput] = React.useState<string>('');\n const { theme } = useFormContext();\n const [focused, setFocused] = useState(false);\n\n const themedStyle = {\n borderColor:\n rawErrors?.length > 0\n ? theme.errorColor\n : focused\n ? theme.highlightColor\n : theme.borderColor,\n borderWidth: focused ? 2 : 1,\n color: theme.textColor,\n };\n\n return (\n <View style={styles.container}>\n <TouchableOpacity onPress={() => setShow(true)}>\n <TextInput\n editable={false}\n onTouchStart={() => setShow(true)}\n value={scannerOutput}\n placeholder={label}\n autoFocus={autofocus}\n onFocus={() => {\n setFocused(true);\n onFocus(id, value);\n }}\n selectionColor={theme.highlightColor}\n placeholderTextColor={theme.placeholderTextColor}\n style={[styles.input, themedStyle]}\n />\n </TouchableOpacity>\n {show && (\n <ScannerDialog\n onSubmitDialog={(data) => {\n setScannerOutput(data);\n onChange(data);\n }}\n /**\n * Failure case impl.*/\n onModalClose={() => setShow(false)}\n />\n )}\n </View>\n );\n};\n\nfunction ScannerDialog(props: ScannerDialogProps) {\n const [modalVisible, setModalVisible] = useState(true);\n\n return (\n <View style={styles.centeredView}>\n <Modal\n animationType=\"slide\"\n transparent={true}\n visible={modalVisible}\n onRequestClose={() => {\n setModalVisible(!modalVisible);\n props.onModalClose();\n }}\n >\n <View style={styles.centeredView}>\n <View style={styles.modalContent}>\n <Text style={styles.modalText}>Barcode/QR Scanner</Text>\n <CScanner\n barCodeTypes={[]}\n onScanned={(result) => {\n props.onSubmitDialog(result);\n setModalVisible(false);\n props.onModalClose();\n }}\n />\n <AntDesign\n name=\"closecircleo\"\n size={40}\n color=\"blue\"\n onPress={() => {\n setModalVisible(false);\n props.onModalClose();\n }}\n />\n </View>\n </View>\n </Modal>\n </View>\n );\n}\nconst styles = StyleSheet.create({\n centeredView: {\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n marginTop: 22,\n },\n modalContent: {\n margin: 20,\n backgroundColor: 'white',\n borderRadius: 20,\n padding: 35,\n alignItems: 'center',\n shadowColor: '#000',\n shadowOffset: {\n width: 0,\n height: 2,\n },\n shadowOpacity: 0.25,\n shadowRadius: 4,\n elevation: 5,\n },\n modalText: {\n marginBottom: 15,\n textAlign: 'center',\n },\n container: {\n flex: 1,\n },\n input: {\n borderColor: '#979B9E',\n borderWidth: 1,\n paddingHorizontal: 16,\n paddingTop: 15,\n paddingBottom: 15,\n borderRadius: 4,\n fontSize: 16,\n color: '#333333',\n },\n});\n\nexport interface ScannerDialogProps {\n onSubmitDialog: (value: string) => void;\n onModalClose: ()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,EAAE;IACTsB,YAAY,EAAE,EAAE;IAChBC,SAAS,EAAE;EACb,CAAC;EACD7C,SAAS,EAAE;IACT6B,IAAI,EAAE;EACR,CAAC;EACDrB,KAAK,EAAE;IACLlB,WAAW,EAAE,SAAS;IACtBI,WAAW,EAAE,CAAC;IACdoD,iBAAiB,EAAE,EAAE;IACrBC,UAAU,EAAE,EAAE;IACdC,aAAa,EAAE,EAAE;IACjBb,YAAY,EAAE,CAAC;IACfc,QAAQ,EAAE,EAAE;IACZtD,KAAK,EAAE;EACT;AACF,CAAC,CAAC;AAMF,eAAetB,sBAAsB"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
2
|
import React, { useEffect, useState } from 'react';
|
|
4
3
|
import { StyleSheet, View } from 'react-native';
|
|
5
4
|
import DateTimeWidget from './DateTimeWidget';
|
|
6
|
-
|
|
7
5
|
const TimeRangeSelector = props => {
|
|
8
6
|
const [start, setStart] = useState(new Date());
|
|
9
7
|
const [end, setEnd] = useState(new Date());
|
|
@@ -25,7 +23,6 @@ const TimeRangeSelector = props => {
|
|
|
25
23
|
}
|
|
26
24
|
})));
|
|
27
25
|
};
|
|
28
|
-
|
|
29
26
|
const styles = StyleSheet.create({
|
|
30
27
|
container: {
|
|
31
28
|
flex: 1,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useEffect","useState","StyleSheet","View","DateTimeWidget","TimeRangeSelector","props","start","setStart","Date","end","setEnd","onChange","JSON","stringify","styles","container","date","create","flex","flexDirection","justifyContent"],"sources":["TimeRangeSelector.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport { StyleSheet, View } from 'react-native';\nimport type { WidgetProps } from '@rjsf/core';\nimport DateTimeWidget from './DateTimeWidget';\n\nconst TimeRangeSelector = (props: WidgetProps) => {\n const [start, setStart] = useState(new Date());\n const [end, setEnd] = useState(new Date());\n useEffect(() => {\n props.onChange(JSON.stringify({ start: start, end: end }));\n });\n return (\n <View style={styles.container}>\n <DateTimeWidget\n {...props}\n onChange={(date) => {\n setStart(date);\n }}\n />\n <DateTimeWidget\n {...props}\n onChange={(date) => {\n setEnd(date);\n }}\n />\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n flexDirection: 'row',\n justifyContent: 'space-between',\n },\n});\n\nexport default TimeRangeSelector;\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["React","useEffect","useState","StyleSheet","View","DateTimeWidget","TimeRangeSelector","props","start","setStart","Date","end","setEnd","onChange","JSON","stringify","createElement","style","styles","container","_extends","date","create","flex","flexDirection","justifyContent"],"sources":["TimeRangeSelector.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport { StyleSheet, View } from 'react-native';\nimport type { WidgetProps } from '@rjsf/core';\nimport DateTimeWidget from './DateTimeWidget';\n\nconst TimeRangeSelector = (props: WidgetProps) => {\n const [start, setStart] = useState(new Date());\n const [end, setEnd] = useState(new Date());\n useEffect(() => {\n props.onChange(JSON.stringify({ start: start, end: end }));\n });\n return (\n <View style={styles.container}>\n <DateTimeWidget\n {...props}\n onChange={(date) => {\n setStart(date);\n }}\n />\n <DateTimeWidget\n {...props}\n onChange={(date) => {\n setEnd(date);\n }}\n />\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n flexDirection: 'row',\n justifyContent: 'space-between',\n },\n});\n\nexport default TimeRangeSelector;\n"],"mappings":";AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAClD,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAE/C,OAAOC,cAAc,MAAM,kBAAkB;AAE7C,MAAMC,iBAAiB,GAAIC,KAAkB,IAAK;EAChD,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAGP,QAAQ,CAAC,IAAIQ,IAAI,EAAE,CAAC;EAC9C,MAAM,CAACC,GAAG,EAAEC,MAAM,CAAC,GAAGV,QAAQ,CAAC,IAAIQ,IAAI,EAAE,CAAC;EAC1CT,SAAS,CAAC,MAAM;IACdM,KAAK,CAACM,QAAQ,CAACC,IAAI,CAACC,SAAS,CAAC;MAAEP,KAAK,EAAEA,KAAK;MAAEG,GAAG,EAAEA;IAAI,CAAC,CAAC,CAAC;EAC5D,CAAC,CAAC;EACF,oBACEX,KAAA,CAAAgB,aAAA,CAACZ,IAAI;IAACa,KAAK,EAAEC,MAAM,CAACC;EAAU,gBAC5BnB,KAAA,CAAAgB,aAAA,CAACX,cAAc,EAAAe,QAAA,KACTb,KAAK;IACTM,QAAQ,EAAGQ,IAAI,IAAK;MAClBZ,QAAQ,CAACY,IAAI,CAAC;IAChB;EAAE,GACF,eACFrB,KAAA,CAAAgB,aAAA,CAACX,cAAc,EAAAe,QAAA,KACTb,KAAK;IACTM,QAAQ,EAAGQ,IAAI,IAAK;MAClBT,MAAM,CAACS,IAAI,CAAC;IACd;EAAE,GACF,CACG;AAEX,CAAC;AAED,MAAMH,MAAM,GAAGf,UAAU,CAACmB,MAAM,CAAC;EAC/BH,SAAS,EAAE;IACTI,IAAI,EAAE,CAAC;IACPC,aAAa,EAAE,KAAK;IACpBC,cAAc,EAAE;EAClB;AACF,CAAC,CAAC;AAEF,eAAenB,iBAAiB"}
|
|
@@ -12,7 +12,8 @@ export async function getApiResponse(apiData) {
|
|
|
12
12
|
timeout: apiData.timeout ?? 15000,
|
|
13
13
|
// timeout in millis i.e 15s
|
|
14
14
|
url: apiData.uri,
|
|
15
|
-
headers: {
|
|
15
|
+
headers: {
|
|
16
|
+
...getAddHeaders(apiData.headers),
|
|
16
17
|
...(await getHeaders(API_CONTENT_TYPES.APPLICATION_JSON))
|
|
17
18
|
}
|
|
18
19
|
};
|
|
@@ -26,7 +27,8 @@ export function getOutputUsingJsonpath(json, jsonPath) {
|
|
|
26
27
|
});
|
|
27
28
|
}
|
|
28
29
|
export async function getHttpETOutput(apiResponse, jsonPath, success) {
|
|
29
|
-
return {
|
|
30
|
+
return {
|
|
31
|
+
...(await getBaseETResponse(EntityCode.HTTP_REQUEST_ET, success, success ? BaseEventCodes.ENTITY_SUCCESS : BaseEventCodes.ENTITY_FAILURE, '')),
|
|
30
32
|
apiResponse: getOutputUsingJsonpath(apiResponse, jsonPath)
|
|
31
33
|
};
|
|
32
34
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["axios","getAddHeaders","getHeaders","API_CONTENT_TYPES","JSONPath","isEmptyOrBlank","getBaseETResponse","BaseEventCodes","EntityCode","getApiResponse","apiData","axiosConfig","data","requestBody","method","httpMethod","timeout","url","uri","headers","APPLICATION_JSON","getOutputUsingJsonpath","json","jsonPath","path","getHttpETOutput","apiResponse","success","HTTP_REQUEST_ET","ENTITY_SUCCESS","ENTITY_FAILURE"],"sources":["HttpEtUtils.ts"],"sourcesContent":["import type { APIData, HttpRequestETOutput } from './HttpRequestETSchema';\nimport axios, { AxiosRequestConfig } from 'axios';\nimport { getAddHeaders, getHeaders } from '../../../network/NetworkUtils';\nimport { API_CONTENT_TYPES } from '../../../network/GraphQLClient';\nimport { JSONPath } from 'jsonpath-plus';\nimport { isEmptyOrBlank } from '../../../utils/utils';\nimport { getBaseETResponse } from '../../../utils/ExecTaskUtils';\nimport { BaseEventCodes, EntityCode } from '../../../models/execTasks/ETConfig';\n\nexport async function getApiResponse(apiData: APIData) {\n const axiosConfig: AxiosRequestConfig = {\n data: apiData.requestBody,\n method: apiData.httpMethod,\n timeout: apiData.timeout ?? 15000, // timeout in millis i.e 15s\n url: apiData.uri,\n headers: {\n ...getAddHeaders(apiData.headers),\n ...(await getHeaders(API_CONTENT_TYPES.APPLICATION_JSON)),\n },\n };\n return axios(axiosConfig);\n}\nexport function getOutputUsingJsonpath(json: object, jsonPath: string) {\n if (isEmptyOrBlank(jsonPath)) return json;\n return JSONPath({ path: jsonPath, json });\n}\n\nexport async function getHttpETOutput(\n apiResponse: object,\n jsonPath: string,\n success: boolean\n): Promise<HttpRequestETOutput> {\n return {\n ...(await getBaseETResponse(\n EntityCode.HTTP_REQUEST_ET,\n success,\n success ? BaseEventCodes.ENTITY_SUCCESS : BaseEventCodes.ENTITY_FAILURE,\n ''\n )),\n apiResponse: getOutputUsingJsonpath(apiResponse, jsonPath),\n };\n}\n"],"mappings":"AACA,OAAOA,
|
|
1
|
+
{"version":3,"names":["axios","getAddHeaders","getHeaders","API_CONTENT_TYPES","JSONPath","isEmptyOrBlank","getBaseETResponse","BaseEventCodes","EntityCode","getApiResponse","apiData","axiosConfig","data","requestBody","method","httpMethod","timeout","url","uri","headers","APPLICATION_JSON","getOutputUsingJsonpath","json","jsonPath","path","getHttpETOutput","apiResponse","success","HTTP_REQUEST_ET","ENTITY_SUCCESS","ENTITY_FAILURE"],"sources":["HttpEtUtils.ts"],"sourcesContent":["import type { APIData, HttpRequestETOutput } from './HttpRequestETSchema';\nimport axios, { AxiosRequestConfig } from 'axios';\nimport { getAddHeaders, getHeaders } from '../../../network/NetworkUtils';\nimport { API_CONTENT_TYPES } from '../../../network/GraphQLClient';\nimport { JSONPath } from 'jsonpath-plus';\nimport { isEmptyOrBlank } from '../../../utils/utils';\nimport { getBaseETResponse } from '../../../utils/ExecTaskUtils';\nimport { BaseEventCodes, EntityCode } from '../../../models/execTasks/ETConfig';\n\nexport async function getApiResponse(apiData: APIData) {\n const axiosConfig: AxiosRequestConfig = {\n data: apiData.requestBody,\n method: apiData.httpMethod,\n timeout: apiData.timeout ?? 15000, // timeout in millis i.e 15s\n url: apiData.uri,\n headers: {\n ...getAddHeaders(apiData.headers),\n ...(await getHeaders(API_CONTENT_TYPES.APPLICATION_JSON)),\n },\n };\n return axios(axiosConfig);\n}\nexport function getOutputUsingJsonpath(json: object, jsonPath: string) {\n if (isEmptyOrBlank(jsonPath)) return json;\n return JSONPath({ path: jsonPath, json });\n}\n\nexport async function getHttpETOutput(\n apiResponse: object,\n jsonPath: string,\n success: boolean\n): Promise<HttpRequestETOutput> {\n return {\n ...(await getBaseETResponse(\n EntityCode.HTTP_REQUEST_ET,\n success,\n success ? BaseEventCodes.ENTITY_SUCCESS : BaseEventCodes.ENTITY_FAILURE,\n ''\n )),\n apiResponse: getOutputUsingJsonpath(apiResponse, jsonPath),\n };\n}\n"],"mappings":"AACA,OAAOA,KAAK,MAA8B,OAAO;AACjD,SAASC,aAAa,EAAEC,UAAU,QAAQ,+BAA+B;AACzE,SAASC,iBAAiB,QAAQ,gCAAgC;AAClE,SAASC,QAAQ,QAAQ,eAAe;AACxC,SAASC,cAAc,QAAQ,sBAAsB;AACrD,SAASC,iBAAiB,QAAQ,8BAA8B;AAChE,SAASC,cAAc,EAAEC,UAAU,QAAQ,oCAAoC;AAE/E,OAAO,eAAeC,cAAcA,CAACC,OAAgB,EAAE;EACrD,MAAMC,WAA+B,GAAG;IACtCC,IAAI,EAAEF,OAAO,CAACG,WAAW;IACzBC,MAAM,EAAEJ,OAAO,CAACK,UAAU;IAC1BC,OAAO,EAAEN,OAAO,CAACM,OAAO,IAAI,KAAK;IAAE;IACnCC,GAAG,EAAEP,OAAO,CAACQ,GAAG;IAChBC,OAAO,EAAE;MACP,GAAGlB,aAAa,CAACS,OAAO,CAACS,OAAO,CAAC;MACjC,IAAI,MAAMjB,UAAU,CAACC,iBAAiB,CAACiB,gBAAgB,CAAC;IAC1D;EACF,CAAC;EACD,OAAOpB,KAAK,CAACW,WAAW,CAAC;AAC3B;AACA,OAAO,SAASU,sBAAsBA,CAACC,IAAY,EAAEC,QAAgB,EAAE;EACrE,IAAIlB,cAAc,CAACkB,QAAQ,CAAC,EAAE,OAAOD,IAAI;EACzC,OAAOlB,QAAQ,CAAC;IAAEoB,IAAI,EAAED,QAAQ;IAAED;EAAK,CAAC,CAAC;AAC3C;AAEA,OAAO,eAAeG,eAAeA,CACnCC,WAAmB,EACnBH,QAAgB,EAChBI,OAAgB,EACc;EAC9B,OAAO;IACL,IAAI,MAAMrB,iBAAiB,CACzBE,UAAU,CAACoB,eAAe,EAC1BD,OAAO,EACPA,OAAO,GAAGpB,cAAc,CAACsB,cAAc,GAAGtB,cAAc,CAACuB,cAAc,EACvE,EAAE,CACH,CAAC;IACFJ,WAAW,EAAEL,sBAAsB,CAACK,WAAW,EAAEH,QAAQ;EAC3D,CAAC;AACH"}
|
|
@@ -4,7 +4,6 @@ import { View } from 'react-native';
|
|
|
4
4
|
import React, { useEffect, useState } from 'react';
|
|
5
5
|
import { PLEASE_WAIT } from '../../../res/strings';
|
|
6
6
|
import { getApiResponse, getHttpETOutput } from './HttpEtUtils';
|
|
7
|
-
|
|
8
7
|
const HttpRequestET = props => {
|
|
9
8
|
const [inProgress, setInProgress] = useState(true);
|
|
10
9
|
useEffect(() => {
|
|
@@ -16,7 +15,6 @@ const HttpRequestET = props => {
|
|
|
16
15
|
props.onSubmitET(await getHttpETOutput(apiResponse.data, props.api.responseJsonPath, true));
|
|
17
16
|
} catch (error) {
|
|
18
17
|
setInProgress(false);
|
|
19
|
-
|
|
20
18
|
if (error.response) {
|
|
21
19
|
/**
|
|
22
20
|
* The request was made and the server responded
|
|
@@ -37,6 +35,5 @@ const HttpRequestET = props => {
|
|
|
37
35
|
label: props.message ?? PLEASE_WAIT
|
|
38
36
|
}));
|
|
39
37
|
};
|
|
40
|
-
|
|
41
38
|
export default HttpRequestET;
|
|
42
39
|
//# sourceMappingURL=HttpRequestET.js.map
|