@ekyc_qoobiss/qbs-ect-cmp 3.6.56 → 3.6.57
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/dist/cjs/agreement-check_17.cjs.entry.js +16 -22
- package/dist/collection/components/common/id-capture/id-capture.js +5 -12
- package/dist/collection/components/common/selfie-capture/selfie-capture.js +1 -2
- package/dist/collection/helpers/Cameras.js +7 -7
- package/dist/collection/libs/IDML5Detector/IDML5Detector.js +3 -0
- package/dist/esm/agreement-check_17.entry.js +16 -22
- package/dist/qbs-ect-cmp/{p-2a7693e1.entry.js → p-c31df575.entry.js} +1 -1
- package/dist/qbs-ect-cmp/qbs-ect-cmp.esm.js +1 -1
- package/dist/types/components/common/id-capture/id-capture.d.ts +0 -1
- package/dist/types/components/common/selfie-capture/selfie-capture.d.ts +0 -1
- package/dist/types/helpers/Cameras.d.ts +3 -3
- package/package.json +1 -1
|
@@ -1590,6 +1590,8 @@ class IDML5Detector {
|
|
|
1590
1590
|
}
|
|
1591
1591
|
if (results[0].label == this.targetedLabel && results[0].confidence > 0.9 && !this.checked) {
|
|
1592
1592
|
this.checked = true;
|
|
1593
|
+
if (TranslationUtils.state.debug)
|
|
1594
|
+
console.log('idml5detector | gotResults | autoCapturing');
|
|
1593
1595
|
this.stream.autoCapturing();
|
|
1594
1596
|
await this.drawFrame('green');
|
|
1595
1597
|
}
|
|
@@ -4838,7 +4840,7 @@ const HowToInfo = class {
|
|
|
4838
4840
|
HowToInfo.style = howToInfoCss;
|
|
4839
4841
|
|
|
4840
4842
|
class Cameras {
|
|
4841
|
-
async GetCameras(deviceInfo) {
|
|
4843
|
+
static async GetCameras(deviceInfo) {
|
|
4842
4844
|
var allDevices = [];
|
|
4843
4845
|
const devices = await navigator.mediaDevices.enumerateDevices();
|
|
4844
4846
|
const videoDevices = devices.filter(device => device.kind === 'videoinput');
|
|
@@ -4901,7 +4903,7 @@ class Cameras {
|
|
|
4901
4903
|
}
|
|
4902
4904
|
return allDevices;
|
|
4903
4905
|
}
|
|
4904
|
-
GetConstraints(selectedDeviceId, device, portrait = false, audio = true) {
|
|
4906
|
+
static GetConstraints(selectedDeviceId, device, portrait = false, audio = true) {
|
|
4905
4907
|
let constraints = {
|
|
4906
4908
|
audio: audio,
|
|
4907
4909
|
};
|
|
@@ -4937,7 +4939,7 @@ class Cameras {
|
|
|
4937
4939
|
constraints.video = mediaTrack;
|
|
4938
4940
|
return constraints;
|
|
4939
4941
|
}
|
|
4940
|
-
GetRecommendedCamera(cameras) {
|
|
4942
|
+
static GetRecommendedCamera(cameras) {
|
|
4941
4943
|
if (cameras && cameras.length > 0) {
|
|
4942
4944
|
var recommDevice = cameras.find(c => c.recommended);
|
|
4943
4945
|
if (recommDevice) {
|
|
@@ -4950,10 +4952,10 @@ class Cameras {
|
|
|
4950
4952
|
if (TranslationUtils.state.debug)
|
|
4951
4953
|
console.log('cameras | initCameras');
|
|
4952
4954
|
try {
|
|
4953
|
-
let
|
|
4954
|
-
let
|
|
4955
|
-
var recommCamera =
|
|
4956
|
-
TranslationUtils.state.cameraIds =
|
|
4955
|
+
let cameras = await Cameras.GetCameras(device);
|
|
4956
|
+
let envCameras = cameras.filter(c => c.facingMode == 'environment');
|
|
4957
|
+
var recommCamera = Cameras.GetRecommendedCamera(envCameras);
|
|
4958
|
+
TranslationUtils.state.cameraIds = envCameras.map(camera => camera.deviceId);
|
|
4957
4959
|
TranslationUtils.state.cameraId = recommCamera === null || recommCamera === void 0 ? void 0 : recommCamera.deviceId;
|
|
4958
4960
|
if (TranslationUtils.state.debug)
|
|
4959
4961
|
console.log(`cameras | initCameras | cameraIds ${TranslationUtils.state.cameraIds} | cameraId ${TranslationUtils.state.cameraId}`);
|
|
@@ -4991,7 +4993,6 @@ var IDPose;
|
|
|
4991
4993
|
const idCaptureCss = ".logo{max-height:450px;max-width:450px}.canvas-on-video{max-width:100%;max-height:100%;position:absolute;z-index:2;transform:scale(-1, 1)}";
|
|
4992
4994
|
|
|
4993
4995
|
const IdCapture = class {
|
|
4994
|
-
// @State() private animationPath: string;
|
|
4995
4996
|
constructor(hostRef) {
|
|
4996
4997
|
index.registerInstance(this, hostRef);
|
|
4997
4998
|
this.eventPhotoCapture = index.createEvent(this, "photoIdCapture", 7);
|
|
@@ -5006,7 +5007,6 @@ const IdCapture = class {
|
|
|
5006
5007
|
this.demoVideo = undefined;
|
|
5007
5008
|
this.captureTaken = false;
|
|
5008
5009
|
this.verified = false;
|
|
5009
|
-
this.cameras = new Cameras();
|
|
5010
5010
|
this.showDemo = true;
|
|
5011
5011
|
}
|
|
5012
5012
|
eventVideoStarted(event) {
|
|
@@ -5063,7 +5063,7 @@ const IdCapture = class {
|
|
|
5063
5063
|
async openCamera() {
|
|
5064
5064
|
if (TranslationUtils.state.debug)
|
|
5065
5065
|
console.log('id-capture | openCamera');
|
|
5066
|
-
const constraints =
|
|
5066
|
+
const constraints = Cameras.GetConstraints(TranslationUtils.state.cameraId, TranslationUtils.state.device);
|
|
5067
5067
|
setTimeout(() => {
|
|
5068
5068
|
navigator.mediaDevices
|
|
5069
5069
|
.getUserMedia(constraints)
|
|
@@ -5100,15 +5100,10 @@ const IdCapture = class {
|
|
|
5100
5100
|
if (this.captureTaken)
|
|
5101
5101
|
return;
|
|
5102
5102
|
this.captureTaken = true;
|
|
5103
|
-
if (
|
|
5104
|
-
|
|
5105
|
-
|
|
5106
|
-
|
|
5107
|
-
this.eventPhotoCapture.emit(res);
|
|
5108
|
-
}
|
|
5109
|
-
else {
|
|
5110
|
-
this.eventTimeElapsed.emit();
|
|
5111
|
-
}
|
|
5103
|
+
if (TranslationUtils.state.debug)
|
|
5104
|
+
console.log('id-capture | takePhoto | sendingPhoto');
|
|
5105
|
+
let res = await Stream.instance.takePhoto();
|
|
5106
|
+
this.eventPhotoCapture.emit(res);
|
|
5112
5107
|
await BaseComponent.logStep(this.flowStep, TranslationUtils.FlowMoments.Finalized);
|
|
5113
5108
|
}
|
|
5114
5109
|
async verificationFinished() {
|
|
@@ -5210,7 +5205,7 @@ function v4(options, buf, offset) {
|
|
|
5210
5205
|
}
|
|
5211
5206
|
|
|
5212
5207
|
const name = "@ekyc_qoobiss/qbs-ect-cmp";
|
|
5213
|
-
const version$1 = "3.6.
|
|
5208
|
+
const version$1 = "3.6.57";
|
|
5214
5209
|
const description = "Person Identification Component";
|
|
5215
5210
|
const main = "./dist/index.cjs.js";
|
|
5216
5211
|
const module$1 = "./dist/index.js";
|
|
@@ -8813,7 +8808,6 @@ const SelfieCapture = class {
|
|
|
8813
8808
|
this.captureWidth = undefined;
|
|
8814
8809
|
this.captureTaken = false;
|
|
8815
8810
|
this.verified = false;
|
|
8816
|
-
this.cameras = new Cameras();
|
|
8817
8811
|
this.demoEnded = false;
|
|
8818
8812
|
}
|
|
8819
8813
|
eventVideoStarted(event) {
|
|
@@ -8850,7 +8844,7 @@ const SelfieCapture = class {
|
|
|
8850
8844
|
this.openCamera();
|
|
8851
8845
|
}
|
|
8852
8846
|
async openCamera() {
|
|
8853
|
-
const constraints =
|
|
8847
|
+
const constraints = Cameras.GetConstraints('', TranslationUtils.state.device, true);
|
|
8854
8848
|
setTimeout(() => {
|
|
8855
8849
|
navigator.mediaDevices
|
|
8856
8850
|
.getUserMedia(constraints)
|
|
@@ -14,7 +14,6 @@ import { Translations } from '../../../helpers/TranslationUtils';
|
|
|
14
14
|
import { FlowStatus } from '../../../models/FlowStatus';
|
|
15
15
|
// import { IDPose } from '../../libs/IDML5Detector/IDPose';
|
|
16
16
|
export class IdCapture {
|
|
17
|
-
// @State() private animationPath: string;
|
|
18
17
|
constructor() {
|
|
19
18
|
this.videoStarted = undefined;
|
|
20
19
|
this.cameraSize = undefined;
|
|
@@ -25,7 +24,6 @@ export class IdCapture {
|
|
|
25
24
|
this.demoVideo = undefined;
|
|
26
25
|
this.captureTaken = false;
|
|
27
26
|
this.verified = false;
|
|
28
|
-
this.cameras = new Cameras();
|
|
29
27
|
this.showDemo = true;
|
|
30
28
|
}
|
|
31
29
|
eventVideoStarted(event) {
|
|
@@ -82,7 +80,7 @@ export class IdCapture {
|
|
|
82
80
|
async openCamera() {
|
|
83
81
|
if (store.debug)
|
|
84
82
|
console.log('id-capture | openCamera');
|
|
85
|
-
const constraints =
|
|
83
|
+
const constraints = Cameras.GetConstraints(store.cameraId, store.device);
|
|
86
84
|
setTimeout(() => {
|
|
87
85
|
navigator.mediaDevices
|
|
88
86
|
.getUserMedia(constraints)
|
|
@@ -119,15 +117,10 @@ export class IdCapture {
|
|
|
119
117
|
if (this.captureTaken)
|
|
120
118
|
return;
|
|
121
119
|
this.captureTaken = true;
|
|
122
|
-
if (
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
this.eventPhotoCapture.emit(res);
|
|
127
|
-
}
|
|
128
|
-
else {
|
|
129
|
-
this.eventTimeElapsed.emit();
|
|
130
|
-
}
|
|
120
|
+
if (store.debug)
|
|
121
|
+
console.log('id-capture | takePhoto | sendingPhoto');
|
|
122
|
+
let res = await Stream.instance.takePhoto();
|
|
123
|
+
this.eventPhotoCapture.emit(res);
|
|
131
124
|
await BaseComponent.logStep(this.flowStep, FlowMoments.Finalized);
|
|
132
125
|
}
|
|
133
126
|
async verificationFinished() {
|
|
@@ -23,7 +23,6 @@ export class SelfieCapture {
|
|
|
23
23
|
this.captureWidth = undefined;
|
|
24
24
|
this.captureTaken = false;
|
|
25
25
|
this.verified = false;
|
|
26
|
-
this.cameras = new Cameras();
|
|
27
26
|
this.demoEnded = false;
|
|
28
27
|
}
|
|
29
28
|
eventVideoStarted(event) {
|
|
@@ -60,7 +59,7 @@ export class SelfieCapture {
|
|
|
60
59
|
this.openCamera();
|
|
61
60
|
}
|
|
62
61
|
async openCamera() {
|
|
63
|
-
const constraints =
|
|
62
|
+
const constraints = Cameras.GetConstraints('', store.device, true);
|
|
64
63
|
setTimeout(() => {
|
|
65
64
|
navigator.mediaDevices
|
|
66
65
|
.getUserMedia(constraints)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Browser } from '../models/IDevice';
|
|
2
2
|
import store from './store';
|
|
3
3
|
export class Cameras {
|
|
4
|
-
async GetCameras(deviceInfo) {
|
|
4
|
+
static async GetCameras(deviceInfo) {
|
|
5
5
|
var allDevices = [];
|
|
6
6
|
const devices = await navigator.mediaDevices.enumerateDevices();
|
|
7
7
|
const videoDevices = devices.filter(device => device.kind === 'videoinput');
|
|
@@ -64,7 +64,7 @@ export class Cameras {
|
|
|
64
64
|
}
|
|
65
65
|
return allDevices;
|
|
66
66
|
}
|
|
67
|
-
GetConstraints(selectedDeviceId, device, portrait = false, audio = true) {
|
|
67
|
+
static GetConstraints(selectedDeviceId, device, portrait = false, audio = true) {
|
|
68
68
|
let constraints = {
|
|
69
69
|
audio: audio,
|
|
70
70
|
};
|
|
@@ -100,7 +100,7 @@ export class Cameras {
|
|
|
100
100
|
constraints.video = mediaTrack;
|
|
101
101
|
return constraints;
|
|
102
102
|
}
|
|
103
|
-
GetRecommendedCamera(cameras) {
|
|
103
|
+
static GetRecommendedCamera(cameras) {
|
|
104
104
|
if (cameras && cameras.length > 0) {
|
|
105
105
|
var recommDevice = cameras.find(c => c.recommended);
|
|
106
106
|
if (recommDevice) {
|
|
@@ -113,10 +113,10 @@ export class Cameras {
|
|
|
113
113
|
if (store.debug)
|
|
114
114
|
console.log('cameras | initCameras');
|
|
115
115
|
try {
|
|
116
|
-
let
|
|
117
|
-
let
|
|
118
|
-
var recommCamera =
|
|
119
|
-
store.cameraIds =
|
|
116
|
+
let cameras = await Cameras.GetCameras(device);
|
|
117
|
+
let envCameras = cameras.filter(c => c.facingMode == 'environment');
|
|
118
|
+
var recommCamera = Cameras.GetRecommendedCamera(envCameras);
|
|
119
|
+
store.cameraIds = envCameras.map(camera => camera.deviceId);
|
|
120
120
|
store.cameraId = recommCamera === null || recommCamera === void 0 ? void 0 : recommCamera.deviceId;
|
|
121
121
|
if (store.debug)
|
|
122
122
|
console.log(`cameras | initCameras | cameraIds ${store.cameraIds} | cameraId ${store.cameraId}`);
|
|
@@ -5,6 +5,7 @@ import id_white_svg from '../../assets/canvas-masks/id_white.svg';
|
|
|
5
5
|
import id_green_svg from '../../assets/canvas-masks/id_green.svg';
|
|
6
6
|
import { delay } from '../../utils/utils';
|
|
7
7
|
import { VerificationMode } from '../../models/IVerificationMode';
|
|
8
|
+
import store from '../../helpers/store';
|
|
8
9
|
export class IDML5Detector {
|
|
9
10
|
static getInstance(stream, isMobile) {
|
|
10
11
|
if (!IDML5Detector.instance) {
|
|
@@ -61,6 +62,8 @@ export class IDML5Detector {
|
|
|
61
62
|
}
|
|
62
63
|
if (results[0].label == this.targetedLabel && results[0].confidence > 0.9 && !this.checked) {
|
|
63
64
|
this.checked = true;
|
|
65
|
+
if (store.debug)
|
|
66
|
+
console.log('idml5detector | gotResults | autoCapturing');
|
|
64
67
|
this.stream.autoCapturing();
|
|
65
68
|
await this.drawFrame('green');
|
|
66
69
|
}
|
|
@@ -1586,6 +1586,8 @@ class IDML5Detector {
|
|
|
1586
1586
|
}
|
|
1587
1587
|
if (results[0].label == this.targetedLabel && results[0].confidence > 0.9 && !this.checked) {
|
|
1588
1588
|
this.checked = true;
|
|
1589
|
+
if (state.debug)
|
|
1590
|
+
console.log('idml5detector | gotResults | autoCapturing');
|
|
1589
1591
|
this.stream.autoCapturing();
|
|
1590
1592
|
await this.drawFrame('green');
|
|
1591
1593
|
}
|
|
@@ -4834,7 +4836,7 @@ const HowToInfo = class {
|
|
|
4834
4836
|
HowToInfo.style = howToInfoCss;
|
|
4835
4837
|
|
|
4836
4838
|
class Cameras {
|
|
4837
|
-
async GetCameras(deviceInfo) {
|
|
4839
|
+
static async GetCameras(deviceInfo) {
|
|
4838
4840
|
var allDevices = [];
|
|
4839
4841
|
const devices = await navigator.mediaDevices.enumerateDevices();
|
|
4840
4842
|
const videoDevices = devices.filter(device => device.kind === 'videoinput');
|
|
@@ -4897,7 +4899,7 @@ class Cameras {
|
|
|
4897
4899
|
}
|
|
4898
4900
|
return allDevices;
|
|
4899
4901
|
}
|
|
4900
|
-
GetConstraints(selectedDeviceId, device, portrait = false, audio = true) {
|
|
4902
|
+
static GetConstraints(selectedDeviceId, device, portrait = false, audio = true) {
|
|
4901
4903
|
let constraints = {
|
|
4902
4904
|
audio: audio,
|
|
4903
4905
|
};
|
|
@@ -4933,7 +4935,7 @@ class Cameras {
|
|
|
4933
4935
|
constraints.video = mediaTrack;
|
|
4934
4936
|
return constraints;
|
|
4935
4937
|
}
|
|
4936
|
-
GetRecommendedCamera(cameras) {
|
|
4938
|
+
static GetRecommendedCamera(cameras) {
|
|
4937
4939
|
if (cameras && cameras.length > 0) {
|
|
4938
4940
|
var recommDevice = cameras.find(c => c.recommended);
|
|
4939
4941
|
if (recommDevice) {
|
|
@@ -4946,10 +4948,10 @@ class Cameras {
|
|
|
4946
4948
|
if (state.debug)
|
|
4947
4949
|
console.log('cameras | initCameras');
|
|
4948
4950
|
try {
|
|
4949
|
-
let
|
|
4950
|
-
let
|
|
4951
|
-
var recommCamera =
|
|
4952
|
-
state.cameraIds =
|
|
4951
|
+
let cameras = await Cameras.GetCameras(device);
|
|
4952
|
+
let envCameras = cameras.filter(c => c.facingMode == 'environment');
|
|
4953
|
+
var recommCamera = Cameras.GetRecommendedCamera(envCameras);
|
|
4954
|
+
state.cameraIds = envCameras.map(camera => camera.deviceId);
|
|
4953
4955
|
state.cameraId = recommCamera === null || recommCamera === void 0 ? void 0 : recommCamera.deviceId;
|
|
4954
4956
|
if (state.debug)
|
|
4955
4957
|
console.log(`cameras | initCameras | cameraIds ${state.cameraIds} | cameraId ${state.cameraId}`);
|
|
@@ -4987,7 +4989,6 @@ var IDPose;
|
|
|
4987
4989
|
const idCaptureCss = ".logo{max-height:450px;max-width:450px}.canvas-on-video{max-width:100%;max-height:100%;position:absolute;z-index:2;transform:scale(-1, 1)}";
|
|
4988
4990
|
|
|
4989
4991
|
const IdCapture = class {
|
|
4990
|
-
// @State() private animationPath: string;
|
|
4991
4992
|
constructor(hostRef) {
|
|
4992
4993
|
registerInstance(this, hostRef);
|
|
4993
4994
|
this.eventPhotoCapture = createEvent(this, "photoIdCapture", 7);
|
|
@@ -5002,7 +5003,6 @@ const IdCapture = class {
|
|
|
5002
5003
|
this.demoVideo = undefined;
|
|
5003
5004
|
this.captureTaken = false;
|
|
5004
5005
|
this.verified = false;
|
|
5005
|
-
this.cameras = new Cameras();
|
|
5006
5006
|
this.showDemo = true;
|
|
5007
5007
|
}
|
|
5008
5008
|
eventVideoStarted(event) {
|
|
@@ -5059,7 +5059,7 @@ const IdCapture = class {
|
|
|
5059
5059
|
async openCamera() {
|
|
5060
5060
|
if (state.debug)
|
|
5061
5061
|
console.log('id-capture | openCamera');
|
|
5062
|
-
const constraints =
|
|
5062
|
+
const constraints = Cameras.GetConstraints(state.cameraId, state.device);
|
|
5063
5063
|
setTimeout(() => {
|
|
5064
5064
|
navigator.mediaDevices
|
|
5065
5065
|
.getUserMedia(constraints)
|
|
@@ -5096,15 +5096,10 @@ const IdCapture = class {
|
|
|
5096
5096
|
if (this.captureTaken)
|
|
5097
5097
|
return;
|
|
5098
5098
|
this.captureTaken = true;
|
|
5099
|
-
if (
|
|
5100
|
-
|
|
5101
|
-
|
|
5102
|
-
|
|
5103
|
-
this.eventPhotoCapture.emit(res);
|
|
5104
|
-
}
|
|
5105
|
-
else {
|
|
5106
|
-
this.eventTimeElapsed.emit();
|
|
5107
|
-
}
|
|
5099
|
+
if (state.debug)
|
|
5100
|
+
console.log('id-capture | takePhoto | sendingPhoto');
|
|
5101
|
+
let res = await Stream.instance.takePhoto();
|
|
5102
|
+
this.eventPhotoCapture.emit(res);
|
|
5108
5103
|
await BaseComponent.logStep(this.flowStep, FlowMoments.Finalized);
|
|
5109
5104
|
}
|
|
5110
5105
|
async verificationFinished() {
|
|
@@ -5206,7 +5201,7 @@ function v4(options, buf, offset) {
|
|
|
5206
5201
|
}
|
|
5207
5202
|
|
|
5208
5203
|
const name = "@ekyc_qoobiss/qbs-ect-cmp";
|
|
5209
|
-
const version$1 = "3.6.
|
|
5204
|
+
const version$1 = "3.6.57";
|
|
5210
5205
|
const description = "Person Identification Component";
|
|
5211
5206
|
const main = "./dist/index.cjs.js";
|
|
5212
5207
|
const module = "./dist/index.js";
|
|
@@ -8809,7 +8804,6 @@ const SelfieCapture = class {
|
|
|
8809
8804
|
this.captureWidth = undefined;
|
|
8810
8805
|
this.captureTaken = false;
|
|
8811
8806
|
this.verified = false;
|
|
8812
|
-
this.cameras = new Cameras();
|
|
8813
8807
|
this.demoEnded = false;
|
|
8814
8808
|
}
|
|
8815
8809
|
eventVideoStarted(event) {
|
|
@@ -8846,7 +8840,7 @@ const SelfieCapture = class {
|
|
|
8846
8840
|
this.openCamera();
|
|
8847
8841
|
}
|
|
8848
8842
|
async openCamera() {
|
|
8849
|
-
const constraints =
|
|
8843
|
+
const constraints = Cameras.GetConstraints('', state.device, true);
|
|
8850
8844
|
setTimeout(() => {
|
|
8851
8845
|
navigator.mediaDevices
|
|
8852
8846
|
.getUserMedia(constraints)
|