@ekyc_qoobiss/qbs-ect-cmp 3.3.1 → 3.3.3
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_18.cjs.entry.js +99 -31
- package/dist/collection/components/common/camera-error/camera-error.js +3 -1
- package/dist/collection/components/common/id-back-capture/id-back-capture.js +17 -4
- package/dist/collection/components/common/id-capture/id-capture.js +17 -4
- package/dist/collection/components/common/selfie-capture/selfie-capture.js +17 -4
- package/dist/collection/components/flow/agreement-info/agreement-info.js +3 -1
- package/dist/collection/components/flow/error-end/error-end.js +1 -5
- package/dist/collection/components/flow/id-double-side/id-double-side.js +3 -1
- package/dist/collection/components/flow/id-single-side/id-single-side.js +3 -1
- package/dist/collection/components/flow/landing-validation/landing-validation.js +3 -2
- package/dist/collection/components/flow/mobile-redirect/mobile-redirect.js +3 -1
- package/dist/collection/components/flow/sms-code-validation/sms-code-validation.js +3 -1
- package/dist/collection/components/flow/user-liveness/user-liveness.js +3 -1
- package/dist/collection/components/identification-component/identification-component.js +1 -1
- package/dist/collection/helpers/ApiCall.js +63 -7
- package/dist/esm/agreement-check_18.entry.js +99 -31
- package/dist/qbs-ect-cmp/{p-419e65b4.entry.js → p-21b40971.entry.js} +2 -2
- package/dist/qbs-ect-cmp/qbs-ect-cmp.esm.js +1 -1
- package/dist/types/components/common/camera-error/camera-error.d.ts +1 -0
- package/dist/types/components/common/id-back-capture/id-back-capture.d.ts +1 -0
- package/dist/types/components/common/id-capture/id-capture.d.ts +1 -0
- package/dist/types/components/common/selfie-capture/selfie-capture.d.ts +1 -0
- package/dist/types/components/flow/agreement-info/agreement-info.d.ts +1 -0
- package/dist/types/components/flow/id-double-side/id-double-side.d.ts +1 -0
- package/dist/types/components/flow/id-single-side/id-single-side.d.ts +1 -0
- package/dist/types/components/flow/landing-validation/landing-validation.d.ts +1 -0
- package/dist/types/components/flow/mobile-redirect/mobile-redirect.d.ts +1 -0
- package/dist/types/components/flow/sms-code-validation/sms-code-validation.d.ts +1 -0
- package/dist/types/components/flow/user-liveness/user-liveness.d.ts +1 -0
- package/dist/types/components.d.ts +3 -0
- package/dist/types/helpers/ApiCall.d.ts +1 -0
- package/package.json +1 -1
|
@@ -439,6 +439,30 @@ class ApiCall {
|
|
|
439
439
|
});
|
|
440
440
|
this.urls = new ApiUrls();
|
|
441
441
|
}
|
|
442
|
+
async http2(method, url, data) {
|
|
443
|
+
return new Promise((resolve, reject) => {
|
|
444
|
+
var xhr = new XMLHttpRequest();
|
|
445
|
+
xhr.open(method, url);
|
|
446
|
+
xhr.onload = function () {
|
|
447
|
+
if (xhr.status >= 200 && xhr.status < 300) {
|
|
448
|
+
resolve(xhr.response);
|
|
449
|
+
}
|
|
450
|
+
else {
|
|
451
|
+
reject({
|
|
452
|
+
status: xhr.status,
|
|
453
|
+
statusText: xhr.statusText,
|
|
454
|
+
});
|
|
455
|
+
}
|
|
456
|
+
};
|
|
457
|
+
xhr.onerror = function () {
|
|
458
|
+
reject({
|
|
459
|
+
status: xhr.status,
|
|
460
|
+
statusText: xhr.statusText,
|
|
461
|
+
});
|
|
462
|
+
};
|
|
463
|
+
xhr.send(data);
|
|
464
|
+
});
|
|
465
|
+
}
|
|
442
466
|
async http(request) {
|
|
443
467
|
const response = await fetch(request);
|
|
444
468
|
if (!response.ok) {
|
|
@@ -452,24 +476,56 @@ class ApiCall {
|
|
|
452
476
|
throw new Error('No json found in response ' + ex);
|
|
453
477
|
}
|
|
454
478
|
}
|
|
455
|
-
async post(url, data) {
|
|
456
|
-
|
|
479
|
+
async post(url, data, withRetry = true) {
|
|
480
|
+
var request = new Request(state.apiBaseUrl + url, {
|
|
457
481
|
method: 'POST',
|
|
458
482
|
body: data,
|
|
459
483
|
headers: {
|
|
460
484
|
'Content-Type': 'application/json',
|
|
461
485
|
'Authorization': 'IDKYC-TOKEN ' + state.token,
|
|
462
486
|
},
|
|
463
|
-
})
|
|
487
|
+
});
|
|
488
|
+
try {
|
|
489
|
+
return await this.http(request);
|
|
490
|
+
}
|
|
491
|
+
catch (ex) {
|
|
492
|
+
this.AddLog('Error in post ', ex);
|
|
493
|
+
if (!withRetry) {
|
|
494
|
+
throw ex;
|
|
495
|
+
}
|
|
496
|
+
try {
|
|
497
|
+
return await this.http(request);
|
|
498
|
+
}
|
|
499
|
+
catch (ex2) {
|
|
500
|
+
this.AddLog('Error in post ', ex2);
|
|
501
|
+
return await this.http2('POST', state.apiBaseUrl + url, data);
|
|
502
|
+
}
|
|
503
|
+
}
|
|
464
504
|
}
|
|
465
|
-
async get(url) {
|
|
466
|
-
|
|
505
|
+
async get(url, withRetry = true) {
|
|
506
|
+
var request = new Request(state.apiBaseUrl + url, {
|
|
467
507
|
method: 'GET',
|
|
468
508
|
headers: {
|
|
469
509
|
'Content-Type': 'application/json',
|
|
470
510
|
'Authorization': 'IDKYC-TOKEN ' + state.token,
|
|
471
511
|
},
|
|
472
|
-
})
|
|
512
|
+
});
|
|
513
|
+
try {
|
|
514
|
+
return await this.http(request);
|
|
515
|
+
}
|
|
516
|
+
catch (ex) {
|
|
517
|
+
this.AddLog('Error in get ', ex);
|
|
518
|
+
if (!withRetry) {
|
|
519
|
+
throw ex;
|
|
520
|
+
}
|
|
521
|
+
try {
|
|
522
|
+
return await this.http(request);
|
|
523
|
+
}
|
|
524
|
+
catch (ex2) {
|
|
525
|
+
this.AddLog('Error in get ', ex2);
|
|
526
|
+
return await this.http2('GET', state.apiBaseUrl + url, '');
|
|
527
|
+
}
|
|
528
|
+
}
|
|
473
529
|
}
|
|
474
530
|
async SendOTPCode(requestId, phoneNumber) {
|
|
475
531
|
let data = { requestId: requestId, phone: phoneNumber };
|
|
@@ -544,7 +600,7 @@ class ApiCall {
|
|
|
544
600
|
action: FlowStatus[state.flowStatus],
|
|
545
601
|
message: JSON.stringify({ error, context }),
|
|
546
602
|
};
|
|
547
|
-
let result = await this.post(this.urls.AddLog, JSON.stringify(data));
|
|
603
|
+
let result = await this.post(this.urls.AddLog, JSON.stringify(data), false);
|
|
548
604
|
return result.saved;
|
|
549
605
|
}
|
|
550
606
|
catch (_a) { }
|
|
@@ -826,9 +882,11 @@ const AgreementInfo = class {
|
|
|
826
882
|
this.openAgreements = false;
|
|
827
883
|
this.openTerms = false;
|
|
828
884
|
}
|
|
885
|
+
disconnectedCallback() {
|
|
886
|
+
this.baseComponent.finalize();
|
|
887
|
+
}
|
|
829
888
|
async buttonClick() {
|
|
830
889
|
if (this.agreementsChecked && this.termsChecked) {
|
|
831
|
-
await this.baseComponent.finalize();
|
|
832
890
|
state.flowStatus = FlowStatus.PHONE;
|
|
833
891
|
}
|
|
834
892
|
}
|
|
@@ -5432,9 +5490,11 @@ const CameraError = class {
|
|
|
5432
5490
|
}
|
|
5433
5491
|
}
|
|
5434
5492
|
}
|
|
5493
|
+
disconnectedCallback() {
|
|
5494
|
+
this.baseComponent.finalize();
|
|
5495
|
+
}
|
|
5435
5496
|
async buttonClick() {
|
|
5436
5497
|
this.buttonDisabled = true;
|
|
5437
|
-
await this.baseComponent.finalize();
|
|
5438
5498
|
if (state.device.mobileOS == MobileOS.iOS) {
|
|
5439
5499
|
sessionStorage.setItem(SessionKeys.RefreshDoneKey, 'true');
|
|
5440
5500
|
window.location.reload();
|
|
@@ -5523,10 +5583,7 @@ const ErrorEnd = class {
|
|
|
5523
5583
|
this.message = undefined;
|
|
5524
5584
|
this.errorTitle = undefined;
|
|
5525
5585
|
}
|
|
5526
|
-
componentDidLoad() {
|
|
5527
|
-
Events.init(window);
|
|
5528
|
-
Events.flowError(this.errorTitle + ' ' + this.message);
|
|
5529
|
-
}
|
|
5586
|
+
componentDidLoad() { }
|
|
5530
5587
|
render() {
|
|
5531
5588
|
return (index.h("div", { class: "container" }, index.h("div", { class: "row" }, index.h("div", { class: "text-center" }, index.h("h1", null, this.errorTitle)), index.h("div", { class: "text-center" }, index.h("p", null, state.requestId)), index.h("div", null, index.h("p", { class: "color-red font-weight-bold font-size-2 text-center mt-10" }, this.message)))));
|
|
5532
5589
|
}
|
|
@@ -5706,6 +5763,7 @@ const IdBackCapture = class {
|
|
|
5706
5763
|
constructor(hostRef) {
|
|
5707
5764
|
index.registerInstance(this, hostRef);
|
|
5708
5765
|
this.eventPhotoCapture = index.createEvent(this, "photoIdBackCapture", 7);
|
|
5766
|
+
this.apiErrorEvent = index.createEvent(this, "apiError", 7);
|
|
5709
5767
|
this.photoIsReady = photos => {
|
|
5710
5768
|
//this.closeCamera();
|
|
5711
5769
|
this.eventPhotoCapture.emit(photos);
|
|
@@ -5735,10 +5793,9 @@ const IdBackCapture = class {
|
|
|
5735
5793
|
this.cameraSize = event.detail;
|
|
5736
5794
|
}
|
|
5737
5795
|
async componentWillLoad() {
|
|
5738
|
-
Events.init(this.component);
|
|
5739
5796
|
//this.videoDemoStyle = this.device.isMobile ? { width: window.screen.width + 'px', height: window.screen.height + 'px', 'object-fit': 'fill' } : {};
|
|
5740
5797
|
if (!navigator.mediaDevices) {
|
|
5741
|
-
|
|
5798
|
+
this.apiErrorEvent.emit({ message: 'This browser does not support webRTC' });
|
|
5742
5799
|
}
|
|
5743
5800
|
}
|
|
5744
5801
|
async componentDidLoad() {
|
|
@@ -5764,7 +5821,7 @@ const IdBackCapture = class {
|
|
|
5764
5821
|
})
|
|
5765
5822
|
.catch(e => {
|
|
5766
5823
|
this.closeCamera();
|
|
5767
|
-
|
|
5824
|
+
this.apiErrorEvent.emit(e);
|
|
5768
5825
|
});
|
|
5769
5826
|
}, 100);
|
|
5770
5827
|
}
|
|
@@ -5820,6 +5877,7 @@ const IdCapture = class {
|
|
|
5820
5877
|
constructor(hostRef) {
|
|
5821
5878
|
index.registerInstance(this, hostRef);
|
|
5822
5879
|
this.eventPhotoCapture = index.createEvent(this, "photoIdCapture", 7);
|
|
5880
|
+
this.apiErrorEvent = index.createEvent(this, "apiError", 7);
|
|
5823
5881
|
this.photoIsReady = photos => {
|
|
5824
5882
|
//this.closeCamera();
|
|
5825
5883
|
this.eventPhotoCapture.emit(photos);
|
|
@@ -5849,11 +5907,10 @@ const IdCapture = class {
|
|
|
5849
5907
|
this.cameraSize = event.detail;
|
|
5850
5908
|
}
|
|
5851
5909
|
async componentWillLoad() {
|
|
5852
|
-
Events.init(this.component);
|
|
5853
5910
|
this.titleMesage = IdCaptureValues.Title;
|
|
5854
5911
|
//this.videoDemoStyle = this.device.isMobile ? { 'width': window.screen.width + 'px', 'height': window.screen.height + 'px', 'object-fit': 'fill' } : {};
|
|
5855
5912
|
if (!navigator.mediaDevices) {
|
|
5856
|
-
|
|
5913
|
+
this.apiErrorEvent.emit({ message: 'This browser does not support webRTC' });
|
|
5857
5914
|
}
|
|
5858
5915
|
}
|
|
5859
5916
|
async componentDidLoad() {
|
|
@@ -5874,7 +5931,7 @@ const IdCapture = class {
|
|
|
5874
5931
|
})
|
|
5875
5932
|
.catch(e => {
|
|
5876
5933
|
this.closeCamera();
|
|
5877
|
-
|
|
5934
|
+
this.apiErrorEvent.emit(e);
|
|
5878
5935
|
});
|
|
5879
5936
|
}, 100);
|
|
5880
5937
|
}
|
|
@@ -6094,9 +6151,11 @@ const IdDoubleSide = class {
|
|
|
6094
6151
|
return;
|
|
6095
6152
|
}
|
|
6096
6153
|
state.recordingRetryCount = 0;
|
|
6097
|
-
await this.baseComponent.finalize();
|
|
6098
6154
|
state.flowStatus = FlowStatus.LIVENESS;
|
|
6099
6155
|
}
|
|
6156
|
+
disconnectedCallback() {
|
|
6157
|
+
this.baseComponent.finalize();
|
|
6158
|
+
}
|
|
6100
6159
|
switchCamera() {
|
|
6101
6160
|
if (this.captureRetryCount == 1) {
|
|
6102
6161
|
let camIndex = state.cameraIds.indexOf(state.cameraId);
|
|
@@ -6225,9 +6284,11 @@ const IdSingleSide = class {
|
|
|
6225
6284
|
if (!this.idFlow.verificationFinished) {
|
|
6226
6285
|
return;
|
|
6227
6286
|
}
|
|
6228
|
-
await this.baseComponent.finalize();
|
|
6229
6287
|
state.flowStatus = FlowStatus.LIVENESS;
|
|
6230
6288
|
}
|
|
6289
|
+
disconnectedCallback() {
|
|
6290
|
+
this.baseComponent.finalize();
|
|
6291
|
+
}
|
|
6231
6292
|
switchCamera() {
|
|
6232
6293
|
if (this.captureRetryCount == 1) {
|
|
6233
6294
|
let camIndex = state.cameraIds.indexOf(state.cameraId);
|
|
@@ -6313,7 +6374,7 @@ function v4(options, buf, offset) {
|
|
|
6313
6374
|
}
|
|
6314
6375
|
|
|
6315
6376
|
const name = "@ekyc_qoobiss/qbs-ect-cmp";
|
|
6316
|
-
const version$1 = "3.3.
|
|
6377
|
+
const version$1 = "3.3.3";
|
|
6317
6378
|
const description = "Person Identification Component";
|
|
6318
6379
|
const main = "./dist/index.cjs.js";
|
|
6319
6380
|
const module$1 = "./dist/index.js";
|
|
@@ -6475,7 +6536,7 @@ const IdentificationComponent = class {
|
|
|
6475
6536
|
await this.baseComponent.apiCall.AddLog(apiLogData, getLogMessage(this.order_id, this.redirect_id, this.token));
|
|
6476
6537
|
}
|
|
6477
6538
|
catch (_c) { }
|
|
6478
|
-
Events.flowError(
|
|
6539
|
+
Events.flowError(this.errorTitle);
|
|
6479
6540
|
state.flowStatus = FlowStatus.ERROREND;
|
|
6480
6541
|
}
|
|
6481
6542
|
constructor(hostRef) {
|
|
@@ -6703,7 +6764,6 @@ const LandingValidation = class {
|
|
|
6703
6764
|
state.flowStatus = FlowStatus.COMPLETE;
|
|
6704
6765
|
return;
|
|
6705
6766
|
}
|
|
6706
|
-
await this.baseComponent.finalize();
|
|
6707
6767
|
if (!(await Cameras.InitCameras(state.device))) {
|
|
6708
6768
|
if (state.device.mobileOS == MobileOS.iOS)
|
|
6709
6769
|
sessionStorage.setItem(SessionKeys.RefreshDoneKey, 'false');
|
|
@@ -6720,13 +6780,15 @@ const LandingValidation = class {
|
|
|
6720
6780
|
}
|
|
6721
6781
|
}
|
|
6722
6782
|
}
|
|
6783
|
+
disconnectedCallback() {
|
|
6784
|
+
this.baseComponent.finalize();
|
|
6785
|
+
}
|
|
6723
6786
|
async leaveFlow() {
|
|
6724
6787
|
if (this.buttonDisabled)
|
|
6725
6788
|
return;
|
|
6726
6789
|
state.initialised = false;
|
|
6727
6790
|
try {
|
|
6728
6791
|
await this.baseComponent.apiCall.AbortRequest();
|
|
6729
|
-
await this.baseComponent.finalize();
|
|
6730
6792
|
Events.flowAborted();
|
|
6731
6793
|
}
|
|
6732
6794
|
catch (e) {
|
|
@@ -9665,7 +9727,6 @@ const MobileRedirect = class {
|
|
|
9665
9727
|
this.orderStatus = await this.baseComponent.apiCall.GetStatus(state.requestId);
|
|
9666
9728
|
if (this.orderStatus == OrderStatuses.FinishedCapturing) {
|
|
9667
9729
|
this.waitingMobile = false;
|
|
9668
|
-
await this.baseComponent.finalize();
|
|
9669
9730
|
state.flowStatus = FlowStatus.COMPLETE;
|
|
9670
9731
|
}
|
|
9671
9732
|
if (this.orderStatus == OrderStatuses.NotFound) {
|
|
@@ -9681,6 +9742,9 @@ const MobileRedirect = class {
|
|
|
9681
9742
|
Events.flowAborted();
|
|
9682
9743
|
}
|
|
9683
9744
|
}
|
|
9745
|
+
disconnectedCallback() {
|
|
9746
|
+
this.baseComponent.finalize();
|
|
9747
|
+
}
|
|
9684
9748
|
async buttonClick() {
|
|
9685
9749
|
if (this.contact == '' || this.contact.length != 10) {
|
|
9686
9750
|
return;
|
|
@@ -9716,6 +9780,7 @@ const SelfieCapture = class {
|
|
|
9716
9780
|
constructor(hostRef) {
|
|
9717
9781
|
index.registerInstance(this, hostRef);
|
|
9718
9782
|
this.eventPhotoCapture = index.createEvent(this, "photoSelfieCapture", 7);
|
|
9783
|
+
this.apiErrorEvent = index.createEvent(this, "apiError", 7);
|
|
9719
9784
|
this.photoIsReady = photos => {
|
|
9720
9785
|
//this.closeCamera();
|
|
9721
9786
|
this.eventPhotoCapture.emit(photos);
|
|
@@ -9757,11 +9822,10 @@ const SelfieCapture = class {
|
|
|
9757
9822
|
this.captureWidth = Math.round((this.captureHeight * 9) / 16);
|
|
9758
9823
|
}
|
|
9759
9824
|
componentWillLoad() {
|
|
9760
|
-
Events.init(this.component);
|
|
9761
9825
|
this.titleMesage = SelfieCaptureValues.Title;
|
|
9762
9826
|
//this.videoDemoStyle = this.device.isMobile ? { 'width': window.screen.width + 'px', 'height': window.screen.height + 'px', 'object-fit': 'fill' } : {};
|
|
9763
9827
|
if (!navigator.mediaDevices) {
|
|
9764
|
-
|
|
9828
|
+
this.apiErrorEvent.emit({ message: 'This browser does not support webRTC' });
|
|
9765
9829
|
}
|
|
9766
9830
|
}
|
|
9767
9831
|
async componentDidLoad() {
|
|
@@ -9782,7 +9846,7 @@ const SelfieCapture = class {
|
|
|
9782
9846
|
})
|
|
9783
9847
|
.catch(e => {
|
|
9784
9848
|
this.closeCamera();
|
|
9785
|
-
|
|
9849
|
+
this.apiErrorEvent.emit(e);
|
|
9786
9850
|
});
|
|
9787
9851
|
}, 100);
|
|
9788
9852
|
}
|
|
@@ -9859,7 +9923,6 @@ const SmsCodeValidation = class {
|
|
|
9859
9923
|
async doAction() {
|
|
9860
9924
|
try {
|
|
9861
9925
|
this.canSend = false;
|
|
9862
|
-
await this.baseComponent.finalize();
|
|
9863
9926
|
if (state.flowStatus == FlowStatus.CODE || state.flowStatus == FlowStatus.CODEERROR) {
|
|
9864
9927
|
var codeChecked = await this.baseComponent.apiCall.CheckOTPCode(state.requestId, this.code);
|
|
9865
9928
|
if (codeChecked === true) {
|
|
@@ -9880,6 +9943,9 @@ const SmsCodeValidation = class {
|
|
|
9880
9943
|
this.apiErrorEvent.emit(e);
|
|
9881
9944
|
}
|
|
9882
9945
|
}
|
|
9946
|
+
disconnectedCallback() {
|
|
9947
|
+
this.baseComponent.finalize();
|
|
9948
|
+
}
|
|
9883
9949
|
componentWillRender() {
|
|
9884
9950
|
if (state.flowStatus == FlowStatus.PHONE) {
|
|
9885
9951
|
this.title = PhoneValidationValues.Title;
|
|
@@ -10009,6 +10075,9 @@ const UserLiveness = class {
|
|
|
10009
10075
|
this.selfieFlow.verificationFinished = true;
|
|
10010
10076
|
await this.endFlow();
|
|
10011
10077
|
}
|
|
10078
|
+
disconnectedCallback() {
|
|
10079
|
+
this.baseComponent.finalize();
|
|
10080
|
+
}
|
|
10012
10081
|
async uploadPhoto() {
|
|
10013
10082
|
if (this.selfieFlow.photoFile == null || this.selfieFlow.photoDone) {
|
|
10014
10083
|
return;
|
|
@@ -10049,7 +10118,6 @@ const UserLiveness = class {
|
|
|
10049
10118
|
return;
|
|
10050
10119
|
}
|
|
10051
10120
|
state.recordingRetryCount = 0;
|
|
10052
|
-
await this.baseComponent.finalize();
|
|
10053
10121
|
state.flowStatus = FlowStatus.COMPLETE;
|
|
10054
10122
|
}
|
|
10055
10123
|
render() {
|
|
@@ -35,9 +35,11 @@ export class CameraError {
|
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
+
disconnectedCallback() {
|
|
39
|
+
this.baseComponent.finalize();
|
|
40
|
+
}
|
|
38
41
|
async buttonClick() {
|
|
39
42
|
this.buttonDisabled = true;
|
|
40
|
-
await this.baseComponent.finalize();
|
|
41
43
|
if (store.device.mobileOS == MobileOS.iOS) {
|
|
42
44
|
sessionStorage.setItem(SessionKeys.RefreshDoneKey, 'true');
|
|
43
45
|
window.location.reload();
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { h } from '@stencil/core';
|
|
2
|
-
import Events from '../../../helpers/Events';
|
|
3
2
|
import { Cameras } from '../../../helpers/Cameras';
|
|
4
3
|
import { Stream } from '../../../helpers/Stream';
|
|
5
4
|
import { IdCaptureValues } from '../../../helpers/textValues';
|
|
@@ -41,10 +40,9 @@ export class IdBackCapture {
|
|
|
41
40
|
this.cameraSize = event.detail;
|
|
42
41
|
}
|
|
43
42
|
async componentWillLoad() {
|
|
44
|
-
Events.init(this.component);
|
|
45
43
|
//this.videoDemoStyle = this.device.isMobile ? { width: window.screen.width + 'px', height: window.screen.height + 'px', 'object-fit': 'fill' } : {};
|
|
46
44
|
if (!navigator.mediaDevices) {
|
|
47
|
-
|
|
45
|
+
this.apiErrorEvent.emit({ message: 'This browser does not support webRTC' });
|
|
48
46
|
}
|
|
49
47
|
}
|
|
50
48
|
async componentDidLoad() {
|
|
@@ -70,7 +68,7 @@ export class IdBackCapture {
|
|
|
70
68
|
})
|
|
71
69
|
.catch(e => {
|
|
72
70
|
this.closeCamera();
|
|
73
|
-
|
|
71
|
+
this.apiErrorEvent.emit(e);
|
|
74
72
|
});
|
|
75
73
|
}, 100);
|
|
76
74
|
}
|
|
@@ -153,6 +151,21 @@ export class IdBackCapture {
|
|
|
153
151
|
"resolved": "any",
|
|
154
152
|
"references": {}
|
|
155
153
|
}
|
|
154
|
+
}, {
|
|
155
|
+
"method": "apiErrorEvent",
|
|
156
|
+
"name": "apiError",
|
|
157
|
+
"bubbles": true,
|
|
158
|
+
"cancelable": true,
|
|
159
|
+
"composed": true,
|
|
160
|
+
"docs": {
|
|
161
|
+
"tags": [],
|
|
162
|
+
"text": ""
|
|
163
|
+
},
|
|
164
|
+
"complexType": {
|
|
165
|
+
"original": "any",
|
|
166
|
+
"resolved": "any",
|
|
167
|
+
"references": {}
|
|
168
|
+
}
|
|
156
169
|
}];
|
|
157
170
|
}
|
|
158
171
|
static get elementRef() { return "component"; }
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { h } from '@stencil/core';
|
|
2
|
-
import Events from '../../../helpers/Events';
|
|
3
2
|
import { Cameras } from '../../../helpers/Cameras';
|
|
4
3
|
import { Stream } from '../../../helpers/Stream';
|
|
5
4
|
import { IdCaptureValues } from '../../../helpers/textValues';
|
|
@@ -41,11 +40,10 @@ export class IdCapture {
|
|
|
41
40
|
this.cameraSize = event.detail;
|
|
42
41
|
}
|
|
43
42
|
async componentWillLoad() {
|
|
44
|
-
Events.init(this.component);
|
|
45
43
|
this.titleMesage = IdCaptureValues.Title;
|
|
46
44
|
//this.videoDemoStyle = this.device.isMobile ? { 'width': window.screen.width + 'px', 'height': window.screen.height + 'px', 'object-fit': 'fill' } : {};
|
|
47
45
|
if (!navigator.mediaDevices) {
|
|
48
|
-
|
|
46
|
+
this.apiErrorEvent.emit({ message: 'This browser does not support webRTC' });
|
|
49
47
|
}
|
|
50
48
|
}
|
|
51
49
|
async componentDidLoad() {
|
|
@@ -66,7 +64,7 @@ export class IdCapture {
|
|
|
66
64
|
})
|
|
67
65
|
.catch(e => {
|
|
68
66
|
this.closeCamera();
|
|
69
|
-
|
|
67
|
+
this.apiErrorEvent.emit(e);
|
|
70
68
|
});
|
|
71
69
|
}, 100);
|
|
72
70
|
}
|
|
@@ -154,6 +152,21 @@ export class IdCapture {
|
|
|
154
152
|
"resolved": "any",
|
|
155
153
|
"references": {}
|
|
156
154
|
}
|
|
155
|
+
}, {
|
|
156
|
+
"method": "apiErrorEvent",
|
|
157
|
+
"name": "apiError",
|
|
158
|
+
"bubbles": true,
|
|
159
|
+
"cancelable": true,
|
|
160
|
+
"composed": true,
|
|
161
|
+
"docs": {
|
|
162
|
+
"tags": [],
|
|
163
|
+
"text": ""
|
|
164
|
+
},
|
|
165
|
+
"complexType": {
|
|
166
|
+
"original": "any",
|
|
167
|
+
"resolved": "any",
|
|
168
|
+
"references": {}
|
|
169
|
+
}
|
|
157
170
|
}];
|
|
158
171
|
}
|
|
159
172
|
static get elementRef() { return "component"; }
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { h } from '@stencil/core';
|
|
2
|
-
import Events from '../../../helpers/Events';
|
|
3
2
|
import { Cameras } from '../../../helpers/Cameras';
|
|
4
3
|
import { Stream } from '../../../helpers/Stream';
|
|
5
4
|
import { SelfieCaptureValues } from '../../../helpers/textValues';
|
|
@@ -51,11 +50,10 @@ export class SelfieCapture {
|
|
|
51
50
|
this.captureWidth = Math.round((this.captureHeight * 9) / 16);
|
|
52
51
|
}
|
|
53
52
|
componentWillLoad() {
|
|
54
|
-
Events.init(this.component);
|
|
55
53
|
this.titleMesage = SelfieCaptureValues.Title;
|
|
56
54
|
//this.videoDemoStyle = this.device.isMobile ? { 'width': window.screen.width + 'px', 'height': window.screen.height + 'px', 'object-fit': 'fill' } : {};
|
|
57
55
|
if (!navigator.mediaDevices) {
|
|
58
|
-
|
|
56
|
+
this.apiErrorEvent.emit({ message: 'This browser does not support webRTC' });
|
|
59
57
|
}
|
|
60
58
|
}
|
|
61
59
|
async componentDidLoad() {
|
|
@@ -76,7 +74,7 @@ export class SelfieCapture {
|
|
|
76
74
|
})
|
|
77
75
|
.catch(e => {
|
|
78
76
|
this.closeCamera();
|
|
79
|
-
|
|
77
|
+
this.apiErrorEvent.emit(e);
|
|
80
78
|
});
|
|
81
79
|
}, 100);
|
|
82
80
|
}
|
|
@@ -165,6 +163,21 @@ export class SelfieCapture {
|
|
|
165
163
|
"resolved": "any",
|
|
166
164
|
"references": {}
|
|
167
165
|
}
|
|
166
|
+
}, {
|
|
167
|
+
"method": "apiErrorEvent",
|
|
168
|
+
"name": "apiError",
|
|
169
|
+
"bubbles": true,
|
|
170
|
+
"cancelable": true,
|
|
171
|
+
"composed": true,
|
|
172
|
+
"docs": {
|
|
173
|
+
"tags": [],
|
|
174
|
+
"text": ""
|
|
175
|
+
},
|
|
176
|
+
"complexType": {
|
|
177
|
+
"original": "any",
|
|
178
|
+
"resolved": "any",
|
|
179
|
+
"references": {}
|
|
180
|
+
}
|
|
168
181
|
}];
|
|
169
182
|
}
|
|
170
183
|
static get elementRef() { return "component"; }
|
|
@@ -22,9 +22,11 @@ export class AgreementInfo {
|
|
|
22
22
|
this.openAgreements = false;
|
|
23
23
|
this.openTerms = false;
|
|
24
24
|
}
|
|
25
|
+
disconnectedCallback() {
|
|
26
|
+
this.baseComponent.finalize();
|
|
27
|
+
}
|
|
25
28
|
async buttonClick() {
|
|
26
29
|
if (this.agreementsChecked && this.termsChecked) {
|
|
27
|
-
await this.baseComponent.finalize();
|
|
28
30
|
store.flowStatus = FlowStatus.PHONE;
|
|
29
31
|
}
|
|
30
32
|
}
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import { h } from '@stencil/core';
|
|
2
|
-
import Events from '../../../helpers/Events';
|
|
3
2
|
import store from '../../../helpers/store';
|
|
4
3
|
export class ErrorEnd {
|
|
5
4
|
constructor() {
|
|
6
5
|
this.message = undefined;
|
|
7
6
|
this.errorTitle = undefined;
|
|
8
7
|
}
|
|
9
|
-
componentDidLoad() {
|
|
10
|
-
Events.init(window);
|
|
11
|
-
Events.flowError(this.errorTitle + ' ' + this.message);
|
|
12
|
-
}
|
|
8
|
+
componentDidLoad() { }
|
|
13
9
|
render() {
|
|
14
10
|
return (h("div", { class: "container" }, h("div", { class: "row" }, h("div", { class: "text-center" }, h("h1", null, this.errorTitle)), h("div", { class: "text-center" }, h("p", null, store.requestId)), h("div", null, h("p", { class: "color-red font-weight-bold font-size-2 text-center mt-10" }, this.message)))));
|
|
15
11
|
}
|
|
@@ -168,9 +168,11 @@ export class IdDoubleSide {
|
|
|
168
168
|
return;
|
|
169
169
|
}
|
|
170
170
|
store.recordingRetryCount = 0;
|
|
171
|
-
await this.baseComponent.finalize();
|
|
172
171
|
store.flowStatus = FlowStatus.LIVENESS;
|
|
173
172
|
}
|
|
173
|
+
disconnectedCallback() {
|
|
174
|
+
this.baseComponent.finalize();
|
|
175
|
+
}
|
|
174
176
|
switchCamera() {
|
|
175
177
|
if (this.captureRetryCount == 1) {
|
|
176
178
|
let camIndex = store.cameraIds.indexOf(store.cameraId);
|
|
@@ -110,9 +110,11 @@ export class IdSingleSide {
|
|
|
110
110
|
if (!this.idFlow.verificationFinished) {
|
|
111
111
|
return;
|
|
112
112
|
}
|
|
113
|
-
await this.baseComponent.finalize();
|
|
114
113
|
store.flowStatus = FlowStatus.LIVENESS;
|
|
115
114
|
}
|
|
115
|
+
disconnectedCallback() {
|
|
116
|
+
this.baseComponent.finalize();
|
|
117
|
+
}
|
|
116
118
|
switchCamera() {
|
|
117
119
|
if (this.captureRetryCount == 1) {
|
|
118
120
|
let camIndex = store.cameraIds.indexOf(store.cameraId);
|
|
@@ -50,7 +50,6 @@ export class LandingValidation {
|
|
|
50
50
|
store.flowStatus = FlowStatus.COMPLETE;
|
|
51
51
|
return;
|
|
52
52
|
}
|
|
53
|
-
await this.baseComponent.finalize();
|
|
54
53
|
if (!(await Cameras.InitCameras(store.device))) {
|
|
55
54
|
if (store.device.mobileOS == MobileOS.iOS)
|
|
56
55
|
sessionStorage.setItem(SessionKeys.RefreshDoneKey, 'false');
|
|
@@ -67,13 +66,15 @@ export class LandingValidation {
|
|
|
67
66
|
}
|
|
68
67
|
}
|
|
69
68
|
}
|
|
69
|
+
disconnectedCallback() {
|
|
70
|
+
this.baseComponent.finalize();
|
|
71
|
+
}
|
|
70
72
|
async leaveFlow() {
|
|
71
73
|
if (this.buttonDisabled)
|
|
72
74
|
return;
|
|
73
75
|
store.initialised = false;
|
|
74
76
|
try {
|
|
75
77
|
await this.baseComponent.apiCall.AbortRequest();
|
|
76
|
-
await this.baseComponent.finalize();
|
|
77
78
|
Events.flowAborted();
|
|
78
79
|
}
|
|
79
80
|
catch (e) {
|
|
@@ -56,7 +56,6 @@ export class MobileRedirect {
|
|
|
56
56
|
this.orderStatus = await this.baseComponent.apiCall.GetStatus(store.requestId);
|
|
57
57
|
if (this.orderStatus == OrderStatuses.FinishedCapturing) {
|
|
58
58
|
this.waitingMobile = false;
|
|
59
|
-
await this.baseComponent.finalize();
|
|
60
59
|
store.flowStatus = FlowStatus.COMPLETE;
|
|
61
60
|
}
|
|
62
61
|
if (this.orderStatus == OrderStatuses.NotFound) {
|
|
@@ -72,6 +71,9 @@ export class MobileRedirect {
|
|
|
72
71
|
Events.flowAborted();
|
|
73
72
|
}
|
|
74
73
|
}
|
|
74
|
+
disconnectedCallback() {
|
|
75
|
+
this.baseComponent.finalize();
|
|
76
|
+
}
|
|
75
77
|
async buttonClick() {
|
|
76
78
|
if (this.contact == '' || this.contact.length != 10) {
|
|
77
79
|
this.invalidValue == true;
|
|
@@ -24,7 +24,6 @@ export class SmsCodeValidation {
|
|
|
24
24
|
async doAction() {
|
|
25
25
|
try {
|
|
26
26
|
this.canSend = false;
|
|
27
|
-
await this.baseComponent.finalize();
|
|
28
27
|
if (store.flowStatus == FlowStatus.CODE || store.flowStatus == FlowStatus.CODEERROR) {
|
|
29
28
|
var codeChecked = await this.baseComponent.apiCall.CheckOTPCode(store.requestId, this.code);
|
|
30
29
|
if (codeChecked === true) {
|
|
@@ -45,6 +44,9 @@ export class SmsCodeValidation {
|
|
|
45
44
|
this.apiErrorEvent.emit(e);
|
|
46
45
|
}
|
|
47
46
|
}
|
|
47
|
+
disconnectedCallback() {
|
|
48
|
+
this.baseComponent.finalize();
|
|
49
|
+
}
|
|
48
50
|
componentWillRender() {
|
|
49
51
|
if (store.flowStatus == FlowStatus.PHONE) {
|
|
50
52
|
this.title = PhoneValidationValues.Title;
|
|
@@ -77,6 +77,9 @@ export class UserLiveness {
|
|
|
77
77
|
this.selfieFlow.verificationFinished = true;
|
|
78
78
|
await this.endFlow();
|
|
79
79
|
}
|
|
80
|
+
disconnectedCallback() {
|
|
81
|
+
this.baseComponent.finalize();
|
|
82
|
+
}
|
|
80
83
|
async uploadPhoto() {
|
|
81
84
|
if (this.selfieFlow.photoFile == null || this.selfieFlow.photoDone) {
|
|
82
85
|
return;
|
|
@@ -117,7 +120,6 @@ export class UserLiveness {
|
|
|
117
120
|
return;
|
|
118
121
|
}
|
|
119
122
|
store.recordingRetryCount = 0;
|
|
120
|
-
await this.baseComponent.finalize();
|
|
121
123
|
store.flowStatus = FlowStatus.COMPLETE;
|
|
122
124
|
}
|
|
123
125
|
render() {
|
|
@@ -101,7 +101,7 @@ export class IdentificationComponent {
|
|
|
101
101
|
await this.baseComponent.apiCall.AddLog(apiLogData, getLogMessage(this.order_id, this.redirect_id, this.token));
|
|
102
102
|
}
|
|
103
103
|
catch (_c) { }
|
|
104
|
-
Events.flowError(
|
|
104
|
+
Events.flowError(this.errorTitle);
|
|
105
105
|
store.flowStatus = FlowStatus.ERROREND;
|
|
106
106
|
}
|
|
107
107
|
constructor() {
|