@getyoti/yoti-doc-scan-react-native 5.0.1 → 6.0.0-alpha.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/README.md
CHANGED
|
@@ -98,7 +98,7 @@ For customization on Android, you can refer to the documentation outlined [here]
|
|
|
98
98
|
RNYotiDocScan.setRequestCode(0); // default: 9001
|
|
99
99
|
```
|
|
100
100
|
|
|
101
|
-
On iOS, the SDK expects launched
|
|
101
|
+
On iOS, the SDK expects a launched session to contain multiple flows by default. To enable a single-flow session, configure and include [yoti-doc-scan-react-native-configuration-ios.json](templates/yoti-doc-scan-react-native-configuration-ios.json) in your project’s target and then set the configuration as follows:
|
|
102
102
|
```javascript
|
|
103
103
|
RNYotiDocScan.setConfiguration({
|
|
104
104
|
bundle_identifier: "", // Optional: defaults to the main bundle identifier if not specified.
|
package/android/build.gradle
CHANGED
|
@@ -12,8 +12,8 @@ android {
|
|
|
12
12
|
defaultConfig {
|
|
13
13
|
minSdkVersion safeExtGet('minSdkVersion', 21)
|
|
14
14
|
targetSdkVersion safeExtGet('targetSdkVersion', 34)
|
|
15
|
-
versionCode
|
|
16
|
-
versionName "
|
|
15
|
+
versionCode 600
|
|
16
|
+
versionName "6.0.0-alpha.1"
|
|
17
17
|
ndk {
|
|
18
18
|
abiFilters "armeabi-v7a", "x86"
|
|
19
19
|
}
|
package/ios/Configuration.swift
CHANGED
|
@@ -8,6 +8,7 @@ struct Configuration: Decodable {
|
|
|
8
8
|
let includeSupplementaryDocumentModuleType: Bool?
|
|
9
9
|
let includeFaceTecModuleType: Bool?
|
|
10
10
|
let includeFaceCaptureModuleType: Bool?
|
|
11
|
+
let disableIdentityDocumentCaptureEdgeDetection: Bool?
|
|
11
12
|
let theme: Theme?
|
|
12
13
|
|
|
13
14
|
init(from decoder: Decoder) throws {
|
|
@@ -17,6 +18,7 @@ struct Configuration: Decodable {
|
|
|
17
18
|
includeSupplementaryDocumentModuleType = try container.decodeIfPresent(Bool.self, forKey: .includeSupplementaryDocumentModuleType)
|
|
18
19
|
includeFaceTecModuleType = try container.decodeIfPresent(Bool.self, forKey: .includeFaceTecModuleType)
|
|
19
20
|
includeFaceCaptureModuleType = try container.decodeIfPresent(Bool.self, forKey: .includeFaceCaptureModuleType)
|
|
21
|
+
disableIdentityDocumentCaptureEdgeDetection = try container.decodeIfPresent(Bool.self, forKey: .disableIdentityDocumentCaptureEdgeDetection)
|
|
20
22
|
theme = try container.decodeIfPresent(Theme.self, forKey: .theme)
|
|
21
23
|
}
|
|
22
24
|
|
|
@@ -26,6 +28,7 @@ struct Configuration: Decodable {
|
|
|
26
28
|
case includeSupplementaryDocumentModuleType = "include_supplementary_document_module_type"
|
|
27
29
|
case includeFaceTecModuleType = "include_facetec_module_type"
|
|
28
30
|
case includeFaceCaptureModuleType = "include_face_capture_module_type"
|
|
31
|
+
case disableIdentityDocumentCaptureEdgeDetection = "disable_identity_document_capture_edge_detection"
|
|
29
32
|
case theme
|
|
30
33
|
}
|
|
31
34
|
}
|
package/ios/RNYotiDocScan.swift
CHANGED
|
@@ -71,6 +71,7 @@ extension RNYotiDocScan: YotiSDKDataSource, YotiSDKDelegate {
|
|
|
71
71
|
sessionToken: sessionToken,
|
|
72
72
|
singleFlow: _configuration?.singleFlow ?? false,
|
|
73
73
|
moduleTypes: moduleTypes(),
|
|
74
|
+
options: options(),
|
|
74
75
|
theme: theme()
|
|
75
76
|
)
|
|
76
77
|
}
|
|
@@ -117,6 +118,14 @@ fileprivate extension RNYotiDocScan {
|
|
|
117
118
|
return moduleTypes
|
|
118
119
|
}
|
|
119
120
|
|
|
121
|
+
func options() -> [YotiSDKOption]? {
|
|
122
|
+
if _configuration?.disableIdentityDocumentCaptureEdgeDetection == true {
|
|
123
|
+
return [.disableIdentityDocumentCaptureEdgeDetection]
|
|
124
|
+
} else {
|
|
125
|
+
return nil
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
120
129
|
func theme() -> YotiSDKTheme? {
|
|
121
130
|
guard let theme = _configuration?.theme else {
|
|
122
131
|
return nil
|
|
@@ -22,6 +22,7 @@ struct ColorTheme: YotiSDKColorTheme, Decodable {
|
|
|
22
22
|
let borderCritical: UIColor
|
|
23
23
|
let borderEmphasis2: UIColor
|
|
24
24
|
let icon: UIColor
|
|
25
|
+
let icon2: UIColor
|
|
25
26
|
let icon3: UIColor
|
|
26
27
|
let iconEmphasis: UIColor
|
|
27
28
|
let iconWarning: UIColor
|
|
@@ -53,6 +54,7 @@ struct ColorTheme: YotiSDKColorTheme, Decodable {
|
|
|
53
54
|
let borderCritical = try container.decode(String.self, forKey: .borderCritical)
|
|
54
55
|
let borderEmphasis2 = try container.decode(String.self, forKey: .borderEmphasis2)
|
|
55
56
|
let icon = try container.decode(String.self, forKey: .icon)
|
|
57
|
+
let icon2 = try container.decode(String.self, forKey: .icon2)
|
|
56
58
|
let icon3 = try container.decode(String.self, forKey: .icon3)
|
|
57
59
|
let iconEmphasis = try container.decode(String.self, forKey: .iconEmphasis)
|
|
58
60
|
let iconWarning = try container.decode(String.self, forKey: .iconWarning)
|
|
@@ -81,6 +83,7 @@ struct ColorTheme: YotiSDKColorTheme, Decodable {
|
|
|
81
83
|
self.borderCritical = UIColor(hexString: borderCritical)
|
|
82
84
|
self.borderEmphasis2 = UIColor(hexString: borderEmphasis2)
|
|
83
85
|
self.icon = UIColor(hexString: icon)
|
|
86
|
+
self.icon2 = UIColor(hexString: icon2)
|
|
84
87
|
self.icon3 = UIColor(hexString: icon3)
|
|
85
88
|
self.iconEmphasis = UIColor(hexString: iconEmphasis)
|
|
86
89
|
self.iconWarning = UIColor(hexString: iconWarning)
|
|
@@ -112,6 +115,7 @@ struct ColorTheme: YotiSDKColorTheme, Decodable {
|
|
|
112
115
|
case borderCritical = "border_critical"
|
|
113
116
|
case borderEmphasis2 = "border_emphasis2"
|
|
114
117
|
case icon
|
|
118
|
+
case icon2
|
|
115
119
|
case icon3
|
|
116
120
|
case iconEmphasis = "icon_emphasis"
|
|
117
121
|
case iconWarning = "icon_warning"
|
|
@@ -16,6 +16,7 @@ struct IconTheme: YotiSDKIconTheme, Decodable {
|
|
|
16
16
|
var eye: YotiSDKIcon?
|
|
17
17
|
var exclamationmark: YotiSDKIcon?
|
|
18
18
|
var face: YotiSDKIcon?
|
|
19
|
+
var help: YotiSDKIcon?
|
|
19
20
|
var identityDocumentCapture: YotiSDKIcon?
|
|
20
21
|
var info: YotiSDKIcon?
|
|
21
22
|
var largeLeftChevron: YotiSDKIcon?
|
|
@@ -60,6 +61,9 @@ struct IconTheme: YotiSDKIconTheme, Decodable {
|
|
|
60
61
|
if let icon = try container.decodeIfPresent(Icon.self, forKey: .face) {
|
|
61
62
|
face = YotiSDKIcon(icon)
|
|
62
63
|
}
|
|
64
|
+
if let icon = try container.decodeIfPresent(Icon.self, forKey: .help) {
|
|
65
|
+
help = YotiSDKIcon(icon)
|
|
66
|
+
}
|
|
63
67
|
if let icon = try container.decodeIfPresent(Icon.self, forKey: .identityDocumentCapture) {
|
|
64
68
|
identityDocumentCapture = YotiSDKIcon(icon)
|
|
65
69
|
}
|
|
@@ -106,6 +110,7 @@ struct IconTheme: YotiSDKIconTheme, Decodable {
|
|
|
106
110
|
case eye
|
|
107
111
|
case exclamationmark
|
|
108
112
|
case face
|
|
113
|
+
case help
|
|
109
114
|
case identityDocumentCapture = "identity_document_capture"
|
|
110
115
|
case info
|
|
111
116
|
case largeLeftChevron = "large_left_chevron"
|
package/package.json
CHANGED