@os1-platform/dispatch-mobile 1.0.8 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +310 -74
- package/android/.gradle/7.0.2/fileChanges/last-build.bin +0 -0
- package/android/.gradle/7.0.2/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/7.0.2/gc.properties +0 -0
- package/android/.gradle/7.2/dependencies-accessors/dependencies-accessors.lock +0 -0
- package/android/.gradle/7.2/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/7.2/executionHistory/executionHistory.bin +0 -0
- package/android/.gradle/7.2/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/7.2/fileChanges/last-build.bin +0 -0
- package/android/.gradle/7.2/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/7.2/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/7.2/fileHashes/resourceHashesCache.bin +0 -0
- package/android/.gradle/7.2/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
- package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
- package/android/.gradle/checksums/checksums.lock +0 -0
- package/android/.gradle/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/checksums/sha1-checksums.bin +0 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/.idea/compiler.xml +6 -0
- package/android/.idea/gradle.xml +18 -0
- package/android/.idea/jarRepositories.xml +35 -0
- package/android/.idea/kotlinc.xml +6 -0
- package/android/.idea/misc.xml +9 -0
- package/android/.idea/vcs.xml +6 -0
- package/android/gradle.properties +1 -1
- package/android/local.properties +8 -0
- package/android/src/main/AndroidManifest.xml +0 -1
- package/android/src/main/java/com/dispatchsdk/DispatchSdkPackage.kt +3 -1
- package/android/src/main/java/com/dispatchsdk/sharedPref/SharedPreferenceModule.kt +166 -0
- package/lib/commonjs/@types/assets/index.d.js +2 -0
- package/lib/commonjs/@types/assets/index.d.js.map +1 -0
- package/lib/commonjs/components/dispatch/DispatchExecNavigator.js +50 -43
- package/lib/commonjs/components/dispatch/DispatchExecNavigator.js.map +1 -1
- package/lib/commonjs/components/executiontasks/ExecutionTasksIndex.js +10 -48
- package/lib/commonjs/components/executiontasks/ExecutionTasksIndex.js.map +1 -1
- package/lib/commonjs/components/executiontasks/cancellation/CancelET.js +142 -23
- package/lib/commonjs/components/executiontasks/cancellation/CancelET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/cancellation/CancellationSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js +66 -18
- package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js.map +1 -1
- package/lib/commonjs/components/executiontasks/captureInput/utils.js +13 -0
- package/lib/commonjs/components/executiontasks/captureInput/utils.js.map +1 -0
- package/lib/commonjs/components/executiontasks/deliver/DeliverET.js +6 -16
- package/lib/commonjs/components/executiontasks/deliver/DeliverET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/deliver/DeliverETInput.js.map +1 -1
- package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js +212 -95
- package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/display/DisplayModalET.js +16 -25
- package/lib/commonjs/components/executiontasks/display/DisplayModalET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/doodle/SignatureET.js +65 -29
- package/lib/commonjs/components/executiontasks/doodle/SignatureET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/dropCash/DropCashET.js +5 -19
- package/lib/commonjs/components/executiontasks/dropCash/DropCashET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js +74 -30
- package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/FormGenerator.js +139 -50
- package/lib/commonjs/components/executiontasks/forms/FormGenerator.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/DateTimeWidget.js +3 -26
- package/lib/commonjs/components/executiontasks/forms/widgets/DateTimeWidget.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/DropdownWidget.js +49 -0
- package/lib/commonjs/components/executiontasks/forms/widgets/DropdownWidget.js.map +1 -0
- package/lib/commonjs/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js +2 -17
- package/lib/commonjs/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/TimeRangeSelector.js +0 -10
- package/lib/commonjs/components/executiontasks/forms/widgets/TimeRangeSelector.js.map +1 -1
- package/lib/commonjs/components/executiontasks/httpRequest/HttpEtUtils.js +5 -14
- package/lib/commonjs/components/executiontasks/httpRequest/HttpEtUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/httpRequest/HttpRequestET.js +3 -15
- package/lib/commonjs/components/executiontasks/httpRequest/HttpRequestET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/imageCapture/CaptureSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js +11 -36
- package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js +73 -48
- package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/PaymentStyles.js +0 -4
- package/lib/commonjs/components/executiontasks/payments/PaymentStyles.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/PaymentUtils.js +0 -2
- package/lib/commonjs/components/executiontasks/payments/PaymentUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js +76 -29
- package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js +63 -24
- package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js +71 -22
- package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/pickup/PickupET.js +5 -15
- package/lib/commonjs/components/executiontasks/pickup/PickupET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js +138 -32
- package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/ScanET.js +741 -0
- package/lib/commonjs/components/executiontasks/scan/ScanET.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/ScanSchema.js +19 -0
- package/lib/commonjs/components/executiontasks/scan/ScanSchema.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/constants.js +19 -0
- package/lib/commonjs/components/executiontasks/scan/constants.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/interfaces.js +43 -0
- package/lib/commonjs/components/executiontasks/scan/interfaces.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/modalConstant.js +104 -0
- package/lib/commonjs/components/executiontasks/scan/modalConstant.js.map +1 -0
- package/lib/commonjs/components/executiontasks/{scanner → scan/sub_components}/CScanner.js +9 -29
- package/lib/commonjs/components/executiontasks/scan/sub_components/CScanner.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/DropDownUtils.js +109 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/DropDownUtils.js.map +1 -0
- package/lib/commonjs/components/executiontasks/{scanner/returns/ReasonDropDown.js → scan/sub_components/ERDropDown.js} +72 -55
- package/lib/commonjs/components/executiontasks/scan/sub_components/ERDropDown.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/SummaryPage.js +1099 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/SummaryPage.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/utils.js +762 -0
- package/lib/commonjs/components/executiontasks/scan/utils.js.map +1 -0
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPET.js +333 -0
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPET.js.map +1 -0
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPSchema.js +14 -0
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPSchema.js.map +1 -0
- package/lib/commonjs/components/executiontasks/validateOTP/constants.js +37 -0
- package/lib/commonjs/components/executiontasks/validateOTP/constants.js.map +1 -0
- package/lib/commonjs/components/executiontasks/validateOTP/sub-components/OTPInput.js +63 -0
- package/lib/commonjs/components/executiontasks/validateOTP/sub-components/OTPInput.js.map +1 -0
- package/lib/commonjs/components/executiontasks/validateOTP/utils.js +147 -0
- package/lib/commonjs/components/executiontasks/validateOTP/utils.js.map +1 -0
- package/lib/commonjs/components/executiontasks/verifyLocation/GeofenceUtils.js +0 -13
- package/lib/commonjs/components/executiontasks/verifyLocation/GeofenceUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/verifyLocation/VerifyLocationET.js +4 -17
- package/lib/commonjs/components/executiontasks/verifyLocation/VerifyLocationET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpET.js +3 -18
- package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpSchema.js.map +1 -1
- package/lib/commonjs/components/utils/index.js +14 -0
- package/lib/commonjs/components/utils/index.js.map +1 -0
- package/lib/commonjs/components/widgets/AlertDisplay.js +0 -5
- package/lib/commonjs/components/widgets/AlertDisplay.js.map +1 -1
- package/lib/commonjs/components/widgets/CancelOrderDialog.js +0 -12
- package/lib/commonjs/components/widgets/CancelOrderDialog.js.map +1 -1
- package/lib/commonjs/components/widgets/Card.js +88 -0
- package/lib/commonjs/components/widgets/Card.js.map +1 -0
- package/lib/commonjs/components/widgets/GoBackModal.js +48 -0
- package/lib/commonjs/components/widgets/GoBackModal.js.map +1 -0
- package/lib/commonjs/components/widgets/IconButton.js +34 -0
- package/lib/commonjs/components/widgets/IconButton.js.map +1 -0
- package/lib/commonjs/components/widgets/ModalWidget.js +99 -0
- package/lib/commonjs/components/widgets/ModalWidget.js.map +1 -0
- package/lib/commonjs/components/widgets/ProgressDialog.js +0 -7
- package/lib/commonjs/components/widgets/ProgressDialog.js.map +1 -1
- package/lib/commonjs/components/widgets/SearchBar.js +74 -0
- package/lib/commonjs/components/widgets/SearchBar.js.map +1 -0
- package/lib/commonjs/components/widgets/SnackBarCustom.js +48 -40
- package/lib/commonjs/components/widgets/SnackBarCustom.js.map +1 -1
- package/lib/commonjs/components/widgets/SplitTextInput.js +93 -0
- package/lib/commonjs/components/widgets/SplitTextInput.js.map +1 -0
- package/lib/commonjs/components/widgets/TabsComponent.js +64 -0
- package/lib/commonjs/components/widgets/TabsComponent.js.map +1 -0
- package/lib/commonjs/components/widgets/Toaster.js +0 -2
- package/lib/commonjs/components/widgets/Toaster.js.map +1 -1
- package/lib/commonjs/config/DispatchSDKConfig.js +4 -5
- package/lib/commonjs/config/DispatchSDKConfig.js.map +1 -1
- package/lib/commonjs/constants/apiConstants.js +17 -0
- package/lib/commonjs/constants/apiConstants.js.map +1 -0
- package/lib/commonjs/constants/constants.js +7 -3
- package/lib/commonjs/constants/constants.js.map +1 -1
- package/lib/commonjs/constants/statuscode.js +3 -5
- package/lib/commonjs/constants/statuscode.js.map +1 -1
- package/lib/commonjs/errors/BaseError.js +3 -8
- package/lib/commonjs/errors/BaseError.js.map +1 -1
- package/lib/commonjs/errors/ErrorCodes.js +7 -6
- package/lib/commonjs/errors/ErrorCodes.js.map +1 -1
- package/lib/commonjs/events/EventDispatcher.js +23 -0
- package/lib/commonjs/events/EventDispatcher.js.map +1 -0
- package/lib/commonjs/events/EventListener.js +20 -0
- package/lib/commonjs/events/EventListener.js.map +1 -0
- package/lib/commonjs/events/constants.js +15 -0
- package/lib/commonjs/events/constants.js.map +1 -0
- package/lib/commonjs/events/index.js +11 -0
- package/lib/commonjs/events/index.js.map +1 -0
- package/lib/commonjs/events/interface.js +2 -0
- package/lib/commonjs/events/interface.js.map +1 -0
- package/lib/commonjs/index.js +40 -35
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/manager/dispatch/DispatchStateContainer.js +328 -272
- package/lib/commonjs/manager/dispatch/DispatchStateContainer.js.map +1 -1
- package/lib/commonjs/manager/dispatchCodes/EventCodeContainer.js +55 -4
- package/lib/commonjs/manager/dispatchCodes/EventCodeContainer.js.map +1 -1
- package/lib/commonjs/manager/dispatchCodes/EventCodeRepo.js +70 -0
- package/lib/commonjs/manager/dispatchCodes/EventCodeRepo.js.map +1 -0
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeContainer.js +3 -29
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeContainer.js.map +1 -1
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeRepo.js +6 -20
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeRepo.js.map +1 -1
- package/lib/commonjs/manager/jobRemoval/JobRemovalManager.js +23 -0
- package/lib/commonjs/manager/jobRemoval/JobRemovalManager.js.map +1 -0
- package/lib/commonjs/manager/location/LocationManager.js +3 -20
- package/lib/commonjs/manager/location/LocationManager.js.map +1 -1
- package/lib/commonjs/manager/sdk/DispatchSDKManager.js +23 -37
- package/lib/commonjs/manager/sdk/DispatchSDKManager.js.map +1 -1
- package/lib/commonjs/manager/sdk/DispatchSdkCache.js +6 -17
- package/lib/commonjs/manager/sdk/DispatchSdkCache.js.map +1 -1
- package/lib/commonjs/manager/sdk/callbacksHandler.js +26 -0
- package/lib/commonjs/manager/sdk/callbacksHandler.js.map +1 -0
- package/lib/commonjs/manager/syncmanager/AppSyncManager.js +26 -46
- package/lib/commonjs/manager/syncmanager/AppSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/DBConfig.js +48 -9
- package/lib/commonjs/manager/syncmanager/DBConfig.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/NativeSyncManager.js +0 -2
- package/lib/commonjs/manager/syncmanager/NativeSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/constants.js +17 -0
- package/lib/commonjs/manager/syncmanager/constants.js.map +1 -0
- package/lib/commonjs/manager/syncmanager/database.js +28 -12
- package/lib/commonjs/manager/syncmanager/database.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js +11 -36
- package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentManager.js +8 -26
- package/lib/commonjs/manager/syncmanager/document/DocumentManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js +19 -58
- package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/events/ETEventsManager.js +414 -29
- package/lib/commonjs/manager/syncmanager/events/ETEventsManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/events/EventsSyncManager.js +208 -103
- package/lib/commonjs/manager/syncmanager/events/EventsSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/events/SyncHttpClient.js +157 -36
- package/lib/commonjs/manager/syncmanager/events/SyncHttpClient.js.map +1 -1
- package/lib/commonjs/models/DispatchModels.js +4 -5
- package/lib/commonjs/models/DispatchModels.js.map +1 -1
- package/lib/commonjs/models/ReasonCodes.js.map +1 -1
- package/lib/commonjs/models/execTasks/ETBaseModels.js +4 -0
- package/lib/commonjs/models/execTasks/ETBaseModels.js.map +1 -1
- package/lib/commonjs/models/execTasks/ETConfig.js +28 -35
- package/lib/commonjs/models/execTasks/ETConfig.js.map +1 -1
- package/lib/commonjs/models/sdk.js +4 -5
- package/lib/commonjs/models/sdk.js.map +1 -1
- package/lib/commonjs/native/signature/SignatureCapture.js +3 -24
- package/lib/commonjs/native/signature/SignatureCapture.js.map +1 -1
- package/lib/commonjs/network/GraphQLClient.js +7 -35
- package/lib/commonjs/network/GraphQLClient.js.map +1 -1
- package/lib/commonjs/network/NetworkClient.js +2 -13
- package/lib/commonjs/network/NetworkClient.js.map +1 -1
- package/lib/commonjs/network/NetworkUtils.js +10 -8
- package/lib/commonjs/network/NetworkUtils.js.map +1 -1
- package/lib/commonjs/network/Queries.js +0 -2
- package/lib/commonjs/network/Queries.js.map +1 -1
- package/lib/commonjs/network/client.js +6 -21
- package/lib/commonjs/network/client.js.map +1 -1
- package/lib/commonjs/res/strings.js.map +1 -1
- package/lib/commonjs/resources/Login.js +4 -15
- package/lib/commonjs/resources/Login.js.map +1 -1
- package/lib/commonjs/resources/network.js +3 -8
- package/lib/commonjs/resources/network.js.map +1 -1
- package/lib/commonjs/styles/SdkColors.js +10 -8
- package/lib/commonjs/styles/SdkColors.js.map +1 -1
- package/lib/commonjs/styles/executionTasks/CommonStyles.js +58 -25
- package/lib/commonjs/styles/executionTasks/CommonStyles.js.map +1 -1
- package/lib/commonjs/ui/screens/CancellationScreen.js +67 -27
- package/lib/commonjs/ui/screens/CancellationScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/CaptureInputScreen.js +15 -16
- package/lib/commonjs/ui/screens/CaptureInputScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/CompleteObjectiveScreen.js +11 -23
- package/lib/commonjs/ui/screens/CompleteObjectiveScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DeliverScreen.js +30 -17
- package/lib/commonjs/ui/screens/DeliverScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DisplayScreen.js +17 -13
- package/lib/commonjs/ui/screens/DisplayScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DoodleScreen.js +17 -20
- package/lib/commonjs/ui/screens/DoodleScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DropCashScreen.js +43 -31
- package/lib/commonjs/ui/screens/DropCashScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ETScreensIndex.js +10 -19
- package/lib/commonjs/ui/screens/ETScreensIndex.js.map +1 -1
- package/lib/commonjs/ui/screens/FormsScreen.js +105 -17
- package/lib/commonjs/ui/screens/FormsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/GeofenceScreen.js +16 -14
- package/lib/commonjs/ui/screens/GeofenceScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HttpRequestScreen.js +14 -11
- package/lib/commonjs/ui/screens/HttpRequestScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ImageCaptureScreen.js +38 -17
- package/lib/commonjs/ui/screens/ImageCaptureScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PaymentScreen.js +28 -29
- package/lib/commonjs/ui/screens/PaymentScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PickupScreen.js +41 -19
- package/lib/commonjs/ui/screens/PickupScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ScanScreen.js +121 -0
- package/lib/commonjs/ui/screens/ScanScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/StartWorkFlowScreen.js +64 -38
- package/lib/commonjs/ui/screens/StartWorkFlowScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ValidateOTPScreen.js +55 -0
- package/lib/commonjs/ui/screens/ValidateOTPScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/WithBaseDispatchScreen.js +0 -10
- package/lib/commonjs/ui/screens/WithBaseDispatchScreen.js.map +1 -1
- package/lib/commonjs/ui/uiConfig/RouteParams.js +24 -1
- package/lib/commonjs/ui/uiConfig/RouteParams.js.map +1 -1
- package/lib/commonjs/utils/ApiUtils.js +129 -0
- package/lib/commonjs/utils/ApiUtils.js.map +1 -0
- package/lib/commonjs/utils/ExecTaskUtils.js +111 -41
- package/lib/commonjs/utils/ExecTaskUtils.js.map +1 -1
- package/lib/commonjs/utils/Logger.js +10 -29
- package/lib/commonjs/utils/Logger.js.map +1 -1
- package/lib/commonjs/utils/NetworkUtil.js +3 -19
- package/lib/commonjs/utils/NetworkUtil.js.map +1 -1
- package/lib/commonjs/utils/SdkUtils.js +2 -31
- package/lib/commonjs/utils/SdkUtils.js.map +1 -1
- package/lib/commonjs/utils/SyncManagerUtils.js +61 -43
- package/lib/commonjs/utils/SyncManagerUtils.js.map +1 -1
- package/lib/commonjs/utils/fcm/FCM.js +59 -11
- package/lib/commonjs/utils/fcm/FCM.js.map +1 -1
- package/lib/commonjs/utils/fcm/FcmUtils.js +82 -21
- package/lib/commonjs/utils/fcm/FcmUtils.js.map +1 -1
- package/lib/commonjs/utils/helper.js +0 -5
- package/lib/commonjs/utils/helper.js.map +1 -1
- package/lib/commonjs/utils/hooks/useModal.js +53 -0
- package/lib/commonjs/utils/hooks/useModal.js.map +1 -0
- package/lib/commonjs/utils/hooks/useTimer.js +44 -0
- package/lib/commonjs/utils/hooks/useTimer.js.map +1 -0
- package/lib/commonjs/utils/loginHelper.js +6 -18
- package/lib/commonjs/utils/loginHelper.js.map +1 -1
- package/lib/commonjs/utils/storage.js +87 -31
- package/lib/commonjs/utils/storage.js.map +1 -1
- package/lib/commonjs/utils/utils.js +8 -11
- package/lib/commonjs/utils/utils.js.map +1 -1
- package/lib/module/@types/assets/index.d.js +2 -0
- package/lib/module/@types/assets/index.d.js.map +1 -0
- package/lib/module/components/dispatch/DispatchExecNavigator.js +50 -32
- package/lib/module/components/dispatch/DispatchExecNavigator.js.map +1 -1
- package/lib/module/components/executiontasks/ExecutionTasksIndex.js +3 -5
- package/lib/module/components/executiontasks/ExecutionTasksIndex.js.map +1 -1
- package/lib/module/components/executiontasks/cancellation/CancelET.js +145 -19
- package/lib/module/components/executiontasks/cancellation/CancelET.js.map +1 -1
- package/lib/module/components/executiontasks/cancellation/CancellationSchema.js.map +1 -1
- package/lib/module/components/executiontasks/captureInput/CaptureText.js +68 -10
- package/lib/module/components/executiontasks/captureInput/CaptureText.js.map +1 -1
- package/lib/module/components/executiontasks/captureInput/utils.js +7 -0
- package/lib/module/components/executiontasks/captureInput/utils.js.map +1 -0
- package/lib/module/components/executiontasks/deliver/DeliverET.js +6 -7
- package/lib/module/components/executiontasks/deliver/DeliverET.js.map +1 -1
- package/lib/module/components/executiontasks/deliver/DeliverETInput.js.map +1 -1
- package/lib/module/components/executiontasks/deliver/SLDeliverET.js +214 -86
- package/lib/module/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
- package/lib/module/components/executiontasks/display/DisplayModalET.js +16 -15
- package/lib/module/components/executiontasks/display/DisplayModalET.js.map +1 -1
- package/lib/module/components/executiontasks/doodle/SignatureET.js +68 -15
- package/lib/module/components/executiontasks/doodle/SignatureET.js.map +1 -1
- package/lib/module/components/executiontasks/dropCash/DropCashET.js +5 -6
- package/lib/module/components/executiontasks/dropCash/DropCashET.js.map +1 -1
- package/lib/module/components/executiontasks/dropCash/SLDropCash.js +75 -20
- package/lib/module/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
- package/lib/module/components/executiontasks/forms/FormGenerator.js +142 -37
- package/lib/module/components/executiontasks/forms/FormGenerator.js.map +1 -1
- package/lib/module/components/executiontasks/forms/widgets/DateTimeWidget.js +3 -15
- package/lib/module/components/executiontasks/forms/widgets/DateTimeWidget.js.map +1 -1
- package/lib/module/components/executiontasks/forms/widgets/DropdownWidget.js +39 -0
- package/lib/module/components/executiontasks/forms/widgets/DropdownWidget.js.map +1 -0
- package/lib/module/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js +2 -6
- package/lib/module/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js.map +1 -1
- package/lib/module/components/executiontasks/forms/widgets/TimeRangeSelector.js +0 -3
- package/lib/module/components/executiontasks/forms/widgets/TimeRangeSelector.js.map +1 -1
- package/lib/module/components/executiontasks/httpRequest/HttpEtUtils.js +6 -4
- package/lib/module/components/executiontasks/httpRequest/HttpEtUtils.js.map +1 -1
- package/lib/module/components/executiontasks/httpRequest/HttpRequestET.js +3 -6
- package/lib/module/components/executiontasks/httpRequest/HttpRequestET.js.map +1 -1
- package/lib/module/components/executiontasks/imageCapture/CaptureSchema.js.map +1 -1
- package/lib/module/components/executiontasks/imageCapture/CaptureUtils.js +11 -11
- package/lib/module/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
- package/lib/module/components/executiontasks/imageCapture/ImageCapture.js +75 -35
- package/lib/module/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
- package/lib/module/components/executiontasks/payments/PaymentStyles.js.map +1 -1
- package/lib/module/components/executiontasks/payments/PaymentUtils.js.map +1 -1
- package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentET.js +77 -18
- package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
- package/lib/module/components/executiontasks/payments/init/InitPaymentET.js +64 -11
- package/lib/module/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
- package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentET.js +72 -11
- package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
- package/lib/module/components/executiontasks/pickup/PickupET.js +5 -6
- package/lib/module/components/executiontasks/pickup/PickupET.js.map +1 -1
- package/lib/module/components/executiontasks/pickup/SLPickupET.js +141 -25
- package/lib/module/components/executiontasks/pickup/SLPickupET.js.map +1 -1
- package/lib/module/components/executiontasks/scan/ScanET.js +732 -0
- package/lib/module/components/executiontasks/scan/ScanET.js.map +1 -0
- package/lib/module/components/executiontasks/scan/ScanSchema.js +17 -0
- package/lib/module/components/executiontasks/scan/ScanSchema.js.map +1 -0
- package/lib/module/components/executiontasks/scan/constants.js +7 -0
- package/lib/module/components/executiontasks/scan/constants.js.map +1 -0
- package/lib/module/components/executiontasks/scan/interfaces.js +33 -0
- package/lib/module/components/executiontasks/scan/interfaces.js.map +1 -0
- package/lib/module/components/executiontasks/scan/modalConstant.js +94 -0
- package/lib/module/components/executiontasks/scan/modalConstant.js.map +1 -0
- package/lib/module/components/executiontasks/{scanner → scan/sub_components}/CScanner.js +9 -16
- package/lib/module/components/executiontasks/scan/sub_components/CScanner.js.map +1 -0
- package/lib/module/components/executiontasks/scan/sub_components/DropDownUtils.js +101 -0
- package/lib/module/components/executiontasks/scan/sub_components/DropDownUtils.js.map +1 -0
- package/lib/module/components/executiontasks/scan/sub_components/ERDropDown.js +107 -0
- package/lib/module/components/executiontasks/scan/sub_components/ERDropDown.js.map +1 -0
- package/lib/module/components/executiontasks/scan/sub_components/SummaryPage.js +1092 -0
- package/lib/module/components/executiontasks/scan/sub_components/SummaryPage.js.map +1 -0
- package/lib/module/components/executiontasks/scan/utils.js +726 -0
- package/lib/module/components/executiontasks/scan/utils.js.map +1 -0
- package/lib/module/components/executiontasks/validateOTP/ValidateOTPET.js +324 -0
- package/lib/module/components/executiontasks/validateOTP/ValidateOTPET.js.map +1 -0
- package/lib/module/components/executiontasks/validateOTP/ValidateOTPSchema.js +8 -0
- package/lib/module/components/executiontasks/validateOTP/ValidateOTPSchema.js.map +1 -0
- package/lib/module/components/executiontasks/validateOTP/constants.js +25 -0
- package/lib/module/components/executiontasks/validateOTP/constants.js.map +1 -0
- package/lib/module/components/executiontasks/validateOTP/sub-components/OTPInput.js +53 -0
- package/lib/module/components/executiontasks/validateOTP/sub-components/OTPInput.js.map +1 -0
- package/lib/module/components/executiontasks/validateOTP/utils.js +133 -0
- package/lib/module/components/executiontasks/validateOTP/utils.js.map +1 -0
- package/lib/module/components/executiontasks/verifyLocation/GeofenceUtils.js +0 -6
- package/lib/module/components/executiontasks/verifyLocation/GeofenceUtils.js.map +1 -1
- package/lib/module/components/executiontasks/verifyLocation/VerifyLocationET.js +4 -3
- package/lib/module/components/executiontasks/verifyLocation/VerifyLocationET.js.map +1 -1
- package/lib/module/components/executiontasks/verifyOtp/VerifyOtpET.js +5 -9
- package/lib/module/components/executiontasks/verifyOtp/VerifyOtpET.js.map +1 -1
- package/lib/module/components/executiontasks/verifyOtp/VerifyOtpSchema.js.map +1 -1
- package/lib/module/components/utils/index.js +8 -0
- package/lib/module/components/utils/index.js.map +1 -0
- package/lib/module/components/widgets/AlertDisplay.js.map +1 -1
- package/lib/module/components/widgets/CancelOrderDialog.js +0 -2
- package/lib/module/components/widgets/CancelOrderDialog.js.map +1 -1
- package/lib/module/components/widgets/Card.js +80 -0
- package/lib/module/components/widgets/Card.js.map +1 -0
- package/lib/module/components/widgets/GoBackModal.js +40 -0
- package/lib/module/components/widgets/GoBackModal.js.map +1 -0
- package/lib/module/components/widgets/IconButton.js +26 -0
- package/lib/module/components/widgets/IconButton.js.map +1 -0
- package/lib/module/components/widgets/ModalWidget.js +92 -0
- package/lib/module/components/widgets/ModalWidget.js.map +1 -0
- package/lib/module/components/widgets/ProgressDialog.js +0 -2
- package/lib/module/components/widgets/ProgressDialog.js.map +1 -1
- package/lib/module/components/widgets/SearchBar.js +66 -0
- package/lib/module/components/widgets/SearchBar.js.map +1 -0
- package/lib/module/components/widgets/SnackBarCustom.js +46 -20
- package/lib/module/components/widgets/SnackBarCustom.js.map +1 -1
- package/lib/module/components/widgets/SplitTextInput.js +84 -0
- package/lib/module/components/widgets/SplitTextInput.js.map +1 -0
- package/lib/module/components/widgets/TabsComponent.js +55 -0
- package/lib/module/components/widgets/TabsComponent.js.map +1 -0
- package/lib/module/components/widgets/Toaster.js.map +1 -1
- package/lib/module/config/DispatchSDKConfig.js +3 -4
- package/lib/module/config/DispatchSDKConfig.js.map +1 -1
- package/lib/module/constants/apiConstants.js +9 -0
- package/lib/module/constants/apiConstants.js.map +1 -0
- package/lib/module/constants/constants.js +4 -2
- package/lib/module/constants/constants.js.map +1 -1
- package/lib/module/constants/statuscode.js +3 -5
- package/lib/module/constants/statuscode.js.map +1 -1
- package/lib/module/errors/BaseError.js +3 -6
- package/lib/module/errors/BaseError.js.map +1 -1
- package/lib/module/errors/ErrorCodes.js +5 -5
- package/lib/module/errors/ErrorCodes.js.map +1 -1
- package/lib/module/events/EventDispatcher.js +16 -0
- package/lib/module/events/EventDispatcher.js.map +1 -0
- package/lib/module/events/EventListener.js +13 -0
- package/lib/module/events/EventListener.js.map +1 -0
- package/lib/module/events/constants.js +8 -0
- package/lib/module/events/constants.js.map +1 -0
- package/lib/module/events/index.js +3 -0
- package/lib/module/events/index.js.map +1 -0
- package/lib/module/events/interface.js +2 -0
- package/lib/module/events/interface.js.map +1 -0
- package/lib/module/index.js +9 -5
- package/lib/module/index.js.map +1 -1
- package/lib/module/manager/dispatch/DispatchStateContainer.js +334 -247
- package/lib/module/manager/dispatch/DispatchStateContainer.js.map +1 -1
- package/lib/module/manager/dispatchCodes/EventCodeContainer.js +52 -2
- package/lib/module/manager/dispatchCodes/EventCodeContainer.js.map +1 -1
- package/lib/module/manager/dispatchCodes/EventCodeRepo.js +61 -0
- package/lib/module/manager/dispatchCodes/EventCodeRepo.js.map +1 -0
- package/lib/module/manager/dispatchCodes/ReasonCodeContainer.js +3 -16
- package/lib/module/manager/dispatchCodes/ReasonCodeContainer.js.map +1 -1
- package/lib/module/manager/dispatchCodes/ReasonCodeRepo.js +6 -14
- package/lib/module/manager/dispatchCodes/ReasonCodeRepo.js.map +1 -1
- package/lib/module/manager/jobRemoval/JobRemovalManager.js +22 -0
- package/lib/module/manager/jobRemoval/JobRemovalManager.js.map +1 -0
- package/lib/module/manager/location/LocationManager.js +3 -14
- package/lib/module/manager/location/LocationManager.js.map +1 -1
- package/lib/module/manager/sdk/DispatchSDKManager.js +23 -15
- package/lib/module/manager/sdk/DispatchSDKManager.js.map +1 -1
- package/lib/module/manager/sdk/DispatchSdkCache.js +6 -13
- package/lib/module/manager/sdk/DispatchSdkCache.js.map +1 -1
- package/lib/module/manager/sdk/callbacksHandler.js +19 -0
- package/lib/module/manager/sdk/callbacksHandler.js.map +1 -0
- package/lib/module/manager/syncmanager/AppSyncManager.js +26 -26
- package/lib/module/manager/syncmanager/AppSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/DBConfig.js +41 -7
- package/lib/module/manager/syncmanager/DBConfig.js.map +1 -1
- package/lib/module/manager/syncmanager/NativeSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/constants.js +6 -0
- package/lib/module/manager/syncmanager/constants.js.map +1 -0
- package/lib/module/manager/syncmanager/database.js +27 -3
- package/lib/module/manager/syncmanager/database.js.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentHttpClient.js +11 -24
- package/lib/module/manager/syncmanager/document/DocumentHttpClient.js.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentManager.js +8 -20
- package/lib/module/manager/syncmanager/document/DocumentManager.js.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentSyncManager.js +19 -41
- package/lib/module/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/events/ETEventsManager.js +415 -22
- package/lib/module/manager/syncmanager/events/ETEventsManager.js.map +1 -1
- package/lib/module/manager/syncmanager/events/EventsSyncManager.js +209 -82
- package/lib/module/manager/syncmanager/events/EventsSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/events/SyncHttpClient.js +152 -24
- package/lib/module/manager/syncmanager/events/SyncHttpClient.js.map +1 -1
- package/lib/module/models/DispatchModels.js +3 -4
- package/lib/module/models/DispatchModels.js.map +1 -1
- package/lib/module/models/ReasonCodes.js.map +1 -1
- package/lib/module/models/execTasks/ETBaseModels.js +1 -1
- package/lib/module/models/execTasks/ETBaseModels.js.map +1 -1
- package/lib/module/models/execTasks/ETConfig.js +22 -29
- package/lib/module/models/execTasks/ETConfig.js.map +1 -1
- package/lib/module/models/sdk.js +3 -4
- package/lib/module/models/sdk.js.map +1 -1
- package/lib/module/native/signature/SignatureCapture.js +3 -18
- package/lib/module/native/signature/SignatureCapture.js.map +1 -1
- package/lib/module/network/GraphQLClient.js +6 -26
- package/lib/module/network/GraphQLClient.js.map +1 -1
- package/lib/module/network/NetworkClient.js +2 -6
- package/lib/module/network/NetworkClient.js.map +1 -1
- package/lib/module/network/NetworkUtils.js +10 -3
- package/lib/module/network/NetworkUtils.js.map +1 -1
- package/lib/module/network/Queries.js.map +1 -1
- package/lib/module/network/client.js +7 -17
- package/lib/module/network/client.js.map +1 -1
- package/lib/module/res/strings.js.map +1 -1
- package/lib/module/resources/Login.js +4 -13
- package/lib/module/resources/Login.js.map +1 -1
- package/lib/module/resources/network.js +3 -6
- package/lib/module/resources/network.js.map +1 -1
- package/lib/module/styles/SdkColors.js +9 -7
- package/lib/module/styles/SdkColors.js.map +1 -1
- package/lib/module/styles/executionTasks/CommonStyles.js +57 -14
- package/lib/module/styles/executionTasks/CommonStyles.js.map +1 -1
- package/lib/module/ui/screens/CancellationScreen.js +68 -15
- package/lib/module/ui/screens/CancellationScreen.js.map +1 -1
- package/lib/module/ui/screens/CaptureInputScreen.js +17 -6
- package/lib/module/ui/screens/CaptureInputScreen.js.map +1 -1
- package/lib/module/ui/screens/CompleteObjectiveScreen.js +12 -8
- package/lib/module/ui/screens/CompleteObjectiveScreen.js.map +1 -1
- package/lib/module/ui/screens/DeliverScreen.js +32 -7
- package/lib/module/ui/screens/DeliverScreen.js.map +1 -1
- package/lib/module/ui/screens/DisplayScreen.js +16 -6
- package/lib/module/ui/screens/DisplayScreen.js.map +1 -1
- package/lib/module/ui/screens/DoodleScreen.js +19 -9
- package/lib/module/ui/screens/DoodleScreen.js.map +1 -1
- package/lib/module/ui/screens/DropCashScreen.js +45 -19
- package/lib/module/ui/screens/DropCashScreen.js.map +1 -1
- package/lib/module/ui/screens/ETScreensIndex.js +3 -2
- package/lib/module/ui/screens/ETScreensIndex.js.map +1 -1
- package/lib/module/ui/screens/FormsScreen.js +104 -9
- package/lib/module/ui/screens/FormsScreen.js.map +1 -1
- package/lib/module/ui/screens/GeofenceScreen.js +15 -6
- package/lib/module/ui/screens/GeofenceScreen.js.map +1 -1
- package/lib/module/ui/screens/HttpRequestScreen.js +15 -5
- package/lib/module/ui/screens/HttpRequestScreen.js.map +1 -1
- package/lib/module/ui/screens/ImageCaptureScreen.js +37 -9
- package/lib/module/ui/screens/ImageCaptureScreen.js.map +1 -1
- package/lib/module/ui/screens/PaymentScreen.js +30 -17
- package/lib/module/ui/screens/PaymentScreen.js.map +1 -1
- package/lib/module/ui/screens/PickupScreen.js +40 -12
- package/lib/module/ui/screens/PickupScreen.js.map +1 -1
- package/lib/module/ui/screens/ScanScreen.js +111 -0
- package/lib/module/ui/screens/ScanScreen.js.map +1 -0
- package/lib/module/ui/screens/StartWorkFlowScreen.js +64 -16
- package/lib/module/ui/screens/StartWorkFlowScreen.js.map +1 -1
- package/lib/module/ui/screens/ValidateOTPScreen.js +45 -0
- package/lib/module/ui/screens/ValidateOTPScreen.js.map +1 -0
- package/lib/module/ui/screens/WithBaseDispatchScreen.js +0 -3
- package/lib/module/ui/screens/WithBaseDispatchScreen.js.map +1 -1
- package/lib/module/ui/uiConfig/RouteParams.js +23 -1
- package/lib/module/ui/uiConfig/RouteParams.js.map +1 -1
- package/lib/module/utils/ApiUtils.js +116 -0
- package/lib/module/utils/ApiUtils.js.map +1 -0
- package/lib/module/utils/ExecTaskUtils.js +110 -31
- package/lib/module/utils/ExecTaskUtils.js.map +1 -1
- package/lib/module/utils/Logger.js +9 -21
- package/lib/module/utils/Logger.js.map +1 -1
- package/lib/module/utils/NetworkUtil.js +3 -15
- package/lib/module/utils/NetworkUtil.js.map +1 -1
- package/lib/module/utils/SdkUtils.js +2 -15
- package/lib/module/utils/SdkUtils.js.map +1 -1
- package/lib/module/utils/SyncManagerUtils.js +62 -14
- package/lib/module/utils/SyncManagerUtils.js.map +1 -1
- package/lib/module/utils/fcm/FCM.js +63 -3
- package/lib/module/utils/fcm/FCM.js.map +1 -1
- package/lib/module/utils/fcm/FcmUtils.js +86 -7
- package/lib/module/utils/fcm/FcmUtils.js.map +1 -1
- package/lib/module/utils/helper.js +0 -3
- package/lib/module/utils/helper.js.map +1 -1
- package/lib/module/utils/hooks/useModal.js +43 -0
- package/lib/module/utils/hooks/useModal.js.map +1 -0
- package/lib/module/utils/hooks/useTimer.js +37 -0
- package/lib/module/utils/hooks/useTimer.js.map +1 -0
- package/lib/module/utils/loginHelper.js +6 -16
- package/lib/module/utils/loginHelper.js.map +1 -1
- package/lib/module/utils/storage.js +86 -29
- package/lib/module/utils/storage.js.map +1 -1
- package/lib/module/utils/utils.js +8 -6
- package/lib/module/utils/utils.js.map +1 -1
- package/lib/typescript/components/dispatch/DispatchExecNavigator.d.ts +2 -2
- package/lib/typescript/components/executiontasks/CompletedWFSchema.d.ts +2 -2
- package/lib/typescript/components/executiontasks/ExecutionTasksIndex.d.ts +6 -7
- package/lib/typescript/components/executiontasks/cancellation/CancelET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/cancellation/CancellationSchema.d.ts +10 -5
- package/lib/typescript/components/executiontasks/captureInput/CaptureInputSchema.d.ts +7 -7
- package/lib/typescript/components/executiontasks/captureInput/CaptureText.d.ts +2 -2
- package/lib/typescript/components/executiontasks/captureInput/utils.d.ts +1 -0
- package/lib/typescript/components/executiontasks/deliver/DeliverET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/deliver/DeliverETInput.d.ts +8 -7
- package/lib/typescript/components/executiontasks/deliver/SLDeliverET.d.ts +3 -3
- package/lib/typescript/components/executiontasks/display/DisplayModalET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/display/DisplaySchema.d.ts +5 -5
- package/lib/typescript/components/executiontasks/doodle/SignatureET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/doodle/SignatureSchema.d.ts +7 -7
- package/lib/typescript/components/executiontasks/dropCash/DropCashET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/dropCash/DropCashSchema.d.ts +2 -2
- package/lib/typescript/components/executiontasks/dropCash/SLDropCash.d.ts +2 -2
- package/lib/typescript/components/executiontasks/forms/FormGenerator.d.ts +2 -2
- package/lib/typescript/components/executiontasks/forms/FormSchema.d.ts +2 -2
- package/lib/typescript/components/executiontasks/forms/widgets/DateTimeWidget.d.ts +3 -3
- package/lib/typescript/components/executiontasks/forms/widgets/DropdownWidget.d.ts +9 -0
- package/lib/typescript/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.d.ts +2 -2
- package/lib/typescript/components/executiontasks/forms/widgets/TimeRangeSelector.d.ts +2 -2
- package/lib/typescript/components/executiontasks/httpRequest/HttpEtUtils.d.ts +1 -1
- package/lib/typescript/components/executiontasks/httpRequest/HttpRequestET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/httpRequest/HttpRequestETSchema.d.ts +6 -6
- package/lib/typescript/components/executiontasks/imageCapture/CaptureSchema.d.ts +17 -11
- package/lib/typescript/components/executiontasks/imageCapture/ImageCapture.d.ts +2 -2
- package/lib/typescript/components/executiontasks/payments/completePayment/CompletePaymentET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/payments/completePayment/CompletePaymentSchema.d.ts +2 -2
- package/lib/typescript/components/executiontasks/payments/init/InitPaymentET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/payments/init/InitPaymentSchema.d.ts +3 -3
- package/lib/typescript/components/executiontasks/payments/processPayment/ProcessPaymentET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/payments/processPayment/ProcessPaymentSchema.d.ts +2 -2
- package/lib/typescript/components/executiontasks/pickup/PickpSchema.d.ts +3 -3
- package/lib/typescript/components/executiontasks/pickup/PickupET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/pickup/SLPickupET.d.ts +3 -3
- package/lib/typescript/components/executiontasks/scan/ScanET.d.ts +16 -0
- package/lib/typescript/components/executiontasks/scan/ScanSchema.d.ts +86 -0
- package/lib/typescript/components/executiontasks/scan/constants.d.ts +6 -0
- package/lib/typescript/components/executiontasks/scan/interfaces.d.ts +94 -0
- package/lib/typescript/components/executiontasks/scan/modalConstant.d.ts +37 -0
- package/lib/typescript/components/executiontasks/{scanner → scan/sub_components}/CScanner.d.ts +1 -1
- package/lib/typescript/components/executiontasks/scan/sub_components/DropDownUtils.d.ts +7 -0
- package/lib/typescript/components/executiontasks/scan/sub_components/ERDropDown.d.ts +17 -0
- package/lib/typescript/components/executiontasks/scan/sub_components/SummaryPage.d.ts +21 -0
- package/lib/typescript/components/executiontasks/scan/utils.d.ts +37 -0
- package/lib/typescript/components/executiontasks/validateOTP/ValidateOTPET.d.ts +4 -0
- package/lib/typescript/components/executiontasks/validateOTP/ValidateOTPSchema.d.ts +54 -0
- package/lib/typescript/components/executiontasks/validateOTP/constants.d.ts +10 -0
- package/lib/typescript/components/executiontasks/validateOTP/sub-components/OTPInput.d.ts +12 -0
- package/lib/typescript/components/executiontasks/validateOTP/utils.d.ts +7 -0
- package/lib/typescript/components/executiontasks/verifyInput/VerifyInputSchema.d.ts +8 -8
- package/lib/typescript/components/executiontasks/verifyLocation/VerifyLocSchema.d.ts +9 -9
- package/lib/typescript/components/executiontasks/verifyLocation/VerifyLocationET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/verifyOtp/VerifyOtpET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/verifyOtp/VerifyOtpSchema.d.ts +6 -6
- package/lib/typescript/components/utils/index.d.ts +2 -0
- package/lib/typescript/components/widgets/CancelOrderDialog.d.ts +2 -2
- package/lib/typescript/components/widgets/Card.d.ts +17 -0
- package/lib/typescript/components/widgets/GoBackModal.d.ts +9 -0
- package/lib/typescript/components/widgets/IconButton.d.ts +9 -0
- package/lib/typescript/components/widgets/ModalWidget.d.ts +30 -0
- package/lib/typescript/components/widgets/ProgressDialog.d.ts +2 -2
- package/lib/typescript/components/widgets/SearchBar.d.ts +10 -0
- package/lib/typescript/components/widgets/SnackBarCustom.d.ts +10 -5
- package/lib/typescript/components/widgets/SplitTextInput.d.ts +12 -0
- package/lib/typescript/components/widgets/TabsComponent.d.ts +15 -0
- package/lib/typescript/constants/apiConstants.d.ts +7 -0
- package/lib/typescript/constants/constants.d.ts +4 -2
- package/lib/typescript/errors/ErrorCodes.d.ts +3 -1
- package/lib/typescript/events/EventDispatcher.d.ts +3 -0
- package/lib/typescript/events/EventListener.d.ts +5 -0
- package/lib/typescript/events/constants.d.ts +7 -0
- package/lib/typescript/events/index.d.ts +2 -0
- package/lib/typescript/events/interface.d.ts +1 -0
- package/lib/typescript/index.d.ts +12 -9
- package/lib/typescript/manager/dispatch/DispatchStateContainer.d.ts +38 -17
- package/lib/typescript/manager/dispatchCodes/EventCodeContainer.d.ts +12 -1
- package/lib/typescript/manager/dispatchCodes/EventCodeRepo.d.ts +13 -0
- package/lib/typescript/manager/jobRemoval/JobRemovalManager.d.ts +0 -0
- package/lib/typescript/manager/sdk/DispatchSdkCache.d.ts +1 -0
- package/lib/typescript/manager/sdk/callbacksHandler.d.ts +13 -0
- package/lib/typescript/manager/syncmanager/AppSyncManager.d.ts +3 -1
- package/lib/typescript/manager/syncmanager/DBConfig.d.ts +80 -4
- package/lib/typescript/manager/syncmanager/constants.d.ts +5 -0
- package/lib/typescript/manager/syncmanager/database.d.ts +5 -0
- package/lib/typescript/manager/syncmanager/document/DocumentManager.d.ts +1 -1
- package/lib/typescript/manager/syncmanager/document/DocumentSyncManager.d.ts +1 -1
- package/lib/typescript/manager/syncmanager/document/models.d.ts +1 -1
- package/lib/typescript/manager/syncmanager/events/ETEventsManager.d.ts +15 -2
- package/lib/typescript/manager/syncmanager/events/EventsSyncManager.d.ts +4 -2
- package/lib/typescript/manager/syncmanager/events/SyncHttpClient.d.ts +6 -3
- package/lib/typescript/models/DispatchModels.d.ts +59 -5
- package/lib/typescript/models/ReasonCodes.d.ts +5 -0
- package/lib/typescript/models/auth.d.ts +1 -1
- package/lib/typescript/models/execTasks/ETBaseModels.d.ts +44 -20
- package/lib/typescript/models/execTasks/ETConfig.d.ts +8 -4
- package/lib/typescript/models/sdk.d.ts +12 -0
- package/lib/typescript/native/signature/SignatureCapture.d.ts +2 -2
- package/lib/typescript/network/NetworkUtils.d.ts +1 -5
- package/lib/typescript/styles/SdkColors.d.ts +2 -0
- package/lib/typescript/styles/executionTasks/CommonStyles.d.ts +50 -5
- package/lib/typescript/ui/screens/CancellationScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/CaptureInputScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/CompleteObjectiveScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/DeliverScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/DisplayScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/DoodleScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/DropCashScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/ETScreensIndex.d.ts +3 -2
- package/lib/typescript/ui/screens/FormsScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/GeofenceScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/HttpRequestScreen.d.ts +1 -1
- package/lib/typescript/ui/screens/ImageCaptureScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/PaymentScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/PickupScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/ScanScreen.d.ts +3 -0
- package/lib/typescript/ui/screens/StartWorkFlowScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/ValidateOTPScreen.d.ts +3 -0
- package/lib/typescript/ui/screens/WithBaseDispatchScreen.d.ts +2 -2
- package/lib/typescript/ui/uiConfig/RouteParams.d.ts +14 -0
- package/lib/typescript/utils/ApiUtils.d.ts +61 -0
- package/lib/typescript/utils/ExecTaskUtils.d.ts +10 -4
- package/lib/typescript/utils/NetworkUtil.d.ts +1 -1
- package/lib/typescript/utils/SyncManagerUtils.d.ts +4 -3
- package/lib/typescript/utils/hooks/useModal.d.ts +6 -0
- package/lib/typescript/utils/hooks/useTimer.d.ts +5 -0
- package/lib/typescript/utils/storage.d.ts +32 -0
- package/package.json +26 -26
- package/tsconfig.json +9 -9
- package/file_unzip.js +0 -5
- package/lib/commonjs/components/executiontasks/doodle/DoodleUtils.js +0 -28
- package/lib/commonjs/components/executiontasks/doodle/DoodleUtils.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/CScanner.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/ScannerSchema.js +0 -32
- package/lib/commonjs/components/executiontasks/scanner/ScannerSchema.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/ScannerUtils.js +0 -193
- package/lib/commonjs/components/executiontasks/scanner/ScannerUtils.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/DropDownSelector.js +0 -20
- package/lib/commonjs/components/executiontasks/scanner/returns/DropDownSelector.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/DropDownUtils.js +0 -49
- package/lib/commonjs/components/executiontasks/scanner/returns/DropDownUtils.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/RTReasonSelection.js +0 -107
- package/lib/commonjs/components/executiontasks/scanner/returns/RTReasonSelection.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/RTScan.js +0 -317
- package/lib/commonjs/components/executiontasks/scanner/returns/RTScan.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/ReasonDropDown.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/ScanList.js +0 -276
- package/lib/commonjs/components/executiontasks/scanner/returns/ScanList.js.map +0 -1
- package/lib/commonjs/ui/screens/RTScanScreen.js +0 -118
- package/lib/commonjs/ui/screens/RTScanScreen.js.map +0 -1
- package/lib/module/components/executiontasks/doodle/DoodleUtils.js +0 -19
- package/lib/module/components/executiontasks/doodle/DoodleUtils.js.map +0 -1
- package/lib/module/components/executiontasks/scanner/CScanner.js.map +0 -1
- package/lib/module/components/executiontasks/scanner/ScannerSchema.js +0 -24
- package/lib/module/components/executiontasks/scanner/ScannerSchema.js.map +0 -1
- package/lib/module/components/executiontasks/scanner/ScannerUtils.js +0 -158
- package/lib/module/components/executiontasks/scanner/ScannerUtils.js.map +0 -1
- package/lib/module/components/executiontasks/scanner/returns/DropDownSelector.js +0 -9
- package/lib/module/components/executiontasks/scanner/returns/DropDownSelector.js.map +0 -1
- package/lib/module/components/executiontasks/scanner/returns/DropDownUtils.js +0 -38
- package/lib/module/components/executiontasks/scanner/returns/DropDownUtils.js.map +0 -1
- package/lib/module/components/executiontasks/scanner/returns/RTReasonSelection.js +0 -86
- package/lib/module/components/executiontasks/scanner/returns/RTReasonSelection.js.map +0 -1
- package/lib/module/components/executiontasks/scanner/returns/RTScan.js +0 -287
- package/lib/module/components/executiontasks/scanner/returns/RTScan.js.map +0 -1
- package/lib/module/components/executiontasks/scanner/returns/ReasonDropDown.js +0 -80
- package/lib/module/components/executiontasks/scanner/returns/ReasonDropDown.js.map +0 -1
- package/lib/module/components/executiontasks/scanner/returns/ScanList.js +0 -253
- package/lib/module/components/executiontasks/scanner/returns/ScanList.js.map +0 -1
- package/lib/module/ui/screens/RTScanScreen.js +0 -93
- package/lib/module/ui/screens/RTScanScreen.js.map +0 -1
- package/lib/typescript/components/executiontasks/doodle/DoodleUtils.d.ts +0 -3
- package/lib/typescript/components/executiontasks/scanner/ScannerSchema.d.ts +0 -75
- package/lib/typescript/components/executiontasks/scanner/ScannerUtils.d.ts +0 -15
- package/lib/typescript/components/executiontasks/scanner/returns/DropDownSelector.d.ts +0 -3
- package/lib/typescript/components/executiontasks/scanner/returns/DropDownUtils.d.ts +0 -3
- package/lib/typescript/components/executiontasks/scanner/returns/RTReasonSelection.d.ts +0 -7
- package/lib/typescript/components/executiontasks/scanner/returns/RTScan.d.ts +0 -4
- package/lib/typescript/components/executiontasks/scanner/returns/ReasonDropDown.d.ts +0 -14
- package/lib/typescript/components/executiontasks/scanner/returns/ScanList.d.ts +0 -17
- package/lib/typescript/ui/screens/RTScanScreen.d.ts +0 -3
- package/mobile-execution-lib-0.6.4.tgz +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["View","Text","StyleSheet","TouchableOpacity","React","Checkbox","Feather","Card","props","_props$selectConfig","_props$renderAddition","isSelected","selectConfig","createElement","style","styles","container","status","onPress","_props$selectConfig2","_props$selectConfig3","onSelect","theme","roundness","body","header","title","renderAdditionalHeader","call","Body","editConfig","Fragment","divider","_props$editConfig","_props$editConfig2","onEdit","icon","name","size","color","create","flexDirection","justifyContent","alignItems","paddingVertical","paddingHorizontal","marginVertical","marginHorizontal","borderWidth","borderColor","borderRadius","flex","fontSize","fontStyle","fontWeight","lineHeight","marginRight","height","width","backgroundColor","alignSelf","margin"],"sources":["Card.tsx"],"sourcesContent":["import { View, Text, StyleSheet, TouchableOpacity } from 'react-native';\nimport React from 'react';\nimport { Checkbox } from 'react-native-paper';\nimport { Feather } from '@expo/vector-icons';\n\ninterface CardProps {\n title: string;\n renderAdditionalHeader?: () => JSX.Element;\n Body: JSX.Element;\n editConfig?: {\n props: any;\n onEdit: (props: any) => void;\n };\n selectConfig?: {\n isSelected: boolean;\n props: any;\n onSelect: (props: any) => void;\n };\n}\n\nconst Card = (props: CardProps) => {\n const isSelected = props.selectConfig?.isSelected ? 'checked' : 'unchecked';\n\n return (\n <View style={styles.container}>\n {props.selectConfig ? (\n <View>\n <Checkbox\n status={isSelected}\n onPress={() => {\n props.selectConfig?.onSelect(props.selectConfig?.props);\n }}\n theme={{ roundness: 5 }}\n />\n </View>\n ) : null}\n <View style={styles.body}>\n <View style={styles.header}>\n <Text style={styles.title}>{props.title}</Text>\n {props.renderAdditionalHeader?.()}\n </View>\n {props.Body}\n </View>\n {props.editConfig ? (\n <>\n <View style={styles.divider} />\n <TouchableOpacity\n onPress={() => props.editConfig?.onEdit(props.editConfig?.props)}\n style={styles.icon}\n >\n <Feather name=\"edit\" size={24} color=\"#5B80F7\" />\n </TouchableOpacity>\n </>\n ) : null}\n </View>\n );\n};\n\nexport default Card;\n\nconst styles = StyleSheet.create({\n container: {\n flexDirection: 'row',\n justifyContent: 'flex-start',\n alignItems: 'flex-start',\n paddingVertical: 12,\n paddingHorizontal: 16,\n marginVertical: 10,\n marginHorizontal: 16,\n borderWidth: 1,\n borderColor: '#E0E3EB',\n borderRadius: 8,\n // height: 150,\n },\n header: {\n flexDirection: 'row',\n alignItems: 'center',\n },\n body: {\n flex: 1,\n },\n title: {\n fontSize: 16,\n fontStyle: 'normal',\n fontWeight: '500',\n lineHeight: 24,\n marginRight: 8,\n },\n divider: {\n height: '90%',\n width: 2,\n backgroundColor: '#E0E3EB',\n alignSelf: 'center',\n },\n icon: {\n alignSelf: 'center',\n margin: 10,\n },\n});\n"],"mappings":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EAAE;EACd,CAAC;EACDnB,IAAI,EAAE;IACJ2B,IAAI,EAAE;EACR,CAAC;EACDzB,KAAK,EAAE;IACL0B,QAAQ,EAAE,EAAE;IACZC,SAAS,EAAE,QAAQ;IACnBC,UAAU,EAAE,KAAK;IACjBC,UAAU,EAAE,EAAE;IACdC,WAAW,EAAE;EACf,CAAC;EACDxB,OAAO,EAAE;IACPyB,MAAM,EAAE,KAAK;IACbC,KAAK,EAAE,CAAC;IACRC,eAAe,EAAE,SAAS;IAC1BC,SAAS,EAAE;EACb,CAAC;EACDxB,IAAI,EAAE;IACJwB,SAAS,EAAE,QAAQ;IACnBC,MAAM,EAAE;EACV;AACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import ModalWidget from './ModalWidget';
|
|
3
|
+
import { StyleSheet } from 'react-native';
|
|
4
|
+
const GoBackModal = props => {
|
|
5
|
+
return /*#__PURE__*/React.createElement(ModalWidget, {
|
|
6
|
+
dismissable: true,
|
|
7
|
+
showModal: props.showModal,
|
|
8
|
+
title: {
|
|
9
|
+
label: 'Are you sure you want to go back?'
|
|
10
|
+
},
|
|
11
|
+
primaryButton: {
|
|
12
|
+
label: 'Yes',
|
|
13
|
+
onPress: props.onSuccess,
|
|
14
|
+
styles: modalStyles.primaryButtonStyles
|
|
15
|
+
},
|
|
16
|
+
secondaryButton: {
|
|
17
|
+
label: 'No',
|
|
18
|
+
onPress: props.onFailure,
|
|
19
|
+
styles: modalStyles.secondaryButtonStyles
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
export default GoBackModal;
|
|
24
|
+
const modalStyles = StyleSheet.create({
|
|
25
|
+
primaryButtonStyles: {
|
|
26
|
+
marginTop: 16,
|
|
27
|
+
height: 40,
|
|
28
|
+
borderRadius: 6,
|
|
29
|
+
justifyContent: 'center',
|
|
30
|
+
alignItems: 'center'
|
|
31
|
+
},
|
|
32
|
+
secondaryButtonStyles: {
|
|
33
|
+
marginVertical: 16,
|
|
34
|
+
height: 40,
|
|
35
|
+
borderRadius: 6,
|
|
36
|
+
justifyContent: 'center',
|
|
37
|
+
alignItems: 'center'
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
//# sourceMappingURL=GoBackModal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","ModalWidget","StyleSheet","GoBackModal","props","createElement","dismissable","showModal","title","label","primaryButton","onPress","onSuccess","styles","modalStyles","primaryButtonStyles","secondaryButton","onFailure","secondaryButtonStyles","create","marginTop","height","borderRadius","justifyContent","alignItems","marginVertical"],"sources":["GoBackModal.tsx"],"sourcesContent":["import React from 'react';\nimport ModalWidget from './ModalWidget';\nimport { StyleSheet } from 'react-native';\n\ninterface GoBackModalProps {\n showModal: boolean;\n setShowModal: React.Dispatch<React.SetStateAction<boolean>>;\n onSuccess: () => any;\n onFailure: () => any;\n}\n\nconst GoBackModal = (props: GoBackModalProps) => {\n return (\n <ModalWidget\n dismissable={true}\n showModal={props.showModal}\n title={{ label: 'Are you sure you want to go back?' }}\n primaryButton={{\n label: 'Yes',\n onPress: props.onSuccess,\n styles: modalStyles.primaryButtonStyles,\n }}\n secondaryButton={{\n label: 'No',\n onPress: props.onFailure,\n styles: modalStyles.secondaryButtonStyles,\n }}\n />\n );\n};\n\nexport default GoBackModal;\n\nconst modalStyles = StyleSheet.create({\n primaryButtonStyles: {\n marginTop: 16,\n height: 40,\n borderRadius: 6,\n justifyContent: 'center',\n alignItems: 'center',\n },\n secondaryButtonStyles: {\n marginVertical: 16,\n height: 40,\n borderRadius: 6,\n justifyContent: 'center',\n alignItems: 'center',\n },\n});\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,WAAW,MAAM,eAAe;AACvC,SAASC,UAAU,QAAQ,cAAc;AASzC,MAAMC,WAAW,GAAIC,KAAuB,IAAK;EAC/C,oBACEJ,KAAA,CAAAK,aAAA,CAACJ,WAAW;IACVK,WAAW,EAAE,IAAK;IAClBC,SAAS,EAAEH,KAAK,CAACG,SAAU;IAC3BC,KAAK,EAAE;MAAEC,KAAK,EAAE;IAAoC,CAAE;IACtDC,aAAa,EAAE;MACbD,KAAK,EAAE,KAAK;MACZE,OAAO,EAAEP,KAAK,CAACQ,SAAS;MACxBC,MAAM,EAAEC,WAAW,CAACC;IACtB,CAAE;IACFC,eAAe,EAAE;MACfP,KAAK,EAAE,IAAI;MACXE,OAAO,EAAEP,KAAK,CAACa,SAAS;MACxBJ,MAAM,EAAEC,WAAW,CAACI;IACtB;EAAE,CACH,CAAC;AAEN,CAAC;AAED,eAAef,WAAW;AAE1B,MAAMW,WAAW,GAAGZ,UAAU,CAACiB,MAAM,CAAC;EACpCJ,mBAAmB,EAAE;IACnBK,SAAS,EAAE,EAAE;IACbC,MAAM,EAAE,EAAE;IACVC,YAAY,EAAE,CAAC;IACfC,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE;EACd,CAAC;EACDN,qBAAqB,EAAE;IACrBO,cAAc,EAAE,EAAE;IAClBJ,MAAM,EAAE,EAAE;IACVC,YAAY,EAAE,CAAC;IACfC,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE;EACd;AACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Text, TouchableOpacity, View } from 'react-native';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
const IconButton = _ref => {
|
|
4
|
+
let {
|
|
5
|
+
title,
|
|
6
|
+
onPress,
|
|
7
|
+
icon,
|
|
8
|
+
style,
|
|
9
|
+
textStyles
|
|
10
|
+
} = _ref;
|
|
11
|
+
return /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
12
|
+
style: style,
|
|
13
|
+
onPress: onPress
|
|
14
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
15
|
+
style: {
|
|
16
|
+
flex: 1,
|
|
17
|
+
justifyContent: 'space-between',
|
|
18
|
+
flexDirection: 'row',
|
|
19
|
+
alignItems: 'center'
|
|
20
|
+
}
|
|
21
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
22
|
+
style: textStyles
|
|
23
|
+
}, title), icon));
|
|
24
|
+
};
|
|
25
|
+
export default IconButton;
|
|
26
|
+
//# sourceMappingURL=IconButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Text","TouchableOpacity","View","React","IconButton","_ref","title","onPress","icon","style","textStyles","createElement","flex","justifyContent","flexDirection","alignItems"],"sources":["IconButton.tsx"],"sourcesContent":["import { Text, TouchableOpacity, View } from 'react-native';\nimport React from 'react';\n\nconst IconButton = ({\n title,\n onPress,\n icon,\n style,\n textStyles,\n}: {\n title: string;\n onPress: (e: any) => void;\n icon?: any;\n style?: any;\n textStyles?: any;\n}) => (\n <TouchableOpacity style={style} onPress={onPress}>\n <View\n style={{\n flex: 1,\n justifyContent: 'space-between',\n flexDirection: 'row',\n alignItems: 'center',\n }}\n >\n <Text style={textStyles}>{title}</Text>\n {icon}\n </View>\n </TouchableOpacity>\n);\n\nexport default IconButton;\n"],"mappings":"AAAA,SAASA,IAAI,EAAEC,gBAAgB,EAAEC,IAAI,QAAQ,cAAc;AAC3D,OAAOC,KAAK,MAAM,OAAO;AAEzB,MAAMC,UAAU,GAAGC,IAAA;EAAA,IAAC;IAClBC,KAAK;IACLC,OAAO;IACPC,IAAI;IACJC,KAAK;IACLC;EAOF,CAAC,GAAAL,IAAA;EAAA,oBACCF,KAAA,CAAAQ,aAAA,CAACV,gBAAgB;IAACQ,KAAK,EAAEA,KAAM;IAACF,OAAO,EAAEA;EAAQ,gBAC/CJ,KAAA,CAAAQ,aAAA,CAACT,IAAI;IACHO,KAAK,EAAE;MACLG,IAAI,EAAE,CAAC;MACPC,cAAc,EAAE,eAAe;MAC/BC,aAAa,EAAE,KAAK;MACpBC,UAAU,EAAE;IACd;EAAE,gBAEFZ,KAAA,CAAAQ,aAAA,CAACX,IAAI;IAACS,KAAK,EAAEC;EAAW,GAAEJ,KAAY,CAAC,EACtCE,IACG,CACU,CAAC;AAAA,CACpB;AAED,eAAeJ,UAAU"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { View, Text, StyleSheet } from 'react-native';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Portal, Modal } from 'react-native-paper';
|
|
4
|
+
import { CommonStyles, Fonts } from '../../styles/executionTasks/CommonStyles';
|
|
5
|
+
import { TouchableOpacity } from 'react-native';
|
|
6
|
+
const ModalWidget = props => {
|
|
7
|
+
var _props$renderAddition, _props$renderChildren, _props$renderAddition2;
|
|
8
|
+
const {
|
|
9
|
+
dismissable = true,
|
|
10
|
+
contentContainerStyle = {},
|
|
11
|
+
modalStyle = {},
|
|
12
|
+
title: {
|
|
13
|
+
styles: titleStyle = {}
|
|
14
|
+
},
|
|
15
|
+
subTitle: {
|
|
16
|
+
styles: subTitleStyle = {}
|
|
17
|
+
} = {},
|
|
18
|
+
bodyStyle = {},
|
|
19
|
+
buttonStyle = {},
|
|
20
|
+
primaryButton: {
|
|
21
|
+
disabled: primaryButtonDisabled = false,
|
|
22
|
+
styles: primaryBtnStyles = {},
|
|
23
|
+
labelStyles: primaryBtnLabelStyles = {}
|
|
24
|
+
},
|
|
25
|
+
secondaryButton: {
|
|
26
|
+
disabled: secondaryButtonDisabled = false,
|
|
27
|
+
styles: secondaryBtnStyles = {},
|
|
28
|
+
labelStyles: secondaryBtnLabelStyles = {}
|
|
29
|
+
}
|
|
30
|
+
} = props;
|
|
31
|
+
return /*#__PURE__*/React.createElement(Portal, null, /*#__PURE__*/React.createElement(Modal, {
|
|
32
|
+
visible: props.showModal,
|
|
33
|
+
dismissable: dismissable,
|
|
34
|
+
contentContainerStyle: [styles.modalContent, contentContainerStyle]
|
|
35
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
36
|
+
style: [styles.modalView, modalStyle]
|
|
37
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
38
|
+
style: bodyStyle
|
|
39
|
+
}, (_props$renderAddition = props.renderAdditionalHeader) === null || _props$renderAddition === void 0 ? void 0 : _props$renderAddition.call(props), /*#__PURE__*/React.createElement(Text, {
|
|
40
|
+
style: [styles.titleText, titleStyle]
|
|
41
|
+
}, props.title.label), props.subTitle ? /*#__PURE__*/React.createElement(Text, {
|
|
42
|
+
style: [styles.subTitleText, subTitleStyle]
|
|
43
|
+
}, props.subTitle.label) : null, (_props$renderChildren = props.renderChildren) === null || _props$renderChildren === void 0 ? void 0 : _props$renderChildren.call(props)), /*#__PURE__*/React.createElement(View, {
|
|
44
|
+
style: buttonStyle
|
|
45
|
+
}, /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
46
|
+
style: [CommonStyles.nextButton, primaryBtnStyles],
|
|
47
|
+
onPress: props.primaryButton.onPress,
|
|
48
|
+
disabled: primaryButtonDisabled
|
|
49
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
50
|
+
style: [CommonStyles.nextButtonLabel, primaryBtnLabelStyles]
|
|
51
|
+
}, props.primaryButton.label)), /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
52
|
+
style: [CommonStyles.cancelButton, secondaryBtnStyles],
|
|
53
|
+
onPress: props.secondaryButton.onPress,
|
|
54
|
+
disabled: secondaryButtonDisabled
|
|
55
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
56
|
+
style: [CommonStyles.cancelButtonLabel, secondaryBtnLabelStyles]
|
|
57
|
+
}, props.secondaryButton.label)), (_props$renderAddition2 = props.renderAdditionalButtons) === null || _props$renderAddition2 === void 0 ? void 0 : _props$renderAddition2.call(props)))));
|
|
58
|
+
};
|
|
59
|
+
export default ModalWidget;
|
|
60
|
+
const styles = StyleSheet.create({
|
|
61
|
+
modalContent: {
|
|
62
|
+
marginStart: 60,
|
|
63
|
+
marginEnd: 60,
|
|
64
|
+
marginBottom: 60,
|
|
65
|
+
flex: 1
|
|
66
|
+
},
|
|
67
|
+
modalView: {
|
|
68
|
+
backgroundColor: 'white',
|
|
69
|
+
padding: 15,
|
|
70
|
+
borderRadius: 9
|
|
71
|
+
},
|
|
72
|
+
titleText: {
|
|
73
|
+
justifyContent: 'center',
|
|
74
|
+
fontFamily: Fonts.IBMPlexSans_600SemiBold,
|
|
75
|
+
fontStyle: 'normal',
|
|
76
|
+
fontSize: 14,
|
|
77
|
+
lineHeight: 20,
|
|
78
|
+
textAlign: 'center',
|
|
79
|
+
color: '#111111',
|
|
80
|
+
marginBottom: 10
|
|
81
|
+
},
|
|
82
|
+
subTitleText: {
|
|
83
|
+
justifyContent: 'center',
|
|
84
|
+
fontFamily: 'IBMPlexSans_400Regular',
|
|
85
|
+
fontStyle: 'normal',
|
|
86
|
+
fontSize: 14,
|
|
87
|
+
lineHeight: 20,
|
|
88
|
+
color: '#000000',
|
|
89
|
+
marginBottom: 10
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
//# sourceMappingURL=ModalWidget.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["View","Text","StyleSheet","React","Portal","Modal","CommonStyles","Fonts","TouchableOpacity","ModalWidget","props","_props$renderAddition","_props$renderChildren","_props$renderAddition2","dismissable","contentContainerStyle","modalStyle","title","styles","titleStyle","subTitle","subTitleStyle","bodyStyle","buttonStyle","primaryButton","disabled","primaryButtonDisabled","primaryBtnStyles","labelStyles","primaryBtnLabelStyles","secondaryButton","secondaryButtonDisabled","secondaryBtnStyles","secondaryBtnLabelStyles","createElement","visible","showModal","modalContent","style","modalView","renderAdditionalHeader","call","titleText","label","subTitleText","renderChildren","nextButton","onPress","nextButtonLabel","cancelButton","cancelButtonLabel","renderAdditionalButtons","create","marginStart","marginEnd","marginBottom","flex","backgroundColor","padding","borderRadius","justifyContent","fontFamily","IBMPlexSans_600SemiBold","fontStyle","fontSize","lineHeight","textAlign","color"],"sources":["ModalWidget.tsx"],"sourcesContent":["import { View, Text, StyleSheet, ViewStyle, TextStyle } from 'react-native';\nimport React from 'react';\nimport { Portal, Modal } from 'react-native-paper';\nimport { CommonStyles, Fonts } from '../../styles/executionTasks/CommonStyles';\nimport { TouchableOpacity } from 'react-native';\n\ninterface ButtonProps {\n label: string;\n disabled?: boolean;\n onPress: (() => void) | (() => Promise<any>);\n styles?: ViewStyle;\n labelStyles?: TextStyle;\n}\n\ninterface TitleProps {\n label: string;\n styles?: TextStyle;\n}\n\nexport interface ModalProps {\n showModal: boolean;\n dismissable?: boolean;\n title: TitleProps;\n subTitle?: TitleProps;\n contentContainerStyle?: ViewStyle;\n modalStyle?: ViewStyle;\n bodyStyle?: ViewStyle;\n renderChildren?: () => JSX.Element;\n buttonStyle?: ViewStyle;\n primaryButton: ButtonProps;\n secondaryButton: ButtonProps;\n renderAdditionalButtons?: () => JSX.Element;\n renderAdditionalHeader?: () => JSX.Element;\n}\n\nconst ModalWidget = (props: ModalProps) => {\n const {\n dismissable = true,\n contentContainerStyle = {},\n modalStyle = {},\n title: { styles: titleStyle = {} },\n subTitle: { styles: subTitleStyle = {} } = {},\n bodyStyle = {},\n buttonStyle = {},\n primaryButton: {\n disabled: primaryButtonDisabled = false,\n styles: primaryBtnStyles = {},\n labelStyles: primaryBtnLabelStyles = {},\n },\n secondaryButton: {\n disabled: secondaryButtonDisabled = false,\n styles: secondaryBtnStyles = {},\n labelStyles: secondaryBtnLabelStyles = {},\n },\n } = props;\n return (\n <Portal>\n <Modal\n visible={props.showModal}\n dismissable={dismissable}\n contentContainerStyle={[styles.modalContent, contentContainerStyle]}\n >\n <View style={[styles.modalView, modalStyle]}>\n <View style={bodyStyle}>\n {props.renderAdditionalHeader?.()}\n <Text style={[styles.titleText, titleStyle]}>\n {props.title.label}\n </Text>\n {props.subTitle ? (\n <Text style={[styles.subTitleText, subTitleStyle]}>\n {props.subTitle.label}\n </Text>\n ) : null}\n {props.renderChildren?.()}\n </View>\n\n <View style={buttonStyle}>\n <TouchableOpacity\n style={[CommonStyles.nextButton, primaryBtnStyles]}\n onPress={props.primaryButton.onPress}\n disabled={primaryButtonDisabled}\n >\n <Text\n style={[CommonStyles.nextButtonLabel, primaryBtnLabelStyles]}\n >\n {props.primaryButton.label}\n </Text>\n </TouchableOpacity>\n <TouchableOpacity\n style={[CommonStyles.cancelButton, secondaryBtnStyles]}\n onPress={props.secondaryButton.onPress}\n disabled={secondaryButtonDisabled}\n >\n <Text\n style={[\n CommonStyles.cancelButtonLabel,\n secondaryBtnLabelStyles,\n ]}\n >\n {props.secondaryButton.label}\n </Text>\n </TouchableOpacity>\n {props.renderAdditionalButtons?.()}\n </View>\n </View>\n </Modal>\n </Portal>\n );\n};\n\nexport default ModalWidget;\n\ninterface StyleSheetType {\n modalContent: ViewStyle;\n modalView: ViewStyle;\n titleText: TextStyle;\n subTitleText: TextStyle;\n}\n\nconst styles = StyleSheet.create<StyleSheetType>({\n modalContent: {\n marginStart: 60,\n marginEnd: 60,\n marginBottom: 60,\n flex: 1,\n },\n modalView: {\n backgroundColor: 'white',\n padding: 15,\n borderRadius: 9,\n },\n titleText: {\n justifyContent: 'center',\n fontFamily: Fonts.IBMPlexSans_600SemiBold,\n fontStyle: 'normal',\n fontSize: 14,\n lineHeight: 20,\n textAlign: 'center',\n color: '#111111',\n marginBottom: 10,\n },\n subTitleText: {\n justifyContent: 'center',\n fontFamily: 'IBMPlexSans_400Regular',\n fontStyle: 'normal',\n fontSize: 14,\n lineHeight: 20,\n color: '#000000',\n marginBottom: 10,\n },\n});\n"],"mappings":"AAAA,SAASA,IAAI,EAAEC,IAAI,EAAEC,UAAU,QAA8B,cAAc;AAC3E,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,MAAM,EAAEC,KAAK,QAAQ,oBAAoB;AAClD,SAASC,YAAY,EAAEC,KAAK,QAAQ,0CAA0C;AAC9E,SAASC,gBAAgB,QAAQ,cAAc;AA+B/C,MAAMC,WAAW,GAAIC,KAAiB,IAAK;EAAA,IAAAC,qBAAA,EAAAC,qBAAA,EAAAC,sBAAA;EACzC,MAAM;IACJC,WAAW,GAAG,IAAI;IAClBC,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A,uBAA7BA,sBAAA,CAAA4B,IAAA,CAAA/B,KAAgC,CAC7B,CACF,CACD,CACD,CAAC;AAEb,CAAC;AAED,eAAeD,WAAW;AAS1B,MAAMS,MAAM,GAAGhB,UAAU,CAACkD,MAAM,CAAiB;EAC/Cf,YAAY,EAAE;IACZgB,WAAW,EAAE,EAAE;IACfC,SAAS,EAAE,EAAE;IACbC,YAAY,EAAE,EAAE;IAChBC,IAAI,EAAE;EACR,CAAC;EACDjB,SAAS,EAAE;IACTkB,eAAe,EAAE,OAAO;IACxBC,OAAO,EAAE,EAAE;IACXC,YAAY,EAAE;EAChB,CAAC;EACDjB,SAAS,EAAE;IACTkB,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAEtD,KAAK,CAACuD,uBAAuB;IACzCC,SAAS,EAAE,QAAQ;IACnBC,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,EAAE;IACdC,SAAS,EAAE,QAAQ;IACnBC,KAAK,EAAE,SAAS;IAChBZ,YAAY,EAAE;EAChB,CAAC;EACDX,YAAY,EAAE;IACZgB,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE,wBAAwB;IACpCE,SAAS,EAAE,QAAQ;IACnBC,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,EAAE;IACdE,KAAK,EAAE,SAAS;IAChBZ,YAAY,EAAE;EAChB;AACF,CAAC,CAAC"}
|
|
@@ -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,0CAA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extInput, TouchableOpacity, StyleSheet } from 'react-native';
|
|
3
|
+
import { EvilIcons, MaterialIcons } from '@expo/vector-icons';
|
|
4
|
+
const SearchBar = props => {
|
|
5
|
+
const {
|
|
6
|
+
searchText,
|
|
7
|
+
setSearchText
|
|
8
|
+
} = props;
|
|
9
|
+
const handleSearch = text => {
|
|
10
|
+
props.onChangeSearch(text);
|
|
11
|
+
};
|
|
12
|
+
const handleClear = () => {
|
|
13
|
+
props.onClear();
|
|
14
|
+
setSearchText('');
|
|
15
|
+
};
|
|
16
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
17
|
+
style: styles.container
|
|
18
|
+
}, /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
19
|
+
style: styles.iconContainer
|
|
20
|
+
}, /*#__PURE__*/React.createElement(EvilIcons, {
|
|
21
|
+
name: "search",
|
|
22
|
+
size: 24,
|
|
23
|
+
color: "#525B7A"
|
|
24
|
+
})), /*#__PURE__*/React.createElement(View, {
|
|
25
|
+
style: styles.inputContainer
|
|
26
|
+
}, /*#__PURE__*/React.createElement(TextInput, {
|
|
27
|
+
style: styles.input,
|
|
28
|
+
placeholder: props.placeholder,
|
|
29
|
+
onChangeText: text => {
|
|
30
|
+
handleSearch(text);
|
|
31
|
+
setSearchText(text);
|
|
32
|
+
},
|
|
33
|
+
value: searchText
|
|
34
|
+
})), searchText ? /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
35
|
+
style: styles.iconContainer,
|
|
36
|
+
onPress: handleClear
|
|
37
|
+
}, /*#__PURE__*/React.createElement(MaterialIcons, {
|
|
38
|
+
name: "clear",
|
|
39
|
+
size: 24,
|
|
40
|
+
color: "#525B7A"
|
|
41
|
+
})) : null);
|
|
42
|
+
};
|
|
43
|
+
const styles = StyleSheet.create({
|
|
44
|
+
container: {
|
|
45
|
+
flexDirection: 'row',
|
|
46
|
+
alignItems: 'center',
|
|
47
|
+
backgroundColor: '#ffffff',
|
|
48
|
+
borderRadius: 6,
|
|
49
|
+
paddingHorizontal: 12,
|
|
50
|
+
borderWidth: 1,
|
|
51
|
+
borderColor: '#DDDDDD',
|
|
52
|
+
marginHorizontal: 16
|
|
53
|
+
},
|
|
54
|
+
inputContainer: {
|
|
55
|
+
flex: 1
|
|
56
|
+
},
|
|
57
|
+
input: {
|
|
58
|
+
height: 40
|
|
59
|
+
},
|
|
60
|
+
iconContainer: {
|
|
61
|
+
paddingLeft: 4,
|
|
62
|
+
paddingRight: 8
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
export default SearchBar;
|
|
66
|
+
//# sourceMappingURL=SearchBar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","View","TextInput","TouchableOpacity","StyleSheet","EvilIcons","MaterialIcons","SearchBar","props","searchText","setSearchText","handleSearch","text","onChangeSearch","handleClear","onClear","createElement","style","styles","container","iconContainer","name","size","color","inputContainer","input","placeholder","onChangeText","value","onPress","create","flexDirection","alignItems","backgroundColor","borderRadius","paddingHorizontal","borderWidth","borderColor","marginHorizontal","flex","height","paddingLeft","paddingRight"],"sources":["SearchBar.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport { View, TextInput, TouchableOpacity, StyleSheet } from 'react-native';\nimport { EvilIcons, MaterialIcons } from '@expo/vector-icons';\n\ninterface SearchBarProps {\n searchText: string;\n setSearchText: (searchText: string) => void;\n onChangeSearch: (searchText: string) => any;\n placeholder: string;\n onClear: () => any;\n}\n\nconst SearchBar = (props: SearchBarProps) => {\n const { searchText, setSearchText } = props;\n const handleSearch = (text: string) => {\n props.onChangeSearch(text);\n };\n const handleClear = () => {\n props.onClear();\n setSearchText('');\n };\n\n return (\n <View style={styles.container}>\n <TouchableOpacity style={styles.iconContainer}>\n <EvilIcons name=\"search\" size={24} color=\"#525B7A\" />\n </TouchableOpacity>\n <View style={styles.inputContainer}>\n <TextInput\n style={styles.input}\n placeholder={props.placeholder}\n onChangeText={(text) => {\n handleSearch(text);\n setSearchText(text);\n }}\n value={searchText}\n />\n </View>\n {searchText ? (\n <TouchableOpacity style={styles.iconContainer} onPress={handleClear}>\n <MaterialIcons name=\"clear\" size={24} color=\"#525B7A\" />\n </TouchableOpacity>\n ) : null}\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n flexDirection: 'row',\n alignItems: 'center',\n backgroundColor: '#ffffff',\n borderRadius: 6,\n paddingHorizontal: 12,\n borderWidth: 1,\n borderColor: '#DDDDDD',\n marginHorizontal: 16,\n },\n inputContainer: {\n flex: 1,\n },\n input: {\n height: 40,\n },\n iconContainer: {\n paddingLeft: 4,\n paddingRight: 8,\n },\n});\n\nexport default SearchBar;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAoB,OAAO;AACvC,SAASC,IAAI,EAAEC,SAAS,EAAEC,gBAAgB,EAAEC,UAAU,QAAQ,cAAc;AAC5E,SAASC,SAAS,EAAEC,aAAa,QAAQ,oBAAoB;AAU7D,MAAMC,SAAS,GAAIC,KAAqB,IAAK;EAC3C,MAAM;IAAEC,UAAU;IAAEC;EAAc,CAAC,GAAGF,KAAK;EAC3C,MAAMG,YAAY,GAAIC,IAAY,IAAK;IACrCJ,KAAK,CAACK,cAAc,CAACD,IAAI,CAAC;EAC5B,CAAC;EACD,MAAME,WAAW,GAAGA,CAAA,KAAM;IACxBN,KAAK,CAACO,OAAO,CAAC,CAAC;IACfL,aAAa,CAAC,EAAE,CAAC;EACnB,CAAC;EAED,oBACEV,KAAA,CAAAgB,aAAA,CAACf,IAAI;IAACgB,KAAK,EAAEC,MAAM,CAACC;EAAU,gBAC5BnB,KAAA,CAAAgB,aAAA,CAACb,gBAAgB;IAACc,KAAK,EAAEC,MAAM,CAACE;EAAc,gBAC5CpB,KAAA,CAAAgB,aAAA,CAACX,SAAS;IAACgB,IAAI,EAAC,QAAQ;IAACC,IAAI,EAAE,EAAG;IAACC,KAAK,EAAC;EAAS,CAAE,CACpC,CAAC,eACnBvB,KAAA,CAAAgB,aAAA,CAACf,IAAI;IAACgB,KAAK,EAAEC,MAAM,CAACM;EAAe,gBACjCxB,KAAA,CAAAgB,aAAA,CAACd,SAAS;IACRe,KAAK,EAAEC,MAAM,CAACO,KAAM;IACpBC,WAAW,EAAElB,KAAK,CAACkB,WAAY;IAC/BC,YAAY,EAAGf,IAAI,IAAK;MACtBD,YAAY,CAACC,IAAI,CAAC;MAClBF,aAAa,CAACE,IAAI,CAAC;IACrB,CAAE;IACFgB,KAAK,EAAEnB;EAAW,CACnB,CACG,CAAC,EACNA,UAAU,gBACTT,KAAA,CAAAgB,aAAA,CAACb,gBAAgB;IAACc,KAAK,EAAEC,MAAM,CAACE,aAAc;IAACS,OAAO,EAAEf;EAAY,gBAClEd,KAAA,CAAAgB,aAAA,CAACV,aAAa;IAACe,IAAI,EAAC,OAAO;IAACC,IAAI,EAAE,EAAG;IAACC,KAAK,EAAC;EAAS,CAAE,CACvC,CAAC,GACjB,IACA,CAAC;AAEX,CAAC;AAED,MAAML,MAAM,GAAGd,UAAU,CAAC0B,MAAM,CAAC;EAC/BX,SAAS,EAAE;IACTY,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBC,eAAe,EAAE,SAAS;IAC1BC,YAAY,EAAE,CAAC;IACfC,iBAAiB,EAAE,EAAE;IACrBC,WAAW,EAAE,CAAC;IACdC,WAAW,EAAE,SAAS;IACtBC,gBAAgB,EAAE;EACpB,CAAC;EACDd,cAAc,EAAE;IACde,IAAI,EAAE;EACR,CAAC;EACDd,KAAK,EAAE;IACLe,MAAM,EAAE;EACV,CAAC;EACDpB,aAAa,EAAE;IACbqB,WAAW,EAAE,CAAC;IACdC,YAAY,EAAE;EAChB;AACF,CAAC,CAAC;AAEF,eAAenC,SAAS"}
|
|
@@ -1,18 +1,24 @@
|
|
|
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
|
-
const DURATION_MEDIUM =
|
|
8
|
-
|
|
6
|
+
const DURATION_MEDIUM = 3000;
|
|
7
|
+
export let SnackBarType = /*#__PURE__*/function (SnackBarType) {
|
|
8
|
+
SnackBarType[SnackBarType["SUCCESS"] = 0] = "SUCCESS";
|
|
9
|
+
SnackBarType[SnackBarType["FAILURE"] = 1] = "FAILURE";
|
|
10
|
+
SnackBarType[SnackBarType["WARNING"] = 2] = "WARNING";
|
|
11
|
+
return SnackBarType;
|
|
12
|
+
}({});
|
|
9
13
|
const SnackbarCustom = _ref => {
|
|
10
14
|
let {
|
|
11
15
|
visible,
|
|
12
16
|
duration = DURATION_MEDIUM,
|
|
13
17
|
onDismiss,
|
|
14
18
|
message,
|
|
15
|
-
theme
|
|
19
|
+
theme,
|
|
20
|
+
type,
|
|
21
|
+
customBottom = 110
|
|
16
22
|
} = _ref;
|
|
17
23
|
const {
|
|
18
24
|
current: opacity
|
|
@@ -40,10 +46,8 @@ const SnackbarCustom = _ref => {
|
|
|
40
46
|
let {
|
|
41
47
|
finished
|
|
42
48
|
} = _ref2;
|
|
43
|
-
|
|
44
49
|
if (finished) {
|
|
45
50
|
const isInfinity = duration === Number.POSITIVE_INFINITY || duration === Number.NEGATIVE_INFINITY;
|
|
46
|
-
|
|
47
51
|
if (finished && !isInfinity) {
|
|
48
52
|
hideTimeout.current = setTimeout(onDismiss, duration);
|
|
49
53
|
}
|
|
@@ -69,9 +73,12 @@ const SnackbarCustom = _ref => {
|
|
|
69
73
|
roundness
|
|
70
74
|
} = theme;
|
|
71
75
|
if (hidden) return null;
|
|
76
|
+
if (!message) return null;
|
|
72
77
|
return /*#__PURE__*/React.createElement(SafeAreaView, {
|
|
73
78
|
pointerEvents: "box-none",
|
|
74
|
-
style: [styles.wrapper
|
|
79
|
+
style: [styles.wrapper, {
|
|
80
|
+
bottom: customBottom
|
|
81
|
+
}]
|
|
75
82
|
}, /*#__PURE__*/React.createElement(Surface, {
|
|
76
83
|
pointerEvents: "box-none",
|
|
77
84
|
accessibilityLiveRegion: "polite",
|
|
@@ -88,28 +95,32 @@ const SnackbarCustom = _ref => {
|
|
|
88
95
|
backgroundColor: colors.onSurface
|
|
89
96
|
}]
|
|
90
97
|
}, /*#__PURE__*/React.createElement(View, {
|
|
91
|
-
style: styles.main
|
|
92
|
-
}, /*#__PURE__*/React.createElement(
|
|
93
|
-
name:
|
|
94
|
-
|
|
95
|
-
|
|
98
|
+
style: type && type === SnackBarType.FAILURE ? styles.fail : type && type === SnackBarType.WARNING ? styles.warn : styles.main
|
|
99
|
+
}, type && type === SnackBarType.FAILURE ? /*#__PURE__*/React.createElement(AntDesign, {
|
|
100
|
+
name: "exclamationcircleo",
|
|
101
|
+
size: 20,
|
|
102
|
+
color: "white"
|
|
103
|
+
}) : /*#__PURE__*/React.createElement(AntDesign, {
|
|
104
|
+
name: "checkcircleo",
|
|
105
|
+
size: 20,
|
|
106
|
+
color: "white"
|
|
96
107
|
}), /*#__PURE__*/React.createElement(Text, {
|
|
97
108
|
style: styles.messageStyle
|
|
98
|
-
}, message), /*#__PURE__*/React.createElement(
|
|
99
|
-
name:
|
|
100
|
-
|
|
101
|
-
|
|
109
|
+
}, message), /*#__PURE__*/React.createElement(AntDesign, {
|
|
110
|
+
name: "close",
|
|
111
|
+
size: 16,
|
|
112
|
+
color: "white",
|
|
102
113
|
onPress: () => {
|
|
103
114
|
setHidden(true);
|
|
104
115
|
}
|
|
105
116
|
}))));
|
|
106
117
|
};
|
|
107
|
-
|
|
108
118
|
const styles = StyleSheet.create({
|
|
109
119
|
wrapper: {
|
|
110
120
|
position: 'absolute',
|
|
111
121
|
bottom: 110,
|
|
112
|
-
width: '100%'
|
|
122
|
+
width: '100%',
|
|
123
|
+
zIndex: 1000
|
|
113
124
|
},
|
|
114
125
|
container: {
|
|
115
126
|
elevation: 6,
|
|
@@ -122,7 +133,22 @@ const styles = StyleSheet.create({
|
|
|
122
133
|
main: {
|
|
123
134
|
padding: 16,
|
|
124
135
|
flexDirection: 'row',
|
|
125
|
-
|
|
136
|
+
alignItems: 'center',
|
|
137
|
+
backgroundColor: '#059669',
|
|
138
|
+
flex: 1
|
|
139
|
+
},
|
|
140
|
+
fail: {
|
|
141
|
+
padding: 16,
|
|
142
|
+
flexDirection: 'row',
|
|
143
|
+
alignItems: 'center',
|
|
144
|
+
backgroundColor: '#DC2626',
|
|
145
|
+
flex: 1
|
|
146
|
+
},
|
|
147
|
+
warn: {
|
|
148
|
+
padding: 16,
|
|
149
|
+
flexDirection: 'row',
|
|
150
|
+
alignItems: 'center',
|
|
151
|
+
backgroundColor: '#D97706',
|
|
126
152
|
flex: 1
|
|
127
153
|
},
|
|
128
154
|
messageStyle: {
|
|
@@ -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,CAA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oBAAC,qBAAD;IACE,IAAI,EAAE,sBADR;IAEE,KAAK,EAAE,SAFT;IAGE,IAAI,EAAE,EAHR;IAIE,OAAO,EAAE,MAAM;MACbO,SAAS,CAAC,IAAD,CAAT;IACD;EANH,EAHF,CAxBF,CADF,CADF;AAyCD,CAvGD;;AAyGA,MAAMqB,MAAM,GAAGzC,UAAU,CAACqD,MAAX,CAAkB;EAC/BX,OAAO,EAAE;IACPY,QAAQ,EAAE,UADH;IAEPC,MAAM,EAAE,GAFD;IAGPC,KAAK,EAAE;EAHA,CADsB;EAM/Bb,SAAS,EAAE;IACTc,SAAS,EAAE,CADF;IAETC,aAAa,EAAE,KAFN;IAGTC,cAAc,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","WARNING","warn","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 = 3000;\n\nexport enum SnackBarType {\n SUCCESS,\n FAILURE,\n WARNING,\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\n ? styles.fail\n : type && type === SnackBarType.WARNING\n ? styles.warn\n : 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: '#059669',\n flex: 1,\n },\n fail: {\n padding: 16,\n flexDirection: 'row',\n alignItems: 'center',\n backgroundColor: '#DC2626',\n flex: 1,\n },\n warn: {\n padding: 16,\n flexDirection: 'row',\n alignItems: 'center',\n backgroundColor: '#D97706',\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;AAE5B,WAAYC,YAAY,0BAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAA,OAAZA,YAAY;AAAA;AAMxB,MAAMC,cAAc,GAAGC,IAAA,IAQF;EAAA,IARG;IACtBC,OAAO;IACPC,QAAQ,GAAGL,eAAe;IAC1BM,SAAS;IACTC,OAAO;IACPC,KAAK;IACLC,IAAI;IACJC,YAAY,GAAG;EACF,CAAC,GAAAP,IAAA;EACd,MAAM;IAAEQ,OAAO,EAAEC;EAAQ,CAAC,GAAGtB,KAAK,CAACuB,MAAM,CACvC,IAAItB,QAAQ,CAACuB,KAAK,CAAC,GAAG,CACxB,CAAC;EACD,MAAM,CAACC,MAAM,EAAEC,SAAS,CAAC,GAAG1B,KAAK,CAAC2B,QAAQ,CAAU,CAACb,OAAO,CAAC;EAE7D,MAAMc,WAAW,GAAG5B,KAAK,CAACuB,MAAM,CAA6BM,SAAS,CAAC;EACvE,MAAM;IAAEC;EAAM,CAAC,GAAGZ,KAAK,CAACa,SAAS;EAEjC/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EACDjB,IAAI,EAAE;IACJgB,OAAO,EAAE,EAAE;IACXJ,aAAa,EAAE,KAAK;IACpBE,UAAU,EAAE,QAAQ;IACpBnB,eAAe,EAAE,SAAS;IAC1BsB,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,EAAE/E,KAAK,CAACgF;EACpB;AACF,CAAC,CAAC;AAEF,eAAelF,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: 30,\n width: 300,\n position: 'absolute',\n opacity: 0,\n },\n});\n"],"mappings":"AAAA,SACEA,IAAI,EACJC,IAAI,EACJC,SAAS,EACTC,UAAU,EACVC,SAAS,QAEJ,cAAc;AACrB,OAAOC,KAAK,IAAIC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAW/C,MAAMC,cAAc,GAAGC,IAAA,IAOI;EAAA,IAPH;IACtBC,MAAM;IACNC,KAAK;IACLC,QAAQ;IACRC,SAAS;IACTC,YAAY;IACZC;EACmB,CAAC,GAAAN,IAAA;EACpB,MAAMO,QAAa,GAAGV,MAAM,CAAC,CAAC;EAC9B,MAAMW,QAAQ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