@ekyc_qoobiss/qbs-ect-cmp 3.6.58 → 3.6.60
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/{TranslationUtils-80c3bff8.js → TranslationUtils-fbb2c39c.js} +4 -5
- package/dist/cjs/agreement-check_17.cjs.entry.js +51 -13
- package/dist/cjs/random-actions.cjs.entry.js +1 -1
- package/dist/collection/components/common/capture-error/capture-error.js +2 -1
- package/dist/collection/components/flow/process-id/process-id.js +23 -5
- package/dist/collection/components/flow/user-liveness/user-liveness.js +25 -5
- package/dist/collection/helpers/ApiCall.js +4 -5
- package/dist/esm/{TranslationUtils-9c2605e3.js → TranslationUtils-32c06882.js} +4 -5
- package/dist/esm/agreement-check_17.entry.js +51 -13
- package/dist/esm/random-actions.entry.js +1 -1
- package/dist/qbs-ect-cmp/{p-705cdf0b.entry.js → p-20c53edc.entry.js} +2 -2
- package/dist/qbs-ect-cmp/{p-8a07814a.js → p-601c9197.js} +1 -1
- package/dist/qbs-ect-cmp/{p-892507b7.entry.js → p-fc771dd3.entry.js} +1 -1
- package/dist/qbs-ect-cmp/qbs-ect-cmp.esm.js +1 -1
- package/dist/types/components/flow/process-id/process-id.d.ts +1 -0
- package/dist/types/components/flow/user-liveness/user-liveness.d.ts +1 -0
- package/dist/types/helpers/ApiCall.d.ts +2 -1
- package/dist/types/models/IAddRequest.d.ts +1 -0
- package/package.json +1 -1
|
@@ -496,6 +496,7 @@ class ApiCall {
|
|
|
496
496
|
state.phoneNumber = jsonResp.phoneNumber;
|
|
497
497
|
state.flowStatus = exports.FlowStatus[jsonResp.state];
|
|
498
498
|
state.logSteps = jsonResp.logSteps;
|
|
499
|
+
state.debug = jsonResp.debug;
|
|
499
500
|
return true;
|
|
500
501
|
}
|
|
501
502
|
async UploadFileForRequestB64(requestId, type, file) {
|
|
@@ -505,11 +506,9 @@ class ApiCall {
|
|
|
505
506
|
data: await this.toBase64(file),
|
|
506
507
|
};
|
|
507
508
|
let respJson = await this.post(this.urls.UploadCapture, JSON.stringify(data));
|
|
508
|
-
state.
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
}
|
|
512
|
-
return true;
|
|
509
|
+
if (state.debug)
|
|
510
|
+
console.log(`apicall | uploadfileforrequestb64 | ${respJson}`);
|
|
511
|
+
return respJson;
|
|
513
512
|
}
|
|
514
513
|
async GetAgreement(agreementType) {
|
|
515
514
|
let resp = await this.get(this.urls.GetAgreement + '?type=' + agreementType + '&requestId=' + state.requestId);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-41696e0e.js');
|
|
6
|
-
const TranslationUtils = require('./TranslationUtils-
|
|
6
|
+
const TranslationUtils = require('./TranslationUtils-fbb2c39c.js');
|
|
7
7
|
|
|
8
8
|
const agreementCheckCss = "";
|
|
9
9
|
|
|
@@ -4754,7 +4754,7 @@ const CaptureError = class {
|
|
|
4754
4754
|
this.eventCaptureErrorDone.emit();
|
|
4755
4755
|
}
|
|
4756
4756
|
render() {
|
|
4757
|
-
return (index.h("div", { class: "container" }, index.h("div", { class: "row" }, index.h("h1", { class: "color-red" }, this.titleR1), index.h("h1", { class: "color-red" }, this.titleR2), index.h("div", null, index.h("p", { class: "color-red font-weight-bold font-size-25 mt-5" }, this.descriptionR1), index.h("p", { class: "color-red font-weight-bold font-size-25 mt-5" }, this.descriptionR2), index.h("p", { class: "font-size-1" }, this.reason)), index.h("div", { class: "pos-relative show-bottom" }, index.h("div", { class: "btn-buletin" }, index.h("button", { class: "main-button", type: "button", disabled: !this.buttonEnabled, onClick: () => this.buttonClick() }, this.buttonText), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, this.translations.GlobalValues.FooterText))))));
|
|
4757
|
+
return (index.h("div", { class: "container" }, index.h("div", { class: "row" }, index.h("h1", { class: "color-red" }, this.titleR1), index.h("h1", { class: "color-red" }, this.titleR2), index.h("div", null, index.h("p", { class: "color-red font-weight-bold font-size-25 mt-5" }, this.descriptionR1), index.h("p", { class: "color-red font-weight-bold font-size-25 mt-5" }, this.descriptionR2), TranslationUtils.state.debug ? index.h("p", { class: "font-size-1" }, this.reason) : null), index.h("div", { class: "pos-relative show-bottom" }, index.h("div", { class: "btn-buletin" }, index.h("button", { class: "main-button", type: "button", disabled: !this.buttonEnabled, onClick: () => this.buttonClick() }, this.buttonText), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, this.translations.GlobalValues.FooterText))))));
|
|
4758
4758
|
}
|
|
4759
4759
|
};
|
|
4760
4760
|
CaptureError.style = captureErrorCss;
|
|
@@ -5208,7 +5208,7 @@ function v4(options, buf, offset) {
|
|
|
5208
5208
|
}
|
|
5209
5209
|
|
|
5210
5210
|
const name = "@ekyc_qoobiss/qbs-ect-cmp";
|
|
5211
|
-
const version$1 = "3.6.
|
|
5211
|
+
const version$1 = "3.6.60";
|
|
5212
5212
|
const description = "Person Identification Component";
|
|
5213
5213
|
const main = "./dist/index.cjs.js";
|
|
5214
5214
|
const module$1 = "./dist/index.js";
|
|
@@ -8688,6 +8688,8 @@ const ProcessId = class {
|
|
|
8688
8688
|
async captureIdImage(event) {
|
|
8689
8689
|
if (TranslationUtils.state.debug)
|
|
8690
8690
|
console.log('process-id | captureIdImage');
|
|
8691
|
+
if (this.mode == 'tilt')
|
|
8692
|
+
return;
|
|
8691
8693
|
let idPhoto = event.detail;
|
|
8692
8694
|
if (idPhoto.size == 0) {
|
|
8693
8695
|
if (TranslationUtils.state.debug)
|
|
@@ -8701,7 +8703,10 @@ const ProcessId = class {
|
|
|
8701
8703
|
var uploadResult = await TranslationUtils.ApiCall.instance.UploadFileForRequestB64(TranslationUtils.state.requestId, this.flow.capture.photoType, frontCapture);
|
|
8702
8704
|
if (TranslationUtils.state.debug)
|
|
8703
8705
|
console.log('process-id | captureIdImage | uploadResult: ' + uploadResult);
|
|
8704
|
-
if (
|
|
8706
|
+
if (uploadResult.isValid) {
|
|
8707
|
+
TranslationUtils.state.flowStatus = TranslationUtils.FlowStatus[uploadResult.state];
|
|
8708
|
+
}
|
|
8709
|
+
else {
|
|
8705
8710
|
this.switchCamera();
|
|
8706
8711
|
this.triggerErrorFlow();
|
|
8707
8712
|
}
|
|
@@ -8730,7 +8735,10 @@ const ProcessId = class {
|
|
|
8730
8735
|
var uploadResult = await TranslationUtils.ApiCall.instance.UploadFileForRequestB64(TranslationUtils.state.requestId, this.flow.capture.recType, captureRec);
|
|
8731
8736
|
if (TranslationUtils.state.debug)
|
|
8732
8737
|
console.log('process-id | capturedIdRecording | uploadResult: ' + uploadResult);
|
|
8733
|
-
if (
|
|
8738
|
+
if (uploadResult.saved) {
|
|
8739
|
+
TranslationUtils.state.flowStatus = TranslationUtils.FlowStatus[uploadResult.state];
|
|
8740
|
+
}
|
|
8741
|
+
else {
|
|
8734
8742
|
this.triggerErrorFlow();
|
|
8735
8743
|
}
|
|
8736
8744
|
this.recordingResultCount = 0;
|
|
@@ -8739,17 +8747,23 @@ const ProcessId = class {
|
|
|
8739
8747
|
if (TranslationUtils.state.debug)
|
|
8740
8748
|
console.log('process-id | verificationFinished');
|
|
8741
8749
|
this.verificationReceived = Date.now();
|
|
8742
|
-
|
|
8750
|
+
let initialStatus = TranslationUtils.state.flowStatus;
|
|
8751
|
+
let statusChanged = false;
|
|
8752
|
+
while (Date.now() - this.verificationReceived < 25000 && !statusChanged) {
|
|
8743
8753
|
await delay(2000);
|
|
8754
|
+
statusChanged = initialStatus != TranslationUtils.state.flowStatus;
|
|
8755
|
+
}
|
|
8756
|
+
if (!statusChanged) {
|
|
8744
8757
|
let currentStatus = await TranslationUtils.ApiCall.instance.GetFlowState();
|
|
8745
8758
|
if (currentStatus != TranslationUtils.state.flowStatus) {
|
|
8746
8759
|
TranslationUtils.state.flowStatus = currentStatus;
|
|
8747
|
-
|
|
8760
|
+
}
|
|
8761
|
+
else {
|
|
8762
|
+
this.triggerUploadFailedFlow();
|
|
8748
8763
|
}
|
|
8749
8764
|
}
|
|
8750
8765
|
if (TranslationUtils.state.debug)
|
|
8751
8766
|
console.log('process-id | verificationFinished | waitingFinished ');
|
|
8752
|
-
this.triggerErrorFlow();
|
|
8753
8767
|
}
|
|
8754
8768
|
async componentDidLoad() {
|
|
8755
8769
|
if (TranslationUtils.state.debug)
|
|
@@ -8760,6 +8774,10 @@ const ProcessId = class {
|
|
|
8760
8774
|
this.errorReason = 'Invalid';
|
|
8761
8775
|
this.showInvalid = true;
|
|
8762
8776
|
}
|
|
8777
|
+
triggerUploadFailedFlow() {
|
|
8778
|
+
this.errorReason = 'Upload Failed';
|
|
8779
|
+
this.showInvalid = true;
|
|
8780
|
+
}
|
|
8763
8781
|
async disconnectedCallback() {
|
|
8764
8782
|
if (TranslationUtils.state.debug)
|
|
8765
8783
|
console.log('process-id | disconnectedCallback');
|
|
@@ -9074,7 +9092,10 @@ const UserLiveness = class {
|
|
|
9074
9092
|
try {
|
|
9075
9093
|
var uploadPhoto = new File([selfiePhoto], this.flow.capture.fileName, { type: 'image/png' });
|
|
9076
9094
|
let photoUploaded = await TranslationUtils.ApiCall.instance.UploadFileForRequestB64(TranslationUtils.state.requestId, this.flow.capture.photoType, uploadPhoto);
|
|
9077
|
-
if (
|
|
9095
|
+
if (photoUploaded.isValid) {
|
|
9096
|
+
TranslationUtils.state.flowStatus = TranslationUtils.FlowStatus[photoUploaded.state];
|
|
9097
|
+
}
|
|
9098
|
+
else {
|
|
9078
9099
|
this.triggerErrorFlow();
|
|
9079
9100
|
}
|
|
9080
9101
|
}
|
|
@@ -9098,7 +9119,10 @@ const UserLiveness = class {
|
|
|
9098
9119
|
try {
|
|
9099
9120
|
let uploadRec = new File([selfieRecording], this.flow.capture.recName + mimeType.extension, { type: mimeType.type });
|
|
9100
9121
|
let uplodDone = await TranslationUtils.ApiCall.instance.UploadFileForRequestB64(TranslationUtils.state.requestId, this.flow.capture.recType, uploadRec);
|
|
9101
|
-
if (
|
|
9122
|
+
if (uplodDone.saved) {
|
|
9123
|
+
TranslationUtils.state.flowStatus = TranslationUtils.FlowStatus[uplodDone.state];
|
|
9124
|
+
}
|
|
9125
|
+
else {
|
|
9102
9126
|
this.triggerErrorFlow();
|
|
9103
9127
|
}
|
|
9104
9128
|
}
|
|
@@ -9113,16 +9137,26 @@ const UserLiveness = class {
|
|
|
9113
9137
|
}
|
|
9114
9138
|
}
|
|
9115
9139
|
async verificationFinished() {
|
|
9140
|
+
if (TranslationUtils.state.debug)
|
|
9141
|
+
console.log('user-liveness | verificationFinished');
|
|
9116
9142
|
this.verificationReceived = Date.now();
|
|
9117
|
-
|
|
9143
|
+
let initialStatus = TranslationUtils.state.flowStatus;
|
|
9144
|
+
let statusChanged = false;
|
|
9145
|
+
while (Date.now() - this.verificationReceived < 25000 && !statusChanged) {
|
|
9118
9146
|
await delay(2000);
|
|
9147
|
+
statusChanged = initialStatus != TranslationUtils.state.flowStatus;
|
|
9148
|
+
}
|
|
9149
|
+
if (!statusChanged) {
|
|
9119
9150
|
let currentStatus = await TranslationUtils.ApiCall.instance.GetFlowState();
|
|
9120
9151
|
if (currentStatus != TranslationUtils.state.flowStatus) {
|
|
9121
9152
|
TranslationUtils.state.flowStatus = currentStatus;
|
|
9122
|
-
|
|
9153
|
+
}
|
|
9154
|
+
else {
|
|
9155
|
+
this.triggerUploadFailedFlow();
|
|
9123
9156
|
}
|
|
9124
9157
|
}
|
|
9125
|
-
|
|
9158
|
+
if (TranslationUtils.state.debug)
|
|
9159
|
+
console.log('user-liveness | verificationFinished | waitingFinished ');
|
|
9126
9160
|
}
|
|
9127
9161
|
async disconnectedCallback() {
|
|
9128
9162
|
await BaseComponent.finalize(this.currentStep);
|
|
@@ -9131,6 +9165,10 @@ const UserLiveness = class {
|
|
|
9131
9165
|
this.errorReason = 'Invalid';
|
|
9132
9166
|
this.showError = true;
|
|
9133
9167
|
}
|
|
9168
|
+
triggerUploadFailedFlow() {
|
|
9169
|
+
this.errorReason = 'Upload Failed';
|
|
9170
|
+
this.showError = true;
|
|
9171
|
+
}
|
|
9134
9172
|
render() {
|
|
9135
9173
|
let howTo = index.h("how-to-info", null);
|
|
9136
9174
|
let capture = index.h("selfie-capture", null);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-41696e0e.js');
|
|
6
|
-
const TranslationUtils = require('./TranslationUtils-
|
|
6
|
+
const TranslationUtils = require('./TranslationUtils-fbb2c39c.js');
|
|
7
7
|
|
|
8
8
|
const randomActionsCss = "";
|
|
9
9
|
|
|
@@ -3,6 +3,7 @@ import { delay } from '../../../utils/utils';
|
|
|
3
3
|
import { BaseComponent } from '../../base-component';
|
|
4
4
|
import { FlowMoments, FlowSteps } from '../../../models/FlowSteps';
|
|
5
5
|
import { Translations } from '../../../helpers/TranslationUtils';
|
|
6
|
+
import store from '../../../helpers/store';
|
|
6
7
|
export class CaptureError {
|
|
7
8
|
constructor() { this.type = undefined; this.reason = undefined; this.buttonEnabled = undefined; this.buttonText = undefined; }
|
|
8
9
|
async componentWillLoad() {
|
|
@@ -36,7 +37,7 @@ export class CaptureError {
|
|
|
36
37
|
this.eventCaptureErrorDone.emit();
|
|
37
38
|
}
|
|
38
39
|
render() {
|
|
39
|
-
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))))));
|
|
40
|
+
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), store.debug ? h("p", { class: "font-size-1" }, this.reason) : null), 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))))));
|
|
40
41
|
}
|
|
41
42
|
static get is() { return "capture-error"; }
|
|
42
43
|
static get originalStyleUrls() {
|
|
@@ -79,6 +79,8 @@ export class ProcessId {
|
|
|
79
79
|
async captureIdImage(event) {
|
|
80
80
|
if (store.debug)
|
|
81
81
|
console.log('process-id | captureIdImage');
|
|
82
|
+
if (this.mode == 'tilt')
|
|
83
|
+
return;
|
|
82
84
|
let idPhoto = event.detail;
|
|
83
85
|
if (idPhoto.size == 0) {
|
|
84
86
|
if (store.debug)
|
|
@@ -92,7 +94,10 @@ export class ProcessId {
|
|
|
92
94
|
var uploadResult = await ApiCall.instance.UploadFileForRequestB64(store.requestId, this.flow.capture.photoType, frontCapture);
|
|
93
95
|
if (store.debug)
|
|
94
96
|
console.log('process-id | captureIdImage | uploadResult: ' + uploadResult);
|
|
95
|
-
if (
|
|
97
|
+
if (uploadResult.isValid) {
|
|
98
|
+
store.flowStatus = FlowStatus[uploadResult.state];
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
96
101
|
this.switchCamera();
|
|
97
102
|
this.triggerErrorFlow();
|
|
98
103
|
}
|
|
@@ -121,7 +126,10 @@ export class ProcessId {
|
|
|
121
126
|
var uploadResult = await ApiCall.instance.UploadFileForRequestB64(store.requestId, this.flow.capture.recType, captureRec);
|
|
122
127
|
if (store.debug)
|
|
123
128
|
console.log('process-id | capturedIdRecording | uploadResult: ' + uploadResult);
|
|
124
|
-
if (
|
|
129
|
+
if (uploadResult.saved) {
|
|
130
|
+
store.flowStatus = FlowStatus[uploadResult.state];
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
125
133
|
this.triggerErrorFlow();
|
|
126
134
|
}
|
|
127
135
|
this.recordingResultCount = 0;
|
|
@@ -130,17 +138,23 @@ export class ProcessId {
|
|
|
130
138
|
if (store.debug)
|
|
131
139
|
console.log('process-id | verificationFinished');
|
|
132
140
|
this.verificationReceived = Date.now();
|
|
133
|
-
|
|
141
|
+
let initialStatus = store.flowStatus;
|
|
142
|
+
let statusChanged = false;
|
|
143
|
+
while (Date.now() - this.verificationReceived < 25000 && !statusChanged) {
|
|
134
144
|
await delay(2000);
|
|
145
|
+
statusChanged = initialStatus != store.flowStatus;
|
|
146
|
+
}
|
|
147
|
+
if (!statusChanged) {
|
|
135
148
|
let currentStatus = await ApiCall.instance.GetFlowState();
|
|
136
149
|
if (currentStatus != store.flowStatus) {
|
|
137
150
|
store.flowStatus = currentStatus;
|
|
138
|
-
|
|
151
|
+
}
|
|
152
|
+
else {
|
|
153
|
+
this.triggerUploadFailedFlow();
|
|
139
154
|
}
|
|
140
155
|
}
|
|
141
156
|
if (store.debug)
|
|
142
157
|
console.log('process-id | verificationFinished | waitingFinished ');
|
|
143
|
-
this.triggerErrorFlow();
|
|
144
158
|
}
|
|
145
159
|
async componentDidLoad() {
|
|
146
160
|
if (store.debug)
|
|
@@ -151,6 +165,10 @@ export class ProcessId {
|
|
|
151
165
|
this.errorReason = 'Invalid';
|
|
152
166
|
this.showInvalid = true;
|
|
153
167
|
}
|
|
168
|
+
triggerUploadFailedFlow() {
|
|
169
|
+
this.errorReason = 'Upload Failed';
|
|
170
|
+
this.showInvalid = true;
|
|
171
|
+
}
|
|
154
172
|
async disconnectedCallback() {
|
|
155
173
|
if (store.debug)
|
|
156
174
|
console.log('process-id | disconnectedCallback');
|
|
@@ -71,7 +71,10 @@ export class UserLiveness {
|
|
|
71
71
|
try {
|
|
72
72
|
var uploadPhoto = new File([selfiePhoto], this.flow.capture.fileName, { type: 'image/png' });
|
|
73
73
|
let photoUploaded = await ApiCall.instance.UploadFileForRequestB64(store.requestId, this.flow.capture.photoType, uploadPhoto);
|
|
74
|
-
if (
|
|
74
|
+
if (photoUploaded.isValid) {
|
|
75
|
+
store.flowStatus = FlowStatus[photoUploaded.state];
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
75
78
|
this.triggerErrorFlow();
|
|
76
79
|
}
|
|
77
80
|
}
|
|
@@ -95,7 +98,10 @@ export class UserLiveness {
|
|
|
95
98
|
try {
|
|
96
99
|
let uploadRec = new File([selfieRecording], this.flow.capture.recName + mimeType.extension, { type: mimeType.type });
|
|
97
100
|
let uplodDone = await ApiCall.instance.UploadFileForRequestB64(store.requestId, this.flow.capture.recType, uploadRec);
|
|
98
|
-
if (
|
|
101
|
+
if (uplodDone.saved) {
|
|
102
|
+
store.flowStatus = FlowStatus[uplodDone.state];
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
99
105
|
this.triggerErrorFlow();
|
|
100
106
|
}
|
|
101
107
|
}
|
|
@@ -110,16 +116,26 @@ export class UserLiveness {
|
|
|
110
116
|
}
|
|
111
117
|
}
|
|
112
118
|
async verificationFinished() {
|
|
119
|
+
if (store.debug)
|
|
120
|
+
console.log('user-liveness | verificationFinished');
|
|
113
121
|
this.verificationReceived = Date.now();
|
|
114
|
-
|
|
122
|
+
let initialStatus = store.flowStatus;
|
|
123
|
+
let statusChanged = false;
|
|
124
|
+
while (Date.now() - this.verificationReceived < 25000 && !statusChanged) {
|
|
115
125
|
await delay(2000);
|
|
126
|
+
statusChanged = initialStatus != store.flowStatus;
|
|
127
|
+
}
|
|
128
|
+
if (!statusChanged) {
|
|
116
129
|
let currentStatus = await ApiCall.instance.GetFlowState();
|
|
117
130
|
if (currentStatus != store.flowStatus) {
|
|
118
131
|
store.flowStatus = currentStatus;
|
|
119
|
-
|
|
132
|
+
}
|
|
133
|
+
else {
|
|
134
|
+
this.triggerUploadFailedFlow();
|
|
120
135
|
}
|
|
121
136
|
}
|
|
122
|
-
|
|
137
|
+
if (store.debug)
|
|
138
|
+
console.log('user-liveness | verificationFinished | waitingFinished ');
|
|
123
139
|
}
|
|
124
140
|
async disconnectedCallback() {
|
|
125
141
|
await BaseComponent.finalize(this.currentStep);
|
|
@@ -128,6 +144,10 @@ export class UserLiveness {
|
|
|
128
144
|
this.errorReason = 'Invalid';
|
|
129
145
|
this.showError = true;
|
|
130
146
|
}
|
|
147
|
+
triggerUploadFailedFlow() {
|
|
148
|
+
this.errorReason = 'Upload Failed';
|
|
149
|
+
this.showError = true;
|
|
150
|
+
}
|
|
131
151
|
render() {
|
|
132
152
|
let howTo = h("how-to-info", null);
|
|
133
153
|
let capture = h("selfie-capture", null);
|
|
@@ -165,6 +165,7 @@ export class ApiCall {
|
|
|
165
165
|
store.phoneNumber = jsonResp.phoneNumber;
|
|
166
166
|
store.flowStatus = FlowStatus[jsonResp.state];
|
|
167
167
|
store.logSteps = jsonResp.logSteps;
|
|
168
|
+
store.debug = jsonResp.debug;
|
|
168
169
|
return true;
|
|
169
170
|
}
|
|
170
171
|
async UploadFileForRequestB64(requestId, type, file) {
|
|
@@ -174,11 +175,9 @@ export class ApiCall {
|
|
|
174
175
|
data: await this.toBase64(file),
|
|
175
176
|
};
|
|
176
177
|
let respJson = await this.post(this.urls.UploadCapture, JSON.stringify(data));
|
|
177
|
-
store.
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
}
|
|
181
|
-
return true;
|
|
178
|
+
if (store.debug)
|
|
179
|
+
console.log(`apicall | uploadfileforrequestb64 | ${respJson}`);
|
|
180
|
+
return respJson;
|
|
182
181
|
}
|
|
183
182
|
async GetAgreement(agreementType) {
|
|
184
183
|
let resp = await this.get(this.urls.GetAgreement + '?type=' + agreementType + '&requestId=' + store.requestId);
|
|
@@ -494,6 +494,7 @@ class ApiCall {
|
|
|
494
494
|
state.phoneNumber = jsonResp.phoneNumber;
|
|
495
495
|
state.flowStatus = FlowStatus[jsonResp.state];
|
|
496
496
|
state.logSteps = jsonResp.logSteps;
|
|
497
|
+
state.debug = jsonResp.debug;
|
|
497
498
|
return true;
|
|
498
499
|
}
|
|
499
500
|
async UploadFileForRequestB64(requestId, type, file) {
|
|
@@ -503,11 +504,9 @@ class ApiCall {
|
|
|
503
504
|
data: await this.toBase64(file),
|
|
504
505
|
};
|
|
505
506
|
let respJson = await this.post(this.urls.UploadCapture, JSON.stringify(data));
|
|
506
|
-
state.
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
}
|
|
510
|
-
return true;
|
|
507
|
+
if (state.debug)
|
|
508
|
+
console.log(`apicall | uploadfileforrequestb64 | ${respJson}`);
|
|
509
|
+
return respJson;
|
|
511
510
|
}
|
|
512
511
|
async GetAgreement(agreementType) {
|
|
513
512
|
let resp = await this.get(this.urls.GetAgreement + '?type=' + agreementType + '&requestId=' + state.requestId);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-cf54a432.js';
|
|
2
|
-
import { A as ApiCall, T as Translations, F as FlowMoments, a as FlowSteps, s as state, S as SessionKeys, b as FlowStatus, I as IdCaptureValues, O as OrderStatuses, c as SelfieCaptureValues } from './TranslationUtils-
|
|
2
|
+
import { A as ApiCall, T as Translations, F as FlowMoments, a as FlowSteps, s as state, S as SessionKeys, b as FlowStatus, I as IdCaptureValues, O as OrderStatuses, c as SelfieCaptureValues } from './TranslationUtils-32c06882.js';
|
|
3
3
|
|
|
4
4
|
const agreementCheckCss = "";
|
|
5
5
|
|
|
@@ -4750,7 +4750,7 @@ const CaptureError = class {
|
|
|
4750
4750
|
this.eventCaptureErrorDone.emit();
|
|
4751
4751
|
}
|
|
4752
4752
|
render() {
|
|
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))))));
|
|
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), state.debug ? h("p", { class: "font-size-1" }, this.reason) : null), 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))))));
|
|
4754
4754
|
}
|
|
4755
4755
|
};
|
|
4756
4756
|
CaptureError.style = captureErrorCss;
|
|
@@ -5204,7 +5204,7 @@ function v4(options, buf, offset) {
|
|
|
5204
5204
|
}
|
|
5205
5205
|
|
|
5206
5206
|
const name = "@ekyc_qoobiss/qbs-ect-cmp";
|
|
5207
|
-
const version$1 = "3.6.
|
|
5207
|
+
const version$1 = "3.6.60";
|
|
5208
5208
|
const description = "Person Identification Component";
|
|
5209
5209
|
const main = "./dist/index.cjs.js";
|
|
5210
5210
|
const module = "./dist/index.js";
|
|
@@ -8684,6 +8684,8 @@ const ProcessId = class {
|
|
|
8684
8684
|
async captureIdImage(event) {
|
|
8685
8685
|
if (state.debug)
|
|
8686
8686
|
console.log('process-id | captureIdImage');
|
|
8687
|
+
if (this.mode == 'tilt')
|
|
8688
|
+
return;
|
|
8687
8689
|
let idPhoto = event.detail;
|
|
8688
8690
|
if (idPhoto.size == 0) {
|
|
8689
8691
|
if (state.debug)
|
|
@@ -8697,7 +8699,10 @@ const ProcessId = class {
|
|
|
8697
8699
|
var uploadResult = await ApiCall.instance.UploadFileForRequestB64(state.requestId, this.flow.capture.photoType, frontCapture);
|
|
8698
8700
|
if (state.debug)
|
|
8699
8701
|
console.log('process-id | captureIdImage | uploadResult: ' + uploadResult);
|
|
8700
|
-
if (
|
|
8702
|
+
if (uploadResult.isValid) {
|
|
8703
|
+
state.flowStatus = FlowStatus[uploadResult.state];
|
|
8704
|
+
}
|
|
8705
|
+
else {
|
|
8701
8706
|
this.switchCamera();
|
|
8702
8707
|
this.triggerErrorFlow();
|
|
8703
8708
|
}
|
|
@@ -8726,7 +8731,10 @@ const ProcessId = class {
|
|
|
8726
8731
|
var uploadResult = await ApiCall.instance.UploadFileForRequestB64(state.requestId, this.flow.capture.recType, captureRec);
|
|
8727
8732
|
if (state.debug)
|
|
8728
8733
|
console.log('process-id | capturedIdRecording | uploadResult: ' + uploadResult);
|
|
8729
|
-
if (
|
|
8734
|
+
if (uploadResult.saved) {
|
|
8735
|
+
state.flowStatus = FlowStatus[uploadResult.state];
|
|
8736
|
+
}
|
|
8737
|
+
else {
|
|
8730
8738
|
this.triggerErrorFlow();
|
|
8731
8739
|
}
|
|
8732
8740
|
this.recordingResultCount = 0;
|
|
@@ -8735,17 +8743,23 @@ const ProcessId = class {
|
|
|
8735
8743
|
if (state.debug)
|
|
8736
8744
|
console.log('process-id | verificationFinished');
|
|
8737
8745
|
this.verificationReceived = Date.now();
|
|
8738
|
-
|
|
8746
|
+
let initialStatus = state.flowStatus;
|
|
8747
|
+
let statusChanged = false;
|
|
8748
|
+
while (Date.now() - this.verificationReceived < 25000 && !statusChanged) {
|
|
8739
8749
|
await delay(2000);
|
|
8750
|
+
statusChanged = initialStatus != state.flowStatus;
|
|
8751
|
+
}
|
|
8752
|
+
if (!statusChanged) {
|
|
8740
8753
|
let currentStatus = await ApiCall.instance.GetFlowState();
|
|
8741
8754
|
if (currentStatus != state.flowStatus) {
|
|
8742
8755
|
state.flowStatus = currentStatus;
|
|
8743
|
-
|
|
8756
|
+
}
|
|
8757
|
+
else {
|
|
8758
|
+
this.triggerUploadFailedFlow();
|
|
8744
8759
|
}
|
|
8745
8760
|
}
|
|
8746
8761
|
if (state.debug)
|
|
8747
8762
|
console.log('process-id | verificationFinished | waitingFinished ');
|
|
8748
|
-
this.triggerErrorFlow();
|
|
8749
8763
|
}
|
|
8750
8764
|
async componentDidLoad() {
|
|
8751
8765
|
if (state.debug)
|
|
@@ -8756,6 +8770,10 @@ const ProcessId = class {
|
|
|
8756
8770
|
this.errorReason = 'Invalid';
|
|
8757
8771
|
this.showInvalid = true;
|
|
8758
8772
|
}
|
|
8773
|
+
triggerUploadFailedFlow() {
|
|
8774
|
+
this.errorReason = 'Upload Failed';
|
|
8775
|
+
this.showInvalid = true;
|
|
8776
|
+
}
|
|
8759
8777
|
async disconnectedCallback() {
|
|
8760
8778
|
if (state.debug)
|
|
8761
8779
|
console.log('process-id | disconnectedCallback');
|
|
@@ -9070,7 +9088,10 @@ const UserLiveness = class {
|
|
|
9070
9088
|
try {
|
|
9071
9089
|
var uploadPhoto = new File([selfiePhoto], this.flow.capture.fileName, { type: 'image/png' });
|
|
9072
9090
|
let photoUploaded = await ApiCall.instance.UploadFileForRequestB64(state.requestId, this.flow.capture.photoType, uploadPhoto);
|
|
9073
|
-
if (
|
|
9091
|
+
if (photoUploaded.isValid) {
|
|
9092
|
+
state.flowStatus = FlowStatus[photoUploaded.state];
|
|
9093
|
+
}
|
|
9094
|
+
else {
|
|
9074
9095
|
this.triggerErrorFlow();
|
|
9075
9096
|
}
|
|
9076
9097
|
}
|
|
@@ -9094,7 +9115,10 @@ const UserLiveness = class {
|
|
|
9094
9115
|
try {
|
|
9095
9116
|
let uploadRec = new File([selfieRecording], this.flow.capture.recName + mimeType.extension, { type: mimeType.type });
|
|
9096
9117
|
let uplodDone = await ApiCall.instance.UploadFileForRequestB64(state.requestId, this.flow.capture.recType, uploadRec);
|
|
9097
|
-
if (
|
|
9118
|
+
if (uplodDone.saved) {
|
|
9119
|
+
state.flowStatus = FlowStatus[uplodDone.state];
|
|
9120
|
+
}
|
|
9121
|
+
else {
|
|
9098
9122
|
this.triggerErrorFlow();
|
|
9099
9123
|
}
|
|
9100
9124
|
}
|
|
@@ -9109,16 +9133,26 @@ const UserLiveness = class {
|
|
|
9109
9133
|
}
|
|
9110
9134
|
}
|
|
9111
9135
|
async verificationFinished() {
|
|
9136
|
+
if (state.debug)
|
|
9137
|
+
console.log('user-liveness | verificationFinished');
|
|
9112
9138
|
this.verificationReceived = Date.now();
|
|
9113
|
-
|
|
9139
|
+
let initialStatus = state.flowStatus;
|
|
9140
|
+
let statusChanged = false;
|
|
9141
|
+
while (Date.now() - this.verificationReceived < 25000 && !statusChanged) {
|
|
9114
9142
|
await delay(2000);
|
|
9143
|
+
statusChanged = initialStatus != state.flowStatus;
|
|
9144
|
+
}
|
|
9145
|
+
if (!statusChanged) {
|
|
9115
9146
|
let currentStatus = await ApiCall.instance.GetFlowState();
|
|
9116
9147
|
if (currentStatus != state.flowStatus) {
|
|
9117
9148
|
state.flowStatus = currentStatus;
|
|
9118
|
-
|
|
9149
|
+
}
|
|
9150
|
+
else {
|
|
9151
|
+
this.triggerUploadFailedFlow();
|
|
9119
9152
|
}
|
|
9120
9153
|
}
|
|
9121
|
-
|
|
9154
|
+
if (state.debug)
|
|
9155
|
+
console.log('user-liveness | verificationFinished | waitingFinished ');
|
|
9122
9156
|
}
|
|
9123
9157
|
async disconnectedCallback() {
|
|
9124
9158
|
await BaseComponent.finalize(this.currentStep);
|
|
@@ -9127,6 +9161,10 @@ const UserLiveness = class {
|
|
|
9127
9161
|
this.errorReason = 'Invalid';
|
|
9128
9162
|
this.showError = true;
|
|
9129
9163
|
}
|
|
9164
|
+
triggerUploadFailedFlow() {
|
|
9165
|
+
this.errorReason = 'Upload Failed';
|
|
9166
|
+
this.showError = true;
|
|
9167
|
+
}
|
|
9130
9168
|
render() {
|
|
9131
9169
|
let howTo = h("how-to-info", null);
|
|
9132
9170
|
let capture = h("selfie-capture", null);
|