scandit-react-native-datacapture-id 6.23.2 → 6.24.0-beta.2
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 +24 -19
- package/dist/id.js +6 -0
- package/dist/id.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +16 -4
- package/scandit-react-native-datacapture-id.podspec +1 -1
package/android/build.gradle
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import com.android.Version
|
|
2
|
+
|
|
3
|
+
apply plugin: "com.android.library"
|
|
4
|
+
apply plugin: "kotlin-android"
|
|
4
5
|
|
|
5
|
-
def supportsNamespace() {
|
|
6
|
-
def parsed =
|
|
6
|
+
static def supportsNamespace() {
|
|
7
|
+
def parsed = Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')
|
|
7
8
|
def major = parsed[0].toInteger()
|
|
8
9
|
def minor = parsed[1].toInteger()
|
|
9
10
|
|
|
10
|
-
// Namespace support was added in 7.3.0
|
|
11
|
+
// Namespace support was added in AGP 7.3.0
|
|
11
12
|
if (major == 7 && minor >= 3) {
|
|
12
13
|
return true
|
|
13
14
|
}
|
|
@@ -16,25 +17,28 @@ def supportsNamespace() {
|
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
buildscript {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
// Simple helper that allows the root project to override versions declared by this library.
|
|
21
|
+
ext.safeExtGet = { prop, fallback -> rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback }
|
|
22
|
+
|
|
23
|
+
// Ensures backward compatibility
|
|
24
|
+
ext.getKotlinVersion = {
|
|
25
|
+
if (ext.has("kotlinVersion")) {
|
|
26
|
+
ext.kotlinVersion()
|
|
27
|
+
} else {
|
|
28
|
+
ext.safeExtGet("kotlinVersion", "1.7.21")
|
|
29
|
+
}
|
|
22
30
|
}
|
|
23
31
|
|
|
24
32
|
repositories {
|
|
25
|
-
google()
|
|
26
33
|
mavenCentral()
|
|
34
|
+
google()
|
|
27
35
|
}
|
|
28
36
|
|
|
29
37
|
dependencies {
|
|
30
|
-
classpath
|
|
31
|
-
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
|
38
|
+
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${getKotlinVersion()}")
|
|
32
39
|
}
|
|
33
40
|
}
|
|
34
41
|
|
|
35
|
-
apply plugin: 'com.android.library'
|
|
36
|
-
apply plugin: 'kotlin-android'
|
|
37
|
-
|
|
38
42
|
android {
|
|
39
43
|
if (supportsNamespace()) {
|
|
40
44
|
sourceSets {
|
|
@@ -44,11 +48,12 @@ android {
|
|
|
44
48
|
}
|
|
45
49
|
namespace "com.scandit.datacapture.reactnative.id"
|
|
46
50
|
}
|
|
47
|
-
|
|
51
|
+
|
|
52
|
+
compileSdkVersion safeExtGet("compileSdkVersion", 33)
|
|
48
53
|
|
|
49
54
|
defaultConfig {
|
|
50
|
-
minSdkVersion safeExtGet(
|
|
51
|
-
targetSdkVersion safeExtGet(
|
|
55
|
+
minSdkVersion safeExtGet("minSdkVersion", 23)
|
|
56
|
+
targetSdkVersion safeExtGet("targetSdkVersion", 33)
|
|
52
57
|
versionCode 1
|
|
53
58
|
versionName "1.0"
|
|
54
59
|
}
|
|
@@ -59,7 +64,7 @@ android {
|
|
|
59
64
|
}
|
|
60
65
|
|
|
61
66
|
dependencies {
|
|
62
|
-
def sdk_version = "6.
|
|
67
|
+
def sdk_version = "6.24.0-beta.2"
|
|
63
68
|
|
|
64
69
|
println("Version of the native sdk used in this build: ${safeExtGet('global_sdk_version', sdk_version)}")
|
|
65
70
|
if (findProject(':scandit-datacapture-frameworks-id') != null) {
|
package/dist/id.js
CHANGED
|
@@ -557,6 +557,7 @@ class CommonCapturedIdFields {
|
|
|
557
557
|
get firstName() { return this.json.firstName; }
|
|
558
558
|
get lastName() { return this.json.lastName; }
|
|
559
559
|
get fullName() { return this.json.fullName; }
|
|
560
|
+
get secondaryLastName() { return this.json.secondaryLastName; }
|
|
560
561
|
get sex() { return this.json.sex; }
|
|
561
562
|
get dateOfBirth() {
|
|
562
563
|
return DateResult.fromJSON(this.json.dateOfBirth);
|
|
@@ -583,6 +584,7 @@ class CommonCapturedIdFields {
|
|
|
583
584
|
const firstName = json.firstName;
|
|
584
585
|
const lastName = json.lastName;
|
|
585
586
|
const fullName = json.fullName;
|
|
587
|
+
const secondaryLastName = json.secondaryLastName;
|
|
586
588
|
const sex = json.sex;
|
|
587
589
|
const dateOfBirth = DateResult.fromJSON(json.dateOfBirth);
|
|
588
590
|
const age = json.age;
|
|
@@ -605,6 +607,9 @@ class CommonCapturedIdFields {
|
|
|
605
607
|
if (!existingInstance.fullName) {
|
|
606
608
|
json.fullName = fullName;
|
|
607
609
|
}
|
|
610
|
+
if (!existingInstance.secondaryLastName) {
|
|
611
|
+
json.secondaryLastName = secondaryLastName;
|
|
612
|
+
}
|
|
608
613
|
if (!existingInstance.sex) {
|
|
609
614
|
json.sex = sex;
|
|
610
615
|
}
|
|
@@ -696,6 +701,7 @@ class CapturedId {
|
|
|
696
701
|
get firstName() { return this.commonCapturedFields.firstName; }
|
|
697
702
|
get lastName() { return this.commonCapturedFields.lastName; }
|
|
698
703
|
get fullName() { return this.commonCapturedFields.fullName; }
|
|
704
|
+
get secondaryLastName() { return this.commonCapturedFields.secondaryLastName; }
|
|
699
705
|
get sex() { return this.commonCapturedFields.sex; }
|
|
700
706
|
get dateOfBirth() {
|
|
701
707
|
return DateResult.fromJSON(this.commonCapturedFields.dateOfBirth);
|