scandit-react-native-datacapture-core 8.2.0 → 8.3.0-beta.1
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/THIRD_PARTY.txt +1 -1
- package/android/build.gradle +20 -9
- package/android/generated/java/com/facebook/fbreact/specs/NativeScanditDataCaptureCoreSpec.java +83 -0
- package/android/generated/java/com/facebook/react/viewmanagers/RNTDataCaptureViewManagerDelegate.java +26 -0
- package/android/generated/java/com/facebook/react/viewmanagers/RNTDataCaptureViewManagerInterface.java +16 -0
- package/android/generated/jni/CMakeLists.txt +29 -0
- package/android/generated/jni/ScanditReactNativeDatacaptureCoreSpec-generated.cpp +52 -0
- package/android/generated/jni/ScanditReactNativeDatacaptureCoreSpec.h +31 -0
- package/android/generated/jni/react/renderer/components/ScanditReactNativeDatacaptureCoreSpec/ComponentDescriptors.cpp +22 -0
- package/android/generated/jni/react/renderer/components/ScanditReactNativeDatacaptureCoreSpec/ComponentDescriptors.h +24 -0
- package/android/generated/jni/react/renderer/components/ScanditReactNativeDatacaptureCoreSpec/EventEmitters.cpp +16 -0
- package/android/generated/jni/react/renderer/components/ScanditReactNativeDatacaptureCoreSpec/EventEmitters.h +23 -0
- package/android/generated/jni/react/renderer/components/ScanditReactNativeDatacaptureCoreSpec/Props.cpp +25 -0
- package/android/generated/jni/react/renderer/components/ScanditReactNativeDatacaptureCoreSpec/Props.h +27 -0
- package/android/generated/jni/react/renderer/components/ScanditReactNativeDatacaptureCoreSpec/ScanditReactNativeDatacaptureCoreSpecJSI-generated.cpp +47 -0
- package/android/generated/jni/react/renderer/components/ScanditReactNativeDatacaptureCoreSpec/ScanditReactNativeDatacaptureCoreSpecJSI.h +169 -0
- package/android/generated/jni/react/renderer/components/ScanditReactNativeDatacaptureCoreSpec/ShadowNodes.cpp +17 -0
- package/android/generated/jni/react/renderer/components/ScanditReactNativeDatacaptureCoreSpec/ShadowNodes.h +32 -0
- package/android/generated/jni/react/renderer/components/ScanditReactNativeDatacaptureCoreSpec/States.cpp +16 -0
- package/android/generated/jni/react/renderer/components/ScanditReactNativeDatacaptureCoreSpec/States.h +29 -0
- package/android/src/main/AndroidManifest.xml +3 -1
- package/android/src/main/AndroidManifestNew.xml +3 -1
- package/android/src/main/kotlin/com/scandit/datacapture/reactnative/core/{ScanditDataCaptureCoreModule.kt → ScanditDataCaptureCoreModuleBase.kt} +15 -40
- package/android/src/main/kotlin/com/scandit/datacapture/reactnative/core/ScanditDataCaptureCorePackage.kt +1 -23
- package/android/src/main/kotlin/com/scandit/datacapture/reactnative/core/ui/{DataCaptureViewManager.kt → DataCaptureViewManagerBase.kt} +9 -4
- package/android/src/main/newArch/kotlin/com/scandit/datacapture/reactnative/core/ScanditDataCaptureCoreModule.kt +72 -0
- package/android/src/main/newArch/kotlin/com/scandit/datacapture/reactnative/core/ScanditReactPackageBase.kt +44 -11
- package/android/src/main/newArch/kotlin/com/scandit/datacapture/reactnative/core/ui/DataCaptureViewManager.kt +31 -0
- package/android/src/main/newArch/kotlin/com/scandit/datacapture/reactnative/core/utils/ReactNativeEventEmitter.kt +39 -0
- package/android/src/main/oldArch/kotlin/com/scandit/datacapture/reactnative/core/ScanditDataCaptureCoreModule.kt +86 -0
- package/android/src/main/oldArch/kotlin/com/scandit/datacapture/reactnative/core/ScanditReactPackageBase.kt +5 -2
- package/android/src/main/oldArch/kotlin/com/scandit/datacapture/reactnative/core/ui/DataCaptureViewManager.kt +18 -0
- package/android/src/main/{kotlin → oldArch/kotlin}/com/scandit/datacapture/reactnative/core/utils/ReactNativeEventEmitter.kt +4 -1
- package/dist/core.js +850 -62
- package/dist/core.js.map +1 -1
- package/dist/dts/DataCaptureView.d.ts +3 -0
- package/dist/dts/index.d.ts +79 -13
- package/dist/dts/native/RNNativeCaller.d.ts +8 -1
- package/dist/index.js +44 -7
- package/dist/index.js.flow +79 -99
- package/dist/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/ios/Sources/NewArch/RCTDataCaptureView.mm +110 -0
- package/ios/Sources/NewArch/ScanditDataCaptureCore.mm +102 -0
- package/ios/Sources/OldArch/RCTFabricDataCaptureViewContainers.mm +17 -0
- package/ios/Sources/OldArch/ScanditDataCaptureCore.mm +92 -0
- package/ios/Sources/RNTSDCDataCaptureViewManager.swift +41 -0
- package/ios/Sources/SDCLogger.h +11 -0
- package/ios/Sources/SDCLogger.m +16 -0
- package/ios/Sources/SDCTurboModuleEventBridge.h +42 -0
- package/ios/Sources/SDCTurboModuleEventBridge.m +20 -0
- package/ios/Sources/ScanditDataCaptureCore-Bridging-Header.h +3 -0
- package/ios/Sources/ScanditDataCaptureCore.h +35 -1
- package/ios/Sources/ScanditDataCaptureCore.swift +134 -60
- package/ios/Sources/Shared/DataCaptureViewWrapper.swift +129 -0
- package/ios/Sources/{Protocols → Shared}/ScanditReactNativeFactoryContainer.swift +7 -3
- package/ios/Sources/Utils/CallbackLock.swift +1 -1
- package/ios/Sources/Utils/ReactNativeEmitter.swift +43 -10
- package/ios/generated/ScanditReactNativeDatacaptureCoreSpec/ComponentDescriptors.cpp +22 -0
- package/ios/generated/ScanditReactNativeDatacaptureCoreSpec/ComponentDescriptors.h +24 -0
- package/ios/generated/ScanditReactNativeDatacaptureCoreSpec/EventEmitters.cpp +16 -0
- package/ios/generated/ScanditReactNativeDatacaptureCoreSpec/EventEmitters.h +23 -0
- package/ios/generated/ScanditReactNativeDatacaptureCoreSpec/Props.cpp +25 -0
- package/ios/generated/ScanditReactNativeDatacaptureCoreSpec/Props.h +27 -0
- package/ios/generated/ScanditReactNativeDatacaptureCoreSpec/RCTComponentViewHelpers.h +20 -0
- package/ios/generated/ScanditReactNativeDatacaptureCoreSpec/ScanditReactNativeDatacaptureCoreSpec-generated.mm +67 -0
- package/ios/generated/ScanditReactNativeDatacaptureCoreSpec/ScanditReactNativeDatacaptureCoreSpec.h +109 -0
- package/ios/generated/ScanditReactNativeDatacaptureCoreSpec/ShadowNodes.cpp +17 -0
- package/ios/generated/ScanditReactNativeDatacaptureCoreSpec/ShadowNodes.h +32 -0
- package/ios/generated/ScanditReactNativeDatacaptureCoreSpec/States.cpp +16 -0
- package/ios/generated/ScanditReactNativeDatacaptureCoreSpec/States.h +29 -0
- package/ios/generated/ScanditReactNativeDatacaptureCoreSpecJSI-generated.cpp +47 -0
- package/ios/generated/ScanditReactNativeDatacaptureCoreSpecJSI.h +169 -0
- package/package.json +26 -7
- package/react-native.config.js +12 -0
- package/scandit-react-native-datacapture-core.podspec +49 -17
- package/specs/NativeScanditDataCaptureCore.ts +36 -0
- package/specs/RNTDataCaptureViewNativeComponent.ts +14 -0
- package/ios/Sources/ScanditDataCaptureCore.m +0 -30
- package/ios/Sources/ScanditDataCaptureViewManager.swift +0 -63
package/THIRD_PARTY.txt
CHANGED
|
@@ -211,7 +211,6 @@ includes components licensed under the following licenses:
|
|
|
211
211
|
|
|
212
212
|
|
|
213
213
|
Copyright (c) 2017-2022 Arm Limited
|
|
214
|
-
Copyright (c) 2007-2010 Baptiste Lepilleur
|
|
215
214
|
Copyright (c) 2013-2022 Niels Lohmann
|
|
216
215
|
Copyright (c) 2008-2018 The Khronos Group Inc.
|
|
217
216
|
|
|
@@ -284,6 +283,7 @@ includes components licensed under the following licenses:
|
|
|
284
283
|
|
|
285
284
|
================================================================================
|
|
286
285
|
|
|
286
|
+
|
|
287
287
|
Copyright (c) 2017 Ollix
|
|
288
288
|
|
|
289
289
|
Permission is hereby granted, free of charge, to any person
|
package/android/build.gradle
CHANGED
|
@@ -3,6 +3,15 @@ import com.android.Version
|
|
|
3
3
|
apply plugin: "com.android.library"
|
|
4
4
|
apply plugin: "kotlin-android"
|
|
5
5
|
|
|
6
|
+
|
|
7
|
+
def isNewArchitectureEnabled() {
|
|
8
|
+
return project.hasProperty("newArchEnabled") && project.newArchEnabled == "true"
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
if (isNewArchitectureEnabled()) {
|
|
12
|
+
apply plugin: "com.facebook.react"
|
|
13
|
+
}
|
|
14
|
+
|
|
6
15
|
static def supportsNamespace() {
|
|
7
16
|
def parsed = Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')
|
|
8
17
|
def major = parsed[0].toInteger()
|
|
@@ -39,13 +48,7 @@ buildscript {
|
|
|
39
48
|
}
|
|
40
49
|
}
|
|
41
50
|
|
|
42
|
-
|
|
43
|
-
// To opt-in for the New Architecture, you can either:
|
|
44
|
-
// - Set `newArchEnabled` to true inside the `gradle.properties` file
|
|
45
|
-
// - Invoke gradle with `-newArchEnabled=true`
|
|
46
|
-
// - Set an environment variable `ORG_GRADLE_PROJECT_newArchEnabled=true`
|
|
47
|
-
return project.hasProperty("newArchEnabled") && project.newArchEnabled == "true"
|
|
48
|
-
}
|
|
51
|
+
|
|
49
52
|
android {
|
|
50
53
|
if (supportsNamespace()) {
|
|
51
54
|
sourceSets {
|
|
@@ -57,14 +60,16 @@ android {
|
|
|
57
60
|
}
|
|
58
61
|
|
|
59
62
|
compileSdkVersion safeExtGet("compileSdkVersion", 33)
|
|
60
|
-
|
|
63
|
+
|
|
61
64
|
sourceSets {
|
|
62
65
|
main {
|
|
63
66
|
if (supportsNamespace()) {
|
|
64
67
|
manifest.srcFile "src/main/AndroidManifestNew.xml" // no package on it
|
|
65
68
|
}
|
|
69
|
+
// Architecture-specific source sets for both modules and view managers
|
|
66
70
|
if (this.isNewArchitectureEnabled()) {
|
|
67
71
|
kotlin.srcDirs += ['src/main/newArch/kotlin']
|
|
72
|
+
java.srcDirs += ['generated/java']
|
|
68
73
|
} else {
|
|
69
74
|
kotlin.srcDirs += ['src/main/oldArch/kotlin']
|
|
70
75
|
}
|
|
@@ -83,12 +88,18 @@ android {
|
|
|
83
88
|
}
|
|
84
89
|
}
|
|
85
90
|
|
|
91
|
+
if (isNewArchitectureEnabled()) {
|
|
92
|
+
react {
|
|
93
|
+
codegenJavaPackageName = "com.scandit.datacapture.reactnative.core"
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
86
97
|
if (file( "${rootProject.projectDir}/build-test.gradle").exists()) {
|
|
87
98
|
apply from: "${rootProject.projectDir}/build-test.gradle"
|
|
88
99
|
}
|
|
89
100
|
|
|
90
101
|
dependencies {
|
|
91
|
-
def sdk_version = "8.
|
|
102
|
+
def sdk_version = "8.3.0-beta.1"
|
|
92
103
|
|
|
93
104
|
println("Version of the native sdk used in this build: ${safeExtGet('global_sdk_version', sdk_version)}")
|
|
94
105
|
if (findProject(':scandit-datacapture-frameworks-core') != null) {
|
package/android/generated/java/com/facebook/fbreact/specs/NativeScanditDataCaptureCoreSpec.java
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
+
*
|
|
5
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
+
* once the code is regenerated.
|
|
7
|
+
*
|
|
8
|
+
* @generated by codegen project: GenerateModuleJavaSpec.js
|
|
9
|
+
*
|
|
10
|
+
* @nolint
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
package com.facebook.fbreact.specs;
|
|
14
|
+
|
|
15
|
+
import com.facebook.proguard.annotations.DoNotStrip;
|
|
16
|
+
import com.facebook.react.bridge.Promise;
|
|
17
|
+
import com.facebook.react.bridge.ReactApplicationContext;
|
|
18
|
+
import com.facebook.react.bridge.ReactContextBaseJavaModule;
|
|
19
|
+
import com.facebook.react.bridge.ReactMethod;
|
|
20
|
+
import com.facebook.react.bridge.ReadableMap;
|
|
21
|
+
import com.facebook.react.common.build.ReactBuildConfig;
|
|
22
|
+
import com.facebook.react.turbomodule.core.interfaces.TurboModule;
|
|
23
|
+
import java.util.Arrays;
|
|
24
|
+
import java.util.HashSet;
|
|
25
|
+
import java.util.Map;
|
|
26
|
+
import java.util.Set;
|
|
27
|
+
import javax.annotation.Nonnull;
|
|
28
|
+
import javax.annotation.Nullable;
|
|
29
|
+
|
|
30
|
+
public abstract class NativeScanditDataCaptureCoreSpec extends ReactContextBaseJavaModule implements TurboModule {
|
|
31
|
+
public static final String NAME = "ScanditDataCaptureCore";
|
|
32
|
+
|
|
33
|
+
public NativeScanditDataCaptureCoreSpec(ReactApplicationContext reactContext) {
|
|
34
|
+
super(reactContext);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@Override
|
|
38
|
+
public @Nonnull String getName() {
|
|
39
|
+
return NAME;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
protected final void emitOnScanditEvent(ReadableMap value) {
|
|
43
|
+
mEventEmitterCallback.invoke("onScanditEvent", value);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
protected abstract Map<String, Object> getTypedExportedConstants();
|
|
47
|
+
|
|
48
|
+
@Override
|
|
49
|
+
@DoNotStrip
|
|
50
|
+
public final @Nullable Map<String, Object> getConstants() {
|
|
51
|
+
Map<String, Object> constants = getTypedExportedConstants();
|
|
52
|
+
if (ReactBuildConfig.DEBUG || ReactBuildConfig.IS_INTERNAL_BUILD) {
|
|
53
|
+
Set<String> obligatoryFlowConstants = new HashSet<>(Arrays.asList(
|
|
54
|
+
"Defaults"
|
|
55
|
+
));
|
|
56
|
+
Set<String> optionalFlowConstants = new HashSet<>();
|
|
57
|
+
Set<String> undeclaredConstants = new HashSet<>(constants.keySet());
|
|
58
|
+
undeclaredConstants.removeAll(obligatoryFlowConstants);
|
|
59
|
+
undeclaredConstants.removeAll(optionalFlowConstants);
|
|
60
|
+
if (!undeclaredConstants.isEmpty()) {
|
|
61
|
+
throw new IllegalStateException(String.format("Native Module Flow doesn't declare constants: %s", undeclaredConstants));
|
|
62
|
+
}
|
|
63
|
+
undeclaredConstants = obligatoryFlowConstants;
|
|
64
|
+
undeclaredConstants.removeAll(constants.keySet());
|
|
65
|
+
if (!undeclaredConstants.isEmpty()) {
|
|
66
|
+
throw new IllegalStateException(String.format("Native Module doesn't fill in constants: %s", undeclaredConstants));
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return constants;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
@ReactMethod
|
|
73
|
+
@DoNotStrip
|
|
74
|
+
public abstract void createDataCaptureView(ReadableMap data, Promise promise);
|
|
75
|
+
|
|
76
|
+
@ReactMethod
|
|
77
|
+
@DoNotStrip
|
|
78
|
+
public abstract void removeDataCaptureView(ReadableMap data, Promise promise);
|
|
79
|
+
|
|
80
|
+
@ReactMethod
|
|
81
|
+
@DoNotStrip
|
|
82
|
+
public abstract void executeCore(ReadableMap data, Promise promise);
|
|
83
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
3
|
+
*
|
|
4
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
5
|
+
* once the code is regenerated.
|
|
6
|
+
*
|
|
7
|
+
* @generated by codegen project: GeneratePropsJavaDelegate.js
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
package com.facebook.react.viewmanagers;
|
|
11
|
+
|
|
12
|
+
import android.view.View;
|
|
13
|
+
import androidx.annotation.Nullable;
|
|
14
|
+
import com.facebook.react.uimanager.BaseViewManager;
|
|
15
|
+
import com.facebook.react.uimanager.BaseViewManagerDelegate;
|
|
16
|
+
import com.facebook.react.uimanager.LayoutShadowNode;
|
|
17
|
+
|
|
18
|
+
public class RNTDataCaptureViewManagerDelegate<T extends View, U extends BaseViewManager<T, ? extends LayoutShadowNode> & RNTDataCaptureViewManagerInterface<T>> extends BaseViewManagerDelegate<T, U> {
|
|
19
|
+
public RNTDataCaptureViewManagerDelegate(U viewManager) {
|
|
20
|
+
super(viewManager);
|
|
21
|
+
}
|
|
22
|
+
@Override
|
|
23
|
+
public void setProperty(T view, String propName, @Nullable Object value) {
|
|
24
|
+
super.setProperty(view, propName, value);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
3
|
+
*
|
|
4
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
5
|
+
* once the code is regenerated.
|
|
6
|
+
*
|
|
7
|
+
* @generated by codegen project: GeneratePropsJavaInterface.js
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
package com.facebook.react.viewmanagers;
|
|
11
|
+
|
|
12
|
+
import android.view.View;
|
|
13
|
+
|
|
14
|
+
public interface RNTDataCaptureViewManagerInterface<T extends View> {
|
|
15
|
+
// No props
|
|
16
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
#
|
|
3
|
+
# This source code is licensed under the MIT license found in the
|
|
4
|
+
# LICENSE file in the root directory of this source tree.
|
|
5
|
+
|
|
6
|
+
cmake_minimum_required(VERSION 3.13)
|
|
7
|
+
set(CMAKE_VERBOSE_MAKEFILE on)
|
|
8
|
+
|
|
9
|
+
file(GLOB react_codegen_SRCS CONFIGURE_DEPENDS *.cpp react/renderer/components/ScanditReactNativeDatacaptureCoreSpec/*.cpp)
|
|
10
|
+
|
|
11
|
+
add_library(
|
|
12
|
+
react_codegen_ScanditReactNativeDatacaptureCoreSpec
|
|
13
|
+
OBJECT
|
|
14
|
+
${react_codegen_SRCS}
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
target_include_directories(react_codegen_ScanditReactNativeDatacaptureCoreSpec PUBLIC . react/renderer/components/ScanditReactNativeDatacaptureCoreSpec)
|
|
18
|
+
|
|
19
|
+
target_link_libraries(
|
|
20
|
+
react_codegen_ScanditReactNativeDatacaptureCoreSpec
|
|
21
|
+
fbjni
|
|
22
|
+
jsi
|
|
23
|
+
# We need to link different libraries based on whether we are building rncore or not, that's necessary
|
|
24
|
+
# because we want to break a circular dependency between react_codegen_rncore and reactnative
|
|
25
|
+
reactnative
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
target_compile_reactnative_options(react_codegen_ScanditReactNativeDatacaptureCoreSpec PRIVATE)
|
|
29
|
+
target_compile_options(react_codegen_ScanditReactNativeDatacaptureCoreSpec PRIVATE -Wno-deprecated-declarations)
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
+
*
|
|
5
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
+
* once the code is regenerated.
|
|
7
|
+
*
|
|
8
|
+
* @generated by codegen project: GenerateModuleJniCpp.js
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
#include "ScanditReactNativeDatacaptureCoreSpec.h"
|
|
12
|
+
|
|
13
|
+
namespace facebook::react {
|
|
14
|
+
|
|
15
|
+
static facebook::jsi::Value __hostFunction_NativeScanditDataCaptureCoreSpecJSI_getConstants(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
16
|
+
static jmethodID cachedMethodId = nullptr;
|
|
17
|
+
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, ObjectKind, "getConstants", "()Ljava/util/Map;", args, count, cachedMethodId);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
static facebook::jsi::Value __hostFunction_NativeScanditDataCaptureCoreSpecJSI_createDataCaptureView(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
21
|
+
static jmethodID cachedMethodId = nullptr;
|
|
22
|
+
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "createDataCaptureView", "(Lcom/facebook/react/bridge/ReadableMap;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
static facebook::jsi::Value __hostFunction_NativeScanditDataCaptureCoreSpecJSI_removeDataCaptureView(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
26
|
+
static jmethodID cachedMethodId = nullptr;
|
|
27
|
+
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "removeDataCaptureView", "(Lcom/facebook/react/bridge/ReadableMap;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
static facebook::jsi::Value __hostFunction_NativeScanditDataCaptureCoreSpecJSI_executeCore(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
31
|
+
static jmethodID cachedMethodId = nullptr;
|
|
32
|
+
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "executeCore", "(Lcom/facebook/react/bridge/ReadableMap;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
NativeScanditDataCaptureCoreSpecJSI::NativeScanditDataCaptureCoreSpecJSI(const JavaTurboModule::InitParams ¶ms)
|
|
36
|
+
: JavaTurboModule(params) {
|
|
37
|
+
methodMap_["getConstants"] = MethodMetadata {0, __hostFunction_NativeScanditDataCaptureCoreSpecJSI_getConstants};
|
|
38
|
+
methodMap_["createDataCaptureView"] = MethodMetadata {1, __hostFunction_NativeScanditDataCaptureCoreSpecJSI_createDataCaptureView};
|
|
39
|
+
methodMap_["removeDataCaptureView"] = MethodMetadata {1, __hostFunction_NativeScanditDataCaptureCoreSpecJSI_removeDataCaptureView};
|
|
40
|
+
methodMap_["executeCore"] = MethodMetadata {1, __hostFunction_NativeScanditDataCaptureCoreSpecJSI_executeCore};
|
|
41
|
+
eventEmitterMap_["onScanditEvent"] = std::make_shared<AsyncEventEmitter<folly::dynamic>>();
|
|
42
|
+
setEventEmitterCallback(params.instance);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
std::shared_ptr<TurboModule> ScanditReactNativeDatacaptureCoreSpec_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams ¶ms) {
|
|
46
|
+
if (moduleName == "ScanditDataCaptureCore") {
|
|
47
|
+
return std::make_shared<NativeScanditDataCaptureCoreSpecJSI>(params);
|
|
48
|
+
}
|
|
49
|
+
return nullptr;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
} // namespace facebook::react
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
+
*
|
|
5
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
+
* once the code is regenerated.
|
|
7
|
+
*
|
|
8
|
+
* @generated by codegen project: GenerateModuleJniH.js
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
#pragma once
|
|
12
|
+
|
|
13
|
+
#include <ReactCommon/JavaTurboModule.h>
|
|
14
|
+
#include <ReactCommon/TurboModule.h>
|
|
15
|
+
#include <jsi/jsi.h>
|
|
16
|
+
|
|
17
|
+
namespace facebook::react {
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* JNI C++ class for module 'NativeScanditDataCaptureCore'
|
|
21
|
+
*/
|
|
22
|
+
class JSI_EXPORT NativeScanditDataCaptureCoreSpecJSI : public JavaTurboModule {
|
|
23
|
+
public:
|
|
24
|
+
NativeScanditDataCaptureCoreSpecJSI(const JavaTurboModule::InitParams ¶ms);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
JSI_EXPORT
|
|
29
|
+
std::shared_ptr<TurboModule> ScanditReactNativeDatacaptureCoreSpec_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams ¶ms);
|
|
30
|
+
|
|
31
|
+
} // namespace facebook::react
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
+
*
|
|
5
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
+
* once the code is regenerated.
|
|
7
|
+
*
|
|
8
|
+
* @generated by codegen project: GenerateComponentDescriptorCpp.js
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
#include "ComponentDescriptors.h"
|
|
12
|
+
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
|
13
|
+
#include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
|
|
14
|
+
|
|
15
|
+
namespace facebook::react {
|
|
16
|
+
|
|
17
|
+
void ScanditReactNativeDatacaptureCoreSpec_registerComponentDescriptorsFromCodegen(
|
|
18
|
+
std::shared_ptr<const ComponentDescriptorProviderRegistry> registry) {
|
|
19
|
+
registry->add(concreteComponentDescriptorProvider<RNTDataCaptureViewComponentDescriptor>());
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
} // namespace facebook::react
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
+
*
|
|
5
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
+
* once the code is regenerated.
|
|
7
|
+
*
|
|
8
|
+
* @generated by codegen project: GenerateComponentDescriptorH.js
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
#pragma once
|
|
12
|
+
|
|
13
|
+
#include "ShadowNodes.h"
|
|
14
|
+
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
|
15
|
+
#include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
|
|
16
|
+
|
|
17
|
+
namespace facebook::react {
|
|
18
|
+
|
|
19
|
+
using RNTDataCaptureViewComponentDescriptor = ConcreteComponentDescriptor<RNTDataCaptureViewShadowNode>;
|
|
20
|
+
|
|
21
|
+
void ScanditReactNativeDatacaptureCoreSpec_registerComponentDescriptorsFromCodegen(
|
|
22
|
+
std::shared_ptr<const ComponentDescriptorProviderRegistry> registry);
|
|
23
|
+
|
|
24
|
+
} // namespace facebook::react
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
+
*
|
|
5
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
+
* once the code is regenerated.
|
|
7
|
+
*
|
|
8
|
+
* @generated by codegen project: GenerateEventEmitterCpp.js
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
#include "EventEmitters.h"
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
namespace facebook::react {
|
|
15
|
+
|
|
16
|
+
} // namespace facebook::react
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
+
*
|
|
5
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
+
* once the code is regenerated.
|
|
7
|
+
*
|
|
8
|
+
* @generated by codegen project: GenerateEventEmitterH.js
|
|
9
|
+
*/
|
|
10
|
+
#pragma once
|
|
11
|
+
|
|
12
|
+
#include <react/renderer/components/view/ViewEventEmitter.h>
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
namespace facebook::react {
|
|
16
|
+
class RNTDataCaptureViewEventEmitter : public ViewEventEmitter {
|
|
17
|
+
public:
|
|
18
|
+
using ViewEventEmitter::ViewEventEmitter;
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
};
|
|
23
|
+
} // namespace facebook::react
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
+
*
|
|
5
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
+
* once the code is regenerated.
|
|
7
|
+
*
|
|
8
|
+
* @generated by codegen project: GeneratePropsCpp.js
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
#include "Props.h"
|
|
12
|
+
#include <react/renderer/core/PropsParserContext.h>
|
|
13
|
+
#include <react/renderer/core/propsConversions.h>
|
|
14
|
+
|
|
15
|
+
namespace facebook::react {
|
|
16
|
+
|
|
17
|
+
RNTDataCaptureViewProps::RNTDataCaptureViewProps(
|
|
18
|
+
const PropsParserContext &context,
|
|
19
|
+
const RNTDataCaptureViewProps &sourceProps,
|
|
20
|
+
const RawProps &rawProps): ViewProps(context, sourceProps, rawProps)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
{}
|
|
24
|
+
|
|
25
|
+
} // namespace facebook::react
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
+
*
|
|
5
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
+
* once the code is regenerated.
|
|
7
|
+
*
|
|
8
|
+
* @generated by codegen project: GeneratePropsH.js
|
|
9
|
+
*/
|
|
10
|
+
#pragma once
|
|
11
|
+
|
|
12
|
+
#include <react/renderer/components/view/ViewProps.h>
|
|
13
|
+
#include <react/renderer/core/PropsParserContext.h>
|
|
14
|
+
|
|
15
|
+
namespace facebook::react {
|
|
16
|
+
|
|
17
|
+
class RNTDataCaptureViewProps final : public ViewProps {
|
|
18
|
+
public:
|
|
19
|
+
RNTDataCaptureViewProps() = default;
|
|
20
|
+
RNTDataCaptureViewProps(const PropsParserContext& context, const RNTDataCaptureViewProps &sourceProps, const RawProps &rawProps);
|
|
21
|
+
|
|
22
|
+
#pragma mark - Props
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
} // namespace facebook::react
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
3
|
+
*
|
|
4
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
5
|
+
* once the code is regenerated.
|
|
6
|
+
*
|
|
7
|
+
* @generated by codegen project: GenerateModuleCpp.js
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
#include "ScanditReactNativeDatacaptureCoreSpecJSI.h"
|
|
11
|
+
|
|
12
|
+
namespace facebook::react {
|
|
13
|
+
|
|
14
|
+
static jsi::Value __hostFunction_NativeScanditDataCaptureCoreCxxSpecJSI_getConstants(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
15
|
+
return static_cast<NativeScanditDataCaptureCoreCxxSpecJSI *>(&turboModule)->getConstants(
|
|
16
|
+
rt
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
static jsi::Value __hostFunction_NativeScanditDataCaptureCoreCxxSpecJSI_createDataCaptureView(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
20
|
+
return static_cast<NativeScanditDataCaptureCoreCxxSpecJSI *>(&turboModule)->createDataCaptureView(
|
|
21
|
+
rt,
|
|
22
|
+
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt)
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
static jsi::Value __hostFunction_NativeScanditDataCaptureCoreCxxSpecJSI_removeDataCaptureView(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
26
|
+
return static_cast<NativeScanditDataCaptureCoreCxxSpecJSI *>(&turboModule)->removeDataCaptureView(
|
|
27
|
+
rt,
|
|
28
|
+
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt)
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
static jsi::Value __hostFunction_NativeScanditDataCaptureCoreCxxSpecJSI_executeCore(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
32
|
+
return static_cast<NativeScanditDataCaptureCoreCxxSpecJSI *>(&turboModule)->executeCore(
|
|
33
|
+
rt,
|
|
34
|
+
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt)
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
NativeScanditDataCaptureCoreCxxSpecJSI::NativeScanditDataCaptureCoreCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker)
|
|
39
|
+
: TurboModule("ScanditDataCaptureCore", jsInvoker) {
|
|
40
|
+
methodMap_["getConstants"] = MethodMetadata {0, __hostFunction_NativeScanditDataCaptureCoreCxxSpecJSI_getConstants};
|
|
41
|
+
methodMap_["createDataCaptureView"] = MethodMetadata {1, __hostFunction_NativeScanditDataCaptureCoreCxxSpecJSI_createDataCaptureView};
|
|
42
|
+
methodMap_["removeDataCaptureView"] = MethodMetadata {1, __hostFunction_NativeScanditDataCaptureCoreCxxSpecJSI_removeDataCaptureView};
|
|
43
|
+
methodMap_["executeCore"] = MethodMetadata {1, __hostFunction_NativeScanditDataCaptureCoreCxxSpecJSI_executeCore};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
} // namespace facebook::react
|