@ekyc_qoobiss/qbs-ect-cmp 3.3.1 → 3.3.2
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 +88 -28
- 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 +52 -4
- package/dist/esm/agreement-check_18.entry.js +88 -28
- package/dist/qbs-ect-cmp/{p-419e65b4.entry.js → p-5c7d0547.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) {
|
|
@@ -453,23 +477,47 @@ class ApiCall {
|
|
|
453
477
|
}
|
|
454
478
|
}
|
|
455
479
|
async post(url, data) {
|
|
456
|
-
|
|
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
|
+
try {
|
|
494
|
+
return await this.http(request);
|
|
495
|
+
}
|
|
496
|
+
catch (ex2) {
|
|
497
|
+
return await this.http2('POST', state.apiBaseUrl + url, data);
|
|
498
|
+
}
|
|
499
|
+
}
|
|
464
500
|
}
|
|
465
501
|
async get(url) {
|
|
466
|
-
|
|
502
|
+
var request = new Request(state.apiBaseUrl + url, {
|
|
467
503
|
method: 'GET',
|
|
468
504
|
headers: {
|
|
469
505
|
'Content-Type': 'application/json',
|
|
470
506
|
'Authorization': 'IDKYC-TOKEN ' + state.token,
|
|
471
507
|
},
|
|
472
|
-
})
|
|
508
|
+
});
|
|
509
|
+
try {
|
|
510
|
+
return await this.http(request);
|
|
511
|
+
}
|
|
512
|
+
catch (ex) {
|
|
513
|
+
this.AddLog('Error in get ', ex);
|
|
514
|
+
try {
|
|
515
|
+
return await this.http(request);
|
|
516
|
+
}
|
|
517
|
+
catch (ex2) {
|
|
518
|
+
return await this.http2('GET', state.apiBaseUrl + url, '');
|
|
519
|
+
}
|
|
520
|
+
}
|
|
473
521
|
}
|
|
474
522
|
async SendOTPCode(requestId, phoneNumber) {
|
|
475
523
|
let data = { requestId: requestId, phone: phoneNumber };
|
|
@@ -826,9 +874,11 @@ const AgreementInfo = class {
|
|
|
826
874
|
this.openAgreements = false;
|
|
827
875
|
this.openTerms = false;
|
|
828
876
|
}
|
|
877
|
+
disconnectedCallback() {
|
|
878
|
+
this.baseComponent.finalize();
|
|
879
|
+
}
|
|
829
880
|
async buttonClick() {
|
|
830
881
|
if (this.agreementsChecked && this.termsChecked) {
|
|
831
|
-
await this.baseComponent.finalize();
|
|
832
882
|
state.flowStatus = FlowStatus.PHONE;
|
|
833
883
|
}
|
|
834
884
|
}
|
|
@@ -5432,9 +5482,11 @@ const CameraError = class {
|
|
|
5432
5482
|
}
|
|
5433
5483
|
}
|
|
5434
5484
|
}
|
|
5485
|
+
disconnectedCallback() {
|
|
5486
|
+
this.baseComponent.finalize();
|
|
5487
|
+
}
|
|
5435
5488
|
async buttonClick() {
|
|
5436
5489
|
this.buttonDisabled = true;
|
|
5437
|
-
await this.baseComponent.finalize();
|
|
5438
5490
|
if (state.device.mobileOS == MobileOS.iOS) {
|
|
5439
5491
|
sessionStorage.setItem(SessionKeys.RefreshDoneKey, 'true');
|
|
5440
5492
|
window.location.reload();
|
|
@@ -5523,10 +5575,7 @@ const ErrorEnd = class {
|
|
|
5523
5575
|
this.message = undefined;
|
|
5524
5576
|
this.errorTitle = undefined;
|
|
5525
5577
|
}
|
|
5526
|
-
componentDidLoad() {
|
|
5527
|
-
Events.init(window);
|
|
5528
|
-
Events.flowError(this.errorTitle + ' ' + this.message);
|
|
5529
|
-
}
|
|
5578
|
+
componentDidLoad() { }
|
|
5530
5579
|
render() {
|
|
5531
5580
|
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
5581
|
}
|
|
@@ -5706,6 +5755,7 @@ const IdBackCapture = class {
|
|
|
5706
5755
|
constructor(hostRef) {
|
|
5707
5756
|
index.registerInstance(this, hostRef);
|
|
5708
5757
|
this.eventPhotoCapture = index.createEvent(this, "photoIdBackCapture", 7);
|
|
5758
|
+
this.apiErrorEvent = index.createEvent(this, "apiError", 7);
|
|
5709
5759
|
this.photoIsReady = photos => {
|
|
5710
5760
|
//this.closeCamera();
|
|
5711
5761
|
this.eventPhotoCapture.emit(photos);
|
|
@@ -5735,10 +5785,9 @@ const IdBackCapture = class {
|
|
|
5735
5785
|
this.cameraSize = event.detail;
|
|
5736
5786
|
}
|
|
5737
5787
|
async componentWillLoad() {
|
|
5738
|
-
Events.init(this.component);
|
|
5739
5788
|
//this.videoDemoStyle = this.device.isMobile ? { width: window.screen.width + 'px', height: window.screen.height + 'px', 'object-fit': 'fill' } : {};
|
|
5740
5789
|
if (!navigator.mediaDevices) {
|
|
5741
|
-
|
|
5790
|
+
this.apiErrorEvent.emit({ message: 'This browser does not support webRTC' });
|
|
5742
5791
|
}
|
|
5743
5792
|
}
|
|
5744
5793
|
async componentDidLoad() {
|
|
@@ -5764,7 +5813,7 @@ const IdBackCapture = class {
|
|
|
5764
5813
|
})
|
|
5765
5814
|
.catch(e => {
|
|
5766
5815
|
this.closeCamera();
|
|
5767
|
-
|
|
5816
|
+
this.apiErrorEvent.emit(e);
|
|
5768
5817
|
});
|
|
5769
5818
|
}, 100);
|
|
5770
5819
|
}
|
|
@@ -5820,6 +5869,7 @@ const IdCapture = class {
|
|
|
5820
5869
|
constructor(hostRef) {
|
|
5821
5870
|
index.registerInstance(this, hostRef);
|
|
5822
5871
|
this.eventPhotoCapture = index.createEvent(this, "photoIdCapture", 7);
|
|
5872
|
+
this.apiErrorEvent = index.createEvent(this, "apiError", 7);
|
|
5823
5873
|
this.photoIsReady = photos => {
|
|
5824
5874
|
//this.closeCamera();
|
|
5825
5875
|
this.eventPhotoCapture.emit(photos);
|
|
@@ -5849,11 +5899,10 @@ const IdCapture = class {
|
|
|
5849
5899
|
this.cameraSize = event.detail;
|
|
5850
5900
|
}
|
|
5851
5901
|
async componentWillLoad() {
|
|
5852
|
-
Events.init(this.component);
|
|
5853
5902
|
this.titleMesage = IdCaptureValues.Title;
|
|
5854
5903
|
//this.videoDemoStyle = this.device.isMobile ? { 'width': window.screen.width + 'px', 'height': window.screen.height + 'px', 'object-fit': 'fill' } : {};
|
|
5855
5904
|
if (!navigator.mediaDevices) {
|
|
5856
|
-
|
|
5905
|
+
this.apiErrorEvent.emit({ message: 'This browser does not support webRTC' });
|
|
5857
5906
|
}
|
|
5858
5907
|
}
|
|
5859
5908
|
async componentDidLoad() {
|
|
@@ -5874,7 +5923,7 @@ const IdCapture = class {
|
|
|
5874
5923
|
})
|
|
5875
5924
|
.catch(e => {
|
|
5876
5925
|
this.closeCamera();
|
|
5877
|
-
|
|
5926
|
+
this.apiErrorEvent.emit(e);
|
|
5878
5927
|
});
|
|
5879
5928
|
}, 100);
|
|
5880
5929
|
}
|
|
@@ -6094,9 +6143,11 @@ const IdDoubleSide = class {
|
|
|
6094
6143
|
return;
|
|
6095
6144
|
}
|
|
6096
6145
|
state.recordingRetryCount = 0;
|
|
6097
|
-
await this.baseComponent.finalize();
|
|
6098
6146
|
state.flowStatus = FlowStatus.LIVENESS;
|
|
6099
6147
|
}
|
|
6148
|
+
disconnectedCallback() {
|
|
6149
|
+
this.baseComponent.finalize();
|
|
6150
|
+
}
|
|
6100
6151
|
switchCamera() {
|
|
6101
6152
|
if (this.captureRetryCount == 1) {
|
|
6102
6153
|
let camIndex = state.cameraIds.indexOf(state.cameraId);
|
|
@@ -6225,9 +6276,11 @@ const IdSingleSide = class {
|
|
|
6225
6276
|
if (!this.idFlow.verificationFinished) {
|
|
6226
6277
|
return;
|
|
6227
6278
|
}
|
|
6228
|
-
await this.baseComponent.finalize();
|
|
6229
6279
|
state.flowStatus = FlowStatus.LIVENESS;
|
|
6230
6280
|
}
|
|
6281
|
+
disconnectedCallback() {
|
|
6282
|
+
this.baseComponent.finalize();
|
|
6283
|
+
}
|
|
6231
6284
|
switchCamera() {
|
|
6232
6285
|
if (this.captureRetryCount == 1) {
|
|
6233
6286
|
let camIndex = state.cameraIds.indexOf(state.cameraId);
|
|
@@ -6313,7 +6366,7 @@ function v4(options, buf, offset) {
|
|
|
6313
6366
|
}
|
|
6314
6367
|
|
|
6315
6368
|
const name = "@ekyc_qoobiss/qbs-ect-cmp";
|
|
6316
|
-
const version$1 = "3.3.
|
|
6369
|
+
const version$1 = "3.3.2";
|
|
6317
6370
|
const description = "Person Identification Component";
|
|
6318
6371
|
const main = "./dist/index.cjs.js";
|
|
6319
6372
|
const module$1 = "./dist/index.js";
|
|
@@ -6475,7 +6528,7 @@ const IdentificationComponent = class {
|
|
|
6475
6528
|
await this.baseComponent.apiCall.AddLog(apiLogData, getLogMessage(this.order_id, this.redirect_id, this.token));
|
|
6476
6529
|
}
|
|
6477
6530
|
catch (_c) { }
|
|
6478
|
-
Events.flowError(
|
|
6531
|
+
Events.flowError(this.errorTitle);
|
|
6479
6532
|
state.flowStatus = FlowStatus.ERROREND;
|
|
6480
6533
|
}
|
|
6481
6534
|
constructor(hostRef) {
|
|
@@ -6703,7 +6756,6 @@ const LandingValidation = class {
|
|
|
6703
6756
|
state.flowStatus = FlowStatus.COMPLETE;
|
|
6704
6757
|
return;
|
|
6705
6758
|
}
|
|
6706
|
-
await this.baseComponent.finalize();
|
|
6707
6759
|
if (!(await Cameras.InitCameras(state.device))) {
|
|
6708
6760
|
if (state.device.mobileOS == MobileOS.iOS)
|
|
6709
6761
|
sessionStorage.setItem(SessionKeys.RefreshDoneKey, 'false');
|
|
@@ -6720,13 +6772,15 @@ const LandingValidation = class {
|
|
|
6720
6772
|
}
|
|
6721
6773
|
}
|
|
6722
6774
|
}
|
|
6775
|
+
disconnectedCallback() {
|
|
6776
|
+
this.baseComponent.finalize();
|
|
6777
|
+
}
|
|
6723
6778
|
async leaveFlow() {
|
|
6724
6779
|
if (this.buttonDisabled)
|
|
6725
6780
|
return;
|
|
6726
6781
|
state.initialised = false;
|
|
6727
6782
|
try {
|
|
6728
6783
|
await this.baseComponent.apiCall.AbortRequest();
|
|
6729
|
-
await this.baseComponent.finalize();
|
|
6730
6784
|
Events.flowAborted();
|
|
6731
6785
|
}
|
|
6732
6786
|
catch (e) {
|
|
@@ -9665,7 +9719,6 @@ const MobileRedirect = class {
|
|
|
9665
9719
|
this.orderStatus = await this.baseComponent.apiCall.GetStatus(state.requestId);
|
|
9666
9720
|
if (this.orderStatus == OrderStatuses.FinishedCapturing) {
|
|
9667
9721
|
this.waitingMobile = false;
|
|
9668
|
-
await this.baseComponent.finalize();
|
|
9669
9722
|
state.flowStatus = FlowStatus.COMPLETE;
|
|
9670
9723
|
}
|
|
9671
9724
|
if (this.orderStatus == OrderStatuses.NotFound) {
|
|
@@ -9681,6 +9734,9 @@ const MobileRedirect = class {
|
|
|
9681
9734
|
Events.flowAborted();
|
|
9682
9735
|
}
|
|
9683
9736
|
}
|
|
9737
|
+
disconnectedCallback() {
|
|
9738
|
+
this.baseComponent.finalize();
|
|
9739
|
+
}
|
|
9684
9740
|
async buttonClick() {
|
|
9685
9741
|
if (this.contact == '' || this.contact.length != 10) {
|
|
9686
9742
|
return;
|
|
@@ -9716,6 +9772,7 @@ const SelfieCapture = class {
|
|
|
9716
9772
|
constructor(hostRef) {
|
|
9717
9773
|
index.registerInstance(this, hostRef);
|
|
9718
9774
|
this.eventPhotoCapture = index.createEvent(this, "photoSelfieCapture", 7);
|
|
9775
|
+
this.apiErrorEvent = index.createEvent(this, "apiError", 7);
|
|
9719
9776
|
this.photoIsReady = photos => {
|
|
9720
9777
|
//this.closeCamera();
|
|
9721
9778
|
this.eventPhotoCapture.emit(photos);
|
|
@@ -9757,11 +9814,10 @@ const SelfieCapture = class {
|
|
|
9757
9814
|
this.captureWidth = Math.round((this.captureHeight * 9) / 16);
|
|
9758
9815
|
}
|
|
9759
9816
|
componentWillLoad() {
|
|
9760
|
-
Events.init(this.component);
|
|
9761
9817
|
this.titleMesage = SelfieCaptureValues.Title;
|
|
9762
9818
|
//this.videoDemoStyle = this.device.isMobile ? { 'width': window.screen.width + 'px', 'height': window.screen.height + 'px', 'object-fit': 'fill' } : {};
|
|
9763
9819
|
if (!navigator.mediaDevices) {
|
|
9764
|
-
|
|
9820
|
+
this.apiErrorEvent.emit({ message: 'This browser does not support webRTC' });
|
|
9765
9821
|
}
|
|
9766
9822
|
}
|
|
9767
9823
|
async componentDidLoad() {
|
|
@@ -9782,7 +9838,7 @@ const SelfieCapture = class {
|
|
|
9782
9838
|
})
|
|
9783
9839
|
.catch(e => {
|
|
9784
9840
|
this.closeCamera();
|
|
9785
|
-
|
|
9841
|
+
this.apiErrorEvent.emit(e);
|
|
9786
9842
|
});
|
|
9787
9843
|
}, 100);
|
|
9788
9844
|
}
|
|
@@ -9859,7 +9915,6 @@ const SmsCodeValidation = class {
|
|
|
9859
9915
|
async doAction() {
|
|
9860
9916
|
try {
|
|
9861
9917
|
this.canSend = false;
|
|
9862
|
-
await this.baseComponent.finalize();
|
|
9863
9918
|
if (state.flowStatus == FlowStatus.CODE || state.flowStatus == FlowStatus.CODEERROR) {
|
|
9864
9919
|
var codeChecked = await this.baseComponent.apiCall.CheckOTPCode(state.requestId, this.code);
|
|
9865
9920
|
if (codeChecked === true) {
|
|
@@ -9880,6 +9935,9 @@ const SmsCodeValidation = class {
|
|
|
9880
9935
|
this.apiErrorEvent.emit(e);
|
|
9881
9936
|
}
|
|
9882
9937
|
}
|
|
9938
|
+
disconnectedCallback() {
|
|
9939
|
+
this.baseComponent.finalize();
|
|
9940
|
+
}
|
|
9883
9941
|
componentWillRender() {
|
|
9884
9942
|
if (state.flowStatus == FlowStatus.PHONE) {
|
|
9885
9943
|
this.title = PhoneValidationValues.Title;
|
|
@@ -10009,6 +10067,9 @@ const UserLiveness = class {
|
|
|
10009
10067
|
this.selfieFlow.verificationFinished = true;
|
|
10010
10068
|
await this.endFlow();
|
|
10011
10069
|
}
|
|
10070
|
+
disconnectedCallback() {
|
|
10071
|
+
this.baseComponent.finalize();
|
|
10072
|
+
}
|
|
10012
10073
|
async uploadPhoto() {
|
|
10013
10074
|
if (this.selfieFlow.photoFile == null || this.selfieFlow.photoDone) {
|
|
10014
10075
|
return;
|
|
@@ -10049,7 +10110,6 @@ const UserLiveness = class {
|
|
|
10049
10110
|
return;
|
|
10050
10111
|
}
|
|
10051
10112
|
state.recordingRetryCount = 0;
|
|
10052
|
-
await this.baseComponent.finalize();
|
|
10053
10113
|
state.flowStatus = FlowStatus.COMPLETE;
|
|
10054
10114
|
}
|
|
10055
10115
|
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() {
|