@ekyc_qoobiss/qbs-ect-cmp 3.6.56 → 3.6.58
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 +19 -22
- package/dist/collection/components/common/id-capture/id-capture.js +8 -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 +19 -22
- package/dist/qbs-ect-cmp/{p-2a7693e1.entry.js → p-705cdf0b.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,10 @@ const IdCapture = class {
|
|
|
5063
5063
|
async openCamera() {
|
|
5064
5064
|
if (TranslationUtils.state.debug)
|
|
5065
5065
|
console.log('id-capture | openCamera');
|
|
5066
|
-
|
|
5066
|
+
if (!TranslationUtils.state.cameraId) {
|
|
5067
|
+
await Cameras.InitCameras(TranslationUtils.state.device);
|
|
5068
|
+
}
|
|
5069
|
+
const constraints = Cameras.GetConstraints(TranslationUtils.state.cameraId, TranslationUtils.state.device);
|
|
5067
5070
|
setTimeout(() => {
|
|
5068
5071
|
navigator.mediaDevices
|
|
5069
5072
|
.getUserMedia(constraints)
|
|
@@ -5100,15 +5103,10 @@ const IdCapture = class {
|
|
|
5100
5103
|
if (this.captureTaken)
|
|
5101
5104
|
return;
|
|
5102
5105
|
this.captureTaken = true;
|
|
5103
|
-
if (
|
|
5104
|
-
|
|
5105
|
-
|
|
5106
|
-
|
|
5107
|
-
this.eventPhotoCapture.emit(res);
|
|
5108
|
-
}
|
|
5109
|
-
else {
|
|
5110
|
-
this.eventTimeElapsed.emit();
|
|
5111
|
-
}
|
|
5106
|
+
if (TranslationUtils.state.debug)
|
|
5107
|
+
console.log('id-capture | takePhoto | sendingPhoto');
|
|
5108
|
+
let res = await Stream.instance.takePhoto();
|
|
5109
|
+
this.eventPhotoCapture.emit(res);
|
|
5112
5110
|
await BaseComponent.logStep(this.flowStep, TranslationUtils.FlowMoments.Finalized);
|
|
5113
5111
|
}
|
|
5114
5112
|
async verificationFinished() {
|
|
@@ -5210,7 +5208,7 @@ function v4(options, buf, offset) {
|
|
|
5210
5208
|
}
|
|
5211
5209
|
|
|
5212
5210
|
const name = "@ekyc_qoobiss/qbs-ect-cmp";
|
|
5213
|
-
const version$1 = "3.6.
|
|
5211
|
+
const version$1 = "3.6.58";
|
|
5214
5212
|
const description = "Person Identification Component";
|
|
5215
5213
|
const main = "./dist/index.cjs.js";
|
|
5216
5214
|
const module$1 = "./dist/index.js";
|
|
@@ -8813,7 +8811,6 @@ const SelfieCapture = class {
|
|
|
8813
8811
|
this.captureWidth = undefined;
|
|
8814
8812
|
this.captureTaken = false;
|
|
8815
8813
|
this.verified = false;
|
|
8816
|
-
this.cameras = new Cameras();
|
|
8817
8814
|
this.demoEnded = false;
|
|
8818
8815
|
}
|
|
8819
8816
|
eventVideoStarted(event) {
|
|
@@ -8850,7 +8847,7 @@ const SelfieCapture = class {
|
|
|
8850
8847
|
this.openCamera();
|
|
8851
8848
|
}
|
|
8852
8849
|
async openCamera() {
|
|
8853
|
-
const constraints =
|
|
8850
|
+
const constraints = Cameras.GetConstraints('', TranslationUtils.state.device, true);
|
|
8854
8851
|
setTimeout(() => {
|
|
8855
8852
|
navigator.mediaDevices
|
|
8856
8853
|
.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,10 @@ export class IdCapture {
|
|
|
82
80
|
async openCamera() {
|
|
83
81
|
if (store.debug)
|
|
84
82
|
console.log('id-capture | openCamera');
|
|
85
|
-
|
|
83
|
+
if (!store.cameraId) {
|
|
84
|
+
await Cameras.InitCameras(store.device);
|
|
85
|
+
}
|
|
86
|
+
const constraints = Cameras.GetConstraints(store.cameraId, store.device);
|
|
86
87
|
setTimeout(() => {
|
|
87
88
|
navigator.mediaDevices
|
|
88
89
|
.getUserMedia(constraints)
|
|
@@ -119,15 +120,10 @@ export class IdCapture {
|
|
|
119
120
|
if (this.captureTaken)
|
|
120
121
|
return;
|
|
121
122
|
this.captureTaken = true;
|
|
122
|
-
if (
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
this.eventPhotoCapture.emit(res);
|
|
127
|
-
}
|
|
128
|
-
else {
|
|
129
|
-
this.eventTimeElapsed.emit();
|
|
130
|
-
}
|
|
123
|
+
if (store.debug)
|
|
124
|
+
console.log('id-capture | takePhoto | sendingPhoto');
|
|
125
|
+
let res = await Stream.instance.takePhoto();
|
|
126
|
+
this.eventPhotoCapture.emit(res);
|
|
131
127
|
await BaseComponent.logStep(this.flowStep, FlowMoments.Finalized);
|
|
132
128
|
}
|
|
133
129
|
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,10 @@ const IdCapture = class {
|
|
|
5059
5059
|
async openCamera() {
|
|
5060
5060
|
if (state.debug)
|
|
5061
5061
|
console.log('id-capture | openCamera');
|
|
5062
|
-
|
|
5062
|
+
if (!state.cameraId) {
|
|
5063
|
+
await Cameras.InitCameras(state.device);
|
|
5064
|
+
}
|
|
5065
|
+
const constraints = Cameras.GetConstraints(state.cameraId, state.device);
|
|
5063
5066
|
setTimeout(() => {
|
|
5064
5067
|
navigator.mediaDevices
|
|
5065
5068
|
.getUserMedia(constraints)
|
|
@@ -5096,15 +5099,10 @@ const IdCapture = class {
|
|
|
5096
5099
|
if (this.captureTaken)
|
|
5097
5100
|
return;
|
|
5098
5101
|
this.captureTaken = true;
|
|
5099
|
-
if (
|
|
5100
|
-
|
|
5101
|
-
|
|
5102
|
-
|
|
5103
|
-
this.eventPhotoCapture.emit(res);
|
|
5104
|
-
}
|
|
5105
|
-
else {
|
|
5106
|
-
this.eventTimeElapsed.emit();
|
|
5107
|
-
}
|
|
5102
|
+
if (state.debug)
|
|
5103
|
+
console.log('id-capture | takePhoto | sendingPhoto');
|
|
5104
|
+
let res = await Stream.instance.takePhoto();
|
|
5105
|
+
this.eventPhotoCapture.emit(res);
|
|
5108
5106
|
await BaseComponent.logStep(this.flowStep, FlowMoments.Finalized);
|
|
5109
5107
|
}
|
|
5110
5108
|
async verificationFinished() {
|
|
@@ -5206,7 +5204,7 @@ function v4(options, buf, offset) {
|
|
|
5206
5204
|
}
|
|
5207
5205
|
|
|
5208
5206
|
const name = "@ekyc_qoobiss/qbs-ect-cmp";
|
|
5209
|
-
const version$1 = "3.6.
|
|
5207
|
+
const version$1 = "3.6.58";
|
|
5210
5208
|
const description = "Person Identification Component";
|
|
5211
5209
|
const main = "./dist/index.cjs.js";
|
|
5212
5210
|
const module = "./dist/index.js";
|
|
@@ -8809,7 +8807,6 @@ const SelfieCapture = class {
|
|
|
8809
8807
|
this.captureWidth = undefined;
|
|
8810
8808
|
this.captureTaken = false;
|
|
8811
8809
|
this.verified = false;
|
|
8812
|
-
this.cameras = new Cameras();
|
|
8813
8810
|
this.demoEnded = false;
|
|
8814
8811
|
}
|
|
8815
8812
|
eventVideoStarted(event) {
|
|
@@ -8846,7 +8843,7 @@ const SelfieCapture = class {
|
|
|
8846
8843
|
this.openCamera();
|
|
8847
8844
|
}
|
|
8848
8845
|
async openCamera() {
|
|
8849
|
-
const constraints =
|
|
8846
|
+
const constraints = Cameras.GetConstraints('', state.device, true);
|
|
8850
8847
|
setTimeout(() => {
|
|
8851
8848
|
navigator.mediaDevices
|
|
8852
8849
|
.getUserMedia(constraints)
|