scandit-react-native-datacapture-core 7.6.0-beta.1 → 7.6.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/android/build.gradle +1 -1
- package/android/src/main/kotlin/com/scandit/datacapture/reactnative/core/ScanditDataCaptureCoreModule.kt +1 -1
- package/dist/core.js +18 -19
- package/dist/core.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/ios/Sources/ScanditDataCaptureCore.m +1 -1
- package/ios/Sources/ScanditDataCaptureCore.swift +1 -1
- package/package.json +2 -2
- package/scandit-react-native-datacapture-core.podspec +1 -1
package/android/build.gradle
CHANGED
|
@@ -68,7 +68,7 @@ if (file( "${rootProject.projectDir}/build-test.gradle").exists()) {
|
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
dependencies {
|
|
71
|
-
def sdk_version = "7.6.
|
|
71
|
+
def sdk_version = "7.6.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) {
|
package/dist/core.js
CHANGED
|
@@ -2238,46 +2238,45 @@ class DataCaptureContext extends DefaultSerializeable {
|
|
|
2238
2238
|
this.controller.unsubscribeListener();
|
|
2239
2239
|
}
|
|
2240
2240
|
}
|
|
2241
|
-
/**
|
|
2242
|
-
* @deprecated Since 7.6.
|
|
2243
|
-
* Use setMode() instead. DataCaptureContext does not support multiple modes at the same time.
|
|
2244
|
-
*/
|
|
2245
2241
|
addMode(mode) {
|
|
2246
2242
|
this.addModeInternal(mode);
|
|
2247
2243
|
}
|
|
2248
2244
|
setMode(mode) {
|
|
2249
|
-
|
|
2250
|
-
this.removeAllModes();
|
|
2251
|
-
}
|
|
2245
|
+
this.removeAllModes();
|
|
2252
2246
|
this.addModeInternal(mode);
|
|
2253
2247
|
}
|
|
2254
2248
|
addModeInternal(mode) {
|
|
2255
2249
|
if (!this.modes.includes(mode)) {
|
|
2256
2250
|
this.modes.push(mode);
|
|
2257
|
-
mode._context = this;
|
|
2258
2251
|
this.controller.addModeToContext(mode);
|
|
2252
|
+
mode._context = this;
|
|
2259
2253
|
}
|
|
2260
2254
|
}
|
|
2261
2255
|
removeCurrentMode() {
|
|
2262
|
-
if (this.modes.length
|
|
2263
|
-
|
|
2256
|
+
if (this.modes.length === 0) {
|
|
2257
|
+
return;
|
|
2264
2258
|
}
|
|
2259
|
+
if (this.modes.length > 1) {
|
|
2260
|
+
console.warn('removeCurrentMode() called with multiple modes active. Consider using removeMode() for specific mode removal. Only the first mode will be removed.');
|
|
2261
|
+
}
|
|
2262
|
+
this.removeModeInternal(this.modes[0]);
|
|
2265
2263
|
}
|
|
2266
|
-
/**
|
|
2267
|
-
* @deprecated Since 7.6.
|
|
2268
|
-
* Use removeCurrentMode() instead.
|
|
2269
|
-
*/
|
|
2270
2264
|
removeMode(mode) {
|
|
2271
2265
|
this.removeModeInternal(mode);
|
|
2272
2266
|
}
|
|
2273
2267
|
removeModeInternal(mode) {
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2268
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2269
|
+
if (this.modes.includes(mode)) {
|
|
2270
|
+
this.modes.splice(this.modes.indexOf(mode), 1);
|
|
2271
|
+
mode._context = null;
|
|
2272
|
+
this.controller.removeModeFromContext(mode);
|
|
2273
|
+
}
|
|
2274
|
+
});
|
|
2279
2275
|
}
|
|
2280
2276
|
removeAllModes() {
|
|
2277
|
+
if (this.modes.length === 0) {
|
|
2278
|
+
return;
|
|
2279
|
+
}
|
|
2281
2280
|
this.modes.forEach(mode => {
|
|
2282
2281
|
mode._context = null;
|
|
2283
2282
|
});
|