@ekyc_qoobiss/qbs-ect-cmp 3.6.12 → 3.6.14
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/{Stream-f03c722d.js → Stream-097bd1e9.js} +5 -6
- package/dist/cjs/agreement-check_18.cjs.entry.js +31 -62
- package/dist/cjs/id-double-side.cjs.entry.js +1 -1
- package/dist/cjs/id-single-side.cjs.entry.js +1 -1
- package/dist/collection/components/flow/process-id/process-id.js +25 -60
- package/dist/collection/helpers/ApiCall.js +1 -1
- package/dist/collection/helpers/Stream.js +4 -5
- package/dist/collection/models/CaptureFlow.js +4 -0
- package/dist/esm/{Stream-9d2f3b4a.js → Stream-d1fb2210.js} +5 -6
- package/dist/esm/agreement-check_18.entry.js +31 -62
- package/dist/esm/id-double-side.entry.js +1 -1
- package/dist/esm/id-single-side.entry.js +1 -1
- package/dist/qbs-ect-cmp/{p-85ffa9cc.entry.js → p-04e51eac.entry.js} +1 -1
- package/dist/qbs-ect-cmp/{p-369f99a9.js → p-73a2e58b.js} +2 -2
- package/dist/qbs-ect-cmp/{p-a3317fe7.entry.js → p-deea462b.entry.js} +1 -1
- package/dist/qbs-ect-cmp/{p-e641a6c6.entry.js → p-f84883f8.entry.js} +1 -1
- package/dist/qbs-ect-cmp/qbs-ect-cmp.esm.js +1 -1
- package/dist/types/components/controls/camera/camera.d.ts +2 -3
- package/dist/types/components/flow/process-id/process-id.d.ts +0 -1
- package/dist/types/helpers/Stream.d.ts +1 -2
- package/dist/types/models/CaptureFlow.d.ts +7 -5
- package/package.json +1 -1
- package/dist/collection/models/IRecordingCallback.js +0 -1
- package/dist/types/models/IRecordingCallback.d.ts +0 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h } from './index-5d6f9123.js';
|
|
2
|
-
import { B as BaseComponent, F as FlowSteps, l as getLogMessage, s as state, c as FlowStatus, S as Stream } from './Stream-
|
|
2
|
+
import { B as BaseComponent, F as FlowSteps, l as getLogMessage, s as state, c as FlowStatus, S as Stream } from './Stream-d1fb2210.js';
|
|
3
3
|
|
|
4
4
|
const idDoubleSideCss = "";
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h } from './index-5d6f9123.js';
|
|
2
|
-
import { B as BaseComponent, F as FlowSteps, l as getLogMessage, s as state, c as FlowStatus, S as Stream } from './Stream-
|
|
2
|
+
import { B as BaseComponent, F as FlowSteps, l as getLogMessage, s as state, c as FlowStatus, S as Stream } from './Stream-d1fb2210.js';
|
|
3
3
|
|
|
4
4
|
const idSingleSideCss = "";
|
|
5
5
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,c as t,h as s}from"./p-aacd7024.js";import{B as h,F as a,l as e,s as o,c as d,S as r}from"./p-
|
|
1
|
+
import{r as i,c as t,h as s}from"./p-aacd7024.js";import{B as h,F as a,l as e,s as o,c as d,S as r}from"./p-73a2e58b.js";const n=class{constructor(s){i(this,s),this.apiErrorEvent=t(this,"apiError",7),this.recordingResultCount=0,this.showTimeout=void 0,this.showInvalid=void 0,this.showHowTo=void 0,this.front=void 0,this.flow={photoDone:!1,recordingDone:!1,verificationFinished:!1,photoFile:null,photoFileName:"",photoUploadType:"",recordingFile:null,recordingFileName:"",recordingUploadType:""},this.baseComponent=new h(a.CiBack),this.baseComponent.setEventEmitter(this.apiErrorEvent)}componentWillLoad(){this.captureRetryCount=0,this.showHowTo=!0,this.flow.photoFileName="idImage.png",this.flow.recordingFileName="idVideo.",this.flow.photoUploadType="IdFront",this.flow.recordingUploadType="IdFrontVideo",this.front=!0}howToDone(){this.showHowTo=!1}timeElapsed(){this.showTimeout=!0}captureErrorDone(){1==this.showTimeout&&(this.showTimeout=!1),1==this.showInvalid&&(this.flow.photoFileName="idImage.png",this.flow.recordingFileName="idVideo.",this.flow.photoUploadType="IdFront",this.flow.recordingUploadType="IdFrontVideo",this.flow.photoFile=null,this.flow.recordingFile=null,this.flow.photoDone=!1,this.flow.recordingDone=!1,this.front=!0,this.showInvalid=!1)}async captureIdImage(i){let t=i.detail;if(0==t.size)return await this.baseComponent.apiCall.AddLog({message:"Empty id photo",blobData:t},e()),void this.triggerErrorFlow();try{this.flow.photoFile=new File([t],this.flow.photoFileName,{type:"image/png"}),this.uploadPhoto()}catch(i){this.apiErrorEvent.emit(i)}}async captureIdBackImage(i){let t=i.detail;if(0==t.size)return await this.baseComponent.apiCall.AddLog({message:"Empty id photo",blobData:t},e()),void this.triggerErrorFlow();try{this.flow.photoFile=new File([t],this.flow.photoFileName,{type:"image/png"}),this.uploadPhoto()}catch(i){this.apiErrorEvent.emit(i)}}async capturedIdRecording(i){let t=i.detail;if(0==t.size&&0==this.recordingResultCount)return void this.recordingResultCount++;if(0==t.size)return await this.baseComponent.apiCall.AddLog({message:"Empty recording",blobData:t},e()),void this.triggerErrorFlow();this.recordingResultCount=0;let s=t.type==r.mp4MimeType.type?r.mp4MimeType:r.webmMimeType;try{this.flow.recordingFile=new File([t],this.flow.recordingFileName+s.extension,{type:s.type}),this.uploadRecording()}catch(i){o.recordingRetryCount<3?(o.recordingRetryCount++,this.triggerErrorFlow()):this.apiErrorEvent.emit(i)}}async verificationFinished(i){this.flow.verificationFinished=!0,await this.endFlow()}async componentDidLoad(){await this.baseComponent.initialize()}async uploadPhoto(){null==this.flow.photoFile||this.flow.photoDone||(this.flow.photoDone=await this.baseComponent.apiCall.UploadFileForRequestB64(o.requestId,this.flow.photoUploadType,this.flow.photoFile),this.flow.photoDone?await this.endFlow():(this.switchCamera(),this.triggerErrorFlow()))}async uploadRecording(){null==this.flow.recordingFile||this.flow.recordingDone||(this.flow.recordingDone=await this.baseComponent.apiCall.UploadFileForRequestB64(o.requestId,this.flow.recordingUploadType,this.flow.recordingFile),this.flow.recordingDone?await this.endFlow():this.triggerErrorFlow())}triggerErrorFlow(){this.flow.photoFile=null,this.flow.recordingFile=null,this.showInvalid=!0}async endFlow(){if(this.flow.photoDone&&this.flow.recordingDone)return this.front?(this.flow.photoFileName="idBackImage.png",this.flow.recordingFileName="idBackVideo.",this.flow.photoUploadType="IdBack",this.flow.recordingUploadType="IdBackVideo",this.flow.photoFile=null,this.flow.recordingFile=null,this.flow.photoDone=!1,this.flow.recordingDone=!1,this.front=!1,void(this.showHowTo=!0)):void(this.flow.verificationFinished&&(o.recordingRetryCount=0,o.flowStatus=d.LIVENESS))}async disconnectedCallback(){await this.baseComponent.finalize()}switchCamera(){if(1==this.captureRetryCount){let i=o.cameraIds.indexOf(o.cameraId);o.cameraId=i===o.cameraIds.length-1?o.cameraIds[0]:o.cameraIds[i+1],this.captureRetryCount=0}else this.captureRetryCount++}render(){let i=s("capture-error",{type:"ID"}),t=s("id-capture",{id:"idFront"}),h=s("id-back-capture",{id:"idBack"}),a=s("how-to-info",{idSide:this.front?"front":"back"});return this.showHowTo?a:this.showInvalid||this.showTimeout?i:this.front?t:h}};n.style="";export{n as id_double_side}
|