@ekyc_qoobiss/qbs-ect-cmp 3.6.14 → 3.6.15

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.
Files changed (50) hide show
  1. package/dist/cjs/{Stream-097bd1e9.js → agreement-check_19.cjs.entry.js} +5193 -91
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/qbs-ect-cmp.cjs.js +1 -1
  4. package/dist/collection/collection-manifest.json +1 -2
  5. package/dist/collection/components/common/capture-error/capture-error.js +6 -1
  6. package/dist/collection/components/common/id-back-capture/id-back-capture.js +2 -4
  7. package/dist/collection/components/common/id-capture/id-capture.js +2 -4
  8. package/dist/collection/components/common/id-tilt/id-tilt.js +3 -5
  9. package/dist/collection/components/common/selfie-capture/selfie-capture.js +3 -27
  10. package/dist/collection/components/common/selfie-tilt/selfie-tilt.css +7 -0
  11. package/dist/collection/components/common/selfie-tilt/selfie-tilt.js +212 -0
  12. package/dist/collection/components/flow/process-id/process-id.js +28 -28
  13. package/dist/collection/components/flow/user-liveness/user-liveness.js +88 -40
  14. package/dist/collection/helpers/Stream.js +1 -1
  15. package/dist/collection/libs/FaceML5Detector/FaceML5Detector.js +18 -15
  16. package/dist/collection/models/CaptureFlow.js +17 -9
  17. package/dist/collection/models/FlowSteps.js +3 -6
  18. package/dist/esm/{Stream-d1fb2210.js → agreement-check_19.entry.js} +5128 -24
  19. package/dist/esm/{index-5d6f9123.js → index-9d69e511.js} +1 -1
  20. package/dist/esm/loader-dots.entry.js +1 -1
  21. package/dist/esm/loader.js +3 -3
  22. package/dist/esm/qbs-ect-cmp.js +3 -3
  23. package/dist/qbs-ect-cmp/{p-aacd7024.js → p-06e42b28.js} +1 -1
  24. package/dist/qbs-ect-cmp/{p-7c33dd41.entry.js → p-4c8e922b.entry.js} +1 -1
  25. package/dist/qbs-ect-cmp/{p-73a2e58b.js → p-a85dd6fc.entry.js} +26 -26
  26. package/dist/qbs-ect-cmp/qbs-ect-cmp.esm.js +1 -1
  27. package/dist/types/components/common/capture-error/capture-error.d.ts +3 -1
  28. package/dist/types/components/common/selfie-capture/selfie-capture.d.ts +0 -1
  29. package/dist/types/components/common/selfie-tilt/selfie-tilt.d.ts +30 -0
  30. package/dist/types/components/flow/user-liveness/user-liveness.d.ts +4 -4
  31. package/dist/types/components.d.ts +20 -37
  32. package/dist/types/libs/FaceML5Detector/FaceML5Detector.d.ts +3 -2
  33. package/dist/types/models/CaptureFlow.d.ts +8 -1
  34. package/dist/types/models/FlowSteps.d.ts +3 -6
  35. package/package.json +1 -1
  36. package/dist/cjs/agreement-check_18.cjs.entry.js +0 -4971
  37. package/dist/cjs/id-double-side.cjs.entry.js +0 -208
  38. package/dist/cjs/id-single-side.cjs.entry.js +0 -147
  39. package/dist/collection/components/flow/id-double-side/id-double-side.css +0 -0
  40. package/dist/collection/components/flow/id-double-side/id-double-side.js +0 -285
  41. package/dist/collection/components/flow/id-single-side/id-single-side.css +0 -0
  42. package/dist/collection/components/flow/id-single-side/id-single-side.js +0 -216
  43. package/dist/esm/agreement-check_18.entry.js +0 -4950
  44. package/dist/esm/id-double-side.entry.js +0 -204
  45. package/dist/esm/id-single-side.entry.js +0 -143
  46. package/dist/qbs-ect-cmp/p-04e51eac.entry.js +0 -1
  47. package/dist/qbs-ect-cmp/p-deea462b.entry.js +0 -1
  48. package/dist/qbs-ect-cmp/p-f84883f8.entry.js +0 -1
  49. package/dist/types/components/flow/id-double-side/id-double-side.d.ts +0 -29
  50. package/dist/types/components/flow/id-single-side/id-single-side.d.ts +0 -24
@@ -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
- }