@os1-platform/dispatch-mobile 1.0.8 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +310 -74
- package/android/.gradle/7.0.2/fileChanges/last-build.bin +0 -0
- package/android/.gradle/7.0.2/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/7.0.2/gc.properties +0 -0
- package/android/.gradle/7.2/dependencies-accessors/dependencies-accessors.lock +0 -0
- package/android/.gradle/7.2/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/7.2/executionHistory/executionHistory.bin +0 -0
- package/android/.gradle/7.2/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/7.2/fileChanges/last-build.bin +0 -0
- package/android/.gradle/7.2/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/7.2/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/7.2/fileHashes/resourceHashesCache.bin +0 -0
- package/android/.gradle/7.2/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
- package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
- package/android/.gradle/checksums/checksums.lock +0 -0
- package/android/.gradle/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/checksums/sha1-checksums.bin +0 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/.idea/compiler.xml +6 -0
- package/android/.idea/gradle.xml +18 -0
- package/android/.idea/jarRepositories.xml +35 -0
- package/android/.idea/kotlinc.xml +6 -0
- package/android/.idea/misc.xml +9 -0
- package/android/.idea/vcs.xml +6 -0
- package/android/gradle.properties +1 -1
- package/android/local.properties +8 -0
- package/android/src/main/AndroidManifest.xml +0 -1
- package/android/src/main/java/com/dispatchsdk/DispatchSdkPackage.kt +3 -1
- package/android/src/main/java/com/dispatchsdk/sharedPref/SharedPreferenceModule.kt +166 -0
- package/lib/commonjs/@types/assets/index.d.js +2 -0
- package/lib/commonjs/@types/assets/index.d.js.map +1 -0
- package/lib/commonjs/components/dispatch/DispatchExecNavigator.js +50 -43
- package/lib/commonjs/components/dispatch/DispatchExecNavigator.js.map +1 -1
- package/lib/commonjs/components/executiontasks/ExecutionTasksIndex.js +10 -48
- package/lib/commonjs/components/executiontasks/ExecutionTasksIndex.js.map +1 -1
- package/lib/commonjs/components/executiontasks/cancellation/CancelET.js +142 -23
- package/lib/commonjs/components/executiontasks/cancellation/CancelET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/cancellation/CancellationSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js +66 -18
- package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js.map +1 -1
- package/lib/commonjs/components/executiontasks/captureInput/utils.js +13 -0
- package/lib/commonjs/components/executiontasks/captureInput/utils.js.map +1 -0
- package/lib/commonjs/components/executiontasks/deliver/DeliverET.js +6 -16
- package/lib/commonjs/components/executiontasks/deliver/DeliverET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/deliver/DeliverETInput.js.map +1 -1
- package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js +212 -95
- package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/display/DisplayModalET.js +16 -25
- package/lib/commonjs/components/executiontasks/display/DisplayModalET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/doodle/SignatureET.js +65 -29
- package/lib/commonjs/components/executiontasks/doodle/SignatureET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/dropCash/DropCashET.js +5 -19
- package/lib/commonjs/components/executiontasks/dropCash/DropCashET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js +74 -30
- package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/FormGenerator.js +139 -50
- package/lib/commonjs/components/executiontasks/forms/FormGenerator.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/DateTimeWidget.js +3 -26
- package/lib/commonjs/components/executiontasks/forms/widgets/DateTimeWidget.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/DropdownWidget.js +49 -0
- package/lib/commonjs/components/executiontasks/forms/widgets/DropdownWidget.js.map +1 -0
- package/lib/commonjs/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js +2 -17
- package/lib/commonjs/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/TimeRangeSelector.js +0 -10
- package/lib/commonjs/components/executiontasks/forms/widgets/TimeRangeSelector.js.map +1 -1
- package/lib/commonjs/components/executiontasks/httpRequest/HttpEtUtils.js +5 -14
- package/lib/commonjs/components/executiontasks/httpRequest/HttpEtUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/httpRequest/HttpRequestET.js +3 -15
- package/lib/commonjs/components/executiontasks/httpRequest/HttpRequestET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/imageCapture/CaptureSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js +11 -36
- package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js +73 -48
- package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/PaymentStyles.js +0 -4
- package/lib/commonjs/components/executiontasks/payments/PaymentStyles.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/PaymentUtils.js +0 -2
- package/lib/commonjs/components/executiontasks/payments/PaymentUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js +76 -29
- package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js +63 -24
- package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js +71 -22
- package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/pickup/PickupET.js +5 -15
- package/lib/commonjs/components/executiontasks/pickup/PickupET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js +138 -32
- package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/ScanET.js +741 -0
- package/lib/commonjs/components/executiontasks/scan/ScanET.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/ScanSchema.js +19 -0
- package/lib/commonjs/components/executiontasks/scan/ScanSchema.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/constants.js +19 -0
- package/lib/commonjs/components/executiontasks/scan/constants.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/interfaces.js +43 -0
- package/lib/commonjs/components/executiontasks/scan/interfaces.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/modalConstant.js +104 -0
- package/lib/commonjs/components/executiontasks/scan/modalConstant.js.map +1 -0
- package/lib/commonjs/components/executiontasks/{scanner → scan/sub_components}/CScanner.js +9 -29
- package/lib/commonjs/components/executiontasks/scan/sub_components/CScanner.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/DropDownUtils.js +109 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/DropDownUtils.js.map +1 -0
- package/lib/commonjs/components/executiontasks/{scanner/returns/ReasonDropDown.js → scan/sub_components/ERDropDown.js} +72 -55
- package/lib/commonjs/components/executiontasks/scan/sub_components/ERDropDown.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/SummaryPage.js +1099 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/SummaryPage.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/utils.js +762 -0
- package/lib/commonjs/components/executiontasks/scan/utils.js.map +1 -0
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPET.js +333 -0
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPET.js.map +1 -0
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPSchema.js +14 -0
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPSchema.js.map +1 -0
- package/lib/commonjs/components/executiontasks/validateOTP/constants.js +37 -0
- package/lib/commonjs/components/executiontasks/validateOTP/constants.js.map +1 -0
- package/lib/commonjs/components/executiontasks/validateOTP/sub-components/OTPInput.js +63 -0
- package/lib/commonjs/components/executiontasks/validateOTP/sub-components/OTPInput.js.map +1 -0
- package/lib/commonjs/components/executiontasks/validateOTP/utils.js +147 -0
- package/lib/commonjs/components/executiontasks/validateOTP/utils.js.map +1 -0
- package/lib/commonjs/components/executiontasks/verifyLocation/GeofenceUtils.js +0 -13
- package/lib/commonjs/components/executiontasks/verifyLocation/GeofenceUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/verifyLocation/VerifyLocationET.js +4 -17
- package/lib/commonjs/components/executiontasks/verifyLocation/VerifyLocationET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpET.js +3 -18
- package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpSchema.js.map +1 -1
- package/lib/commonjs/components/utils/index.js +14 -0
- package/lib/commonjs/components/utils/index.js.map +1 -0
- package/lib/commonjs/components/widgets/AlertDisplay.js +0 -5
- package/lib/commonjs/components/widgets/AlertDisplay.js.map +1 -1
- package/lib/commonjs/components/widgets/CancelOrderDialog.js +0 -12
- package/lib/commonjs/components/widgets/CancelOrderDialog.js.map +1 -1
- package/lib/commonjs/components/widgets/Card.js +88 -0
- package/lib/commonjs/components/widgets/Card.js.map +1 -0
- package/lib/commonjs/components/widgets/GoBackModal.js +48 -0
- package/lib/commonjs/components/widgets/GoBackModal.js.map +1 -0
- package/lib/commonjs/components/widgets/IconButton.js +34 -0
- package/lib/commonjs/components/widgets/IconButton.js.map +1 -0
- package/lib/commonjs/components/widgets/ModalWidget.js +99 -0
- package/lib/commonjs/components/widgets/ModalWidget.js.map +1 -0
- package/lib/commonjs/components/widgets/ProgressDialog.js +0 -7
- package/lib/commonjs/components/widgets/ProgressDialog.js.map +1 -1
- package/lib/commonjs/components/widgets/SearchBar.js +74 -0
- package/lib/commonjs/components/widgets/SearchBar.js.map +1 -0
- package/lib/commonjs/components/widgets/SnackBarCustom.js +48 -40
- package/lib/commonjs/components/widgets/SnackBarCustom.js.map +1 -1
- package/lib/commonjs/components/widgets/SplitTextInput.js +93 -0
- package/lib/commonjs/components/widgets/SplitTextInput.js.map +1 -0
- package/lib/commonjs/components/widgets/TabsComponent.js +64 -0
- package/lib/commonjs/components/widgets/TabsComponent.js.map +1 -0
- package/lib/commonjs/components/widgets/Toaster.js +0 -2
- package/lib/commonjs/components/widgets/Toaster.js.map +1 -1
- package/lib/commonjs/config/DispatchSDKConfig.js +4 -5
- package/lib/commonjs/config/DispatchSDKConfig.js.map +1 -1
- package/lib/commonjs/constants/apiConstants.js +17 -0
- package/lib/commonjs/constants/apiConstants.js.map +1 -0
- package/lib/commonjs/constants/constants.js +7 -3
- package/lib/commonjs/constants/constants.js.map +1 -1
- package/lib/commonjs/constants/statuscode.js +3 -5
- package/lib/commonjs/constants/statuscode.js.map +1 -1
- package/lib/commonjs/errors/BaseError.js +3 -8
- package/lib/commonjs/errors/BaseError.js.map +1 -1
- package/lib/commonjs/errors/ErrorCodes.js +7 -6
- package/lib/commonjs/errors/ErrorCodes.js.map +1 -1
- package/lib/commonjs/events/EventDispatcher.js +23 -0
- package/lib/commonjs/events/EventDispatcher.js.map +1 -0
- package/lib/commonjs/events/EventListener.js +20 -0
- package/lib/commonjs/events/EventListener.js.map +1 -0
- package/lib/commonjs/events/constants.js +15 -0
- package/lib/commonjs/events/constants.js.map +1 -0
- package/lib/commonjs/events/index.js +11 -0
- package/lib/commonjs/events/index.js.map +1 -0
- package/lib/commonjs/events/interface.js +2 -0
- package/lib/commonjs/events/interface.js.map +1 -0
- package/lib/commonjs/index.js +40 -35
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/manager/dispatch/DispatchStateContainer.js +328 -272
- package/lib/commonjs/manager/dispatch/DispatchStateContainer.js.map +1 -1
- package/lib/commonjs/manager/dispatchCodes/EventCodeContainer.js +55 -4
- package/lib/commonjs/manager/dispatchCodes/EventCodeContainer.js.map +1 -1
- package/lib/commonjs/manager/dispatchCodes/EventCodeRepo.js +70 -0
- package/lib/commonjs/manager/dispatchCodes/EventCodeRepo.js.map +1 -0
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeContainer.js +3 -29
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeContainer.js.map +1 -1
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeRepo.js +6 -20
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeRepo.js.map +1 -1
- package/lib/commonjs/manager/jobRemoval/JobRemovalManager.js +23 -0
- package/lib/commonjs/manager/jobRemoval/JobRemovalManager.js.map +1 -0
- package/lib/commonjs/manager/location/LocationManager.js +3 -20
- package/lib/commonjs/manager/location/LocationManager.js.map +1 -1
- package/lib/commonjs/manager/sdk/DispatchSDKManager.js +23 -37
- package/lib/commonjs/manager/sdk/DispatchSDKManager.js.map +1 -1
- package/lib/commonjs/manager/sdk/DispatchSdkCache.js +6 -17
- package/lib/commonjs/manager/sdk/DispatchSdkCache.js.map +1 -1
- package/lib/commonjs/manager/sdk/callbacksHandler.js +26 -0
- package/lib/commonjs/manager/sdk/callbacksHandler.js.map +1 -0
- package/lib/commonjs/manager/syncmanager/AppSyncManager.js +26 -46
- package/lib/commonjs/manager/syncmanager/AppSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/DBConfig.js +48 -9
- package/lib/commonjs/manager/syncmanager/DBConfig.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/NativeSyncManager.js +0 -2
- package/lib/commonjs/manager/syncmanager/NativeSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/constants.js +17 -0
- package/lib/commonjs/manager/syncmanager/constants.js.map +1 -0
- package/lib/commonjs/manager/syncmanager/database.js +28 -12
- package/lib/commonjs/manager/syncmanager/database.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js +11 -36
- package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentManager.js +8 -26
- package/lib/commonjs/manager/syncmanager/document/DocumentManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js +19 -58
- package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/events/ETEventsManager.js +414 -29
- package/lib/commonjs/manager/syncmanager/events/ETEventsManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/events/EventsSyncManager.js +208 -103
- package/lib/commonjs/manager/syncmanager/events/EventsSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/events/SyncHttpClient.js +157 -36
- package/lib/commonjs/manager/syncmanager/events/SyncHttpClient.js.map +1 -1
- package/lib/commonjs/models/DispatchModels.js +4 -5
- package/lib/commonjs/models/DispatchModels.js.map +1 -1
- package/lib/commonjs/models/ReasonCodes.js.map +1 -1
- package/lib/commonjs/models/execTasks/ETBaseModels.js +4 -0
- package/lib/commonjs/models/execTasks/ETBaseModels.js.map +1 -1
- package/lib/commonjs/models/execTasks/ETConfig.js +28 -35
- package/lib/commonjs/models/execTasks/ETConfig.js.map +1 -1
- package/lib/commonjs/models/sdk.js +4 -5
- package/lib/commonjs/models/sdk.js.map +1 -1
- package/lib/commonjs/native/signature/SignatureCapture.js +3 -24
- package/lib/commonjs/native/signature/SignatureCapture.js.map +1 -1
- package/lib/commonjs/network/GraphQLClient.js +7 -35
- package/lib/commonjs/network/GraphQLClient.js.map +1 -1
- package/lib/commonjs/network/NetworkClient.js +2 -13
- package/lib/commonjs/network/NetworkClient.js.map +1 -1
- package/lib/commonjs/network/NetworkUtils.js +10 -8
- package/lib/commonjs/network/NetworkUtils.js.map +1 -1
- package/lib/commonjs/network/Queries.js +0 -2
- package/lib/commonjs/network/Queries.js.map +1 -1
- package/lib/commonjs/network/client.js +6 -21
- package/lib/commonjs/network/client.js.map +1 -1
- package/lib/commonjs/res/strings.js.map +1 -1
- package/lib/commonjs/resources/Login.js +4 -15
- package/lib/commonjs/resources/Login.js.map +1 -1
- package/lib/commonjs/resources/network.js +3 -8
- package/lib/commonjs/resources/network.js.map +1 -1
- package/lib/commonjs/styles/SdkColors.js +10 -8
- package/lib/commonjs/styles/SdkColors.js.map +1 -1
- package/lib/commonjs/styles/executionTasks/CommonStyles.js +58 -25
- package/lib/commonjs/styles/executionTasks/CommonStyles.js.map +1 -1
- package/lib/commonjs/ui/screens/CancellationScreen.js +67 -27
- package/lib/commonjs/ui/screens/CancellationScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/CaptureInputScreen.js +15 -16
- package/lib/commonjs/ui/screens/CaptureInputScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/CompleteObjectiveScreen.js +11 -23
- package/lib/commonjs/ui/screens/CompleteObjectiveScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DeliverScreen.js +30 -17
- package/lib/commonjs/ui/screens/DeliverScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DisplayScreen.js +17 -13
- package/lib/commonjs/ui/screens/DisplayScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DoodleScreen.js +17 -20
- package/lib/commonjs/ui/screens/DoodleScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DropCashScreen.js +43 -31
- package/lib/commonjs/ui/screens/DropCashScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ETScreensIndex.js +10 -19
- package/lib/commonjs/ui/screens/ETScreensIndex.js.map +1 -1
- package/lib/commonjs/ui/screens/FormsScreen.js +105 -17
- package/lib/commonjs/ui/screens/FormsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/GeofenceScreen.js +16 -14
- package/lib/commonjs/ui/screens/GeofenceScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HttpRequestScreen.js +14 -11
- package/lib/commonjs/ui/screens/HttpRequestScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ImageCaptureScreen.js +38 -17
- package/lib/commonjs/ui/screens/ImageCaptureScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PaymentScreen.js +28 -29
- package/lib/commonjs/ui/screens/PaymentScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PickupScreen.js +41 -19
- package/lib/commonjs/ui/screens/PickupScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ScanScreen.js +121 -0
- package/lib/commonjs/ui/screens/ScanScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/StartWorkFlowScreen.js +64 -38
- package/lib/commonjs/ui/screens/StartWorkFlowScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ValidateOTPScreen.js +55 -0
- package/lib/commonjs/ui/screens/ValidateOTPScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/WithBaseDispatchScreen.js +0 -10
- package/lib/commonjs/ui/screens/WithBaseDispatchScreen.js.map +1 -1
- package/lib/commonjs/ui/uiConfig/RouteParams.js +24 -1
- package/lib/commonjs/ui/uiConfig/RouteParams.js.map +1 -1
- package/lib/commonjs/utils/ApiUtils.js +129 -0
- package/lib/commonjs/utils/ApiUtils.js.map +1 -0
- package/lib/commonjs/utils/ExecTaskUtils.js +111 -41
- package/lib/commonjs/utils/ExecTaskUtils.js.map +1 -1
- package/lib/commonjs/utils/Logger.js +10 -29
- package/lib/commonjs/utils/Logger.js.map +1 -1
- package/lib/commonjs/utils/NetworkUtil.js +3 -19
- package/lib/commonjs/utils/NetworkUtil.js.map +1 -1
- package/lib/commonjs/utils/SdkUtils.js +2 -31
- package/lib/commonjs/utils/SdkUtils.js.map +1 -1
- package/lib/commonjs/utils/SyncManagerUtils.js +61 -43
- package/lib/commonjs/utils/SyncManagerUtils.js.map +1 -1
- package/lib/commonjs/utils/fcm/FCM.js +59 -11
- package/lib/commonjs/utils/fcm/FCM.js.map +1 -1
- package/lib/commonjs/utils/fcm/FcmUtils.js +82 -21
- package/lib/commonjs/utils/fcm/FcmUtils.js.map +1 -1
- package/lib/commonjs/utils/helper.js +0 -5
- package/lib/commonjs/utils/helper.js.map +1 -1
- package/lib/commonjs/utils/hooks/useModal.js +53 -0
- package/lib/commonjs/utils/hooks/useModal.js.map +1 -0
- package/lib/commonjs/utils/hooks/useTimer.js +44 -0
- package/lib/commonjs/utils/hooks/useTimer.js.map +1 -0
- package/lib/commonjs/utils/loginHelper.js +6 -18
- package/lib/commonjs/utils/loginHelper.js.map +1 -1
- package/lib/commonjs/utils/storage.js +87 -31
- package/lib/commonjs/utils/storage.js.map +1 -1
- package/lib/commonjs/utils/utils.js +8 -11
- package/lib/commonjs/utils/utils.js.map +1 -1
- package/lib/module/@types/assets/index.d.js +2 -0
- package/lib/module/@types/assets/index.d.js.map +1 -0
- package/lib/module/components/dispatch/DispatchExecNavigator.js +50 -32
- package/lib/module/components/dispatch/DispatchExecNavigator.js.map +1 -1
- package/lib/module/components/executiontasks/ExecutionTasksIndex.js +3 -5
- package/lib/module/components/executiontasks/ExecutionTasksIndex.js.map +1 -1
- package/lib/module/components/executiontasks/cancellation/CancelET.js +145 -19
- package/lib/module/components/executiontasks/cancellation/CancelET.js.map +1 -1
- package/lib/module/components/executiontasks/cancellation/CancellationSchema.js.map +1 -1
- package/lib/module/components/executiontasks/captureInput/CaptureText.js +68 -10
- package/lib/module/components/executiontasks/captureInput/CaptureText.js.map +1 -1
- package/lib/module/components/executiontasks/captureInput/utils.js +7 -0
- package/lib/module/components/executiontasks/captureInput/utils.js.map +1 -0
- package/lib/module/components/executiontasks/deliver/DeliverET.js +6 -7
- package/lib/module/components/executiontasks/deliver/DeliverET.js.map +1 -1
- package/lib/module/components/executiontasks/deliver/DeliverETInput.js.map +1 -1
- package/lib/module/components/executiontasks/deliver/SLDeliverET.js +214 -86
- package/lib/module/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
- package/lib/module/components/executiontasks/display/DisplayModalET.js +16 -15
- package/lib/module/components/executiontasks/display/DisplayModalET.js.map +1 -1
- package/lib/module/components/executiontasks/doodle/SignatureET.js +68 -15
- package/lib/module/components/executiontasks/doodle/SignatureET.js.map +1 -1
- package/lib/module/components/executiontasks/dropCash/DropCashET.js +5 -6
- package/lib/module/components/executiontasks/dropCash/DropCashET.js.map +1 -1
- package/lib/module/components/executiontasks/dropCash/SLDropCash.js +75 -20
- package/lib/module/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
- package/lib/module/components/executiontasks/forms/FormGenerator.js +142 -37
- package/lib/module/components/executiontasks/forms/FormGenerator.js.map +1 -1
- package/lib/module/components/executiontasks/forms/widgets/DateTimeWidget.js +3 -15
- package/lib/module/components/executiontasks/forms/widgets/DateTimeWidget.js.map +1 -1
- package/lib/module/components/executiontasks/forms/widgets/DropdownWidget.js +39 -0
- package/lib/module/components/executiontasks/forms/widgets/DropdownWidget.js.map +1 -0
- package/lib/module/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js +2 -6
- package/lib/module/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js.map +1 -1
- package/lib/module/components/executiontasks/forms/widgets/TimeRangeSelector.js +0 -3
- package/lib/module/components/executiontasks/forms/widgets/TimeRangeSelector.js.map +1 -1
- package/lib/module/components/executiontasks/httpRequest/HttpEtUtils.js +6 -4
- package/lib/module/components/executiontasks/httpRequest/HttpEtUtils.js.map +1 -1
- package/lib/module/components/executiontasks/httpRequest/HttpRequestET.js +3 -6
- package/lib/module/components/executiontasks/httpRequest/HttpRequestET.js.map +1 -1
- package/lib/module/components/executiontasks/imageCapture/CaptureSchema.js.map +1 -1
- package/lib/module/components/executiontasks/imageCapture/CaptureUtils.js +11 -11
- package/lib/module/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
- package/lib/module/components/executiontasks/imageCapture/ImageCapture.js +75 -35
- package/lib/module/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
- package/lib/module/components/executiontasks/payments/PaymentStyles.js.map +1 -1
- package/lib/module/components/executiontasks/payments/PaymentUtils.js.map +1 -1
- package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentET.js +77 -18
- package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
- package/lib/module/components/executiontasks/payments/init/InitPaymentET.js +64 -11
- package/lib/module/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
- package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentET.js +72 -11
- package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
- package/lib/module/components/executiontasks/pickup/PickupET.js +5 -6
- package/lib/module/components/executiontasks/pickup/PickupET.js.map +1 -1
- package/lib/module/components/executiontasks/pickup/SLPickupET.js +141 -25
- package/lib/module/components/executiontasks/pickup/SLPickupET.js.map +1 -1
- package/lib/module/components/executiontasks/scan/ScanET.js +732 -0
- package/lib/module/components/executiontasks/scan/ScanET.js.map +1 -0
- package/lib/module/components/executiontasks/scan/ScanSchema.js +17 -0
- package/lib/module/components/executiontasks/scan/ScanSchema.js.map +1 -0
- package/lib/module/components/executiontasks/scan/constants.js +7 -0
- package/lib/module/components/executiontasks/scan/constants.js.map +1 -0
- package/lib/module/components/executiontasks/scan/interfaces.js +33 -0
- package/lib/module/components/executiontasks/scan/interfaces.js.map +1 -0
- package/lib/module/components/executiontasks/scan/modalConstant.js +94 -0
- package/lib/module/components/executiontasks/scan/modalConstant.js.map +1 -0
- package/lib/module/components/executiontasks/{scanner → scan/sub_components}/CScanner.js +9 -16
- package/lib/module/components/executiontasks/scan/sub_components/CScanner.js.map +1 -0
- package/lib/module/components/executiontasks/scan/sub_components/DropDownUtils.js +101 -0
- package/lib/module/components/executiontasks/scan/sub_components/DropDownUtils.js.map +1 -0
- package/lib/module/components/executiontasks/scan/sub_components/ERDropDown.js +107 -0
- package/lib/module/components/executiontasks/scan/sub_components/ERDropDown.js.map +1 -0
- package/lib/module/components/executiontasks/scan/sub_components/SummaryPage.js +1092 -0
- package/lib/module/components/executiontasks/scan/sub_components/SummaryPage.js.map +1 -0
- package/lib/module/components/executiontasks/scan/utils.js +726 -0
- package/lib/module/components/executiontasks/scan/utils.js.map +1 -0
- package/lib/module/components/executiontasks/validateOTP/ValidateOTPET.js +324 -0
- package/lib/module/components/executiontasks/validateOTP/ValidateOTPET.js.map +1 -0
- package/lib/module/components/executiontasks/validateOTP/ValidateOTPSchema.js +8 -0
- package/lib/module/components/executiontasks/validateOTP/ValidateOTPSchema.js.map +1 -0
- package/lib/module/components/executiontasks/validateOTP/constants.js +25 -0
- package/lib/module/components/executiontasks/validateOTP/constants.js.map +1 -0
- package/lib/module/components/executiontasks/validateOTP/sub-components/OTPInput.js +53 -0
- package/lib/module/components/executiontasks/validateOTP/sub-components/OTPInput.js.map +1 -0
- package/lib/module/components/executiontasks/validateOTP/utils.js +133 -0
- package/lib/module/components/executiontasks/validateOTP/utils.js.map +1 -0
- package/lib/module/components/executiontasks/verifyLocation/GeofenceUtils.js +0 -6
- package/lib/module/components/executiontasks/verifyLocation/GeofenceUtils.js.map +1 -1
- package/lib/module/components/executiontasks/verifyLocation/VerifyLocationET.js +4 -3
- package/lib/module/components/executiontasks/verifyLocation/VerifyLocationET.js.map +1 -1
- package/lib/module/components/executiontasks/verifyOtp/VerifyOtpET.js +5 -9
- package/lib/module/components/executiontasks/verifyOtp/VerifyOtpET.js.map +1 -1
- package/lib/module/components/executiontasks/verifyOtp/VerifyOtpSchema.js.map +1 -1
- package/lib/module/components/utils/index.js +8 -0
- package/lib/module/components/utils/index.js.map +1 -0
- package/lib/module/components/widgets/AlertDisplay.js.map +1 -1
- package/lib/module/components/widgets/CancelOrderDialog.js +0 -2
- package/lib/module/components/widgets/CancelOrderDialog.js.map +1 -1
- package/lib/module/components/widgets/Card.js +80 -0
- package/lib/module/components/widgets/Card.js.map +1 -0
- package/lib/module/components/widgets/GoBackModal.js +40 -0
- package/lib/module/components/widgets/GoBackModal.js.map +1 -0
- package/lib/module/components/widgets/IconButton.js +26 -0
- package/lib/module/components/widgets/IconButton.js.map +1 -0
- package/lib/module/components/widgets/ModalWidget.js +92 -0
- package/lib/module/components/widgets/ModalWidget.js.map +1 -0
- package/lib/module/components/widgets/ProgressDialog.js +0 -2
- package/lib/module/components/widgets/ProgressDialog.js.map +1 -1
- package/lib/module/components/widgets/SearchBar.js +66 -0
- package/lib/module/components/widgets/SearchBar.js.map +1 -0
- package/lib/module/components/widgets/SnackBarCustom.js +46 -20
- package/lib/module/components/widgets/SnackBarCustom.js.map +1 -1
- package/lib/module/components/widgets/SplitTextInput.js +84 -0
- package/lib/module/components/widgets/SplitTextInput.js.map +1 -0
- package/lib/module/components/widgets/TabsComponent.js +55 -0
- package/lib/module/components/widgets/TabsComponent.js.map +1 -0
- package/lib/module/components/widgets/Toaster.js.map +1 -1
- package/lib/module/config/DispatchSDKConfig.js +3 -4
- package/lib/module/config/DispatchSDKConfig.js.map +1 -1
- package/lib/module/constants/apiConstants.js +9 -0
- package/lib/module/constants/apiConstants.js.map +1 -0
- package/lib/module/constants/constants.js +4 -2
- package/lib/module/constants/constants.js.map +1 -1
- package/lib/module/constants/statuscode.js +3 -5
- package/lib/module/constants/statuscode.js.map +1 -1
- package/lib/module/errors/BaseError.js +3 -6
- package/lib/module/errors/BaseError.js.map +1 -1
- package/lib/module/errors/ErrorCodes.js +5 -5
- package/lib/module/errors/ErrorCodes.js.map +1 -1
- package/lib/module/events/EventDispatcher.js +16 -0
- package/lib/module/events/EventDispatcher.js.map +1 -0
- package/lib/module/events/EventListener.js +13 -0
- package/lib/module/events/EventListener.js.map +1 -0
- package/lib/module/events/constants.js +8 -0
- package/lib/module/events/constants.js.map +1 -0
- package/lib/module/events/index.js +3 -0
- package/lib/module/events/index.js.map +1 -0
- package/lib/module/events/interface.js +2 -0
- package/lib/module/events/interface.js.map +1 -0
- package/lib/module/index.js +9 -5
- package/lib/module/index.js.map +1 -1
- package/lib/module/manager/dispatch/DispatchStateContainer.js +334 -247
- package/lib/module/manager/dispatch/DispatchStateContainer.js.map +1 -1
- package/lib/module/manager/dispatchCodes/EventCodeContainer.js +52 -2
- package/lib/module/manager/dispatchCodes/EventCodeContainer.js.map +1 -1
- package/lib/module/manager/dispatchCodes/EventCodeRepo.js +61 -0
- package/lib/module/manager/dispatchCodes/EventCodeRepo.js.map +1 -0
- package/lib/module/manager/dispatchCodes/ReasonCodeContainer.js +3 -16
- package/lib/module/manager/dispatchCodes/ReasonCodeContainer.js.map +1 -1
- package/lib/module/manager/dispatchCodes/ReasonCodeRepo.js +6 -14
- package/lib/module/manager/dispatchCodes/ReasonCodeRepo.js.map +1 -1
- package/lib/module/manager/jobRemoval/JobRemovalManager.js +22 -0
- package/lib/module/manager/jobRemoval/JobRemovalManager.js.map +1 -0
- package/lib/module/manager/location/LocationManager.js +3 -14
- package/lib/module/manager/location/LocationManager.js.map +1 -1
- package/lib/module/manager/sdk/DispatchSDKManager.js +23 -15
- package/lib/module/manager/sdk/DispatchSDKManager.js.map +1 -1
- package/lib/module/manager/sdk/DispatchSdkCache.js +6 -13
- package/lib/module/manager/sdk/DispatchSdkCache.js.map +1 -1
- package/lib/module/manager/sdk/callbacksHandler.js +19 -0
- package/lib/module/manager/sdk/callbacksHandler.js.map +1 -0
- package/lib/module/manager/syncmanager/AppSyncManager.js +26 -26
- package/lib/module/manager/syncmanager/AppSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/DBConfig.js +41 -7
- package/lib/module/manager/syncmanager/DBConfig.js.map +1 -1
- package/lib/module/manager/syncmanager/NativeSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/constants.js +6 -0
- package/lib/module/manager/syncmanager/constants.js.map +1 -0
- package/lib/module/manager/syncmanager/database.js +27 -3
- package/lib/module/manager/syncmanager/database.js.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentHttpClient.js +11 -24
- package/lib/module/manager/syncmanager/document/DocumentHttpClient.js.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentManager.js +8 -20
- package/lib/module/manager/syncmanager/document/DocumentManager.js.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentSyncManager.js +19 -41
- package/lib/module/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/events/ETEventsManager.js +415 -22
- package/lib/module/manager/syncmanager/events/ETEventsManager.js.map +1 -1
- package/lib/module/manager/syncmanager/events/EventsSyncManager.js +209 -82
- package/lib/module/manager/syncmanager/events/EventsSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/events/SyncHttpClient.js +152 -24
- package/lib/module/manager/syncmanager/events/SyncHttpClient.js.map +1 -1
- package/lib/module/models/DispatchModels.js +3 -4
- package/lib/module/models/DispatchModels.js.map +1 -1
- package/lib/module/models/ReasonCodes.js.map +1 -1
- package/lib/module/models/execTasks/ETBaseModels.js +1 -1
- package/lib/module/models/execTasks/ETBaseModels.js.map +1 -1
- package/lib/module/models/execTasks/ETConfig.js +22 -29
- package/lib/module/models/execTasks/ETConfig.js.map +1 -1
- package/lib/module/models/sdk.js +3 -4
- package/lib/module/models/sdk.js.map +1 -1
- package/lib/module/native/signature/SignatureCapture.js +3 -18
- package/lib/module/native/signature/SignatureCapture.js.map +1 -1
- package/lib/module/network/GraphQLClient.js +6 -26
- package/lib/module/network/GraphQLClient.js.map +1 -1
- package/lib/module/network/NetworkClient.js +2 -6
- package/lib/module/network/NetworkClient.js.map +1 -1
- package/lib/module/network/NetworkUtils.js +10 -3
- package/lib/module/network/NetworkUtils.js.map +1 -1
- package/lib/module/network/Queries.js.map +1 -1
- package/lib/module/network/client.js +7 -17
- package/lib/module/network/client.js.map +1 -1
- package/lib/module/res/strings.js.map +1 -1
- package/lib/module/resources/Login.js +4 -13
- package/lib/module/resources/Login.js.map +1 -1
- package/lib/module/resources/network.js +3 -6
- package/lib/module/resources/network.js.map +1 -1
- package/lib/module/styles/SdkColors.js +9 -7
- package/lib/module/styles/SdkColors.js.map +1 -1
- package/lib/module/styles/executionTasks/CommonStyles.js +57 -14
- package/lib/module/styles/executionTasks/CommonStyles.js.map +1 -1
- package/lib/module/ui/screens/CancellationScreen.js +68 -15
- package/lib/module/ui/screens/CancellationScreen.js.map +1 -1
- package/lib/module/ui/screens/CaptureInputScreen.js +17 -6
- package/lib/module/ui/screens/CaptureInputScreen.js.map +1 -1
- package/lib/module/ui/screens/CompleteObjectiveScreen.js +12 -8
- package/lib/module/ui/screens/CompleteObjectiveScreen.js.map +1 -1
- package/lib/module/ui/screens/DeliverScreen.js +32 -7
- package/lib/module/ui/screens/DeliverScreen.js.map +1 -1
- package/lib/module/ui/screens/DisplayScreen.js +16 -6
- package/lib/module/ui/screens/DisplayScreen.js.map +1 -1
- package/lib/module/ui/screens/DoodleScreen.js +19 -9
- package/lib/module/ui/screens/DoodleScreen.js.map +1 -1
- package/lib/module/ui/screens/DropCashScreen.js +45 -19
- package/lib/module/ui/screens/DropCashScreen.js.map +1 -1
- package/lib/module/ui/screens/ETScreensIndex.js +3 -2
- package/lib/module/ui/screens/ETScreensIndex.js.map +1 -1
- package/lib/module/ui/screens/FormsScreen.js +104 -9
- package/lib/module/ui/screens/FormsScreen.js.map +1 -1
- package/lib/module/ui/screens/GeofenceScreen.js +15 -6
- package/lib/module/ui/screens/GeofenceScreen.js.map +1 -1
- package/lib/module/ui/screens/HttpRequestScreen.js +15 -5
- package/lib/module/ui/screens/HttpRequestScreen.js.map +1 -1
- package/lib/module/ui/screens/ImageCaptureScreen.js +37 -9
- package/lib/module/ui/screens/ImageCaptureScreen.js.map +1 -1
- package/lib/module/ui/screens/PaymentScreen.js +30 -17
- package/lib/module/ui/screens/PaymentScreen.js.map +1 -1
- package/lib/module/ui/screens/PickupScreen.js +40 -12
- package/lib/module/ui/screens/PickupScreen.js.map +1 -1
- package/lib/module/ui/screens/ScanScreen.js +111 -0
- package/lib/module/ui/screens/ScanScreen.js.map +1 -0
- package/lib/module/ui/screens/StartWorkFlowScreen.js +64 -16
- package/lib/module/ui/screens/StartWorkFlowScreen.js.map +1 -1
- package/lib/module/ui/screens/ValidateOTPScreen.js +45 -0
- package/lib/module/ui/screens/ValidateOTPScreen.js.map +1 -0
- package/lib/module/ui/screens/WithBaseDispatchScreen.js +0 -3
- package/lib/module/ui/screens/WithBaseDispatchScreen.js.map +1 -1
- package/lib/module/ui/uiConfig/RouteParams.js +23 -1
- package/lib/module/ui/uiConfig/RouteParams.js.map +1 -1
- package/lib/module/utils/ApiUtils.js +116 -0
- package/lib/module/utils/ApiUtils.js.map +1 -0
- package/lib/module/utils/ExecTaskUtils.js +110 -31
- package/lib/module/utils/ExecTaskUtils.js.map +1 -1
- package/lib/module/utils/Logger.js +9 -21
- package/lib/module/utils/Logger.js.map +1 -1
- package/lib/module/utils/NetworkUtil.js +3 -15
- package/lib/module/utils/NetworkUtil.js.map +1 -1
- package/lib/module/utils/SdkUtils.js +2 -15
- package/lib/module/utils/SdkUtils.js.map +1 -1
- package/lib/module/utils/SyncManagerUtils.js +62 -14
- package/lib/module/utils/SyncManagerUtils.js.map +1 -1
- package/lib/module/utils/fcm/FCM.js +63 -3
- package/lib/module/utils/fcm/FCM.js.map +1 -1
- package/lib/module/utils/fcm/FcmUtils.js +86 -7
- package/lib/module/utils/fcm/FcmUtils.js.map +1 -1
- package/lib/module/utils/helper.js +0 -3
- package/lib/module/utils/helper.js.map +1 -1
- package/lib/module/utils/hooks/useModal.js +43 -0
- package/lib/module/utils/hooks/useModal.js.map +1 -0
- package/lib/module/utils/hooks/useTimer.js +37 -0
- package/lib/module/utils/hooks/useTimer.js.map +1 -0
- package/lib/module/utils/loginHelper.js +6 -16
- package/lib/module/utils/loginHelper.js.map +1 -1
- package/lib/module/utils/storage.js +86 -29
- package/lib/module/utils/storage.js.map +1 -1
- package/lib/module/utils/utils.js +8 -6
- package/lib/module/utils/utils.js.map +1 -1
- package/lib/typescript/components/dispatch/DispatchExecNavigator.d.ts +2 -2
- package/lib/typescript/components/executiontasks/CompletedWFSchema.d.ts +2 -2
- package/lib/typescript/components/executiontasks/ExecutionTasksIndex.d.ts +6 -7
- package/lib/typescript/components/executiontasks/cancellation/CancelET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/cancellation/CancellationSchema.d.ts +10 -5
- package/lib/typescript/components/executiontasks/captureInput/CaptureInputSchema.d.ts +7 -7
- package/lib/typescript/components/executiontasks/captureInput/CaptureText.d.ts +2 -2
- package/lib/typescript/components/executiontasks/captureInput/utils.d.ts +1 -0
- package/lib/typescript/components/executiontasks/deliver/DeliverET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/deliver/DeliverETInput.d.ts +8 -7
- package/lib/typescript/components/executiontasks/deliver/SLDeliverET.d.ts +3 -3
- package/lib/typescript/components/executiontasks/display/DisplayModalET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/display/DisplaySchema.d.ts +5 -5
- package/lib/typescript/components/executiontasks/doodle/SignatureET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/doodle/SignatureSchema.d.ts +7 -7
- package/lib/typescript/components/executiontasks/dropCash/DropCashET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/dropCash/DropCashSchema.d.ts +2 -2
- package/lib/typescript/components/executiontasks/dropCash/SLDropCash.d.ts +2 -2
- package/lib/typescript/components/executiontasks/forms/FormGenerator.d.ts +2 -2
- package/lib/typescript/components/executiontasks/forms/FormSchema.d.ts +2 -2
- package/lib/typescript/components/executiontasks/forms/widgets/DateTimeWidget.d.ts +3 -3
- package/lib/typescript/components/executiontasks/forms/widgets/DropdownWidget.d.ts +9 -0
- package/lib/typescript/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.d.ts +2 -2
- package/lib/typescript/components/executiontasks/forms/widgets/TimeRangeSelector.d.ts +2 -2
- package/lib/typescript/components/executiontasks/httpRequest/HttpEtUtils.d.ts +1 -1
- package/lib/typescript/components/executiontasks/httpRequest/HttpRequestET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/httpRequest/HttpRequestETSchema.d.ts +6 -6
- package/lib/typescript/components/executiontasks/imageCapture/CaptureSchema.d.ts +17 -11
- package/lib/typescript/components/executiontasks/imageCapture/ImageCapture.d.ts +2 -2
- package/lib/typescript/components/executiontasks/payments/completePayment/CompletePaymentET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/payments/completePayment/CompletePaymentSchema.d.ts +2 -2
- package/lib/typescript/components/executiontasks/payments/init/InitPaymentET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/payments/init/InitPaymentSchema.d.ts +3 -3
- package/lib/typescript/components/executiontasks/payments/processPayment/ProcessPaymentET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/payments/processPayment/ProcessPaymentSchema.d.ts +2 -2
- package/lib/typescript/components/executiontasks/pickup/PickpSchema.d.ts +3 -3
- package/lib/typescript/components/executiontasks/pickup/PickupET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/pickup/SLPickupET.d.ts +3 -3
- package/lib/typescript/components/executiontasks/scan/ScanET.d.ts +16 -0
- package/lib/typescript/components/executiontasks/scan/ScanSchema.d.ts +86 -0
- package/lib/typescript/components/executiontasks/scan/constants.d.ts +6 -0
- package/lib/typescript/components/executiontasks/scan/interfaces.d.ts +94 -0
- package/lib/typescript/components/executiontasks/scan/modalConstant.d.ts +37 -0
- package/lib/typescript/components/executiontasks/{scanner → scan/sub_components}/CScanner.d.ts +1 -1
- package/lib/typescript/components/executiontasks/scan/sub_components/DropDownUtils.d.ts +7 -0
- package/lib/typescript/components/executiontasks/scan/sub_components/ERDropDown.d.ts +17 -0
- package/lib/typescript/components/executiontasks/scan/sub_components/SummaryPage.d.ts +21 -0
- package/lib/typescript/components/executiontasks/scan/utils.d.ts +37 -0
- package/lib/typescript/components/executiontasks/validateOTP/ValidateOTPET.d.ts +4 -0
- package/lib/typescript/components/executiontasks/validateOTP/ValidateOTPSchema.d.ts +54 -0
- package/lib/typescript/components/executiontasks/validateOTP/constants.d.ts +10 -0
- package/lib/typescript/components/executiontasks/validateOTP/sub-components/OTPInput.d.ts +12 -0
- package/lib/typescript/components/executiontasks/validateOTP/utils.d.ts +7 -0
- package/lib/typescript/components/executiontasks/verifyInput/VerifyInputSchema.d.ts +8 -8
- package/lib/typescript/components/executiontasks/verifyLocation/VerifyLocSchema.d.ts +9 -9
- package/lib/typescript/components/executiontasks/verifyLocation/VerifyLocationET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/verifyOtp/VerifyOtpET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/verifyOtp/VerifyOtpSchema.d.ts +6 -6
- package/lib/typescript/components/utils/index.d.ts +2 -0
- package/lib/typescript/components/widgets/CancelOrderDialog.d.ts +2 -2
- package/lib/typescript/components/widgets/Card.d.ts +17 -0
- package/lib/typescript/components/widgets/GoBackModal.d.ts +9 -0
- package/lib/typescript/components/widgets/IconButton.d.ts +9 -0
- package/lib/typescript/components/widgets/ModalWidget.d.ts +30 -0
- package/lib/typescript/components/widgets/ProgressDialog.d.ts +2 -2
- package/lib/typescript/components/widgets/SearchBar.d.ts +10 -0
- package/lib/typescript/components/widgets/SnackBarCustom.d.ts +10 -5
- package/lib/typescript/components/widgets/SplitTextInput.d.ts +12 -0
- package/lib/typescript/components/widgets/TabsComponent.d.ts +15 -0
- package/lib/typescript/constants/apiConstants.d.ts +7 -0
- package/lib/typescript/constants/constants.d.ts +4 -2
- package/lib/typescript/errors/ErrorCodes.d.ts +3 -1
- package/lib/typescript/events/EventDispatcher.d.ts +3 -0
- package/lib/typescript/events/EventListener.d.ts +5 -0
- package/lib/typescript/events/constants.d.ts +7 -0
- package/lib/typescript/events/index.d.ts +2 -0
- package/lib/typescript/events/interface.d.ts +1 -0
- package/lib/typescript/index.d.ts +12 -9
- package/lib/typescript/manager/dispatch/DispatchStateContainer.d.ts +38 -17
- package/lib/typescript/manager/dispatchCodes/EventCodeContainer.d.ts +12 -1
- package/lib/typescript/manager/dispatchCodes/EventCodeRepo.d.ts +13 -0
- package/lib/typescript/manager/jobRemoval/JobRemovalManager.d.ts +0 -0
- package/lib/typescript/manager/sdk/DispatchSdkCache.d.ts +1 -0
- package/lib/typescript/manager/sdk/callbacksHandler.d.ts +13 -0
- package/lib/typescript/manager/syncmanager/AppSyncManager.d.ts +3 -1
- package/lib/typescript/manager/syncmanager/DBConfig.d.ts +80 -4
- package/lib/typescript/manager/syncmanager/constants.d.ts +5 -0
- package/lib/typescript/manager/syncmanager/database.d.ts +5 -0
- package/lib/typescript/manager/syncmanager/document/DocumentManager.d.ts +1 -1
- package/lib/typescript/manager/syncmanager/document/DocumentSyncManager.d.ts +1 -1
- package/lib/typescript/manager/syncmanager/document/models.d.ts +1 -1
- package/lib/typescript/manager/syncmanager/events/ETEventsManager.d.ts +15 -2
- package/lib/typescript/manager/syncmanager/events/EventsSyncManager.d.ts +4 -2
- package/lib/typescript/manager/syncmanager/events/SyncHttpClient.d.ts +6 -3
- package/lib/typescript/models/DispatchModels.d.ts +59 -5
- package/lib/typescript/models/ReasonCodes.d.ts +5 -0
- package/lib/typescript/models/auth.d.ts +1 -1
- package/lib/typescript/models/execTasks/ETBaseModels.d.ts +44 -20
- package/lib/typescript/models/execTasks/ETConfig.d.ts +8 -4
- package/lib/typescript/models/sdk.d.ts +12 -0
- package/lib/typescript/native/signature/SignatureCapture.d.ts +2 -2
- package/lib/typescript/network/NetworkUtils.d.ts +1 -5
- package/lib/typescript/styles/SdkColors.d.ts +2 -0
- package/lib/typescript/styles/executionTasks/CommonStyles.d.ts +50 -5
- package/lib/typescript/ui/screens/CancellationScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/CaptureInputScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/CompleteObjectiveScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/DeliverScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/DisplayScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/DoodleScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/DropCashScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/ETScreensIndex.d.ts +3 -2
- package/lib/typescript/ui/screens/FormsScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/GeofenceScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/HttpRequestScreen.d.ts +1 -1
- package/lib/typescript/ui/screens/ImageCaptureScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/PaymentScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/PickupScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/ScanScreen.d.ts +3 -0
- package/lib/typescript/ui/screens/StartWorkFlowScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/ValidateOTPScreen.d.ts +3 -0
- package/lib/typescript/ui/screens/WithBaseDispatchScreen.d.ts +2 -2
- package/lib/typescript/ui/uiConfig/RouteParams.d.ts +14 -0
- package/lib/typescript/utils/ApiUtils.d.ts +61 -0
- package/lib/typescript/utils/ExecTaskUtils.d.ts +10 -4
- package/lib/typescript/utils/NetworkUtil.d.ts +1 -1
- package/lib/typescript/utils/SyncManagerUtils.d.ts +4 -3
- package/lib/typescript/utils/hooks/useModal.d.ts +6 -0
- package/lib/typescript/utils/hooks/useTimer.d.ts +5 -0
- package/lib/typescript/utils/storage.d.ts +32 -0
- package/package.json +26 -26
- package/tsconfig.json +9 -9
- package/file_unzip.js +0 -5
- package/lib/commonjs/components/executiontasks/doodle/DoodleUtils.js +0 -28
- package/lib/commonjs/components/executiontasks/doodle/DoodleUtils.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/CScanner.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/ScannerSchema.js +0 -32
- package/lib/commonjs/components/executiontasks/scanner/ScannerSchema.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/ScannerUtils.js +0 -193
- package/lib/commonjs/components/executiontasks/scanner/ScannerUtils.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/DropDownSelector.js +0 -20
- package/lib/commonjs/components/executiontasks/scanner/returns/DropDownSelector.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/DropDownUtils.js +0 -49
- package/lib/commonjs/components/executiontasks/scanner/returns/DropDownUtils.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/RTReasonSelection.js +0 -107
- package/lib/commonjs/components/executiontasks/scanner/returns/RTReasonSelection.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/RTScan.js +0 -317
- package/lib/commonjs/components/executiontasks/scanner/returns/RTScan.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/ReasonDropDown.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/ScanList.js +0 -276
- package/lib/commonjs/components/executiontasks/scanner/returns/ScanList.js.map +0 -1
- package/lib/commonjs/ui/screens/RTScanScreen.js +0 -118
- package/lib/commonjs/ui/screens/RTScanScreen.js.map +0 -1
- package/lib/module/components/executiontasks/doodle/DoodleUtils.js +0 -19
- package/lib/module/components/executiontasks/doodle/DoodleUtils.js.map +0 -1
- package/lib/module/components/executiontasks/scanner/CScanner.js.map +0 -1
- package/lib/module/components/executiontasks/scanner/ScannerSchema.js +0 -24
- package/lib/module/components/executiontasks/scanner/ScannerSchema.js.map +0 -1
- package/lib/module/components/executiontasks/scanner/ScannerUtils.js +0 -158
- package/lib/module/components/executiontasks/scanner/ScannerUtils.js.map +0 -1
- package/lib/module/components/executiontasks/scanner/returns/DropDownSelector.js +0 -9
- package/lib/module/components/executiontasks/scanner/returns/DropDownSelector.js.map +0 -1
- package/lib/module/components/executiontasks/scanner/returns/DropDownUtils.js +0 -38
- package/lib/module/components/executiontasks/scanner/returns/DropDownUtils.js.map +0 -1
- package/lib/module/components/executiontasks/scanner/returns/RTReasonSelection.js +0 -86
- package/lib/module/components/executiontasks/scanner/returns/RTReasonSelection.js.map +0 -1
- package/lib/module/components/executiontasks/scanner/returns/RTScan.js +0 -287
- package/lib/module/components/executiontasks/scanner/returns/RTScan.js.map +0 -1
- package/lib/module/components/executiontasks/scanner/returns/ReasonDropDown.js +0 -80
- package/lib/module/components/executiontasks/scanner/returns/ReasonDropDown.js.map +0 -1
- package/lib/module/components/executiontasks/scanner/returns/ScanList.js +0 -253
- package/lib/module/components/executiontasks/scanner/returns/ScanList.js.map +0 -1
- package/lib/module/ui/screens/RTScanScreen.js +0 -93
- package/lib/module/ui/screens/RTScanScreen.js.map +0 -1
- package/lib/typescript/components/executiontasks/doodle/DoodleUtils.d.ts +0 -3
- package/lib/typescript/components/executiontasks/scanner/ScannerSchema.d.ts +0 -75
- package/lib/typescript/components/executiontasks/scanner/ScannerUtils.d.ts +0 -15
- package/lib/typescript/components/executiontasks/scanner/returns/DropDownSelector.d.ts +0 -3
- package/lib/typescript/components/executiontasks/scanner/returns/DropDownUtils.d.ts +0 -3
- package/lib/typescript/components/executiontasks/scanner/returns/RTReasonSelection.d.ts +0 -7
- package/lib/typescript/components/executiontasks/scanner/returns/RTScan.d.ts +0 -4
- package/lib/typescript/components/executiontasks/scanner/returns/ReasonDropDown.d.ts +0 -14
- package/lib/typescript/components/executiontasks/scanner/returns/ScanList.d.ts +0 -17
- package/lib/typescript/ui/screens/RTScanScreen.d.ts +0 -3
- package/mobile-execution-lib-0.6.4.tgz +0 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _reactNative = require("react-native");
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _SplitTextInput = _interopRequireDefault(require("../../../widgets/SplitTextInput"));
|
|
10
|
+
var _CommonStyles = require("../../../../styles/executionTasks/CommonStyles");
|
|
11
|
+
var _ValidateOTPSchema = require("../ValidateOTPSchema");
|
|
12
|
+
var _constants = require("../constants");
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
15
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
16
|
+
const OTPInput = props => {
|
|
17
|
+
const maximumCodeLength = props.input.length;
|
|
18
|
+
const keyboardType = props.input.inputType === _ValidateOTPSchema.InputType.NUMBER ? 'number-pad' : 'default';
|
|
19
|
+
(0, _react.useEffect)(() => {
|
|
20
|
+
if (props.input.validationRegex && props.otpCode.length === maximumCodeLength) {
|
|
21
|
+
const regex = new RegExp(props.input.validationRegex);
|
|
22
|
+
const hasError = !regex.test(props.otpCode);
|
|
23
|
+
props.setHasError(hasError);
|
|
24
|
+
if (hasError) props.setErrorMessage(_constants.INVALID_REGEX);else props.setErrorMessage('');
|
|
25
|
+
}
|
|
26
|
+
}, [props.otpCode]);
|
|
27
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactNative.Pressable, {
|
|
28
|
+
onPress: _reactNative.Keyboard.dismiss
|
|
29
|
+
}, /*#__PURE__*/_react.default.createElement(_SplitTextInput.default, {
|
|
30
|
+
styles: styles.text,
|
|
31
|
+
value: props.otpCode,
|
|
32
|
+
onChange: text => {
|
|
33
|
+
if (props.input.validationRegex) {}
|
|
34
|
+
if (props.hasError) {
|
|
35
|
+
props.setErrorMessage('');
|
|
36
|
+
props.setHasError(false);
|
|
37
|
+
}
|
|
38
|
+
props.setOTPCode(text);
|
|
39
|
+
},
|
|
40
|
+
maxLength: maximumCodeLength,
|
|
41
|
+
keyboardType: keyboardType,
|
|
42
|
+
hasError: props.hasError
|
|
43
|
+
})));
|
|
44
|
+
};
|
|
45
|
+
var _default = OTPInput;
|
|
46
|
+
exports.default = _default;
|
|
47
|
+
const styles = _reactNative.StyleSheet.create({
|
|
48
|
+
text: {
|
|
49
|
+
fontFamily: _CommonStyles.Fonts.IBMPlexSans_400Regular,
|
|
50
|
+
color: '#3D445C',
|
|
51
|
+
fontSize: 20,
|
|
52
|
+
textAlign: 'center'
|
|
53
|
+
},
|
|
54
|
+
errorMessage: {
|
|
55
|
+
marginTop: 16,
|
|
56
|
+
marginHorizontal: 10,
|
|
57
|
+
color: '#DC2626',
|
|
58
|
+
fontFamily: _CommonStyles.Fonts.IBMPlexSans_400Regular,
|
|
59
|
+
fontSize: 12,
|
|
60
|
+
lineHeight: 16
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
//# sourceMappingURL=OTPInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_react","_interopRequireWildcard","_SplitTextInput","_interopRequireDefault","_CommonStyles","_ValidateOTPSchema","_constants","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","OTPInput","props","maximumCodeLength","input","length","keyboardType","inputType","InputType","NUMBER","useEffect","validationRegex","otpCode","regex","RegExp","hasError","test","setHasError","setErrorMessage","INVALID_REGEX","createElement","Fragment","Pressable","onPress","Keyboard","dismiss","styles","text","value","onChange","setOTPCode","maxLength","_default","exports","StyleSheet","create","fontFamily","Fonts","IBMPlexSans_400Regular","color","fontSize","textAlign","errorMessage","marginTop","marginHorizontal","lineHeight"],"sources":["OTPInput.tsx"],"sourcesContent":["import { StyleSheet, Pressable, Keyboard } from 'react-native';\nimport React, { useEffect } from 'react';\nimport SplitTextInput from '../../../widgets/SplitTextInput';\nimport { Fonts } from '../../../../styles/executionTasks/CommonStyles';\nimport { InputType, CaptureInput } from '../ValidateOTPSchema';\nimport { INVALID_REGEX } from '../constants';\n\nexport interface OTPInputProps {\n input: CaptureInput;\n otpCode: string;\n setOTPCode: (otpCode: string) => void;\n hasError: boolean;\n setHasError: (hasError: boolean) => void;\n setErrorMessage: (errorMessage: string) => void;\n}\n\nconst OTPInput = (props: OTPInputProps) => {\n const maximumCodeLength = props.input.length;\n const keyboardType =\n props.input.inputType === InputType.NUMBER ? 'number-pad' : 'default';\n\n useEffect(() => {\n if (\n props.input.validationRegex &&\n props.otpCode.length === maximumCodeLength\n ) {\n const regex = new RegExp(props.input.validationRegex);\n const hasError = !regex.test(props.otpCode);\n\n props.setHasError(hasError);\n if (hasError) props.setErrorMessage(INVALID_REGEX);\n else props.setErrorMessage('');\n }\n }, [props.otpCode]);\n\n return (\n <>\n <Pressable onPress={Keyboard.dismiss}>\n <SplitTextInput\n styles={styles.text}\n value={props.otpCode}\n onChange={(text) => {\n if (props.input.validationRegex) {\n }\n if (props.hasError) {\n props.setErrorMessage('');\n props.setHasError(false);\n }\n props.setOTPCode(text);\n }}\n maxLength={maximumCodeLength}\n keyboardType={keyboardType}\n hasError={props.hasError}\n />\n </Pressable>\n </>\n );\n};\n\nexport default OTPInput;\n\nconst styles = StyleSheet.create({\n text: {\n fontFamily: Fonts.IBMPlexSans_400Regular,\n color: '#3D445C',\n fontSize: 20,\n textAlign: 'center',\n },\n errorMessage: {\n marginTop: 16,\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;EAAQ,gBACnCrD,MAAA,CAAAS,OAAA,CAAAuC,aAAA,CAAC9C,eAAA,CAAAO,OAAc;IACb6C,MAAM,EAAEA,MAAM,CAACC,IAAK;IACpBC,KAAK,EAAE1B,KAAK,CAACU,OAAQ;IACrBiB,QAAQ,EAAGF,IAAI,IAAK;MAClB,IAAIzB,KAAK,CAACE,KAAK,CAACO,eAAe,EAAE,CACjC;MACA,IAAIT,KAAK,CAACa,QAAQ,EAAE;QAClBb,KAAK,CAACgB,eAAe,CAAC,EAAE,CAAC;QACzBhB,KAAK,CAACe,WAAW,CAAC,KAAK,CAAC;MAC1B;MACAf,KAAK,CAAC4B,UAAU,CAACH,IAAI,CAAC;IACxB,CAAE;IACFI,SAAS,EAAE5B,iBAAkB;IAC7BG,YAAY,EAAEA,YAAa;IAC3BS,QAAQ,EAAEb,KAAK,CAACa;EAAS,CAC1B,CACQ,CACX,CAAC;AAEP,CAAC;AAAC,IAAAiB,QAAA,GAEa/B,QAAQ;AAAAgC,OAAA,CAAApD,OAAA,GAAAmD,QAAA;AAEvB,MAAMN,MAAM,GAAGQ,uBAAU,CAACC,MAAM,CAAC;EAC/BR,IAAI,EAAE;IACJS,UAAU,EAAEC,mBAAK,CAACC,sBAAsB;IACxCC,KAAK,EAAE,SAAS;IAChBC,QAAQ,EAAE,EAAE;IACZC,SAAS,EAAE;EACb,CAAC;EACDC,YAAY,EAAE;IACZC,SAAS,EAAE,EAAE;IACbC,gBAAgB,EAAE,EAAE;IACpBL,KAAK,EAAE,SAAS;IAChBH,UAAU,EAAEC,mBAAK,CAACC,sBAAsB;IACxCE,QAAQ,EAAE,EAAE;IACZK,UAAU,EAAE;EACd;AACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.generateOTP = exports.checkForValidation = void 0;
|
|
7
|
+
exports.parseBody = parseBody;
|
|
8
|
+
exports.parseKeyValue = parseKeyValue;
|
|
9
|
+
exports.parseRetryConfig = void 0;
|
|
10
|
+
var jsonLogic = _interopRequireWildcard(require("json-logic-js"));
|
|
11
|
+
var _jsonpathPlus = require("jsonpath-plus");
|
|
12
|
+
var _Logger = _interopRequireWildcard(require("../../../utils/Logger"));
|
|
13
|
+
var _ApiUtils = require("../../../utils/ApiUtils");
|
|
14
|
+
var _constants = require("./constants");
|
|
15
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
16
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
|
+
const isDyanmicValue = function (input) {
|
|
18
|
+
if (input.charAt(0) === '{' && input.charAt(1) === '{' && input.charAt(input.length - 1) === '}' && input.charAt(input.length - 2) === '}') return true;else return false;
|
|
19
|
+
};
|
|
20
|
+
function parseBody(body, userInput) {
|
|
21
|
+
const requestBody = JSON.parse(JSON.stringify(body));
|
|
22
|
+
for (const key in requestBody) {
|
|
23
|
+
if (Object.prototype.hasOwnProperty.call(requestBody, key)) {
|
|
24
|
+
const value = requestBody[key];
|
|
25
|
+
if (typeof value === 'object') {
|
|
26
|
+
requestBody[key] = parseBody(value, userInput);
|
|
27
|
+
} else if (Array.isArray(value)) {
|
|
28
|
+
value.forEach(val => {
|
|
29
|
+
requestBody[key] = parseBody(val, userInput);
|
|
30
|
+
});
|
|
31
|
+
} else {
|
|
32
|
+
if (typeof value === 'string' && isDyanmicValue(value) && value.includes('userInput')) {
|
|
33
|
+
if (value.includes('captureInput')) requestBody[key] = userInput.captureInput;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return requestBody;
|
|
39
|
+
}
|
|
40
|
+
function parseKeyValue(array, userInput) {
|
|
41
|
+
array.forEach(item => {
|
|
42
|
+
if (isDyanmicValue(item.value) && item.value.includes('userInput')) {
|
|
43
|
+
if (item.value.includes('captureInput')) item.value = userInput.captureInput;
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
return array;
|
|
47
|
+
}
|
|
48
|
+
const generateOTP = async api => {
|
|
49
|
+
// TESTING
|
|
50
|
+
try {
|
|
51
|
+
const apiData = {
|
|
52
|
+
errorJsonPath: '',
|
|
53
|
+
responseJsonPath: '',
|
|
54
|
+
uri: api.uri,
|
|
55
|
+
httpMethod: api.httpMethod,
|
|
56
|
+
timeout: api.timeout,
|
|
57
|
+
headers: api.headers
|
|
58
|
+
};
|
|
59
|
+
if (api.requestBody) {
|
|
60
|
+
apiData.requestBody = api.requestBody;
|
|
61
|
+
}
|
|
62
|
+
if (api.pathParams) {
|
|
63
|
+
apiData.pathParams = api.pathParams;
|
|
64
|
+
}
|
|
65
|
+
if (api.queryParams) {
|
|
66
|
+
apiData.queryParams = api.queryParams;
|
|
67
|
+
}
|
|
68
|
+
const apiResponse = await (0, _ApiUtils.getApiResponse)(apiData);
|
|
69
|
+
return jsonLogic.apply(api.responseJsonLogic, apiResponse.data);
|
|
70
|
+
} catch (error) {
|
|
71
|
+
_Logger.default.getInstance().logEvent('~ generateOTP', error.message, _Logger.LOG_TYPE.SDK_ERROR);
|
|
72
|
+
return false;
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
exports.generateOTP = generateOTP;
|
|
76
|
+
const checkForValidation = async (otp, validation, userInput) => {
|
|
77
|
+
// API
|
|
78
|
+
if (validation.selectedIndex === 0) {
|
|
79
|
+
const otpValue = (0, _jsonpathPlus.JSONPath)({
|
|
80
|
+
path: '$.userInput.captureInput',
|
|
81
|
+
json: userInput
|
|
82
|
+
})[0];
|
|
83
|
+
try {
|
|
84
|
+
//@ts-ignore
|
|
85
|
+
const api = validation.logic.api;
|
|
86
|
+
const apiData = {
|
|
87
|
+
errorJsonPath: '',
|
|
88
|
+
responseJsonPath: '',
|
|
89
|
+
uri: api.uri,
|
|
90
|
+
httpMethod: api.httpMethod,
|
|
91
|
+
timeout: api.timeout,
|
|
92
|
+
headers: api.headers
|
|
93
|
+
};
|
|
94
|
+
if (api.requestBody) {
|
|
95
|
+
const parsedRequestBody = parseBody(api.requestBody, {
|
|
96
|
+
captureInput: otpValue
|
|
97
|
+
});
|
|
98
|
+
apiData.requestBody = parsedRequestBody;
|
|
99
|
+
}
|
|
100
|
+
if (api.pathParams) {
|
|
101
|
+
parseKeyValue(api.pathParams, {
|
|
102
|
+
captureInput: otpValue
|
|
103
|
+
});
|
|
104
|
+
apiData.pathParams = api.pathParams;
|
|
105
|
+
}
|
|
106
|
+
if (api.queryParams) {
|
|
107
|
+
parseKeyValue(api.queryParams, {
|
|
108
|
+
captureInput: otpValue
|
|
109
|
+
});
|
|
110
|
+
apiData.queryParams = api.queryParams;
|
|
111
|
+
}
|
|
112
|
+
const apiResponse = await (0, _ApiUtils.getApiResponse)(apiData);
|
|
113
|
+
return jsonLogic.apply(api.responseJsonLogic, apiResponse.data);
|
|
114
|
+
} catch (error) {
|
|
115
|
+
_Logger.default.getInstance().logEvent('~ checkForValidation', error.message, _Logger.LOG_TYPE.SDK_ERROR);
|
|
116
|
+
return false;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
// Exact Value
|
|
120
|
+
else if (validation.selectedIndex === 1) {
|
|
121
|
+
// @ts-ignore
|
|
122
|
+
const value = validation.logic.value;
|
|
123
|
+
return value == otp;
|
|
124
|
+
}
|
|
125
|
+
// Invalid input received
|
|
126
|
+
else {
|
|
127
|
+
return false;
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
exports.checkForValidation = checkForValidation;
|
|
131
|
+
const parseRetryConfig = inputRetryConfig => {
|
|
132
|
+
const retryConfig = _constants.DEFAULT_RETRY_CONFIG;
|
|
133
|
+
if (inputRetryConfig) {
|
|
134
|
+
if (inputRetryConfig.buttonTitle) {
|
|
135
|
+
retryConfig.buttonTitle = inputRetryConfig.buttonTitle;
|
|
136
|
+
}
|
|
137
|
+
if (inputRetryConfig.delay) {
|
|
138
|
+
retryConfig.delay = inputRetryConfig.delay;
|
|
139
|
+
}
|
|
140
|
+
if (inputRetryConfig.maxAttempt) {
|
|
141
|
+
retryConfig.maxAttempt = inputRetryConfig.maxAttempt;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
return retryConfig;
|
|
145
|
+
};
|
|
146
|
+
exports.parseRetryConfig = parseRetryConfig;
|
|
147
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["jsonLogic","_interopRequireWildcard","require","_jsonpathPlus","_Logger","_ApiUtils","_constants","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","isDyanmicValue","input","charAt","length","parseBody","body","userInput","requestBody","JSON","parse","stringify","value","Array","isArray","forEach","val","includes","captureInput","parseKeyValue","array","item","generateOTP","api","apiData","errorJsonPath","responseJsonPath","uri","httpMethod","timeout","headers","pathParams","queryParams","apiResponse","getApiResponse","apply","responseJsonLogic","data","error","Logger","getInstance","logEvent","message","LOG_TYPE","SDK_ERROR","exports","checkForValidation","otp","validation","selectedIndex","otpValue","JSONPath","path","json","logic","parsedRequestBody","parseRetryConfig","inputRetryConfig","retryConfig","DEFAULT_RETRY_CONFIG","buttonTitle","delay","maxAttempt"],"sources":["utils.ts"],"sourcesContent":["import * as jsonLogic from 'json-logic-js';\nimport { JSONPath } from 'jsonpath-plus';\nimport Logger, { LOG_TYPE } from '../../../utils/Logger';\nimport {\n APIData,\n getApiResponse,\n KeyValueArray,\n} from '../../../utils/ApiUtils';\nimport { DEFAULT_RETRY_CONFIG } from './constants';\nimport type {\n API,\n InputType,\n Validation,\n RetryConfig,\n} from './ValidateOTPSchema';\n\nconst isDyanmicValue = function (input: string) {\n if (\n input.charAt(0) === '{' &&\n input.charAt(1) === '{' &&\n input.charAt(input.length - 1) === '}' &&\n input.charAt(input.length - 2) === '}'\n )\n return true;\n else return false;\n};\n\nexport function parseBody(body: any, userInput: any) {\n const requestBody = JSON.parse(JSON.stringify(body));\n for (const key in requestBody) {\n if (Object.prototype.hasOwnProperty.call(requestBody, key)) {\n const value = requestBody[key];\n if (typeof value === 'object') {\n requestBody[key] = parseBody(value, userInput);\n } else if (Array.isArray(value)) {\n value.forEach((val) => {\n requestBody[key] = parseBody(val, userInput);\n });\n } else {\n if (\n typeof value === 'string' &&\n isDyanmicValue(value) &&\n value.includes('userInput')\n ) {\n if (value.includes('captureInput'))\n requestBody[key] = userInput.captureInput;\n }\n }\n }\n }\n return requestBody;\n}\n\nexport function parseKeyValue(array: KeyValueArray[], userInput: any) {\n array.forEach((item) => {\n if (isDyanmicValue(item.value) && item.value.includes('userInput')) {\n if (item.value.includes('captureInput'))\n item.value = userInput.captureInput;\n }\n });\n return array;\n}\n\nexport const generateOTP = async (api: API) => {\n // TESTING\n try {\n const apiData: APIData = {\n errorJsonPath: '',\n responseJsonPath: '',\n uri: api.uri,\n httpMethod: api.httpMethod,\n timeout: api.timeout,\n headers: api.headers,\n };\n if (api.requestBody) {\n apiData.requestBody = api.requestBody;\n }\n if (api.pathParams) {\n apiData.pathParams = api.pathParams;\n }\n if (api.queryParams) {\n apiData.queryParams = api.queryParams;\n }\n\n const apiResponse = await getApiResponse(apiData);\n\n return jsonLogic.apply(\n <jsonLogic.RulesLogic>api.responseJsonLogic,\n apiResponse.data\n );\n } catch (error: any) {\n Logger.getInstance().logEvent(\n '~ generateOTP',\n error.message,\n LOG_TYPE.SDK_ERROR\n );\n return false;\n }\n};\n\nexport const checkForValidation = async (\n otp: string,\n validation: Validation,\n userInput: any\n): Promise<boolean> => {\n // API\n if (validation.selectedIndex === 0) {\n const otpValue = JSONPath({\n path: '$.userInput.captureInput',\n json: userInput,\n })[0];\n\n try {\n //@ts-ignore\n const api: API = validation.logic.api;\n const apiData: APIData = {\n errorJsonPath: '',\n responseJsonPath: '',\n uri: api.uri,\n httpMethod: api.httpMethod,\n timeout: api.timeout,\n headers: api.headers,\n };\n if (api.requestBody) {\n const parsedRequestBody = parseBody(api.requestBody, {\n captureInput: otpValue,\n });\n apiData.requestBody = parsedRequestBody;\n }\n if (api.pathParams) {\n parseKeyValue(api.pathParams, { captureInput: otpValue });\n apiData.pathParams = api.pathParams;\n }\n if (api.queryParams) {\n parseKeyValue(api.queryParams, { captureInput: otpValue });\n apiData.queryParams = api.queryParams;\n }\n const apiResponse = await getApiResponse(apiData);\n return jsonLogic.apply(\n <jsonLogic.RulesLogic>api.responseJsonLogic,\n apiResponse.data\n );\n } catch (error: any) {\n Logger.getInstance().logEvent(\n '~ checkForValidation',\n error.message,\n LOG_TYPE.SDK_ERROR\n );\n return false;\n }\n }\n // Exact Value\n else if (validation.selectedIndex === 1) {\n // @ts-ignore\n const value: InputType = validation.logic.value;\n return value == otp;\n }\n // Invalid input received\n else {\n return false;\n }\n};\n\nexport const parseRetryConfig = (\n inputRetryConfig: RetryConfig | undefined\n): RetryConfig => {\n const retryConfig: RetryConfig = DEFAULT_RETRY_CONFIG;\n if (inputRetryConfig) {\n if (inputRetryConfig.buttonTitle) {\n retryConfig.buttonTitle = inputRetryConfig.buttonTitle;\n }\n if (inputRetryConfig.delay) {\n retryConfig.delay = inputRetryConfig.delay;\n }\n if (inputRetryConfig.maxAttempt) {\n retryConfig.maxAttempt = inputRetryConfig.maxAttempt;\n }\n }\n return retryConfig;\n};\n"],"mappings":";;;;;;;;;AAAA,IAAAA,SAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAH,uBAAA,CAAAC,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AAKA,IAAAI,UAAA,GAAAJ,OAAA;AAAmD,SAAAK,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAP,wBAAAW,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAd,GAAA,EAAAW,GAAA,SAAAI,IAAA,GAAAR,qBAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAV,GAAA,EAAAW,GAAA,cAAAI,IAAA,KAAAA,IAAA,CAAAV,GAAA,IAAAU,IAAA,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W,CAACG,KAAK,GAAGJ,gBAAgB,CAACI,KAAK;IAC5C;IACA,IAAIJ,gBAAgB,CAACK,UAAU,EAAE;MAC/BJ,WAAW,CAACI,UAAU,GAAGL,gBAAgB,CAACK,UAAU;IACtD;EACF;EACA,OAAOJ,WAAW;AACpB,CAAC;AAACb,OAAA,CAAAW,gBAAA,GAAAA,gBAAA"}
|
|
@@ -4,42 +4,31 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.verifyLocation = verifyLocation;
|
|
7
|
-
|
|
8
7
|
var Location = _interopRequireWildcard(require("expo-location"));
|
|
9
|
-
|
|
10
8
|
var _BaseError = require("../../../errors/BaseError");
|
|
11
|
-
|
|
12
9
|
var _ErrorCodes = _interopRequireDefault(require("../../../errors/ErrorCodes"));
|
|
13
|
-
|
|
14
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
16
11
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
17
|
-
|
|
18
12
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
19
|
-
|
|
20
13
|
async function verifyLocation(params) {
|
|
21
14
|
const {
|
|
22
15
|
status
|
|
23
16
|
} = await Location.getForegroundPermissionsAsync();
|
|
24
17
|
let response;
|
|
25
|
-
|
|
26
18
|
if (status === 'granted') {
|
|
27
19
|
response = await geofenceLogic(params);
|
|
28
20
|
} else {
|
|
29
21
|
const {
|
|
30
22
|
status
|
|
31
23
|
} = await Location.requestForegroundPermissionsAsync();
|
|
32
|
-
|
|
33
24
|
if (status === 'granted') {
|
|
34
25
|
response = await geofenceLogic(params);
|
|
35
26
|
} else {
|
|
36
27
|
throw new _BaseError.BaseError(_ErrorCodes.default.LOCATION_PERMISSION_DENIED, 'Location Permission denied');
|
|
37
28
|
}
|
|
38
29
|
}
|
|
39
|
-
|
|
40
30
|
return response;
|
|
41
31
|
}
|
|
42
|
-
|
|
43
32
|
async function geofenceLogic(params) {
|
|
44
33
|
const options = {
|
|
45
34
|
accuracy: Location.Accuracy.Highest
|
|
@@ -53,11 +42,9 @@ async function geofenceLogic(params) {
|
|
|
53
42
|
const theta = longitude - location.coords.longitude;
|
|
54
43
|
const radtheta = Math.PI * theta / 180;
|
|
55
44
|
let dist = Math.sin(radlat1) * Math.sin(radlat2) + Math.cos(radlat1) * Math.cos(radlat2) * Math.cos(radtheta);
|
|
56
|
-
|
|
57
45
|
if (dist > 1) {
|
|
58
46
|
dist = 1;
|
|
59
47
|
}
|
|
60
|
-
|
|
61
48
|
const multiplier = 180 * 60 * 1.1515 * 1.609344 * 1000 / Math.PI;
|
|
62
49
|
dist = Math.acos(dist) * multiplier;
|
|
63
50
|
return params.geolocation.geofencing.radius >= dist;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["verifyLocation","params","status","
|
|
1
|
+
{"version":3,"names":["Location","_interopRequireWildcard","require","_BaseError","_ErrorCodes","_interopRequireDefault","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","verifyLocation","params","status","getForegroundPermissionsAsync","response","geofenceLogic","requestForegroundPermissionsAsync","BaseError","ErrorCodes","LOCATION_PERMISSION_DENIED","options","accuracy","Accuracy","Highest","location","getCurrentPositionAsync","geolocation","coords","latitude","longitude","radlat1","Math","PI","radlat2","theta","radtheta","dist","sin","cos","multiplier","acos","geofencing","radius"],"sources":["GeofenceUtils.ts"],"sourcesContent":["import type { VerifyLocationInput } from './VerifyLocSchema';\nimport * as Location from 'expo-location';\nimport { BaseError } from '../../../errors/BaseError';\nimport ErrorCodes from '../../../errors/ErrorCodes';\n\nexport async function verifyLocation(\n params: VerifyLocationInput\n): Promise<boolean> {\n const { status } = await Location.getForegroundPermissionsAsync();\n let response: boolean;\n if (status === 'granted') {\n response = await geofenceLogic(params);\n } else {\n const { status } = await Location.requestForegroundPermissionsAsync();\n if (status === 'granted') {\n response = await geofenceLogic(params);\n } else {\n throw new BaseError(\n ErrorCodes.LOCATION_PERMISSION_DENIED,\n 'Location Permission denied'\n );\n }\n }\n return response;\n}\n\nasync function geofenceLogic(params: VerifyLocationInput): Promise<boolean> {\n const options = {\n accuracy: Location.Accuracy.Highest,\n };\n const location = await Location.getCurrentPositionAsync(options);\n if (\n params.geolocation.accuracy &&\n location.coords.accuracy &&\n params.geolocation.accuracy < location.coords.accuracy\n )\n return false;\n else {\n const latitude: number = +params.geolocation.latitude;\n const longitude: number = +params.geolocation.longitude;\n const radlat1 = (Math.PI * latitude) / 180;\n const radlat2 = (Math.PI * location.coords.latitude) / 180;\n const theta = longitude - location.coords.longitude;\n const radtheta = (Math.PI * theta) / 180;\n let dist =\n Math.sin(radlat1) * Math.sin(radlat2) +\n Math.cos(radlat1) * Math.cos(radlat2) * Math.cos(radtheta);\n if (dist > 1) {\n dist = 1;\n }\n const multiplier = (180 * 60 * 1.1515 * 1.609344 * 1000) / Math.PI;\n dist = Math.acos(dist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IACvD,MAAMC,OAAO,GAAIC,IAAI,CAACC,EAAE,GAAGJ,QAAQ,GAAI,GAAG;IAC1C,MAAMK,OAAO,GAAIF,IAAI,CAACC,EAAE,GAAGR,QAAQ,CAACG,MAAM,CAACC,QAAQ,GAAI,GAAG;IAC1D,MAAMM,KAAK,GAAGL,SAAS,GAAGL,QAAQ,CAACG,MAAM,CAACE,SAAS;IACnD,MAAMM,QAAQ,GAAIJ,IAAI,CAACC,EAAE,GAAGE,KAAK,GAAI,GAAG;IACxC,IAAIE,IAAI,GACNL,IAAI,CAACM,GAAG,CAACP,OAAO,CAAC,GAAGC,IAAI,CAACM,GAAG,CAACJ,OAAO,CAAC,GACrCF,IAAI,CAACO,GAAG,CAACR,OAAO,CAAC,GAAGC,IAAI,CAACO,GAAG,CAACL,OAAO,CAAC,GAAGF,IAAI,CAACO,GAAG,CAACH,QAAQ,CAAC;IAC5D,IAAIC,IAAI,GAAG,CAAC,EAAE;MACZA,IAAI,GAAG,CAAC;IACV;IACA,MAAMG,UAAU,GAAI,GAAG,GAAG,EAAE,GAAG,MAAM,GAAG,QAAQ,GAAG,IAAI,GAAIR,IAAI,CAACC,EAAE;IAClEI,IAAI,GAAGL,IAAI,CAACS,IAAI,CAACJ,IAAI,CAAC,GAAGG,UAAU;IACnC,OAAO5B,MAAM,CAACe,WAAW,CAACe,UAAU,CAACC,MAAM,IAAIN,IAAI;EACrD;AACF"}
|
|
@@ -4,39 +4,27 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _reactNative = require("react-native");
|
|
9
|
-
|
|
10
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
|
|
12
9
|
var _GeofenceUtils = require("./GeofenceUtils");
|
|
13
|
-
|
|
14
10
|
var _ExecTaskUtils = require("../../../utils/ExecTaskUtils");
|
|
15
|
-
|
|
16
11
|
var _EventCodeContainer = require("../../../manager/dispatchCodes/EventCodeContainer");
|
|
17
|
-
|
|
18
12
|
var _ETConfig = require("../../../models/execTasks/ETConfig");
|
|
19
|
-
|
|
20
13
|
var _CommonStyles = require("../../../styles/executionTasks/CommonStyles");
|
|
21
|
-
|
|
22
14
|
var _ProgressDialog = _interopRequireDefault(require("../../widgets/ProgressDialog"));
|
|
23
|
-
|
|
24
15
|
var _BaseError = require("../../../errors/BaseError");
|
|
25
|
-
|
|
26
16
|
var _AlertDisplay = require("../../widgets/AlertDisplay");
|
|
27
|
-
|
|
28
17
|
var _SdkUtils = _interopRequireDefault(require("../../../utils/SdkUtils"));
|
|
29
|
-
|
|
30
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
31
|
-
|
|
32
19
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
33
|
-
|
|
34
20
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
35
|
-
|
|
36
21
|
const VerifyLocationET = props => {
|
|
37
22
|
const [geofencing, setGeofencing] = (0, _react.useState)(true);
|
|
38
23
|
const submitLocationResponse = (0, _react.useCallback)(async response => {
|
|
39
|
-
|
|
24
|
+
var _props$applicableReas, _props$applicableReas2;
|
|
25
|
+
const _appRC = response ? (_props$applicableReas = props.applicableReasons) === null || _props$applicableReas === void 0 ? void 0 : _props$applicableReas.success : (_props$applicableReas2 = props.applicableReasons) === null || _props$applicableReas2 === void 0 ? void 0 : _props$applicableReas2.failure;
|
|
26
|
+
props.onSubmitET({
|
|
27
|
+
...(await (0, _ExecTaskUtils.getBaseETResponse)(_ETConfig.EntityCode.VERIFY_LOCATION, response, (0, _EventCodeContainer.getEventCodeByET)(_ETConfig.ExecutionTaskID.VERIFY_LOCATION, response, _appRC), '', props.mergedObjectiveId, _ETConfig.ExecutionTaskID.VERIFY_LOCATION))
|
|
40
28
|
});
|
|
41
29
|
}, [props]);
|
|
42
30
|
(0, _react.useEffect)(() => {
|
|
@@ -63,7 +51,6 @@ const VerifyLocationET = props => {
|
|
|
63
51
|
label: props.message ?? 'Verifying Location...'
|
|
64
52
|
}));
|
|
65
53
|
};
|
|
66
|
-
|
|
67
54
|
var _default = VerifyLocationET;
|
|
68
55
|
exports.default = _default;
|
|
69
56
|
//# sourceMappingURL=VerifyLocationET.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["VerifyLocationET","props","geofencing","setGeofencing","useState","submitLocationResponse","useCallback","response","onSubmitET","getBaseETResponse","EntityCode","VERIFY_LOCATION","getEventCodeByET","ExecutionTaskID","useEffect","verifyLocation","error","BaseError","showAlert","SdkUtils","openAppSettings","CommonStyles","mainContainer","message"],"sources":["VerifyLocationET.tsx"],"sourcesContent":["import { View } from 'react-native';\nimport React, { useCallback, useEffect, useState } from 'react';\nimport type { VerifyLocationInput } from './VerifyLocSchema';\nimport { verifyLocation } from './GeofenceUtils';\nimport { getBaseETResponse } from '../../../utils/ExecTaskUtils';\nimport { getEventCodeByET } from '../../../manager/dispatchCodes/EventCodeContainer';\nimport {\n EntityCode,\n ExecutionTaskID,\n} from '../../../models/execTasks/ETConfig';\nimport { CommonStyles } from '../../../styles/executionTasks/CommonStyles';\nimport ProgressDialog from '../../widgets/ProgressDialog';\nimport { BaseError } from '../../../errors/BaseError';\nimport { showAlert } from '../../widgets/AlertDisplay';\nimport SdkUtils from '../../../utils/SdkUtils';\n\nconst VerifyLocationET = (props: VerifyLocationInput) => {\n const [geofencing, setGeofencing] = useState(true);\n const submitLocationResponse = useCallback(\n async (response: boolean) => {\n props.onSubmitET({\n ...(await getBaseETResponse(\n EntityCode.VERIFY_LOCATION,\n response,\n getEventCodeByET(ExecutionTaskID.VERIFY_LOCATION, response),\n ''\n )),\n });\n },\n [props]\n );\n useEffect(() => {\n (async () => {\n try {\n let response = await verifyLocation(props);\n await submitLocationResponse(response);\n setGeofencing(false);\n } catch (error: any) {\n if (error instanceof BaseError) {\n showAlert(\n 'Permission Denied',\n 'Please enable Location permissions from settings and Try again',\n false,\n 'Open Settings',\n () => {\n SdkUtils.openAppSettings();\n }\n );\n } else {\n await submitLocationResponse(false);\n }\n }\n })();\n }, []);\n return (\n <View style={CommonStyles.mainContainer}>\n <ProgressDialog\n visible={geofencing}\n label={props.message ?? 'Verifying Location...'}\n />\n </View>\n );\n};\nexport default VerifyLocationET;\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_react","_interopRequireWildcard","_GeofenceUtils","_ExecTaskUtils","_EventCodeContainer","_ETConfig","_CommonStyles","_ProgressDialog","_interopRequireDefault","_BaseError","_AlertDisplay","_SdkUtils","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","VerifyLocationET","props","geofencing","setGeofencing","useState","submitLocationResponse","useCallback","response","_props$applicableReas","_props$applicableReas2","_appRC","applicableReasons","success","failure","onSubmitET","getBaseETResponse","EntityCode","VERIFY_LOCATION","getEventCodeByET","ExecutionTaskID","mergedObjectiveId","useEffect","verifyLocation","error","BaseError","showAlert","SdkUtils","openAppSettings","createElement","View","style","CommonStyles","mainContainer","visible","label","message","_default","exports"],"sources":["VerifyLocationET.tsx"],"sourcesContent":["import { View } from 'react-native';\nimport React, { useCallback, useEffect, useState } from 'react';\nimport type { VerifyLocationInput } from './VerifyLocSchema';\nimport { verifyLocation } from './GeofenceUtils';\nimport { getBaseETResponse } from '../../../utils/ExecTaskUtils';\nimport { getEventCodeByET } from '../../../manager/dispatchCodes/EventCodeContainer';\nimport {\n EntityCode,\n ExecutionTaskID,\n} from '../../../models/execTasks/ETConfig';\nimport { CommonStyles } from '../../../styles/executionTasks/CommonStyles';\nimport ProgressDialog from '../../widgets/ProgressDialog';\nimport { BaseError } from '../../../errors/BaseError';\nimport { showAlert } from '../../widgets/AlertDisplay';\nimport SdkUtils from '../../../utils/SdkUtils';\n\nconst VerifyLocationET = (props: VerifyLocationInput) => {\n const [geofencing, setGeofencing] = useState(true);\n const submitLocationResponse = useCallback(\n async (response: boolean) => {\n const _appRC = response\n ? props.applicableReasons?.success\n : props.applicableReasons?.failure;\n props.onSubmitET({\n ...(await getBaseETResponse(\n EntityCode.VERIFY_LOCATION,\n response,\n getEventCodeByET(ExecutionTaskID.VERIFY_LOCATION, response, _appRC),\n '',\n props.mergedObjectiveId,\n ExecutionTaskID.VERIFY_LOCATION\n )),\n });\n },\n [props]\n );\n useEffect(() => {\n (async () => {\n try {\n let response = await verifyLocation(props);\n await submitLocationResponse(response);\n setGeofencing(false);\n } catch (error: any) {\n if (error instanceof BaseError) {\n showAlert(\n 'Permission Denied',\n 'Please enable Location permissions from settings and Try again',\n false,\n 'Open Settings',\n () => {\n SdkUtils.openAppSettings();\n }\n );\n } else {\n await submitLocationResponse(false);\n }\n }\n })();\n }, []);\n return (\n <View style={CommonStyles.mainContainer}>\n <ProgressDialog\n visible={geofencing}\n label={props.message ?? 'Verifying Location...'}\n />\n </View>\n );\n};\nexport default VerifyLocationET;\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,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AC1C,MAAMI,sBAAsB,CAACE,QAAQ,CAAC;QACtCJ,aAAa,CAAC,KAAK,CAAC;MACtB,CAAC,CAAC,OAAOoB,KAAU,EAAE;QACnB,IAAIA,KAAK,YAAYC,oBAAS,EAAE;UAC9B,IAAAC,uBAAS,EACP,mBAAmB,EACnB,gEAAgE,EAChE,KAAK,EACL,eAAe,EACf,MAAM;YACJC,iBAAQ,CAACC,eAAe,CAAC,CAAC;UAC5B,CACF,CAAC;QACH,CAAC,MAAM;UACL,MAAMtB,sBAAsB,CAAC,KAAK,CAAC;QACrC;MACF;IACF,CAAC,EAAE,CAAC;EACN,CAAC,EAAE,EAAE,CAAC;EACN,oBACEvC,MAAA,CAAAc,OAAA,CAAAgD,aAAA,CAAChE,YAAA,CAAAiE,IAAI;IAACC,KAAK,EAAEC,0BAAY,CAACC;EAAc,gBACtClE,MAAA,CAAAc,OAAA,CAAAgD,aAAA,CAACvD,eAAA,CAAAO,OAAc;IACbqD,OAAO,EAAE/B,UAAW;IACpBgC,KAAK,EAAEjC,KAAK,CAACkC,OAAO,IAAI;EAAwB,CACjD,CACG,CAAC;AAEX,CAAC;AAAC,IAAAC,QAAA,GACapC,gBAAgB;AAAAqC,OAAA,CAAAzD,OAAA,GAAAwD,QAAA"}
|
|
@@ -4,38 +4,25 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _reactNative = require("react-native");
|
|
9
|
-
|
|
10
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
|
|
12
9
|
var _reactNativeOtpTextinput = _interopRequireDefault(require("react-native-otp-textinput"));
|
|
13
|
-
|
|
14
10
|
var _reactNativePaper = require("react-native-paper");
|
|
15
|
-
|
|
16
11
|
var _Toaster = require("../../widgets/Toaster");
|
|
17
|
-
|
|
18
12
|
var _ExecTaskUtils = require("../../../utils/ExecTaskUtils");
|
|
19
|
-
|
|
20
13
|
var _ETConfig = require("../../../models/execTasks/ETConfig");
|
|
21
|
-
|
|
22
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
|
-
|
|
24
15
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
25
|
-
|
|
26
16
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
|
-
|
|
28
17
|
// @ts-ignore
|
|
18
|
+
|
|
29
19
|
const VerifyOtpET = props => {
|
|
30
20
|
const otpInput = (0, _react.useRef)();
|
|
31
|
-
|
|
32
21
|
function backButtonHandler() {
|
|
33
22
|
return true;
|
|
34
23
|
}
|
|
35
|
-
|
|
36
24
|
(0, _react.useEffect)(() => {
|
|
37
25
|
_reactNative.BackHandler.addEventListener('hardwareBackPress', backButtonHandler);
|
|
38
|
-
|
|
39
26
|
return () => {
|
|
40
27
|
_reactNative.BackHandler.removeEventListener('hardwareBackPress', backButtonHandler);
|
|
41
28
|
};
|
|
@@ -51,8 +38,8 @@ const VerifyOtpET = props => {
|
|
|
51
38
|
tintColor: _reactNativePaper.Colors.blue300,
|
|
52
39
|
handleTextChange: async value => {
|
|
53
40
|
if (value.length === props.inputCount) {
|
|
54
|
-
|
|
55
|
-
|
|
41
|
+
props.onSubmit({
|
|
42
|
+
...(await (0, _ExecTaskUtils.getBaseETResponse)(_ETConfig.EntityCode.VERIFY_INPUT, true, '', '', props.mergedObjectiveId, _ETConfig.ExecutionTaskID.VERIFY_INPUT))
|
|
56
43
|
});
|
|
57
44
|
}
|
|
58
45
|
}
|
|
@@ -65,10 +52,8 @@ const VerifyOtpET = props => {
|
|
|
65
52
|
style: styles.sendAgainText
|
|
66
53
|
}, /*#__PURE__*/_react.default.createElement(_reactNative.Text, null, "Send again")))));
|
|
67
54
|
};
|
|
68
|
-
|
|
69
55
|
var _default = VerifyOtpET;
|
|
70
56
|
exports.default = _default;
|
|
71
|
-
|
|
72
57
|
const styles = _reactNative.StyleSheet.create({
|
|
73
58
|
backIconView: {
|
|
74
59
|
marginTop: 22,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["VerifyOtpET","props","otpInput","useRef","backButtonHandler","useEffect","BackHandler","addEventListener","removeEventListener","styles","otpInputTextView","veriOtpText","otpInputStyle","inputCount","
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_react","_interopRequireWildcard","_reactNativeOtpTextinput","_interopRequireDefault","_reactNativePaper","_Toaster","_ExecTaskUtils","_ETConfig","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","VerifyOtpET","props","otpInput","useRef","backButtonHandler","useEffect","BackHandler","addEventListener","removeEventListener","createElement","View","style","styles","otpInputTextView","Text","veriOtpText","textInputStyle","otpInputStyle","ref","inputCount","tintColor","Colors","blue300","handleTextChange","value","length","onSubmit","getBaseETResponse","EntityCode","VERIFY_INPUT","mergedObjectiveId","ExecutionTaskID","otpNotReceivedView","Pressable","onPress","showToast","sendAgainText","_default","exports","StyleSheet","create","backIconView","marginTop","marginStart","fontSize","color","black","borderRadius","borderWidth","paddingHorizontal","paddingVertical","marginHorizontal","flexDirection"],"sources":["VerifyOtpET.tsx"],"sourcesContent":["import { BackHandler, Pressable, StyleSheet, Text, View } from 'react-native';\nimport React, { useEffect, useRef } from 'react';\n// @ts-ignore\nimport OTPTextView from 'react-native-otp-textinput';\nimport { Colors } from 'react-native-paper';\nimport { showToast } from '../../widgets/Toaster';\nimport type { OtpInputSchema } from './VerifyOtpSchema';\nimport { getBaseETResponse } from '../../../utils/ExecTaskUtils';\nimport {\n EntityCode,\n ExecutionTaskID,\n} from '../../../models/execTasks/ETConfig';\n\nconst VerifyOtpET = (props: OtpInputSchema) => {\n const otpInput = useRef();\n\n function backButtonHandler() {\n return true;\n }\n useEffect(() => {\n BackHandler.addEventListener('hardwareBackPress', backButtonHandler);\n return () => {\n BackHandler.removeEventListener('hardwareBackPress', backButtonHandler);\n };\n }, []);\n\n return (\n <View>\n <View style={styles.otpInputTextView}>\n <Text style={styles.veriOtpText}>Verify OTP</Text>\n <OTPTextView\n textInputStyle={styles.otpInputStyle}\n ref={otpInput}\n inputCount={props.inputCount}\n tintColor={Colors.blue300}\n handleTextChange={async (value: string) => {\n if (value.length === props.inputCount) {\n props.onSubmit({\n ...(await getBaseETResponse(\n EntityCode.VERIFY_INPUT,\n true,\n '',\n '',\n props.mergedObjectiveId,\n ExecutionTaskID.VERIFY_INPUT\n )),\n });\n }\n }}\n />\n <View style={styles.otpNotReceivedView}>\n <Text>Haven't received the sms?</Text>\n\n <Pressable\n onPress={() => {\n showToast('Resending OTP');\n }}\n style={styles.sendAgainText}\n >\n <Text>Send again</Text>\n </Pressable>\n </View>\n </View>\n </View>\n );\n};\nexport default VerifyOtpET;\n\nconst styles = StyleSheet.create({\n backIconView: {\n marginTop: 22,\n marginStart: 22,\n },\n veriOtpText: {\n fontSize: 24,\n color: Colors.black,\n marginTop: 40,\n },\n otpInputStyle: {\n borderRadius: 4,\n borderWidth: 1,\n paddingHorizontal: 16,\n paddingVertical: 12,\n marginTop: 32,\n },\n otpInputTextView: {\n marginHorizontal: 17,\n },\n otpNotReceivedView: {\n flexDirection: 'row',\n marginTop: 10,\n },\n sendAgainText: {\n marginHorizontal: 8,\n },\n});\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AAEA,IAAAG,wBAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,iBAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AAEA,IAAAO,cAAA,GAAAP,OAAA;AACA,IAAAQ,SAAA,GAAAR,OAAA;AAG4C,SAAAI,uBAAAK,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAX,wBAAAO,GAAA,EAAAI,WAAA,SAAAA,WAAA,IAAAJ,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAQ,KAAA,GAAAL,wBAAA,CAAAC,WAAA,OAAAI,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAT,GAAA,YAAAQ,KAAA,CAAAE,GAAA,CAAAV,GAAA,SAAAW,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAhB,GAAA,QAAAgB,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CA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yB,KAAK;IACnBJ,SAAS,EAAE;EACb,CAAC;EACDzB,aAAa,EAAE;IACb8B,YAAY,EAAE,CAAC;IACfC,WAAW,EAAE,CAAC;IACdC,iBAAiB,EAAE,EAAE;IACrBC,eAAe,EAAE,EAAE;IACnBR,SAAS,EAAE;EACb,CAAC;EACD7B,gBAAgB,EAAE;IAChBsC,gBAAgB,EAAE;EACpB,CAAC;EACDnB,kBAAkB,EAAE;IAClBoB,aAAa,EAAE,KAAK;IACpBV,SAAS,EAAE;EACb,CAAC;EACDN,aAAa,EAAE;IACbe,gBAAgB,EAAE;EACpB;AACF,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["VerifyOtpSchema.ts"],"sourcesContent":["/**\n * Otp entered by user\n */\nimport type {
|
|
1
|
+
{"version":3,"names":[],"sources":["VerifyOtpSchema.ts"],"sourcesContent":["/**\n * Otp entered by user\n */\nimport type {\n BaseETRequest,\n BaseETResponse,\n} from '../../../models/execTasks/ETBaseModels';\n\nexport type InputOtp = string;\n/**\n * Otp Value\n */\nexport type Otp = string;\n\nexport type OtpInputSchema = BaseETRequest & {\n inputCount: number;\n inputOtp: InputOtp;\n otp: Otp;\n onSubmit: (output: OtpOutputSchema) => void;\n};\n\nexport type OtpOutputSchema = BaseETResponse & {\n /**\n * Boolean to represent result of verification\n */\n success: boolean;\n};\n"],"mappings":""}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.hasGoBackConnector = hasGoBackConnector;
|
|
7
|
+
var _constants = require("../../constants/constants");
|
|
8
|
+
function hasGoBackConnector(applicableReasons) {
|
|
9
|
+
var _applicableReasons$go;
|
|
10
|
+
if (applicableReasons && applicableReasons.goBack && typeof applicableReasons.goBack === 'object' && (_applicableReasons$go = applicableReasons.goBack) !== null && _applicableReasons$go !== void 0 && _applicableReasons$go.hasOwnProperty(_constants.GO_BACK_EVENT_CODE)) {
|
|
11
|
+
return true;
|
|
12
|
+
} else return false;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_constants","require","hasGoBackConnector","applicableReasons","_applicableReasons$go","goBack","hasOwnProperty","GO_BACK_EVENT_CODE"],"sources":["index.ts"],"sourcesContent":["import { GO_BACK_EVENT_CODE } from '../../constants/constants';\nimport {\n ApplicableReasons,\n NewApplicableReasons,\n} from '../../models/execTasks/ETBaseModels';\n\nexport function hasGoBackConnector(\n applicableReasons: ApplicableReasons | NewApplicableReasons | undefined\n): boolean {\n if (\n applicableReasons &&\n applicableReasons.goBack &&\n typeof applicableReasons.goBack === 'object' &&\n applicableReasons.goBack?.hasOwnProperty(GO_BACK_EVENT_CODE)\n ) {\n return true;\n } else return false;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAMO,SAASC,kBAAkBA,CAChCC,iBAAuE,EAC9D;EAAA,IAAAC,qBAAA;EACT,IACED,iBAAiB,IACjBA,iBAAiB,CAACE,MAAM,IACxB,OAAOF,iBAAiB,CAACE,MAAM,KAAK,QAAQ,KAAAD,qBAAA,GAC5CD,iBAAiB,CAACE,MAAM,cAAAD,qBAAA,eAAxBA,qBAAA,CAA0BE,cAAc,CAACC,6BAAkB,CAAC,EAC5D;IACA,OAAO,IAAI;EACb,CAAC,MAAM,OAAO,KAAK;AACrB"}
|
|
@@ -4,15 +4,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.showAlert = showAlert;
|
|
7
|
-
|
|
8
7
|
var _SdkUtils = require("../../utils/SdkUtils");
|
|
9
|
-
|
|
10
8
|
var _Logger = _interopRequireWildcard(require("../../utils/Logger"));
|
|
11
|
-
|
|
12
9
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
13
|
-
|
|
14
10
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
15
|
-
|
|
16
11
|
function showAlert(title, message, cancelable, btnPositive, positiveCall, btnNegative, negCall) {
|
|
17
12
|
_SdkUtils.DispatchUtilsInterface.showAndroidDialog(title, message, btnPositive, btnNegative ?? null, cancelable).then(success => {
|
|
18
13
|
if (success) positiveCall();else if (negCall) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["showAlert","title","message","cancelable","btnPositive","positiveCall","btnNegative","negCall","DispatchUtilsInterface","showAndroidDialog","then","success","catch","error","Logger","getInstance","logEvent","LOG_TYPE","SDK_ERROR"],"sources":["AlertDisplay.tsx"],"sourcesContent":["import { DispatchUtilsInterface } from '../../utils/SdkUtils';\nimport Logger, { LOG_TYPE } from '../../utils/Logger';\n\nexport function showAlert(\n title: string,\n message: string,\n cancelable: boolean,\n btnPositive: string,\n positiveCall: () => void,\n btnNegative?: string,\n negCall?: () => void\n) {\n DispatchUtilsInterface.showAndroidDialog(\n title,\n message,\n btnPositive,\n btnNegative ?? null,\n cancelable\n )\n .then((success: boolean) => {\n if (success) positiveCall();\n else if (negCall) {\n negCall();\n }\n })\n .catch((error: { message: string }) => {\n Logger.getInstance().logEvent('error', error.message, LOG_TYPE.SDK_ERROR);\n });\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_SdkUtils","require","_Logger","_interopRequireWildcard","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","showAlert","title","message","cancelable","btnPositive","positiveCall","btnNegative","negCall","DispatchUtilsInterface","showAndroidDialog","then","success","catch","error","Logger","getInstance","logEvent","LOG_TYPE","SDK_ERROR"],"sources":["AlertDisplay.tsx"],"sourcesContent":["import { DispatchUtilsInterface } from '../../utils/SdkUtils';\nimport Logger, { LOG_TYPE } from '../../utils/Logger';\n\nexport function showAlert(\n title: string,\n message: string,\n cancelable: boolean,\n btnPositive: string,\n positiveCall: () => void,\n btnNegative?: string,\n negCall?: () => void\n) {\n DispatchUtilsInterface.showAndroidDialog(\n title,\n message,\n btnPositive,\n btnNegative ?? null,\n cancelable\n )\n .then((success: boolean) => {\n if (success) positiveCall();\n else if (negCall) {\n negCall();\n }\n })\n .catch((error: { message: string }) => {\n Logger.getInstance().logEvent('error', error.message, LOG_TYPE.SDK_ERROR);\n });\n}\n"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAC,uBAAA,CAAAF,OAAA;AAAsD,SAAAG,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAF,wBAAAM,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CA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