scandit-react-native-datacapture-id 6.22.1 → 6.23.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 +5 -0
- package/dist/dts/index.d.ts +2 -2
- package/dist/dts/native/IdCaptureProxy.d.ts +1 -0
- package/dist/id.js +130 -1
- package/dist/id.js.map +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/ios/Sources/ScanditDataCaptureId.m +4 -0
- package/ios/Sources/ScanditDataCaptureId.swift +8 -0
- package/package.json +4 -4
- package/scandit-react-native-datacapture-id.podspec +1 -1
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.23.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
|
@@ -71,6 +71,11 @@ class ScanditDataCaptureIdModule(
|
|
|
71
71
|
idCaptureModule.verifyCapturedIdBarcode(capturedIdJSON, ReactNativeResult(promise))
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
+
@ReactMethod
|
|
75
|
+
fun verifyVizMrz(capturedIdJSON: String, promise: Promise) {
|
|
76
|
+
idCaptureModule.vizMrzVerification(capturedIdJSON, ReactNativeResult(promise))
|
|
77
|
+
}
|
|
78
|
+
|
|
74
79
|
@ReactMethod
|
|
75
80
|
fun setModeEnabledState(enabled: Boolean) {
|
|
76
81
|
idCaptureModule.setModeEnabled(enabled)
|
package/dist/dts/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { ComparisonCheck, ComparisonCheckResult, DateResult, IdAnonymizationMode, IdDocumentType, IdImageType, LocalizedOnlyId, RejectedId, SupportedSides } from 'scandit-datacapture-frameworks-id';
|
|
2
|
-
export { AAMVABarcodeResult, AamvaBarcodeVerificationResult, AamvaBarcodeVerifier, AamvaVizBarcodeComparisonResult, AamvaVizBarcodeComparisonVerifier, ApecBusinessTravelCardMrzResult, ArgentinaIdBarcodeResult, CapturedId, CapturedResultType, ChinaExitEntryPermitMRZResult, ChinaMainlandTravelPermitMRZResult, ChinaOneWayPermitBackMrzResult, ChinaOneWayPermitFrontMrzResult, ColombiaDlBarcodeResult, ColombiaIdBarcodeResult, CommonAccessCardBarcodeResult, DocumentType, MRZResult, ProfessionalDrivingPermit, SouthAfricaDlBarcodeResult, SouthAfricaIdBarcodeResult, USUniformedServicesBarcodeResult, USVisaVIZResult, VehicleRestriction, VIZResult } from 'scandit-datacapture-frameworks-id';
|
|
1
|
+
export { ComparisonCheck, ComparisonCheckResult, DateResult, IdAnonymizationMode, IdDocumentType, IdImageType, LocalizedOnlyId, RejectedId, SupportedSides, TextHintPosition, VizMrzComparisonCheck } from 'scandit-datacapture-frameworks-id';
|
|
2
|
+
export { AAMVABarcodeResult, AamvaBarcodeVerificationResult, AamvaBarcodeVerifier, AamvaVizBarcodeComparisonResult, AamvaVizBarcodeComparisonVerifier, ApecBusinessTravelCardMrzResult, ArgentinaIdBarcodeResult, CapturedId, CapturedResultType, ChinaExitEntryPermitMRZResult, ChinaMainlandTravelPermitMRZResult, ChinaOneWayPermitBackMrzResult, ChinaOneWayPermitFrontMrzResult, ColombiaDlBarcodeResult, ColombiaIdBarcodeResult, CommonAccessCardBarcodeResult, DocumentType, MRZResult, ProfessionalDrivingPermit, SouthAfricaDlBarcodeResult, SouthAfricaIdBarcodeResult, USUniformedServicesBarcodeResult, USVisaVIZResult, VehicleRestriction, VizMrzComparisonCheckResult, VizMrzComparisonResult, VizMrzComparisonVerifier, VIZResult } from 'scandit-datacapture-frameworks-id';
|
|
3
3
|
export { IdCaptureController, IdCaptureListenerController, IdCaptureListenerProxy, IdCaptureListenerEvents, IdCaptureProxy } from 'scandit-datacapture-frameworks-id';
|
|
4
4
|
export { IdCapture, IdCaptureError, IdCaptureFeedback, IdCaptureListener, IdCaptureOverlay, IdCaptureSession, IdCaptureSettings, IdLayout, IdLayoutLineStyle, IdLayoutStyle } from 'scandit-datacapture-frameworks-id';
|
|
@@ -4,6 +4,7 @@ export declare class NativeIdCaptureProxy implements IdCaptureProxy {
|
|
|
4
4
|
verifyCapturedId(capturedId: string): Promise<string | null>;
|
|
5
5
|
createContextForBarcodeVerification(contextJSON: string): Promise<void>;
|
|
6
6
|
verifyCapturedIdAsync(capturedId: string): Promise<string | null>;
|
|
7
|
+
verifyVizMrz(capturedId: string): Promise<string | null>;
|
|
7
8
|
setModeEnabledState(enabled: boolean): void;
|
|
8
9
|
updateIdCaptureMode(modeJson: string): Promise<void>;
|
|
9
10
|
applyIdCaptureModeSettings(newSettingsJson: string): Promise<void>;
|
package/dist/id.js
CHANGED
|
@@ -122,6 +122,47 @@ var SupportedSides;
|
|
|
122
122
|
SupportedSides["FrontAndBack"] = "frontAndBack";
|
|
123
123
|
})(SupportedSides || (SupportedSides = {}));
|
|
124
124
|
|
|
125
|
+
var TextHintPosition;
|
|
126
|
+
(function (TextHintPosition) {
|
|
127
|
+
TextHintPosition["AboveViewfinder"] = "aboveViewfinder";
|
|
128
|
+
TextHintPosition["BelowViewfinder"] = "belowViewfinder";
|
|
129
|
+
})(TextHintPosition || (TextHintPosition = {}));
|
|
130
|
+
|
|
131
|
+
var VizMrzComparisonCheckResult;
|
|
132
|
+
(function (VizMrzComparisonCheckResult) {
|
|
133
|
+
VizMrzComparisonCheckResult["Passed"] = "passed";
|
|
134
|
+
VizMrzComparisonCheckResult["Skipped"] = "skipped";
|
|
135
|
+
VizMrzComparisonCheckResult["Failed"] = "failed";
|
|
136
|
+
})(VizMrzComparisonCheckResult || (VizMrzComparisonCheckResult = {}));
|
|
137
|
+
|
|
138
|
+
class VizMrzDateComparisonCheck {
|
|
139
|
+
get vizValue() {
|
|
140
|
+
return DateResult.fromJSON(this.json.vizValue);
|
|
141
|
+
}
|
|
142
|
+
get mrzValue() {
|
|
143
|
+
return DateResult.fromJSON(this.json.mrzValue);
|
|
144
|
+
}
|
|
145
|
+
get checkResult() { return this.json.checkResult; }
|
|
146
|
+
get resultDescription() { return this.json.resultDescription; }
|
|
147
|
+
static fromJSON(json) {
|
|
148
|
+
const result = new VizMrzDateComparisonCheck();
|
|
149
|
+
result.json = json;
|
|
150
|
+
return result;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
class VizMrzStringComparisonCheck {
|
|
155
|
+
get vizValue() { return this.json.vizValue; }
|
|
156
|
+
get mrzValue() { return this.json.mrzValue; }
|
|
157
|
+
get checkResult() { return this.json.checkResult; }
|
|
158
|
+
get resultDescription() { return this.json.resultDescription; }
|
|
159
|
+
static fromJSON(json) {
|
|
160
|
+
const result = new VizMrzStringComparisonCheck();
|
|
161
|
+
result.json = json;
|
|
162
|
+
return result;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
125
166
|
function getIdDefaults() {
|
|
126
167
|
return FactoryMaker.getInstance('IdDefaults');
|
|
127
168
|
}
|
|
@@ -270,6 +311,9 @@ class IdCaptureController extends BaseController {
|
|
|
270
311
|
verifyCapturedIdAsync(capturedId) {
|
|
271
312
|
return this._proxy.verifyCapturedIdAsync(capturedId);
|
|
272
313
|
}
|
|
314
|
+
verifyVizMrz(capturedId) {
|
|
315
|
+
return this._proxy.verifyVizMrz(capturedId);
|
|
316
|
+
}
|
|
273
317
|
setModeEnabledState(enabled) {
|
|
274
318
|
this._proxy.setModeEnabledState(enabled);
|
|
275
319
|
}
|
|
@@ -1172,6 +1216,8 @@ class IdCaptureOverlay extends DefaultSerializeable {
|
|
|
1172
1216
|
this._idLayout = IdLayout.Auto;
|
|
1173
1217
|
this._idLayoutStyle = IdLayoutStyle.Rounded;
|
|
1174
1218
|
this._idLayoutLineStyle = IdLayoutLineStyle.Light;
|
|
1219
|
+
this._textHintPosition = TextHintPosition.AboveViewfinder;
|
|
1220
|
+
this._showTextHints = true;
|
|
1175
1221
|
this._defaultCapturedBrush = new Brush(IdCaptureOverlay.idCaptureDefaults.IdCapture.IdCaptureOverlayDefaults.defaultCapturedBrush.fillColor, IdCaptureOverlay.idCaptureDefaults.IdCapture.IdCaptureOverlayDefaults.defaultCapturedBrush.strokeColor, IdCaptureOverlay.idCaptureDefaults.IdCapture.IdCaptureOverlayDefaults.defaultCapturedBrush.strokeWidth);
|
|
1176
1222
|
this._defaultLocalizedBrush = new Brush(IdCaptureOverlay.idCaptureDefaults.IdCapture.IdCaptureOverlayDefaults.defaultLocalizedBrush.fillColor, IdCaptureOverlay.idCaptureDefaults.IdCapture.IdCaptureOverlayDefaults.defaultLocalizedBrush.strokeColor, IdCaptureOverlay.idCaptureDefaults.IdCapture.IdCaptureOverlayDefaults.defaultLocalizedBrush.strokeWidth);
|
|
1177
1223
|
this._defaultRejectedBrush = new Brush(IdCaptureOverlay.idCaptureDefaults.IdCapture.IdCaptureOverlayDefaults.defaultRejectedBrush.fillColor, IdCaptureOverlay.idCaptureDefaults.IdCapture.IdCaptureOverlayDefaults.defaultRejectedBrush.strokeColor, IdCaptureOverlay.idCaptureDefaults.IdCapture.IdCaptureOverlayDefaults.defaultRejectedBrush.strokeWidth);
|
|
@@ -1237,6 +1283,20 @@ class IdCaptureOverlay extends DefaultSerializeable {
|
|
|
1237
1283
|
get defaultRejectedBrush() {
|
|
1238
1284
|
return this._defaultRejectedBrush;
|
|
1239
1285
|
}
|
|
1286
|
+
get textHintPosition() {
|
|
1287
|
+
return this._textHintPosition;
|
|
1288
|
+
}
|
|
1289
|
+
set textHintPosition(position) {
|
|
1290
|
+
this._textHintPosition = position;
|
|
1291
|
+
this.idCapture.controller.updateIdCaptureOverlay(this);
|
|
1292
|
+
}
|
|
1293
|
+
get showTextHints() {
|
|
1294
|
+
return this._showTextHints;
|
|
1295
|
+
}
|
|
1296
|
+
set showTextHints(enabled) {
|
|
1297
|
+
this._showTextHints = enabled;
|
|
1298
|
+
this.idCapture.controller.updateIdCaptureOverlay(this);
|
|
1299
|
+
}
|
|
1240
1300
|
}
|
|
1241
1301
|
__decorate([
|
|
1242
1302
|
ignoreFromSerialization
|
|
@@ -1253,6 +1313,12 @@ __decorate([
|
|
|
1253
1313
|
__decorate([
|
|
1254
1314
|
nameForSerialization('idLayoutLineStyle')
|
|
1255
1315
|
], IdCaptureOverlay.prototype, "_idLayoutLineStyle", void 0);
|
|
1316
|
+
__decorate([
|
|
1317
|
+
nameForSerialization('textHintPosition')
|
|
1318
|
+
], IdCaptureOverlay.prototype, "_textHintPosition", void 0);
|
|
1319
|
+
__decorate([
|
|
1320
|
+
nameForSerialization('showTextHints')
|
|
1321
|
+
], IdCaptureOverlay.prototype, "_showTextHints", void 0);
|
|
1256
1322
|
__decorate([
|
|
1257
1323
|
nameForSerialization('capturedBrush')
|
|
1258
1324
|
], IdCaptureOverlay.prototype, "_capturedBrush", void 0);
|
|
@@ -1499,4 +1565,67 @@ var DocumentType;
|
|
|
1499
1565
|
DocumentType["TwicCard"] = "twicCard";
|
|
1500
1566
|
})(DocumentType || (DocumentType = {}));
|
|
1501
1567
|
|
|
1502
|
-
|
|
1568
|
+
class VizMrzComparisonResult {
|
|
1569
|
+
get checksPassed() { return this.json.checksPassed; }
|
|
1570
|
+
get resultDescription() { return this.json.resultDescription; }
|
|
1571
|
+
get issuingCountryIsoMatch() {
|
|
1572
|
+
return VizMrzStringComparisonCheck
|
|
1573
|
+
.fromJSON(this.json.issuingCountryIsoMatch);
|
|
1574
|
+
}
|
|
1575
|
+
get documentNumbersMatch() {
|
|
1576
|
+
return VizMrzStringComparisonCheck
|
|
1577
|
+
.fromJSON(this.json.documentNumbersMatch);
|
|
1578
|
+
}
|
|
1579
|
+
get fullNamesMatch() {
|
|
1580
|
+
return VizMrzStringComparisonCheck
|
|
1581
|
+
.fromJSON(this.json.fullNamesMatch);
|
|
1582
|
+
}
|
|
1583
|
+
get datesOfBirthMatch() {
|
|
1584
|
+
return VizMrzDateComparisonCheck
|
|
1585
|
+
.fromJSON(this.json.datesOfBirthMatch);
|
|
1586
|
+
}
|
|
1587
|
+
get datesOfExpiryMatch() {
|
|
1588
|
+
return VizMrzDateComparisonCheck
|
|
1589
|
+
.fromJSON(this.json.datesOfExpiryMatch);
|
|
1590
|
+
}
|
|
1591
|
+
static fromJSON(json) {
|
|
1592
|
+
const result = new VizMrzComparisonResult();
|
|
1593
|
+
result.json = json;
|
|
1594
|
+
return result;
|
|
1595
|
+
}
|
|
1596
|
+
}
|
|
1597
|
+
|
|
1598
|
+
class VizMrzComparisonVerifier {
|
|
1599
|
+
constructor() {
|
|
1600
|
+
this.controller = new IdCaptureController();
|
|
1601
|
+
}
|
|
1602
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1603
|
+
static create(context) {
|
|
1604
|
+
return new VizMrzComparisonVerifier();
|
|
1605
|
+
}
|
|
1606
|
+
verify(capturedId) {
|
|
1607
|
+
// Necessary for not exposing internal API on CapturedId, while only passing the private "json" property
|
|
1608
|
+
// to native iOS and Android.
|
|
1609
|
+
const capturedIdAsString = JSON.stringify(capturedId);
|
|
1610
|
+
const capturedIdJsonData = JSON.parse(capturedIdAsString).json;
|
|
1611
|
+
return new Promise((resolve, reject) => {
|
|
1612
|
+
this.controller
|
|
1613
|
+
.verifyVizMrz(JSON.stringify(capturedIdJsonData))
|
|
1614
|
+
.then((json) => {
|
|
1615
|
+
if (!json) {
|
|
1616
|
+
resolve(VizMrzComparisonResult
|
|
1617
|
+
.fromJSON(JSON.parse('{}')));
|
|
1618
|
+
}
|
|
1619
|
+
else {
|
|
1620
|
+
resolve(VizMrzComparisonResult
|
|
1621
|
+
.fromJSON(JSON.parse(json)));
|
|
1622
|
+
}
|
|
1623
|
+
}, reject);
|
|
1624
|
+
});
|
|
1625
|
+
}
|
|
1626
|
+
}
|
|
1627
|
+
__decorate([
|
|
1628
|
+
ignoreFromSerialization
|
|
1629
|
+
], VizMrzComparisonVerifier.prototype, "controller", void 0);
|
|
1630
|
+
|
|
1631
|
+
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, TextHintPosition, USUniformedServicesBarcodeResult, USVisaVIZResult, VIZResult, VehicleRestriction, VizMrzComparisonCheckResult, VizMrzComparisonResult, VizMrzComparisonVerifier, VizMrzDateComparisonCheck, VizMrzStringComparisonCheck, getIdDefaults, loadIdDefaults, parseIdDefaults };
|