@os1-platform/dispatch-mobile 1.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/LICENSE +21 -0
- package/README.md +551 -0
- package/android/build/.transforms/22228dd0a4a527a24ec811806cb09b83/classes/classes.dex +0 -0
- package/android/build/.transforms/22228dd0a4a527a24ec811806cb09b83.bin +1 -0
- package/android/build/.transforms/94a07ea3e1b6cf7284a0d41cd59f08ef/classes/classes.dex +0 -0
- package/android/build/.transforms/94a07ea3e1b6cf7284a0d41cd59f08ef.bin +1 -0
- package/android/build/generated/source/buildConfig/debug/com/dispatchsdk/BuildConfig.java +12 -0
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/AndroidManifest.xml +34 -0
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/output.json +26 -0
- package/android/build/intermediates/annotation_processor_list/debug/annotationProcessors.json +1 -0
- package/android/build/intermediates/compile_library_classes_jar/debug/classes.jar +0 -0
- package/android/build/intermediates/compile_only_not_namespaced_r_class_jar/debug/R.jar +0 -0
- package/android/build/intermediates/compile_symbol_list/debug/R.txt +4928 -0
- package/android/build/intermediates/compiled_local_resources/debug/out/drawable_alert_background.xml.flat +0 -0
- package/android/build/intermediates/compiled_local_resources/debug/out/drawable_ic_baseline_sync_24.xml.flat +0 -0
- package/android/build/intermediates/compiled_local_resources/debug/out/font_ibmplexsans.ttf.flat +0 -0
- package/android/build/intermediates/compiled_local_resources/debug/out/xml_file_paths.xml.flat +0 -0
- package/android/build/intermediates/incremental/debug-mergeNativeLibs/merge-state +0 -0
- package/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +2 -0
- package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +2 -0
- package/android/build/intermediates/incremental/packageDebugAssets/merger.xml +2 -0
- package/android/build/intermediates/incremental/packageDebugResources/compile-file-map.properties +5 -0
- package/android/build/intermediates/incremental/packageDebugResources/merged.dir/values/values.xml +9 -0
- package/android/build/intermediates/incremental/packageDebugResources/merger.xml +7 -0
- package/android/build/intermediates/javac/debug/classes/com/dispatchsdk/BuildConfig.class +0 -0
- package/android/build/intermediates/library_java_res/debug/res.jar +0 -0
- package/android/build/intermediates/library_manifest/debug/AndroidManifest.xml +34 -0
- package/android/build/intermediates/local_only_symbol_list/debug/R-def.txt +7 -0
- package/android/build/intermediates/manifest_merge_blame_file/debug/manifest-merger-blame-debug-report.txt +63 -0
- package/android/build/intermediates/merged_manifests/debug/output.json +26 -0
- package/android/build/intermediates/navigation_json/debug/navigation.json +1 -0
- package/android/build/intermediates/packaged_res/debug/drawable/alert_background.xml +8 -0
- package/android/build/intermediates/packaged_res/debug/drawable/ic_baseline_sync_24.xml +5 -0
- package/android/build/intermediates/packaged_res/debug/font/ibmplexsans.ttf +0 -0
- package/android/build/intermediates/packaged_res/debug/values/values.xml +9 -0
- package/android/build/intermediates/packaged_res/debug/xml/file_paths.xml +10 -0
- package/android/build/intermediates/runtime_library_classes_jar/debug/classes.jar +0 -0
- package/android/build/intermediates/symbol_list_with_package_name/debug/package-aware-r.txt +3391 -0
- package/android/build/kotlin/compileDebugKotlin/build-history.bin +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/inputs/source-to-output.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/inputs/source-to-output.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/inputs/source-to-output.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/inputs/source-to-output.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/inputs/source-to-output.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/inputs/source-to-output.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/constants.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/constants.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/constants.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/constants.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/constants.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/constants.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/constants.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/proto.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/proto.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/proto.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/subtypes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/subtypes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/subtypes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/subtypes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/supertypes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/supertypes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/counters.tab +2 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/file-to-id.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/file-to-id.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/file-to-id.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/file-to-id.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/file-to-id.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/file-to-id.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/id-to-file.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/id-to-file.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/id-to-file.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/id-to-file.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/id-to-file.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/lookups.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/lookups.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/lookups.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/lookups.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/lookups.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/lookups.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/last-build.bin +0 -0
- package/android/build/outputs/logs/manifest-merger-debug-report.txt +79 -0
- package/android/build/tmp/kotlin-classes/debug/META-INF/dispatchsdk_debug.kotlin_module +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/dispatchsdk/DispatchSdkPackage.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/dispatchsdk/errors/NativeSdkErrors.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/dispatchsdk/signaturePad/RSSignatureCaptureContextModule.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/dispatchsdk/signaturePad/RSSignatureCaptureMainView.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/dispatchsdk/signaturePad/RSSignatureCaptureView$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/dispatchsdk/signaturePad/RSSignatureCaptureView$OnSignedListener.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/dispatchsdk/signaturePad/RSSignatureCaptureView$SignatureCallback.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/dispatchsdk/signaturePad/RSSignatureCaptureView.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/dispatchsdk/signaturePad/RSSignatureCaptureViewManager$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/dispatchsdk/signaturePad/RSSignatureCaptureViewManager.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/dispatchsdk/signatureUtils/Bezier.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/dispatchsdk/signatureUtils/ControlTimedPoints.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/dispatchsdk/signatureUtils/TimedPoint.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/dispatchsdk/sync/SyncEventService$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/dispatchsdk/sync/SyncEventService.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/dispatchsdk/sync/SyncManagerService$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/dispatchsdk/sync/SyncManagerService$runnableCode$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/dispatchsdk/sync/SyncManagerService.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/dispatchsdk/sync/SyncModule$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/dispatchsdk/sync/SyncModule.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/dispatchsdk/utils/DispatchSdkUtils$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/dispatchsdk/utils/DispatchSdkUtils$showAndroidDialog$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/dispatchsdk/utils/DispatchSdkUtils$showAndroidDialog$2.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/dispatchsdk/utils/DispatchSdkUtils.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/dispatchsdk/utils/ModuleConfig$IntentConfig.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/dispatchsdk/utils/ModuleConfig.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/dispatchsdk/utils/Tracer.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/dispatchsdk/utils/Utils.class +0 -0
- package/android/build.gradle +130 -0
- package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +5 -0
- package/android/gradle.properties +4 -0
- package/android/gradlew +185 -0
- package/android/gradlew.bat +89 -0
- package/android/src/main/AndroidManifest.xml +33 -0
- package/android/src/main/java/com/dispatchsdk/DispatchSdkPackage.kt +23 -0
- package/android/src/main/java/com/dispatchsdk/errors/NativeSdkErrors.kt +24 -0
- package/android/src/main/java/com/dispatchsdk/signaturePad/RSSignatureCaptureContextModule.kt +15 -0
- package/android/src/main/java/com/dispatchsdk/signaturePad/RSSignatureCaptureMainView.kt +150 -0
- package/android/src/main/java/com/dispatchsdk/signaturePad/RSSignatureCaptureView.kt +355 -0
- package/android/src/main/java/com/dispatchsdk/signaturePad/RSSignatureCaptureViewManager.kt +132 -0
- package/android/src/main/java/com/dispatchsdk/signatureUtils/Bezier.kt +45 -0
- package/android/src/main/java/com/dispatchsdk/signatureUtils/ControlTimedPoints.kt +3 -0
- package/android/src/main/java/com/dispatchsdk/signatureUtils/TimedPoint.kt +19 -0
- package/android/src/main/java/com/dispatchsdk/sync/SyncEventService.kt +28 -0
- package/android/src/main/java/com/dispatchsdk/sync/SyncManagerService.kt +128 -0
- package/android/src/main/java/com/dispatchsdk/sync/SyncModule.kt +45 -0
- package/android/src/main/java/com/dispatchsdk/utils/DispatchSdkUtils.kt +121 -0
- package/android/src/main/java/com/dispatchsdk/utils/ModuleConfig.kt +21 -0
- package/android/src/main/java/com/dispatchsdk/utils/Tracer.kt +9 -0
- package/android/src/main/java/com/dispatchsdk/utils/Utils.kt +100 -0
- package/android/src/main/res/drawable/alert_background.xml +8 -0
- package/android/src/main/res/drawable/ic_baseline_sync_24.xml +5 -0
- package/android/src/main/res/font/ibmplexsans.ttf +0 -0
- package/android/src/main/res/values/styles.xml +10 -0
- package/android/src/main/res/xml/file_paths.xml +10 -0
- package/babel.config.js +3 -0
- package/foxtrotplatform-mobile-execution-lib-v0.6.4.tgz +0 -0
- package/lib/commonjs/components/dispatch/DispatchExecNavigator.js +249 -0
- package/lib/commonjs/components/dispatch/DispatchExecNavigator.js.map +1 -0
- package/lib/commonjs/components/executiontasks/CompletedWFSchema.js +6 -0
- package/lib/commonjs/components/executiontasks/CompletedWFSchema.js.map +1 -0
- package/lib/commonjs/components/executiontasks/ExecutionTasksIndex.js +192 -0
- package/lib/commonjs/components/executiontasks/ExecutionTasksIndex.js.map +1 -0
- package/lib/commonjs/components/executiontasks/cancellation/CancelET.js +110 -0
- package/lib/commonjs/components/executiontasks/cancellation/CancelET.js.map +1 -0
- package/lib/commonjs/components/executiontasks/cancellation/CancellationSchema.js +6 -0
- package/lib/commonjs/components/executiontasks/cancellation/CancellationSchema.js.map +1 -0
- package/lib/commonjs/components/executiontasks/captureInput/CaptureInputSchema.js +6 -0
- package/lib/commonjs/components/executiontasks/captureInput/CaptureInputSchema.js.map +1 -0
- package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js +69 -0
- package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js.map +1 -0
- package/lib/commonjs/components/executiontasks/deliver/DeliverET.js +105 -0
- package/lib/commonjs/components/executiontasks/deliver/DeliverET.js.map +1 -0
- package/lib/commonjs/components/executiontasks/deliver/DeliverETInput.js +6 -0
- package/lib/commonjs/components/executiontasks/deliver/DeliverETInput.js.map +1 -0
- package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js +197 -0
- package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js.map +1 -0
- package/lib/commonjs/components/executiontasks/display/DisplayModalET.js +126 -0
- package/lib/commonjs/components/executiontasks/display/DisplayModalET.js.map +1 -0
- package/lib/commonjs/components/executiontasks/display/DisplaySchema.js +6 -0
- package/lib/commonjs/components/executiontasks/display/DisplaySchema.js.map +1 -0
- package/lib/commonjs/components/executiontasks/doodle/DoodleUtils.js +28 -0
- package/lib/commonjs/components/executiontasks/doodle/DoodleUtils.js.map +1 -0
- package/lib/commonjs/components/executiontasks/doodle/SignatureET.js +190 -0
- package/lib/commonjs/components/executiontasks/doodle/SignatureET.js.map +1 -0
- package/lib/commonjs/components/executiontasks/doodle/SignatureSchema.js +6 -0
- package/lib/commonjs/components/executiontasks/doodle/SignatureSchema.js.map +1 -0
- package/lib/commonjs/components/executiontasks/dropCash/DropCashET.js +130 -0
- package/lib/commonjs/components/executiontasks/dropCash/DropCashET.js.map +1 -0
- package/lib/commonjs/components/executiontasks/dropCash/DropCashSchema.js +6 -0
- package/lib/commonjs/components/executiontasks/dropCash/DropCashSchema.js.map +1 -0
- package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js +137 -0
- package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js.map +1 -0
- package/lib/commonjs/components/executiontasks/forms/FormGenerator.js +116 -0
- package/lib/commonjs/components/executiontasks/forms/FormGenerator.js.map +1 -0
- package/lib/commonjs/components/executiontasks/forms/FormSchema.js +6 -0
- package/lib/commonjs/components/executiontasks/forms/FormSchema.js.map +1 -0
- package/lib/commonjs/components/executiontasks/forms/widgets/DateTimeWidget.js +152 -0
- package/lib/commonjs/components/executiontasks/forms/widgets/DateTimeWidget.js.map +1 -0
- package/lib/commonjs/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js +155 -0
- package/lib/commonjs/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js.map +1 -0
- package/lib/commonjs/components/executiontasks/forms/widgets/TimeRangeSelector.js +54 -0
- package/lib/commonjs/components/executiontasks/forms/widgets/TimeRangeSelector.js.map +1 -0
- package/lib/commonjs/components/executiontasks/httpRequest/HttpEtUtils.js +53 -0
- package/lib/commonjs/components/executiontasks/httpRequest/HttpEtUtils.js.map +1 -0
- package/lib/commonjs/components/executiontasks/httpRequest/HttpRequestET.js +61 -0
- package/lib/commonjs/components/executiontasks/httpRequest/HttpRequestET.js.map +1 -0
- package/lib/commonjs/components/executiontasks/httpRequest/HttpRequestETSchema.js +6 -0
- package/lib/commonjs/components/executiontasks/httpRequest/HttpRequestETSchema.js.map +1 -0
- package/lib/commonjs/components/executiontasks/imageCapture/CaptureSchema.js +6 -0
- package/lib/commonjs/components/executiontasks/imageCapture/CaptureSchema.js.map +1 -0
- package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js +159 -0
- package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -0
- package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js +256 -0
- package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js.map +1 -0
- package/lib/commonjs/components/executiontasks/payments/PaymentStyles.js +91 -0
- package/lib/commonjs/components/executiontasks/payments/PaymentStyles.js.map +1 -0
- package/lib/commonjs/components/executiontasks/payments/PaymentUtils.js +17 -0
- package/lib/commonjs/components/executiontasks/payments/PaymentUtils.js.map +1 -0
- package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js +111 -0
- package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -0
- package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentSchema.js +6 -0
- package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentSchema.js.map +1 -0
- package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js +139 -0
- package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js.map +1 -0
- package/lib/commonjs/components/executiontasks/payments/init/InitPaymentSchema.js +6 -0
- package/lib/commonjs/components/executiontasks/payments/init/InitPaymentSchema.js.map +1 -0
- package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js +146 -0
- package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -0
- package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentSchema.js +6 -0
- package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentSchema.js.map +1 -0
- package/lib/commonjs/components/executiontasks/pickup/PickpSchema.js +6 -0
- package/lib/commonjs/components/executiontasks/pickup/PickpSchema.js.map +1 -0
- package/lib/commonjs/components/executiontasks/pickup/PickupET.js +103 -0
- package/lib/commonjs/components/executiontasks/pickup/PickupET.js.map +1 -0
- package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js +115 -0
- package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scanner/CScanner.js +123 -0
- package/lib/commonjs/components/executiontasks/scanner/CScanner.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scanner/ScannerSchema.js +32 -0
- package/lib/commonjs/components/executiontasks/scanner/ScannerSchema.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scanner/ScannerUtils.js +193 -0
- package/lib/commonjs/components/executiontasks/scanner/ScannerUtils.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scanner/returns/DropDownSelector.js +20 -0
- package/lib/commonjs/components/executiontasks/scanner/returns/DropDownSelector.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scanner/returns/DropDownUtils.js +49 -0
- package/lib/commonjs/components/executiontasks/scanner/returns/DropDownUtils.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scanner/returns/RTReasonSelection.js +107 -0
- package/lib/commonjs/components/executiontasks/scanner/returns/RTReasonSelection.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scanner/returns/RTScan.js +317 -0
- package/lib/commonjs/components/executiontasks/scanner/returns/RTScan.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scanner/returns/ReasonDropDown.js +100 -0
- package/lib/commonjs/components/executiontasks/scanner/returns/ReasonDropDown.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scanner/returns/ScanList.js +276 -0
- package/lib/commonjs/components/executiontasks/scanner/returns/ScanList.js.map +1 -0
- package/lib/commonjs/components/executiontasks/verifyInput/VerifyInputSchema.js +6 -0
- package/lib/commonjs/components/executiontasks/verifyInput/VerifyInputSchema.js.map +1 -0
- package/lib/commonjs/components/executiontasks/verifyLocation/GeofenceUtils.js +66 -0
- package/lib/commonjs/components/executiontasks/verifyLocation/GeofenceUtils.js.map +1 -0
- package/lib/commonjs/components/executiontasks/verifyLocation/VerifyLocSchema.js +6 -0
- package/lib/commonjs/components/executiontasks/verifyLocation/VerifyLocSchema.js.map +1 -0
- package/lib/commonjs/components/executiontasks/verifyLocation/VerifyLocationET.js +69 -0
- package/lib/commonjs/components/executiontasks/verifyLocation/VerifyLocationET.js.map +1 -0
- package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpET.js +100 -0
- package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpET.js.map +1 -0
- package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpSchema.js +6 -0
- package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpSchema.js.map +1 -0
- package/lib/commonjs/components/widgets/AlertDisplay.js +25 -0
- package/lib/commonjs/components/widgets/AlertDisplay.js.map +1 -0
- package/lib/commonjs/components/widgets/CancelOrderDialog.js +101 -0
- package/lib/commonjs/components/widgets/CancelOrderDialog.js.map +1 -0
- package/lib/commonjs/components/widgets/ProgressDialog.js +59 -0
- package/lib/commonjs/components/widgets/ProgressDialog.js.map +1 -0
- package/lib/commonjs/components/widgets/SnackBarCustom.js +165 -0
- package/lib/commonjs/components/widgets/SnackBarCustom.js.map +1 -0
- package/lib/commonjs/components/widgets/Toaster.js +15 -0
- package/lib/commonjs/components/widgets/Toaster.js.map +1 -0
- package/lib/commonjs/config/DispatchSDKConfig.js +14 -0
- package/lib/commonjs/config/DispatchSDKConfig.js.map +1 -0
- package/lib/commonjs/constants/apiConstants.js +11 -0
- package/lib/commonjs/constants/apiConstants.js.map +1 -0
- package/lib/commonjs/constants/constants.js +25 -0
- package/lib/commonjs/constants/constants.js.map +1 -0
- package/lib/commonjs/constants/statuscode.js +18 -0
- package/lib/commonjs/constants/statuscode.js.map +1 -0
- package/lib/commonjs/errors/BaseError.js +30 -0
- package/lib/commonjs/errors/BaseError.js.map +1 -0
- package/lib/commonjs/errors/ErrorCodes.js +44 -0
- package/lib/commonjs/errors/ErrorCodes.js.map +1 -0
- package/lib/commonjs/index.js +164 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/manager/dispatch/DispatchStateContainer.js +442 -0
- package/lib/commonjs/manager/dispatch/DispatchStateContainer.js.map +1 -0
- package/lib/commonjs/manager/dispatchCodes/EventCodeContainer.js +13 -0
- package/lib/commonjs/manager/dispatchCodes/EventCodeContainer.js.map +1 -0
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeContainer.js +112 -0
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeContainer.js.map +1 -0
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeRepo.js +87 -0
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeRepo.js.map +1 -0
- package/lib/commonjs/manager/dispatchCodes/reasonCodes.json +137 -0
- package/lib/commonjs/manager/location/LocationManager.js +97 -0
- package/lib/commonjs/manager/location/LocationManager.js.map +1 -0
- package/lib/commonjs/manager/sdk/DispatchSDKManager.js +103 -0
- package/lib/commonjs/manager/sdk/DispatchSDKManager.js.map +1 -0
- package/lib/commonjs/manager/sdk/DispatchSdkCache.js +69 -0
- package/lib/commonjs/manager/sdk/DispatchSdkCache.js.map +1 -0
- package/lib/commonjs/manager/syncmanager/AppSyncManager.js +158 -0
- package/lib/commonjs/manager/syncmanager/AppSyncManager.js.map +1 -0
- package/lib/commonjs/manager/syncmanager/DBConfig.js +62 -0
- package/lib/commonjs/manager/syncmanager/DBConfig.js.map +1 -0
- package/lib/commonjs/manager/syncmanager/NativeSyncManager.js +15 -0
- package/lib/commonjs/manager/syncmanager/NativeSyncManager.js.map +1 -0
- package/lib/commonjs/manager/syncmanager/database.js +48 -0
- package/lib/commonjs/manager/syncmanager/database.js.map +1 -0
- package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js +125 -0
- package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js.map +1 -0
- package/lib/commonjs/manager/syncmanager/document/DocumentManager.js +113 -0
- package/lib/commonjs/manager/syncmanager/document/DocumentManager.js.map +1 -0
- package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js +200 -0
- package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js.map +1 -0
- package/lib/commonjs/manager/syncmanager/document/models.js +2 -0
- package/lib/commonjs/manager/syncmanager/document/models.js.map +1 -0
- package/lib/commonjs/manager/syncmanager/events/ETEventsManager.js +117 -0
- package/lib/commonjs/manager/syncmanager/events/ETEventsManager.js.map +1 -0
- package/lib/commonjs/manager/syncmanager/events/EventsGraphQLClient.js +2 -0
- package/lib/commonjs/manager/syncmanager/events/EventsGraphQLClient.js.map +1 -0
- package/lib/commonjs/manager/syncmanager/events/EventsSyncManager.js +279 -0
- package/lib/commonjs/manager/syncmanager/events/EventsSyncManager.js.map +1 -0
- package/lib/commonjs/manager/syncmanager/events/SyncHttpClient.js +79 -0
- package/lib/commonjs/manager/syncmanager/events/SyncHttpClient.js.map +1 -0
- package/lib/commonjs/models/DispatchModels.js +14 -0
- package/lib/commonjs/models/DispatchModels.js.map +1 -0
- package/lib/commonjs/models/ReasonCodes.js +2 -0
- package/lib/commonjs/models/ReasonCodes.js.map +1 -0
- package/lib/commonjs/models/auth.js +2 -0
- package/lib/commonjs/models/auth.js.map +1 -0
- package/lib/commonjs/models/execTasks/ETBaseModels.js +2 -0
- package/lib/commonjs/models/execTasks/ETBaseModels.js.map +1 -0
- package/lib/commonjs/models/execTasks/ETConfig.js +116 -0
- package/lib/commonjs/models/execTasks/ETConfig.js.map +1 -0
- package/lib/commonjs/models/execution.js +2 -0
- package/lib/commonjs/models/execution.js.map +1 -0
- package/lib/commonjs/models/fcm.js +2 -0
- package/lib/commonjs/models/fcm.js.map +1 -0
- package/lib/commonjs/models/sdk.js +15 -0
- package/lib/commonjs/models/sdk.js.map +1 -0
- package/lib/commonjs/native/signature/SignatureCapture.js +94 -0
- package/lib/commonjs/native/signature/SignatureCapture.js.map +1 -0
- package/lib/commonjs/network/GraphQLClient.js +149 -0
- package/lib/commonjs/network/GraphQLClient.js.map +1 -0
- package/lib/commonjs/network/NetworkClient.js +57 -0
- package/lib/commonjs/network/NetworkClient.js.map +1 -0
- package/lib/commonjs/network/NetworkUtils.js +36 -0
- package/lib/commonjs/network/NetworkUtils.js.map +1 -0
- package/lib/commonjs/network/Queries.js +55 -0
- package/lib/commonjs/network/Queries.js.map +1 -0
- package/lib/commonjs/network/client.js +87 -0
- package/lib/commonjs/network/client.js.map +1 -0
- package/lib/commonjs/res/strings.js +9 -0
- package/lib/commonjs/res/strings.js.map +1 -0
- package/lib/commonjs/resources/Login.js +52 -0
- package/lib/commonjs/resources/Login.js.map +1 -0
- package/lib/commonjs/resources/network.js +28 -0
- package/lib/commonjs/resources/network.js.map +1 -0
- package/lib/commonjs/styles/SdkColors.js +30 -0
- package/lib/commonjs/styles/SdkColors.js.map +1 -0
- package/lib/commonjs/styles/executionTasks/CommonStyles.js +168 -0
- package/lib/commonjs/styles/executionTasks/CommonStyles.js.map +1 -0
- package/lib/commonjs/ui/screens/CancellationScreen.js +64 -0
- package/lib/commonjs/ui/screens/CancellationScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/CaptureInputScreen.js +74 -0
- package/lib/commonjs/ui/screens/CaptureInputScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/CompleteObjectiveScreen.js +68 -0
- package/lib/commonjs/ui/screens/CompleteObjectiveScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/DeliverScreen.js +75 -0
- package/lib/commonjs/ui/screens/DeliverScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/DisplayScreen.js +43 -0
- package/lib/commonjs/ui/screens/DisplayScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/DoodleScreen.js +79 -0
- package/lib/commonjs/ui/screens/DoodleScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/DropCashScreen.js +89 -0
- package/lib/commonjs/ui/screens/DropCashScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/ETScreensIndex.js +128 -0
- package/lib/commonjs/ui/screens/ETScreensIndex.js.map +1 -0
- package/lib/commonjs/ui/screens/FormsScreen.js +45 -0
- package/lib/commonjs/ui/screens/FormsScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/GeofenceScreen.js +47 -0
- package/lib/commonjs/ui/screens/GeofenceScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/HttpRequestScreen.js +38 -0
- package/lib/commonjs/ui/screens/HttpRequestScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/ImageCaptureScreen.js +44 -0
- package/lib/commonjs/ui/screens/ImageCaptureScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/PaymentScreen.js +142 -0
- package/lib/commonjs/ui/screens/PaymentScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/PickupScreen.js +48 -0
- package/lib/commonjs/ui/screens/PickupScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/RTScanScreen.js +118 -0
- package/lib/commonjs/ui/screens/RTScanScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/StartWorkFlowScreen.js +137 -0
- package/lib/commonjs/ui/screens/StartWorkFlowScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/WithBaseDispatchScreen.js +52 -0
- package/lib/commonjs/ui/screens/WithBaseDispatchScreen.js.map +1 -0
- package/lib/commonjs/ui/uiConfig/RouteParams.js +16 -0
- package/lib/commonjs/ui/uiConfig/RouteParams.js.map +1 -0
- package/lib/commonjs/utils/ExecTaskUtils.js +113 -0
- package/lib/commonjs/utils/ExecTaskUtils.js.map +1 -0
- package/lib/commonjs/utils/Logger.js +114 -0
- package/lib/commonjs/utils/Logger.js.map +1 -0
- package/lib/commonjs/utils/NetworkUtil.js +66 -0
- package/lib/commonjs/utils/NetworkUtil.js.map +1 -0
- package/lib/commonjs/utils/SdkUtils.js +129 -0
- package/lib/commonjs/utils/SdkUtils.js.map +1 -0
- package/lib/commonjs/utils/SyncManagerUtils.js +136 -0
- package/lib/commonjs/utils/SyncManagerUtils.js.map +1 -0
- package/lib/commonjs/utils/fcm/FCM.js +58 -0
- package/lib/commonjs/utils/fcm/FCM.js.map +1 -0
- package/lib/commonjs/utils/fcm/FcmUtils.js +98 -0
- package/lib/commonjs/utils/fcm/FcmUtils.js.map +1 -0
- package/lib/commonjs/utils/helper.js +37 -0
- package/lib/commonjs/utils/helper.js.map +1 -0
- package/lib/commonjs/utils/loginHelper.js +70 -0
- package/lib/commonjs/utils/loginHelper.js.map +1 -0
- package/lib/commonjs/utils/storage.js +153 -0
- package/lib/commonjs/utils/storage.js.map +1 -0
- package/lib/commonjs/utils/test.json +17 -0
- package/lib/commonjs/utils/utils.js +38 -0
- package/lib/commonjs/utils/utils.js.map +1 -0
- package/lib/foxtrotplatform-mobile-execution-lib-v0.6.4.tgz +0 -0
- package/lib/module/components/dispatch/DispatchExecNavigator.js +228 -0
- package/lib/module/components/dispatch/DispatchExecNavigator.js.map +1 -0
- package/lib/module/components/executiontasks/CompletedWFSchema.js +2 -0
- package/lib/module/components/executiontasks/CompletedWFSchema.js.map +1 -0
- package/lib/module/components/executiontasks/ExecutionTasksIndex.js +25 -0
- package/lib/module/components/executiontasks/ExecutionTasksIndex.js.map +1 -0
- package/lib/module/components/executiontasks/cancellation/CancelET.js +93 -0
- package/lib/module/components/executiontasks/cancellation/CancelET.js.map +1 -0
- package/lib/module/components/executiontasks/cancellation/CancellationSchema.js +2 -0
- package/lib/module/components/executiontasks/cancellation/CancellationSchema.js.map +1 -0
- package/lib/module/components/executiontasks/captureInput/CaptureInputSchema.js +2 -0
- package/lib/module/components/executiontasks/captureInput/CaptureInputSchema.js.map +1 -0
- package/lib/module/components/executiontasks/captureInput/CaptureText.js +50 -0
- package/lib/module/components/executiontasks/captureInput/CaptureText.js.map +1 -0
- package/lib/module/components/executiontasks/deliver/DeliverET.js +87 -0
- package/lib/module/components/executiontasks/deliver/DeliverET.js.map +1 -0
- package/lib/module/components/executiontasks/deliver/DeliverETInput.js +2 -0
- package/lib/module/components/executiontasks/deliver/DeliverETInput.js.map +1 -0
- package/lib/module/components/executiontasks/deliver/SLDeliverET.js +175 -0
- package/lib/module/components/executiontasks/deliver/SLDeliverET.js.map +1 -0
- package/lib/module/components/executiontasks/display/DisplayModalET.js +107 -0
- package/lib/module/components/executiontasks/display/DisplayModalET.js.map +1 -0
- package/lib/module/components/executiontasks/display/DisplaySchema.js +2 -0
- package/lib/module/components/executiontasks/display/DisplaySchema.js.map +1 -0
- package/lib/module/components/executiontasks/doodle/DoodleUtils.js +19 -0
- package/lib/module/components/executiontasks/doodle/DoodleUtils.js.map +1 -0
- package/lib/module/components/executiontasks/doodle/SignatureET.js +163 -0
- package/lib/module/components/executiontasks/doodle/SignatureET.js.map +1 -0
- package/lib/module/components/executiontasks/doodle/SignatureSchema.js +2 -0
- package/lib/module/components/executiontasks/doodle/SignatureSchema.js.map +1 -0
- package/lib/module/components/executiontasks/dropCash/DropCashET.js +108 -0
- package/lib/module/components/executiontasks/dropCash/DropCashET.js.map +1 -0
- package/lib/module/components/executiontasks/dropCash/DropCashSchema.js +2 -0
- package/lib/module/components/executiontasks/dropCash/DropCashSchema.js.map +1 -0
- package/lib/module/components/executiontasks/dropCash/SLDropCash.js +117 -0
- package/lib/module/components/executiontasks/dropCash/SLDropCash.js.map +1 -0
- package/lib/module/components/executiontasks/forms/FormGenerator.js +90 -0
- package/lib/module/components/executiontasks/forms/FormGenerator.js.map +1 -0
- package/lib/module/components/executiontasks/forms/FormSchema.js +2 -0
- package/lib/module/components/executiontasks/forms/FormSchema.js.map +1 -0
- package/lib/module/components/executiontasks/forms/widgets/DateTimeWidget.js +132 -0
- package/lib/module/components/executiontasks/forms/widgets/DateTimeWidget.js.map +1 -0
- package/lib/module/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js +134 -0
- package/lib/module/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js.map +1 -0
- package/lib/module/components/executiontasks/forms/widgets/TimeRangeSelector.js +37 -0
- package/lib/module/components/executiontasks/forms/widgets/TimeRangeSelector.js.map +1 -0
- package/lib/module/components/executiontasks/httpRequest/HttpEtUtils.js +33 -0
- package/lib/module/components/executiontasks/httpRequest/HttpEtUtils.js.map +1 -0
- package/lib/module/components/executiontasks/httpRequest/HttpRequestET.js +42 -0
- package/lib/module/components/executiontasks/httpRequest/HttpRequestET.js.map +1 -0
- package/lib/module/components/executiontasks/httpRequest/HttpRequestETSchema.js +2 -0
- package/lib/module/components/executiontasks/httpRequest/HttpRequestETSchema.js.map +1 -0
- package/lib/module/components/executiontasks/imageCapture/CaptureSchema.js +2 -0
- package/lib/module/components/executiontasks/imageCapture/CaptureSchema.js.map +1 -0
- package/lib/module/components/executiontasks/imageCapture/CaptureUtils.js +120 -0
- package/lib/module/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -0
- package/lib/module/components/executiontasks/imageCapture/ImageCapture.js +232 -0
- package/lib/module/components/executiontasks/imageCapture/ImageCapture.js.map +1 -0
- package/lib/module/components/executiontasks/payments/PaymentStyles.js +80 -0
- package/lib/module/components/executiontasks/payments/PaymentStyles.js.map +1 -0
- package/lib/module/components/executiontasks/payments/PaymentUtils.js +8 -0
- package/lib/module/components/executiontasks/payments/PaymentUtils.js.map +1 -0
- package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentET.js +90 -0
- package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -0
- package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentSchema.js +2 -0
- package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentSchema.js.map +1 -0
- package/lib/module/components/executiontasks/payments/init/InitPaymentET.js +116 -0
- package/lib/module/components/executiontasks/payments/init/InitPaymentET.js.map +1 -0
- package/lib/module/components/executiontasks/payments/init/InitPaymentSchema.js +2 -0
- package/lib/module/components/executiontasks/payments/init/InitPaymentSchema.js.map +1 -0
- package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentET.js +124 -0
- package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -0
- package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentSchema.js +2 -0
- package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentSchema.js.map +1 -0
- package/lib/module/components/executiontasks/pickup/PickpSchema.js +2 -0
- package/lib/module/components/executiontasks/pickup/PickpSchema.js.map +1 -0
- package/lib/module/components/executiontasks/pickup/PickupET.js +85 -0
- package/lib/module/components/executiontasks/pickup/PickupET.js.map +1 -0
- package/lib/module/components/executiontasks/pickup/SLPickupET.js +94 -0
- package/lib/module/components/executiontasks/pickup/SLPickupET.js.map +1 -0
- package/lib/module/components/executiontasks/scanner/CScanner.js +101 -0
- package/lib/module/components/executiontasks/scanner/CScanner.js.map +1 -0
- package/lib/module/components/executiontasks/scanner/ScannerSchema.js +24 -0
- package/lib/module/components/executiontasks/scanner/ScannerSchema.js.map +1 -0
- package/lib/module/components/executiontasks/scanner/ScannerUtils.js +158 -0
- package/lib/module/components/executiontasks/scanner/ScannerUtils.js.map +1 -0
- package/lib/module/components/executiontasks/scanner/returns/DropDownSelector.js +9 -0
- package/lib/module/components/executiontasks/scanner/returns/DropDownSelector.js.map +1 -0
- package/lib/module/components/executiontasks/scanner/returns/DropDownUtils.js +38 -0
- package/lib/module/components/executiontasks/scanner/returns/DropDownUtils.js.map +1 -0
- package/lib/module/components/executiontasks/scanner/returns/RTReasonSelection.js +86 -0
- package/lib/module/components/executiontasks/scanner/returns/RTReasonSelection.js.map +1 -0
- package/lib/module/components/executiontasks/scanner/returns/RTScan.js +287 -0
- package/lib/module/components/executiontasks/scanner/returns/RTScan.js.map +1 -0
- package/lib/module/components/executiontasks/scanner/returns/ReasonDropDown.js +80 -0
- package/lib/module/components/executiontasks/scanner/returns/ReasonDropDown.js.map +1 -0
- package/lib/module/components/executiontasks/scanner/returns/ScanList.js +253 -0
- package/lib/module/components/executiontasks/scanner/returns/ScanList.js.map +1 -0
- package/lib/module/components/executiontasks/verifyInput/VerifyInputSchema.js +2 -0
- package/lib/module/components/executiontasks/verifyInput/VerifyInputSchema.js.map +1 -0
- package/lib/module/components/executiontasks/verifyLocation/GeofenceUtils.js +50 -0
- package/lib/module/components/executiontasks/verifyLocation/GeofenceUtils.js.map +1 -0
- package/lib/module/components/executiontasks/verifyLocation/VerifyLocSchema.js +2 -0
- package/lib/module/components/executiontasks/verifyLocation/VerifyLocSchema.js.map +1 -0
- package/lib/module/components/executiontasks/verifyLocation/VerifyLocationET.js +45 -0
- package/lib/module/components/executiontasks/verifyLocation/VerifyLocationET.js.map +1 -0
- package/lib/module/components/executiontasks/verifyOtp/VerifyOtpET.js +78 -0
- package/lib/module/components/executiontasks/verifyOtp/VerifyOtpET.js.map +1 -0
- package/lib/module/components/executiontasks/verifyOtp/VerifyOtpSchema.js +2 -0
- package/lib/module/components/executiontasks/verifyOtp/VerifyOtpSchema.js.map +1 -0
- package/lib/module/components/widgets/AlertDisplay.js +12 -0
- package/lib/module/components/widgets/AlertDisplay.js.map +1 -0
- package/lib/module/components/widgets/CancelOrderDialog.js +81 -0
- package/lib/module/components/widgets/CancelOrderDialog.js.map +1 -0
- package/lib/module/components/widgets/ProgressDialog.js +46 -0
- package/lib/module/components/widgets/ProgressDialog.js.map +1 -0
- package/lib/module/components/widgets/SnackBarCustom.js +138 -0
- package/lib/module/components/widgets/SnackBarCustom.js.map +1 -0
- package/lib/module/components/widgets/Toaster.js +7 -0
- package/lib/module/components/widgets/Toaster.js.map +1 -0
- package/lib/module/config/DispatchSDKConfig.js +7 -0
- package/lib/module/config/DispatchSDKConfig.js.map +1 -0
- package/lib/module/constants/apiConstants.js +4 -0
- package/lib/module/constants/apiConstants.js.map +1 -0
- package/lib/module/constants/constants.js +10 -0
- package/lib/module/constants/constants.js.map +1 -0
- package/lib/module/constants/statuscode.js +11 -0
- package/lib/module/constants/statuscode.js.map +1 -0
- package/lib/module/errors/BaseError.js +21 -0
- package/lib/module/errors/BaseError.js.map +1 -0
- package/lib/module/errors/ErrorCodes.js +32 -0
- package/lib/module/errors/ErrorCodes.js.map +1 -0
- package/lib/module/index.js +24 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/manager/dispatch/DispatchStateContainer.js +405 -0
- package/lib/module/manager/dispatch/DispatchStateContainer.js.map +1 -0
- package/lib/module/manager/dispatchCodes/EventCodeContainer.js +5 -0
- package/lib/module/manager/dispatchCodes/EventCodeContainer.js.map +1 -0
- package/lib/module/manager/dispatchCodes/ReasonCodeContainer.js +89 -0
- package/lib/module/manager/dispatchCodes/ReasonCodeContainer.js.map +1 -0
- package/lib/module/manager/dispatchCodes/ReasonCodeRepo.js +72 -0
- package/lib/module/manager/dispatchCodes/ReasonCodeRepo.js.map +1 -0
- package/lib/module/manager/dispatchCodes/reasonCodes.json +137 -0
- package/lib/module/manager/location/LocationManager.js +83 -0
- package/lib/module/manager/location/LocationManager.js.map +1 -0
- package/lib/module/manager/sdk/DispatchSDKManager.js +71 -0
- package/lib/module/manager/sdk/DispatchSDKManager.js.map +1 -0
- package/lib/module/manager/sdk/DispatchSdkCache.js +57 -0
- package/lib/module/manager/sdk/DispatchSdkCache.js.map +1 -0
- package/lib/module/manager/syncmanager/AppSyncManager.js +128 -0
- package/lib/module/manager/syncmanager/AppSyncManager.js.map +1 -0
- package/lib/module/manager/syncmanager/DBConfig.js +48 -0
- package/lib/module/manager/syncmanager/DBConfig.js.map +1 -0
- package/lib/module/manager/syncmanager/NativeSyncManager.js +6 -0
- package/lib/module/manager/syncmanager/NativeSyncManager.js.map +1 -0
- package/lib/module/manager/syncmanager/database.js +30 -0
- package/lib/module/manager/syncmanager/database.js.map +1 -0
- package/lib/module/manager/syncmanager/document/DocumentHttpClient.js +104 -0
- package/lib/module/manager/syncmanager/document/DocumentHttpClient.js.map +1 -0
- package/lib/module/manager/syncmanager/document/DocumentManager.js +98 -0
- package/lib/module/manager/syncmanager/document/DocumentManager.js.map +1 -0
- package/lib/module/manager/syncmanager/document/DocumentSyncManager.js +173 -0
- package/lib/module/manager/syncmanager/document/DocumentSyncManager.js.map +1 -0
- package/lib/module/manager/syncmanager/document/models.js +2 -0
- package/lib/module/manager/syncmanager/document/models.js.map +1 -0
- package/lib/module/manager/syncmanager/events/ETEventsManager.js +101 -0
- package/lib/module/manager/syncmanager/events/ETEventsManager.js.map +1 -0
- package/lib/module/manager/syncmanager/events/EventsGraphQLClient.js +2 -0
- package/lib/module/manager/syncmanager/events/EventsGraphQLClient.js.map +1 -0
- package/lib/module/manager/syncmanager/events/EventsSyncManager.js +247 -0
- package/lib/module/manager/syncmanager/events/EventsSyncManager.js.map +1 -0
- package/lib/module/manager/syncmanager/events/SyncHttpClient.js +63 -0
- package/lib/module/manager/syncmanager/events/SyncHttpClient.js.map +1 -0
- package/lib/module/models/DispatchModels.js +7 -0
- package/lib/module/models/DispatchModels.js.map +1 -0
- package/lib/module/models/ReasonCodes.js +2 -0
- package/lib/module/models/ReasonCodes.js.map +1 -0
- package/lib/module/models/auth.js +2 -0
- package/lib/module/models/auth.js.map +1 -0
- package/lib/module/models/execTasks/ETBaseModels.js +2 -0
- package/lib/module/models/execTasks/ETBaseModels.js.map +1 -0
- package/lib/module/models/execTasks/ETConfig.js +104 -0
- package/lib/module/models/execTasks/ETConfig.js.map +1 -0
- package/lib/module/models/execution.js +2 -0
- package/lib/module/models/execution.js.map +1 -0
- package/lib/module/models/fcm.js +2 -0
- package/lib/module/models/fcm.js.map +1 -0
- package/lib/module/models/sdk.js +8 -0
- package/lib/module/models/sdk.js.map +1 -0
- package/lib/module/native/signature/SignatureCapture.js +80 -0
- package/lib/module/native/signature/SignatureCapture.js.map +1 -0
- package/lib/module/network/GraphQLClient.js +132 -0
- package/lib/module/network/GraphQLClient.js.map +1 -0
- package/lib/module/network/NetworkClient.js +42 -0
- package/lib/module/network/NetworkClient.js.map +1 -0
- package/lib/module/network/NetworkUtils.js +23 -0
- package/lib/module/network/NetworkUtils.js.map +1 -0
- package/lib/module/network/Queries.js +42 -0
- package/lib/module/network/Queries.js.map +1 -0
- package/lib/module/network/client.js +74 -0
- package/lib/module/network/client.js.map +1 -0
- package/lib/module/res/strings.js +2 -0
- package/lib/module/res/strings.js.map +1 -0
- package/lib/module/resources/Login.js +42 -0
- package/lib/module/resources/Login.js.map +1 -0
- package/lib/module/resources/network.js +18 -0
- package/lib/module/resources/network.js.map +1 -0
- package/lib/module/styles/SdkColors.js +22 -0
- package/lib/module/styles/SdkColors.js.map +1 -0
- package/lib/module/styles/executionTasks/CommonStyles.js +146 -0
- package/lib/module/styles/executionTasks/CommonStyles.js.map +1 -0
- package/lib/module/ui/screens/CancellationScreen.js +41 -0
- package/lib/module/ui/screens/CancellationScreen.js.map +1 -0
- package/lib/module/ui/screens/CaptureInputScreen.js +52 -0
- package/lib/module/ui/screens/CaptureInputScreen.js.map +1 -0
- package/lib/module/ui/screens/CompleteObjectiveScreen.js +42 -0
- package/lib/module/ui/screens/CompleteObjectiveScreen.js.map +1 -0
- package/lib/module/ui/screens/DeliverScreen.js +53 -0
- package/lib/module/ui/screens/DeliverScreen.js.map +1 -0
- package/lib/module/ui/screens/DisplayScreen.js +27 -0
- package/lib/module/ui/screens/DisplayScreen.js.map +1 -0
- package/lib/module/ui/screens/DoodleScreen.js +56 -0
- package/lib/module/ui/screens/DoodleScreen.js.map +1 -0
- package/lib/module/ui/screens/DropCashScreen.js +67 -0
- package/lib/module/ui/screens/DropCashScreen.js.map +1 -0
- package/lib/module/ui/screens/ETScreensIndex.js +17 -0
- package/lib/module/ui/screens/ETScreensIndex.js.map +1 -0
- package/lib/module/ui/screens/FormsScreen.js +28 -0
- package/lib/module/ui/screens/FormsScreen.js.map +1 -0
- package/lib/module/ui/screens/GeofenceScreen.js +30 -0
- package/lib/module/ui/screens/GeofenceScreen.js.map +1 -0
- package/lib/module/ui/screens/HttpRequestScreen.js +23 -0
- package/lib/module/ui/screens/HttpRequestScreen.js.map +1 -0
- package/lib/module/ui/screens/ImageCaptureScreen.js +27 -0
- package/lib/module/ui/screens/ImageCaptureScreen.js.map +1 -0
- package/lib/module/ui/screens/PaymentScreen.js +119 -0
- package/lib/module/ui/screens/PaymentScreen.js.map +1 -0
- package/lib/module/ui/screens/PickupScreen.js +32 -0
- package/lib/module/ui/screens/PickupScreen.js.map +1 -0
- package/lib/module/ui/screens/RTScanScreen.js +93 -0
- package/lib/module/ui/screens/RTScanScreen.js.map +1 -0
- package/lib/module/ui/screens/StartWorkFlowScreen.js +105 -0
- package/lib/module/ui/screens/StartWorkFlowScreen.js.map +1 -0
- package/lib/module/ui/screens/WithBaseDispatchScreen.js +35 -0
- package/lib/module/ui/screens/WithBaseDispatchScreen.js.map +1 -0
- package/lib/module/ui/uiConfig/RouteParams.js +9 -0
- package/lib/module/ui/uiConfig/RouteParams.js.map +1 -0
- package/lib/module/utils/ExecTaskUtils.js +93 -0
- package/lib/module/utils/ExecTaskUtils.js.map +1 -0
- package/lib/module/utils/Logger.js +97 -0
- package/lib/module/utils/Logger.js.map +1 -0
- package/lib/module/utils/NetworkUtil.js +54 -0
- package/lib/module/utils/NetworkUtil.js.map +1 -0
- package/lib/module/utils/SdkUtils.js +103 -0
- package/lib/module/utils/SdkUtils.js.map +1 -0
- package/lib/module/utils/SyncManagerUtils.js +93 -0
- package/lib/module/utils/SyncManagerUtils.js.map +1 -0
- package/lib/module/utils/fcm/FCM.js +36 -0
- package/lib/module/utils/fcm/FCM.js.map +1 -0
- package/lib/module/utils/fcm/FcmUtils.js +68 -0
- package/lib/module/utils/fcm/FcmUtils.js.map +1 -0
- package/lib/module/utils/helper.js +27 -0
- package/lib/module/utils/helper.js.map +1 -0
- package/lib/module/utils/loginHelper.js +60 -0
- package/lib/module/utils/loginHelper.js.map +1 -0
- package/lib/module/utils/storage.js +142 -0
- package/lib/module/utils/storage.js.map +1 -0
- package/lib/module/utils/test.json +17 -0
- package/lib/module/utils/utils.js +24 -0
- package/lib/module/utils/utils.js.map +1 -0
- package/lib/typescript/components/dispatch/DispatchExecNavigator.d.ts +5 -0
- package/lib/typescript/components/executiontasks/CompletedWFSchema.d.ts +18 -0
- package/lib/typescript/components/executiontasks/ExecutionTasksIndex.d.ts +42 -0
- package/lib/typescript/components/executiontasks/cancellation/CancelET.d.ts +4 -0
- package/lib/typescript/components/executiontasks/cancellation/CancellationSchema.d.ts +12 -0
- package/lib/typescript/components/executiontasks/captureInput/CaptureInputSchema.d.ts +43 -0
- package/lib/typescript/components/executiontasks/captureInput/CaptureText.d.ts +4 -0
- package/lib/typescript/components/executiontasks/deliver/DeliverET.d.ts +4 -0
- package/lib/typescript/components/executiontasks/deliver/DeliverETInput.d.ts +42 -0
- package/lib/typescript/components/executiontasks/deliver/SLDeliverET.d.ts +8 -0
- package/lib/typescript/components/executiontasks/display/DisplayModalET.d.ts +4 -0
- package/lib/typescript/components/executiontasks/display/DisplaySchema.d.ts +23 -0
- package/lib/typescript/components/executiontasks/doodle/DoodleUtils.d.ts +3 -0
- package/lib/typescript/components/executiontasks/doodle/SignatureET.d.ts +4 -0
- package/lib/typescript/components/executiontasks/doodle/SignatureSchema.d.ts +48 -0
- package/lib/typescript/components/executiontasks/dropCash/DropCashET.d.ts +4 -0
- package/lib/typescript/components/executiontasks/dropCash/DropCashSchema.d.ts +17 -0
- package/lib/typescript/components/executiontasks/dropCash/SLDropCash.d.ts +4 -0
- package/lib/typescript/components/executiontasks/forms/FormGenerator.d.ts +4 -0
- package/lib/typescript/components/executiontasks/forms/FormSchema.d.ts +24 -0
- package/lib/typescript/components/executiontasks/forms/widgets/DateTimeWidget.d.ts +11 -0
- package/lib/typescript/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.d.ts +8 -0
- package/lib/typescript/components/executiontasks/forms/widgets/TimeRangeSelector.d.ts +4 -0
- package/lib/typescript/components/executiontasks/httpRequest/HttpEtUtils.d.ts +4 -0
- package/lib/typescript/components/executiontasks/httpRequest/HttpRequestET.d.ts +4 -0
- package/lib/typescript/components/executiontasks/httpRequest/HttpRequestETSchema.d.ts +36 -0
- package/lib/typescript/components/executiontasks/imageCapture/CaptureSchema.d.ts +79 -0
- package/lib/typescript/components/executiontasks/imageCapture/CaptureUtils.d.ts +9 -0
- package/lib/typescript/components/executiontasks/imageCapture/ImageCapture.d.ts +4 -0
- package/lib/typescript/components/executiontasks/payments/PaymentStyles.d.ts +78 -0
- package/lib/typescript/components/executiontasks/payments/PaymentUtils.d.ts +2 -0
- package/lib/typescript/components/executiontasks/payments/completePayment/CompletePaymentET.d.ts +4 -0
- package/lib/typescript/components/executiontasks/payments/completePayment/CompletePaymentSchema.d.ts +18 -0
- package/lib/typescript/components/executiontasks/payments/init/InitPaymentET.d.ts +4 -0
- package/lib/typescript/components/executiontasks/payments/init/InitPaymentSchema.d.ts +31 -0
- package/lib/typescript/components/executiontasks/payments/processPayment/ProcessPaymentET.d.ts +4 -0
- package/lib/typescript/components/executiontasks/payments/processPayment/ProcessPaymentSchema.d.ts +33 -0
- package/lib/typescript/components/executiontasks/pickup/PickpSchema.d.ts +25 -0
- package/lib/typescript/components/executiontasks/pickup/PickupET.d.ts +4 -0
- package/lib/typescript/components/executiontasks/pickup/SLPickupET.d.ts +8 -0
- package/lib/typescript/components/executiontasks/scanner/CScanner.d.ts +7 -0
- package/lib/typescript/components/executiontasks/scanner/ScannerSchema.d.ts +75 -0
- package/lib/typescript/components/executiontasks/scanner/ScannerUtils.d.ts +15 -0
- package/lib/typescript/components/executiontasks/scanner/returns/DropDownSelector.d.ts +3 -0
- package/lib/typescript/components/executiontasks/scanner/returns/DropDownUtils.d.ts +3 -0
- package/lib/typescript/components/executiontasks/scanner/returns/RTReasonSelection.d.ts +7 -0
- package/lib/typescript/components/executiontasks/scanner/returns/RTScan.d.ts +4 -0
- package/lib/typescript/components/executiontasks/scanner/returns/ReasonDropDown.d.ts +14 -0
- package/lib/typescript/components/executiontasks/scanner/returns/ScanList.d.ts +17 -0
- package/lib/typescript/components/executiontasks/verifyInput/VerifyInputSchema.d.ts +41 -0
- package/lib/typescript/components/executiontasks/verifyLocation/GeofenceUtils.d.ts +2 -0
- package/lib/typescript/components/executiontasks/verifyLocation/VerifyLocSchema.d.ts +50 -0
- package/lib/typescript/components/executiontasks/verifyLocation/VerifyLocationET.d.ts +4 -0
- package/lib/typescript/components/executiontasks/verifyOtp/VerifyOtpET.d.ts +4 -0
- package/lib/typescript/components/executiontasks/verifyOtp/VerifyOtpSchema.d.ts +21 -0
- package/lib/typescript/components/widgets/AlertDisplay.d.ts +1 -0
- package/lib/typescript/components/widgets/CancelOrderDialog.d.ts +13 -0
- package/lib/typescript/components/widgets/ProgressDialog.d.ts +7 -0
- package/lib/typescript/components/widgets/SnackBarCustom.d.ts +20 -0
- package/lib/typescript/components/widgets/Toaster.d.ts +1 -0
- package/lib/typescript/config/DispatchSDKConfig.d.ts +4 -0
- package/lib/typescript/constants/apiConstants.d.ts +3 -0
- package/lib/typescript/constants/constants.d.ts +9 -0
- package/lib/typescript/constants/statuscode.d.ts +7 -0
- package/lib/typescript/errors/BaseError.d.ts +10 -0
- package/lib/typescript/errors/ErrorCodes.d.ts +28 -0
- package/lib/typescript/index.d.ts +31 -0
- package/lib/typescript/manager/dispatch/DispatchStateContainer.d.ts +41 -0
- package/lib/typescript/manager/dispatchCodes/EventCodeContainer.d.ts +1 -0
- package/lib/typescript/manager/dispatchCodes/ReasonCodeContainer.d.ts +12 -0
- package/lib/typescript/manager/dispatchCodes/ReasonCodeRepo.d.ts +13 -0
- package/lib/typescript/manager/location/LocationManager.d.ts +14 -0
- package/lib/typescript/manager/sdk/DispatchSDKManager.d.ts +14 -0
- package/lib/typescript/manager/sdk/DispatchSdkCache.d.ts +17 -0
- package/lib/typescript/manager/syncmanager/AppSyncManager.d.ts +24 -0
- package/lib/typescript/manager/syncmanager/DBConfig.d.ts +77 -0
- package/lib/typescript/manager/syncmanager/NativeSyncManager.d.ts +6 -0
- package/lib/typescript/manager/syncmanager/database.d.ts +2 -0
- package/lib/typescript/manager/syncmanager/document/DocumentHttpClient.d.ts +9 -0
- package/lib/typescript/manager/syncmanager/document/DocumentManager.d.ts +15 -0
- package/lib/typescript/manager/syncmanager/document/DocumentSyncManager.d.ts +25 -0
- package/lib/typescript/manager/syncmanager/document/models.d.ts +4 -0
- package/lib/typescript/manager/syncmanager/events/ETEventsManager.d.ts +16 -0
- package/lib/typescript/manager/syncmanager/events/EventsGraphQLClient.d.ts +0 -0
- package/lib/typescript/manager/syncmanager/events/EventsSyncManager.d.ts +30 -0
- package/lib/typescript/manager/syncmanager/events/SyncHttpClient.d.ts +9 -0
- package/lib/typescript/models/DispatchModels.d.ts +17 -0
- package/lib/typescript/models/ReasonCodes.d.ts +6 -0
- package/lib/typescript/models/auth.d.ts +32 -0
- package/lib/typescript/models/execTasks/ETBaseModels.d.ts +81 -0
- package/lib/typescript/models/execTasks/ETConfig.d.ts +86 -0
- package/lib/typescript/models/execution.d.ts +9 -0
- package/lib/typescript/models/fcm.d.ts +3 -0
- package/lib/typescript/models/sdk.d.ts +24 -0
- package/lib/typescript/native/signature/SignatureCapture.d.ts +33 -0
- package/lib/typescript/network/GraphQLClient.d.ts +15 -0
- package/lib/typescript/network/NetworkClient.d.ts +8 -0
- package/lib/typescript/network/NetworkUtils.d.ts +11 -0
- package/lib/typescript/network/Queries.d.ts +5 -0
- package/lib/typescript/network/client.d.ts +8 -0
- package/lib/typescript/res/strings.d.ts +1 -0
- package/lib/typescript/resources/Login.d.ts +14 -0
- package/lib/typescript/resources/network.d.ts +7 -0
- package/lib/typescript/styles/SdkColors.d.ts +16 -0
- package/lib/typescript/styles/executionTasks/CommonStyles.d.ts +140 -0
- package/lib/typescript/ui/screens/CancellationScreen.d.ts +3 -0
- package/lib/typescript/ui/screens/CaptureInputScreen.d.ts +3 -0
- package/lib/typescript/ui/screens/CompleteObjectiveScreen.d.ts +3 -0
- package/lib/typescript/ui/screens/DeliverScreen.d.ts +3 -0
- package/lib/typescript/ui/screens/DisplayScreen.d.ts +3 -0
- package/lib/typescript/ui/screens/DoodleScreen.d.ts +3 -0
- package/lib/typescript/ui/screens/DropCashScreen.d.ts +3 -0
- package/lib/typescript/ui/screens/ETScreensIndex.d.ts +16 -0
- package/lib/typescript/ui/screens/FormsScreen.d.ts +3 -0
- package/lib/typescript/ui/screens/GeofenceScreen.d.ts +3 -0
- package/lib/typescript/ui/screens/HttpRequestScreen.d.ts +3 -0
- package/lib/typescript/ui/screens/ImageCaptureScreen.d.ts +3 -0
- package/lib/typescript/ui/screens/PaymentScreen.d.ts +3 -0
- package/lib/typescript/ui/screens/PickupScreen.d.ts +3 -0
- package/lib/typescript/ui/screens/RTScanScreen.d.ts +3 -0
- package/lib/typescript/ui/screens/StartWorkFlowScreen.d.ts +3 -0
- package/lib/typescript/ui/screens/WithBaseDispatchScreen.d.ts +3 -0
- package/lib/typescript/ui/uiConfig/RouteParams.d.ts +8 -0
- package/lib/typescript/utils/ExecTaskUtils.d.ts +7 -0
- package/lib/typescript/utils/Logger.d.ts +22 -0
- package/lib/typescript/utils/NetworkUtil.d.ts +14 -0
- package/lib/typescript/utils/SdkUtils.d.ts +25 -0
- package/lib/typescript/utils/SyncManagerUtils.d.ts +10 -0
- package/lib/typescript/utils/fcm/FCM.d.ts +8 -0
- package/lib/typescript/utils/fcm/FcmUtils.d.ts +5 -0
- package/lib/typescript/utils/helper.d.ts +14 -0
- package/lib/typescript/utils/loginHelper.d.ts +13 -0
- package/lib/typescript/utils/storage.d.ts +49 -0
- package/lib/typescript/utils/utils.d.ts +3 -0
- package/package.json +254 -0
- package/tsconfig.build.json +4 -0
- package/tsconfig.json +31 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useRef","KeyboardAvoidingView","ScrollView","Text","View","ReactNativeForm","defaultProps","FormContext","DateTimeWidget","TimeRangeSelector","QRBarcodeScannerWidget","Button","getBaseETResponse","getEventCodeByET","EntityCode","ExecutionTaskID","CommonStyles","Fonts","SdkColors","ColorTheme","customWidgets","datePicker","timeRangeSelector","scanner","FormGenerator","props","form","mainContainer","flex","backgroundColor","padding","marginTop","marginStart","marginEnd","borderRadius","borderColor","borderWidth","requiredTitle","theme","primaryColor","LIGHT","primaryButton","highlightColor","textColor","placeholderTextColor","errorColor","fontFamily","IBMPlexSans_600SemiBold","jsonSchema","uiSchema","onError","response","onSubmitET","FORMS","data","formData","margin","flexDirection","nextButton","nextButtonLabel","current","submit"],"sources":["FormGenerator.tsx"],"sourcesContent":["import React, { useRef } from 'react';\nimport { KeyboardAvoidingView, ScrollView, Text, View } from 'react-native';\nimport ReactNativeForm, { defaultProps, FormContext } from 'rjsf-native';\nimport DateTimeWidget from './widgets/DateTimeWidget';\nimport TimeRangeSelector from './widgets/TimeRangeSelector';\nimport QRBarcodeScannerWidget from './widgets/QRBarcodeScannerWidget';\nimport { Button } from 'react-native-paper';\nimport type { FormInputSchema } from './FormSchema';\nimport { getBaseETResponse } from '../../../utils/ExecTaskUtils';\nimport { getEventCodeByET } from '../../../manager/dispatchCodes/EventCodeContainer';\nimport {\n EntityCode,\n ExecutionTaskID,\n} from '../../../models/execTasks/ETConfig';\nimport {\n CommonStyles,\n Fonts,\n} from '../../../styles/executionTasks/CommonStyles';\nimport SdkColors, { ColorTheme } from '../../../styles/SdkColors';\n\nconst customWidgets = {\n datePicker: DateTimeWidget,\n timeRangeSelector: TimeRangeSelector,\n scanner: QRBarcodeScannerWidget,\n};\n\nconst FormGenerator = (props: FormInputSchema) => {\n const form = useRef(null);\n return (\n <KeyboardAvoidingView style={CommonStyles.mainContainer}>\n <ScrollView style={{ flex: 1 }}>\n <View\n style={{\n flex: 1,\n backgroundColor: 'white',\n padding: 20,\n marginTop: 20,\n marginStart: 15,\n marginEnd: 15,\n borderRadius: 10,\n borderColor: 'rgba(0, 0, 0, 0.1)',\n borderWidth: 1,\n }}\n >\n <FormContext.Provider\n value={{\n ...defaultProps,\n requiredTitle: '*',\n theme: {\n primaryColor: SdkColors[ColorTheme.LIGHT].primaryButton,\n highlightColor: SdkColors[ColorTheme.LIGHT].primaryButton,\n borderColor: SdkColors[ColorTheme.LIGHT].primaryButton,\n textColor: '#111111',\n placeholderTextColor: '#111111',\n errorColor: '#b00020',\n fontFamily: Fonts.IBMPlexSans_600SemiBold,\n },\n }}\n >\n <ReactNativeForm\n widgets={customWidgets}\n // @ts-ignore\n ref={form}\n // @ts-ignore\n schema={props.jsonSchema}\n showErrorList={false}\n uiSchema={props.uiSchema}\n onError={props.onError}\n onSubmit={async (response) => {\n props.onSubmitET({\n ...(await getBaseETResponse(\n EntityCode.FORMS,\n true,\n getEventCodeByET(ExecutionTaskID.FORMS, true),\n ''\n )),\n data: response.formData,\n });\n }}\n >\n <Text>{}</Text>\n </ReactNativeForm>\n </FormContext.Provider>\n </View>\n </ScrollView>\n <View style={[{ margin: 10 }]}>\n <View style={{ flexDirection: 'row' }}>\n <Button\n style={[CommonStyles.nextButton, { flex: 1 }]}\n labelStyle={CommonStyles.nextButtonLabel}\n mode={'contained'}\n onPress={() => {\n if (form.current) {\n // @ts-ignore\n form.current.submit();\n }\n }}\n >\n Submit\n </Button>\n </View>\n </View>\n </KeyboardAvoidingView>\n );\n};\n\nexport default FormGenerator;\n"],"mappings":"AAAA,OAAOA,KAAP,IAAgBC,MAAhB,QAA8B,OAA9B;AACA,SAASC,oBAAT,EAA+BC,UAA/B,EAA2CC,IAA3C,EAAiDC,IAAjD,QAA6D,cAA7D;AACA,OAAOC,eAAP,IAA0BC,YAA1B,EAAwCC,WAAxC,QAA2D,aAA3D;AACA,OAAOC,cAAP,MAA2B,0BAA3B;AACA,OAAOC,iBAAP,MAA8B,6BAA9B;AACA,OAAOC,sBAAP,MAAmC,kCAAnC;AACA,SAASC,MAAT,QAAuB,oBAAvB;AAEA,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\n} from '../../../models/execTasks/ETBaseModels';\n\nexport type FormInputSchema = BaseETRequest & {\n jsonSchema: JSONSchema;\n uiSchema: UISchame;\n onError: (e: any) => void;\n onSubmitET: (result: FormOutputSchema) => void;\n};\n/**\n * Json schema used in react-jsonschema-form\n */\nexport interface JSONSchema {\n [k: string]: unknown;\n}\n/**\n * UI schema used in react-jsonschema-form\n */\nexport interface UISchame {\n [k: string]: unknown;\n}\n\nexport type FormOutputSchema = BaseETResponse & {\n data: {\n [k: string]: unknown;\n };\n};\n"],"mappings":""}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { Platform, StyleSheet, TextInput, TouchableOpacity, View } from 'react-native';
|
|
3
|
+
import DateTimePicker from '@react-native-community/datetimepicker';
|
|
4
|
+
import { useFormContext } from 'rjsf-native';
|
|
5
|
+
import SdkColors, { ColorTheme } from '../../../../styles/SdkColors';
|
|
6
|
+
const MODES = {
|
|
7
|
+
DATE: 'date',
|
|
8
|
+
TIME: 'time',
|
|
9
|
+
DATETIME: 'datetime'
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const DateTimeWidget = _ref => {
|
|
13
|
+
let {
|
|
14
|
+
id,
|
|
15
|
+
label,
|
|
16
|
+
value,
|
|
17
|
+
onChange,
|
|
18
|
+
onFocus,
|
|
19
|
+
autofocus,
|
|
20
|
+
options,
|
|
21
|
+
rawErrors,
|
|
22
|
+
maxDate
|
|
23
|
+
} = _ref;
|
|
24
|
+
const [show, setShow] = useState(false);
|
|
25
|
+
const [date, setDate] = useState(null);
|
|
26
|
+
const {
|
|
27
|
+
theme
|
|
28
|
+
} = useFormContext();
|
|
29
|
+
const [focused, setFocused] = useState(false);
|
|
30
|
+
const themedStyle = {
|
|
31
|
+
borderColor: (rawErrors === null || rawErrors === void 0 ? void 0 : rawErrors.length) > 0 ? theme.errorColor : focused ? theme.highlightColor : theme.borderColor,
|
|
32
|
+
borderWidth: focused ? 2 : 1.5,
|
|
33
|
+
color: theme.textColor
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
const onDateChange = (_event, selectedDate) => {
|
|
37
|
+
setShow(Platform.OS === 'ios');
|
|
38
|
+
|
|
39
|
+
if (selectedDate) {
|
|
40
|
+
const currentDate = selectedDate;
|
|
41
|
+
let dateTimeValue = getValueBasedOnMode(options, currentDate);
|
|
42
|
+
setDate(currentDate);
|
|
43
|
+
onChange(dateTimeValue);
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
48
|
+
style: styles.container
|
|
49
|
+
}, /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
50
|
+
onPress: () => setShow(true)
|
|
51
|
+
}, /*#__PURE__*/React.createElement(TextInput, {
|
|
52
|
+
editable: false,
|
|
53
|
+
onTouchStart: () => setShow(true),
|
|
54
|
+
value: getValueBasedOnMode(options, date),
|
|
55
|
+
placeholder: label,
|
|
56
|
+
selectionColor: '#6200EE',
|
|
57
|
+
autoFocus: autofocus,
|
|
58
|
+
onFocus: () => {
|
|
59
|
+
setFocused(true);
|
|
60
|
+
onFocus(id, value);
|
|
61
|
+
},
|
|
62
|
+
placeholderTextColor: theme.placeholderTextColor,
|
|
63
|
+
style: [styles.input, themedStyle]
|
|
64
|
+
})), show && /*#__PURE__*/React.createElement(DateTimePicker, {
|
|
65
|
+
testID: "dateTimePicker" // @ts-ignore
|
|
66
|
+
,
|
|
67
|
+
mode: getWidgetType(options.mode),
|
|
68
|
+
minimumDate: options.mode === 'date' ? new Date() : undefined,
|
|
69
|
+
maximumDate: maxDate,
|
|
70
|
+
is24Hour: false,
|
|
71
|
+
display: "default",
|
|
72
|
+
onChange: onDateChange,
|
|
73
|
+
value: date ?? new Date(),
|
|
74
|
+
textColor: 'red'
|
|
75
|
+
}));
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
function getWidgetType(mode) {
|
|
79
|
+
switch (mode) {
|
|
80
|
+
case 'date':
|
|
81
|
+
return MODES.DATE;
|
|
82
|
+
|
|
83
|
+
case 'time':
|
|
84
|
+
return MODES.TIME;
|
|
85
|
+
|
|
86
|
+
case 'datetime':
|
|
87
|
+
return MODES.DATETIME;
|
|
88
|
+
|
|
89
|
+
default:
|
|
90
|
+
return MODES.DATE;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function getValueBasedOnMode(uiOptions, date) {
|
|
95
|
+
if (!date) return '';
|
|
96
|
+
|
|
97
|
+
switch (uiOptions.mode) {
|
|
98
|
+
case 'date':
|
|
99
|
+
return date.toISOString().substring(0, 10);
|
|
100
|
+
|
|
101
|
+
case 'time':
|
|
102
|
+
return date.toLocaleTimeString().slice(0, 5);
|
|
103
|
+
|
|
104
|
+
case 'datetime':
|
|
105
|
+
return date.toLocaleString();
|
|
106
|
+
|
|
107
|
+
default:
|
|
108
|
+
return date.toLocaleString();
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
const styles = StyleSheet.create({
|
|
113
|
+
container: {
|
|
114
|
+
flex: 1
|
|
115
|
+
},
|
|
116
|
+
input: {
|
|
117
|
+
borderColor: SdkColors[ColorTheme.LIGHT].primaryButton,
|
|
118
|
+
borderWidth: 1,
|
|
119
|
+
paddingHorizontal: 16,
|
|
120
|
+
paddingTop: 15,
|
|
121
|
+
paddingBottom: 15,
|
|
122
|
+
borderRadius: 4,
|
|
123
|
+
fontSize: 16,
|
|
124
|
+
color: '#111111'
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
/**
|
|
128
|
+
* max and min date has to be implemented
|
|
129
|
+
*/
|
|
130
|
+
|
|
131
|
+
export default DateTimeWidget;
|
|
132
|
+
//# sourceMappingURL=DateTimeWidget.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useState","Platform","StyleSheet","TextInput","TouchableOpacity","View","DateTimePicker","useFormContext","SdkColors","ColorTheme","MODES","DATE","TIME","DATETIME","DateTimeWidget","id","label","value","onChange","onFocus","autofocus","options","rawErrors","maxDate","show","setShow","date","setDate","theme","focused","setFocused","themedStyle","borderColor","length","errorColor","highlightColor","borderWidth","color","textColor","onDateChange","_event","selectedDate","OS","currentDate","dateTimeValue","getValueBasedOnMode","styles","container","placeholderTextColor","input","getWidgetType","mode","Date","undefined","uiOptions","toISOString","substring","toLocaleTimeString","slice","toLocaleString","create","flex","LIGHT","primaryButton","paddingHorizontal","paddingTop","paddingBottom","borderRadius","fontSize"],"sources":["DateTimeWidget.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport {\n Platform,\n StyleSheet,\n TextInput,\n TouchableOpacity,\n View,\n} from 'react-native';\nimport DateTimePicker, { Event } from '@react-native-community/datetimepicker';\nimport type { WidgetProps } from '@rjsf/core';\nimport { useFormContext } from 'rjsf-native';\nimport SdkColors, { ColorTheme } from '../../../../styles/SdkColors';\n\nconst MODES = {\n DATE: 'date',\n TIME: 'time',\n DATETIME: 'datetime',\n};\n\ntype DateWidgetProps = WidgetProps & {\n minDate?: Date;\n maxDate?: Date;\n};\n\nconst DateTimeWidget = ({\n id,\n label,\n value,\n onChange,\n onFocus,\n autofocus,\n options,\n rawErrors,\n maxDate,\n}: DateWidgetProps) => {\n const [show, setShow] = useState(false);\n const [date, setDate] = useState<Date | null>(null);\n const { theme } = useFormContext();\n const [focused, setFocused] = useState(false);\n\n const themedStyle = {\n borderColor:\n rawErrors?.length > 0\n ? theme.errorColor\n : focused\n ? theme.highlightColor\n : theme.borderColor,\n borderWidth: focused ? 2 : 1.5,\n color: theme.textColor,\n };\n const onDateChange = (_event: Event, selectedDate?: Date) => {\n setShow(Platform.OS === 'ios');\n if (selectedDate) {\n const currentDate = selectedDate;\n let dateTimeValue = getValueBasedOnMode(options, currentDate);\n setDate(currentDate);\n onChange(dateTimeValue);\n }\n };\n\n return (\n <View style={styles.container}>\n <TouchableOpacity onPress={() => setShow(true)}>\n <TextInput\n editable={false}\n onTouchStart={() => setShow(true)}\n value={getValueBasedOnMode(options, date)}\n placeholder={label}\n selectionColor={'#6200EE'}\n autoFocus={autofocus}\n onFocus={() => {\n setFocused(true);\n onFocus(id, value);\n }}\n placeholderTextColor={theme.placeholderTextColor}\n style={[styles.input, themedStyle]}\n />\n </TouchableOpacity>\n {show && (\n <DateTimePicker\n testID=\"dateTimePicker\"\n // @ts-ignore\n mode={getWidgetType(options.mode)}\n minimumDate={options.mode === 'date' ? new Date() : undefined}\n maximumDate={maxDate}\n is24Hour={false}\n display=\"default\"\n onChange={onDateChange}\n value={date ?? new Date()}\n textColor={'red'}\n />\n )}\n </View>\n );\n};\n\nfunction getWidgetType(mode: string): string {\n switch (mode) {\n case 'date':\n return MODES.DATE;\n case 'time':\n return MODES.TIME;\n case 'datetime':\n return MODES.DATETIME;\n default:\n return MODES.DATE;\n }\n}\n\nfunction getValueBasedOnMode(uiOptions: any, date: Date | null): string {\n if (!date) return '';\n switch (uiOptions.mode) {\n case 'date':\n return date.toISOString().substring(0, 10);\n case 'time':\n return date.toLocaleTimeString().slice(0, 5);\n case 'datetime':\n return date.toLocaleString();\n default:\n return date.toLocaleString();\n }\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n },\n input: {\n borderColor: SdkColors[ColorTheme.LIGHT].primaryButton,\n borderWidth: 1,\n paddingHorizontal: 16,\n paddingTop: 15,\n paddingBottom: 15,\n borderRadius: 4,\n fontSize: 16,\n color: '#111111',\n },\n});\n\n/**\n * max and min date has to be implemented\n */\n\nexport default DateTimeWidget;\n"],"mappings":"AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,SACEC,QADF,EAEEC,UAFF,EAGEC,SAHF,EAIEC,gBAJF,EAKEC,IALF,QAMO,cANP;AAOA,OAAOC,cAAP,MAAsC,wCAAtC;AAEA,SAASC,cAAT,QAA+B,aAA/B;AACA,OAAOC,SAAP,IAAoBC,UAApB,QAAsC,8BAAtC;AAEA,MAAMC,KAAK,GAAG;EACZC,IAAI,EAA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B,EAA6C5B,IAA7C,EAAwE;EACtE,IAAI,CAACA,IAAL,EAAW,OAAO,EAAP;;EACX,QAAQ4B,SAAS,CAACH,IAAlB;IACE,KAAK,MAAL;MACE,OAAOzB,IAAI,CAAC6B,WAAL,GAAmBC,SAAnB,CAA6B,CAA7B,EAAgC,EAAhC,CAAP;;IACF,KAAK,MAAL;MACE,OAAO9B,IAAI,CAAC+B,kBAAL,GAA0BC,KAA1B,CAAgC,CAAhC,EAAmC,CAAnC,CAAP;;IACF,KAAK,UAAL;MACE,OAAOhC,IAAI,CAACiC,cAAL,EAAP;;IACF;MACE,OAAOjC,IAAI,CAACiC,cAAL,EAAP;EARJ;AAUD;;AAED,MAAMb,MAAM,GAAG5C,UAAU,CAAC0D,MAAX,CAAkB;EAC/Bb,SAAS,EAAE;IACTc,IAAI,EAAE;EADG,CADoB;EAI/BZ,KAAK,EAAE;IACLjB,WAAW,EAAExB,SAAS,CAACC,UAAU,CAACqD,KAAZ,CAAT,CAA4BC,aADpC;IAEL3B,WAAW,EAAE,CAFR;IAGL4B,iBAAiB,EAAE,EAHd;IAILC,UAAU,EAAE,EAJP;IAKLC,aAAa,EAAE,EALV;IAMLC,YAAY,EAAE,CANT;IAOLC,QAAQ,EAAE,EAPL;IAQL/B,KAAK,EAAE;EARF;AAJwB,CAAlB,CAAf;AAgBA;AACA;AACA;;AAEA,eAAevB,cAAf"}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { Modal, StyleSheet, Text, TextInput, TouchableOpacity, View } from 'react-native';
|
|
3
|
+
import { useFormContext } from 'rjsf-native';
|
|
4
|
+
import { AntDesign } from '@expo/vector-icons';
|
|
5
|
+
import CScanner from '../../scanner/CScanner';
|
|
6
|
+
|
|
7
|
+
const QRBarcodeScannerWidget = _ref => {
|
|
8
|
+
let {
|
|
9
|
+
id,
|
|
10
|
+
label,
|
|
11
|
+
value,
|
|
12
|
+
onChange,
|
|
13
|
+
onFocus,
|
|
14
|
+
autofocus,
|
|
15
|
+
rawErrors
|
|
16
|
+
} = _ref;
|
|
17
|
+
const [show, setShow] = useState(false);
|
|
18
|
+
const [scannerOutput, setScannerOutput] = React.useState('');
|
|
19
|
+
const {
|
|
20
|
+
theme
|
|
21
|
+
} = useFormContext();
|
|
22
|
+
const [focused, setFocused] = useState(false);
|
|
23
|
+
const themedStyle = {
|
|
24
|
+
borderColor: (rawErrors === null || rawErrors === void 0 ? void 0 : rawErrors.length) > 0 ? theme.errorColor : focused ? theme.highlightColor : theme.borderColor,
|
|
25
|
+
borderWidth: focused ? 2 : 1,
|
|
26
|
+
color: theme.textColor
|
|
27
|
+
};
|
|
28
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
29
|
+
style: styles.container
|
|
30
|
+
}, /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
31
|
+
onPress: () => setShow(true)
|
|
32
|
+
}, /*#__PURE__*/React.createElement(TextInput, {
|
|
33
|
+
editable: false,
|
|
34
|
+
onTouchStart: () => setShow(true),
|
|
35
|
+
value: scannerOutput,
|
|
36
|
+
placeholder: label,
|
|
37
|
+
autoFocus: autofocus,
|
|
38
|
+
onFocus: () => {
|
|
39
|
+
setFocused(true);
|
|
40
|
+
onFocus(id, value);
|
|
41
|
+
},
|
|
42
|
+
selectionColor: theme.highlightColor,
|
|
43
|
+
placeholderTextColor: theme.placeholderTextColor,
|
|
44
|
+
style: [styles.input, themedStyle]
|
|
45
|
+
})), show && /*#__PURE__*/React.createElement(ScannerDialog, {
|
|
46
|
+
onSubmitDialog: data => {
|
|
47
|
+
setScannerOutput(data);
|
|
48
|
+
onChange(data);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Failure case impl.*/
|
|
52
|
+
,
|
|
53
|
+
onModalClose: () => setShow(false)
|
|
54
|
+
}));
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
function ScannerDialog(props) {
|
|
58
|
+
const [modalVisible, setModalVisible] = useState(true);
|
|
59
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
60
|
+
style: styles.centeredView
|
|
61
|
+
}, /*#__PURE__*/React.createElement(Modal, {
|
|
62
|
+
animationType: "slide",
|
|
63
|
+
transparent: true,
|
|
64
|
+
visible: modalVisible,
|
|
65
|
+
onRequestClose: () => {
|
|
66
|
+
setModalVisible(!modalVisible);
|
|
67
|
+
props.onModalClose();
|
|
68
|
+
}
|
|
69
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
70
|
+
style: styles.centeredView
|
|
71
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
72
|
+
style: styles.modalContent
|
|
73
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
74
|
+
style: styles.modalText
|
|
75
|
+
}, "Barcode/QR Scanner"), /*#__PURE__*/React.createElement(CScanner, {
|
|
76
|
+
barCodeTypes: [],
|
|
77
|
+
onScanned: result => {
|
|
78
|
+
props.onSubmitDialog(result);
|
|
79
|
+
setModalVisible(false);
|
|
80
|
+
props.onModalClose();
|
|
81
|
+
}
|
|
82
|
+
}), /*#__PURE__*/React.createElement(AntDesign, {
|
|
83
|
+
name: "closecircleo",
|
|
84
|
+
size: 40,
|
|
85
|
+
color: "blue",
|
|
86
|
+
onPress: () => {
|
|
87
|
+
setModalVisible(false);
|
|
88
|
+
props.onModalClose();
|
|
89
|
+
}
|
|
90
|
+
})))));
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
const styles = StyleSheet.create({
|
|
94
|
+
centeredView: {
|
|
95
|
+
flex: 1,
|
|
96
|
+
justifyContent: 'center',
|
|
97
|
+
alignItems: 'center',
|
|
98
|
+
marginTop: 22
|
|
99
|
+
},
|
|
100
|
+
modalContent: {
|
|
101
|
+
margin: 20,
|
|
102
|
+
backgroundColor: 'white',
|
|
103
|
+
borderRadius: 20,
|
|
104
|
+
padding: 35,
|
|
105
|
+
alignItems: 'center',
|
|
106
|
+
shadowColor: '#000',
|
|
107
|
+
shadowOffset: {
|
|
108
|
+
width: 0,
|
|
109
|
+
height: 2
|
|
110
|
+
},
|
|
111
|
+
shadowOpacity: 0.25,
|
|
112
|
+
shadowRadius: 4,
|
|
113
|
+
elevation: 5
|
|
114
|
+
},
|
|
115
|
+
modalText: {
|
|
116
|
+
marginBottom: 15,
|
|
117
|
+
textAlign: 'center'
|
|
118
|
+
},
|
|
119
|
+
container: {
|
|
120
|
+
flex: 1
|
|
121
|
+
},
|
|
122
|
+
input: {
|
|
123
|
+
borderColor: '#979B9E',
|
|
124
|
+
borderWidth: 1,
|
|
125
|
+
paddingHorizontal: 16,
|
|
126
|
+
paddingTop: 15,
|
|
127
|
+
paddingBottom: 15,
|
|
128
|
+
borderRadius: 4,
|
|
129
|
+
fontSize: 16,
|
|
130
|
+
color: '#333333'
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
export default QRBarcodeScannerWidget;
|
|
134
|
+
//# sourceMappingURL=QRBarcodeScannerWidget.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useState","Modal","StyleSheet","Text","TextInput","TouchableOpacity","View","useFormContext","AntDesign","CScanner","QRBarcodeScannerWidget","id","label","value","onChange","onFocus","autofocus","rawErrors","show","setShow","scannerOutput","setScannerOutput","theme","focused","setFocused","themedStyle","borderColor","length","errorColor","highlightColor","borderWidth","color","textColor","styles","container","placeholderTextColor","input","data","ScannerDialog","props","modalVisible","setModalVisible","centeredView","onModalClose","modalContent","modalText","result","onSubmitDialog","create","flex","justifyContent","alignItems","marginTop","margin","backgroundColor","borderRadius","padding","shadowColor","shadowOffset","width","height","shadowOpacity","shadowRadius","elevation","marginBottom","textAlign","paddingHorizontal","paddingTop","paddingBottom","fontSize"],"sources":["QRBarcodeScannerWidget.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport {\n Modal,\n StyleSheet,\n Text,\n TextInput,\n TouchableOpacity,\n View,\n} from 'react-native';\nimport type { WidgetProps } from '@rjsf/core';\nimport { useFormContext } from 'rjsf-native';\nimport { AntDesign } from '@expo/vector-icons';\nimport CScanner from '../../scanner/CScanner';\n\nconst QRBarcodeScannerWidget = ({\n id,\n label,\n value,\n onChange,\n onFocus,\n autofocus,\n rawErrors,\n}: WidgetProps) => {\n const [show, setShow] = useState(false);\n const [scannerOutput, setScannerOutput] = React.useState<string>('');\n const { theme } = useFormContext();\n const [focused, setFocused] = useState(false);\n\n const themedStyle = {\n borderColor:\n rawErrors?.length > 0\n ? theme.errorColor\n : focused\n ? theme.highlightColor\n : theme.borderColor,\n borderWidth: focused ? 2 : 1,\n color: theme.textColor,\n };\n\n return (\n <View style={styles.container}>\n <TouchableOpacity onPress={() => setShow(true)}>\n <TextInput\n editable={false}\n onTouchStart={() => setShow(true)}\n value={scannerOutput}\n placeholder={label}\n autoFocus={autofocus}\n onFocus={() => {\n setFocused(true);\n onFocus(id, value);\n }}\n selectionColor={theme.highlightColor}\n placeholderTextColor={theme.placeholderTextColor}\n style={[styles.input, themedStyle]}\n />\n </TouchableOpacity>\n {show && (\n <ScannerDialog\n onSubmitDialog={(data) => {\n setScannerOutput(data);\n onChange(data);\n }}\n /**\n * Failure case impl.*/\n onModalClose={() => setShow(false)}\n />\n )}\n </View>\n );\n};\n\nfunction ScannerDialog(props: ScannerDialogProps) {\n const [modalVisible, setModalVisible] = useState(true);\n\n return (\n <View style={styles.centeredView}>\n <Modal\n animationType=\"slide\"\n transparent={true}\n visible={modalVisible}\n onRequestClose={() => {\n setModalVisible(!modalVisible);\n props.onModalClose();\n }}\n >\n <View style={styles.centeredView}>\n <View style={styles.modalContent}>\n <Text style={styles.modalText}>Barcode/QR Scanner</Text>\n <CScanner\n barCodeTypes={[]}\n onScanned={(result) => {\n props.onSubmitDialog(result);\n setModalVisible(false);\n props.onModalClose();\n }}\n />\n <AntDesign\n name=\"closecircleo\"\n size={40}\n color=\"blue\"\n onPress={() => {\n setModalVisible(false);\n props.onModalClose();\n }}\n />\n </View>\n </View>\n </Modal>\n </View>\n );\n}\nconst styles = StyleSheet.create({\n centeredView: {\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n marginTop: 22,\n },\n modalContent: {\n margin: 20,\n backgroundColor: 'white',\n borderRadius: 20,\n padding: 35,\n alignItems: 'center',\n shadowColor: '#000',\n shadowOffset: {\n width: 0,\n height: 2,\n },\n shadowOpacity: 0.25,\n shadowRadius: 4,\n elevation: 5,\n },\n modalText: {\n marginBottom: 15,\n textAlign: 'center',\n },\n container: {\n flex: 1,\n },\n input: {\n borderColor: '#979B9E',\n borderWidth: 1,\n paddingHorizontal: 16,\n paddingTop: 15,\n paddingBottom: 15,\n borderRadius: 4,\n fontSize: 16,\n color: '#333333',\n },\n});\n\nexport interface ScannerDialogProps {\n onSubmitDialog: (value: string) => void;\n onModalClose: () => void;\n}\nexport default QRBarcodeScannerWidget;\n"],"mappings":"AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,SACEC,KADF,EAEEC,UAFF,EAGEC,IAHF,EAIEC,SAJF,EAKEC,gBALF,EAMEC,IANF,QAOO,cAPP;AASA,SAASC,cAAT,QAA+B,aAA/B;AACA,SAASC,SAAT,QAA0B,oBAA1B;AACA,OAAOC,QAAP,MAAqB,wBAArB;;AAEA,MAAMC,sBAAsB,GAAG,QAQZ;EAAA,IARa;IAC9BC,EAD8B;IAE9BC,KAF8B;IAG9BC,KAH8B;IAI9BC,QAJ8B;IAK9BC,OAL8B;IAM9BC,SAN8B;IAO9BC;EAP8B,CAQb;EACjB,MAAM,CAACC,IAAD,EAAOC,OAAP,IAAkBnB,QAAQ,CAAC,KAAD,CAAhC;EACA,MAAM,CAACoB,aAAD,EAAgBC,gBAAhB,IAAoCtB,KAAK,CAACC,QAAN,CAAuB,EAAvB,CAA1C;EACA,MAAM;IAAEsB;EAAF,IAAYf,cAAc,EAAhC;EACA,MAAM,CAACgB,OAAD,EAAUC,UAAV,IAAwBxB,QAAQ,CAAC,KAAD,CAAtC;EAEA,MAAMyB,WAAW,GAAG;IAClBC,WAAW,EACT,CAAAT,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,SAAS,EAAE;EAbC,CAPiB;EAsB/BlB,SAAS,EAAE;IACTmB,YAAY,EAAE,EADL;IAETC,SAAS,EAAE;EAFF,CAtBoB;EA0B/B/B,SAAS,EAAE;IACTe,IAAI,EAAE;EADG,CA1BoB;EA6B/Bb,KAAK,EAAE;IACLV,WAAW,EAAE,SADR;IAELI,WAAW,EAAE,CAFR;IAGLoC,iBAAiB,EAAE,EAHd;IAILC,UAAU,EAAE,EAJP;IAKLC,aAAa,EAAE,EALV;IAMLb,YAAY,EAAE,CANT;IAOLc,QAAQ,EAAE,EAPL;IAQLtC,KAAK,EAAE;EARF;AA7BwB,CAAlB,CAAf;AA6CA,eAAerB,sBAAf"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
|
|
3
|
+
import React, { useEffect, useState } from 'react';
|
|
4
|
+
import { StyleSheet, View } from 'react-native';
|
|
5
|
+
import DateTimeWidget from './DateTimeWidget';
|
|
6
|
+
|
|
7
|
+
const TimeRangeSelector = props => {
|
|
8
|
+
const [start, setStart] = useState(new Date());
|
|
9
|
+
const [end, setEnd] = useState(new Date());
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
props.onChange(JSON.stringify({
|
|
12
|
+
start: start,
|
|
13
|
+
end: end
|
|
14
|
+
}));
|
|
15
|
+
});
|
|
16
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
17
|
+
style: styles.container
|
|
18
|
+
}, /*#__PURE__*/React.createElement(DateTimeWidget, _extends({}, props, {
|
|
19
|
+
onChange: date => {
|
|
20
|
+
setStart(date);
|
|
21
|
+
}
|
|
22
|
+
})), /*#__PURE__*/React.createElement(DateTimeWidget, _extends({}, props, {
|
|
23
|
+
onChange: date => {
|
|
24
|
+
setEnd(date);
|
|
25
|
+
}
|
|
26
|
+
})));
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const styles = StyleSheet.create({
|
|
30
|
+
container: {
|
|
31
|
+
flex: 1,
|
|
32
|
+
flexDirection: 'row',
|
|
33
|
+
justifyContent: 'space-between'
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
export default TimeRangeSelector;
|
|
37
|
+
//# sourceMappingURL=TimeRangeSelector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useEffect","useState","StyleSheet","View","DateTimeWidget","TimeRangeSelector","props","start","setStart","Date","end","setEnd","onChange","JSON","stringify","styles","container","date","create","flex","flexDirection","justifyContent"],"sources":["TimeRangeSelector.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport { StyleSheet, View } from 'react-native';\nimport type { WidgetProps } from '@rjsf/core';\nimport DateTimeWidget from './DateTimeWidget';\n\nconst TimeRangeSelector = (props: WidgetProps) => {\n const [start, setStart] = useState(new Date());\n const [end, setEnd] = useState(new Date());\n useEffect(() => {\n props.onChange(JSON.stringify({ start: start, end: end }));\n });\n return (\n <View style={styles.container}>\n <DateTimeWidget\n {...props}\n onChange={(date) => {\n setStart(date);\n }}\n />\n <DateTimeWidget\n {...props}\n onChange={(date) => {\n setEnd(date);\n }}\n />\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n flexDirection: 'row',\n justifyContent: 'space-between',\n },\n});\n\nexport default TimeRangeSelector;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAgBC,SAAhB,EAA2BC,QAA3B,QAA2C,OAA3C;AACA,SAASC,UAAT,EAAqBC,IAArB,QAAiC,cAAjC;AAEA,OAAOC,cAAP,MAA2B,kBAA3B;;AAEA,MAAMC,iBAAiB,GAAIC,KAAD,IAAwB;EAChD,MAAM,CAACC,KAAD,EAAQC,QAAR,IAAoBP,QAAQ,CAAC,IAAIQ,IAAJ,EAAD,CAAlC;EACA,MAAM,CAACC,GAAD,EAAMC,MAAN,IAAgBV,QAAQ,CAAC,IAAIQ,IAAJ,EAAD,CAA9B;EACAT,SAAS,CAAC,MAAM;IACdM,KAAK,CAACM,QAAN,CAAeC,IAAI,CAACC,SAAL,CAAe;MAAEP,KAAK,EAAEA,KAAT;MAAgBG,GAAG,EAAEA;IAArB,CAAf,CAAf;EACD,CAFQ,CAAT;EAGA,oBACE,oBAAC,IAAD;IAAM,KAAK,EAAEK,MAAM,CAACC;EAApB,gBACE,oBAAC,cAAD,eACMV,KADN;IAEE,QAAQ,EAAGW,IAAD,IAAU;MAClBT,QAAQ,CAACS,IAAD,CAAR;IACD;EAJH,GADF,eAOE,oBAAC,cAAD,eACMX,KADN;IAEE,QAAQ,EAAGW,IAAD,IAAU;MAClBN,MAAM,CAACM,IAAD,CAAN;IACD;EAJH,GAPF,CADF;AAgBD,CAtBD;;AAwBA,MAAMF,MAAM,GAAGb,UAAU,CAACgB,MAAX,CAAkB;EAC/BF,SAAS,EAAE;IACTG,IAAI,EAAE,CADG;IAETC,aAAa,EAAE,KAFN;IAGTC,cAAc,EAAE;EAHP;AADoB,CAAlB,CAAf;AAQA,eAAehB,iBAAf"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import axios from 'axios';
|
|
2
|
+
import { getAddHeaders, getHeaders } from '../../../network/NetworkUtils';
|
|
3
|
+
import { API_CONTENT_TYPES } from '../../../network/GraphQLClient';
|
|
4
|
+
import { JSONPath } from 'jsonpath-plus';
|
|
5
|
+
import { isEmptyOrBlank } from '../../../utils/utils';
|
|
6
|
+
import { getBaseETResponse } from '../../../utils/ExecTaskUtils';
|
|
7
|
+
import { BaseEventCodes, EntityCode } from '../../../models/execTasks/ETConfig';
|
|
8
|
+
export async function getApiResponse(apiData) {
|
|
9
|
+
const axiosConfig = {
|
|
10
|
+
data: apiData.requestBody,
|
|
11
|
+
method: apiData.httpMethod,
|
|
12
|
+
timeout: apiData.timeout ?? 15000,
|
|
13
|
+
// timeout in millis i.e 15s
|
|
14
|
+
url: apiData.uri,
|
|
15
|
+
headers: { ...getAddHeaders(apiData.headers),
|
|
16
|
+
...(await getHeaders(API_CONTENT_TYPES.APPLICATION_JSON))
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
return axios(axiosConfig);
|
|
20
|
+
}
|
|
21
|
+
export function getOutputUsingJsonpath(json, jsonPath) {
|
|
22
|
+
if (isEmptyOrBlank(jsonPath)) return json;
|
|
23
|
+
return JSONPath({
|
|
24
|
+
path: jsonPath,
|
|
25
|
+
json
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
export async function getHttpETOutput(apiResponse, jsonPath, success) {
|
|
29
|
+
return { ...(await getBaseETResponse(EntityCode.HTTP_REQUEST_ET, success, success ? BaseEventCodes.ENTITY_SUCCESS : BaseEventCodes.ENTITY_FAILURE, '')),
|
|
30
|
+
apiResponse: getOutputUsingJsonpath(apiResponse, jsonPath)
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=HttpEtUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["axios","getAddHeaders","getHeaders","API_CONTENT_TYPES","JSONPath","isEmptyOrBlank","getBaseETResponse","BaseEventCodes","EntityCode","getApiResponse","apiData","axiosConfig","data","requestBody","method","httpMethod","timeout","url","uri","headers","APPLICATION_JSON","getOutputUsingJsonpath","json","jsonPath","path","getHttpETOutput","apiResponse","success","HTTP_REQUEST_ET","ENTITY_SUCCESS","ENTITY_FAILURE"],"sources":["HttpEtUtils.ts"],"sourcesContent":["import type { APIData, HttpRequestETOutput } from './HttpRequestETSchema';\nimport axios, { AxiosRequestConfig } from 'axios';\nimport { getAddHeaders, getHeaders } from '../../../network/NetworkUtils';\nimport { API_CONTENT_TYPES } from '../../../network/GraphQLClient';\nimport { JSONPath } from 'jsonpath-plus';\nimport { isEmptyOrBlank } from '../../../utils/utils';\nimport { getBaseETResponse } from '../../../utils/ExecTaskUtils';\nimport { BaseEventCodes, EntityCode } from '../../../models/execTasks/ETConfig';\n\nexport async function getApiResponse(apiData: APIData) {\n const axiosConfig: AxiosRequestConfig = {\n data: apiData.requestBody,\n method: apiData.httpMethod,\n timeout: apiData.timeout ?? 15000, // timeout in millis i.e 15s\n url: apiData.uri,\n headers: {\n ...getAddHeaders(apiData.headers),\n ...(await getHeaders(API_CONTENT_TYPES.APPLICATION_JSON)),\n },\n };\n return axios(axiosConfig);\n}\nexport function getOutputUsingJsonpath(json: object, jsonPath: string) {\n if (isEmptyOrBlank(jsonPath)) return json;\n return JSONPath({ path: jsonPath, json });\n}\n\nexport async function getHttpETOutput(\n apiResponse: object,\n jsonPath: string,\n success: boolean\n): Promise<HttpRequestETOutput> {\n return {\n ...(await getBaseETResponse(\n EntityCode.HTTP_REQUEST_ET,\n success,\n success ? BaseEventCodes.ENTITY_SUCCESS : BaseEventCodes.ENTITY_FAILURE,\n ''\n )),\n apiResponse: getOutputUsingJsonpath(apiResponse, jsonPath),\n };\n}\n"],"mappings":"AACA,OAAOA,KAAP,MAA0C,OAA1C;AACA,SAASC,aAAT,EAAwBC,UAAxB,QAA0C,+BAA1C;AACA,SAASC,iBAAT,QAAkC,gCAAlC;AACA,SAASC,QAAT,QAAyB,eAAzB;AACA,SAASC,cAAT,QAA+B,sBAA/B;AACA,SAASC,iBAAT,QAAkC,8BAAlC;AACA,SAASC,cAAT,EAAyBC,UAAzB,QAA2C,oCAA3C;AAEA,OAAO,eAAeC,cAAf,CAA8BC,OAA9B,EAAgD;EACrD,MAAMC,WAA+B,GAAG;IACtCC,IAAI,EAAEF,OAAO,CAACG,WADwB;IAEtCC,MAAM,EAAEJ,OAAO,CAACK,UAFsB;IAGtCC,OAAO,EAAEN,OAAO,CAACM,OAAR,IAAmB,KAHU;IAGH;IACnCC,GAAG,EAAEP,OAAO,CAACQ,GAJyB;IAKtCC,OAAO,EAAE,EACP,GAAGlB,aAAa,CAACS,OAAO,CAACS,OAAT,CADT;MAEP,IAAI,MAAMjB,UAAU,CAACC,iBAAiB,CAACiB,gBAAnB,CAApB;IAFO;EAL6B,CAAxC;EAUA,OAAOpB,KAAK,CAACW,WAAD,CAAZ;AACD;AACD,OAAO,SAASU,sBAAT,CAAgCC,IAAhC,EAA8CC,QAA9C,EAAgE;EACrE,IAAIlB,cAAc,CAACkB,QAAD,CAAlB,EAA8B,OAAOD,IAAP;EAC9B,OAAOlB,QAAQ,CAAC;IAAEoB,IAAI,EAAED,QAAR;IAAkBD;EAAlB,CAAD,CAAf;AACD;AAED,OAAO,eAAeG,eAAf,CACLC,WADK,EAELH,QAFK,EAGLI,OAHK,EAIyB;EAC9B,OAAO,EACL,IAAI,MAAMrB,iBAAiB,CACzBE,UAAU,CAACoB,eADc,EAEzBD,OAFyB,EAGzBA,OAAO,GAAGpB,cAAc,CAACsB,cAAlB,GAAmCtB,cAAc,CAACuB,cAHhC,EAIzB,EAJyB,CAA3B,CADK;IAOLJ,WAAW,EAAEL,sBAAsB,CAACK,WAAD,EAAcH,QAAd;EAP9B,CAAP;AASD"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { CommonStyles } from '../../../styles/executionTasks/CommonStyles';
|
|
2
|
+
import ProgressDialog from '../../widgets/ProgressDialog';
|
|
3
|
+
import { View } from 'react-native';
|
|
4
|
+
import React, { useEffect, useState } from 'react';
|
|
5
|
+
import { PLEASE_WAIT } from '../../../res/strings';
|
|
6
|
+
import { getApiResponse, getHttpETOutput } from './HttpEtUtils';
|
|
7
|
+
|
|
8
|
+
const HttpRequestET = props => {
|
|
9
|
+
const [inProgress, setInProgress] = useState(true);
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
(async () => {
|
|
12
|
+
if (inProgress) {
|
|
13
|
+
try {
|
|
14
|
+
const apiResponse = await getApiResponse(props.api);
|
|
15
|
+
setInProgress(false);
|
|
16
|
+
props.onSubmitET(await getHttpETOutput(apiResponse.data, props.api.responseJsonPath, true));
|
|
17
|
+
} catch (error) {
|
|
18
|
+
setInProgress(false);
|
|
19
|
+
|
|
20
|
+
if (error.response) {
|
|
21
|
+
/**
|
|
22
|
+
* The request was made and the server responded
|
|
23
|
+
* with a status code that falls out of the range of 2xx
|
|
24
|
+
*/
|
|
25
|
+
props.onSubmitET(await getHttpETOutput(error.response.data, props.api.errorJsonPath, false));
|
|
26
|
+
} else {
|
|
27
|
+
props.onSubmitET(await getHttpETOutput(error, '', false));
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
})();
|
|
32
|
+
}, [inProgress, props]);
|
|
33
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
34
|
+
style: CommonStyles.mainContainer
|
|
35
|
+
}, /*#__PURE__*/React.createElement(ProgressDialog, {
|
|
36
|
+
visible: inProgress,
|
|
37
|
+
label: props.message ?? PLEASE_WAIT
|
|
38
|
+
}));
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export default HttpRequestET;
|
|
42
|
+
//# sourceMappingURL=HttpRequestET.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["CommonStyles","ProgressDialog","View","React","useEffect","useState","PLEASE_WAIT","getApiResponse","getHttpETOutput","HttpRequestET","props","inProgress","setInProgress","apiResponse","api","onSubmitET","data","responseJsonPath","error","response","errorJsonPath","mainContainer","message"],"sources":["HttpRequestET.tsx"],"sourcesContent":["import type { HttpRequestETInput } from './HttpRequestETSchema';\nimport { CommonStyles } from '../../../styles/executionTasks/CommonStyles';\nimport ProgressDialog from '../../widgets/ProgressDialog';\nimport { View } from 'react-native';\nimport React, { useEffect, useState } from 'react';\nimport { PLEASE_WAIT } from '../../../res/strings';\nimport { getApiResponse, getHttpETOutput } from './HttpEtUtils';\n\nconst HttpRequestET = (props: HttpRequestETInput) => {\n const [inProgress, setInProgress] = useState(true);\n\n useEffect(() => {\n (async () => {\n if (inProgress) {\n try {\n const apiResponse = await getApiResponse(props.api);\n setInProgress(false);\n props.onSubmitET(\n await getHttpETOutput(\n apiResponse.data,\n props.api.responseJsonPath,\n true\n )\n );\n } catch (error: any) {\n setInProgress(false);\n if (error.response) {\n /**\n * The request was made and the server responded\n * with a status code that falls out of the range of 2xx\n */\n props.onSubmitET(\n await getHttpETOutput(\n error.response.data,\n props.api.errorJsonPath,\n false\n )\n );\n } else {\n props.onSubmitET(await getHttpETOutput(error, '', false));\n }\n }\n }\n })();\n }, [inProgress, props]);\n return (\n <View style={CommonStyles.mainContainer}>\n <ProgressDialog\n visible={inProgress}\n label={props.message ?? PLEASE_WAIT}\n />\n </View>\n );\n};\nexport default HttpRequestET;\n"],"mappings":"AACA,SAASA,YAAT,QAA6B,6CAA7B;AACA,OAAOC,cAAP,MAA2B,8BAA3B;AACA,SAASC,IAAT,QAAqB,cAArB;AACA,OAAOC,KAAP,IAAgBC,SAAhB,EAA2BC,QAA3B,QAA2C,OAA3C;AACA,SAASC,WAAT,QAA4B,sBAA5B;AACA,SAASC,cAAT,EAAyBC,eAAzB,QAAgD,eAAhD;;AAEA,MAAMC,aAAa,GAAIC,KAAD,IAA+B;EACnD,MAAM,CAACC,UAAD,EAAaC,aAAb,IAA8BP,QAAQ,CAAC,IAAD,CAA5C;EAEAD,SAAS,CAAC,MAAM;IACd,CAAC,YAAY;MACX,IAAIO,UAAJ,EAAgB;QACd,IAAI;UACF,MAAME,WAAW,GAAG,MAAMN,cAAc,CAACG,KAAK,CAACI,GAAP,CAAxC;UACAF,aAAa,CAAC,KAAD,CAAb;UACAF,KAAK,CAACK,UAAN,CACE,MAAMP,eAAe,CACnBK,WAAW,CAACG,IADO,EAEnBN,KAAK,CAACI,GAAN,CAAUG,gBAFS,EAGnB,IAHmB,CADvB;QAOD,CAVD,CAUE,OAAOC,KAAP,EAAmB;UACnBN,aAAa,CAAC,KAAD,CAAb;;UACA,IAAIM,KAAK,CAACC,QAAV,EAAoB;YAClB;AACZ;AACA;AACA;YACYT,KAAK,CAACK,UAAN,CACE,MAAMP,eAAe,CACnBU,KAAK,CAACC,QAAN,CAAeH,IADI,EAEnBN,KAAK,CAACI,GAAN,CAAUM,aAFS,EAGnB,KAHmB,CADvB;UAOD,CAZD,MAYO;YACLV,KAAK,CAACK,UAAN,CAAiB,MAAMP,eAAe,CAACU,KAAD,EAAQ,EAAR,EAAY,KAAZ,CAAtC;UACD;QACF;MACF;IACF,CA/BD;EAgCD,CAjCQ,EAiCN,CAACP,UAAD,EAAaD,KAAb,CAjCM,CAAT;EAkCA,oBACE,oBAAC,IAAD;IAAM,KAAK,EAAEV,YAAY,CAACqB;EAA1B,gBACE,oBAAC,cAAD;IACE,OAAO,EAAEV,UADX;IAEE,KAAK,EAAED,KAAK,CAACY,OAAN,IAAiBhB;EAF1B,EADF,CADF;AAQD,CA7CD;;AA8CA,eAAeG,aAAf"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["HttpRequestETSchema.ts"],"sourcesContent":["import type {\n BaseETRequest,\n BaseETResponse,\n} from '../../../models/execTasks/ETBaseModels';\n\nexport type HTTPMethod = 'PUT' | 'POST' | 'GET';\nexport type HeaderKey = string;\nexport type HeaderValue = string;\n/**\n * API headers\n */\nexport type Headers = {\n key?: HeaderKey;\n value?: HeaderValue;\n};\n\nexport type HttpRequestETInput = BaseETRequest & {\n api: APIData;\n onSubmitET: (value: HttpRequestETOutput) => void;\n};\n/**\n * API Details\n */\n\nexport type HttpRequestETOutput = BaseETResponse & {\n apiResponse: object;\n};\nexport interface APIData {\n uri: string;\n timeout?: number;\n httpMethod: HTTPMethod;\n requestBody?: HTTPRequestBody;\n headers?: Headers[];\n errorJsonPath: string;\n responseJsonPath: string;\n}\n/**\n * request body object\n */\nexport interface HTTPRequestBody {\n [k: string]: unknown;\n}\n"],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["CaptureSchema.ts"],"sourcesContent":["/**\n * Length (in cm)\n */\nimport type {\n BaseETRequest,\n BaseETResponse,\n} from '../../../models/execTasks/ETBaseModels';\n\nexport interface CapturedImage {\n /**\n * Url of image\n */\n url: string;\n file?: { folder: string; name: string };\n\n /**\n * Epoch timestamp for the image capture\n */\n timestamp: number;\n}\n\nexport type CaptureOutput = BaseETResponse & {\n /**\n * Array of captured images\n */\n captures?: CapturedImage[];\n};\n\nexport type ImageData = {\n id: string;\n path: string;\n url: string;\n timestamp: number;\n};\n\n/**\n * Length (in cm)\n */\nexport type Length = number;\n/**\n * Breadth (in cm)\n */\nexport type Breadth = number;\n/**\n * Maximum Size limit (in kb) of image to be captured\n */\nexport type MaxFileSize = number;\n/**\n * Mode of capturing image\n */\nexport type CaptureMode = 'SINGLE' | 'MULTI';\n/**\n * Max limit of images to be captured in multi-capture mode\n */\nexport type MaxImageCount = number;\n/**\n * Title of instruction\n */\nexport type Title = string;\n/**\n * Message of instruction\n */\nexport type Message = string;\n/**\n * Can go back\n */\nexport type CanGoBack = boolean;\n\nexport type CaptureInput = BaseETRequest & {\n resolution: Resolution;\n fileSizeLimit: MaxFileSize;\n captureMode: CaptureMode;\n captureCountLimit?: MaxImageCount;\n onSubmitET: (etOutput: CaptureOutput) => void;\n} & {\n jobIds: string[];\n objRefs: string[];\n};\n/**\n * Resolution of image to be captured\n */\nexport interface Resolution {\n length: Length;\n breadth: Breadth;\n}\n"],"mappings":""}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { Alert } from 'react-native';
|
|
2
|
+
import * as FileSystem from 'expo-file-system';
|
|
3
|
+
import * as ImagePicker from 'expo-image-picker';
|
|
4
|
+
import { PermissionStatus } from 'expo-image-picker';
|
|
5
|
+
import { showToast } from '../../widgets/Toaster';
|
|
6
|
+
import * as ImageManipulator from 'expo-image-manipulator';
|
|
7
|
+
import Logger, { LOG_TYPE } from '../../../utils/Logger';
|
|
8
|
+
import { getBaseETResponse } from '../../../utils/ExecTaskUtils';
|
|
9
|
+
import { getEventCodeByET } from '../../../manager/dispatchCodes/EventCodeContainer';
|
|
10
|
+
import { EntityCode, ExecutionTaskID } from '../../../models/execTasks/ETConfig';
|
|
11
|
+
import { BaseError } from '../../../errors/BaseError';
|
|
12
|
+
import BaseErrorCodes from '../../../errors/ErrorCodes';
|
|
13
|
+
import DispatchSdkCache from '../../../manager/sdk/DispatchSdkCache';
|
|
14
|
+
import { insertDocumentInDB } from '../../../utils/SyncManagerUtils';
|
|
15
|
+
export async function deleteImage(imageData, images) {
|
|
16
|
+
await FileSystem.deleteAsync(imageData.path);
|
|
17
|
+
let filtered = images.filter(img => {
|
|
18
|
+
return img.id !== imageData.id;
|
|
19
|
+
});
|
|
20
|
+
return filtered;
|
|
21
|
+
}
|
|
22
|
+
export function getMaxImagesCount(props) {
|
|
23
|
+
if (props && props.captureCountLimit) return props.captureCountLimit;else return 1;
|
|
24
|
+
}
|
|
25
|
+
export function getImagesFileName() {
|
|
26
|
+
return `IMG_${Date.now().toString()}.jpg`;
|
|
27
|
+
}
|
|
28
|
+
export async function getCompressionRatio(uri, maxSize) {
|
|
29
|
+
try {
|
|
30
|
+
let fileInfo = await FileSystem.getInfoAsync(uri, {
|
|
31
|
+
size: true
|
|
32
|
+
});
|
|
33
|
+
maxSize = Math.min(maxSize, 1024);
|
|
34
|
+
|
|
35
|
+
if (fileInfo.exists) {
|
|
36
|
+
let fileSize = fileInfo.size / 1024;
|
|
37
|
+
|
|
38
|
+
if (fileSize > maxSize) {
|
|
39
|
+
return maxSize / fileSize;
|
|
40
|
+
} else return 1;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
return 1;
|
|
44
|
+
} catch (error) {
|
|
45
|
+
Logger.getInstance().logEvent('getCompressionRatio', error.message, LOG_TYPE.SDK_ERROR);
|
|
46
|
+
return 1;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
export async function checkCameraPermissionUtil() {
|
|
50
|
+
let response = await ImagePicker.getCameraPermissionsAsync();
|
|
51
|
+
if (response.granted) return true;else {
|
|
52
|
+
let resp = await ImagePicker.requestCameraPermissionsAsync();
|
|
53
|
+
return resp.status === PermissionStatus.GRANTED;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
export async function captureImage(imageWidth, imageHeight, fileSize) {
|
|
57
|
+
try {
|
|
58
|
+
if (!(await checkCameraPermissionUtil())) {
|
|
59
|
+
Alert.alert('Permissions Error', 'Camera permissions not provided!');
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
let response = await ImagePicker.launchCameraAsync({
|
|
64
|
+
quality: 1
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
if (!response.cancelled) {
|
|
68
|
+
let actionResize = {
|
|
69
|
+
resize: {
|
|
70
|
+
width: imageWidth,
|
|
71
|
+
height: imageHeight
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
let compressionRatio = await getCompressionRatio(response.uri, fileSize);
|
|
75
|
+
let resizedImage = await ImageManipulator.manipulateAsync(response.uri, [actionResize], {
|
|
76
|
+
compress: compressionRatio
|
|
77
|
+
});
|
|
78
|
+
FileSystem.deleteAsync(response.uri).then(() => Logger.getInstance().logEvent('CAPTURE_ET', 'File deleted success', LOG_TYPE.SDK_DEBUG)).catch(error => {
|
|
79
|
+
Logger.getInstance().logEvent('CAPTURE_ET', error.message, LOG_TYPE.SDK_ERROR);
|
|
80
|
+
});
|
|
81
|
+
return resizedImage;
|
|
82
|
+
} else {
|
|
83
|
+
showToast('User cancelled the action');
|
|
84
|
+
return null;
|
|
85
|
+
}
|
|
86
|
+
} catch (exception) {
|
|
87
|
+
showToast(`Error ${exception.message}`);
|
|
88
|
+
return null;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
export async function getCaptureOutput(imageDataList, captureProps) {
|
|
92
|
+
if (!imageDataList || imageDataList.length === 0) return { ...(await getBaseETResponse(EntityCode.IMAGE_CAPTURE, false, getEventCodeByET(ExecutionTaskID.IMAGE_CAPTURE, false), ''))
|
|
93
|
+
};else {
|
|
94
|
+
return { ...(await getBaseETResponse(EntityCode.IMAGE_CAPTURE, true, getEventCodeByET(ExecutionTaskID.IMAGE_CAPTURE, true), '')),
|
|
95
|
+
captures: await getImagesData(imageDataList, captureProps)
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
async function getImagesData(imagesDataList, captureProps) {
|
|
101
|
+
if (imagesDataList && imagesDataList.length > 0) {
|
|
102
|
+
let output = [];
|
|
103
|
+
const folderName = (await DispatchSdkCache.getInstance().getKeyFromCache(DispatchSdkCache.KEYS.FMS_FOLDER)) ?? 'NULL';
|
|
104
|
+
|
|
105
|
+
for (const data of imagesDataList) {
|
|
106
|
+
let insertID = await insertDocumentInDB(data.id, folderName, JSON.stringify(captureProps.jobIds), JSON.stringify(captureProps.objRefs), null, captureProps.title, data.path);
|
|
107
|
+
if (insertID) output.push({
|
|
108
|
+
url: '',
|
|
109
|
+
timestamp: data.timestamp,
|
|
110
|
+
file: {
|
|
111
|
+
folder: folderName,
|
|
112
|
+
name: data.id
|
|
113
|
+
}
|
|
114
|
+
});else throw new BaseError(BaseErrorCodes.SQLiteDBIssue, 'Unable to save Image');
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
return output;
|
|
118
|
+
} else return [];
|
|
119
|
+
}
|
|
120
|
+
//# sourceMappingURL=CaptureUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Alert","FileSystem","ImagePicker","PermissionStatus","showToast","ImageManipulator","Logger","LOG_TYPE","getBaseETResponse","getEventCodeByET","EntityCode","ExecutionTaskID","BaseError","BaseErrorCodes","DispatchSdkCache","insertDocumentInDB","deleteImage","imageData","images","deleteAsync","path","filtered","filter","img","id","getMaxImagesCount","props","captureCountLimit","getImagesFileName","Date","now","toString","getCompressionRatio","uri","maxSize","fileInfo","getInfoAsync","size","Math","min","exists","fileSize","error","getInstance","logEvent","message","SDK_ERROR","checkCameraPermissionUtil","response","getCameraPermissionsAsync","granted","resp","requestCameraPermissionsAsync","status","GRANTED","captureImage","imageWidth","imageHeight","alert","launchCameraAsync","quality","cancelled","actionResize","resize","width","height","compressionRatio","resizedImage","manipulateAsync","compress","then","SDK_DEBUG","catch","exception","getCaptureOutput","imageDataList","captureProps","length","IMAGE_CAPTURE","captures","getImagesData","imagesDataList","output","folderName","getKeyFromCache","KEYS","FMS_FOLDER","data","insertID","JSON","stringify","jobIds","objRefs","title","push","url","timestamp","file","folder","name","SQLiteDBIssue"],"sources":["CaptureUtils.ts"],"sourcesContent":["import type {\n CapturedImage,\n CaptureInput,\n CaptureOutput,\n ImageData,\n} from './CaptureSchema';\nimport { Alert } from 'react-native';\nimport * as FileSystem from 'expo-file-system';\nimport * as ImagePicker from 'expo-image-picker';\nimport { PermissionStatus } from 'expo-image-picker';\nimport { showToast } from '../../widgets/Toaster';\nimport type { ActionResize, ImageResult } from 'expo-image-manipulator';\nimport * as ImageManipulator from 'expo-image-manipulator';\nimport Logger, { LOG_TYPE } from '../../../utils/Logger';\nimport { getBaseETResponse } from '../../../utils/ExecTaskUtils';\nimport { getEventCodeByET } from '../../../manager/dispatchCodes/EventCodeContainer';\nimport {\n EntityCode,\n ExecutionTaskID,\n} from '../../../models/execTasks/ETConfig';\nimport { BaseError } from '../../../errors/BaseError';\nimport BaseErrorCodes from '../../../errors/ErrorCodes';\nimport DispatchSdkCache from '../../../manager/sdk/DispatchSdkCache';\nimport { insertDocumentInDB } from '../../../utils/SyncManagerUtils';\n\nexport async function deleteImage(\n imageData: ImageData,\n images: ImageData[]\n): Promise<ImageData[]> {\n await FileSystem.deleteAsync(imageData.path);\n let filtered = images.filter((img) => {\n return img.id !== imageData.id;\n });\n return filtered;\n}\n\nexport function getMaxImagesCount(props: CaptureInput) {\n if (props && props.captureCountLimit) return props.captureCountLimit;\n else return 1;\n}\n\nexport function getImagesFileName() {\n return `IMG_${Date.now().toString()}.jpg`;\n}\n\nexport async function getCompressionRatio(\n uri: string,\n maxSize: number\n): Promise<number> {\n try {\n let fileInfo = await FileSystem.getInfoAsync(uri, {\n size: true,\n });\n maxSize = Math.min(maxSize, 1024);\n if (fileInfo.exists) {\n let fileSize = fileInfo.size / 1024;\n if (fileSize > maxSize) {\n return maxSize / fileSize;\n } else return 1;\n }\n return 1;\n } catch (error: any) {\n Logger.getInstance().logEvent(\n 'getCompressionRatio',\n error.message,\n LOG_TYPE.SDK_ERROR\n );\n return 1;\n }\n}\n\nexport async function checkCameraPermissionUtil(): Promise<boolean> {\n let response = await ImagePicker.getCameraPermissionsAsync();\n if (response.granted) return true;\n else {\n let resp = await ImagePicker.requestCameraPermissionsAsync();\n return resp.status === PermissionStatus.GRANTED;\n }\n}\n\nexport async function captureImage(\n imageWidth: number,\n imageHeight: number,\n fileSize: number\n): Promise<ImageResult | null> {\n try {\n if (!(await checkCameraPermissionUtil())) {\n Alert.alert('Permissions Error', 'Camera permissions not provided!');\n return null;\n }\n let response = await ImagePicker.launchCameraAsync({\n quality: 1,\n });\n if (!response.cancelled) {\n let actionResize: ActionResize = {\n resize: {\n width: imageWidth,\n height: imageHeight,\n },\n };\n let compressionRatio = await getCompressionRatio(response.uri, fileSize);\n let resizedImage = await ImageManipulator.manipulateAsync(\n response.uri,\n [actionResize],\n {\n compress: compressionRatio,\n }\n );\n FileSystem.deleteAsync(response.uri)\n .then(() =>\n Logger.getInstance().logEvent(\n 'CAPTURE_ET',\n 'File deleted success',\n LOG_TYPE.SDK_DEBUG\n )\n )\n .catch((error) => {\n Logger.getInstance().logEvent(\n 'CAPTURE_ET',\n error.message,\n LOG_TYPE.SDK_ERROR\n );\n });\n return resizedImage;\n } else {\n showToast('User cancelled the action');\n return null;\n }\n } catch (exception: any) {\n showToast(`Error ${exception.message}`);\n return null;\n }\n}\n\nexport async function getCaptureOutput(\n imageDataList: ImageData[],\n captureProps: CaptureInput\n): Promise<CaptureOutput> {\n if (!imageDataList || imageDataList.length === 0)\n return {\n ...(await getBaseETResponse(\n EntityCode.IMAGE_CAPTURE,\n false,\n getEventCodeByET(ExecutionTaskID.IMAGE_CAPTURE, false),\n ''\n )),\n };\n else {\n return {\n ...(await getBaseETResponse(\n EntityCode.IMAGE_CAPTURE,\n true,\n getEventCodeByET(ExecutionTaskID.IMAGE_CAPTURE, true),\n ''\n )),\n captures: await getImagesData(imageDataList, captureProps),\n };\n }\n}\n\nasync function getImagesData(\n imagesDataList: ImageData[],\n captureProps: CaptureInput\n): Promise<CapturedImage[]> {\n if (imagesDataList && imagesDataList.length > 0) {\n let output: CapturedImage[] = [];\n const folderName =\n (await DispatchSdkCache.getInstance().getKeyFromCache(\n DispatchSdkCache.KEYS.FMS_FOLDER\n )) ?? 'NULL';\n for (const data of imagesDataList) {\n let insertID = await insertDocumentInDB(\n data.id,\n folderName,\n JSON.stringify(captureProps.jobIds),\n JSON.stringify(captureProps.objRefs),\n null,\n captureProps.title,\n data.path\n );\n if (insertID)\n output.push({\n url: '',\n timestamp: data.timestamp,\n file: { folder: folderName, name: data.id },\n });\n else\n throw new BaseError(\n BaseErrorCodes.SQLiteDBIssue,\n 'Unable to save Image'\n );\n }\n return output;\n } else return [];\n}\n"],"mappings":"AAMA,SAASA,KAAT,QAAsB,cAAtB;AACA,OAAO,KAAKC,UAAZ,MAA4B,kBAA5B;AACA,OAAO,KAAKC,WAAZ,MAA6B,mBAA7B;AACA,SAASC,gBAAT,QAAiC,mBAAjC;AACA,SAASC,SAAT,QAA0B,uBAA1B;AAEA,OAAO,KAAKC,gBAAZ,MAAkC,wBAAlC;AACA,OAAOC,MAAP,IAAiBC,QAAjB,QAAiC,uBAAjC;AACA,SAASC,iBAAT,QAAkC,8BAAlC;AACA,SAASC,gBAAT,QAAiC,mDAAjC;AACA,SACEC,UADF,EAEEC,eAFF,QAGO,oCAHP;AAIA,SAASC,SAAT,QAA0B,2BAA1B;AACA,OAAOC,cAAP,MAA2B,4BAA3B;AACA,OAAOC,gBAAP,MAA6B,uCAA7B;AACA,SAASC,kBAAT,QAAmC,iCAAnC;AAEA,OAAO,eAAeC,WAAf,CACLC,SADK,EAELC,MAFK,EAGiB;EACtB,MAAMjB,UAAU,CAAC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