scandit-react-native-datacapture-id 8.0.0 → 8.1.0-beta.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/dist/dts/IdCaptureView.d.ts +2 -1
- package/dist/dts/native/IdNativeCallerProvider.d.ts +5 -0
- package/dist/id.js +131 -118
- package/dist/id.js.map +1 -1
- package/dist/index.js +50 -51
- package/dist/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/ios/Sources/ScanditDataCaptureId.swift +34 -11
- package/package.json +6 -7
- package/scandit-react-native-datacapture-id.podspec +1 -1
package/android/build.gradle
CHANGED
|
@@ -75,7 +75,7 @@ if (file( "${rootProject.projectDir}/build-test.gradle").exists()) {
|
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
dependencies {
|
|
78
|
-
def sdk_version = "8.0.
|
|
78
|
+
def sdk_version = "8.1.0-beta.1"
|
|
79
79
|
|
|
80
80
|
println("Version of the native sdk used in this build: ${safeExtGet("global_sdk_version", sdk_version)}")
|
|
81
81
|
api project(path: ":scandit-react-native-datacapture-core")
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Brush, CameraPosition, CameraSettings, DataCaptureContext, FrameSourceState, TorchState, TorchSwitchControl, ZoomSwitchControl } from 'scandit-react-native-datacapture-core';
|
|
3
3
|
import { IdCapture, IdCaptureFeedback, IdCaptureSettings, CapturedId, RejectionReason } from 'scandit-datacapture-frameworks-id';
|
|
4
|
+
import { NavigationProp, ParamListBase } from '@react-navigation/native';
|
|
4
5
|
interface IdCaptureViewProps {
|
|
5
6
|
context: DataCaptureContext;
|
|
6
7
|
isEnabled: boolean;
|
|
@@ -15,7 +16,7 @@ interface IdCaptureViewProps {
|
|
|
15
16
|
torchSwitchControl?: TorchSwitchControl | null;
|
|
16
17
|
zoomSwitchControl?: ZoomSwitchControl | null;
|
|
17
18
|
feedback?: IdCaptureFeedback;
|
|
18
|
-
navigation?:
|
|
19
|
+
navigation?: NavigationProp<ParamListBase>;
|
|
19
20
|
didCaptureId?(idCapture: IdCapture, capturedId: CapturedId): void;
|
|
20
21
|
didRejectId?(idCapture: IdCapture, rejectedId: CapturedId | null, reason: RejectionReason): void;
|
|
21
22
|
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { IdNativeCallerProvider, IdProxyType } from 'scandit-datacapture-frameworks-id';
|
|
2
|
+
import { NativeCaller } from 'scandit-datacapture-frameworks-core';
|
|
3
|
+
export declare class RNIdNativeCallerProvider implements IdNativeCallerProvider {
|
|
4
|
+
getNativeCaller(proxyType: IdProxyType): NativeCaller;
|
|
5
|
+
}
|
package/dist/id.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { nameForSerialization, ignoreFromSerializationIfNull, DefaultSerializeable, FactoryMaker, Feedback, Sound, CameraSettings, Color,
|
|
1
|
+
import { nameForSerialization, ignoreFromSerializationIfNull, DefaultSerializeable, FactoryMaker, Feedback, Sound, CameraSettings, Color, BaseController, ignoreFromSerialization, Brush, registerProxies, EventDataParser } from 'scandit-react-native-datacapture-core/dist/core';
|
|
2
2
|
|
|
3
3
|
class DateResult {
|
|
4
4
|
get day() { return this.json.day; }
|
|
@@ -417,6 +417,13 @@ class IdImages {
|
|
|
417
417
|
constructor() {
|
|
418
418
|
this.json = null;
|
|
419
419
|
}
|
|
420
|
+
static fromJSON(json) {
|
|
421
|
+
const result = new IdImages();
|
|
422
|
+
if (json != null) {
|
|
423
|
+
result.json = json;
|
|
424
|
+
}
|
|
425
|
+
return result;
|
|
426
|
+
}
|
|
420
427
|
get face() { var _a, _b, _c; return (_c = (_b = (_a = this.json) === null || _a === void 0 ? void 0 : _a.front) === null || _b === void 0 ? void 0 : _b.face) !== null && _c !== void 0 ? _c : null; }
|
|
421
428
|
get frame() { var _a, _b, _c; return (_c = (_b = (_a = this.json) === null || _a === void 0 ? void 0 : _a.front) === null || _b === void 0 ? void 0 : _b.frame) !== null && _c !== void 0 ? _c : null; }
|
|
422
429
|
getFrame(side) {
|
|
@@ -437,13 +444,6 @@ class IdImages {
|
|
|
437
444
|
return (_f = (_e = (_d = this.json) === null || _d === void 0 ? void 0 : _d.back) === null || _e === void 0 ? void 0 : _e.croppedDocument) !== null && _f !== void 0 ? _f : null;
|
|
438
445
|
}
|
|
439
446
|
}
|
|
440
|
-
static fromJSON(json) {
|
|
441
|
-
const result = new IdImages();
|
|
442
|
-
if (json != null) {
|
|
443
|
-
result.json = json;
|
|
444
|
-
}
|
|
445
|
-
return result;
|
|
446
|
-
}
|
|
447
447
|
}
|
|
448
448
|
|
|
449
449
|
/******************************************************************************
|
|
@@ -495,15 +495,15 @@ class Duration extends DefaultSerializeable {
|
|
|
495
495
|
get years() {
|
|
496
496
|
return this._years;
|
|
497
497
|
}
|
|
498
|
+
static fromJSON(json) {
|
|
499
|
+
return new Duration(json.days, json.months, json.years);
|
|
500
|
+
}
|
|
498
501
|
constructor(days, months, years) {
|
|
499
502
|
super();
|
|
500
503
|
this._days = days;
|
|
501
504
|
this._months = months;
|
|
502
505
|
this._years = years;
|
|
503
506
|
}
|
|
504
|
-
static fromJSON(json) {
|
|
505
|
-
return new Duration(json.days, json.months, json.years);
|
|
506
|
-
}
|
|
507
507
|
}
|
|
508
508
|
__decorate([
|
|
509
509
|
nameForSerialization('days')
|
|
@@ -641,12 +641,12 @@ class VehicleRestriction {
|
|
|
641
641
|
}
|
|
642
642
|
|
|
643
643
|
class BarcodeResult {
|
|
644
|
-
constructor(json) {
|
|
645
|
-
this.json = json;
|
|
646
|
-
}
|
|
647
644
|
static fromJSON(json) {
|
|
648
645
|
return new BarcodeResult(json);
|
|
649
646
|
}
|
|
647
|
+
constructor(json) {
|
|
648
|
+
this.json = json;
|
|
649
|
+
}
|
|
650
650
|
get aamvaVersion() {
|
|
651
651
|
return this.json.aamvaVersion;
|
|
652
652
|
}
|
|
@@ -966,6 +966,14 @@ class DrivingLicenseDetails {
|
|
|
966
966
|
constructor() {
|
|
967
967
|
this._drivingLicenseCategories = [];
|
|
968
968
|
}
|
|
969
|
+
static fromJSON(json) {
|
|
970
|
+
if (json === null) {
|
|
971
|
+
return null;
|
|
972
|
+
}
|
|
973
|
+
const result = new DrivingLicenseDetails();
|
|
974
|
+
result.json = json;
|
|
975
|
+
return result;
|
|
976
|
+
}
|
|
969
977
|
get drivingLicenseCategories() {
|
|
970
978
|
if (this._drivingLicenseCategories.length === 0) {
|
|
971
979
|
this._drivingLicenseCategories = this.json.drivingLicenseCategories.map(categoryJson => DrivingLicenseCategory.fromJSON(categoryJson)).filter(category => category !== null);
|
|
@@ -978,14 +986,6 @@ class DrivingLicenseDetails {
|
|
|
978
986
|
get endorsements() {
|
|
979
987
|
return this.json.endorsements;
|
|
980
988
|
}
|
|
981
|
-
static fromJSON(json) {
|
|
982
|
-
if (json === null) {
|
|
983
|
-
return null;
|
|
984
|
-
}
|
|
985
|
-
const result = new DrivingLicenseDetails();
|
|
986
|
-
result.json = json;
|
|
987
|
-
return result;
|
|
988
|
-
}
|
|
989
989
|
}
|
|
990
990
|
|
|
991
991
|
class VIZResult {
|
|
@@ -1563,10 +1563,42 @@ class VerificationResult {
|
|
|
1563
1563
|
|
|
1564
1564
|
class CapturedId {
|
|
1565
1565
|
constructor() {
|
|
1566
|
-
this._document = null;
|
|
1567
1566
|
this._mobileDocument = null;
|
|
1568
1567
|
this._mobileDocumentOcr = null;
|
|
1569
1568
|
this._verificationResult = null;
|
|
1569
|
+
this._document = null;
|
|
1570
|
+
}
|
|
1571
|
+
static fromJSON(json) {
|
|
1572
|
+
const result = new CapturedId();
|
|
1573
|
+
result.json = json;
|
|
1574
|
+
if (result.json.documentType) {
|
|
1575
|
+
result._document = this.getDocument(result.issuingCountry, result.json.documentType, result.json.documentSubtype);
|
|
1576
|
+
}
|
|
1577
|
+
result._images = IdImages.fromJSON(json.imageInfo);
|
|
1578
|
+
return result;
|
|
1579
|
+
}
|
|
1580
|
+
static getDocument(issuingCountry, documentType, documentSubtype) {
|
|
1581
|
+
switch (documentType) {
|
|
1582
|
+
case IdCaptureDocumentType.DriverLicense:
|
|
1583
|
+
return new DriverLicense(issuingCountry);
|
|
1584
|
+
case IdCaptureDocumentType.HealthInsuranceCard:
|
|
1585
|
+
return new HealthInsuranceCard(issuingCountry);
|
|
1586
|
+
case IdCaptureDocumentType.IdCard:
|
|
1587
|
+
return new IdCard(issuingCountry);
|
|
1588
|
+
case IdCaptureDocumentType.Passport:
|
|
1589
|
+
return new Passport(issuingCountry);
|
|
1590
|
+
case IdCaptureDocumentType.RegionSpecific:
|
|
1591
|
+
if (!documentSubtype) {
|
|
1592
|
+
throw new Error('documentSubtype cannot be null for RegionSpecific documents.');
|
|
1593
|
+
}
|
|
1594
|
+
return new RegionSpecific(documentSubtype);
|
|
1595
|
+
case IdCaptureDocumentType.ResidencePermit:
|
|
1596
|
+
return new ResidencePermit(issuingCountry);
|
|
1597
|
+
case IdCaptureDocumentType.VisaIcao:
|
|
1598
|
+
return new VisaIcao(issuingCountry);
|
|
1599
|
+
default:
|
|
1600
|
+
throw new Error(`Unknown document type ${JSON.stringify(documentType)}`);
|
|
1601
|
+
}
|
|
1570
1602
|
}
|
|
1571
1603
|
get age() {
|
|
1572
1604
|
return this.json.age;
|
|
@@ -1657,6 +1689,7 @@ class CapturedId {
|
|
|
1657
1689
|
get sex() { return this.json.sex; }
|
|
1658
1690
|
get dateOfBirth() { return DateResult.fromJSON(this.json.dateOfBirth); }
|
|
1659
1691
|
get nationality() { return this.json.nationality; }
|
|
1692
|
+
get nationalityISO() { return this.json.nationalityISO; }
|
|
1660
1693
|
get address() { return this.json.address; }
|
|
1661
1694
|
get documentNumber() { return this.json.documentNumber; }
|
|
1662
1695
|
get dateOfExpiry() { return DateResult.fromJSON(this.json.dateOfExpiry); }
|
|
@@ -1696,38 +1729,6 @@ class CapturedId {
|
|
|
1696
1729
|
isAnonymized(field) {
|
|
1697
1730
|
return this.json.anonymizedFields.includes(field);
|
|
1698
1731
|
}
|
|
1699
|
-
static fromJSON(json) {
|
|
1700
|
-
const result = new CapturedId();
|
|
1701
|
-
result.json = json;
|
|
1702
|
-
if (result.json.documentType) {
|
|
1703
|
-
result._document = this.getDocument(result.issuingCountry, result.json.documentType, result.json.documentSubtype);
|
|
1704
|
-
}
|
|
1705
|
-
result._images = IdImages.fromJSON(json.imageInfo);
|
|
1706
|
-
return result;
|
|
1707
|
-
}
|
|
1708
|
-
static getDocument(issuingCountry, documentType, documentSubtype) {
|
|
1709
|
-
switch (documentType) {
|
|
1710
|
-
case IdCaptureDocumentType.DriverLicense:
|
|
1711
|
-
return new DriverLicense(issuingCountry);
|
|
1712
|
-
case IdCaptureDocumentType.HealthInsuranceCard:
|
|
1713
|
-
return new HealthInsuranceCard(issuingCountry);
|
|
1714
|
-
case IdCaptureDocumentType.IdCard:
|
|
1715
|
-
return new IdCard(issuingCountry);
|
|
1716
|
-
case IdCaptureDocumentType.Passport:
|
|
1717
|
-
return new Passport(issuingCountry);
|
|
1718
|
-
case IdCaptureDocumentType.RegionSpecific:
|
|
1719
|
-
if (!documentSubtype) {
|
|
1720
|
-
throw new Error('documentSubtype cannot be null for RegionSpecific documents.');
|
|
1721
|
-
}
|
|
1722
|
-
return new RegionSpecific(documentSubtype);
|
|
1723
|
-
case IdCaptureDocumentType.ResidencePermit:
|
|
1724
|
-
return new ResidencePermit(issuingCountry);
|
|
1725
|
-
case IdCaptureDocumentType.VisaIcao:
|
|
1726
|
-
return new VisaIcao(issuingCountry);
|
|
1727
|
-
default:
|
|
1728
|
-
throw new Error(`Unknown document type ${documentType}`);
|
|
1729
|
-
}
|
|
1730
|
-
}
|
|
1731
1732
|
}
|
|
1732
1733
|
|
|
1733
1734
|
/*
|
|
@@ -1803,7 +1804,7 @@ var MobileDocumentDataElement;
|
|
|
1803
1804
|
MobileDocumentDataElement["AamvaVersion"] = "aamvaVersion";
|
|
1804
1805
|
})(MobileDocumentDataElement || (MobileDocumentDataElement = {}));
|
|
1805
1806
|
|
|
1806
|
-
class IdCaptureController extends
|
|
1807
|
+
class IdCaptureController extends BaseController {
|
|
1807
1808
|
constructor(idCapture = null) {
|
|
1808
1809
|
super('IdCaptureProxy');
|
|
1809
1810
|
this.idCapture = null;
|
|
@@ -1813,7 +1814,7 @@ class IdCaptureController extends BaseNewController {
|
|
|
1813
1814
|
return this._proxy.$resetIdCaptureMode({ modeId: this.modeId });
|
|
1814
1815
|
}
|
|
1815
1816
|
setModeEnabledState(enabled) {
|
|
1816
|
-
this._proxy.$setModeEnabledState({ modeId: this.modeId, enabled: enabled });
|
|
1817
|
+
return this._proxy.$setModeEnabledState({ modeId: this.modeId, enabled: enabled });
|
|
1817
1818
|
}
|
|
1818
1819
|
updateIdCaptureMode() {
|
|
1819
1820
|
if (this.idCapture == null) {
|
|
@@ -1837,7 +1838,7 @@ var IdCaptureListenerEvents;
|
|
|
1837
1838
|
IdCaptureListenerEvents["didCapture"] = "IdCaptureListener.didCaptureId";
|
|
1838
1839
|
IdCaptureListenerEvents["didReject"] = "IdCaptureListener.didRejectId";
|
|
1839
1840
|
})(IdCaptureListenerEvents || (IdCaptureListenerEvents = {}));
|
|
1840
|
-
class IdCaptureListenerController extends
|
|
1841
|
+
class IdCaptureListenerController extends BaseController {
|
|
1841
1842
|
constructor(idCapture) {
|
|
1842
1843
|
super('IdCaptureListenerProxy');
|
|
1843
1844
|
this.hasListeners = false;
|
|
@@ -1848,14 +1849,7 @@ class IdCaptureListenerController extends BaseNewController {
|
|
|
1848
1849
|
return this.handleDidReject(ev);
|
|
1849
1850
|
});
|
|
1850
1851
|
this.idCapture = idCapture;
|
|
1851
|
-
this.initialize();
|
|
1852
|
-
}
|
|
1853
|
-
initialize() {
|
|
1854
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1855
|
-
if (this.idCapture.listeners.length > 0) {
|
|
1856
|
-
this.subscribeListener();
|
|
1857
|
-
}
|
|
1858
|
-
});
|
|
1852
|
+
void this.initialize();
|
|
1859
1853
|
}
|
|
1860
1854
|
subscribeListener() {
|
|
1861
1855
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -1865,10 +1859,33 @@ class IdCaptureListenerController extends BaseNewController {
|
|
|
1865
1859
|
this._proxy.subscribeForEvents(Object.values(IdCaptureListenerEvents));
|
|
1866
1860
|
this._proxy.eventEmitter.on(IdCaptureListenerEvents.didCapture, this.handleDidCaptureWrapper);
|
|
1867
1861
|
this._proxy.eventEmitter.on(IdCaptureListenerEvents.didReject, this.handleDidRejectWrapper);
|
|
1868
|
-
yield this._proxy
|
|
1862
|
+
yield this._proxy.$$addIdCaptureListener({ modeId: this.modeId });
|
|
1869
1863
|
this.hasListeners = true;
|
|
1870
1864
|
});
|
|
1871
1865
|
}
|
|
1866
|
+
unsubscribeListener() {
|
|
1867
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1868
|
+
if (!this.hasListeners) {
|
|
1869
|
+
return;
|
|
1870
|
+
}
|
|
1871
|
+
yield this._proxy.$removeIdCaptureListener({ modeId: this.modeId });
|
|
1872
|
+
this._proxy.unsubscribeFromEvents(Object.values(IdCaptureListenerEvents));
|
|
1873
|
+
this._proxy.eventEmitter.off(IdCaptureListenerEvents.didCapture, this.handleDidCaptureWrapper);
|
|
1874
|
+
this._proxy.eventEmitter.off(IdCaptureListenerEvents.didReject, this.handleDidRejectWrapper);
|
|
1875
|
+
this.hasListeners = false;
|
|
1876
|
+
});
|
|
1877
|
+
}
|
|
1878
|
+
dispose() {
|
|
1879
|
+
void this.unsubscribeListener();
|
|
1880
|
+
this._proxy.dispose();
|
|
1881
|
+
}
|
|
1882
|
+
initialize() {
|
|
1883
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1884
|
+
if (this.idCapture.listeners.length > 0) {
|
|
1885
|
+
yield this.subscribeListener();
|
|
1886
|
+
}
|
|
1887
|
+
});
|
|
1888
|
+
}
|
|
1872
1889
|
handleDidCapture(ev) {
|
|
1873
1890
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1874
1891
|
const event = EventDataParser.parse(ev.data);
|
|
@@ -1880,7 +1897,7 @@ class IdCaptureListenerController extends BaseNewController {
|
|
|
1880
1897
|
this.enrichCapturedIdJson(capturedIdJson, event.imageInfo, event.frontReviewImage);
|
|
1881
1898
|
const captureId = CapturedId.fromJSON(capturedIdJson);
|
|
1882
1899
|
this.notifyListenersOfDidCapture(captureId);
|
|
1883
|
-
this._proxy.$finishDidCaptureCallback({ modeId: this.modeId, enabled: this.idCapture.isEnabled });
|
|
1900
|
+
return this._proxy.$finishDidCaptureCallback({ modeId: this.modeId, enabled: this.idCapture.isEnabled });
|
|
1884
1901
|
});
|
|
1885
1902
|
}
|
|
1886
1903
|
handleDidReject(ev) {
|
|
@@ -1897,19 +1914,7 @@ class IdCaptureListenerController extends BaseNewController {
|
|
|
1897
1914
|
rejectedId = CapturedId.fromJSON(rejectedIdJson);
|
|
1898
1915
|
}
|
|
1899
1916
|
this.notifyListenersOfDidReject(rejectedId, event.rejectionReason);
|
|
1900
|
-
this._proxy.$finishDidRejectCallback({ modeId: this.modeId, enabled: this.idCapture.isEnabled });
|
|
1901
|
-
});
|
|
1902
|
-
}
|
|
1903
|
-
unsubscribeListener() {
|
|
1904
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1905
|
-
if (!this.hasListeners) {
|
|
1906
|
-
return;
|
|
1907
|
-
}
|
|
1908
|
-
yield this._proxy.$removeIdCaptureListener({ modeId: this.modeId });
|
|
1909
|
-
this._proxy.unsubscribeFromEvents(Object.values(IdCaptureListenerEvents));
|
|
1910
|
-
this._proxy.eventEmitter.off(IdCaptureListenerEvents.didCapture, this.handleDidCaptureWrapper);
|
|
1911
|
-
this._proxy.eventEmitter.off(IdCaptureListenerEvents.didReject, this.handleDidRejectWrapper);
|
|
1912
|
-
this.hasListeners = false;
|
|
1917
|
+
return this._proxy.$finishDidRejectCallback({ modeId: this.modeId, enabled: this.idCapture.isEnabled });
|
|
1913
1918
|
});
|
|
1914
1919
|
}
|
|
1915
1920
|
notifyListenersOfDidCapture(captureId) {
|
|
@@ -1937,16 +1942,12 @@ class IdCaptureListenerController extends BaseNewController {
|
|
|
1937
1942
|
capturedIdJson.verificationResult.dataConsistencyResult.frontReviewImage = frontReviewImage;
|
|
1938
1943
|
}
|
|
1939
1944
|
}
|
|
1940
|
-
dispose() {
|
|
1941
|
-
this.unsubscribeListener();
|
|
1942
|
-
this._proxy.dispose();
|
|
1943
|
-
}
|
|
1944
1945
|
get modeId() {
|
|
1945
1946
|
return this.idCapture.modeId;
|
|
1946
1947
|
}
|
|
1947
1948
|
}
|
|
1948
1949
|
|
|
1949
|
-
class IdCaptureOverlayController extends
|
|
1950
|
+
class IdCaptureOverlayController extends BaseController {
|
|
1950
1951
|
constructor(overlay) {
|
|
1951
1952
|
super('IdCaptureOverlayProxy');
|
|
1952
1953
|
this.overlay = overlay;
|
|
@@ -1968,14 +1969,14 @@ class IdCaptureFeedback extends DefaultSerializeable {
|
|
|
1968
1969
|
}
|
|
1969
1970
|
set idCaptured(idCaptured) {
|
|
1970
1971
|
this._idCaptured = idCaptured;
|
|
1971
|
-
this.updateFeedback();
|
|
1972
|
+
void this.updateFeedback();
|
|
1972
1973
|
}
|
|
1973
1974
|
get idRejected() {
|
|
1974
1975
|
return this._idRejected;
|
|
1975
1976
|
}
|
|
1976
1977
|
set idRejected(idRejected) {
|
|
1977
1978
|
this._idRejected = idRejected;
|
|
1978
|
-
this.updateFeedback();
|
|
1979
|
+
void this.updateFeedback();
|
|
1979
1980
|
}
|
|
1980
1981
|
static get defaultSuccessSound() {
|
|
1981
1982
|
return IdCaptureFeedback.idDefaults.IdCapture.DefaultSuccessSound;
|
|
@@ -1991,10 +1992,6 @@ class IdCaptureFeedback extends DefaultSerializeable {
|
|
|
1991
1992
|
static get idDefaults() {
|
|
1992
1993
|
return getIdDefaults();
|
|
1993
1994
|
}
|
|
1994
|
-
updateFeedback() {
|
|
1995
|
-
var _a;
|
|
1996
|
-
(_a = this.controller) === null || _a === void 0 ? void 0 : _a.updateFeedback(this);
|
|
1997
|
-
}
|
|
1998
1995
|
constructor(idCaptured, idRejected) {
|
|
1999
1996
|
super();
|
|
2000
1997
|
this.controller = null;
|
|
@@ -2003,6 +2000,12 @@ class IdCaptureFeedback extends DefaultSerializeable {
|
|
|
2003
2000
|
this.idCaptured = idCaptured;
|
|
2004
2001
|
this.idRejected = idRejected;
|
|
2005
2002
|
}
|
|
2003
|
+
updateFeedback() {
|
|
2004
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2005
|
+
var _a;
|
|
2006
|
+
return (_a = this.controller) === null || _a === void 0 ? void 0 : _a.updateFeedback(this);
|
|
2007
|
+
});
|
|
2008
|
+
}
|
|
2006
2009
|
}
|
|
2007
2010
|
__decorate([
|
|
2008
2011
|
ignoreFromSerialization
|
|
@@ -2027,7 +2030,7 @@ class IdCapture extends DefaultSerializeable {
|
|
|
2027
2030
|
set feedback(feedback) {
|
|
2028
2031
|
this._feedback = feedback;
|
|
2029
2032
|
this._feedback.controller = this.controller;
|
|
2030
|
-
this.controller.updateFeedback(feedback);
|
|
2033
|
+
void this.controller.updateFeedback(feedback);
|
|
2031
2034
|
}
|
|
2032
2035
|
static createRecommendedCameraSettings() {
|
|
2033
2036
|
return new CameraSettings(IdCapture.idCaptureDefaults.IdCapture.RecommendedCameraSettings);
|
|
@@ -2037,14 +2040,14 @@ class IdCapture extends DefaultSerializeable {
|
|
|
2037
2040
|
}
|
|
2038
2041
|
set isEnabled(isEnabled) {
|
|
2039
2042
|
this._isEnabled = isEnabled;
|
|
2040
|
-
this.controller.setModeEnabledState(isEnabled);
|
|
2043
|
+
void this.controller.setModeEnabledState(isEnabled);
|
|
2041
2044
|
}
|
|
2042
2045
|
get externalTransactionId() {
|
|
2043
2046
|
return this._externalTransactionId;
|
|
2044
2047
|
}
|
|
2045
2048
|
set externalTransactionId(externalTransactionId) {
|
|
2046
2049
|
this._externalTransactionId = externalTransactionId;
|
|
2047
|
-
this.controller.updateIdCaptureMode();
|
|
2050
|
+
void this.controller.updateIdCaptureMode();
|
|
2048
2051
|
}
|
|
2049
2052
|
get _context() {
|
|
2050
2053
|
return this.privateContext;
|
|
@@ -2065,9 +2068,9 @@ class IdCapture extends DefaultSerializeable {
|
|
|
2065
2068
|
}
|
|
2066
2069
|
constructor(settings) {
|
|
2067
2070
|
super();
|
|
2071
|
+
this.parentId = null;
|
|
2068
2072
|
this.type = 'idCapture';
|
|
2069
2073
|
this.modeId = Math.floor(Math.random() * 100000000);
|
|
2070
|
-
this.parentId = null;
|
|
2071
2074
|
this._isEnabled = true;
|
|
2072
2075
|
this._externalTransactionId = null;
|
|
2073
2076
|
this._feedback = IdCaptureFeedback.defaultFeedback;
|
|
@@ -2207,12 +2210,12 @@ class IdCaptureOverlay extends DefaultSerializeable {
|
|
|
2207
2210
|
setFrontSideTextHint(text) {
|
|
2208
2211
|
var _a;
|
|
2209
2212
|
this._frontSideTextHint = text;
|
|
2210
|
-
(_a = this.controller) === null || _a === void 0 ? void 0 : _a.updateIdCaptureOverlay(this);
|
|
2213
|
+
void ((_a = this.controller) === null || _a === void 0 ? void 0 : _a.updateIdCaptureOverlay(this));
|
|
2211
2214
|
}
|
|
2212
2215
|
setBackSideTextHint(text) {
|
|
2213
2216
|
var _a;
|
|
2214
2217
|
this._backSideTextHint = text;
|
|
2215
|
-
(_a = this.controller) === null || _a === void 0 ? void 0 : _a.updateIdCaptureOverlay(this);
|
|
2218
|
+
void ((_a = this.controller) === null || _a === void 0 ? void 0 : _a.updateIdCaptureOverlay(this));
|
|
2216
2219
|
}
|
|
2217
2220
|
get idLayoutStyle() {
|
|
2218
2221
|
return this._idLayoutStyle;
|
|
@@ -2220,7 +2223,7 @@ class IdCaptureOverlay extends DefaultSerializeable {
|
|
|
2220
2223
|
set idLayoutStyle(style) {
|
|
2221
2224
|
var _a;
|
|
2222
2225
|
this._idLayoutStyle = style;
|
|
2223
|
-
(_a = this.controller) === null || _a === void 0 ? void 0 : _a.updateIdCaptureOverlay(this);
|
|
2226
|
+
void ((_a = this.controller) === null || _a === void 0 ? void 0 : _a.updateIdCaptureOverlay(this));
|
|
2224
2227
|
}
|
|
2225
2228
|
get idLayoutLineStyle() {
|
|
2226
2229
|
return this._idLayoutLineStyle;
|
|
@@ -2228,7 +2231,7 @@ class IdCaptureOverlay extends DefaultSerializeable {
|
|
|
2228
2231
|
set idLayoutLineStyle(lineStyle) {
|
|
2229
2232
|
var _a;
|
|
2230
2233
|
this._idLayoutLineStyle = lineStyle;
|
|
2231
|
-
(_a = this.controller) === null || _a === void 0 ? void 0 : _a.updateIdCaptureOverlay(this);
|
|
2234
|
+
void ((_a = this.controller) === null || _a === void 0 ? void 0 : _a.updateIdCaptureOverlay(this));
|
|
2232
2235
|
}
|
|
2233
2236
|
get capturedBrush() {
|
|
2234
2237
|
return this._capturedBrush;
|
|
@@ -2236,7 +2239,7 @@ class IdCaptureOverlay extends DefaultSerializeable {
|
|
|
2236
2239
|
set capturedBrush(brush) {
|
|
2237
2240
|
var _a;
|
|
2238
2241
|
this._capturedBrush = brush;
|
|
2239
|
-
(_a = this.controller) === null || _a === void 0 ? void 0 : _a.updateIdCaptureOverlay(this);
|
|
2242
|
+
void ((_a = this.controller) === null || _a === void 0 ? void 0 : _a.updateIdCaptureOverlay(this));
|
|
2240
2243
|
}
|
|
2241
2244
|
get localizedBrush() {
|
|
2242
2245
|
return this._localizedBrush;
|
|
@@ -2244,7 +2247,7 @@ class IdCaptureOverlay extends DefaultSerializeable {
|
|
|
2244
2247
|
set localizedBrush(brush) {
|
|
2245
2248
|
var _a;
|
|
2246
2249
|
this._localizedBrush = brush;
|
|
2247
|
-
(_a = this.controller) === null || _a === void 0 ? void 0 : _a.updateIdCaptureOverlay(this);
|
|
2250
|
+
void ((_a = this.controller) === null || _a === void 0 ? void 0 : _a.updateIdCaptureOverlay(this));
|
|
2248
2251
|
}
|
|
2249
2252
|
get rejectedBrush() {
|
|
2250
2253
|
return this._rejectedBrush;
|
|
@@ -2252,7 +2255,7 @@ class IdCaptureOverlay extends DefaultSerializeable {
|
|
|
2252
2255
|
set rejectedBrush(brush) {
|
|
2253
2256
|
var _a;
|
|
2254
2257
|
this._rejectedBrush = brush;
|
|
2255
|
-
(_a = this.controller) === null || _a === void 0 ? void 0 : _a.updateIdCaptureOverlay(this);
|
|
2258
|
+
void ((_a = this.controller) === null || _a === void 0 ? void 0 : _a.updateIdCaptureOverlay(this));
|
|
2256
2259
|
}
|
|
2257
2260
|
get defaultCapturedBrush() {
|
|
2258
2261
|
return this._defaultCapturedBrush;
|
|
@@ -2269,7 +2272,7 @@ class IdCaptureOverlay extends DefaultSerializeable {
|
|
|
2269
2272
|
set textHintPosition(position) {
|
|
2270
2273
|
var _a;
|
|
2271
2274
|
this._textHintPosition = position;
|
|
2272
|
-
(_a = this.controller) === null || _a === void 0 ? void 0 : _a.updateIdCaptureOverlay(this);
|
|
2275
|
+
void ((_a = this.controller) === null || _a === void 0 ? void 0 : _a.updateIdCaptureOverlay(this));
|
|
2273
2276
|
}
|
|
2274
2277
|
get showTextHints() {
|
|
2275
2278
|
return this._showTextHints;
|
|
@@ -2277,7 +2280,7 @@ class IdCaptureOverlay extends DefaultSerializeable {
|
|
|
2277
2280
|
set showTextHints(enabled) {
|
|
2278
2281
|
var _a;
|
|
2279
2282
|
this._showTextHints = enabled;
|
|
2280
|
-
(_a = this.controller) === null || _a === void 0 ? void 0 : _a.updateIdCaptureOverlay(this);
|
|
2283
|
+
void ((_a = this.controller) === null || _a === void 0 ? void 0 : _a.updateIdCaptureOverlay(this));
|
|
2281
2284
|
}
|
|
2282
2285
|
}
|
|
2283
2286
|
__decorate([
|
|
@@ -2368,9 +2371,6 @@ class SingleSideScanner extends DefaultSerializeable {
|
|
|
2368
2371
|
return this._visualInspectionZone;
|
|
2369
2372
|
}
|
|
2370
2373
|
}
|
|
2371
|
-
__decorate([
|
|
2372
|
-
nameForSerialization('isFull')
|
|
2373
|
-
], SingleSideScanner.prototype, "_isFull", void 0);
|
|
2374
2374
|
__decorate([
|
|
2375
2375
|
ignoreFromSerialization
|
|
2376
2376
|
], SingleSideScanner.prototype, "_barcode", void 0);
|
|
@@ -2380,6 +2380,9 @@ __decorate([
|
|
|
2380
2380
|
__decorate([
|
|
2381
2381
|
ignoreFromSerialization
|
|
2382
2382
|
], SingleSideScanner.prototype, "_visualInspectionZone", void 0);
|
|
2383
|
+
__decorate([
|
|
2384
|
+
nameForSerialization('isFull')
|
|
2385
|
+
], SingleSideScanner.prototype, "_isFull", void 0);
|
|
2383
2386
|
|
|
2384
2387
|
class FullDocumentScanner extends DefaultSerializeable {
|
|
2385
2388
|
constructor() {
|
|
@@ -2395,9 +2398,6 @@ class FullDocumentScanner extends DefaultSerializeable {
|
|
|
2395
2398
|
};
|
|
2396
2399
|
}
|
|
2397
2400
|
}
|
|
2398
|
-
__decorate([
|
|
2399
|
-
nameForSerialization('isFull')
|
|
2400
|
-
], FullDocumentScanner.prototype, "_isFull", void 0);
|
|
2401
2401
|
__decorate([
|
|
2402
2402
|
ignoreFromSerialization
|
|
2403
2403
|
], FullDocumentScanner.prototype, "_barcode", void 0);
|
|
@@ -2407,6 +2407,9 @@ __decorate([
|
|
|
2407
2407
|
__decorate([
|
|
2408
2408
|
ignoreFromSerialization
|
|
2409
2409
|
], FullDocumentScanner.prototype, "_visualInspectionZone", void 0);
|
|
2410
|
+
__decorate([
|
|
2411
|
+
nameForSerialization('isFull')
|
|
2412
|
+
], FullDocumentScanner.prototype, "_isFull", void 0);
|
|
2410
2413
|
|
|
2411
2414
|
class MobileDocumentScanner extends DefaultSerializeable {
|
|
2412
2415
|
constructor(iso180135, ocr, elementsToRetain) {
|
|
@@ -2426,21 +2429,18 @@ class MobileDocumentScanner extends DefaultSerializeable {
|
|
|
2426
2429
|
}
|
|
2427
2430
|
}
|
|
2428
2431
|
__decorate([
|
|
2429
|
-
nameForSerialization('
|
|
2432
|
+
nameForSerialization('iso180135')
|
|
2430
2433
|
], MobileDocumentScanner.prototype, "_iso180135", void 0);
|
|
2431
2434
|
__decorate([
|
|
2432
2435
|
nameForSerialization('ocr')
|
|
2433
2436
|
], MobileDocumentScanner.prototype, "_ocr", void 0);
|
|
2434
2437
|
__decorate([
|
|
2435
|
-
nameForSerialization('
|
|
2438
|
+
nameForSerialization('elementsToRetain')
|
|
2436
2439
|
], MobileDocumentScanner.prototype, "_elementsToRetain", void 0);
|
|
2437
2440
|
|
|
2438
2441
|
class IdCaptureSettings extends DefaultSerializeable {
|
|
2439
2442
|
constructor() {
|
|
2440
2443
|
super();
|
|
2441
|
-
this.properties = {};
|
|
2442
|
-
this.imageToResult = {};
|
|
2443
|
-
this.anonymizationMap = {};
|
|
2444
2444
|
this.anonymizationMode = IdCaptureSettings.idCaptureDefaults.IdCapture.IdCaptureSettings.anonymizationMode;
|
|
2445
2445
|
this.rejectVoidedIds = IdCaptureSettings.idCaptureDefaults.IdCapture.IdCaptureSettings.rejectVoidedIds;
|
|
2446
2446
|
this.decodeBackOfEuropeanDrivingLicense = IdCaptureSettings.idCaptureDefaults.IdCapture.IdCaptureSettings.decodeBackOfEuropeanDrivingLicense;
|
|
@@ -2453,6 +2453,9 @@ class IdCaptureSettings extends DefaultSerializeable {
|
|
|
2453
2453
|
this.rejectForgedAamvaBarcodes = IdCaptureSettings.idCaptureDefaults.IdCapture.IdCaptureSettings.rejectForgedAamvaBarcodes;
|
|
2454
2454
|
this.rejectInconsistentData = IdCaptureSettings.idCaptureDefaults.IdCapture.IdCaptureSettings.rejectInconsistentData;
|
|
2455
2455
|
this.rejectHolderBelowAge = IdCaptureSettings.idCaptureDefaults.IdCapture.IdCaptureSettings.rejectHolderBelowAge;
|
|
2456
|
+
this.properties = {};
|
|
2457
|
+
this.imageToResult = {};
|
|
2458
|
+
this.anonymizationMap = {};
|
|
2456
2459
|
}
|
|
2457
2460
|
static get idCaptureDefaults() {
|
|
2458
2461
|
return FactoryMaker.getInstance('IdDefaults');
|
|
@@ -2476,10 +2479,20 @@ class IdCaptureSettings extends DefaultSerializeable {
|
|
|
2476
2479
|
}
|
|
2477
2480
|
}
|
|
2478
2481
|
__decorate([
|
|
2479
|
-
nameForSerialization('
|
|
2482
|
+
nameForSerialization('scanner')
|
|
2480
2483
|
], IdCaptureSettings.prototype, "scanner", void 0);
|
|
2481
2484
|
__decorate([
|
|
2482
2485
|
ignoreFromSerialization
|
|
2483
2486
|
], IdCaptureSettings, "idCaptureDefaults", null);
|
|
2484
2487
|
|
|
2485
|
-
|
|
2488
|
+
const ID_PROXY_TYPE_NAMES = [
|
|
2489
|
+
'IdCaptureListenerProxy',
|
|
2490
|
+
'IdCaptureProxy',
|
|
2491
|
+
'IdCaptureOverlayProxy',
|
|
2492
|
+
];
|
|
2493
|
+
|
|
2494
|
+
function registerIdProxies(provider) {
|
|
2495
|
+
registerProxies(ID_PROXY_TYPE_NAMES, provider);
|
|
2496
|
+
}
|
|
2497
|
+
|
|
2498
|
+
export { AamvaBarcodeVerificationResult, AamvaBarcodeVerificationStatus, BarcodeResult, CapturedId, CapturedSides, DataConsistencyCheck, DataConsistencyResult, DateResult, DriverLicense, DrivingLicenseCategory, DrivingLicenseDetails, Duration, FullDocumentScanner, HealthInsuranceCard, ID_PROXY_TYPE_NAMES, IdAnonymizationMode, IdCapture, IdCaptureController, IdCaptureDocumentType, IdCaptureFeedback, IdCaptureListenerController, IdCaptureListenerEvents, IdCaptureOverlay, IdCaptureOverlayController, IdCaptureRegion, IdCaptureScanner, IdCaptureSettings, IdCard, IdFieldType, IdImageType, IdImages, IdLayoutLineStyle, IdLayoutStyle, IdSide, MRZResult, MobileDocumentDataElement, MobileDocumentOCRResult, MobileDocumentResult, MobileDocumentScanner, Passport, ProfessionalDrivingPermit, RegionSpecific, RegionSpecificSubtype, RejectionReason, ResidencePermit, Sex, SingleSideScanner, TextHintPosition, UsRealIdStatus, VIZResult, VehicleRestriction, VerificationResult, VisaIcao, getIdDefaults, loadIdDefaults, parseIdDefaults, registerIdProxies };
|