@os1-platform/dispatch-mobile 1.0.7 → 1.3.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +90 -26
- package/android/.gradle/6.8/fileChanges/last-build.bin +0 -0
- package/android/.gradle/6.8/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/6.8/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
- package/android/.gradle/checksums/checksums.lock +0 -0
- package/android/.gradle/configuration-cache/gc.properties +0 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/.idea/gradle.xml +13 -0
- package/android/.idea/misc.xml +4 -0
- package/android/.idea/vcs.xml +6 -0
- package/android/.idea/workspace.xml +131 -0
- package/android/gradle.properties +1 -1
- package/android/local.properties +8 -0
- package/android/src/main/AndroidManifest.xml +0 -1
- package/lib/commonjs/components/dispatch/DispatchExecNavigator.js +46 -39
- package/lib/commonjs/components/dispatch/DispatchExecNavigator.js.map +1 -1
- package/lib/commonjs/components/executiontasks/ExecutionTasksIndex.js +14 -24
- package/lib/commonjs/components/executiontasks/ExecutionTasksIndex.js.map +1 -1
- package/lib/commonjs/components/executiontasks/cancellation/CancelET.js +142 -23
- package/lib/commonjs/components/executiontasks/cancellation/CancelET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/cancellation/CancellationSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js +64 -16
- package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js.map +1 -1
- package/lib/commonjs/components/executiontasks/deliver/DeliverET.js +6 -16
- package/lib/commonjs/components/executiontasks/deliver/DeliverET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js +68 -26
- package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/display/DisplayModalET.js +4 -13
- package/lib/commonjs/components/executiontasks/display/DisplayModalET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/doodle/DoodleUtils.js +0 -2
- package/lib/commonjs/components/executiontasks/doodle/DoodleUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/doodle/SignatureET.js +61 -28
- package/lib/commonjs/components/executiontasks/doodle/SignatureET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/dropCash/DropCashET.js +5 -19
- package/lib/commonjs/components/executiontasks/dropCash/DropCashET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js +62 -18
- package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/FormGenerator.js +112 -28
- package/lib/commonjs/components/executiontasks/forms/FormGenerator.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/DateTimeWidget.js +3 -26
- package/lib/commonjs/components/executiontasks/forms/widgets/DateTimeWidget.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/DropdownWidget.js +49 -0
- package/lib/commonjs/components/executiontasks/forms/widgets/DropdownWidget.js.map +1 -0
- package/lib/commonjs/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js +1 -16
- package/lib/commonjs/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/TimeRangeSelector.js +0 -10
- package/lib/commonjs/components/executiontasks/forms/widgets/TimeRangeSelector.js.map +1 -1
- package/lib/commonjs/components/executiontasks/httpRequest/HttpEtUtils.js +4 -13
- package/lib/commonjs/components/executiontasks/httpRequest/HttpEtUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/httpRequest/HttpRequestET.js +0 -12
- package/lib/commonjs/components/executiontasks/httpRequest/HttpRequestET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/imageCapture/CaptureSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js +7 -35
- package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js +74 -49
- package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/PaymentStyles.js +0 -4
- package/lib/commonjs/components/executiontasks/payments/PaymentStyles.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/PaymentUtils.js +0 -2
- package/lib/commonjs/components/executiontasks/payments/PaymentUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js +64 -17
- package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js +63 -24
- package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js +71 -22
- package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/pickup/PickupET.js +5 -15
- package/lib/commonjs/components/executiontasks/pickup/PickupET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js +60 -19
- package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/ScanET.js +843 -0
- package/lib/commonjs/components/executiontasks/scan/ScanET.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/ScanSchema.js +6 -0
- package/lib/commonjs/components/executiontasks/scan/ScanSchema.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/constants.js +19 -0
- package/lib/commonjs/components/executiontasks/scan/constants.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/interfaces.js +29 -0
- package/lib/commonjs/components/executiontasks/scan/interfaces.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/CScanner.js +103 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/CScanner.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/DropDownUtils.js +74 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/DropDownUtils.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/ERDropDown.js +115 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/ERDropDown.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/ScanList.js +134 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/ScanList.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/utils.js +373 -0
- package/lib/commonjs/components/executiontasks/scan/utils.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scanner/CScanner.js +3 -21
- package/lib/commonjs/components/executiontasks/scanner/CScanner.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scanner/ScannerSchema.js +4 -9
- package/lib/commonjs/components/executiontasks/scanner/ScannerSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scanner/ScannerUtils.js +7 -36
- package/lib/commonjs/components/executiontasks/scanner/ScannerUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/DropDownSelector.js +0 -5
- package/lib/commonjs/components/executiontasks/scanner/returns/DropDownSelector.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/DropDownUtils.js +0 -9
- package/lib/commonjs/components/executiontasks/scanner/returns/DropDownUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/RTReasonSelection.js +0 -14
- package/lib/commonjs/components/executiontasks/scanner/returns/RTReasonSelection.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/RTScan.js +1 -40
- package/lib/commonjs/components/executiontasks/scanner/returns/RTScan.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/ReasonDropDown.js +0 -17
- package/lib/commonjs/components/executiontasks/scanner/returns/ReasonDropDown.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/ScanList.js +0 -28
- package/lib/commonjs/components/executiontasks/scanner/returns/ScanList.js.map +1 -1
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPET.js +334 -0
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPET.js.map +1 -0
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPSchema.js +14 -0
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPSchema.js.map +1 -0
- package/lib/commonjs/components/executiontasks/validateOTP/constants.js +37 -0
- package/lib/commonjs/components/executiontasks/validateOTP/constants.js.map +1 -0
- package/lib/commonjs/components/executiontasks/validateOTP/sub-components/OTPInput.js +59 -0
- package/lib/commonjs/components/executiontasks/validateOTP/sub-components/OTPInput.js.map +1 -0
- package/lib/commonjs/components/executiontasks/validateOTP/utils.js +147 -0
- package/lib/commonjs/components/executiontasks/validateOTP/utils.js.map +1 -0
- package/lib/commonjs/components/executiontasks/verifyLocation/GeofenceUtils.js +0 -13
- package/lib/commonjs/components/executiontasks/verifyLocation/GeofenceUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/verifyLocation/VerifyLocationET.js +4 -17
- package/lib/commonjs/components/executiontasks/verifyLocation/VerifyLocationET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpET.js +3 -18
- package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpET.js.map +1 -1
- package/lib/commonjs/components/widgets/AlertDisplay.js +0 -5
- package/lib/commonjs/components/widgets/AlertDisplay.js.map +1 -1
- package/lib/commonjs/components/widgets/CancelOrderDialog.js +0 -12
- package/lib/commonjs/components/widgets/CancelOrderDialog.js.map +1 -1
- package/lib/commonjs/components/widgets/IconButton.js +34 -0
- package/lib/commonjs/components/widgets/IconButton.js.map +1 -0
- package/lib/commonjs/components/widgets/ProgressDialog.js +0 -7
- package/lib/commonjs/components/widgets/ProgressDialog.js.map +1 -1
- package/lib/commonjs/components/widgets/SnackBarCustom.js +38 -38
- package/lib/commonjs/components/widgets/SnackBarCustom.js.map +1 -1
- package/lib/commonjs/components/widgets/SplitTextInput.js +93 -0
- package/lib/commonjs/components/widgets/SplitTextInput.js.map +1 -0
- package/lib/commonjs/components/widgets/Toaster.js +0 -2
- package/lib/commonjs/components/widgets/Toaster.js.map +1 -1
- package/lib/commonjs/config/DispatchSDKConfig.js +4 -5
- package/lib/commonjs/config/DispatchSDKConfig.js.map +1 -1
- package/lib/commonjs/constants/apiConstants.js +15 -0
- package/lib/commonjs/constants/apiConstants.js.map +1 -0
- package/lib/commonjs/constants/constants.js +7 -3
- package/lib/commonjs/constants/constants.js.map +1 -1
- package/lib/commonjs/constants/statuscode.js +3 -5
- package/lib/commonjs/constants/statuscode.js.map +1 -1
- package/lib/commonjs/errors/BaseError.js +3 -8
- package/lib/commonjs/errors/BaseError.js.map +1 -1
- package/lib/commonjs/errors/ErrorCodes.js +7 -6
- package/lib/commonjs/errors/ErrorCodes.js.map +1 -1
- package/lib/commonjs/events/EventDispatcher.js +27 -0
- package/lib/commonjs/events/EventDispatcher.js.map +1 -0
- package/lib/commonjs/events/EventListener.js +20 -0
- package/lib/commonjs/events/EventListener.js.map +1 -0
- package/lib/commonjs/events/constants.js +13 -0
- package/lib/commonjs/events/constants.js.map +1 -0
- package/lib/commonjs/events/index.js +11 -0
- package/lib/commonjs/events/index.js.map +1 -0
- package/lib/commonjs/events/interface.js +2 -0
- package/lib/commonjs/events/interface.js.map +1 -0
- package/lib/commonjs/index.js +9 -23
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/manager/dispatch/DispatchStateContainer.js +527 -177
- package/lib/commonjs/manager/dispatch/DispatchStateContainer.js.map +1 -1
- package/lib/commonjs/manager/dispatchCodes/EventCodeContainer.js +55 -4
- package/lib/commonjs/manager/dispatchCodes/EventCodeContainer.js.map +1 -1
- package/lib/commonjs/manager/dispatchCodes/EventCodeRepo.js +70 -0
- package/lib/commonjs/manager/dispatchCodes/EventCodeRepo.js.map +1 -0
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeContainer.js +3 -29
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeContainer.js.map +1 -1
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeRepo.js +6 -20
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeRepo.js.map +1 -1
- package/lib/commonjs/manager/jobRemoval/JobRemovalManager.js +27 -0
- package/lib/commonjs/manager/jobRemoval/JobRemovalManager.js.map +1 -0
- package/lib/commonjs/manager/location/LocationManager.js +3 -20
- package/lib/commonjs/manager/location/LocationManager.js.map +1 -1
- package/lib/commonjs/manager/sdk/DispatchSDKManager.js +8 -36
- package/lib/commonjs/manager/sdk/DispatchSDKManager.js.map +1 -1
- package/lib/commonjs/manager/sdk/DispatchSdkCache.js +6 -17
- package/lib/commonjs/manager/sdk/DispatchSdkCache.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/AppSyncManager.js +12 -46
- package/lib/commonjs/manager/syncmanager/AppSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/DBConfig.js +13 -7
- package/lib/commonjs/manager/syncmanager/DBConfig.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/NativeSyncManager.js +0 -2
- package/lib/commonjs/manager/syncmanager/NativeSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/database.js +28 -12
- package/lib/commonjs/manager/syncmanager/database.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js +0 -19
- package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentManager.js +3 -20
- package/lib/commonjs/manager/syncmanager/document/DocumentManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js +3 -52
- package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/events/ETEventsManager.js +59 -25
- package/lib/commonjs/manager/syncmanager/events/ETEventsManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/events/EventsSyncManager.js +77 -90
- package/lib/commonjs/manager/syncmanager/events/EventsSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/events/SyncHttpClient.js +27 -19
- package/lib/commonjs/manager/syncmanager/events/SyncHttpClient.js.map +1 -1
- package/lib/commonjs/models/DispatchModels.js +4 -5
- package/lib/commonjs/models/DispatchModels.js.map +1 -1
- package/lib/commonjs/models/ReasonCodes.js.map +1 -1
- package/lib/commonjs/models/execTasks/ETBaseModels.js.map +1 -1
- package/lib/commonjs/models/execTasks/ETConfig.js +28 -35
- package/lib/commonjs/models/execTasks/ETConfig.js.map +1 -1
- package/lib/commonjs/models/sdk.js +4 -5
- package/lib/commonjs/models/sdk.js.map +1 -1
- package/lib/commonjs/native/signature/SignatureCapture.js +3 -24
- package/lib/commonjs/native/signature/SignatureCapture.js.map +1 -1
- package/lib/commonjs/network/GraphQLClient.js +7 -35
- package/lib/commonjs/network/GraphQLClient.js.map +1 -1
- package/lib/commonjs/network/NetworkClient.js +2 -13
- package/lib/commonjs/network/NetworkClient.js.map +1 -1
- package/lib/commonjs/network/NetworkUtils.js +10 -8
- package/lib/commonjs/network/NetworkUtils.js.map +1 -1
- package/lib/commonjs/network/Queries.js +0 -2
- package/lib/commonjs/network/Queries.js.map +1 -1
- package/lib/commonjs/network/client.js +6 -21
- package/lib/commonjs/network/client.js.map +1 -1
- package/lib/commonjs/res/strings.js.map +1 -1
- package/lib/commonjs/resources/Login.js +4 -15
- package/lib/commonjs/resources/Login.js.map +1 -1
- package/lib/commonjs/resources/network.js +3 -8
- package/lib/commonjs/resources/network.js.map +1 -1
- package/lib/commonjs/styles/SdkColors.js +7 -7
- package/lib/commonjs/styles/SdkColors.js.map +1 -1
- package/lib/commonjs/styles/executionTasks/CommonStyles.js +42 -18
- package/lib/commonjs/styles/executionTasks/CommonStyles.js.map +1 -1
- package/lib/commonjs/ui/screens/CancellationScreen.js +36 -27
- package/lib/commonjs/ui/screens/CancellationScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/CaptureInputScreen.js +6 -15
- package/lib/commonjs/ui/screens/CaptureInputScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/CompleteObjectiveScreen.js +0 -19
- package/lib/commonjs/ui/screens/CompleteObjectiveScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DeliverScreen.js +6 -15
- package/lib/commonjs/ui/screens/DeliverScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DisplayScreen.js +7 -12
- package/lib/commonjs/ui/screens/DisplayScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DoodleScreen.js +6 -16
- package/lib/commonjs/ui/screens/DoodleScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DropCashScreen.js +6 -18
- package/lib/commonjs/ui/screens/DropCashScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ETScreensIndex.js +14 -16
- package/lib/commonjs/ui/screens/ETScreensIndex.js.map +1 -1
- package/lib/commonjs/ui/screens/FormsScreen.js +36 -15
- package/lib/commonjs/ui/screens/FormsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/GeofenceScreen.js +7 -13
- package/lib/commonjs/ui/screens/GeofenceScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HttpRequestScreen.js +5 -10
- package/lib/commonjs/ui/screens/HttpRequestScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ImageCaptureScreen.js +27 -14
- package/lib/commonjs/ui/screens/ImageCaptureScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PaymentScreen.js +11 -23
- package/lib/commonjs/ui/screens/PaymentScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PickupScreen.js +9 -13
- package/lib/commonjs/ui/screens/PickupScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/RTScanScreen.js +8 -27
- package/lib/commonjs/ui/screens/RTScanScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ScanScreen.js +268 -0
- package/lib/commonjs/ui/screens/ScanScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/StartWorkFlowScreen.js +21 -30
- package/lib/commonjs/ui/screens/StartWorkFlowScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ValidateOTPScreen.js +49 -0
- package/lib/commonjs/ui/screens/ValidateOTPScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/WithBaseDispatchScreen.js +0 -10
- package/lib/commonjs/ui/screens/WithBaseDispatchScreen.js.map +1 -1
- package/lib/commonjs/ui/uiConfig/RouteParams.js +9 -1
- package/lib/commonjs/ui/uiConfig/RouteParams.js.map +1 -1
- package/lib/commonjs/utils/ApiUtils.js +115 -0
- package/lib/commonjs/utils/ApiUtils.js.map +1 -0
- package/lib/commonjs/utils/ExecTaskUtils.js +93 -31
- package/lib/commonjs/utils/ExecTaskUtils.js.map +1 -1
- package/lib/commonjs/utils/Logger.js +10 -29
- package/lib/commonjs/utils/Logger.js.map +1 -1
- package/lib/commonjs/utils/NetworkUtil.js +3 -19
- package/lib/commonjs/utils/NetworkUtil.js.map +1 -1
- package/lib/commonjs/utils/SdkUtils.js +2 -31
- package/lib/commonjs/utils/SdkUtils.js.map +1 -1
- package/lib/commonjs/utils/SyncManagerUtils.js +25 -40
- package/lib/commonjs/utils/SyncManagerUtils.js.map +1 -1
- package/lib/commonjs/utils/fcm/FCM.js +35 -16
- package/lib/commonjs/utils/fcm/FCM.js.map +1 -1
- package/lib/commonjs/utils/fcm/FcmUtils.js +50 -25
- package/lib/commonjs/utils/fcm/FcmUtils.js.map +1 -1
- package/lib/commonjs/utils/helper.js +0 -5
- package/lib/commonjs/utils/helper.js.map +1 -1
- package/lib/commonjs/utils/hooks/useTimer.js +44 -0
- package/lib/commonjs/utils/hooks/useTimer.js.map +1 -0
- package/lib/commonjs/utils/loginHelper.js +6 -18
- package/lib/commonjs/utils/loginHelper.js.map +1 -1
- package/lib/commonjs/utils/storage.js +53 -32
- package/lib/commonjs/utils/storage.js.map +1 -1
- package/lib/commonjs/utils/utils.js +8 -11
- package/lib/commonjs/utils/utils.js.map +1 -1
- package/lib/module/components/dispatch/DispatchExecNavigator.js +46 -28
- package/lib/module/components/dispatch/DispatchExecNavigator.js.map +1 -1
- package/lib/module/components/executiontasks/ExecutionTasksIndex.js +3 -1
- package/lib/module/components/executiontasks/ExecutionTasksIndex.js.map +1 -1
- package/lib/module/components/executiontasks/cancellation/CancelET.js +145 -19
- package/lib/module/components/executiontasks/cancellation/CancelET.js.map +1 -1
- package/lib/module/components/executiontasks/cancellation/CancellationSchema.js.map +1 -1
- package/lib/module/components/executiontasks/captureInput/CaptureText.js +66 -9
- package/lib/module/components/executiontasks/captureInput/CaptureText.js.map +1 -1
- package/lib/module/components/executiontasks/deliver/DeliverET.js +6 -7
- package/lib/module/components/executiontasks/deliver/DeliverET.js.map +1 -1
- package/lib/module/components/executiontasks/deliver/SLDeliverET.js +69 -16
- package/lib/module/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
- package/lib/module/components/executiontasks/display/DisplayModalET.js +4 -3
- package/lib/module/components/executiontasks/display/DisplayModalET.js.map +1 -1
- package/lib/module/components/executiontasks/doodle/DoodleUtils.js.map +1 -1
- package/lib/module/components/executiontasks/doodle/SignatureET.js +64 -14
- package/lib/module/components/executiontasks/doodle/SignatureET.js.map +1 -1
- package/lib/module/components/executiontasks/dropCash/DropCashET.js +5 -6
- package/lib/module/components/executiontasks/dropCash/DropCashET.js.map +1 -1
- package/lib/module/components/executiontasks/dropCash/SLDropCash.js +62 -8
- package/lib/module/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
- package/lib/module/components/executiontasks/forms/FormGenerator.js +114 -14
- package/lib/module/components/executiontasks/forms/FormGenerator.js.map +1 -1
- package/lib/module/components/executiontasks/forms/widgets/DateTimeWidget.js +3 -15
- package/lib/module/components/executiontasks/forms/widgets/DateTimeWidget.js.map +1 -1
- package/lib/module/components/executiontasks/forms/widgets/DropdownWidget.js +39 -0
- package/lib/module/components/executiontasks/forms/widgets/DropdownWidget.js.map +1 -0
- package/lib/module/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js +1 -5
- package/lib/module/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js.map +1 -1
- package/lib/module/components/executiontasks/forms/widgets/TimeRangeSelector.js +0 -3
- package/lib/module/components/executiontasks/forms/widgets/TimeRangeSelector.js.map +1 -1
- package/lib/module/components/executiontasks/httpRequest/HttpEtUtils.js +4 -2
- package/lib/module/components/executiontasks/httpRequest/HttpEtUtils.js.map +1 -1
- package/lib/module/components/executiontasks/httpRequest/HttpRequestET.js +0 -3
- package/lib/module/components/executiontasks/httpRequest/HttpRequestET.js.map +1 -1
- package/lib/module/components/executiontasks/imageCapture/CaptureSchema.js.map +1 -1
- package/lib/module/components/executiontasks/imageCapture/CaptureUtils.js +7 -10
- package/lib/module/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
- package/lib/module/components/executiontasks/imageCapture/ImageCapture.js +75 -35
- package/lib/module/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
- package/lib/module/components/executiontasks/payments/PaymentStyles.js.map +1 -1
- package/lib/module/components/executiontasks/payments/PaymentUtils.js.map +1 -1
- package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentET.js +64 -6
- package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
- package/lib/module/components/executiontasks/payments/init/InitPaymentET.js +63 -11
- package/lib/module/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
- package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentET.js +71 -10
- package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
- package/lib/module/components/executiontasks/pickup/PickupET.js +5 -6
- package/lib/module/components/executiontasks/pickup/PickupET.js.map +1 -1
- package/lib/module/components/executiontasks/pickup/SLPickupET.js +61 -10
- package/lib/module/components/executiontasks/pickup/SLPickupET.js.map +1 -1
- package/lib/module/components/executiontasks/scan/ScanET.js +833 -0
- package/lib/module/components/executiontasks/scan/ScanET.js.map +1 -0
- package/lib/module/components/executiontasks/scan/ScanSchema.js +2 -0
- package/lib/module/components/executiontasks/scan/ScanSchema.js.map +1 -0
- package/lib/module/components/executiontasks/scan/constants.js +7 -0
- package/lib/module/components/executiontasks/scan/constants.js.map +1 -0
- package/lib/module/components/executiontasks/scan/interfaces.js +21 -0
- package/lib/module/components/executiontasks/scan/interfaces.js.map +1 -0
- package/lib/module/components/executiontasks/scan/sub_components/CScanner.js +94 -0
- package/lib/module/components/executiontasks/scan/sub_components/CScanner.js.map +1 -0
- package/lib/module/components/executiontasks/scan/sub_components/DropDownUtils.js +66 -0
- package/lib/module/components/executiontasks/scan/sub_components/DropDownUtils.js.map +1 -0
- package/lib/module/components/executiontasks/scan/sub_components/ERDropDown.js +105 -0
- package/lib/module/components/executiontasks/scan/sub_components/ERDropDown.js.map +1 -0
- package/lib/module/components/executiontasks/scan/sub_components/ScanList.js +124 -0
- package/lib/module/components/executiontasks/scan/sub_components/ScanList.js.map +1 -0
- package/lib/module/components/executiontasks/scan/utils.js +358 -0
- package/lib/module/components/executiontasks/scan/utils.js.map +1 -0
- package/lib/module/components/executiontasks/scanner/CScanner.js +3 -8
- package/lib/module/components/executiontasks/scanner/CScanner.js.map +1 -1
- package/lib/module/components/executiontasks/scanner/ScannerSchema.js +3 -3
- package/lib/module/components/executiontasks/scanner/ScannerSchema.js.map +1 -1
- package/lib/module/components/executiontasks/scanner/ScannerUtils.js +6 -18
- package/lib/module/components/executiontasks/scanner/ScannerUtils.js.map +1 -1
- package/lib/module/components/executiontasks/scanner/returns/DropDownSelector.js +0 -2
- package/lib/module/components/executiontasks/scanner/returns/DropDownSelector.js.map +1 -1
- package/lib/module/components/executiontasks/scanner/returns/DropDownUtils.js +0 -5
- package/lib/module/components/executiontasks/scanner/returns/DropDownUtils.js.map +1 -1
- package/lib/module/components/executiontasks/scanner/returns/RTReasonSelection.js +0 -3
- package/lib/module/components/executiontasks/scanner/returns/RTReasonSelection.js.map +1 -1
- package/lib/module/components/executiontasks/scanner/returns/RTScan.js +1 -19
- package/lib/module/components/executiontasks/scanner/returns/RTScan.js.map +1 -1
- package/lib/module/components/executiontasks/scanner/returns/ReasonDropDown.js +0 -7
- package/lib/module/components/executiontasks/scanner/returns/ReasonDropDown.js.map +1 -1
- package/lib/module/components/executiontasks/scanner/returns/ScanList.js +0 -15
- package/lib/module/components/executiontasks/scanner/returns/ScanList.js.map +1 -1
- package/lib/module/components/executiontasks/validateOTP/ValidateOTPET.js +325 -0
- package/lib/module/components/executiontasks/validateOTP/ValidateOTPET.js.map +1 -0
- package/lib/module/components/executiontasks/validateOTP/ValidateOTPSchema.js +8 -0
- package/lib/module/components/executiontasks/validateOTP/ValidateOTPSchema.js.map +1 -0
- package/lib/module/components/executiontasks/validateOTP/constants.js +25 -0
- package/lib/module/components/executiontasks/validateOTP/constants.js.map +1 -0
- package/lib/module/components/executiontasks/validateOTP/sub-components/OTPInput.js +49 -0
- package/lib/module/components/executiontasks/validateOTP/sub-components/OTPInput.js.map +1 -0
- package/lib/module/components/executiontasks/validateOTP/utils.js +133 -0
- package/lib/module/components/executiontasks/validateOTP/utils.js.map +1 -0
- package/lib/module/components/executiontasks/verifyLocation/GeofenceUtils.js +0 -6
- package/lib/module/components/executiontasks/verifyLocation/GeofenceUtils.js.map +1 -1
- package/lib/module/components/executiontasks/verifyLocation/VerifyLocationET.js +4 -3
- package/lib/module/components/executiontasks/verifyLocation/VerifyLocationET.js.map +1 -1
- package/lib/module/components/executiontasks/verifyOtp/VerifyOtpET.js +4 -8
- package/lib/module/components/executiontasks/verifyOtp/VerifyOtpET.js.map +1 -1
- package/lib/module/components/widgets/AlertDisplay.js.map +1 -1
- package/lib/module/components/widgets/CancelOrderDialog.js +0 -2
- package/lib/module/components/widgets/CancelOrderDialog.js.map +1 -1
- package/lib/module/components/widgets/IconButton.js +26 -0
- package/lib/module/components/widgets/IconButton.js.map +1 -0
- package/lib/module/components/widgets/ProgressDialog.js +0 -2
- package/lib/module/components/widgets/ProgressDialog.js.map +1 -1
- package/lib/module/components/widgets/SnackBarCustom.js +36 -18
- package/lib/module/components/widgets/SnackBarCustom.js.map +1 -1
- package/lib/module/components/widgets/SplitTextInput.js +84 -0
- package/lib/module/components/widgets/SplitTextInput.js.map +1 -0
- package/lib/module/components/widgets/Toaster.js.map +1 -1
- package/lib/module/config/DispatchSDKConfig.js +3 -4
- package/lib/module/config/DispatchSDKConfig.js.map +1 -1
- package/lib/module/constants/apiConstants.js +7 -0
- package/lib/module/constants/apiConstants.js.map +1 -0
- package/lib/module/constants/constants.js +4 -2
- package/lib/module/constants/constants.js.map +1 -1
- package/lib/module/constants/statuscode.js +3 -5
- package/lib/module/constants/statuscode.js.map +1 -1
- package/lib/module/errors/BaseError.js +3 -6
- package/lib/module/errors/BaseError.js.map +1 -1
- package/lib/module/errors/ErrorCodes.js +5 -5
- package/lib/module/errors/ErrorCodes.js.map +1 -1
- package/lib/module/events/EventDispatcher.js +19 -0
- package/lib/module/events/EventDispatcher.js.map +1 -0
- package/lib/module/events/EventListener.js +13 -0
- package/lib/module/events/EventListener.js.map +1 -0
- package/lib/module/events/constants.js +6 -0
- package/lib/module/events/constants.js.map +1 -0
- package/lib/module/events/index.js +3 -0
- package/lib/module/events/index.js.map +1 -0
- package/lib/module/events/interface.js +2 -0
- package/lib/module/events/interface.js.map +1 -0
- package/lib/module/index.js +4 -3
- package/lib/module/index.js.map +1 -1
- package/lib/module/manager/dispatch/DispatchStateContainer.js +529 -151
- package/lib/module/manager/dispatch/DispatchStateContainer.js.map +1 -1
- package/lib/module/manager/dispatchCodes/EventCodeContainer.js +52 -2
- package/lib/module/manager/dispatchCodes/EventCodeContainer.js.map +1 -1
- package/lib/module/manager/dispatchCodes/EventCodeRepo.js +61 -0
- package/lib/module/manager/dispatchCodes/EventCodeRepo.js.map +1 -0
- package/lib/module/manager/dispatchCodes/ReasonCodeContainer.js +3 -16
- package/lib/module/manager/dispatchCodes/ReasonCodeContainer.js.map +1 -1
- package/lib/module/manager/dispatchCodes/ReasonCodeRepo.js +6 -14
- package/lib/module/manager/dispatchCodes/ReasonCodeRepo.js.map +1 -1
- package/lib/module/manager/jobRemoval/JobRemovalManager.js +20 -0
- package/lib/module/manager/jobRemoval/JobRemovalManager.js.map +1 -0
- package/lib/module/manager/location/LocationManager.js +3 -14
- package/lib/module/manager/location/LocationManager.js.map +1 -1
- package/lib/module/manager/sdk/DispatchSDKManager.js +8 -14
- package/lib/module/manager/sdk/DispatchSDKManager.js.map +1 -1
- package/lib/module/manager/sdk/DispatchSdkCache.js +6 -13
- package/lib/module/manager/sdk/DispatchSdkCache.js.map +1 -1
- package/lib/module/manager/syncmanager/AppSyncManager.js +12 -26
- package/lib/module/manager/syncmanager/AppSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/DBConfig.js +9 -5
- package/lib/module/manager/syncmanager/DBConfig.js.map +1 -1
- package/lib/module/manager/syncmanager/NativeSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/database.js +27 -3
- package/lib/module/manager/syncmanager/database.js.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentHttpClient.js +0 -7
- package/lib/module/manager/syncmanager/document/DocumentHttpClient.js.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentManager.js +3 -14
- package/lib/module/manager/syncmanager/document/DocumentManager.js.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentSyncManager.js +3 -35
- package/lib/module/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/events/ETEventsManager.js +59 -18
- package/lib/module/manager/syncmanager/events/ETEventsManager.js.map +1 -1
- package/lib/module/manager/syncmanager/events/EventsSyncManager.js +77 -68
- package/lib/module/manager/syncmanager/events/EventsSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/events/SyncHttpClient.js +26 -11
- package/lib/module/manager/syncmanager/events/SyncHttpClient.js.map +1 -1
- package/lib/module/models/DispatchModels.js +3 -4
- package/lib/module/models/DispatchModels.js.map +1 -1
- package/lib/module/models/ReasonCodes.js.map +1 -1
- package/lib/module/models/execTasks/ETBaseModels.js.map +1 -1
- package/lib/module/models/execTasks/ETConfig.js +22 -29
- package/lib/module/models/execTasks/ETConfig.js.map +1 -1
- package/lib/module/models/sdk.js +3 -4
- package/lib/module/models/sdk.js.map +1 -1
- package/lib/module/native/signature/SignatureCapture.js +3 -18
- package/lib/module/native/signature/SignatureCapture.js.map +1 -1
- package/lib/module/network/GraphQLClient.js +6 -26
- package/lib/module/network/GraphQLClient.js.map +1 -1
- package/lib/module/network/NetworkClient.js +2 -6
- package/lib/module/network/NetworkClient.js.map +1 -1
- package/lib/module/network/NetworkUtils.js +10 -3
- package/lib/module/network/NetworkUtils.js.map +1 -1
- package/lib/module/network/Queries.js.map +1 -1
- package/lib/module/network/client.js +7 -17
- package/lib/module/network/client.js.map +1 -1
- package/lib/module/res/strings.js.map +1 -1
- package/lib/module/resources/Login.js +4 -13
- package/lib/module/resources/Login.js.map +1 -1
- package/lib/module/resources/network.js +3 -6
- package/lib/module/resources/network.js.map +1 -1
- package/lib/module/styles/SdkColors.js +6 -6
- package/lib/module/styles/SdkColors.js.map +1 -1
- package/lib/module/styles/executionTasks/CommonStyles.js +41 -7
- package/lib/module/styles/executionTasks/CommonStyles.js.map +1 -1
- package/lib/module/ui/screens/CancellationScreen.js +36 -14
- package/lib/module/ui/screens/CancellationScreen.js.map +1 -1
- package/lib/module/ui/screens/CaptureInputScreen.js +7 -4
- package/lib/module/ui/screens/CaptureInputScreen.js.map +1 -1
- package/lib/module/ui/screens/CompleteObjectiveScreen.js +0 -3
- package/lib/module/ui/screens/CompleteObjectiveScreen.js.map +1 -1
- package/lib/module/ui/screens/DeliverScreen.js +7 -4
- package/lib/module/ui/screens/DeliverScreen.js.map +1 -1
- package/lib/module/ui/screens/DisplayScreen.js +5 -4
- package/lib/module/ui/screens/DisplayScreen.js.map +1 -1
- package/lib/module/ui/screens/DoodleScreen.js +7 -4
- package/lib/module/ui/screens/DoodleScreen.js.map +1 -1
- package/lib/module/ui/screens/DropCashScreen.js +7 -7
- package/lib/module/ui/screens/DropCashScreen.js.map +1 -1
- package/lib/module/ui/screens/ETScreensIndex.js +3 -1
- package/lib/module/ui/screens/ETScreensIndex.js.map +1 -1
- package/lib/module/ui/screens/FormsScreen.js +34 -6
- package/lib/module/ui/screens/FormsScreen.js.map +1 -1
- package/lib/module/ui/screens/GeofenceScreen.js +5 -4
- package/lib/module/ui/screens/GeofenceScreen.js.map +1 -1
- package/lib/module/ui/screens/HttpRequestScreen.js +5 -3
- package/lib/module/ui/screens/HttpRequestScreen.js.map +1 -1
- package/lib/module/ui/screens/ImageCaptureScreen.js +25 -5
- package/lib/module/ui/screens/ImageCaptureScreen.js.map +1 -1
- package/lib/module/ui/screens/PaymentScreen.js +12 -10
- package/lib/module/ui/screens/PaymentScreen.js.map +1 -1
- package/lib/module/ui/screens/PickupScreen.js +7 -5
- package/lib/module/ui/screens/PickupScreen.js.map +1 -1
- package/lib/module/ui/screens/RTScanScreen.js +9 -13
- package/lib/module/ui/screens/RTScanScreen.js.map +1 -1
- package/lib/module/ui/screens/ScanScreen.js +259 -0
- package/lib/module/ui/screens/ScanScreen.js.map +1 -0
- package/lib/module/ui/screens/StartWorkFlowScreen.js +22 -9
- package/lib/module/ui/screens/StartWorkFlowScreen.js.map +1 -1
- package/lib/module/ui/screens/ValidateOTPScreen.js +39 -0
- package/lib/module/ui/screens/ValidateOTPScreen.js.map +1 -0
- package/lib/module/ui/screens/WithBaseDispatchScreen.js +0 -3
- package/lib/module/ui/screens/WithBaseDispatchScreen.js.map +1 -1
- package/lib/module/ui/uiConfig/RouteParams.js +9 -1
- package/lib/module/ui/uiConfig/RouteParams.js.map +1 -1
- package/lib/module/utils/ApiUtils.js +101 -0
- package/lib/module/utils/ApiUtils.js.map +1 -0
- package/lib/module/utils/ExecTaskUtils.js +92 -21
- package/lib/module/utils/ExecTaskUtils.js.map +1 -1
- package/lib/module/utils/Logger.js +9 -21
- package/lib/module/utils/Logger.js.map +1 -1
- package/lib/module/utils/NetworkUtil.js +3 -15
- package/lib/module/utils/NetworkUtil.js.map +1 -1
- package/lib/module/utils/SdkUtils.js +2 -15
- package/lib/module/utils/SdkUtils.js.map +1 -1
- package/lib/module/utils/SyncManagerUtils.js +25 -10
- package/lib/module/utils/SyncManagerUtils.js.map +1 -1
- package/lib/module/utils/fcm/FCM.js +35 -4
- package/lib/module/utils/fcm/FCM.js.map +1 -1
- package/lib/module/utils/fcm/FcmUtils.js +50 -7
- package/lib/module/utils/fcm/FcmUtils.js.map +1 -1
- package/lib/module/utils/helper.js +0 -3
- package/lib/module/utils/helper.js.map +1 -1
- package/lib/module/utils/hooks/useTimer.js +37 -0
- package/lib/module/utils/hooks/useTimer.js.map +1 -0
- package/lib/module/utils/loginHelper.js +6 -16
- package/lib/module/utils/loginHelper.js.map +1 -1
- package/lib/module/utils/storage.js +51 -29
- package/lib/module/utils/storage.js.map +1 -1
- package/lib/module/utils/utils.js +8 -6
- package/lib/module/utils/utils.js.map +1 -1
- package/lib/typescript/components/executiontasks/CompletedWFSchema.d.ts +2 -2
- package/lib/typescript/components/executiontasks/ExecutionTasksIndex.d.ts +6 -2
- package/lib/typescript/components/executiontasks/cancellation/CancellationSchema.d.ts +10 -5
- package/lib/typescript/components/executiontasks/captureInput/CaptureInputSchema.d.ts +7 -7
- package/lib/typescript/components/executiontasks/deliver/DeliverETInput.d.ts +7 -7
- package/lib/typescript/components/executiontasks/display/DisplaySchema.d.ts +5 -5
- package/lib/typescript/components/executiontasks/doodle/SignatureSchema.d.ts +7 -7
- package/lib/typescript/components/executiontasks/dropCash/DropCashSchema.d.ts +2 -2
- package/lib/typescript/components/executiontasks/forms/FormSchema.d.ts +2 -2
- package/lib/typescript/components/executiontasks/forms/widgets/DateTimeWidget.d.ts +1 -1
- package/lib/typescript/components/executiontasks/forms/widgets/DropdownWidget.d.ts +9 -0
- package/lib/typescript/components/executiontasks/httpRequest/HttpRequestETSchema.d.ts +6 -6
- package/lib/typescript/components/executiontasks/imageCapture/CaptureSchema.d.ts +16 -11
- package/lib/typescript/components/executiontasks/payments/completePayment/CompletePaymentSchema.d.ts +2 -2
- package/lib/typescript/components/executiontasks/payments/init/InitPaymentSchema.d.ts +3 -3
- package/lib/typescript/components/executiontasks/payments/processPayment/ProcessPaymentSchema.d.ts +2 -2
- package/lib/typescript/components/executiontasks/pickup/PickpSchema.d.ts +3 -3
- package/lib/typescript/components/executiontasks/scan/ScanET.d.ts +16 -0
- package/lib/typescript/components/executiontasks/scan/ScanSchema.d.ts +70 -0
- package/lib/typescript/components/executiontasks/scan/constants.d.ts +6 -0
- package/lib/typescript/components/executiontasks/scan/interfaces.d.ts +41 -0
- package/lib/typescript/components/executiontasks/scan/sub_components/CScanner.d.ts +7 -0
- package/lib/typescript/components/executiontasks/scan/sub_components/DropDownUtils.d.ts +7 -0
- package/lib/typescript/components/executiontasks/scan/sub_components/ERDropDown.d.ts +17 -0
- package/lib/typescript/components/executiontasks/scan/sub_components/ScanList.d.ts +8 -0
- package/lib/typescript/components/executiontasks/scan/utils.d.ts +21 -0
- package/lib/typescript/components/executiontasks/scanner/ScannerSchema.d.ts +6 -6
- package/lib/typescript/components/executiontasks/scanner/returns/DropDownUtils.d.ts +1 -2
- package/lib/typescript/components/executiontasks/scanner/returns/RTReasonSelection.d.ts +1 -1
- package/lib/typescript/components/executiontasks/scanner/returns/ScanList.d.ts +1 -1
- package/lib/typescript/components/executiontasks/validateOTP/ValidateOTPET.d.ts +4 -0
- package/lib/typescript/components/executiontasks/validateOTP/ValidateOTPSchema.d.ts +54 -0
- package/lib/typescript/components/executiontasks/validateOTP/constants.d.ts +10 -0
- package/lib/typescript/components/executiontasks/validateOTP/sub-components/OTPInput.d.ts +12 -0
- package/lib/typescript/components/executiontasks/validateOTP/utils.d.ts +7 -0
- package/lib/typescript/components/executiontasks/verifyInput/VerifyInputSchema.d.ts +8 -8
- package/lib/typescript/components/executiontasks/verifyLocation/VerifyLocSchema.d.ts +9 -9
- package/lib/typescript/components/executiontasks/verifyOtp/VerifyOtpSchema.d.ts +3 -3
- package/lib/typescript/components/widgets/IconButton.d.ts +9 -0
- package/lib/typescript/components/widgets/SnackBarCustom.d.ts +9 -5
- package/lib/typescript/components/widgets/SplitTextInput.d.ts +12 -0
- package/lib/typescript/constants/apiConstants.d.ts +6 -0
- package/lib/typescript/constants/constants.d.ts +4 -2
- package/lib/typescript/errors/ErrorCodes.d.ts +3 -1
- package/lib/typescript/events/EventDispatcher.d.ts +5 -0
- package/lib/typescript/events/EventListener.d.ts +5 -0
- package/lib/typescript/events/constants.d.ts +5 -0
- package/lib/typescript/events/index.d.ts +2 -0
- package/lib/typescript/events/interface.d.ts +1 -0
- package/lib/typescript/index.d.ts +5 -4
- package/lib/typescript/manager/dispatch/DispatchStateContainer.d.ts +21 -8
- package/lib/typescript/manager/dispatchCodes/EventCodeContainer.d.ts +12 -1
- package/lib/typescript/manager/dispatchCodes/EventCodeRepo.d.ts +13 -0
- package/lib/typescript/manager/jobRemoval/JobRemovalManager.d.ts +6 -0
- package/lib/typescript/manager/sdk/DispatchSdkCache.d.ts +2 -0
- package/lib/typescript/manager/syncmanager/AppSyncManager.d.ts +1 -0
- package/lib/typescript/manager/syncmanager/DBConfig.d.ts +22 -2
- package/lib/typescript/manager/syncmanager/database.d.ts +5 -0
- package/lib/typescript/manager/syncmanager/document/models.d.ts +1 -1
- package/lib/typescript/manager/syncmanager/events/ETEventsManager.d.ts +5 -1
- package/lib/typescript/manager/syncmanager/events/EventsSyncManager.d.ts +5 -1
- package/lib/typescript/manager/syncmanager/events/SyncHttpClient.d.ts +3 -1
- package/lib/typescript/models/DispatchModels.d.ts +56 -1
- package/lib/typescript/models/ReasonCodes.d.ts +5 -0
- package/lib/typescript/models/auth.d.ts +1 -1
- package/lib/typescript/models/execTasks/ETBaseModels.d.ts +27 -8
- package/lib/typescript/models/execTasks/ETConfig.d.ts +8 -4
- package/lib/typescript/models/sdk.d.ts +5 -0
- package/lib/typescript/native/signature/SignatureCapture.d.ts +1 -1
- package/lib/typescript/network/NetworkUtils.d.ts +1 -5
- package/lib/typescript/styles/SdkColors.d.ts +1 -0
- package/lib/typescript/styles/executionTasks/CommonStyles.d.ts +36 -0
- package/lib/typescript/ui/screens/ETScreensIndex.d.ts +3 -1
- package/lib/typescript/ui/screens/ScanScreen.d.ts +3 -0
- package/lib/typescript/ui/screens/ValidateOTPScreen.d.ts +3 -0
- package/lib/typescript/ui/uiConfig/RouteParams.d.ts +8 -0
- package/lib/typescript/utils/ApiUtils.d.ts +61 -0
- package/lib/typescript/utils/ExecTaskUtils.d.ts +7 -2
- package/lib/typescript/utils/NetworkUtil.d.ts +1 -1
- package/lib/typescript/utils/SyncManagerUtils.d.ts +3 -1
- package/lib/typescript/utils/hooks/useTimer.d.ts +5 -0
- package/lib/typescript/utils/storage.d.ts +17 -0
- package/package.json +23 -24
- package/tsconfig.json +9 -8
- package/file_unzip.js +0 -5
- package/mobile-execution-lib-0.6.4.tgz +0 -0
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ActivityIndicator, Modal, StyleSheet, Text, View } from 'react-native';
|
|
3
3
|
import { Fonts } from '../../styles/executionTasks/CommonStyles';
|
|
4
|
-
|
|
5
4
|
const ProgressDialog = props => {
|
|
6
5
|
return /*#__PURE__*/React.createElement(Modal, {
|
|
7
6
|
animationType: "none",
|
|
@@ -19,7 +18,6 @@ const ProgressDialog = props => {
|
|
|
19
18
|
style: [styles.label]
|
|
20
19
|
}, props.label))));
|
|
21
20
|
};
|
|
22
|
-
|
|
23
21
|
const styles = StyleSheet.create({
|
|
24
22
|
label: {
|
|
25
23
|
color: 'black',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","ActivityIndicator","Modal","StyleSheet","Text","View","Fonts","ProgressDialog","props","visible","styles","wrapper","content","
|
|
1
|
+
{"version":3,"names":["React","ActivityIndicator","Modal","StyleSheet","Text","View","Fonts","ProgressDialog","props","createElement","animationType","transparent","visible","onRequestClose","style","styles","wrapper","content","size","color","label","create","textAlign","fontStyle","fontSize","fontFamily","IBMPlexSans_600SemiBold","backgroundColor","padding","borderRadius","width","alignItems","flex","justifyContent"],"sources":["ProgressDialog.tsx"],"sourcesContent":["import React from 'react';\nimport { ActivityIndicator, Modal, StyleSheet, Text, View } from 'react-native';\nimport { Fonts } from '../../styles/executionTasks/CommonStyles';\n\nconst ProgressDialog = (props: ProgressDialogProps) => {\n return (\n <Modal\n animationType=\"none\"\n transparent={true}\n visible={props.visible}\n onRequestClose={() => {}}\n >\n <View style={styles.wrapper}>\n <View style={styles.content}>\n <ActivityIndicator size=\"large\" color=\"rgba(107, 142, 255, 1)\" />\n <Text style={[styles.label]}>{props.label}</Text>\n </View>\n </View>\n </Modal>\n );\n};\n\nconst styles = StyleSheet.create({\n label: {\n color: 'black',\n textAlign: 'center',\n fontStyle: 'normal',\n fontSize: 15,\n fontFamily: Fonts.IBMPlexSans_600SemiBold,\n },\n content: {\n backgroundColor: 'white',\n padding: 10,\n borderRadius: 5,\n width: '80%',\n alignItems: 'center',\n },\n wrapper: {\n flex: 1,\n alignItems: 'center',\n justifyContent: 'center',\n backgroundColor: 'rgba(0,0,0,0.7)',\n },\n});\n\nexport default ProgressDialog;\n\nexport interface ProgressDialogProps {\n visible: boolean;\n label: string;\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,iBAAiB,EAAEC,KAAK,EAAEC,UAAU,EAAEC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AAC/E,SAASC,KAAK,QAAQ,0CAA0C;AAEhE,MAAMC,cAAc,GAAIC,KAA0B,IAAK;EACrD,oBACER,KAAA,CAAAS,aAAA,CAACP,KAAK;IACJQ,aAAa,EAAC,MAAM;IACpBC,WAAW,EAAE,IAAK;IAClBC,OAAO,EAAEJ,KAAK,CAACI,OAAQ;IACvBC,cAAc,EAAEA,CAAA,KAAM,CAAC;EAAE,gBAEzBb,KAAA,CAAAS,aAAA,CAACJ,IAAI;IAACS,KAAK,EAAEC,MAAM,CAACC;EAAQ,gBAC1BhB,KAAA,CAAAS,aAAA,CAACJ,IAAI;IAACS,KAAK,EAAEC,MAAM,CAACE;EAAQ,gBAC1BjB,KAAA,CAAAS,aAAA,CAACR,iBAAiB;IAACiB,IAAI,EAAC,OAAO;IAACC,KAAK,EAAC;EAAwB,EAAG,eACjEnB,KAAA,CAAAS,aAAA,CAACL,IAAI;IAACU,KAAK,EAAE,CAACC,MAAM,CAACK,KAAK;EAAE,GAAEZ,KAAK,CAACY,KAAK,CAAQ,CAC5C,CACF,CACD;AAEZ,CAAC;AAED,MAAML,MAAM,GAAGZ,UAAU,CAACkB,MAAM,CAAC;EAC/BD,KAAK,EAAE;IACLD,KAAK,EAAE,OAAO;IACdG,SAAS,EAAE,QAAQ;IACnBC,SAAS,EAAE,QAAQ;IACnBC,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAEnB,KAAK,CAACoB;EACpB,CAAC;EACDT,OAAO,EAAE;IACPU,eAAe,EAAE,OAAO;IACxBC,OAAO,EAAE,EAAE;IACXC,YAAY,EAAE,CAAC;IACfC,KAAK,EAAE,KAAK;IACZC,UAAU,EAAE;EACd,CAAC;EACDf,OAAO,EAAE;IACPgB,IAAI,EAAE,CAAC;IACPD,UAAU,EAAE,QAAQ;IACpBE,cAAc,EAAE,QAAQ;IACxBN,eAAe,EAAE;EACnB;AACF,CAAC,CAAC;AAEF,eAAepB,cAAc"}
|
|
@@ -1,18 +1,23 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Animated, SafeAreaView, StyleSheet, Text, View } from 'react-native';
|
|
3
3
|
import { Surface, withTheme } from 'react-native-paper';
|
|
4
|
-
import
|
|
5
|
-
import Icon from 'react-native-vector-icons/MaterialIcons';
|
|
4
|
+
import { AntDesign } from '@expo/vector-icons';
|
|
6
5
|
import { Fonts } from '../../styles/executionTasks/CommonStyles';
|
|
7
6
|
const DURATION_MEDIUM = 1000;
|
|
8
|
-
|
|
7
|
+
export let SnackBarType = /*#__PURE__*/function (SnackBarType) {
|
|
8
|
+
SnackBarType[SnackBarType["SUCCESS"] = 0] = "SUCCESS";
|
|
9
|
+
SnackBarType[SnackBarType["FAILURE"] = 1] = "FAILURE";
|
|
10
|
+
return SnackBarType;
|
|
11
|
+
}({});
|
|
9
12
|
const SnackbarCustom = _ref => {
|
|
10
13
|
let {
|
|
11
14
|
visible,
|
|
12
15
|
duration = DURATION_MEDIUM,
|
|
13
16
|
onDismiss,
|
|
14
17
|
message,
|
|
15
|
-
theme
|
|
18
|
+
theme,
|
|
19
|
+
type,
|
|
20
|
+
customBottom = 110
|
|
16
21
|
} = _ref;
|
|
17
22
|
const {
|
|
18
23
|
current: opacity
|
|
@@ -40,10 +45,8 @@ const SnackbarCustom = _ref => {
|
|
|
40
45
|
let {
|
|
41
46
|
finished
|
|
42
47
|
} = _ref2;
|
|
43
|
-
|
|
44
48
|
if (finished) {
|
|
45
49
|
const isInfinity = duration === Number.POSITIVE_INFINITY || duration === Number.NEGATIVE_INFINITY;
|
|
46
|
-
|
|
47
50
|
if (finished && !isInfinity) {
|
|
48
51
|
hideTimeout.current = setTimeout(onDismiss, duration);
|
|
49
52
|
}
|
|
@@ -69,9 +72,12 @@ const SnackbarCustom = _ref => {
|
|
|
69
72
|
roundness
|
|
70
73
|
} = theme;
|
|
71
74
|
if (hidden) return null;
|
|
75
|
+
if (!message) return null;
|
|
72
76
|
return /*#__PURE__*/React.createElement(SafeAreaView, {
|
|
73
77
|
pointerEvents: "box-none",
|
|
74
|
-
style: [styles.wrapper
|
|
78
|
+
style: [styles.wrapper, {
|
|
79
|
+
bottom: customBottom
|
|
80
|
+
}]
|
|
75
81
|
}, /*#__PURE__*/React.createElement(Surface, {
|
|
76
82
|
pointerEvents: "box-none",
|
|
77
83
|
accessibilityLiveRegion: "polite",
|
|
@@ -88,28 +94,32 @@ const SnackbarCustom = _ref => {
|
|
|
88
94
|
backgroundColor: colors.onSurface
|
|
89
95
|
}]
|
|
90
96
|
}, /*#__PURE__*/React.createElement(View, {
|
|
91
|
-
style: styles.main
|
|
92
|
-
}, /*#__PURE__*/React.createElement(
|
|
93
|
-
name:
|
|
94
|
-
|
|
95
|
-
|
|
97
|
+
style: type && type === SnackBarType.FAILURE ? styles.fail : styles.main
|
|
98
|
+
}, type && type === SnackBarType.FAILURE ? /*#__PURE__*/React.createElement(AntDesign, {
|
|
99
|
+
name: "exclamationcircleo",
|
|
100
|
+
size: 20,
|
|
101
|
+
color: "white"
|
|
102
|
+
}) : /*#__PURE__*/React.createElement(AntDesign, {
|
|
103
|
+
name: "checkcircleo",
|
|
104
|
+
size: 20,
|
|
105
|
+
color: "white"
|
|
96
106
|
}), /*#__PURE__*/React.createElement(Text, {
|
|
97
107
|
style: styles.messageStyle
|
|
98
|
-
}, message), /*#__PURE__*/React.createElement(
|
|
99
|
-
name:
|
|
100
|
-
|
|
101
|
-
|
|
108
|
+
}, message), /*#__PURE__*/React.createElement(AntDesign, {
|
|
109
|
+
name: "close",
|
|
110
|
+
size: 16,
|
|
111
|
+
color: "white",
|
|
102
112
|
onPress: () => {
|
|
103
113
|
setHidden(true);
|
|
104
114
|
}
|
|
105
115
|
}))));
|
|
106
116
|
};
|
|
107
|
-
|
|
108
117
|
const styles = StyleSheet.create({
|
|
109
118
|
wrapper: {
|
|
110
119
|
position: 'absolute',
|
|
111
120
|
bottom: 110,
|
|
112
|
-
width: '100%'
|
|
121
|
+
width: '100%',
|
|
122
|
+
zIndex: 1000
|
|
113
123
|
},
|
|
114
124
|
container: {
|
|
115
125
|
elevation: 6,
|
|
@@ -122,9 +132,17 @@ const styles = StyleSheet.create({
|
|
|
122
132
|
main: {
|
|
123
133
|
padding: 16,
|
|
124
134
|
flexDirection: 'row',
|
|
135
|
+
alignItems: 'center',
|
|
125
136
|
backgroundColor: '#10B981',
|
|
126
137
|
flex: 1
|
|
127
138
|
},
|
|
139
|
+
fail: {
|
|
140
|
+
padding: 16,
|
|
141
|
+
flexDirection: 'row',
|
|
142
|
+
alignItems: 'center',
|
|
143
|
+
backgroundColor: '#FA3A2E',
|
|
144
|
+
flex: 1
|
|
145
|
+
},
|
|
128
146
|
messageStyle: {
|
|
129
147
|
flex: 1,
|
|
130
148
|
marginStart: 20,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Animated","SafeAreaView","StyleSheet","Text","View","Surface","withTheme","MaterialCommunityIcon","Icon","Fonts","DURATION_MEDIUM","SnackbarCustom","visible","duration","onDismiss","message","theme","current","opacity","useRef","Value","hidden","setHidden","useState","hideTimeout","undefined","scale","animation","useEffect","clearTimeout","useLayoutEffect","timing","toValue","useNativeDriver","start","finished","isInfinity","Number","POSITIVE_INFINITY","NEGATIVE_INFINITY","setTimeout","colors","roundness","styles","wrapper","container","borderRadius","transform","interpolate","inputRange","outputRange","backgroundColor","onSurface","main","messageStyle","create","position","bottom","width","elevation","flexDirection","justifyContent","alignItems","margin","padding","flex","marginStart","marginEnd","color","fontWeight","fontFamily","IBMPlexSans_600SemiBold"],"sources":["SnackBarCustom.tsx"],"sourcesContent":["import React from 'react';\nimport {\n Animated,\n SafeAreaView,\n StyleProp,\n StyleSheet,\n Text,\n View,\n ViewStyle,\n} from 'react-native';\nimport { Surface, withTheme } from 'react-native-paper';\nimport MaterialCommunityIcon from 'react-native-vector-icons/MaterialCommunityIcons';\nimport Icon from 'react-native-vector-icons/MaterialIcons';\nimport { Fonts } from '../../styles/executionTasks/CommonStyles';\n\nexport interface SnackbarProps {\n visible: boolean;\n duration?: number;\n /**\n * Callback called when Snackbar is dismissed. The `visible` prop needs to be updated when this is called.\n */\n onDismiss: () => void;\n /**\n * Text content of the Snackbar.\n */\n message: string;\n theme: ReactNativePaper.Theme;\n}\nconst DURATION_MEDIUM = 1000;\n\nconst SnackbarCustom = ({\n visible,\n duration = DURATION_MEDIUM,\n onDismiss,\n message,\n theme,\n}: SnackbarProps) => {\n const { current: opacity } = React.useRef<Animated.Value>(\n new Animated.Value(0.0)\n );\n const [hidden, setHidden] = React.useState<boolean>(!visible);\n\n const hideTimeout = React.useRef<NodeJS.Timeout | undefined>(undefined);\n const { scale } = theme.animation;\n\n React.useEffect(() => {\n return () => {\n if (hideTimeout.current) clearTimeout(hideTimeout.current);\n };\n }, []);\n\n React.useLayoutEffect(() => {\n if (visible) {\n // show\n if (hideTimeout.current) clearTimeout(hideTimeout.current);\n setHidden(false);\n Animated.timing(opacity, {\n toValue: 1,\n duration: 200 * scale,\n useNativeDriver: true,\n }).start(({ finished }) => {\n if (finished) {\n const isInfinity =\n duration === Number.POSITIVE_INFINITY ||\n duration === Number.NEGATIVE_INFINITY;\n\n if (finished && !isInfinity) {\n hideTimeout.current = setTimeout(\n onDismiss,\n duration\n ) as unknown as NodeJS.Timeout;\n }\n }\n });\n } else {\n // hide\n if (hideTimeout.current) clearTimeout(hideTimeout.current);\n\n Animated.timing(opacity, {\n toValue: 0,\n duration: 100 * scale,\n useNativeDriver: true,\n }).start(({ finished }) => {\n if (finished) setHidden(true);\n });\n }\n }, [visible, duration, opacity, scale, onDismiss]);\n\n const { colors, roundness } = theme;\n\n if (hidden) return null;\n\n return (\n <SafeAreaView pointerEvents=\"box-none\" style={[styles.wrapper]}>\n <Surface\n pointerEvents=\"box-none\"\n accessibilityLiveRegion=\"polite\"\n style={\n [\n styles.container,\n {\n borderRadius: roundness,\n opacity: opacity,\n transform: [\n {\n scale: visible\n ? opacity.interpolate({\n inputRange: [0, 1],\n outputRange: [0.9, 1],\n })\n : 1,\n },\n ],\n },\n { backgroundColor: colors.onSurface },\n ] as StyleProp<ViewStyle>\n }\n >\n <View style={styles.main}>\n <Icon name={'check-circle-outline'} color={'#ffffff'} size={24} />\n <Text style={styles.messageStyle}>{message}</Text>\n <MaterialCommunityIcon\n name={'close-circle-outline'}\n color={'#ffffff'}\n size={24}\n onPress={() => {\n setHidden(true);\n }}\n />\n </View>\n </Surface>\n </SafeAreaView>\n );\n};\n\nconst styles = StyleSheet.create({\n wrapper: {\n position: 'absolute',\n bottom: 110,\n width: '100%',\n },\n container: {\n elevation: 6,\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'center',\n margin: 8,\n borderRadius: 4,\n },\n main: {\n padding: 16,\n flexDirection: 'row',\n backgroundColor: '#10B981',\n flex: 1,\n },\n messageStyle: {\n flex: 1,\n marginStart: 20,\n marginEnd: 20,\n color: '#ffffff',\n fontWeight: '600',\n fontFamily: Fonts.IBMPlexSans_600SemiBold,\n },\n});\n\nexport default withTheme(SnackbarCustom);\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SACEC,QADF,EAEEC,YAFF,EAIEC,UAJF,EAKEC,IALF,EAMEC,IANF,QAQO,cARP;AASA,SAASC,OAAT,EAAkBC,SAAlB,QAAmC,oBAAnC;AACA,OAAOC,qBAAP,MAAkC,kDAAlC;AACA,OAAOC,IAAP,MAAiB,yCAAjB;AACA,SAASC,KAAT,QAAsB,0CAAtB;AAeA,MAAMC,eAAe,GAAG,IAAxB;;AAEA,MAAMC,cAAc,GAAG,QAMF;EAAA,IANG;IACtBC,OADsB;IAEtBC,QAAQ,GAAGH,eAFW;IAGtBI,SAHsB;IAItBC,OAJsB;IAKtBC;EALsB,CAMH;EACnB,MAAM;IAAEC,OAAO,EAAEC;EAAX,IAAuBnB,KAAK,CAACoB,MAAN,CAC3B,IAAInB,QAAQ,CAACoB,KAAb,CAAmB,GAAnB,CAD2B,CAA7B;EAGA,MAAM,CAACC,MAAD,EAASC,SAAT,IAAsBvB,KAAK,CAACwB,QAAN,CAAwB,CAACX,OAAzB,CAA5B;EAEA,MAAMY,WAAW,GAAGzB,KAAK,CAACoB,MAAN,CAAyCM,SAAzC,CAApB;EACA,MAAM;IAAEC;EAAF,IAAYV,KAAK,CAACW,SAAxB;EAEA5B,KAAK,CAAC6B,SAAN,CAAgB,MAAM;IACpB,OAAO,MAAM;MACX,IAAIJ,WAAW,CAACP,OAAhB,EAAyBY,YAAY,CAACL,WAAW,CAACP,OAAb,CAAZ;IAC1B,CAFD;EAGD,CAJD,EAIG,EAJH;EAMAlB,KAA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c,EAAE,eAHP;IAITC,UAAU,EAAE,QAJH;IAKTC,MAAM,EAAE,CALC;IAMTjB,YAAY,EAAE;EANL,CANoB;EAc/BO,IAAI,EAAE;IACJW,OAAO,EAAE,EADL;IAEJJ,aAAa,EAAE,KAFX;IAGJT,eAAe,EAAE,SAHb;IAIJc,IAAI,EAAE;EAJF,CAdyB;EAoB/BX,YAAY,EAAE;IACZW,IAAI,EAAE,CADM;IAEZC,WAAW,EAAE,EAFD;IAGZC,SAAS,EAAE,EAHC;IAIZC,KAAK,EAAE,SAJK;IAKZC,UAAU,EAAE,KALA;IAMZC,UAAU,EAAE7D,KAAK,CAAC8D;EANN;AApBiB,CAAlB,CAAf;AA8BA,eAAejE,SAAS,CAACK,cAAD,CAAxB"}
|
|
1
|
+
{"version":3,"names":["React","Animated","SafeAreaView","StyleSheet","Text","View","Surface","withTheme","AntDesign","Fonts","DURATION_MEDIUM","SnackBarType","SnackbarCustom","_ref","visible","duration","onDismiss","message","theme","type","customBottom","current","opacity","useRef","Value","hidden","setHidden","useState","hideTimeout","undefined","scale","animation","useEffect","clearTimeout","useLayoutEffect","timing","toValue","useNativeDriver","start","_ref2","finished","isInfinity","Number","POSITIVE_INFINITY","NEGATIVE_INFINITY","setTimeout","_ref3","colors","roundness","createElement","pointerEvents","style","styles","wrapper","bottom","accessibilityLiveRegion","container","borderRadius","transform","interpolate","inputRange","outputRange","backgroundColor","onSurface","FAILURE","fail","main","name","size","color","messageStyle","onPress","create","position","width","zIndex","elevation","flexDirection","justifyContent","alignItems","margin","padding","flex","marginStart","marginEnd","fontWeight","fontFamily","IBMPlexSans_600SemiBold"],"sources":["SnackBarCustom.tsx"],"sourcesContent":["import React from 'react';\nimport {\n Animated,\n SafeAreaView,\n StyleProp,\n StyleSheet,\n Text,\n View,\n ViewStyle,\n} from 'react-native';\nimport { Surface, withTheme } from 'react-native-paper';\nimport { AntDesign } from '@expo/vector-icons';\nimport { Fonts } from '../../styles/executionTasks/CommonStyles';\n\nexport interface SnackbarProps {\n visible: boolean;\n duration?: number;\n /**\n * Callback called when Snackbar is dismissed. The `visible` prop needs to be updated when this is called.\n */\n onDismiss: () => void;\n /**\n * Text content of the Snackbar.\n */\n message: string;\n type?: SnackBarType;\n theme: ReactNativePaper.Theme;\n customBottom?: number;\n}\nconst DURATION_MEDIUM = 1000;\n\nexport enum SnackBarType {\n SUCCESS,\n FAILURE,\n}\n\nconst SnackbarCustom = ({\n visible,\n duration = DURATION_MEDIUM,\n onDismiss,\n message,\n theme,\n type,\n customBottom = 110,\n}: SnackbarProps) => {\n const { current: opacity } = React.useRef<Animated.Value>(\n new Animated.Value(0.0)\n );\n const [hidden, setHidden] = React.useState<boolean>(!visible);\n\n const hideTimeout = React.useRef<NodeJS.Timeout | undefined>(undefined);\n const { scale } = theme.animation;\n\n React.useEffect(() => {\n return () => {\n if (hideTimeout.current) clearTimeout(hideTimeout.current);\n };\n }, []);\n\n React.useLayoutEffect(() => {\n if (visible) {\n // show\n if (hideTimeout.current) clearTimeout(hideTimeout.current);\n setHidden(false);\n Animated.timing(opacity, {\n toValue: 1,\n duration: 200 * scale,\n useNativeDriver: true,\n }).start(({ finished }) => {\n if (finished) {\n const isInfinity =\n duration === Number.POSITIVE_INFINITY ||\n duration === Number.NEGATIVE_INFINITY;\n\n if (finished && !isInfinity) {\n hideTimeout.current = setTimeout(\n onDismiss,\n duration\n ) as unknown as NodeJS.Timeout;\n }\n }\n });\n } else {\n // hide\n if (hideTimeout.current) clearTimeout(hideTimeout.current);\n\n Animated.timing(opacity, {\n toValue: 0,\n duration: 100 * scale,\n useNativeDriver: true,\n }).start(({ finished }) => {\n if (finished) setHidden(true);\n });\n }\n }, [visible, duration, opacity, scale, onDismiss]);\n\n const { colors, roundness } = theme;\n\n if (hidden) return null;\n\n if (!message) return null;\n\n return (\n <SafeAreaView\n pointerEvents=\"box-none\"\n style={[styles.wrapper, { bottom: customBottom }]}\n >\n <Surface\n pointerEvents=\"box-none\"\n accessibilityLiveRegion=\"polite\"\n style={\n [\n styles.container,\n {\n borderRadius: roundness,\n opacity: opacity,\n transform: [\n {\n scale: visible\n ? opacity.interpolate({\n inputRange: [0, 1],\n outputRange: [0.9, 1],\n })\n : 1,\n },\n ],\n },\n { backgroundColor: colors.onSurface },\n ] as StyleProp<ViewStyle>\n }\n >\n <View\n style={\n type && type === SnackBarType.FAILURE ? styles.fail : styles.main\n }\n >\n {type && type === SnackBarType.FAILURE ? (\n <AntDesign name=\"exclamationcircleo\" size={20} color=\"white\" />\n ) : (\n <AntDesign name=\"checkcircleo\" size={20} color=\"white\" />\n )}\n <Text style={styles.messageStyle}>{message}</Text>\n <AntDesign\n name=\"close\"\n size={16}\n color=\"white\"\n onPress={() => {\n setHidden(true);\n }}\n />\n </View>\n </Surface>\n </SafeAreaView>\n );\n};\n\nconst styles = StyleSheet.create({\n wrapper: {\n position: 'absolute',\n bottom: 110,\n width: '100%',\n zIndex: 1000,\n },\n container: {\n elevation: 6,\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'center',\n margin: 8,\n borderRadius: 4,\n },\n main: {\n padding: 16,\n flexDirection: 'row',\n alignItems: 'center',\n backgroundColor: '#10B981',\n flex: 1,\n },\n fail: {\n padding: 16,\n flexDirection: 'row',\n alignItems: 'center',\n backgroundColor: '#FA3A2E',\n flex: 1,\n },\n messageStyle: {\n flex: 1,\n marginStart: 20,\n marginEnd: 20,\n color: '#ffffff',\n fontWeight: '600',\n fontFamily: Fonts.IBMPlexSans_600SemiBold,\n },\n});\n\nexport default withTheme(SnackbarCustom);\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SACEC,QAAQ,EACRC,YAAY,EAEZC,UAAU,EACVC,IAAI,EACJC,IAAI,QAEC,cAAc;AACrB,SAASC,OAAO,EAAEC,SAAS,QAAQ,oBAAoB;AACvD,SAASC,SAAS,QAAQ,oBAAoB;AAC9C,SAASC,KAAK,QAAQ,0CAA0C;AAiBhE,MAAMC,eAAe,GAAG,IAAI;AAE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,MAAM,EAAE,GAAG;IACXoB,KAAK,EAAE,MAAM;IACbC,MAAM,EAAE;EACV,CAAC;EACDnB,SAAS,EAAE;IACToB,SAAS,EAAE,CAAC;IACZC,aAAa,EAAE,KAAK;IACpBC,cAAc,EAAE,eAAe;IAC/BC,UAAU,EAAE,QAAQ;IACpBC,MAAM,EAAE,CAAC;IACTvB,YAAY,EAAE;EAChB,CAAC;EACDS,IAAI,EAAE;IACJe,OAAO,EAAE,EAAE;IACXJ,aAAa,EAAE,KAAK;IACpBE,UAAU,EAAE,QAAQ;IACpBjB,eAAe,EAAE,SAAS;IAC1BoB,IAAI,EAAE;EACR,CAAC;EACDjB,IAAI,EAAE;IACJgB,OAAO,EAAE,EAAE;IACXJ,aAAa,EAAE,KAAK;IACpBE,UAAU,EAAE,QAAQ;IACpBjB,eAAe,EAAE,SAAS;IAC1BoB,IAAI,EAAE;EACR,CAAC;EACDZ,YAAY,EAAE;IACZY,IAAI,EAAE,CAAC;IACPC,WAAW,EAAE,EAAE;IACfC,SAAS,EAAE,EAAE;IACbf,KAAK,EAAE,SAAS;IAChBgB,UAAU,EAAE,KAAK;IACjBC,UAAU,EAAE7E,KAAK,CAAC8E;EACpB;AACF,CAAC,CAAC;AAEF,eAAehF,SAAS,CAACK,cAAc,CAAC"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { View, Text, Pressable, StyleSheet, TextInput } from 'react-native';
|
|
2
|
+
import React, { useRef, useState } from 'react';
|
|
3
|
+
const SplitTextInput = _ref => {
|
|
4
|
+
let {
|
|
5
|
+
styles,
|
|
6
|
+
value,
|
|
7
|
+
onChange,
|
|
8
|
+
maxLength,
|
|
9
|
+
keyboardType,
|
|
10
|
+
hasError
|
|
11
|
+
} = _ref;
|
|
12
|
+
const inputRef = useRef();
|
|
13
|
+
const boxArray = new Array(maxLength).fill(0);
|
|
14
|
+
const [isInputBoxFocused, setIsInputBoxFocused] = useState(false);
|
|
15
|
+
const handleOnPress = () => {
|
|
16
|
+
setIsInputBoxFocused(true);
|
|
17
|
+
inputRef.current.focus();
|
|
18
|
+
};
|
|
19
|
+
const handleOnBlur = () => {
|
|
20
|
+
setIsInputBoxFocused(false);
|
|
21
|
+
};
|
|
22
|
+
const boxDigit = (_, index) => {
|
|
23
|
+
const digit = value[index] || '';
|
|
24
|
+
const isCurrentValue = index === value.length;
|
|
25
|
+
const isLastValue = index === maxLength - 1;
|
|
26
|
+
const isCodeComplete = value.length === maxLength;
|
|
27
|
+
const isValueFocused = isCurrentValue || isLastValue && isCodeComplete;
|
|
28
|
+
const splitBoxesStyle = Boolean(hasError) ? widgetStyles.errorSplitBoxes : isInputBoxFocused && isValueFocused || value[index] ? widgetStyles.focusedSplitBoxes : widgetStyles.splitBoxes;
|
|
29
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
30
|
+
style: splitBoxesStyle,
|
|
31
|
+
key: index
|
|
32
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
33
|
+
style: styles
|
|
34
|
+
}, digit));
|
|
35
|
+
};
|
|
36
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Pressable, {
|
|
37
|
+
onPress: handleOnPress,
|
|
38
|
+
style: widgetStyles.splitContainer
|
|
39
|
+
}, boxArray.map(boxDigit)), /*#__PURE__*/React.createElement(TextInput, {
|
|
40
|
+
style: widgetStyles.textInputHidden,
|
|
41
|
+
value: value,
|
|
42
|
+
onChangeText: onChange,
|
|
43
|
+
maxLength: maxLength,
|
|
44
|
+
ref: inputRef,
|
|
45
|
+
onBlur: handleOnBlur,
|
|
46
|
+
keyboardType: keyboardType
|
|
47
|
+
}));
|
|
48
|
+
};
|
|
49
|
+
export default SplitTextInput;
|
|
50
|
+
const widgetStyles = StyleSheet.create({
|
|
51
|
+
splitContainer: {
|
|
52
|
+
width: '100%',
|
|
53
|
+
flexDirection: 'row',
|
|
54
|
+
justifyContent: 'space-evenly'
|
|
55
|
+
},
|
|
56
|
+
splitBoxes: {
|
|
57
|
+
borderColor: '#dddddd',
|
|
58
|
+
borderWidth: 2,
|
|
59
|
+
borderRadius: 5,
|
|
60
|
+
padding: 12,
|
|
61
|
+
minWidth: 50
|
|
62
|
+
},
|
|
63
|
+
focusedSplitBoxes: {
|
|
64
|
+
borderColor: '#666666',
|
|
65
|
+
borderWidth: 2,
|
|
66
|
+
borderRadius: 5,
|
|
67
|
+
padding: 12,
|
|
68
|
+
minWidth: 50
|
|
69
|
+
},
|
|
70
|
+
errorSplitBoxes: {
|
|
71
|
+
borderColor: '#DC2626',
|
|
72
|
+
borderWidth: 2,
|
|
73
|
+
borderRadius: 5,
|
|
74
|
+
padding: 12,
|
|
75
|
+
minWidth: 50
|
|
76
|
+
},
|
|
77
|
+
textInputHidden: {
|
|
78
|
+
height: 30,
|
|
79
|
+
width: 300,
|
|
80
|
+
position: 'absolute',
|
|
81
|
+
opacity: 0
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
//# sourceMappingURL=SplitTextInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["View","Text","Pressable","StyleSheet","TextInput","React","useRef","useState","SplitTextInput","_ref","styles","value","onChange","maxLength","keyboardType","hasError","inputRef","boxArray","Array","fill","isInputBoxFocused","setIsInputBoxFocused","handleOnPress","current","focus","handleOnBlur","boxDigit","_","index","digit","isCurrentValue","length","isLastValue","isCodeComplete","isValueFocused","splitBoxesStyle","Boolean","widgetStyles","errorSplitBoxes","focusedSplitBoxes","splitBoxes","createElement","style","key","Fragment","onPress","splitContainer","map","textInputHidden","onChangeText","ref","onBlur","create","width","flexDirection","justifyContent","borderColor","borderWidth","borderRadius","padding","minWidth","height","position","opacity"],"sources":["SplitTextInput.tsx"],"sourcesContent":["import {\n View,\n Text,\n Pressable,\n StyleSheet,\n TextInput,\n KeyboardTypeOptions,\n} from 'react-native';\nimport React, { useRef, useState } from 'react';\n\nexport interface SplitTextInputProps {\n styles: any;\n value: string;\n onChange: (text: string) => void;\n maxLength: number;\n keyboardType: KeyboardTypeOptions;\n hasError: boolean;\n}\n\nconst SplitTextInput = ({\n styles,\n value,\n onChange,\n maxLength,\n keyboardType,\n hasError,\n}: SplitTextInputProps) => {\n const inputRef: any = useRef();\n const boxArray = new Array(maxLength).fill(0);\n const [isInputBoxFocused, setIsInputBoxFocused] = useState(false);\n\n const handleOnPress = () => {\n setIsInputBoxFocused(true);\n inputRef.current.focus();\n };\n\n const handleOnBlur = () => {\n setIsInputBoxFocused(false);\n };\n\n const boxDigit = (_: number, index: number) => {\n const digit = value[index] || '';\n\n const isCurrentValue = index === value.length;\n const isLastValue = index === maxLength - 1;\n const isCodeComplete = value.length === maxLength;\n\n const isValueFocused = isCurrentValue || (isLastValue && isCodeComplete);\n\n const splitBoxesStyle = Boolean(hasError)\n ? widgetStyles.errorSplitBoxes\n : (isInputBoxFocused && isValueFocused) || value[index]\n ? widgetStyles.focusedSplitBoxes\n : widgetStyles.splitBoxes;\n\n return (\n <View style={splitBoxesStyle} key={index}>\n <Text style={styles}>{digit}</Text>\n </View>\n );\n };\n\n return (\n <>\n <Pressable onPress={handleOnPress} style={widgetStyles.splitContainer}>\n {boxArray.map(boxDigit)}\n </Pressable>\n <TextInput\n style={widgetStyles.textInputHidden}\n value={value}\n onChangeText={onChange}\n maxLength={maxLength}\n ref={inputRef}\n onBlur={handleOnBlur}\n keyboardType={keyboardType}\n />\n </>\n );\n};\n\nexport default SplitTextInput;\n\nconst widgetStyles = StyleSheet.create({\n splitContainer: {\n width: '100%',\n flexDirection: 'row',\n justifyContent: 'space-evenly',\n },\n splitBoxes: {\n borderColor: '#dddddd',\n borderWidth: 2,\n borderRadius: 5,\n padding: 12,\n minWidth: 50,\n },\n focusedSplitBoxes: {\n borderColor: '#666666',\n borderWidth: 2,\n borderRadius: 5,\n padding: 12,\n minWidth: 50,\n },\n errorSplitBoxes: {\n borderColor: '#DC2626',\n borderWidth: 2,\n borderRadius: 5,\n padding: 12,\n minWidth: 50,\n },\n textInputHidden: {\n height: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fC,OAAO,EAAE,EAAE;IACXC,QAAQ,EAAE;EACZ,CAAC;EACDtB,eAAe,EAAE;IACfkB,WAAW,EAAE,SAAS;IACtBC,WAAW,EAAE,CAAC;IACdC,YAAY,EAAE,CAAC;IACfC,OAAO,EAAE,EAAE;IACXC,QAAQ,EAAE;EACZ,CAAC;EACDZ,eAAe,EAAE;IACfa,MAAM,EAAE,EAAE;IACVR,KAAK,EAAE,GAAG;IACVS,QAAQ,EAAE,UAAU;IACpBC,OAAO,EAAE;EACX;AACF,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Alert","Platform","ToastAndroid","showToast","message","OS","show","SHORT","alert"],"sources":["Toaster.ts"],"sourcesContent":["import { Alert, Platform, ToastAndroid } from 'react-native';\n\nexport function showToast(message: string) {\n if (Platform.OS === 'android') ToastAndroid.show(message, ToastAndroid.SHORT);\n else {\n Alert.alert('Info', message);\n }\n}\n"],"mappings":"AAAA,SAASA,
|
|
1
|
+
{"version":3,"names":["Alert","Platform","ToastAndroid","showToast","message","OS","show","SHORT","alert"],"sources":["Toaster.ts"],"sourcesContent":["import { Alert, Platform, ToastAndroid } from 'react-native';\n\nexport function showToast(message: string) {\n if (Platform.OS === 'android') ToastAndroid.show(message, ToastAndroid.SHORT);\n else {\n Alert.alert('Info', message);\n }\n}\n"],"mappings":"AAAA,SAASA,KAAK,EAAEC,QAAQ,EAAEC,YAAY,QAAQ,cAAc;AAE5D,OAAO,SAASC,SAASA,CAACC,OAAe,EAAE;EACzC,IAAIH,QAAQ,CAACI,EAAE,KAAK,SAAS,EAAEH,YAAY,CAACI,IAAI,CAACF,OAAO,EAAEF,YAAY,CAACK,KAAK,CAAC,CAAC,KACzE;IACHP,KAAK,CAACQ,KAAK,CAAC,MAAM,EAAEJ,OAAO,CAAC;EAC9B;AACF"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
export let ERROR_TAGS
|
|
2
|
-
|
|
3
|
-
(function (ERROR_TAGS) {
|
|
1
|
+
export let ERROR_TAGS = /*#__PURE__*/function (ERROR_TAGS) {
|
|
4
2
|
ERROR_TAGS["FCM"] = "FCM";
|
|
5
3
|
ERROR_TAGS["EXECUTION_TASK"] = "EXECUTION_TASK";
|
|
6
|
-
|
|
4
|
+
return ERROR_TAGS;
|
|
5
|
+
}({});
|
|
7
6
|
//# sourceMappingURL=DispatchSDKConfig.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ERROR_TAGS"],"sources":["DispatchSDKConfig.ts"],"sourcesContent":["export const enum ERROR_TAGS {\n FCM = 'FCM',\n EXECUTION_TASK = 'EXECUTION_TASK',\n}\n"],"mappings":"AAAA,WAAkBA,
|
|
1
|
+
{"version":3,"names":["ERROR_TAGS"],"sources":["DispatchSDKConfig.ts"],"sourcesContent":["export const enum ERROR_TAGS {\n FCM = 'FCM',\n EXECUTION_TASK = 'EXECUTION_TASK',\n}\n"],"mappings":"AAAA,WAAkBA,UAAU,0BAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAA,OAAVA,UAAU;AAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ENDPOINTS","JOB_REMOVAL","dispatchId","API_CONFIG","timeout"],"sources":["apiConstants.ts"],"sourcesContent":["export const ENDPOINTS = {\n JOB_REMOVAL: (dispatchId: string) =>\n `/dispatches/${dispatchId}/multiple-jobs`,\n};\n\nexport const API_CONFIG = {\n timeout: 15000, // timeout in millis i.e 15s\n};\n"],"mappings":"AAAA,OAAO,MAAMA,SAAS,GAAG;EACvBC,WAAW,EAAGC,UAAkB,IAC7B,eAAcA,UAAW;AAC9B,CAAC;AAED,OAAO,MAAMC,UAAU,GAAG;EACxBC,OAAO,EAAE,KAAK,CAAE;AAClB,CAAC"}
|
|
@@ -3,8 +3,10 @@ export const DEFAULT_NOTIFICATION_TITLE = 'Dispatch Sync Manager';
|
|
|
3
3
|
export const DEFAULT_NOTIFICATION_DESCRIPTION = 'Syncing Events & Files';
|
|
4
4
|
export const DEFAULT_INTERVAL = 10000;
|
|
5
5
|
export const DEFAULT_PICKUP_TITLE = 'Pickup Order';
|
|
6
|
-
export const DEFAULT_PICKUP_MESSAGE = 'Confirm
|
|
6
|
+
export const DEFAULT_PICKUP_MESSAGE = 'Confirm Pickup of $ order(s)';
|
|
7
7
|
export const DEFAULT_DELIVER_TITLE = 'Drop Order';
|
|
8
|
-
export const DEFAULT_DELIVER_MESSAGE = 'Confirm
|
|
8
|
+
export const DEFAULT_DELIVER_MESSAGE = 'Confirm Drop of $ order(s)';
|
|
9
9
|
export const DEFAULT_SIGN_ET_MESSAGE = 'Please capture a clear signature from the customer';
|
|
10
|
+
export const REASON_NOT_USED = 'NOT_TO_BE_USED';
|
|
11
|
+
export const GO_BACK_EVENT_CODE = 'E-099';
|
|
10
12
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["LOCAL_STORAGE_KEY_PREFIX","DEFAULT_NOTIFICATION_TITLE","DEFAULT_NOTIFICATION_DESCRIPTION","DEFAULT_INTERVAL","DEFAULT_PICKUP_TITLE","DEFAULT_PICKUP_MESSAGE","DEFAULT_DELIVER_TITLE","DEFAULT_DELIVER_MESSAGE","DEFAULT_SIGN_ET_MESSAGE"],"sources":["constants.ts"],"sourcesContent":["export const LOCAL_STORAGE_KEY_PREFIX = '@dispatch-sdk:';\nexport const DEFAULT_NOTIFICATION_TITLE = 'Dispatch Sync Manager';\nexport const DEFAULT_NOTIFICATION_DESCRIPTION = 'Syncing Events & Files';\nexport const DEFAULT_INTERVAL = 10000;\nexport const DEFAULT_PICKUP_TITLE = 'Pickup Order'
|
|
1
|
+
{"version":3,"names":["LOCAL_STORAGE_KEY_PREFIX","DEFAULT_NOTIFICATION_TITLE","DEFAULT_NOTIFICATION_DESCRIPTION","DEFAULT_INTERVAL","DEFAULT_PICKUP_TITLE","DEFAULT_PICKUP_MESSAGE","DEFAULT_DELIVER_TITLE","DEFAULT_DELIVER_MESSAGE","DEFAULT_SIGN_ET_MESSAGE","REASON_NOT_USED","GO_BACK_EVENT_CODE"],"sources":["constants.ts"],"sourcesContent":["export const LOCAL_STORAGE_KEY_PREFIX = '@dispatch-sdk:';\nexport const DEFAULT_NOTIFICATION_TITLE = 'Dispatch Sync Manager';\nexport const DEFAULT_NOTIFICATION_DESCRIPTION = 'Syncing Events & Files';\nexport const DEFAULT_INTERVAL = 10000;\nexport const DEFAULT_PICKUP_TITLE = 'Pickup Order';\nexport const DEFAULT_PICKUP_MESSAGE = 'Confirm Pickup of $ order(s)';\nexport const DEFAULT_DELIVER_TITLE = 'Drop Order';\nexport const DEFAULT_DELIVER_MESSAGE = 'Confirm Drop of $ order(s)';\nexport const DEFAULT_SIGN_ET_MESSAGE =\n 'Please capture a clear signature from the customer';\nexport const REASON_NOT_USED = 'NOT_TO_BE_USED';\nexport const GO_BACK_EVENT_CODE = 'E-099';\n"],"mappings":"AAAA,OAAO,MAAMA,wBAAwB,GAAG,gBAAgB;AACxD,OAAO,MAAMC,0BAA0B,GAAG,uBAAuB;AACjE,OAAO,MAAMC,gCAAgC,GAAG,wBAAwB;AACxE,OAAO,MAAMC,gBAAgB,GAAG,KAAK;AACrC,OAAO,MAAMC,oBAAoB,GAAG,cAAc;AAClD,OAAO,MAAMC,sBAAsB,GAAG,8BAA8B;AACpE,OAAO,MAAMC,qBAAqB,GAAG,YAAY;AACjD,OAAO,MAAMC,uBAAuB,GAAG,4BAA4B;AACnE,OAAO,MAAMC,uBAAuB,GAClC,oDAAoD;AACtD,OAAO,MAAMC,eAAe,GAAG,gBAAgB;AAC/C,OAAO,MAAMC,kBAAkB,GAAG,OAAO"}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
var StatusCode
|
|
2
|
-
|
|
3
|
-
(function (StatusCode) {
|
|
1
|
+
var StatusCode = /*#__PURE__*/function (StatusCode) {
|
|
4
2
|
StatusCode[StatusCode["Unauthorized"] = 401] = "Unauthorized";
|
|
5
3
|
StatusCode[StatusCode["Forbidden"] = 403] = "Forbidden";
|
|
6
4
|
StatusCode[StatusCode["TooManyRequests"] = 429] = "TooManyRequests";
|
|
7
5
|
StatusCode[StatusCode["InternalServerError"] = 500] = "InternalServerError";
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
return StatusCode;
|
|
7
|
+
}(StatusCode || {});
|
|
10
8
|
export default StatusCode;
|
|
11
9
|
//# sourceMappingURL=statuscode.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["StatusCode"],"sources":["statuscode.ts"],"sourcesContent":["enum StatusCode {\n Unauthorized = 401,\n Forbidden = 403,\n TooManyRequests = 429,\n InternalServerError = 500,\n}\n\nexport default StatusCode;\n"],"mappings":"IAAKA,
|
|
1
|
+
{"version":3,"names":["StatusCode"],"sources":["statuscode.ts"],"sourcesContent":["enum StatusCode {\n Unauthorized = 401,\n Forbidden = 403,\n TooManyRequests = 429,\n InternalServerError = 500,\n}\n\nexport default StatusCode;\n"],"mappings":"IAAKA,UAAU,0BAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAA,OAAVA,UAAU;AAAA,EAAVA,UAAU;AAOf,eAAeA,UAAU"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
|
-
|
|
1
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
3
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
3
4
|
/**
|
|
4
5
|
* A general error class that should be used for all errors in Expo modules.
|
|
5
6
|
* Guarantees a `code` field that can be used to differentiate between different
|
|
@@ -8,14 +9,10 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
8
9
|
export class BaseError extends Error {
|
|
9
10
|
constructor(code, message, info) {
|
|
10
11
|
super(message);
|
|
11
|
-
|
|
12
12
|
_defineProperty(this, "code", void 0);
|
|
13
|
-
|
|
14
13
|
_defineProperty(this, "info", void 0);
|
|
15
|
-
|
|
16
14
|
this.code = code;
|
|
17
15
|
if (info) this.info = info;else this.info = message;
|
|
18
16
|
}
|
|
19
|
-
|
|
20
17
|
}
|
|
21
18
|
//# sourceMappingURL=BaseError.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BaseError","Error","constructor","code","message","info"],"sources":["BaseError.ts"],"sourcesContent":["/**\n * A general error class that should be used for all errors in Expo modules.\n * Guarantees a `code` field that can be used to differentiate between different\n * types of errors without further subclassing Error.\n */\nexport class BaseError extends Error {\n code: string;\n info?: any;\n\n constructor(code: string, message: string, info?: string) {\n super(message);\n this.code = code;\n if (info) this.info = info;\n else this.info = message;\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["BaseError","Error","constructor","code","message","info","_defineProperty"],"sources":["BaseError.ts"],"sourcesContent":["/**\n * A general error class that should be used for all errors in Expo modules.\n * Guarantees a `code` field that can be used to differentiate between different\n * types of errors without further subclassing Error.\n */\nexport class BaseError extends Error {\n code: string;\n info?: any;\n\n constructor(code: string, message: string, info?: string) {\n super(message);\n this.code = code;\n if (info) this.info = info;\n else this.info = message;\n }\n}\n"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,SAAS,SAASC,KAAK,CAAC;EAInCC,WAAWA,CAACC,IAAY,EAAEC,OAAe,EAAEC,IAAa,EAAE;IACxD,KAAK,CAACD,OAAO,CAAC;IAACE,eAAA;IAAAA,eAAA;IACf,IAAI,CAACH,IAAI,GAAGA,IAAI;IAChB,IAAIE,IAAI,EAAE,IAAI,CAACA,IAAI,GAAGA,IAAI,CAAC,KACtB,IAAI,CAACA,IAAI,GAAGD,OAAO;EAC1B;AACF"}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
var BaseErrorCodes
|
|
2
|
-
|
|
3
|
-
(function (BaseErrorCodes) {
|
|
1
|
+
var BaseErrorCodes = /*#__PURE__*/function (BaseErrorCodes) {
|
|
4
2
|
BaseErrorCodes["InvalidArgumentError"] = "100100";
|
|
5
3
|
BaseErrorCodes["InvalidBaseURL"] = "100101";
|
|
6
4
|
BaseErrorCodes["SyncManagerNotInitialized"] = "100102";
|
|
@@ -21,12 +19,14 @@ var BaseErrorCodes;
|
|
|
21
19
|
BaseErrorCodes["UNEXPECTED_ERROR"] = "100117";
|
|
22
20
|
BaseErrorCodes["SYSTEM_TIME_CHECK_FAILED"] = "100118";
|
|
23
21
|
BaseErrorCodes["ACCESS_TOKEN_EXPIRED"] = "100119";
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
BaseErrorCodes["MULTI_OBJECTIVE_ERROR"] = "100119";
|
|
23
|
+
return BaseErrorCodes;
|
|
24
|
+
}(BaseErrorCodes || {});
|
|
26
25
|
export const InvalidArgumentsError = 'Missing or invalid arguments';
|
|
27
26
|
export const InvalidBaseURL = 'URL is invalid';
|
|
28
27
|
export const SyncManagerNotInitialized = 'Sync Manager is not initialized.Please call init method first';
|
|
29
28
|
export const AppSyncInitError = "App sync Manager not initialized.Please call initSyncManager() with valid BASE URLs from your app's index file";
|
|
30
29
|
export const MissingOrInvalidProps = 'One or more prop(s) is missing or invalid';
|
|
30
|
+
export const MultiObjectiveError = 'Multiple objective not allowed as enableMultiObjectiveFlow is false.';
|
|
31
31
|
export default BaseErrorCodes;
|
|
32
32
|
//# sourceMappingURL=ErrorCodes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BaseErrorCodes","InvalidArgumentsError","InvalidBaseURL","SyncManagerNotInitialized","AppSyncInitError","MissingOrInvalidProps"],"sources":["ErrorCodes.ts"],"sourcesContent":["const enum BaseErrorCodes {\n InvalidArgumentError = '100100',\n InvalidBaseURL = '100101',\n SyncManagerNotInitialized = '100102',\n MissingOrInvalidProps = '100103',\n SQLiteDBIssue = '100104',\n AppSyncNotInitialized = '100105',\n FMS_FOLDER_CREATION_ERROR = '100106',\n REASON_CODE_API_ERROR = '100107',\n MERGING_ERROR = '100108',\n LOCATION_PERMISSION_DENIED = '100109',\n CAMERA_PERMISSION_DENIED = '100110',\n STORAGE_PERMISSION_DENIED = '100111',\n GRAPHQL_CLIENT_NOT_INITIALIZED = '100112',\n FMS_GRAPHQL_API_ERROR = '100113',\n INTERNET_NOT_ENABLED = '100114',\n LOCATION_OR_GPS_NOT_ENABLED = '100115',\n EXECUTION_ENGINE_ERROR = '100116',\n UNEXPECTED_ERROR = '100117',\n SYSTEM_TIME_CHECK_FAILED = '100118',\n ACCESS_TOKEN_EXPIRED = '100119',\n}\nexport const InvalidArgumentsError = 'Missing or invalid arguments';\nexport const InvalidBaseURL = 'URL is invalid';\nexport const SyncManagerNotInitialized =\n 'Sync Manager is not initialized.Please call init method first';\n\nexport const AppSyncInitError =\n \"App sync Manager not initialized.Please call initSyncManager() with valid BASE URLs from your app's index file\";\n\nexport const MissingOrInvalidProps =\n 'One or more prop(s) is missing or invalid';\n\nexport default BaseErrorCodes;\n"],"mappings":"IAAWA,
|
|
1
|
+
{"version":3,"names":["BaseErrorCodes","InvalidArgumentsError","InvalidBaseURL","SyncManagerNotInitialized","AppSyncInitError","MissingOrInvalidProps","MultiObjectiveError"],"sources":["ErrorCodes.ts"],"sourcesContent":["const enum BaseErrorCodes {\n InvalidArgumentError = '100100',\n InvalidBaseURL = '100101',\n SyncManagerNotInitialized = '100102',\n MissingOrInvalidProps = '100103',\n SQLiteDBIssue = '100104',\n AppSyncNotInitialized = '100105',\n FMS_FOLDER_CREATION_ERROR = '100106',\n REASON_CODE_API_ERROR = '100107',\n MERGING_ERROR = '100108',\n LOCATION_PERMISSION_DENIED = '100109',\n CAMERA_PERMISSION_DENIED = '100110',\n STORAGE_PERMISSION_DENIED = '100111',\n GRAPHQL_CLIENT_NOT_INITIALIZED = '100112',\n FMS_GRAPHQL_API_ERROR = '100113',\n INTERNET_NOT_ENABLED = '100114',\n LOCATION_OR_GPS_NOT_ENABLED = '100115',\n EXECUTION_ENGINE_ERROR = '100116',\n UNEXPECTED_ERROR = '100117',\n SYSTEM_TIME_CHECK_FAILED = '100118',\n ACCESS_TOKEN_EXPIRED = '100119',\n MULTI_OBJECTIVE_ERROR = '100119',\n}\nexport const InvalidArgumentsError = 'Missing or invalid arguments';\nexport const InvalidBaseURL = 'URL is invalid';\nexport const SyncManagerNotInitialized =\n 'Sync Manager is not initialized.Please call init method first';\n\nexport const AppSyncInitError =\n \"App sync Manager not initialized.Please call initSyncManager() with valid BASE URLs from your app's index file\";\n\nexport const MissingOrInvalidProps =\n 'One or more prop(s) is missing or invalid';\n\nexport const MultiObjectiveError =\n 'Multiple objective not allowed as enableMultiObjectiveFlow is false.';\n\nexport default BaseErrorCodes;\n"],"mappings":"IAAWA,cAAc,0BAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAA,OAAdA,cAAc;AAAA,EAAdA,cAAc;AAuBzB,OAAO,MAAMC,qBAAqB,GAAG,8BAA8B;AACnE,OAAO,MAAMC,cAAc,GAAG,gBAAgB;AAC9C,OAAO,MAAMC,yBAAyB,GACpC,+DAA+D;AAEjE,OAAO,MAAMC,gBAAgB,GAC3B,gHAAgH;AAElH,OAAO,MAAMC,qBAAqB,GAChC,2CAA2C;AAE7C,OAAO,MAAMC,mBAAmB,GAC9B,sEAAsE;AAExE,eAAeN,cAAc"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { NativeEventEmitter } from 'react-native';
|
|
2
|
+
import { BaseEvents } from './constants';
|
|
3
|
+
const eventEmitter = new NativeEventEmitter();
|
|
4
|
+
const events = (type, customEtName) => {
|
|
5
|
+
return `${BaseEvents[type]}:${customEtName}`;
|
|
6
|
+
};
|
|
7
|
+
export const dispatchStartEvent = (customEtName, data) => {
|
|
8
|
+
dispatchEvent('START', customEtName, data);
|
|
9
|
+
};
|
|
10
|
+
const dispatchEvent = (type, customEtName, data) => {
|
|
11
|
+
/* Logger.getInstance().logEvent(
|
|
12
|
+
'eventOutputData: ',
|
|
13
|
+
JSON.stringify({ type, customEtName, data }),
|
|
14
|
+
LOG_TYPE.SDK_INFO
|
|
15
|
+
); */
|
|
16
|
+
eventEmitter.emit(events(type, customEtName), data);
|
|
17
|
+
};
|
|
18
|
+
export default dispatchEvent;
|
|
19
|
+
//# sourceMappingURL=EventDispatcher.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["NativeEventEmitter","BaseEvents","eventEmitter","events","type","customEtName","dispatchStartEvent","data","dispatchEvent","emit"],"sources":["EventDispatcher.ts"],"sourcesContent":["import { NativeEventEmitter } from 'react-native';\nimport type { stateWithObjRef } from '../models/DispatchModels';\nimport { BaseEvents } from './constants';\nimport type { eventType } from './interface';\nimport Logger, { LOG_TYPE } from '../utils/Logger';\n\nconst eventEmitter = new NativeEventEmitter();\n\nconst events = (type: eventType, customEtName: string) => {\n return `${BaseEvents[type]}:${customEtName}`;\n};\n\nexport const dispatchStartEvent = (\n customEtName: string,\n data: stateWithObjRef[]\n) => {\n dispatchEvent('START', customEtName, data);\n};\n\nconst dispatchEvent = (type: eventType, customEtName: string, data: any) => {\n /* Logger.getInstance().logEvent(\n 'eventOutputData: ',\n JSON.stringify({ type, customEtName, data }),\n LOG_TYPE.SDK_INFO\n ); */\n eventEmitter.emit(events(type, customEtName), data);\n};\n\nexport default dispatchEvent;\n"],"mappings":"AAAA,SAASA,kBAAkB,QAAQ,cAAc;AAEjD,SAASC,UAAU,QAAQ,aAAa;AAIxC,MAAMC,YAAY,GAAG,IAAIF,kBAAkB,EAAE;AAE7C,MAAMG,MAAM,GAAGA,CAACC,IAAe,EAAEC,YAAoB,KAAK;EACxD,OAAQ,GAAEJ,UAAU,CAACG,IAAI,CAAE,IAAGC,YAAa,EAAC;AAC9C,CAAC;AAED,OAAO,MAAMC,kBAAkB,GAAGA,CAChCD,YAAoB,EACpBE,IAAuB,KACpB;EACHC,aAAa,CAAC,OAAO,EAAEH,YAAY,EAAEE,IAAI,CAAC;AAC5C,CAAC;AAED,MAAMC,aAAa,GAAGA,CAACJ,IAAe,EAAEC,YAAoB,EAAEE,IAAS,KAAK;EAC1E;AACF;AACA;AACA;AACA;EACEL,YAAY,CAACO,IAAI,CAACN,MAAM,CAACC,IAAI,EAAEC,YAAY,CAAC,EAAEE,IAAI,CAAC;AACrD,CAAC;AAED,eAAeC,aAAa"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { DeviceEventEmitter } from 'react-native';
|
|
2
|
+
const eventListener = {
|
|
3
|
+
on(event, callback) {
|
|
4
|
+
DeviceEventEmitter.addListener(event, e => {
|
|
5
|
+
callback(e);
|
|
6
|
+
});
|
|
7
|
+
},
|
|
8
|
+
remove(event) {
|
|
9
|
+
DeviceEventEmitter.removeAllListeners(event);
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
export default eventListener;
|
|
13
|
+
//# sourceMappingURL=EventListener.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["DeviceEventEmitter","eventListener","on","event","callback","addListener","e","remove","removeAllListeners"],"sources":["EventListener.ts"],"sourcesContent":["import { DeviceEventEmitter } from 'react-native';\n\nconst eventListener = {\n on(event: string, callback: Function) {\n DeviceEventEmitter.addListener(event, (e: any) => {\n callback(e);\n });\n },\n remove(event: string) {\n DeviceEventEmitter.removeAllListeners(event);\n },\n};\n\nexport default eventListener;\n"],"mappings":"AAAA,SAASA,kBAAkB,QAAQ,cAAc;AAEjD,MAAMC,aAAa,GAAG;EACpBC,EAAEA,CAACC,KAAa,EAAEC,QAAkB,EAAE;IACpCJ,kBAAkB,CAACK,WAAW,CAACF,KAAK,EAAGG,CAAM,IAAK;MAChDF,QAAQ,CAACE,CAAC,CAAC;IACb,CAAC,CAAC;EACJ,CAAC;EACDC,MAAMA,CAACJ,KAAa,EAAE;IACpBH,kBAAkB,CAACQ,kBAAkB,CAACL,KAAK,CAAC;EAC9C;AACF,CAAC;AAED,eAAeF,aAAa"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["BaseEvents","START","END","BACK"],"sources":["constants.ts"],"sourcesContent":["export const BaseEvents = {\n START: `onTaskStart`,\n END: `onTaskEnd`,\n BACK: `onTaskBack`,\n};\n"],"mappings":"AAAA,OAAO,MAAMA,UAAU,GAAG;EACxBC,KAAK,EAAG,aAAY;EACpBC,GAAG,EAAG,WAAU;EAChBC,IAAI,EAAG;AACT,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["EventListener"],"sources":["index.ts"],"sourcesContent":["import EventListener from './EventListener';\n\nexport default EventListener;\n"],"mappings":"AAAA,OAAOA,aAAa,MAAM,iBAAiB;AAE3C,eAAeA,aAAa"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["interface.ts"],"sourcesContent":["export type eventType = 'START' | 'END' | 'BACK';\n"],"mappings":""}
|
package/lib/module/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Storage from './utils/storage';
|
|
2
2
|
import * as ExecutionTask from './components/executiontasks/ExecutionTasksIndex';
|
|
3
|
-
import * as MtsSdk from '@
|
|
3
|
+
import * as MtsSdk from '@foxtrotplatform/platform-coreos-mts-sdk';
|
|
4
4
|
import NativeSyncManager from './manager/syncmanager/NativeSyncManager';
|
|
5
5
|
import { SyncMethod } from './manager/syncmanager/DBConfig';
|
|
6
6
|
import CancelOrderDialog from './components/widgets/CancelOrderDialog';
|
|
@@ -8,14 +8,15 @@ import useFCMMessage, { getFCMToken, registerBackgroundHandler, requestFirebaseP
|
|
|
8
8
|
import FCM from './utils/fcm/FCM';
|
|
9
9
|
import DispatchExecNavigator from './components/dispatch/DispatchExecNavigator';
|
|
10
10
|
import DispatchStateContainer from './manager/dispatch/DispatchStateContainer';
|
|
11
|
-
import { objectiveExecutionStatus, ObjectiveNotFoundError } from 'mobile-execution-lib';
|
|
11
|
+
import { objectiveExecutionStatus, ObjectiveNotFoundError } from '@os1-platform/mobile-execution-lib';
|
|
12
12
|
import { DispatchSDKManager } from './manager/sdk/DispatchSDKManager';
|
|
13
13
|
import Logger, { LOG_TYPE } from './utils/Logger';
|
|
14
14
|
import SdkUtils from './utils/SdkUtils';
|
|
15
15
|
import AppSyncManager from './manager/syncmanager/AppSyncManager';
|
|
16
16
|
import { SdkSyncType } from './models/DispatchModels';
|
|
17
|
+
import EventListener from './events';
|
|
17
18
|
export { Storage, DispatchExecNavigator };
|
|
18
|
-
export { NativeSyncManager, AppSyncManager, SdkSyncType, useFCMMessage, getFCMToken, requestFirebasePermissions, FCM, registerBackgroundHandler, DispatchStateContainer, SdkUtils, Logger, LOG_TYPE };
|
|
19
|
+
export { NativeSyncManager, AppSyncManager, SdkSyncType, useFCMMessage, getFCMToken, requestFirebasePermissions, FCM, registerBackgroundHandler, DispatchStateContainer, SdkUtils, Logger, LOG_TYPE, EventListener };
|
|
19
20
|
export { SyncMethod };
|
|
20
21
|
export { ExecutionTask, CancelOrderDialog };
|
|
21
22
|
export { objectiveExecutionStatus, ObjectiveNotFoundError };
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Storage","ExecutionTask","MtsSdk","NativeSyncManager","SyncMethod","CancelOrderDialog","useFCMMessage","getFCMToken","registerBackgroundHandler","requestFirebasePermissions","FCM","DispatchExecNavigator","DispatchStateContainer","objectiveExecutionStatus","ObjectiveNotFoundError","DispatchSDKManager","Logger","LOG_TYPE","SdkUtils","AppSyncManager","SdkSyncType"],"sources":["index.tsx"],"sourcesContent":["import Storage from './utils/storage';\nimport type * as ETaskSchema from './components/executiontasks/ExecutionTasksIndex';\nimport * as ExecutionTask from './components/executiontasks/ExecutionTasksIndex';\nimport type {
|
|
1
|
+
{"version":3,"names":["Storage","ExecutionTask","MtsSdk","NativeSyncManager","SyncMethod","CancelOrderDialog","useFCMMessage","getFCMToken","registerBackgroundHandler","requestFirebasePermissions","FCM","DispatchExecNavigator","DispatchStateContainer","objectiveExecutionStatus","ObjectiveNotFoundError","DispatchSDKManager","Logger","LOG_TYPE","SdkUtils","AppSyncManager","SdkSyncType","EventListener"],"sources":["index.tsx"],"sourcesContent":["import Storage from './utils/storage';\nimport type * as ETaskSchema from './components/executiontasks/ExecutionTasksIndex';\nimport * as ExecutionTask from './components/executiontasks/ExecutionTasksIndex';\nimport type {\n MTSInitRequest,\n MTSStartRequest,\n} from '@foxtrotplatform/platform-coreos-mts-sdk';\nimport * as MtsSdk from '@foxtrotplatform/platform-coreos-mts-sdk';\nimport NativeSyncManager from './manager/syncmanager/NativeSyncManager';\nimport type { DocumentRow, EventRow } from './manager/syncmanager/DBConfig';\nimport { SyncMethod } from './manager/syncmanager/DBConfig';\nimport CancelOrderDialog from './components/widgets/CancelOrderDialog';\nimport useFCMMessage, {\n getFCMToken,\n registerBackgroundHandler,\n requestFirebasePermissions,\n} from './utils/fcm/FcmUtils';\nimport FCM from './utils/fcm/FCM';\nimport DispatchExecNavigator from './components/dispatch/DispatchExecNavigator';\nimport DispatchStateContainer from './manager/dispatch/DispatchStateContainer';\nimport {\n objectiveExecutionStatus,\n ObjectiveNotFoundError,\n} from '@os1-platform/mobile-execution-lib';\nimport { DispatchSDKManager } from './manager/sdk/DispatchSDKManager';\nimport Logger, { LOG_TYPE } from './utils/Logger';\nimport type {\n ETSummary,\n CompleteSummary,\n} from './models/execTasks/ETBaseModels';\nimport SdkUtils from './utils/SdkUtils';\nimport AppSyncManager from './manager/syncmanager/AppSyncManager';\nimport type { JobObjectiveType } from './models/DispatchModels';\nimport { SdkSyncType } from './models/DispatchModels';\nimport EventListener from './events';\n\nexport { Storage, DispatchExecNavigator };\nexport { ETSummary, CompleteSummary };\nexport {\n NativeSyncManager,\n AppSyncManager,\n SdkSyncType,\n EventRow,\n DocumentRow,\n useFCMMessage,\n getFCMToken,\n requestFirebasePermissions,\n FCM,\n registerBackgroundHandler,\n DispatchStateContainer,\n SdkUtils,\n Logger,\n LOG_TYPE,\n EventListener,\n};\n\nexport { SyncMethod, JobObjectiveType };\nexport type { ETaskSchema };\nexport { ExecutionTask, CancelOrderDialog };\nexport { objectiveExecutionStatus, ObjectiveNotFoundError };\nexport { DispatchSDKManager };\n\nexport type { MTSStartRequest, MTSInitRequest };\nexport { MtsSdk };\n"],"mappings":"AAAA,OAAOA,OAAO,MAAM,iBAAiB;AAErC,OAAO,KAAKC,aAAa,MAAM,iDAAiD;AAKhF,OAAO,KAAKC,MAAM,MAAM,0CAA0C;AAClE,OAAOC,iBAAiB,MAAM,yCAAyC;AAEvE,SAASC,UAAU,QAAQ,gCAAgC;AAC3D,OAAOC,iBAAiB,MAAM,wCAAwC;AACtE,OAAOC,aAAa,IAClBC,WAAW,EACXC,yBAAyB,EACzBC,0BAA0B,QACrB,sBAAsB;AAC7B,OAAOC,GAAG,MAAM,iBAAiB;AACjC,OAAOC,qBAAqB,MAAM,6CAA6C;AAC/E,OAAOC,sBAAsB,MAAM,2CAA2C;AAC9E,SACEC,wBAAwB,EACxBC,sBAAsB,QACjB,oCAAoC;AAC3C,SAASC,kBAAkB,QAAQ,kCAAkC;AACrE,OAAOC,MAAM,IAAIC,QAAQ,QAAQ,gBAAgB;AAKjD,OAAOC,QAAQ,MAAM,kBAAkB;AACvC,OAAOC,cAAc,MAAM,sCAAsC;AAEjE,SAASC,WAAW,QAAQ,yBAAyB;AACrD,OAAOC,aAAa,MAAM,UAAU;AAEpC,SAASrB,OAAO,EAAEW,qBAAqB;AAEvC,SACER,iBAAiB,EACjBgB,cAAc,EACdC,WAAW,EAGXd,aAAa,EACbC,WAAW,EACXE,0BAA0B,EAC1BC,GAAG,EACHF,yBAAyB,EACzBI,sBAAsB,EACtBM,QAAQ,EACRF,MAAM,EACNC,QAAQ,EACRI,aAAa;AAGf,SAASjB,UAAU;AAEnB,SAASH,aAAa,EAAEI,iBAAiB;AACzC,SAASQ,wBAAwB,EAAEC,sBAAsB;AACzD,SAASC,kBAAkB;AAG3B,SAASb,MAAM"}
|