scandit-react-native-datacapture-core 7.2.0 → 7.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.
@@ -68,7 +68,7 @@ if (file( "${rootProject.projectDir}/build-test.gradle").exists()) {
68
68
  }
69
69
 
70
70
  dependencies {
71
- def sdk_version = "7.2.0"
71
+ def sdk_version = "7.3.0-beta.1"
72
72
 
73
73
  println("Version of the native sdk used in this build: ${safeExtGet('global_sdk_version', sdk_version)}")
74
74
  if (findProject(':scandit-datacapture-frameworks-core') != null) {
@@ -0,0 +1,11 @@
1
+ /*
2
+ * This file is part of the Scandit Data Capture SDK
3
+ *
4
+ * Copyright (C) 2025- Scandit AG. All rights reserved.
5
+ */
6
+
7
+ package com.scandit.datacapture.reactnative.core.data
8
+
9
+ import com.facebook.react.bridge.Promise
10
+
11
+ data class ViewCreationRequest(val viewId: Int, val viewJson: String, val promise: Promise)
@@ -17,16 +17,15 @@ import com.scandit.datacapture.frameworks.core.CoreModule
17
17
  import com.scandit.datacapture.frameworks.core.FrameworkModule
18
18
  import com.scandit.datacapture.frameworks.core.errors.ModuleNotStartedError
19
19
  import com.scandit.datacapture.frameworks.core.locator.ServiceLocator
20
+ import com.scandit.datacapture.reactnative.core.data.ViewCreationRequest
20
21
  import com.scandit.datacapture.reactnative.core.utils.ReactNativeResult
21
22
 
22
- private class CreateRequest(val viewJson: String, val promise: Promise)
23
-
24
23
  class DataCaptureViewManager(
25
24
  private val serviceLocator: ServiceLocator<FrameworkModule>,
26
25
  ) : ScanditViewGroupManager<FrameLayout>() {
27
26
  override fun getName(): String = "RNTDataCaptureView"
28
27
 
29
- private val cachedCreationRequests = mutableMapOf<Int, CreateRequest>()
28
+ private val cachedCreationRequests = mutableMapOf<Int, ViewCreationRequest>()
30
29
 
31
30
  override fun createNewInstance(reactContext: ThemedReactContext): FrameLayout =
32
31
  FrameLayout(reactContext)
@@ -69,7 +68,7 @@ class DataCaptureViewManager(
69
68
  val container = containers.firstOrNull { it.id == viewId }
70
69
 
71
70
  if (container == null) {
72
- cachedCreationRequests[viewId] = CreateRequest(viewJson, promise)
71
+ cachedCreationRequests[viewId] = ViewCreationRequest(viewId, viewJson, promise)
73
72
  return
74
73
  }
75
74