scandit-react-native-datacapture-id 6.21.2 → 6.22.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 +1 -1
- package/android/src/main/kotlin/com/scandit/datacapture/reactnative/id/ScanditDataCaptureIdModule.kt +15 -0
- package/dist/dts/native/IdCaptureProxy.d.ts +3 -0
- package/dist/id.js +44 -24
- package/dist/id.js.map +1 -1
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/ios/Sources/ScanditDataCaptureId.m +15 -0
- package/ios/Sources/ScanditDataCaptureId.swift +19 -0
- package/package.json +4 -4
- package/scandit-react-native-datacapture-id.podspec +4 -3
package/android/build.gradle
CHANGED
|
@@ -59,7 +59,7 @@ android {
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
dependencies {
|
|
62
|
-
def sdk_version = "6.
|
|
62
|
+
def sdk_version = "6.22.0-beta.2"
|
|
63
63
|
|
|
64
64
|
println("Version of the native sdk used in this build: ${safeExtGet('global_sdk_version', sdk_version)}")
|
|
65
65
|
if (findProject(':scandit-datacapture-frameworks-id') != null) {
|
package/android/src/main/kotlin/com/scandit/datacapture/reactnative/id/ScanditDataCaptureIdModule.kt
CHANGED
|
@@ -76,6 +76,21 @@ class ScanditDataCaptureIdModule(
|
|
|
76
76
|
idCaptureModule.setModeEnabled(enabled)
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
+
@ReactMethod
|
|
80
|
+
fun updateIdCaptureOverlay(overlayJson: String, promise: Promise) {
|
|
81
|
+
idCaptureModule.updateOverlay(overlayJson, ReactNativeResult(promise))
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
@ReactMethod
|
|
85
|
+
fun updateIdCaptureMode(modeJson: String, promise: Promise) {
|
|
86
|
+
idCaptureModule.updateModeFromJson(modeJson, ReactNativeResult(promise))
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
@ReactMethod
|
|
90
|
+
fun applyIdCaptureModeSettings(modeSettingsJson: String, promise: Promise) {
|
|
91
|
+
idCaptureModule.applyModeSettings(modeSettingsJson, ReactNativeResult(promise))
|
|
92
|
+
}
|
|
93
|
+
|
|
79
94
|
override fun getConstants(): MutableMap<String, Any> = mutableMapOf(
|
|
80
95
|
DEFAULTS_KEY to idCaptureModule.getDefaults()
|
|
81
96
|
)
|
|
@@ -5,4 +5,7 @@ export declare class NativeIdCaptureProxy implements IdCaptureProxy {
|
|
|
5
5
|
createContextForBarcodeVerification(contextJSON: string): Promise<void>;
|
|
6
6
|
verifyCapturedIdAsync(capturedId: string): Promise<string | null>;
|
|
7
7
|
setModeEnabledState(enabled: boolean): void;
|
|
8
|
+
updateIdCaptureMode(modeJson: string): Promise<void>;
|
|
9
|
+
applyIdCaptureModeSettings(newSettingsJson: string): Promise<void>;
|
|
10
|
+
updateIdCaptureOverlay(overlayJson: string): Promise<void>;
|
|
8
11
|
}
|
package/dist/id.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { nameForSerialization, Quadrilateral, FactoryMaker, Feedback, CameraSettings, Color, CameraController, DefaultSerializeable, ignoreFromSerialization, Brush } from 'scandit-react-native-datacapture-core/dist/core';
|
|
1
|
+
import { nameForSerialization, Quadrilateral, FactoryMaker, Feedback, CameraSettings, Color, BaseController, CameraController, DefaultSerializeable, ignoreFromSerialization, Brush } from 'scandit-react-native-datacapture-core/dist/core';
|
|
2
2
|
|
|
3
3
|
var ComparisonCheckResult;
|
|
4
4
|
(function (ComparisonCheckResult) {
|
|
@@ -249,15 +249,15 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
249
249
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
250
250
|
};
|
|
251
251
|
|
|
252
|
-
class IdCaptureController {
|
|
253
|
-
get _proxy() {
|
|
254
|
-
return FactoryMaker.getInstance('IdCaptureProxy');
|
|
255
|
-
}
|
|
252
|
+
class IdCaptureController extends BaseController {
|
|
256
253
|
static forIdCapture(idCapture) {
|
|
257
254
|
const controller = new IdCaptureController();
|
|
258
255
|
controller.idCapture = idCapture;
|
|
259
256
|
return controller;
|
|
260
257
|
}
|
|
258
|
+
constructor() {
|
|
259
|
+
super('IdCaptureProxy');
|
|
260
|
+
}
|
|
261
261
|
reset() {
|
|
262
262
|
return this._proxy.resetMode();
|
|
263
263
|
}
|
|
@@ -273,6 +273,15 @@ class IdCaptureController {
|
|
|
273
273
|
setModeEnabledState(enabled) {
|
|
274
274
|
this._proxy.setModeEnabledState(enabled);
|
|
275
275
|
}
|
|
276
|
+
updateIdCaptureMode() {
|
|
277
|
+
return this._proxy.updateIdCaptureMode(JSON.stringify(this.idCapture.toJSON()));
|
|
278
|
+
}
|
|
279
|
+
applyIdCaptureModeSettings(newSettings) {
|
|
280
|
+
return this._proxy.applyIdCaptureModeSettings(JSON.stringify(newSettings.toJSON()));
|
|
281
|
+
}
|
|
282
|
+
updateIdCaptureOverlay(overlay) {
|
|
283
|
+
return this._proxy.updateIdCaptureOverlay(JSON.stringify(overlay.toJSON()));
|
|
284
|
+
}
|
|
276
285
|
}
|
|
277
286
|
|
|
278
287
|
class ApecBusinessTravelCardMrzResult {
|
|
@@ -1008,7 +1017,7 @@ class IdCapture extends DefaultSerializeable {
|
|
|
1008
1017
|
}
|
|
1009
1018
|
set feedback(feedback) {
|
|
1010
1019
|
this._feedback = feedback;
|
|
1011
|
-
this.
|
|
1020
|
+
this.controller.updateIdCaptureMode();
|
|
1012
1021
|
}
|
|
1013
1022
|
static get recommendedCameraSettings() {
|
|
1014
1023
|
return new CameraSettings(IdCapture.idCaptureDefaults.IdCapture.RecommendedCameraSettings);
|
|
@@ -1048,7 +1057,7 @@ class IdCapture extends DefaultSerializeable {
|
|
|
1048
1057
|
}
|
|
1049
1058
|
applySettings(settings) {
|
|
1050
1059
|
this.settings = settings;
|
|
1051
|
-
return this.
|
|
1060
|
+
return this.controller.applyIdCaptureModeSettings(settings);
|
|
1052
1061
|
}
|
|
1053
1062
|
addListener(listener) {
|
|
1054
1063
|
if (this.listeners.includes(listener)) {
|
|
@@ -1065,14 +1074,6 @@ class IdCapture extends DefaultSerializeable {
|
|
|
1065
1074
|
reset() {
|
|
1066
1075
|
return this.controller.reset();
|
|
1067
1076
|
}
|
|
1068
|
-
didChange() {
|
|
1069
|
-
if (this.context) {
|
|
1070
|
-
return this.context.update();
|
|
1071
|
-
}
|
|
1072
|
-
else {
|
|
1073
|
-
return Promise.resolve();
|
|
1074
|
-
}
|
|
1075
|
-
}
|
|
1076
1077
|
}
|
|
1077
1078
|
__decorate([
|
|
1078
1079
|
ignoreFromSerialization
|
|
@@ -1177,45 +1178,55 @@ class IdCaptureOverlay extends DefaultSerializeable {
|
|
|
1177
1178
|
this._capturedBrush = this._defaultCapturedBrush;
|
|
1178
1179
|
this._localizedBrush = this._defaultLocalizedBrush;
|
|
1179
1180
|
this._rejectedBrush = this._defaultRejectedBrush;
|
|
1181
|
+
this._frontSideTextHint = null;
|
|
1182
|
+
this._backSideTextHint = null;
|
|
1180
1183
|
}
|
|
1181
1184
|
setIdLayout(idLayout) {
|
|
1182
1185
|
this._idLayout = idLayout;
|
|
1183
|
-
this.idCapture.
|
|
1186
|
+
this.idCapture.controller.updateIdCaptureOverlay(this);
|
|
1187
|
+
}
|
|
1188
|
+
setFrontSideTextHint(text) {
|
|
1189
|
+
this._frontSideTextHint = text;
|
|
1190
|
+
this.idCapture.controller.updateIdCaptureOverlay(this);
|
|
1191
|
+
}
|
|
1192
|
+
setBackSideTextHint(text) {
|
|
1193
|
+
this._backSideTextHint = text;
|
|
1194
|
+
this.idCapture.controller.updateIdCaptureOverlay(this);
|
|
1184
1195
|
}
|
|
1185
1196
|
get idLayoutStyle() {
|
|
1186
1197
|
return this._idLayoutStyle;
|
|
1187
1198
|
}
|
|
1188
1199
|
set idLayoutStyle(style) {
|
|
1189
1200
|
this._idLayoutStyle = style;
|
|
1190
|
-
this.idCapture.
|
|
1201
|
+
this.idCapture.controller.updateIdCaptureOverlay(this);
|
|
1191
1202
|
}
|
|
1192
1203
|
get idLayoutLineStyle() {
|
|
1193
1204
|
return this._idLayoutLineStyle;
|
|
1194
1205
|
}
|
|
1195
1206
|
set idLayoutLineStyle(lineStyle) {
|
|
1196
1207
|
this._idLayoutLineStyle = lineStyle;
|
|
1197
|
-
this.idCapture.
|
|
1208
|
+
this.idCapture.controller.updateIdCaptureOverlay(this);
|
|
1198
1209
|
}
|
|
1199
1210
|
get capturedBrush() {
|
|
1200
1211
|
return this._capturedBrush;
|
|
1201
1212
|
}
|
|
1202
1213
|
set capturedBrush(brush) {
|
|
1203
1214
|
this._capturedBrush = brush;
|
|
1204
|
-
this.idCapture.
|
|
1215
|
+
this.idCapture.controller.updateIdCaptureOverlay(this);
|
|
1205
1216
|
}
|
|
1206
1217
|
get localizedBrush() {
|
|
1207
1218
|
return this._localizedBrush;
|
|
1208
1219
|
}
|
|
1209
1220
|
set localizedBrush(brush) {
|
|
1210
1221
|
this._localizedBrush = brush;
|
|
1211
|
-
this.idCapture.
|
|
1222
|
+
this.idCapture.controller.updateIdCaptureOverlay(this);
|
|
1212
1223
|
}
|
|
1213
1224
|
get rejectedBrush() {
|
|
1214
1225
|
return this._rejectedBrush;
|
|
1215
1226
|
}
|
|
1216
1227
|
set rejectedBrush(brush) {
|
|
1217
1228
|
this._rejectedBrush = brush;
|
|
1218
|
-
this.idCapture.
|
|
1229
|
+
this.idCapture.controller.updateIdCaptureOverlay(this);
|
|
1219
1230
|
}
|
|
1220
1231
|
get defaultCapturedBrush() {
|
|
1221
1232
|
return this._defaultCapturedBrush;
|
|
@@ -1251,6 +1262,12 @@ __decorate([
|
|
|
1251
1262
|
__decorate([
|
|
1252
1263
|
nameForSerialization('rejectedBrush')
|
|
1253
1264
|
], IdCaptureOverlay.prototype, "_rejectedBrush", void 0);
|
|
1265
|
+
__decorate([
|
|
1266
|
+
nameForSerialization('frontSideTextHint')
|
|
1267
|
+
], IdCaptureOverlay.prototype, "_frontSideTextHint", void 0);
|
|
1268
|
+
__decorate([
|
|
1269
|
+
nameForSerialization('backSideTextHint')
|
|
1270
|
+
], IdCaptureOverlay.prototype, "_backSideTextHint", void 0);
|
|
1254
1271
|
__decorate([
|
|
1255
1272
|
ignoreFromSerialization
|
|
1256
1273
|
], IdCaptureOverlay, "idCaptureDefaults", null);
|
|
@@ -1346,15 +1363,15 @@ class AamvaVizBarcodeComparisonResult {
|
|
|
1346
1363
|
}
|
|
1347
1364
|
get datesOfBirthMatch() {
|
|
1348
1365
|
return DateComparisonCheck
|
|
1349
|
-
.fromJSON(this.json.
|
|
1366
|
+
.fromJSON(this.json.datesOfBirthMatch);
|
|
1350
1367
|
}
|
|
1351
1368
|
get datesOfExpiryMatch() {
|
|
1352
1369
|
return DateComparisonCheck
|
|
1353
|
-
.fromJSON(this.json.
|
|
1370
|
+
.fromJSON(this.json.datesOfExpiryMatch);
|
|
1354
1371
|
}
|
|
1355
1372
|
get datesOfIssueMatch() {
|
|
1356
1373
|
return DateComparisonCheck
|
|
1357
|
-
.fromJSON(this.json.
|
|
1374
|
+
.fromJSON(this.json.datesOfIssueMatch);
|
|
1358
1375
|
}
|
|
1359
1376
|
static fromJSON(json) {
|
|
1360
1377
|
const result = new AamvaVizBarcodeComparisonResult();
|
|
@@ -1477,6 +1494,9 @@ var DocumentType;
|
|
|
1477
1494
|
DocumentType["RefugeePassport"] = "refugeePassport";
|
|
1478
1495
|
DocumentType["SpecialId"] = "specialId";
|
|
1479
1496
|
DocumentType["UniformedServicesId"] = "uniformedServicesId";
|
|
1497
|
+
DocumentType["ImmigrantVisa"] = "immigrantVisa";
|
|
1498
|
+
DocumentType["ConsularVoterId"] = "consularVoterId";
|
|
1499
|
+
DocumentType["TwicCard"] = "twicCard";
|
|
1480
1500
|
})(DocumentType || (DocumentType = {}));
|
|
1481
1501
|
|
|
1482
1502
|
export { AAMVABarcodeResult, AamvaBarcodeVerificationResult, AamvaBarcodeVerifier, AamvaVizBarcodeComparisonResult, AamvaVizBarcodeComparisonVerifier, ApecBusinessTravelCardMrzResult, ArgentinaIdBarcodeResult, CapturedId, CapturedResultType, ChinaExitEntryPermitMRZResult, ChinaMainlandTravelPermitMRZResult, ChinaOneWayPermitBackMrzResult, ChinaOneWayPermitFrontMrzResult, ColombiaDlBarcodeResult, ColombiaIdBarcodeResult, CommonAccessCardBarcodeResult, CommonCapturedIdFields, ComparisonCheckResult, DateComparisonCheck, DateResult, DocumentType, IdAnonymizationMode, IdCapture, IdCaptureController, IdCaptureError, IdCaptureFeedback, IdCaptureListenerController, IdCaptureListenerEvents, IdCaptureOverlay, IdCaptureSession, IdCaptureSettings, IdDocumentType, IdImageType, IdLayout, IdLayoutLineStyle, IdLayoutStyle, LocalizedOnlyId, MRZResult, ProfessionalDrivingPermit, RejectedId, SouthAfricaDlBarcodeResult, SouthAfricaIdBarcodeResult, StringComparisonCheck, SupportedSides, USUniformedServicesBarcodeResult, USVisaVIZResult, VIZResult, VehicleRestriction, getIdDefaults, loadIdDefaults, parseIdDefaults };
|