@ekyc_qoobiss/qbs-ect-cmp 3.6.14 → 3.6.16
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-097bd1e9.js → agreement-check_19.cjs.entry.js} +5238 -529
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/qbs-ect-cmp.cjs.js +1 -1
- package/dist/cjs/random-actions.cjs.entry.js +22 -0
- package/dist/cjs/store-ab631a7a.js +415 -0
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/common/capture-error/capture-error.js +6 -1
- package/dist/collection/components/common/id-back-capture/id-back-capture.js +2 -4
- package/dist/collection/components/common/id-capture/id-capture.js +2 -4
- package/dist/collection/components/common/id-tilt/id-tilt.js +3 -5
- package/dist/collection/components/common/random-actions/random-actions.js +20 -0
- package/dist/collection/components/common/selfie-capture/selfie-capture.js +3 -27
- package/dist/collection/components/common/selfie-tilt/selfie-tilt.css +7 -0
- package/dist/collection/components/common/selfie-tilt/selfie-tilt.js +212 -0
- package/dist/collection/components/flow/process-id/process-id.js +31 -28
- package/dist/collection/components/flow/user-liveness/user-liveness.js +87 -40
- package/dist/collection/helpers/Stream.js +1 -1
- package/dist/collection/libs/FaceML5Detector/FaceML5Detector.js +18 -15
- package/dist/collection/models/CaptureFlow.js +17 -9
- package/dist/collection/models/FlowSteps.js +3 -6
- package/dist/esm/{Stream-d1fb2210.js → agreement-check_19.entry.js} +5131 -420
- package/dist/esm/loader.js +1 -1
- package/dist/esm/qbs-ect-cmp.js +1 -1
- package/dist/esm/random-actions.entry.js +18 -0
- package/dist/esm/store-b5192087.js +399 -0
- package/dist/qbs-ect-cmp/{p-73a2e58b.js → p-094ad8f3.entry.js} +26 -26
- package/dist/qbs-ect-cmp/p-927cd530.entry.js +1 -0
- package/dist/qbs-ect-cmp/p-a6506178.js +1 -0
- package/dist/qbs-ect-cmp/qbs-ect-cmp.esm.js +1 -1
- package/dist/types/components/common/capture-error/capture-error.d.ts +3 -1
- package/dist/types/components/common/random-actions/random-actions.d.ts +7 -0
- package/dist/types/components/common/selfie-capture/selfie-capture.d.ts +0 -1
- package/dist/types/components/common/selfie-tilt/selfie-tilt.d.ts +30 -0
- package/dist/types/components/flow/user-liveness/user-liveness.d.ts +4 -4
- package/dist/types/components.d.ts +33 -37
- package/dist/types/libs/FaceML5Detector/FaceML5Detector.d.ts +3 -2
- package/dist/types/models/CaptureFlow.d.ts +8 -1
- package/dist/types/models/FlowSteps.d.ts +3 -6
- package/package.json +1 -1
- package/dist/cjs/agreement-check_18.cjs.entry.js +0 -4971
- package/dist/cjs/id-double-side.cjs.entry.js +0 -208
- package/dist/cjs/id-single-side.cjs.entry.js +0 -147
- package/dist/collection/components/flow/id-double-side/id-double-side.js +0 -285
- package/dist/collection/components/flow/id-single-side/id-single-side.css +0 -0
- package/dist/collection/components/flow/id-single-side/id-single-side.js +0 -216
- package/dist/esm/agreement-check_18.entry.js +0 -4950
- package/dist/esm/id-double-side.entry.js +0 -204
- package/dist/esm/id-single-side.entry.js +0 -143
- package/dist/qbs-ect-cmp/p-04e51eac.entry.js +0 -1
- package/dist/qbs-ect-cmp/p-deea462b.entry.js +0 -1
- package/dist/qbs-ect-cmp/p-f84883f8.entry.js +0 -1
- package/dist/types/components/flow/id-double-side/id-double-side.d.ts +0 -29
- package/dist/types/components/flow/id-single-side/id-single-side.d.ts +0 -24
- /package/dist/collection/components/{flow/id-double-side/id-double-side.css → common/random-actions/random-actions.css} +0 -0
|
@@ -1,216 +0,0 @@
|
|
|
1
|
-
import { h /*getAssetPath*/ } from '@stencil/core';
|
|
2
|
-
import store from '../../../helpers/store';
|
|
3
|
-
import { Stream } from '../../../helpers/Stream';
|
|
4
|
-
import { FlowStatus } from '../../../models/FlowStatus';
|
|
5
|
-
import { FlowSteps } from '../../../models/FlowSteps';
|
|
6
|
-
import { getLogMessage } from '../../../utils/utils';
|
|
7
|
-
import { BaseComponent } from '../../base-component';
|
|
8
|
-
// import { IDPose } from '../../libs/IDML5Detector/IDPose';
|
|
9
|
-
export class IdSingleSide {
|
|
10
|
-
constructor() {
|
|
11
|
-
this.recordingResultCount = 0;
|
|
12
|
-
this.showTimeout = undefined;
|
|
13
|
-
this.showHowTo = undefined;
|
|
14
|
-
this.idFlow = {
|
|
15
|
-
verificationFinished: false,
|
|
16
|
-
photoDone: false,
|
|
17
|
-
recordingDone: false,
|
|
18
|
-
photoFile: null,
|
|
19
|
-
recordingFile: null,
|
|
20
|
-
};
|
|
21
|
-
this.baseComponent = new BaseComponent(FlowSteps.CiFront);
|
|
22
|
-
this.baseComponent.setEventEmitter(this.apiErrorEvent);
|
|
23
|
-
this.captureRetryCount = 0;
|
|
24
|
-
this.showHowTo = true;
|
|
25
|
-
}
|
|
26
|
-
captureErrorDone() {
|
|
27
|
-
this.idFlow.photoFile = null;
|
|
28
|
-
this.idFlow.recordingFile = null;
|
|
29
|
-
this.showTimeout = false;
|
|
30
|
-
}
|
|
31
|
-
howToDone() {
|
|
32
|
-
this.showHowTo = false;
|
|
33
|
-
}
|
|
34
|
-
timeElapsed() {
|
|
35
|
-
this.showTimeout = true;
|
|
36
|
-
}
|
|
37
|
-
async captureIdImage(event) {
|
|
38
|
-
let idPhoto = event.detail;
|
|
39
|
-
if (idPhoto.size == 0) {
|
|
40
|
-
await this.baseComponent.apiCall.AddLog({ message: 'Empty id photo', blobData: idPhoto }, getLogMessage());
|
|
41
|
-
this.showTimeout = true;
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
try {
|
|
45
|
-
this.idFlow.photoFile = new File([idPhoto], 'idImage.png', { type: 'image/png' });
|
|
46
|
-
await this.uploadPhoto();
|
|
47
|
-
}
|
|
48
|
-
catch (e) {
|
|
49
|
-
this.apiErrorEvent.emit(e);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
async verificationFinished(_event) {
|
|
53
|
-
this.idFlow.verificationFinished = true;
|
|
54
|
-
await this.endFlow();
|
|
55
|
-
}
|
|
56
|
-
async capturedIdRecording(event) {
|
|
57
|
-
let idRecording = event.detail;
|
|
58
|
-
if (idRecording.size == 0 && this.recordingResultCount == 0) {
|
|
59
|
-
this.recordingResultCount++;
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
if (idRecording.size == 0) {
|
|
63
|
-
await this.baseComponent.apiCall.AddLog({ message: 'Empty ID recording', blobData: idRecording }, getLogMessage());
|
|
64
|
-
this.showTimeout = true;
|
|
65
|
-
return;
|
|
66
|
-
}
|
|
67
|
-
let mimeType = idRecording.type == Stream.mp4MimeType.type ? Stream.mp4MimeType : Stream.webmMimeType;
|
|
68
|
-
if (store.flowStatus == FlowStatus.ID) {
|
|
69
|
-
try {
|
|
70
|
-
this.idFlow.recordingFile = new File([idRecording], 'idVideo.' + mimeType.extension, { type: mimeType.type });
|
|
71
|
-
await this.uploadRecording();
|
|
72
|
-
}
|
|
73
|
-
catch (e) {
|
|
74
|
-
this.apiErrorEvent.emit(e);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
async componentDidLoad() {
|
|
79
|
-
await this.baseComponent.initialize();
|
|
80
|
-
}
|
|
81
|
-
async uploadPhoto() {
|
|
82
|
-
if (this.idFlow.photoFile == null || this.idFlow.photoDone) {
|
|
83
|
-
return;
|
|
84
|
-
}
|
|
85
|
-
this.idFlow.photoDone = await this.baseComponent.apiCall.UploadFileForRequestB64(store.requestId, 'IdFront', this.idFlow.photoFile);
|
|
86
|
-
if (this.idFlow.photoDone) {
|
|
87
|
-
await this.endFlow();
|
|
88
|
-
}
|
|
89
|
-
else {
|
|
90
|
-
this.idFlow.photoFile = null;
|
|
91
|
-
this.idFlow.recordingFile = null;
|
|
92
|
-
this.switchCamera();
|
|
93
|
-
this.showTimeout = true;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
async uploadRecording() {
|
|
97
|
-
if (this.idFlow.recordingFile == null || this.idFlow.recordingDone) {
|
|
98
|
-
return;
|
|
99
|
-
}
|
|
100
|
-
this.idFlow.recordingDone = await this.baseComponent.apiCall.UploadFileForRequestB64(store.requestId, 'IdFrontVideo', this.idFlow.recordingFile);
|
|
101
|
-
if (this.idFlow.recordingDone) {
|
|
102
|
-
await this.endFlow();
|
|
103
|
-
}
|
|
104
|
-
else {
|
|
105
|
-
this.idFlow.photoFile = null;
|
|
106
|
-
this.idFlow.recordingFile = null;
|
|
107
|
-
this.showTimeout = true;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
async endFlow() {
|
|
111
|
-
if (!this.idFlow.photoDone) {
|
|
112
|
-
return;
|
|
113
|
-
}
|
|
114
|
-
if (!this.idFlow.recordingDone) {
|
|
115
|
-
return;
|
|
116
|
-
}
|
|
117
|
-
if (!this.idFlow.verificationFinished) {
|
|
118
|
-
return;
|
|
119
|
-
}
|
|
120
|
-
store.flowStatus = FlowStatus.LIVENESS;
|
|
121
|
-
}
|
|
122
|
-
async disconnectedCallback() {
|
|
123
|
-
await this.baseComponent.finalize();
|
|
124
|
-
}
|
|
125
|
-
switchCamera() {
|
|
126
|
-
if (this.captureRetryCount == 1) {
|
|
127
|
-
let camIndex = store.cameraIds.indexOf(store.cameraId);
|
|
128
|
-
store.cameraId = camIndex === store.cameraIds.length - 1 ? store.cameraIds[0] : store.cameraIds[camIndex + 1];
|
|
129
|
-
this.captureRetryCount = 0;
|
|
130
|
-
}
|
|
131
|
-
else {
|
|
132
|
-
this.captureRetryCount++;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
render() {
|
|
136
|
-
let error = h("capture-error", { type: "ID" });
|
|
137
|
-
let capture = h("id-capture", { id: "idFront" });
|
|
138
|
-
let howToInfo = h("how-to-info", { idSide: "front" });
|
|
139
|
-
return this.showHowTo ? howToInfo : this.showTimeout ? error : capture;
|
|
140
|
-
}
|
|
141
|
-
static get is() { return "id-single-side"; }
|
|
142
|
-
static get originalStyleUrls() {
|
|
143
|
-
return {
|
|
144
|
-
"$": ["id-single-side.css"]
|
|
145
|
-
};
|
|
146
|
-
}
|
|
147
|
-
static get styleUrls() {
|
|
148
|
-
return {
|
|
149
|
-
"$": ["id-single-side.css"]
|
|
150
|
-
};
|
|
151
|
-
}
|
|
152
|
-
static get states() {
|
|
153
|
-
return {
|
|
154
|
-
"showTimeout": {},
|
|
155
|
-
"showHowTo": {},
|
|
156
|
-
"idFlow": {}
|
|
157
|
-
};
|
|
158
|
-
}
|
|
159
|
-
static get events() {
|
|
160
|
-
return [{
|
|
161
|
-
"method": "apiErrorEvent",
|
|
162
|
-
"name": "apiError",
|
|
163
|
-
"bubbles": true,
|
|
164
|
-
"cancelable": true,
|
|
165
|
-
"composed": true,
|
|
166
|
-
"docs": {
|
|
167
|
-
"tags": [],
|
|
168
|
-
"text": ""
|
|
169
|
-
},
|
|
170
|
-
"complexType": {
|
|
171
|
-
"original": "any",
|
|
172
|
-
"resolved": "any",
|
|
173
|
-
"references": {}
|
|
174
|
-
}
|
|
175
|
-
}];
|
|
176
|
-
}
|
|
177
|
-
static get listeners() {
|
|
178
|
-
return [{
|
|
179
|
-
"name": "captureErrorDone",
|
|
180
|
-
"method": "captureErrorDone",
|
|
181
|
-
"target": undefined,
|
|
182
|
-
"capture": false,
|
|
183
|
-
"passive": false
|
|
184
|
-
}, {
|
|
185
|
-
"name": "howToInfoDone",
|
|
186
|
-
"method": "howToDone",
|
|
187
|
-
"target": undefined,
|
|
188
|
-
"capture": false,
|
|
189
|
-
"passive": false
|
|
190
|
-
}, {
|
|
191
|
-
"name": "timeElapsed",
|
|
192
|
-
"method": "timeElapsed",
|
|
193
|
-
"target": undefined,
|
|
194
|
-
"capture": false,
|
|
195
|
-
"passive": false
|
|
196
|
-
}, {
|
|
197
|
-
"name": "photoIdCapture",
|
|
198
|
-
"method": "captureIdImage",
|
|
199
|
-
"target": undefined,
|
|
200
|
-
"capture": false,
|
|
201
|
-
"passive": false
|
|
202
|
-
}, {
|
|
203
|
-
"name": "verificationFinished",
|
|
204
|
-
"method": "verificationFinished",
|
|
205
|
-
"target": undefined,
|
|
206
|
-
"capture": false,
|
|
207
|
-
"passive": false
|
|
208
|
-
}, {
|
|
209
|
-
"name": "recordingIdCapture",
|
|
210
|
-
"method": "capturedIdRecording",
|
|
211
|
-
"target": undefined,
|
|
212
|
-
"capture": false,
|
|
213
|
-
"passive": false
|
|
214
|
-
}];
|
|
215
|
-
}
|
|
216
|
-
}
|