@ekyc_qoobiss/qbs-ect-cmp 3.5.1 → 3.5.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 +58 -23
- package/dist/collection/components/base-component.js +14 -2
- package/dist/collection/components/common/how-to-info/how-to-info.js +27 -7
- package/dist/collection/components/common/id-back-capture/id-back-capture.js +9 -0
- package/dist/collection/components/common/id-capture/id-capture.js +9 -0
- package/dist/collection/components/common/selfie-capture/selfie-capture.js +9 -0
- package/dist/collection/components/flow/end-redirect/end-redirect.js +1 -9
- package/dist/collection/models/FlowSteps.js +11 -2
- package/dist/esm/agreement-check_18.entry.js +58 -23
- package/dist/qbs-ect-cmp/{p-968c5885.entry.js → p-a4977375.entry.js} +2 -2
- package/dist/qbs-ect-cmp/qbs-ect-cmp.esm.js +1 -1
- package/dist/types/components/base-component.d.ts +2 -1
- package/dist/types/components/common/how-to-info/how-to-info.d.ts +5 -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/end-redirect/end-redirect.d.ts +0 -1
- package/dist/types/components.d.ts +1 -0
- package/dist/types/models/FlowSteps.d.ts +11 -2
- package/package.json +1 -1
|
@@ -413,11 +413,20 @@ var FlowSteps;
|
|
|
413
413
|
FlowSteps[FlowSteps["Agreements"] = 'agreements'] = "Agreements";
|
|
414
414
|
FlowSteps[FlowSteps["OtpSend"] = 'otp-send'] = "OtpSend";
|
|
415
415
|
FlowSteps[FlowSteps["OtpCheck"] = 'otp-check'] = "OtpCheck";
|
|
416
|
-
FlowSteps[FlowSteps["CiFrontHowTo"] = 'ci-front-how-to'] = "CiFrontHowTo";
|
|
417
416
|
FlowSteps[FlowSteps["CiFront"] = 'ci-front'] = "CiFront";
|
|
418
|
-
FlowSteps[FlowSteps["
|
|
417
|
+
FlowSteps[FlowSteps["CiFrontHowTo"] = 'ci-front-how-to'] = "CiFrontHowTo";
|
|
418
|
+
FlowSteps[FlowSteps["CiFrontHoldAnimation"] = 'ci-front-hold-animation'] = "CiFrontHoldAnimation";
|
|
419
|
+
FlowSteps[FlowSteps["CiFrontTiltAnimation"] = 'ci-front-tilt-animation'] = "CiFrontTiltAnimation";
|
|
420
|
+
FlowSteps[FlowSteps["CiFrontCapture"] = 'ci-front-capture'] = "CiFrontCapture";
|
|
419
421
|
FlowSteps[FlowSteps["CiBack"] = 'ci-back'] = "CiBack";
|
|
422
|
+
FlowSteps[FlowSteps["CiBackHowTo"] = 'ci-back-how-to'] = "CiBackHowTo";
|
|
423
|
+
FlowSteps[FlowSteps["CiBackHoldAnimation"] = 'ci-back-hold-animation'] = "CiBackHoldAnimation";
|
|
424
|
+
FlowSteps[FlowSteps["CiBackTiltAnimation"] = 'ci-back-tilt-animation'] = "CiBackTiltAnimation";
|
|
425
|
+
FlowSteps[FlowSteps["CiBackCapture"] = 'ci-back-capture'] = "CiBackCapture";
|
|
420
426
|
FlowSteps[FlowSteps["SelfieHowTo"] = 'selfie-how-to'] = "SelfieHowTo";
|
|
427
|
+
FlowSteps[FlowSteps["SelfieHoldAnimation"] = 'selfie-hold-animation'] = "SelfieHoldAnimation";
|
|
428
|
+
FlowSteps[FlowSteps["SelfieTiltAnimation"] = 'selfie-tilt-animation'] = "SelfieTiltAnimation";
|
|
429
|
+
FlowSteps[FlowSteps["SelfieCapture"] = 'selfie-capture'] = "SelfieCapture";
|
|
421
430
|
FlowSteps[FlowSteps["Selfie"] = 'selfie'] = "Selfie";
|
|
422
431
|
FlowSteps[FlowSteps["End"] = 'end'] = "End";
|
|
423
432
|
FlowSteps[FlowSteps["CameraError"] = 'camera-error'] = "CameraError";
|
|
@@ -864,6 +873,18 @@ class BaseComponent {
|
|
|
864
873
|
setErrorCallback(callback) {
|
|
865
874
|
this.processError = callback;
|
|
866
875
|
}
|
|
876
|
+
async logStep(flowStep, flowMoment) {
|
|
877
|
+
Events.flowEvent(flowStep, flowMoment);
|
|
878
|
+
try {
|
|
879
|
+
await this.apiCall.AddStep(flowStep, flowMoment);
|
|
880
|
+
}
|
|
881
|
+
catch (e) {
|
|
882
|
+
if (this.apiErrorEvent)
|
|
883
|
+
this.apiErrorEvent.emit(e);
|
|
884
|
+
else
|
|
885
|
+
this.processError(e, `${flowStep}-${flowMoment}`);
|
|
886
|
+
}
|
|
887
|
+
}
|
|
867
888
|
async initialize() {
|
|
868
889
|
Events.flowEvent(this.flowStep, FlowMoments.Initialized);
|
|
869
890
|
try {
|
|
@@ -873,7 +894,7 @@ class BaseComponent {
|
|
|
873
894
|
if (this.apiErrorEvent)
|
|
874
895
|
this.apiErrorEvent.emit(e);
|
|
875
896
|
else
|
|
876
|
-
this.processError(e, FlowMoments.Initialized);
|
|
897
|
+
this.processError(e, `${this.flowStep}-${FlowMoments.Initialized}`);
|
|
877
898
|
}
|
|
878
899
|
}
|
|
879
900
|
async finalize() {
|
|
@@ -885,7 +906,7 @@ class BaseComponent {
|
|
|
885
906
|
if (this.apiErrorEvent)
|
|
886
907
|
this.apiErrorEvent.emit(e);
|
|
887
908
|
else
|
|
888
|
-
this.processError(e, FlowMoments.
|
|
909
|
+
this.processError(e, `${this.flowStep}-${FlowMoments.Finalized}`);
|
|
889
910
|
}
|
|
890
911
|
}
|
|
891
912
|
}
|
|
@@ -5587,17 +5608,9 @@ const completeSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODMiIGhlaWdodD0iO
|
|
|
5587
5608
|
const endRedirectCss = "h1{font-family:'Inter', sans-serif;font-style:normal;font-weight:900;font-size:4vh;line-height:4vh;letter-spacing:0.01em;color:#1f2024}p{font-family:'Inter', sans-serif;font-style:normal;font-weight:400;font-size:2vh;line-height:3vh;color:#1f2024;text-align:justify}.container{gap:10rem;text-align:center}.greet{color:rgb(73, 78, 79);visibility:hidden;animation-name:rise;animation-delay:1s;animation-fill-mode:forwards}@keyframes rise{0%{visibility:hidden}50%{visibility:visible}100%{visibility:visible}}.container-coin{background-color:transparent;perspective:1000px;rotate:120deg 0deg}.coin-flip{animation:flip 0.4s ease-in;animation-delay:0.5s;transform-style:preserve-3d;animation-fill-mode:forwards;visibility:hidden}.coin-scale{animation:show 0.4s ease-in;animation-delay:0.5s;transform-style:preserve-3d;animation-fill-mode:forwards}.coin{margin-top:10rem}@keyframes flip{0%{transform:rotateX(140deg);visibility:visible}25%{transform:rotateX(120deg);visibility:visible}50%{transform:rotateX(90deg);visibility:visible}75%{transform:rotateX(75deg);visibility:visible}100%{transform:rotateX(0deg);visibility:visible}}@keyframes show{0%{transform:scale(0)}25%{transform:scale(0.2)}40%{transform:scale(0.4)}50%{transform:scale(0.5)}60%{transform:scale(0.6)}70%{transform:scale(0.7)}100%{transform:scale(1)}}";
|
|
5588
5609
|
|
|
5589
5610
|
const EndRedirect = class {
|
|
5590
|
-
constructor(hostRef) {
|
|
5591
|
-
index.registerInstance(this, hostRef);
|
|
5592
|
-
this.apiErrorEvent = index.createEvent(this, "apiError", 7);
|
|
5593
|
-
this.baseComponent = new BaseComponent(FlowSteps.End);
|
|
5594
|
-
this.baseComponent.setEventEmitter(this.apiErrorEvent);
|
|
5595
|
-
}
|
|
5611
|
+
constructor(hostRef) { index.registerInstance(this, hostRef); this.apiErrorEvent = index.createEvent(this, "apiError", 7); }
|
|
5596
5612
|
async componentDidLoad() {
|
|
5597
5613
|
Events.flowCompleted();
|
|
5598
|
-
if (state.environment !== 'DEMO') {
|
|
5599
|
-
await this.baseComponent.initialize();
|
|
5600
|
-
}
|
|
5601
5614
|
}
|
|
5602
5615
|
render() {
|
|
5603
5616
|
return (index.h("div", { class: "container" }, index.h("div", { class: "row" }, index.h("div", null, index.h("h1", { class: "text-center" }, CompleteValues.Title), index.h("p", { class: "main-text font-size-18 mt-8 text-center" }, CompleteValues.Description)), index.h("div", { class: "buletin-container" }, index.h("div", { class: "container-coin" }, index.h("div", { class: "coin-scale" }, index.h("div", { class: "coin-flip" }, index.h("img", { class: "w-40 coin", src: completeSvg }))))), index.h("div", { class: "text-center" }, index.h("p", { class: "font-weight-900 font-size-3 color-black-2 text-center mt-20" }, CompleteValues.Message), index.h("p", null, state.requestId)), index.h("div", { class: "btn-buletin" }, index.h("p", { class: "main-text font-size-18 text-center mb-0" }, CompleteValues.FooterText)))));
|
|
@@ -5623,15 +5636,12 @@ ErrorEnd.style = errorEndCss;
|
|
|
5623
5636
|
const howToInfoCss = "";
|
|
5624
5637
|
|
|
5625
5638
|
const HowToInfo = class {
|
|
5626
|
-
constructor(hostRef) {
|
|
5627
|
-
|
|
5628
|
-
this.
|
|
5629
|
-
|
|
5630
|
-
|
|
5631
|
-
this.
|
|
5632
|
-
this.imagePath = undefined;
|
|
5633
|
-
this.buttonText = undefined;
|
|
5634
|
-
this.buttonEnabled = undefined;
|
|
5639
|
+
constructor(hostRef) { index.registerInstance(this, hostRef); this.eventHowToInfoDone = index.createEvent(this, "howToInfoDone", 7); this.apiErrorEvent = index.createEvent(this, "apiError", 7); this.idSide = undefined; this.topTitle = undefined; this.subTitle = undefined; this.imagePath = undefined; this.buttonText = undefined; this.buttonEnabled = undefined; }
|
|
5640
|
+
async componentDidLoad() {
|
|
5641
|
+
await this.baseComponent.initialize();
|
|
5642
|
+
}
|
|
5643
|
+
disconnectedCallback() {
|
|
5644
|
+
this.baseComponent.finalize();
|
|
5635
5645
|
}
|
|
5636
5646
|
buttonClick() {
|
|
5637
5647
|
this.buttonEnabled = false;
|
|
@@ -5645,18 +5655,22 @@ const HowToInfo = class {
|
|
|
5645
5655
|
this.imagePath = 'https://ekyc.blob.core.windows.net/$web/howto_id.png';
|
|
5646
5656
|
this.buttonText = HowToValues.IdButton;
|
|
5647
5657
|
if (this.idSide == 'front') {
|
|
5658
|
+
this.baseComponent = new BaseComponent(FlowSteps.CiFrontHowTo);
|
|
5648
5659
|
this.subTitle = HowToValues.IdSubTitileFace;
|
|
5649
5660
|
}
|
|
5650
5661
|
if (this.idSide == 'back') {
|
|
5662
|
+
this.baseComponent = new BaseComponent(FlowSteps.CiBackHowTo);
|
|
5651
5663
|
this.subTitle = HowToValues.IdSubTitileBack;
|
|
5652
5664
|
}
|
|
5653
5665
|
}
|
|
5654
5666
|
if (state.flowStatus == FlowStatus.LIVENESS) {
|
|
5667
|
+
this.baseComponent = new BaseComponent(FlowSteps.SelfieHowTo);
|
|
5655
5668
|
this.topTitle = HowToValues.SelfieTitile;
|
|
5656
5669
|
this.subTitle = HowToValues.SelfieSubTitile;
|
|
5657
5670
|
this.imagePath = 'https://ekyc.blob.core.windows.net/$web/howto_selfie.png';
|
|
5658
5671
|
this.buttonText = HowToValues.SelfieButton;
|
|
5659
5672
|
}
|
|
5673
|
+
this.baseComponent.setEventEmitter(this.apiErrorEvent);
|
|
5660
5674
|
}
|
|
5661
5675
|
render() {
|
|
5662
5676
|
let sub = this.subTitle != '' ? index.h("p", { class: "font-size-2" }, this.subTitle) : null;
|
|
@@ -5809,14 +5823,17 @@ const IdBackCapture = class {
|
|
|
5809
5823
|
this.verified = false;
|
|
5810
5824
|
this.cameras = new Cameras();
|
|
5811
5825
|
this.showDemo = true;
|
|
5826
|
+
this.baseComponent = new BaseComponent(FlowSteps.CiBackHoldAnimation);
|
|
5812
5827
|
}
|
|
5813
5828
|
async eventChangeTitle(event) {
|
|
5829
|
+
await this.baseComponent.logStep(FlowSteps.CiBackTiltAnimation, FlowMoments.Initialized);
|
|
5814
5830
|
this.showDemo = true;
|
|
5815
5831
|
this.titleMesage = IdCaptureValues.IDPoseMapping[event.detail];
|
|
5816
5832
|
this.demoVideo.src = IdCaptureValues.IDPoseDemoMapping[IDPose.BackTilted];
|
|
5817
5833
|
this.demoVideo.play();
|
|
5818
5834
|
await delay(IdCaptureValues.VideoLenght);
|
|
5819
5835
|
this.showDemo = false;
|
|
5836
|
+
await this.baseComponent.logStep(FlowSteps.CiBackTiltAnimation, FlowMoments.Finalized);
|
|
5820
5837
|
}
|
|
5821
5838
|
eventVideoStarted(event) {
|
|
5822
5839
|
this.videoStarted = true;
|
|
@@ -5829,6 +5846,7 @@ const IdBackCapture = class {
|
|
|
5829
5846
|
}
|
|
5830
5847
|
}
|
|
5831
5848
|
async componentDidLoad() {
|
|
5849
|
+
await this.baseComponent.logStep(FlowSteps.CiBackHoldAnimation, FlowMoments.Initialized);
|
|
5832
5850
|
this.titleMesage = IdCaptureValues.TtileRotate;
|
|
5833
5851
|
this.demoVideo.src = IdCaptureValues.IDPoseDemoMapping[IDPose.Rotate];
|
|
5834
5852
|
this.demoVideo.play();
|
|
@@ -5837,10 +5855,12 @@ const IdBackCapture = class {
|
|
|
5837
5855
|
this.demoVideo.src = IdCaptureValues.IDPoseDemoMapping[IDPose.BackStraight];
|
|
5838
5856
|
this.demoVideo.play();
|
|
5839
5857
|
await delay(IdCaptureValues.VideoLenght);
|
|
5858
|
+
await this.baseComponent.logStep(FlowSteps.CiBackHoldAnimation, FlowMoments.Finalized);
|
|
5840
5859
|
this.showDemo = false;
|
|
5841
5860
|
this.openCamera();
|
|
5842
5861
|
}
|
|
5843
5862
|
async openCamera() {
|
|
5863
|
+
await this.baseComponent.logStep(FlowSteps.CiBackCapture, FlowMoments.Initialized);
|
|
5844
5864
|
var constraints = this.cameras.GetConstraints(state.cameraId, state.device);
|
|
5845
5865
|
setTimeout(() => {
|
|
5846
5866
|
navigator.mediaDevices
|
|
@@ -5883,6 +5903,7 @@ const IdBackCapture = class {
|
|
|
5883
5903
|
this.captureTaken = true;
|
|
5884
5904
|
let res = await Stream.getInstance().takePhoto();
|
|
5885
5905
|
this.photoIsReady(res);
|
|
5906
|
+
await this.baseComponent.logStep(FlowSteps.CiBackCapture, FlowMoments.Finalized);
|
|
5886
5907
|
}
|
|
5887
5908
|
render() {
|
|
5888
5909
|
let cameraStyle;
|
|
@@ -5923,14 +5944,17 @@ const IdCapture = class {
|
|
|
5923
5944
|
this.verified = false;
|
|
5924
5945
|
this.cameras = new Cameras();
|
|
5925
5946
|
this.showDemo = true;
|
|
5947
|
+
this.baseComponent = new BaseComponent(FlowSteps.CiFrontHoldAnimation);
|
|
5926
5948
|
}
|
|
5927
5949
|
async eventChangeTitle(event) {
|
|
5950
|
+
await this.baseComponent.logStep(FlowSteps.CiFrontTiltAnimation, FlowMoments.Initialized);
|
|
5928
5951
|
this.showDemo = true;
|
|
5929
5952
|
this.titleMesage = IdCaptureValues.IDPoseMapping[event.detail];
|
|
5930
5953
|
this.demoVideo.src = IdCaptureValues.IDPoseDemoMapping[IDPose.Tilted];
|
|
5931
5954
|
this.demoVideo.play();
|
|
5932
5955
|
await delay(IdCaptureValues.VideoLenght);
|
|
5933
5956
|
this.showDemo = false;
|
|
5957
|
+
await this.baseComponent.logStep(FlowSteps.CiFrontTiltAnimation, FlowMoments.Finalized);
|
|
5934
5958
|
}
|
|
5935
5959
|
eventVideoStarted(event) {
|
|
5936
5960
|
this.videoStarted = true;
|
|
@@ -5944,13 +5968,16 @@ const IdCapture = class {
|
|
|
5944
5968
|
}
|
|
5945
5969
|
}
|
|
5946
5970
|
async componentDidLoad() {
|
|
5971
|
+
await this.baseComponent.logStep(FlowSteps.CiFrontHoldAnimation, FlowMoments.Initialized);
|
|
5947
5972
|
this.demoVideo.src = IdCaptureValues.IDPoseDemoMapping[IDPose.Straight];
|
|
5948
5973
|
this.demoVideo.play();
|
|
5949
5974
|
await delay(IdCaptureValues.VideoLenght);
|
|
5975
|
+
await this.baseComponent.logStep(FlowSteps.CiFrontHoldAnimation, FlowMoments.Finalized);
|
|
5950
5976
|
this.showDemo = false;
|
|
5951
5977
|
this.openCamera();
|
|
5952
5978
|
}
|
|
5953
5979
|
async openCamera() {
|
|
5980
|
+
await this.baseComponent.logStep(FlowSteps.CiFrontCapture, FlowMoments.Initialized);
|
|
5954
5981
|
var constraints = this.cameras.GetConstraints(state.cameraId, state.device);
|
|
5955
5982
|
setTimeout(() => {
|
|
5956
5983
|
navigator.mediaDevices
|
|
@@ -5982,6 +6009,7 @@ const IdCapture = class {
|
|
|
5982
6009
|
this.captureTaken = true;
|
|
5983
6010
|
let res = await Stream.getInstance().takePhoto();
|
|
5984
6011
|
this.photoIsReady(res);
|
|
6012
|
+
await this.baseComponent.logStep(FlowSteps.CiFrontCapture, FlowMoments.Finalized);
|
|
5985
6013
|
}
|
|
5986
6014
|
async verificationFinished() {
|
|
5987
6015
|
if (this.verified)
|
|
@@ -6404,7 +6432,7 @@ function v4(options, buf, offset) {
|
|
|
6404
6432
|
}
|
|
6405
6433
|
|
|
6406
6434
|
const name = "@ekyc_qoobiss/qbs-ect-cmp";
|
|
6407
|
-
const version$1 = "3.5.
|
|
6435
|
+
const version$1 = "3.5.3";
|
|
6408
6436
|
const description = "Person Identification Component";
|
|
6409
6437
|
const main = "./dist/index.cjs.js";
|
|
6410
6438
|
const module$1 = "./dist/index.js";
|
|
@@ -9830,6 +9858,7 @@ const SelfieCapture = class {
|
|
|
9830
9858
|
this.cameras = new Cameras();
|
|
9831
9859
|
this.demoEnded = false;
|
|
9832
9860
|
this.uploadingLink = 'https://ekyc.blob.core.windows.net/$web/animations/uploading_selfie.mp4';
|
|
9861
|
+
this.baseComponent = new BaseComponent(FlowSteps.SelfieHoldAnimation);
|
|
9833
9862
|
}
|
|
9834
9863
|
async eventChangeTitle(event) {
|
|
9835
9864
|
// this.stopAnimation = false;
|
|
@@ -9837,11 +9866,13 @@ const SelfieCapture = class {
|
|
|
9837
9866
|
this.titleMesage = SelfieCaptureValues.FinalTitle;
|
|
9838
9867
|
}
|
|
9839
9868
|
else {
|
|
9869
|
+
await this.baseComponent.logStep(FlowSteps.SelfieTiltAnimation, FlowMoments.Initialized);
|
|
9840
9870
|
this.titleMesage = SelfieCaptureValues.FacePoseMapping[event.detail];
|
|
9841
9871
|
this.demoEnded = false;
|
|
9842
9872
|
this.demoVideo.src = SelfieCaptureValues.FacePoseDemoMapping[event.detail];
|
|
9843
9873
|
this.demoVideo.play();
|
|
9844
9874
|
await delay(SelfieCaptureValues.VideoLenght);
|
|
9875
|
+
await this.baseComponent.logStep(FlowSteps.SelfieTiltAnimation, FlowMoments.Finalized);
|
|
9845
9876
|
this.demoEnded = true;
|
|
9846
9877
|
}
|
|
9847
9878
|
}
|
|
@@ -9860,13 +9891,16 @@ const SelfieCapture = class {
|
|
|
9860
9891
|
}
|
|
9861
9892
|
}
|
|
9862
9893
|
async componentDidLoad() {
|
|
9894
|
+
await this.baseComponent.logStep(FlowSteps.SelfieHoldAnimation, FlowMoments.Initialized);
|
|
9863
9895
|
this.demoVideo.src = SelfieCaptureValues.FacePoseDemoMapping[FacePose.Main];
|
|
9864
9896
|
this.demoVideo.play();
|
|
9865
9897
|
await delay(SelfieCaptureValues.VideoLenght);
|
|
9898
|
+
await this.baseComponent.logStep(FlowSteps.SelfieHoldAnimation, FlowMoments.Finalized);
|
|
9866
9899
|
this.demoEnded = true;
|
|
9867
9900
|
this.openCamera();
|
|
9868
9901
|
}
|
|
9869
9902
|
async openCamera() {
|
|
9903
|
+
await this.baseComponent.logStep(FlowSteps.SelfieCapture, FlowMoments.Initialized);
|
|
9870
9904
|
const constraints = this.cameras.GetConstraints('', state.device, true);
|
|
9871
9905
|
setTimeout(() => {
|
|
9872
9906
|
navigator.mediaDevices
|
|
@@ -9897,6 +9931,7 @@ const SelfieCapture = class {
|
|
|
9897
9931
|
this.captureTaken = true;
|
|
9898
9932
|
let res = await Stream.getInstance().takePhoto();
|
|
9899
9933
|
this.photoIsReady(res);
|
|
9934
|
+
await this.baseComponent.logStep(FlowSteps.SelfieHoldAnimation, FlowMoments.Finalized);
|
|
9900
9935
|
}
|
|
9901
9936
|
verificationFinished() {
|
|
9902
9937
|
if (this.verified)
|
|
@@ -21,6 +21,18 @@ export class BaseComponent {
|
|
|
21
21
|
setErrorCallback(callback) {
|
|
22
22
|
this.processError = callback;
|
|
23
23
|
}
|
|
24
|
+
async logStep(flowStep, flowMoment) {
|
|
25
|
+
Events.flowEvent(flowStep, flowMoment);
|
|
26
|
+
try {
|
|
27
|
+
await this.apiCall.AddStep(flowStep, flowMoment);
|
|
28
|
+
}
|
|
29
|
+
catch (e) {
|
|
30
|
+
if (this.apiErrorEvent)
|
|
31
|
+
this.apiErrorEvent.emit(e);
|
|
32
|
+
else
|
|
33
|
+
this.processError(e, `${flowStep}-${flowMoment}`);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
24
36
|
async initialize() {
|
|
25
37
|
Events.flowEvent(this.flowStep, FlowMoments.Initialized);
|
|
26
38
|
try {
|
|
@@ -30,7 +42,7 @@ export class BaseComponent {
|
|
|
30
42
|
if (this.apiErrorEvent)
|
|
31
43
|
this.apiErrorEvent.emit(e);
|
|
32
44
|
else
|
|
33
|
-
this.processError(e, FlowMoments.Initialized);
|
|
45
|
+
this.processError(e, `${this.flowStep}-${FlowMoments.Initialized}`);
|
|
34
46
|
}
|
|
35
47
|
}
|
|
36
48
|
async finalize() {
|
|
@@ -42,7 +54,7 @@ export class BaseComponent {
|
|
|
42
54
|
if (this.apiErrorEvent)
|
|
43
55
|
this.apiErrorEvent.emit(e);
|
|
44
56
|
else
|
|
45
|
-
this.processError(e, FlowMoments.
|
|
57
|
+
this.processError(e, `${this.flowStep}-${FlowMoments.Finalized}`);
|
|
46
58
|
}
|
|
47
59
|
}
|
|
48
60
|
}
|
|
@@ -2,14 +2,15 @@ import { h } from '@stencil/core';
|
|
|
2
2
|
import { HowToValues } from '../../../helpers/textValues';
|
|
3
3
|
import store from '../../../helpers/store';
|
|
4
4
|
import { FlowStatus } from '../../../models/FlowStatus';
|
|
5
|
+
import { BaseComponent } from '../../base-component';
|
|
6
|
+
import { FlowSteps } from '../../../models/FlowSteps';
|
|
5
7
|
export class HowToInfo {
|
|
6
|
-
constructor() {
|
|
7
|
-
|
|
8
|
-
this.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
this.
|
|
12
|
-
this.buttonEnabled = undefined;
|
|
8
|
+
constructor() { this.idSide = undefined; this.topTitle = undefined; this.subTitle = undefined; this.imagePath = undefined; this.buttonText = undefined; this.buttonEnabled = undefined; }
|
|
9
|
+
async componentDidLoad() {
|
|
10
|
+
await this.baseComponent.initialize();
|
|
11
|
+
}
|
|
12
|
+
disconnectedCallback() {
|
|
13
|
+
this.baseComponent.finalize();
|
|
13
14
|
}
|
|
14
15
|
buttonClick() {
|
|
15
16
|
this.buttonEnabled = false;
|
|
@@ -23,18 +24,22 @@ export class HowToInfo {
|
|
|
23
24
|
this.imagePath = 'https://ekyc.blob.core.windows.net/$web/howto_id.png';
|
|
24
25
|
this.buttonText = HowToValues.IdButton;
|
|
25
26
|
if (this.idSide == 'front') {
|
|
27
|
+
this.baseComponent = new BaseComponent(FlowSteps.CiFrontHowTo);
|
|
26
28
|
this.subTitle = HowToValues.IdSubTitileFace;
|
|
27
29
|
}
|
|
28
30
|
if (this.idSide == 'back') {
|
|
31
|
+
this.baseComponent = new BaseComponent(FlowSteps.CiBackHowTo);
|
|
29
32
|
this.subTitle = HowToValues.IdSubTitileBack;
|
|
30
33
|
}
|
|
31
34
|
}
|
|
32
35
|
if (store.flowStatus == FlowStatus.LIVENESS) {
|
|
36
|
+
this.baseComponent = new BaseComponent(FlowSteps.SelfieHowTo);
|
|
33
37
|
this.topTitle = HowToValues.SelfieTitile;
|
|
34
38
|
this.subTitle = HowToValues.SelfieSubTitile;
|
|
35
39
|
this.imagePath = 'https://ekyc.blob.core.windows.net/$web/howto_selfie.png';
|
|
36
40
|
this.buttonText = HowToValues.SelfieButton;
|
|
37
41
|
}
|
|
42
|
+
this.baseComponent.setEventEmitter(this.apiErrorEvent);
|
|
38
43
|
}
|
|
39
44
|
render() {
|
|
40
45
|
let sub = this.subTitle != '' ? h("p", { class: "font-size-2" }, this.subTitle) : null;
|
|
@@ -97,6 +102,21 @@ export class HowToInfo {
|
|
|
97
102
|
"resolved": "any",
|
|
98
103
|
"references": {}
|
|
99
104
|
}
|
|
105
|
+
}, {
|
|
106
|
+
"method": "apiErrorEvent",
|
|
107
|
+
"name": "apiError",
|
|
108
|
+
"bubbles": true,
|
|
109
|
+
"cancelable": true,
|
|
110
|
+
"composed": true,
|
|
111
|
+
"docs": {
|
|
112
|
+
"tags": [],
|
|
113
|
+
"text": ""
|
|
114
|
+
},
|
|
115
|
+
"complexType": {
|
|
116
|
+
"original": "any",
|
|
117
|
+
"resolved": "any",
|
|
118
|
+
"references": {}
|
|
119
|
+
}
|
|
100
120
|
}];
|
|
101
121
|
}
|
|
102
122
|
}
|
|
@@ -7,6 +7,8 @@ import { FaceML5Detector } from '../../../libs/FaceML5Detector/FaceML5Detector';
|
|
|
7
7
|
import { IDPose } from '../../../libs/IDML5Detector/IDPose';
|
|
8
8
|
import { delay } from '../../../utils/utils';
|
|
9
9
|
import store from '../../../helpers/store';
|
|
10
|
+
import { BaseComponent } from '../../base-component';
|
|
11
|
+
import { FlowMoments, FlowSteps } from '../../../models/FlowSteps';
|
|
10
12
|
// import { IDPose } from '../../libs/IDML5Detector/IDPose';
|
|
11
13
|
export class IdBackCapture {
|
|
12
14
|
// @State() private animationPath: string;
|
|
@@ -26,14 +28,17 @@ export class IdBackCapture {
|
|
|
26
28
|
this.verified = false;
|
|
27
29
|
this.cameras = new Cameras();
|
|
28
30
|
this.showDemo = true;
|
|
31
|
+
this.baseComponent = new BaseComponent(FlowSteps.CiBackHoldAnimation);
|
|
29
32
|
}
|
|
30
33
|
async eventChangeTitle(event) {
|
|
34
|
+
await this.baseComponent.logStep(FlowSteps.CiBackTiltAnimation, FlowMoments.Initialized);
|
|
31
35
|
this.showDemo = true;
|
|
32
36
|
this.titleMesage = IdCaptureValues.IDPoseMapping[event.detail];
|
|
33
37
|
this.demoVideo.src = IdCaptureValues.IDPoseDemoMapping[IDPose.BackTilted];
|
|
34
38
|
this.demoVideo.play();
|
|
35
39
|
await delay(IdCaptureValues.VideoLenght);
|
|
36
40
|
this.showDemo = false;
|
|
41
|
+
await this.baseComponent.logStep(FlowSteps.CiBackTiltAnimation, FlowMoments.Finalized);
|
|
37
42
|
}
|
|
38
43
|
eventVideoStarted(event) {
|
|
39
44
|
this.videoStarted = true;
|
|
@@ -46,6 +51,7 @@ export class IdBackCapture {
|
|
|
46
51
|
}
|
|
47
52
|
}
|
|
48
53
|
async componentDidLoad() {
|
|
54
|
+
await this.baseComponent.logStep(FlowSteps.CiBackHoldAnimation, FlowMoments.Initialized);
|
|
49
55
|
this.titleMesage = IdCaptureValues.TtileRotate;
|
|
50
56
|
this.demoVideo.src = IdCaptureValues.IDPoseDemoMapping[IDPose.Rotate];
|
|
51
57
|
this.demoVideo.play();
|
|
@@ -54,10 +60,12 @@ export class IdBackCapture {
|
|
|
54
60
|
this.demoVideo.src = IdCaptureValues.IDPoseDemoMapping[IDPose.BackStraight];
|
|
55
61
|
this.demoVideo.play();
|
|
56
62
|
await delay(IdCaptureValues.VideoLenght);
|
|
63
|
+
await this.baseComponent.logStep(FlowSteps.CiBackHoldAnimation, FlowMoments.Finalized);
|
|
57
64
|
this.showDemo = false;
|
|
58
65
|
this.openCamera();
|
|
59
66
|
}
|
|
60
67
|
async openCamera() {
|
|
68
|
+
await this.baseComponent.logStep(FlowSteps.CiBackCapture, FlowMoments.Initialized);
|
|
61
69
|
var constraints = this.cameras.GetConstraints(store.cameraId, store.device);
|
|
62
70
|
setTimeout(() => {
|
|
63
71
|
navigator.mediaDevices
|
|
@@ -100,6 +108,7 @@ export class IdBackCapture {
|
|
|
100
108
|
this.captureTaken = true;
|
|
101
109
|
let res = await Stream.getInstance().takePhoto();
|
|
102
110
|
this.photoIsReady(res);
|
|
111
|
+
await this.baseComponent.logStep(FlowSteps.CiBackCapture, FlowMoments.Finalized);
|
|
103
112
|
}
|
|
104
113
|
render() {
|
|
105
114
|
let cameraStyle;
|
|
@@ -7,6 +7,8 @@ import { FaceML5Detector } from '../../../libs/FaceML5Detector/FaceML5Detector';
|
|
|
7
7
|
import { IDPose } from '../../../libs/IDML5Detector/IDPose';
|
|
8
8
|
import { delay } from '../../../utils/utils';
|
|
9
9
|
import store from '../../../helpers/store';
|
|
10
|
+
import { BaseComponent } from '../../base-component';
|
|
11
|
+
import { FlowMoments, FlowSteps } from '../../../models/FlowSteps';
|
|
10
12
|
// import { IDPose } from '../../libs/IDML5Detector/IDPose';
|
|
11
13
|
export class IdCapture {
|
|
12
14
|
// @State() private animationPath: string;
|
|
@@ -26,14 +28,17 @@ export class IdCapture {
|
|
|
26
28
|
this.verified = false;
|
|
27
29
|
this.cameras = new Cameras();
|
|
28
30
|
this.showDemo = true;
|
|
31
|
+
this.baseComponent = new BaseComponent(FlowSteps.CiFrontHoldAnimation);
|
|
29
32
|
}
|
|
30
33
|
async eventChangeTitle(event) {
|
|
34
|
+
await this.baseComponent.logStep(FlowSteps.CiFrontTiltAnimation, FlowMoments.Initialized);
|
|
31
35
|
this.showDemo = true;
|
|
32
36
|
this.titleMesage = IdCaptureValues.IDPoseMapping[event.detail];
|
|
33
37
|
this.demoVideo.src = IdCaptureValues.IDPoseDemoMapping[IDPose.Tilted];
|
|
34
38
|
this.demoVideo.play();
|
|
35
39
|
await delay(IdCaptureValues.VideoLenght);
|
|
36
40
|
this.showDemo = false;
|
|
41
|
+
await this.baseComponent.logStep(FlowSteps.CiFrontTiltAnimation, FlowMoments.Finalized);
|
|
37
42
|
}
|
|
38
43
|
eventVideoStarted(event) {
|
|
39
44
|
this.videoStarted = true;
|
|
@@ -47,13 +52,16 @@ export class IdCapture {
|
|
|
47
52
|
}
|
|
48
53
|
}
|
|
49
54
|
async componentDidLoad() {
|
|
55
|
+
await this.baseComponent.logStep(FlowSteps.CiFrontHoldAnimation, FlowMoments.Initialized);
|
|
50
56
|
this.demoVideo.src = IdCaptureValues.IDPoseDemoMapping[IDPose.Straight];
|
|
51
57
|
this.demoVideo.play();
|
|
52
58
|
await delay(IdCaptureValues.VideoLenght);
|
|
59
|
+
await this.baseComponent.logStep(FlowSteps.CiFrontHoldAnimation, FlowMoments.Finalized);
|
|
53
60
|
this.showDemo = false;
|
|
54
61
|
this.openCamera();
|
|
55
62
|
}
|
|
56
63
|
async openCamera() {
|
|
64
|
+
await this.baseComponent.logStep(FlowSteps.CiFrontCapture, FlowMoments.Initialized);
|
|
57
65
|
var constraints = this.cameras.GetConstraints(store.cameraId, store.device);
|
|
58
66
|
setTimeout(() => {
|
|
59
67
|
navigator.mediaDevices
|
|
@@ -85,6 +93,7 @@ export class IdCapture {
|
|
|
85
93
|
this.captureTaken = true;
|
|
86
94
|
let res = await Stream.getInstance().takePhoto();
|
|
87
95
|
this.photoIsReady(res);
|
|
96
|
+
await this.baseComponent.logStep(FlowSteps.CiFrontCapture, FlowMoments.Finalized);
|
|
88
97
|
}
|
|
89
98
|
async verificationFinished() {
|
|
90
99
|
if (this.verified)
|
|
@@ -6,6 +6,8 @@ import { FaceML5Detector } from '../../../libs/FaceML5Detector/FaceML5Detector';
|
|
|
6
6
|
import { FacePose } from '../../../libs/FaceML5Detector/FacePose';
|
|
7
7
|
import { delay } from '../../../utils/utils';
|
|
8
8
|
import store from '../../../helpers/store';
|
|
9
|
+
import { BaseComponent } from '../../base-component';
|
|
10
|
+
import { FlowMoments, FlowSteps } from '../../../models/FlowSteps';
|
|
9
11
|
export class SelfieCapture {
|
|
10
12
|
// @State() private animationPath: string;
|
|
11
13
|
constructor() {
|
|
@@ -27,6 +29,7 @@ export class SelfieCapture {
|
|
|
27
29
|
this.cameras = new Cameras();
|
|
28
30
|
this.demoEnded = false;
|
|
29
31
|
this.uploadingLink = 'https://ekyc.blob.core.windows.net/$web/animations/uploading_selfie.mp4';
|
|
32
|
+
this.baseComponent = new BaseComponent(FlowSteps.SelfieHoldAnimation);
|
|
30
33
|
}
|
|
31
34
|
async eventChangeTitle(event) {
|
|
32
35
|
// this.stopAnimation = false;
|
|
@@ -34,11 +37,13 @@ export class SelfieCapture {
|
|
|
34
37
|
this.titleMesage = SelfieCaptureValues.FinalTitle;
|
|
35
38
|
}
|
|
36
39
|
else {
|
|
40
|
+
await this.baseComponent.logStep(FlowSteps.SelfieTiltAnimation, FlowMoments.Initialized);
|
|
37
41
|
this.titleMesage = SelfieCaptureValues.FacePoseMapping[event.detail];
|
|
38
42
|
this.demoEnded = false;
|
|
39
43
|
this.demoVideo.src = SelfieCaptureValues.FacePoseDemoMapping[event.detail];
|
|
40
44
|
this.demoVideo.play();
|
|
41
45
|
await delay(SelfieCaptureValues.VideoLenght);
|
|
46
|
+
await this.baseComponent.logStep(FlowSteps.SelfieTiltAnimation, FlowMoments.Finalized);
|
|
42
47
|
this.demoEnded = true;
|
|
43
48
|
}
|
|
44
49
|
}
|
|
@@ -57,13 +62,16 @@ export class SelfieCapture {
|
|
|
57
62
|
}
|
|
58
63
|
}
|
|
59
64
|
async componentDidLoad() {
|
|
65
|
+
await this.baseComponent.logStep(FlowSteps.SelfieHoldAnimation, FlowMoments.Initialized);
|
|
60
66
|
this.demoVideo.src = SelfieCaptureValues.FacePoseDemoMapping[FacePose.Main];
|
|
61
67
|
this.demoVideo.play();
|
|
62
68
|
await delay(SelfieCaptureValues.VideoLenght);
|
|
69
|
+
await this.baseComponent.logStep(FlowSteps.SelfieHoldAnimation, FlowMoments.Finalized);
|
|
63
70
|
this.demoEnded = true;
|
|
64
71
|
this.openCamera();
|
|
65
72
|
}
|
|
66
73
|
async openCamera() {
|
|
74
|
+
await this.baseComponent.logStep(FlowSteps.SelfieCapture, FlowMoments.Initialized);
|
|
67
75
|
const constraints = this.cameras.GetConstraints('', store.device, true);
|
|
68
76
|
setTimeout(() => {
|
|
69
77
|
navigator.mediaDevices
|
|
@@ -94,6 +102,7 @@ export class SelfieCapture {
|
|
|
94
102
|
this.captureTaken = true;
|
|
95
103
|
let res = await Stream.getInstance().takePhoto();
|
|
96
104
|
this.photoIsReady(res);
|
|
105
|
+
await this.baseComponent.logStep(FlowSteps.SelfieHoldAnimation, FlowMoments.Finalized);
|
|
97
106
|
}
|
|
98
107
|
verificationFinished() {
|
|
99
108
|
if (this.verified)
|
|
@@ -4,18 +4,10 @@ import { CompleteValues } from '../../../helpers/textValues';
|
|
|
4
4
|
import completeImg from '../../../assets/complete.svg';
|
|
5
5
|
import store from '../../../helpers/store';
|
|
6
6
|
import Events from '../../../helpers/Events';
|
|
7
|
-
import { FlowSteps } from '../../../models/FlowSteps';
|
|
8
|
-
import { BaseComponent } from '../../base-component';
|
|
9
7
|
export class EndRedirect {
|
|
10
|
-
constructor() {
|
|
11
|
-
this.baseComponent = new BaseComponent(FlowSteps.End);
|
|
12
|
-
this.baseComponent.setEventEmitter(this.apiErrorEvent);
|
|
13
|
-
}
|
|
8
|
+
constructor() { }
|
|
14
9
|
async componentDidLoad() {
|
|
15
10
|
Events.flowCompleted();
|
|
16
|
-
if (store.environment !== 'DEMO') {
|
|
17
|
-
await this.baseComponent.initialize();
|
|
18
|
-
}
|
|
19
11
|
}
|
|
20
12
|
render() {
|
|
21
13
|
return (h("div", { class: "container" }, h("div", { class: "row" }, h("div", null, h("h1", { class: "text-center" }, CompleteValues.Title), h("p", { class: "main-text font-size-18 mt-8 text-center" }, CompleteValues.Description)), h("div", { class: "buletin-container" }, h("div", { class: "container-coin" }, h("div", { class: "coin-scale" }, h("div", { class: "coin-flip" }, h("img", { class: "w-40 coin", src: completeImg }))))), h("div", { class: "text-center" }, h("p", { class: "font-weight-900 font-size-3 color-black-2 text-center mt-20" }, CompleteValues.Message), h("p", null, store.requestId)), h("div", { class: "btn-buletin" }, h("p", { class: "main-text font-size-18 text-center mb-0" }, CompleteValues.FooterText)))));
|
|
@@ -5,11 +5,20 @@ export var FlowSteps;
|
|
|
5
5
|
FlowSteps[FlowSteps["Agreements"] = 'agreements'] = "Agreements";
|
|
6
6
|
FlowSteps[FlowSteps["OtpSend"] = 'otp-send'] = "OtpSend";
|
|
7
7
|
FlowSteps[FlowSteps["OtpCheck"] = 'otp-check'] = "OtpCheck";
|
|
8
|
-
FlowSteps[FlowSteps["CiFrontHowTo"] = 'ci-front-how-to'] = "CiFrontHowTo";
|
|
9
8
|
FlowSteps[FlowSteps["CiFront"] = 'ci-front'] = "CiFront";
|
|
10
|
-
FlowSteps[FlowSteps["
|
|
9
|
+
FlowSteps[FlowSteps["CiFrontHowTo"] = 'ci-front-how-to'] = "CiFrontHowTo";
|
|
10
|
+
FlowSteps[FlowSteps["CiFrontHoldAnimation"] = 'ci-front-hold-animation'] = "CiFrontHoldAnimation";
|
|
11
|
+
FlowSteps[FlowSteps["CiFrontTiltAnimation"] = 'ci-front-tilt-animation'] = "CiFrontTiltAnimation";
|
|
12
|
+
FlowSteps[FlowSteps["CiFrontCapture"] = 'ci-front-capture'] = "CiFrontCapture";
|
|
11
13
|
FlowSteps[FlowSteps["CiBack"] = 'ci-back'] = "CiBack";
|
|
14
|
+
FlowSteps[FlowSteps["CiBackHowTo"] = 'ci-back-how-to'] = "CiBackHowTo";
|
|
15
|
+
FlowSteps[FlowSteps["CiBackHoldAnimation"] = 'ci-back-hold-animation'] = "CiBackHoldAnimation";
|
|
16
|
+
FlowSteps[FlowSteps["CiBackTiltAnimation"] = 'ci-back-tilt-animation'] = "CiBackTiltAnimation";
|
|
17
|
+
FlowSteps[FlowSteps["CiBackCapture"] = 'ci-back-capture'] = "CiBackCapture";
|
|
12
18
|
FlowSteps[FlowSteps["SelfieHowTo"] = 'selfie-how-to'] = "SelfieHowTo";
|
|
19
|
+
FlowSteps[FlowSteps["SelfieHoldAnimation"] = 'selfie-hold-animation'] = "SelfieHoldAnimation";
|
|
20
|
+
FlowSteps[FlowSteps["SelfieTiltAnimation"] = 'selfie-tilt-animation'] = "SelfieTiltAnimation";
|
|
21
|
+
FlowSteps[FlowSteps["SelfieCapture"] = 'selfie-capture'] = "SelfieCapture";
|
|
13
22
|
FlowSteps[FlowSteps["Selfie"] = 'selfie'] = "Selfie";
|
|
14
23
|
FlowSteps[FlowSteps["End"] = 'end'] = "End";
|
|
15
24
|
FlowSteps[FlowSteps["CameraError"] = 'camera-error'] = "CameraError";
|