@ekyc_qoobiss/qbs-ect-cmp 3.6.55 → 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 +98 -26
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/qbs-ect-cmp.cjs.js +1 -1
- package/dist/collection/components/common/capture-error/capture-error.js +1 -1
- package/dist/collection/components/common/id-capture/id-capture.js +23 -13
- package/dist/collection/components/common/selfie-capture/selfie-capture.js +1 -2
- package/dist/collection/components/controls/camera/camera.js +4 -0
- package/dist/collection/components/flow/process-id/process-id.js +24 -0
- package/dist/collection/components/flow/sms-send/sms-send.js +4 -2
- package/dist/collection/helpers/Cameras.js +11 -7
- package/dist/collection/helpers/Stream.js +28 -0
- package/dist/collection/libs/IDML5Detector/IDML5Detector.js +3 -0
- package/dist/esm/agreement-check_17.entry.js +98 -26
- package/dist/esm/loader.js +1 -1
- package/dist/esm/qbs-ect-cmp.js +1 -1
- package/dist/qbs-ect-cmp/{p-bb06c439.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 -2
- package/dist/types/components/common/selfie-capture/selfie-capture.d.ts +0 -1
- package/dist/types/components/flow/sms-send/sms-send.d.ts +1 -0
- package/dist/types/helpers/Cameras.d.ts +3 -3
- package/package.json +1 -1
|
@@ -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
|
}
|
|
@@ -4415,24 +4417,36 @@ class Stream {
|
|
|
4415
4417
|
this.streamPaused = false;
|
|
4416
4418
|
this.recordedChunks = [];
|
|
4417
4419
|
this.videoSize = { width: 0, height: 0 };
|
|
4420
|
+
if (state.debug)
|
|
4421
|
+
console.log('stream | constructor');
|
|
4418
4422
|
this.initFacePose();
|
|
4419
4423
|
this.idML5Detector = IDML5Detector.getInstance(this, state.device.isMobile);
|
|
4420
4424
|
this.faceML5Detector = FaceML5Detector.getInstance(this, state.device.isMobile);
|
|
4421
4425
|
this.verificationMode = mode;
|
|
4422
4426
|
}
|
|
4423
4427
|
static getNewInstance(mode) {
|
|
4428
|
+
if (state.debug)
|
|
4429
|
+
console.log('stream | getNewInstance');
|
|
4424
4430
|
if (!Stream.instance) {
|
|
4431
|
+
if (state.debug)
|
|
4432
|
+
console.log('stream | getNewInstance | new instance');
|
|
4425
4433
|
Stream.instance = new Stream(mode);
|
|
4426
4434
|
}
|
|
4427
4435
|
return Stream.instance;
|
|
4428
4436
|
}
|
|
4429
4437
|
autoCapturing() {
|
|
4438
|
+
if (state.debug)
|
|
4439
|
+
console.log('stream | autoCapturing');
|
|
4430
4440
|
this.callbackAutoCapturing();
|
|
4431
4441
|
}
|
|
4432
4442
|
timeElapsed() {
|
|
4443
|
+
if (state.debug)
|
|
4444
|
+
console.log('stream | timeElapsed');
|
|
4433
4445
|
this.callbackTimeElapsed();
|
|
4434
4446
|
}
|
|
4435
4447
|
verificationReady() {
|
|
4448
|
+
if (state.debug)
|
|
4449
|
+
console.log('stream | verificationReady');
|
|
4436
4450
|
this.verificationFinished();
|
|
4437
4451
|
}
|
|
4438
4452
|
updateHtmlElements(videoElement, canvasElement, component) {
|
|
@@ -4442,6 +4456,8 @@ class Stream {
|
|
|
4442
4456
|
this.faceML5Detector.updateHtmlElements(this.videoElement, this.canvasElement, component);
|
|
4443
4457
|
}
|
|
4444
4458
|
startStream(stream) {
|
|
4459
|
+
if (state.debug)
|
|
4460
|
+
console.log('stream | startStream');
|
|
4445
4461
|
if (this.stream)
|
|
4446
4462
|
this.stream.getTracks().forEach((track) => track.stop());
|
|
4447
4463
|
this.stream = stream;
|
|
@@ -4473,6 +4489,8 @@ class Stream {
|
|
|
4473
4489
|
this.recordStream();
|
|
4474
4490
|
}
|
|
4475
4491
|
recordStream() {
|
|
4492
|
+
if (state.debug)
|
|
4493
|
+
console.log('stream | recordStream');
|
|
4476
4494
|
if (this.mediaRecorder && this.mediaRecorder.state == 'recording')
|
|
4477
4495
|
return;
|
|
4478
4496
|
var options = { mimeType: Stream.webmMimeType.mime, videoBitsPerSecond: 1500000 };
|
|
@@ -4483,9 +4501,13 @@ class Stream {
|
|
|
4483
4501
|
this.recordedChunks = [];
|
|
4484
4502
|
this.mediaRecorder = new MediaRecorder(this.stream, options);
|
|
4485
4503
|
this.mediaRecorder.ondataavailable = event => {
|
|
4504
|
+
if (state.debug)
|
|
4505
|
+
console.log('stream | recordStream | ondataavailable');
|
|
4486
4506
|
this.recordedChunks.push(event.data);
|
|
4487
4507
|
};
|
|
4488
4508
|
this.mediaRecorder.onstop = _e => {
|
|
4509
|
+
if (state.debug)
|
|
4510
|
+
console.log('stream | recordStream | onstop');
|
|
4489
4511
|
var rec = new Blob(this.recordedChunks, {
|
|
4490
4512
|
type: options.mimeType.split(';')[0],
|
|
4491
4513
|
});
|
|
@@ -4516,6 +4538,8 @@ class Stream {
|
|
|
4516
4538
|
return !(this.stream && this.stream.getTracks && this.stream.getTracks().length > 0);
|
|
4517
4539
|
}
|
|
4518
4540
|
async takePhoto() {
|
|
4541
|
+
if (state.debug)
|
|
4542
|
+
console.log('stream | takePhoto');
|
|
4519
4543
|
const canvas = document.createElement('canvas');
|
|
4520
4544
|
canvas.style.visibility = 'hidden';
|
|
4521
4545
|
canvas.width = this.videoElement.videoWidth;
|
|
@@ -4523,12 +4547,16 @@ class Stream {
|
|
|
4523
4547
|
return await this.getFrame(canvas);
|
|
4524
4548
|
}
|
|
4525
4549
|
getFrame(canvas) {
|
|
4550
|
+
if (state.debug)
|
|
4551
|
+
console.log('stream | getFrame');
|
|
4526
4552
|
return new Promise(resolve => {
|
|
4527
4553
|
const context = canvas.getContext('2d');
|
|
4528
4554
|
context.drawImage(this.videoElement, 0, 0, canvas.width, canvas.height);
|
|
4529
4555
|
canvas.toBlob((frame) => {
|
|
4530
4556
|
if (frame.type === ImageFormat.JPEG && !state.device.isAppleDevice) {
|
|
4531
4557
|
try {
|
|
4558
|
+
if (state.debug)
|
|
4559
|
+
console.log('stream | getFrame | addExifInImg');
|
|
4532
4560
|
addExifInImg(frame, this.stream.getTracks()[0], this.videoSize).then(updatedFrame => resolve(updatedFrame));
|
|
4533
4561
|
}
|
|
4534
4562
|
catch (e) {
|
|
@@ -4537,6 +4565,8 @@ class Stream {
|
|
|
4537
4565
|
}
|
|
4538
4566
|
}
|
|
4539
4567
|
else {
|
|
4568
|
+
if (state.debug)
|
|
4569
|
+
console.log('stream | getFrame | resolve');
|
|
4540
4570
|
resolve(frame);
|
|
4541
4571
|
}
|
|
4542
4572
|
}, ImageFormat.PNG, 1);
|
|
@@ -4596,6 +4626,8 @@ const Camera = class {
|
|
|
4596
4626
|
this.captureMode = undefined;
|
|
4597
4627
|
}
|
|
4598
4628
|
componentDidLoad() {
|
|
4629
|
+
if (state.debug)
|
|
4630
|
+
console.log('camera | componentDidLoad');
|
|
4599
4631
|
this.startStream();
|
|
4600
4632
|
}
|
|
4601
4633
|
render() {
|
|
@@ -4612,6 +4644,8 @@ const Camera = class {
|
|
|
4612
4644
|
return (h("div", { class: "camera" }, h("video", { id: "video", loop: true, autoplay: true, playsinline: true, muted: true, class: cameraVideoClass, ref: el => (this.cameraVideo = el) }), h("canvas", { id: "output", class: cameraCanvasClass, ref: el => (this.cameraCanvas = el) })));
|
|
4613
4645
|
}
|
|
4614
4646
|
startStream() {
|
|
4647
|
+
if (state.debug)
|
|
4648
|
+
console.log('camera | startStream');
|
|
4615
4649
|
let verificationMode = [FlowStatus.IDTILT, FlowStatus.LIVENESSGESTURE].includes(state.flowStatus) ? VerificationMode.Tilt : VerificationMode.Full;
|
|
4616
4650
|
const stream = Stream.getNewInstance(verificationMode);
|
|
4617
4651
|
stream.updateHtmlElements(this.cameraVideo, this.cameraCanvas, this.component);
|
|
@@ -4716,7 +4750,7 @@ const CaptureError = class {
|
|
|
4716
4750
|
this.eventCaptureErrorDone.emit();
|
|
4717
4751
|
}
|
|
4718
4752
|
render() {
|
|
4719
|
-
return (h("div", { class: "container" }, h("div", { class: "row" }, h("h1", { class: "color-red" }, this.titleR1), h("h1", { class: "color-red" }, this.titleR2), h("div", null, h("p", { class: "color-red font-weight-bold font-size-25 mt-5" }, this.
|
|
4753
|
+
return (h("div", { class: "container" }, h("div", { class: "row" }, h("h1", { class: "color-red" }, this.titleR1), h("h1", { class: "color-red" }, this.titleR2), h("div", null, h("p", { class: "color-red font-weight-bold font-size-25 mt-5" }, this.descriptionR1), h("p", { class: "color-red font-weight-bold font-size-25 mt-5" }, this.descriptionR2), h("p", { class: "font-size-1" }, this.reason)), h("div", { class: "pos-relative show-bottom" }, h("div", { class: "btn-buletin" }, h("button", { class: "main-button", type: "button", disabled: !this.buttonEnabled, onClick: () => this.buttonClick() }, this.buttonText), h("p", { class: "main-text font-size-18 text-right mb-0" }, this.translations.GlobalValues.FooterText))))));
|
|
4720
4754
|
}
|
|
4721
4755
|
};
|
|
4722
4756
|
CaptureError.style = captureErrorCss;
|
|
@@ -4802,7 +4836,7 @@ const HowToInfo = class {
|
|
|
4802
4836
|
HowToInfo.style = howToInfoCss;
|
|
4803
4837
|
|
|
4804
4838
|
class Cameras {
|
|
4805
|
-
async GetCameras(deviceInfo) {
|
|
4839
|
+
static async GetCameras(deviceInfo) {
|
|
4806
4840
|
var allDevices = [];
|
|
4807
4841
|
const devices = await navigator.mediaDevices.enumerateDevices();
|
|
4808
4842
|
const videoDevices = devices.filter(device => device.kind === 'videoinput');
|
|
@@ -4865,7 +4899,7 @@ class Cameras {
|
|
|
4865
4899
|
}
|
|
4866
4900
|
return allDevices;
|
|
4867
4901
|
}
|
|
4868
|
-
GetConstraints(selectedDeviceId, device, portrait = false, audio = true) {
|
|
4902
|
+
static GetConstraints(selectedDeviceId, device, portrait = false, audio = true) {
|
|
4869
4903
|
let constraints = {
|
|
4870
4904
|
audio: audio,
|
|
4871
4905
|
};
|
|
@@ -4901,7 +4935,7 @@ class Cameras {
|
|
|
4901
4935
|
constraints.video = mediaTrack;
|
|
4902
4936
|
return constraints;
|
|
4903
4937
|
}
|
|
4904
|
-
GetRecommendedCamera(cameras) {
|
|
4938
|
+
static GetRecommendedCamera(cameras) {
|
|
4905
4939
|
if (cameras && cameras.length > 0) {
|
|
4906
4940
|
var recommDevice = cameras.find(c => c.recommended);
|
|
4907
4941
|
if (recommDevice) {
|
|
@@ -4911,12 +4945,16 @@ class Cameras {
|
|
|
4911
4945
|
return null;
|
|
4912
4946
|
}
|
|
4913
4947
|
static async InitCameras(device) {
|
|
4948
|
+
if (state.debug)
|
|
4949
|
+
console.log('cameras | initCameras');
|
|
4914
4950
|
try {
|
|
4915
|
-
let
|
|
4916
|
-
let
|
|
4917
|
-
var recommCamera =
|
|
4918
|
-
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);
|
|
4919
4955
|
state.cameraId = recommCamera === null || recommCamera === void 0 ? void 0 : recommCamera.deviceId;
|
|
4956
|
+
if (state.debug)
|
|
4957
|
+
console.log(`cameras | initCameras | cameraIds ${state.cameraIds} | cameraId ${state.cameraId}`);
|
|
4920
4958
|
return true;
|
|
4921
4959
|
}
|
|
4922
4960
|
catch (e) {
|
|
@@ -4951,15 +4989,11 @@ var IDPose;
|
|
|
4951
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)}";
|
|
4952
4990
|
|
|
4953
4991
|
const IdCapture = class {
|
|
4954
|
-
// @State() private animationPath: string;
|
|
4955
4992
|
constructor(hostRef) {
|
|
4956
4993
|
registerInstance(this, hostRef);
|
|
4957
4994
|
this.eventPhotoCapture = createEvent(this, "photoIdCapture", 7);
|
|
4958
4995
|
this.apiErrorEvent = createEvent(this, "apiError", 7);
|
|
4959
4996
|
this.eventTimeElapsed = createEvent(this, "timeElapsed", 7);
|
|
4960
|
-
this.photoIsReady = (photos) => {
|
|
4961
|
-
this.eventPhotoCapture.emit(photos);
|
|
4962
|
-
};
|
|
4963
4997
|
this.videoStarted = undefined;
|
|
4964
4998
|
this.cameraSize = undefined;
|
|
4965
4999
|
this.captureTaken = undefined;
|
|
@@ -4969,7 +5003,6 @@ const IdCapture = class {
|
|
|
4969
5003
|
this.demoVideo = undefined;
|
|
4970
5004
|
this.captureTaken = false;
|
|
4971
5005
|
this.verified = false;
|
|
4972
|
-
this.cameras = new Cameras();
|
|
4973
5006
|
this.showDemo = true;
|
|
4974
5007
|
}
|
|
4975
5008
|
eventVideoStarted(event) {
|
|
@@ -4977,12 +5010,16 @@ const IdCapture = class {
|
|
|
4977
5010
|
this.cameraSize = event.detail;
|
|
4978
5011
|
}
|
|
4979
5012
|
async componentWillLoad() {
|
|
5013
|
+
if (state.debug)
|
|
5014
|
+
console.log('id-capture | componentWillLoad');
|
|
4980
5015
|
this.translations = await Translations.getValues();
|
|
4981
5016
|
if (!navigator.mediaDevices) {
|
|
4982
5017
|
this.apiErrorEvent.emit({ message: 'This browser does not support webRTC' });
|
|
4983
5018
|
}
|
|
4984
5019
|
}
|
|
4985
5020
|
initVariables() {
|
|
5021
|
+
if (state.debug)
|
|
5022
|
+
console.log('id-capture | initVariables');
|
|
4986
5023
|
if (state.flowStatus == FlowStatus.IDFRONT) {
|
|
4987
5024
|
this.pose = IDPose.Straight;
|
|
4988
5025
|
this.flowStep = FlowSteps.CiFrontCapture;
|
|
@@ -5003,6 +5040,8 @@ const IdCapture = class {
|
|
|
5003
5040
|
}
|
|
5004
5041
|
}
|
|
5005
5042
|
async componentDidLoad() {
|
|
5043
|
+
if (state.debug)
|
|
5044
|
+
console.log('id-capture | componentDidLoad');
|
|
5006
5045
|
this.initVariables();
|
|
5007
5046
|
await BaseComponent.logStep(this.flowStep, FlowMoments.Initialized);
|
|
5008
5047
|
if (state.flowStatus == FlowStatus.IDBACK) {
|
|
@@ -5018,11 +5057,15 @@ const IdCapture = class {
|
|
|
5018
5057
|
this.openCamera();
|
|
5019
5058
|
}
|
|
5020
5059
|
async openCamera() {
|
|
5021
|
-
|
|
5060
|
+
if (state.debug)
|
|
5061
|
+
console.log('id-capture | openCamera');
|
|
5062
|
+
const constraints = Cameras.GetConstraints(state.cameraId, state.device);
|
|
5022
5063
|
setTimeout(() => {
|
|
5023
5064
|
navigator.mediaDevices
|
|
5024
5065
|
.getUserMedia(constraints)
|
|
5025
5066
|
.then(stream => {
|
|
5067
|
+
if (state.debug)
|
|
5068
|
+
console.log('id-capture | openCamera | streamObtained');
|
|
5026
5069
|
const superStream = Stream.getNewInstance(this.verificationMode);
|
|
5027
5070
|
superStream.initStream(stream);
|
|
5028
5071
|
})
|
|
@@ -5033,30 +5076,35 @@ const IdCapture = class {
|
|
|
5033
5076
|
}, 100);
|
|
5034
5077
|
}
|
|
5035
5078
|
closeCamera() {
|
|
5079
|
+
if (state.debug)
|
|
5080
|
+
console.log('id-capture | closeCamera');
|
|
5036
5081
|
if (Stream.instance) {
|
|
5037
5082
|
Stream.instance.dropStream();
|
|
5038
5083
|
}
|
|
5039
5084
|
}
|
|
5040
5085
|
disconnectedCallback() {
|
|
5086
|
+
if (state.debug)
|
|
5087
|
+
console.log('id-capture | disconnectedCallback');
|
|
5041
5088
|
this.closeCamera();
|
|
5042
5089
|
Stream.instance = null;
|
|
5043
5090
|
IDML5Detector.instance = null;
|
|
5044
5091
|
FaceML5Detector.instance = null;
|
|
5045
5092
|
}
|
|
5046
5093
|
async takePhoto() {
|
|
5094
|
+
if (state.debug)
|
|
5095
|
+
console.log('id-capture | takePhoto');
|
|
5047
5096
|
if (this.captureTaken)
|
|
5048
5097
|
return;
|
|
5049
5098
|
this.captureTaken = true;
|
|
5050
|
-
if (
|
|
5051
|
-
|
|
5052
|
-
|
|
5053
|
-
|
|
5054
|
-
else {
|
|
5055
|
-
this.eventTimeElapsed.emit();
|
|
5056
|
-
}
|
|
5099
|
+
if (state.debug)
|
|
5100
|
+
console.log('id-capture | takePhoto | sendingPhoto');
|
|
5101
|
+
let res = await Stream.instance.takePhoto();
|
|
5102
|
+
this.eventPhotoCapture.emit(res);
|
|
5057
5103
|
await BaseComponent.logStep(this.flowStep, FlowMoments.Finalized);
|
|
5058
5104
|
}
|
|
5059
5105
|
async verificationFinished() {
|
|
5106
|
+
if (state.debug)
|
|
5107
|
+
console.log('id-capture | verificationFinished');
|
|
5060
5108
|
if (this.verified)
|
|
5061
5109
|
return;
|
|
5062
5110
|
this.verified = true;
|
|
@@ -5153,7 +5201,7 @@ function v4(options, buf, offset) {
|
|
|
5153
5201
|
}
|
|
5154
5202
|
|
|
5155
5203
|
const name = "@ekyc_qoobiss/qbs-ect-cmp";
|
|
5156
|
-
const version$1 = "3.6.
|
|
5204
|
+
const version$1 = "3.6.57";
|
|
5157
5205
|
const description = "Person Identification Component";
|
|
5158
5206
|
const main = "./dist/index.cjs.js";
|
|
5159
5207
|
const module = "./dist/index.js";
|
|
@@ -8612,6 +8660,8 @@ const ProcessId = class {
|
|
|
8612
8660
|
howToDone: false,
|
|
8613
8661
|
};
|
|
8614
8662
|
}
|
|
8663
|
+
if (state.debug)
|
|
8664
|
+
console.log('process-id | initFlow');
|
|
8615
8665
|
}
|
|
8616
8666
|
howToDone() {
|
|
8617
8667
|
this.flow.howToDone = true;
|
|
@@ -8629,8 +8679,12 @@ const ProcessId = class {
|
|
|
8629
8679
|
}
|
|
8630
8680
|
}
|
|
8631
8681
|
async captureIdImage(event) {
|
|
8682
|
+
if (state.debug)
|
|
8683
|
+
console.log('process-id | captureIdImage');
|
|
8632
8684
|
let idPhoto = event.detail;
|
|
8633
8685
|
if (idPhoto.size == 0) {
|
|
8686
|
+
if (state.debug)
|
|
8687
|
+
console.log('process-id | captureIdImage | Empty id photo');
|
|
8634
8688
|
await ApiCall.instance.AddLog({ message: 'Empty id photo', blobData: idPhoto }, getLogMessage());
|
|
8635
8689
|
this.triggerErrorFlow();
|
|
8636
8690
|
return;
|
|
@@ -8638,6 +8692,8 @@ const ProcessId = class {
|
|
|
8638
8692
|
try {
|
|
8639
8693
|
let frontCapture = new File([idPhoto], this.flow.capture.fileName, { type: 'image/png' });
|
|
8640
8694
|
var uploadResult = await ApiCall.instance.UploadFileForRequestB64(state.requestId, this.flow.capture.photoType, frontCapture);
|
|
8695
|
+
if (state.debug)
|
|
8696
|
+
console.log('process-id | captureIdImage | uploadResult: ' + uploadResult);
|
|
8641
8697
|
if (!uploadResult) {
|
|
8642
8698
|
this.switchCamera();
|
|
8643
8699
|
this.triggerErrorFlow();
|
|
@@ -8648,12 +8704,16 @@ const ProcessId = class {
|
|
|
8648
8704
|
}
|
|
8649
8705
|
}
|
|
8650
8706
|
async capturedIdRecording(event) {
|
|
8707
|
+
if (state.debug)
|
|
8708
|
+
console.log('process-id | capturedIdRecording');
|
|
8651
8709
|
let idRecording = event.detail;
|
|
8652
8710
|
if (idRecording.size == 0 && this.recordingResultCount == 0) {
|
|
8653
8711
|
this.recordingResultCount++;
|
|
8654
8712
|
return;
|
|
8655
8713
|
}
|
|
8656
8714
|
if (idRecording.size == 0) {
|
|
8715
|
+
if (state.debug)
|
|
8716
|
+
console.log('process-id | capturedIdRecording | Empty ID recording');
|
|
8657
8717
|
await ApiCall.instance.AddLog({ message: 'Empty ID recording', blobData: idRecording }, getLogMessage());
|
|
8658
8718
|
this.triggerErrorFlow();
|
|
8659
8719
|
return;
|
|
@@ -8661,12 +8721,16 @@ const ProcessId = class {
|
|
|
8661
8721
|
let mimeType = idRecording.type == Stream.mp4MimeType.type ? Stream.mp4MimeType : Stream.webmMimeType;
|
|
8662
8722
|
let captureRec = new File([idRecording], this.flow.capture.recName + mimeType.extension, { type: mimeType.type });
|
|
8663
8723
|
var uploadResult = await ApiCall.instance.UploadFileForRequestB64(state.requestId, this.flow.capture.recType, captureRec);
|
|
8724
|
+
if (state.debug)
|
|
8725
|
+
console.log('process-id | capturedIdRecording | uploadResult: ' + uploadResult);
|
|
8664
8726
|
if (!uploadResult) {
|
|
8665
8727
|
this.triggerErrorFlow();
|
|
8666
8728
|
}
|
|
8667
8729
|
this.recordingResultCount = 0;
|
|
8668
8730
|
}
|
|
8669
8731
|
async verificationFinished() {
|
|
8732
|
+
if (state.debug)
|
|
8733
|
+
console.log('process-id | verificationFinished');
|
|
8670
8734
|
this.verificationReceived = Date.now();
|
|
8671
8735
|
while (Date.now() - this.verificationReceived < 25000) {
|
|
8672
8736
|
await delay(2000);
|
|
@@ -8676,9 +8740,13 @@ const ProcessId = class {
|
|
|
8676
8740
|
break;
|
|
8677
8741
|
}
|
|
8678
8742
|
}
|
|
8743
|
+
if (state.debug)
|
|
8744
|
+
console.log('process-id | verificationFinished | waitingFinished ');
|
|
8679
8745
|
this.triggerErrorFlow();
|
|
8680
8746
|
}
|
|
8681
8747
|
async componentDidLoad() {
|
|
8748
|
+
if (state.debug)
|
|
8749
|
+
console.log('process-id | componentDidLoad');
|
|
8682
8750
|
await BaseComponent.initialize(this.currentStep);
|
|
8683
8751
|
}
|
|
8684
8752
|
triggerErrorFlow() {
|
|
@@ -8686,9 +8754,13 @@ const ProcessId = class {
|
|
|
8686
8754
|
this.showInvalid = true;
|
|
8687
8755
|
}
|
|
8688
8756
|
async disconnectedCallback() {
|
|
8757
|
+
if (state.debug)
|
|
8758
|
+
console.log('process-id | disconnectedCallback');
|
|
8689
8759
|
await BaseComponent.finalize(this.currentStep);
|
|
8690
8760
|
}
|
|
8691
8761
|
switchCamera() {
|
|
8762
|
+
if (state.debug)
|
|
8763
|
+
console.log('process-id | switchCamera');
|
|
8692
8764
|
if (this.captureRetryCount == 1) {
|
|
8693
8765
|
Cameras.switchCamera();
|
|
8694
8766
|
this.captureRetryCount = 0;
|
|
@@ -8732,7 +8804,6 @@ const SelfieCapture = class {
|
|
|
8732
8804
|
this.captureWidth = undefined;
|
|
8733
8805
|
this.captureTaken = false;
|
|
8734
8806
|
this.verified = false;
|
|
8735
|
-
this.cameras = new Cameras();
|
|
8736
8807
|
this.demoEnded = false;
|
|
8737
8808
|
}
|
|
8738
8809
|
eventVideoStarted(event) {
|
|
@@ -8769,7 +8840,7 @@ const SelfieCapture = class {
|
|
|
8769
8840
|
this.openCamera();
|
|
8770
8841
|
}
|
|
8771
8842
|
async openCamera() {
|
|
8772
|
-
const constraints =
|
|
8843
|
+
const constraints = Cameras.GetConstraints('', state.device, true);
|
|
8773
8844
|
setTimeout(() => {
|
|
8774
8845
|
navigator.mediaDevices
|
|
8775
8846
|
.getUserMedia(constraints)
|
|
@@ -8884,7 +8955,7 @@ SmsCodeValidation.style = smsCodeValidationCss;
|
|
|
8884
8955
|
const smsSendCss = "";
|
|
8885
8956
|
|
|
8886
8957
|
const SmsSend = class {
|
|
8887
|
-
constructor(hostRef) { registerInstance(this, hostRef); this.apiErrorEvent = createEvent(this, "apiError", 7); this.buttonText = undefined; this.title = undefined; this.phoneNumber = undefined; this.prefilledPhone = false; this.canSend = false; }
|
|
8958
|
+
constructor(hostRef) { registerInstance(this, hostRef); this.apiErrorEvent = createEvent(this, "apiError", 7); this.buttonText = undefined; this.title = undefined; this.details = undefined; this.phoneNumber = undefined; this.prefilledPhone = false; this.canSend = false; }
|
|
8888
8959
|
async doAction() {
|
|
8889
8960
|
try {
|
|
8890
8961
|
this.canSend = false;
|
|
@@ -8904,6 +8975,7 @@ const SmsSend = class {
|
|
|
8904
8975
|
this.translations = await Translations.getValues();
|
|
8905
8976
|
this.buttonText = this.translations.PhoneValidationValues.Button;
|
|
8906
8977
|
this.title = this.translations.PhoneValidationValues.Title;
|
|
8978
|
+
this.details = this.translations.PhoneValidationValues.Description;
|
|
8907
8979
|
if (state.phoneNumber && state.phoneNumber != '') {
|
|
8908
8980
|
this.phoneNumber = state.phoneNumber;
|
|
8909
8981
|
this.prefilledPhone = true;
|
|
@@ -8922,7 +8994,7 @@ const SmsSend = class {
|
|
|
8922
8994
|
ev.target.value = this.phoneNumber;
|
|
8923
8995
|
}
|
|
8924
8996
|
render() {
|
|
8925
|
-
return (h("div", { class: "container" }, h("div", { class: "row row-validare" }, h("div", null, h("h1", { class: "text-center" }, this.title)), h("div", { class: "input-container mb-15" }, h("label", { class: "font-size-18 mb-1" }, h("b", null, this.translations.PhoneValidationValues.Label)), h("input", { type: "tel", id: "phoneInput", class: "main-input", disabled: this.prefilledPhone, onInput: ev => this.handleChangePhone(ev), value: this.phoneNumber })), h("div", { class: "pos-relative show-bottom" }, h("div", { class: "btn-buletin" }, h("button", { id: "action", disabled: !this.canSend, class: "main-button", onClick: () => this.doAction() }, this.buttonText), h("p", { class: "main-text font-size-18 text-right mb-0" }, this.translations.GlobalValues.FooterText))))));
|
|
8997
|
+
return (h("div", { class: "container" }, h("div", { class: "row row-validare" }, h("div", null, h("h1", { class: "text-center" }, this.title), h("p", { class: "main-text font-size-2 mt-15 mb-20 text-center" }, this.details)), h("div", { class: "input-container mb-15" }, h("label", { class: "font-size-18 mb-1" }, h("b", null, this.translations.PhoneValidationValues.Label)), h("input", { type: "tel", id: "phoneInput", class: "main-input", disabled: this.prefilledPhone, onInput: ev => this.handleChangePhone(ev), value: this.phoneNumber })), h("div", { class: "pos-relative show-bottom" }, h("div", { class: "btn-buletin" }, h("button", { id: "action", disabled: !this.canSend, class: "main-button", onClick: () => this.doAction() }, this.buttonText), h("p", { class: "main-text font-size-18 text-right mb-0" }, this.translations.GlobalValues.FooterText))))));
|
|
8926
8998
|
}
|
|
8927
8999
|
};
|
|
8928
9000
|
SmsSend.style = smsSendCss;
|
package/dist/esm/loader.js
CHANGED
|
@@ -11,7 +11,7 @@ const patchEsm = () => {
|
|
|
11
11
|
const defineCustomElements = (win, options) => {
|
|
12
12
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
13
13
|
return patchEsm().then(() => {
|
|
14
|
-
return bootstrapLazy([["loader-dots",[[1,"loader-dots"]]],["random-actions",[[0,"random-actions"]]],["agreement-check_17",[[1,"identification-component",{"token":[1537],"order_id":[1537],"api_url":[1537],"env":[1537],"redirect_id":[1537],"phone_number":[1537],"lang_iso":[1537],"errorMessage":[32],"errorTitle":[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"],[0,"apiError","apiErrorEmitter"],[9,"scroll","handleScroll"]]],[0,"process-id",{"mode":[1],"showTimeout":[32],"showInvalid":[32],"flow":[32]},[[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoIdCapture","captureIdImage"],[0,"recordingIdCapture","capturedIdRecording"],[0,"verificationFinished","verificationFinished"]]],[0,"user-liveness",{"mode":[1],"showError":[32],"showTimeout":[32],"flow":[32],"howToDone":[32]},[[0,"howToInfoDone","howToDoneEvent"],[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoSelfieCapture","captureSelfieImage"],[0,"recordingSelfieCapture","capturedSelfieRecording"],[0,"verificationFinished","verificationFinished"]]],[0,"agreement-info",{"agreementsChecked":[32],"termsChecked":[32],"openAgreements":[32],"openTerms":[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"]]],[0,"camera-error",{"title":[32],"description":[32],"buttonDisabled":[32],"demoVideo":[32]}],[0,"end-redirect"],[0,"error-end",{"message":[1],"errorTitle":[1,"error-title"]}],[0,"landing-validation",{"warningText":[32],"buttonDisabled":[32]}],[0,"mobile-redirect",{"infoTextTop":[32],"infoTextBottom":[32],"contact":[32],"invalidValue":[32],"waitingMobile":[32],"orderStatus":[32],"redirectLink":[32],"qrCode":[32],"prefilledPhone":[32]}],[0,"sms-code-validation",{"title":[32],"details":[32],"buttonText":[32],"code":[32],"canSend":[32]}],[0,"sms-send",{"buttonText":[32],"title":[32],"phoneNumber":[32],"prefilledPhone":[32],"canSend":[32]}],[0,"id-capture",{"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"showDemo":[32],"demoVideo":[32]},[[0,"videoStarted","eventVideoStarted"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"selfie-capture",{"videoStarted":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"demoEnded":[32],"demoVideo":[32],"captureHeight":[32],"captureWidth":[32]},[[0,"videoStarted","eventVideoStarted"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"agreement-check",{"agreementType":[1,"agreement-type"],"htmlContent":[32],"buttonEnabled":[32],"scrollClass":[32]}],[0,"capture-error",{"type":[1],"reason":[1],"buttonEnabled":[32],"buttonText":[32]}],[0,"how-to-info",{"topTitle":[32],"subTitle":[32],"imagePath":[32],"buttonText":[32],"buttonEnabled":[32]}],[0,"camera-comp",{"modelPath":[1,"model-path"],"probabilityThreshold":[2,"probability-threshold"],"captureMode":[1,"capture-mode"]}]]]], options);
|
|
14
|
+
return bootstrapLazy([["loader-dots",[[1,"loader-dots"]]],["random-actions",[[0,"random-actions"]]],["agreement-check_17",[[1,"identification-component",{"token":[1537],"order_id":[1537],"api_url":[1537],"env":[1537],"redirect_id":[1537],"phone_number":[1537],"lang_iso":[1537],"errorMessage":[32],"errorTitle":[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"],[0,"apiError","apiErrorEmitter"],[9,"scroll","handleScroll"]]],[0,"process-id",{"mode":[1],"showTimeout":[32],"showInvalid":[32],"flow":[32]},[[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoIdCapture","captureIdImage"],[0,"recordingIdCapture","capturedIdRecording"],[0,"verificationFinished","verificationFinished"]]],[0,"user-liveness",{"mode":[1],"showError":[32],"showTimeout":[32],"flow":[32],"howToDone":[32]},[[0,"howToInfoDone","howToDoneEvent"],[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoSelfieCapture","captureSelfieImage"],[0,"recordingSelfieCapture","capturedSelfieRecording"],[0,"verificationFinished","verificationFinished"]]],[0,"agreement-info",{"agreementsChecked":[32],"termsChecked":[32],"openAgreements":[32],"openTerms":[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"]]],[0,"camera-error",{"title":[32],"description":[32],"buttonDisabled":[32],"demoVideo":[32]}],[0,"end-redirect"],[0,"error-end",{"message":[1],"errorTitle":[1,"error-title"]}],[0,"landing-validation",{"warningText":[32],"buttonDisabled":[32]}],[0,"mobile-redirect",{"infoTextTop":[32],"infoTextBottom":[32],"contact":[32],"invalidValue":[32],"waitingMobile":[32],"orderStatus":[32],"redirectLink":[32],"qrCode":[32],"prefilledPhone":[32]}],[0,"sms-code-validation",{"title":[32],"details":[32],"buttonText":[32],"code":[32],"canSend":[32]}],[0,"sms-send",{"buttonText":[32],"title":[32],"details":[32],"phoneNumber":[32],"prefilledPhone":[32],"canSend":[32]}],[0,"id-capture",{"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"showDemo":[32],"demoVideo":[32]},[[0,"videoStarted","eventVideoStarted"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"selfie-capture",{"videoStarted":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"demoEnded":[32],"demoVideo":[32],"captureHeight":[32],"captureWidth":[32]},[[0,"videoStarted","eventVideoStarted"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"agreement-check",{"agreementType":[1,"agreement-type"],"htmlContent":[32],"buttonEnabled":[32],"scrollClass":[32]}],[0,"capture-error",{"type":[1],"reason":[1],"buttonEnabled":[32],"buttonText":[32]}],[0,"how-to-info",{"topTitle":[32],"subTitle":[32],"imagePath":[32],"buttonText":[32],"buttonEnabled":[32]}],[0,"camera-comp",{"modelPath":[1,"model-path"],"probabilityThreshold":[2,"probability-threshold"],"captureMode":[1,"capture-mode"]}]]]], options);
|
|
15
15
|
});
|
|
16
16
|
};
|
|
17
17
|
|
package/dist/esm/qbs-ect-cmp.js
CHANGED
|
@@ -14,5 +14,5 @@ const patchBrowser = () => {
|
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
patchBrowser().then(options => {
|
|
17
|
-
return bootstrapLazy([["loader-dots",[[1,"loader-dots"]]],["random-actions",[[0,"random-actions"]]],["agreement-check_17",[[1,"identification-component",{"token":[1537],"order_id":[1537],"api_url":[1537],"env":[1537],"redirect_id":[1537],"phone_number":[1537],"lang_iso":[1537],"errorMessage":[32],"errorTitle":[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"],[0,"apiError","apiErrorEmitter"],[9,"scroll","handleScroll"]]],[0,"process-id",{"mode":[1],"showTimeout":[32],"showInvalid":[32],"flow":[32]},[[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoIdCapture","captureIdImage"],[0,"recordingIdCapture","capturedIdRecording"],[0,"verificationFinished","verificationFinished"]]],[0,"user-liveness",{"mode":[1],"showError":[32],"showTimeout":[32],"flow":[32],"howToDone":[32]},[[0,"howToInfoDone","howToDoneEvent"],[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoSelfieCapture","captureSelfieImage"],[0,"recordingSelfieCapture","capturedSelfieRecording"],[0,"verificationFinished","verificationFinished"]]],[0,"agreement-info",{"agreementsChecked":[32],"termsChecked":[32],"openAgreements":[32],"openTerms":[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"]]],[0,"camera-error",{"title":[32],"description":[32],"buttonDisabled":[32],"demoVideo":[32]}],[0,"end-redirect"],[0,"error-end",{"message":[1],"errorTitle":[1,"error-title"]}],[0,"landing-validation",{"warningText":[32],"buttonDisabled":[32]}],[0,"mobile-redirect",{"infoTextTop":[32],"infoTextBottom":[32],"contact":[32],"invalidValue":[32],"waitingMobile":[32],"orderStatus":[32],"redirectLink":[32],"qrCode":[32],"prefilledPhone":[32]}],[0,"sms-code-validation",{"title":[32],"details":[32],"buttonText":[32],"code":[32],"canSend":[32]}],[0,"sms-send",{"buttonText":[32],"title":[32],"phoneNumber":[32],"prefilledPhone":[32],"canSend":[32]}],[0,"id-capture",{"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"showDemo":[32],"demoVideo":[32]},[[0,"videoStarted","eventVideoStarted"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"selfie-capture",{"videoStarted":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"demoEnded":[32],"demoVideo":[32],"captureHeight":[32],"captureWidth":[32]},[[0,"videoStarted","eventVideoStarted"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"agreement-check",{"agreementType":[1,"agreement-type"],"htmlContent":[32],"buttonEnabled":[32],"scrollClass":[32]}],[0,"capture-error",{"type":[1],"reason":[1],"buttonEnabled":[32],"buttonText":[32]}],[0,"how-to-info",{"topTitle":[32],"subTitle":[32],"imagePath":[32],"buttonText":[32],"buttonEnabled":[32]}],[0,"camera-comp",{"modelPath":[1,"model-path"],"probabilityThreshold":[2,"probability-threshold"],"captureMode":[1,"capture-mode"]}]]]], options);
|
|
17
|
+
return bootstrapLazy([["loader-dots",[[1,"loader-dots"]]],["random-actions",[[0,"random-actions"]]],["agreement-check_17",[[1,"identification-component",{"token":[1537],"order_id":[1537],"api_url":[1537],"env":[1537],"redirect_id":[1537],"phone_number":[1537],"lang_iso":[1537],"errorMessage":[32],"errorTitle":[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"],[0,"apiError","apiErrorEmitter"],[9,"scroll","handleScroll"]]],[0,"process-id",{"mode":[1],"showTimeout":[32],"showInvalid":[32],"flow":[32]},[[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoIdCapture","captureIdImage"],[0,"recordingIdCapture","capturedIdRecording"],[0,"verificationFinished","verificationFinished"]]],[0,"user-liveness",{"mode":[1],"showError":[32],"showTimeout":[32],"flow":[32],"howToDone":[32]},[[0,"howToInfoDone","howToDoneEvent"],[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoSelfieCapture","captureSelfieImage"],[0,"recordingSelfieCapture","capturedSelfieRecording"],[0,"verificationFinished","verificationFinished"]]],[0,"agreement-info",{"agreementsChecked":[32],"termsChecked":[32],"openAgreements":[32],"openTerms":[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"]]],[0,"camera-error",{"title":[32],"description":[32],"buttonDisabled":[32],"demoVideo":[32]}],[0,"end-redirect"],[0,"error-end",{"message":[1],"errorTitle":[1,"error-title"]}],[0,"landing-validation",{"warningText":[32],"buttonDisabled":[32]}],[0,"mobile-redirect",{"infoTextTop":[32],"infoTextBottom":[32],"contact":[32],"invalidValue":[32],"waitingMobile":[32],"orderStatus":[32],"redirectLink":[32],"qrCode":[32],"prefilledPhone":[32]}],[0,"sms-code-validation",{"title":[32],"details":[32],"buttonText":[32],"code":[32],"canSend":[32]}],[0,"sms-send",{"buttonText":[32],"title":[32],"details":[32],"phoneNumber":[32],"prefilledPhone":[32],"canSend":[32]}],[0,"id-capture",{"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"showDemo":[32],"demoVideo":[32]},[[0,"videoStarted","eventVideoStarted"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"selfie-capture",{"videoStarted":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"demoEnded":[32],"demoVideo":[32],"captureHeight":[32],"captureWidth":[32]},[[0,"videoStarted","eventVideoStarted"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"agreement-check",{"agreementType":[1,"agreement-type"],"htmlContent":[32],"buttonEnabled":[32],"scrollClass":[32]}],[0,"capture-error",{"type":[1],"reason":[1],"buttonEnabled":[32],"buttonText":[32]}],[0,"how-to-info",{"topTitle":[32],"subTitle":[32],"imagePath":[32],"buttonText":[32],"buttonEnabled":[32]}],[0,"camera-comp",{"modelPath":[1,"model-path"],"probabilityThreshold":[2,"probability-threshold"],"captureMode":[1,"capture-mode"]}]]]], options);
|
|
18
18
|
});
|