@ekyc_qoobiss/qbs-ect-cmp 3.6.40 → 3.6.42
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-bfe4477a.js → TranslationUtils-dd73945b.js} +31 -43
- package/dist/cjs/{agreement-check_19.cjs.entry.js → agreement-check_17.cjs.entry.js} +248 -821
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/qbs-ect-cmp.cjs.js +1 -1
- package/dist/cjs/random-actions.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +1 -3
- package/dist/collection/components/common/how-to-info/how-to-info.js +11 -34
- package/dist/collection/components/common/id-capture/id-capture.js +39 -19
- package/dist/collection/components/common/selfie-capture/selfie-capture.js +26 -27
- package/dist/collection/components/controls/camera/camera.js +1 -3
- package/dist/collection/components/flow/agreement-info/agreement-info.js +4 -5
- package/dist/collection/components/flow/landing-validation/landing-validation.js +11 -19
- package/dist/collection/components/flow/mobile-redirect/mobile-redirect.js +1 -1
- package/dist/collection/components/flow/process-id/process-id.js +47 -161
- package/dist/collection/components/flow/sms-code-validation/sms-code-validation.js +7 -56
- package/dist/collection/components/flow/sms-send/sms-send.css +0 -0
- package/dist/collection/components/flow/sms-send/sms-send.js +91 -0
- package/dist/collection/components/flow/user-liveness/user-liveness.js +46 -118
- package/dist/collection/components/identification-component/identification-component.js +14 -41
- package/dist/collection/helpers/ApiCall.js +14 -15
- package/dist/collection/helpers/ML5.js +1 -1
- package/dist/collection/helpers/store.js +0 -18
- package/dist/collection/helpers/textValues.js +2 -0
- package/dist/collection/models/CaptureFlow.js +0 -16
- package/dist/collection/models/FlowStatus.js +16 -10
- package/dist/esm/{TranslationUtils-7e68bc94.js → TranslationUtils-741a728a.js} +31 -43
- package/dist/esm/{agreement-check_19.entry.js → agreement-check_17.entry.js} +248 -819
- package/dist/esm/loader.js +1 -1
- package/dist/esm/qbs-ect-cmp.js +1 -1
- package/dist/esm/random-actions.entry.js +1 -1
- package/dist/qbs-ect-cmp/p-87c689d6.js +1 -0
- package/dist/qbs-ect-cmp/{p-d1d9feaf.entry.js → p-a130edd5.entry.js} +1 -1
- package/dist/qbs-ect-cmp/{p-df2ea91b.entry.js → p-f62c1796.entry.js} +2 -2
- package/dist/qbs-ect-cmp/qbs-ect-cmp.esm.js +1 -1
- package/dist/types/components/common/how-to-info/how-to-info.d.ts +0 -1
- package/dist/types/components/common/id-capture/id-capture.d.ts +5 -1
- package/dist/types/components/common/selfie-capture/selfie-capture.d.ts +3 -2
- package/dist/types/components/flow/process-id/process-id.d.ts +0 -3
- package/dist/types/components/flow/sms-code-validation/sms-code-validation.d.ts +0 -3
- package/dist/types/components/flow/sms-send/sms-send.d.ts +17 -0
- package/dist/types/components/flow/user-liveness/user-liveness.d.ts +3 -6
- package/dist/types/components/identification-component/identification-component.d.ts +1 -2
- package/dist/types/components.d.ts +18 -62
- package/dist/types/helpers/ApiCall.d.ts +9 -3
- package/dist/types/helpers/textValues.d.ts +2 -0
- package/dist/types/models/CaptureFlow.d.ts +2 -19
- package/dist/types/models/FlowStatus.d.ts +18 -10
- package/dist/types/models/IAbortResult.d.ts +1 -0
- package/dist/types/models/IAddRequest.d.ts +1 -1
- package/dist/types/models/IEctStore.d.ts +0 -6
- package/dist/types/models/IOtpCheck.d.ts +1 -0
- package/dist/types/models/IOtpSend.d.ts +1 -0
- package/dist/types/models/IUploadFile.d.ts +1 -0
- package/package.json +1 -1
- package/dist/collection/components/common/id-back-capture/id-back-capture.css +0 -35
- package/dist/collection/components/common/id-back-capture/id-back-capture.js +0 -219
- package/dist/collection/components/common/id-tilt/id-tilt.css +0 -35
- package/dist/collection/components/common/id-tilt/id-tilt.js +0 -220
- package/dist/collection/components/common/selfie-tilt/selfie-tilt.css +0 -7
- package/dist/collection/components/common/selfie-tilt/selfie-tilt.js +0 -221
- package/dist/qbs-ect-cmp/p-d35256e9.js +0 -1
- package/dist/types/components/common/id-back-capture/id-back-capture.d.ts +0 -28
- package/dist/types/components/common/id-tilt/id-tilt.d.ts +0 -28
- package/dist/types/components/common/selfie-tilt/selfie-tilt.d.ts +0 -31
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["loader-dots.cjs",[[1,"loader-dots"]]],["random-actions.cjs",[[0,"random-actions"]]],["agreement-
|
|
17
|
+
return index.bootstrapLazy([["loader-dots.cjs",[[1,"loader-dots"]]],["random-actions.cjs",[[0,"random-actions"]]],["agreement-check_17.cjs",[[1,"identification-component",{"token":[1537],"order_id":[1537],"api_url":[1537],"env":[1537],"redirect_id":[1537],"phone_number":[1537],"lang_iso":[1537],"errorMessage":[32],"errorTitle":[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"],[0,"apiError","apiErrorEmitter"],[9,"scroll","handleScroll"]]],[0,"process-id",{"showTimeout":[32],"showInvalid":[32],"flow":[32]},[[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoIdCapture","captureIdImage"],[0,"recordingIdCapture","capturedIdRecording"]]],[0,"user-liveness",{"showError":[32],"flow":[32],"howToDone":[32]},[[0,"howToInfoDone","howToDoneEvent"],[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoSelfieCapture","captureSelfieImage"],[0,"recordingSelfieCapture","capturedSelfieRecording"]]],[0,"agreement-info",{"agreementsChecked":[32],"termsChecked":[32],"openAgreements":[32],"openTerms":[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"]]],[0,"camera-error",{"title":[32],"description":[32],"buttonDisabled":[32],"demoVideo":[32]}],[0,"end-redirect"],[0,"error-end",{"message":[1],"errorTitle":[1,"error-title"]}],[0,"landing-validation",{"warningText":[32],"buttonDisabled":[32]}],[0,"mobile-redirect",{"infoTextTop":[32],"infoTextBottom":[32],"contact":[32],"invalidValue":[32],"waitingMobile":[32],"orderStatus":[32],"redirectLink":[32],"qrCode":[32],"prefilledPhone":[32]}],[0,"sms-code-validation",{"title":[32],"details":[32],"buttonText":[32],"code":[32],"canSend":[32]}],[0,"sms-send",{"buttonText":[32],"phoneNumber":[32],"prefilledPhone":[32],"canSend":[32]}],[0,"id-capture",{"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"showDemo":[32],"demoVideo":[32]},[[0,"videoStarted","eventVideoStarted"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"selfie-capture",{"videoStarted":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"demoEnded":[32],"demoVideo":[32],"captureHeight":[32],"captureWidth":[32]},[[0,"videoStarted","eventVideoStarted"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"agreement-check",{"agreementType":[1,"agreement-type"],"htmlContent":[32],"buttonEnabled":[32],"scrollClass":[32]}],[0,"capture-error",{"type":[1],"buttonEnabled":[32],"buttonText":[32]}],[0,"how-to-info",{"topTitle":[32],"subTitle":[32],"imagePath":[32],"buttonText":[32],"buttonEnabled":[32]}],[0,"camera-comp",{"modelPath":[1,"model-path"],"probabilityThreshold":[2,"probability-threshold"],"captureMode":[1,"capture-mode"]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -17,7 +17,7 @@ const patchBrowser = () => {
|
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
patchBrowser().then(options => {
|
|
20
|
-
return index.bootstrapLazy([["loader-dots.cjs",[[1,"loader-dots"]]],["random-actions.cjs",[[0,"random-actions"]]],["agreement-
|
|
20
|
+
return index.bootstrapLazy([["loader-dots.cjs",[[1,"loader-dots"]]],["random-actions.cjs",[[0,"random-actions"]]],["agreement-check_17.cjs",[[1,"identification-component",{"token":[1537],"order_id":[1537],"api_url":[1537],"env":[1537],"redirect_id":[1537],"phone_number":[1537],"lang_iso":[1537],"errorMessage":[32],"errorTitle":[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"],[0,"apiError","apiErrorEmitter"],[9,"scroll","handleScroll"]]],[0,"process-id",{"showTimeout":[32],"showInvalid":[32],"flow":[32]},[[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoIdCapture","captureIdImage"],[0,"recordingIdCapture","capturedIdRecording"]]],[0,"user-liveness",{"showError":[32],"flow":[32],"howToDone":[32]},[[0,"howToInfoDone","howToDoneEvent"],[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoSelfieCapture","captureSelfieImage"],[0,"recordingSelfieCapture","capturedSelfieRecording"]]],[0,"agreement-info",{"agreementsChecked":[32],"termsChecked":[32],"openAgreements":[32],"openTerms":[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"]]],[0,"camera-error",{"title":[32],"description":[32],"buttonDisabled":[32],"demoVideo":[32]}],[0,"end-redirect"],[0,"error-end",{"message":[1],"errorTitle":[1,"error-title"]}],[0,"landing-validation",{"warningText":[32],"buttonDisabled":[32]}],[0,"mobile-redirect",{"infoTextTop":[32],"infoTextBottom":[32],"contact":[32],"invalidValue":[32],"waitingMobile":[32],"orderStatus":[32],"redirectLink":[32],"qrCode":[32],"prefilledPhone":[32]}],[0,"sms-code-validation",{"title":[32],"details":[32],"buttonText":[32],"code":[32],"canSend":[32]}],[0,"sms-send",{"buttonText":[32],"phoneNumber":[32],"prefilledPhone":[32],"canSend":[32]}],[0,"id-capture",{"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"showDemo":[32],"demoVideo":[32]},[[0,"videoStarted","eventVideoStarted"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"selfie-capture",{"videoStarted":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"demoEnded":[32],"demoVideo":[32],"captureHeight":[32],"captureWidth":[32]},[[0,"videoStarted","eventVideoStarted"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"agreement-check",{"agreementType":[1,"agreement-type"],"htmlContent":[32],"buttonEnabled":[32],"scrollClass":[32]}],[0,"capture-error",{"type":[1],"buttonEnabled":[32],"buttonText":[32]}],[0,"how-to-info",{"topTitle":[32],"subTitle":[32],"imagePath":[32],"buttonText":[32],"buttonEnabled":[32]}],[0,"camera-comp",{"modelPath":[1,"model-path"],"probabilityThreshold":[2,"probability-threshold"],"captureMode":[1,"capture-mode"]}]]]], options);
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
exports.setNonce = index.setNonce;
|
|
@@ -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-dd73945b.js');
|
|
7
7
|
|
|
8
8
|
const randomActionsCss = "";
|
|
9
9
|
|
|
@@ -4,12 +4,9 @@
|
|
|
4
4
|
"./components/common/camera-error/camera-error.js",
|
|
5
5
|
"./components/common/capture-error/capture-error.js",
|
|
6
6
|
"./components/common/how-to-info/how-to-info.js",
|
|
7
|
-
"./components/common/id-back-capture/id-back-capture.js",
|
|
8
7
|
"./components/common/id-capture/id-capture.js",
|
|
9
|
-
"./components/common/id-tilt/id-tilt.js",
|
|
10
8
|
"./components/common/random-actions/random-actions.js",
|
|
11
9
|
"./components/common/selfie-capture/selfie-capture.js",
|
|
12
|
-
"./components/common/selfie-tilt/selfie-tilt.js",
|
|
13
10
|
"./components/controls/camera/camera.js",
|
|
14
11
|
"./components/controls/loader-dots/loader-dots.js",
|
|
15
12
|
"./components/flow/agreement-info/agreement-info.js",
|
|
@@ -19,6 +16,7 @@
|
|
|
19
16
|
"./components/flow/mobile-redirect/mobile-redirect.js",
|
|
20
17
|
"./components/flow/process-id/process-id.js",
|
|
21
18
|
"./components/flow/sms-code-validation/sms-code-validation.js",
|
|
19
|
+
"./components/flow/sms-send/sms-send.js",
|
|
22
20
|
"./components/flow/user-liveness/user-liveness.js",
|
|
23
21
|
"./components/identification-component/identification-component.js"
|
|
24
22
|
],
|
|
@@ -5,7 +5,7 @@ import { BaseComponent } from '../../base-component';
|
|
|
5
5
|
import { FlowSteps } from '../../../models/FlowSteps';
|
|
6
6
|
import { Translations } from '../../../helpers/TranslationUtils';
|
|
7
7
|
export class HowToInfo {
|
|
8
|
-
constructor() { this.
|
|
8
|
+
constructor() { this.topTitle = undefined; this.subTitle = undefined; this.imagePath = undefined; this.buttonText = undefined; this.buttonEnabled = undefined; }
|
|
9
9
|
async componentDidLoad() {
|
|
10
10
|
await this.baseComponent.initialize();
|
|
11
11
|
}
|
|
@@ -20,18 +20,16 @@ export class HowToInfo {
|
|
|
20
20
|
this.translations = await Translations.getValues();
|
|
21
21
|
this.subTitle = '';
|
|
22
22
|
this.buttonEnabled = true;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
this.subTitle = this.translations.HowToValues.IdSubTitileBack;
|
|
34
|
-
}
|
|
23
|
+
this.topTitle = this.translations.HowToValues.IdTitile;
|
|
24
|
+
this.imagePath = 'https://ekyc.blob.core.windows.net/$web/howto_id.png';
|
|
25
|
+
this.buttonText = this.translations.HowToValues.IdButton;
|
|
26
|
+
if (store.flowStatus == FlowStatus.IDFRONT) {
|
|
27
|
+
this.baseComponent = new BaseComponent(FlowSteps.CiFrontHowTo);
|
|
28
|
+
this.subTitle = this.translations.HowToValues.IdSubTitileFace;
|
|
29
|
+
}
|
|
30
|
+
else if (store.flowStatus == FlowStatus.IDBACK) {
|
|
31
|
+
this.baseComponent = new BaseComponent(FlowSteps.CiBackHowTo);
|
|
32
|
+
this.subTitle = this.translations.HowToValues.IdSubTitileBack;
|
|
35
33
|
}
|
|
36
34
|
if (store.flowStatus == FlowStatus.LIVENESS) {
|
|
37
35
|
this.baseComponent = new BaseComponent(FlowSteps.SelfieHowTo);
|
|
@@ -57,27 +55,6 @@ export class HowToInfo {
|
|
|
57
55
|
"$": ["how-to-info.css"]
|
|
58
56
|
};
|
|
59
57
|
}
|
|
60
|
-
static get properties() {
|
|
61
|
-
return {
|
|
62
|
-
"idSide": {
|
|
63
|
-
"type": "string",
|
|
64
|
-
"mutable": false,
|
|
65
|
-
"complexType": {
|
|
66
|
-
"original": "string",
|
|
67
|
-
"resolved": "string",
|
|
68
|
-
"references": {}
|
|
69
|
-
},
|
|
70
|
-
"required": false,
|
|
71
|
-
"optional": false,
|
|
72
|
-
"docs": {
|
|
73
|
-
"tags": [],
|
|
74
|
-
"text": ""
|
|
75
|
-
},
|
|
76
|
-
"attribute": "id-side",
|
|
77
|
-
"reflect": false
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
58
|
static get states() {
|
|
82
59
|
return {
|
|
83
60
|
"topTitle": {},
|
|
@@ -11,12 +11,12 @@ import { BaseComponent } from '../../base-component';
|
|
|
11
11
|
import { FlowMoments, FlowSteps } from '../../../models/FlowSteps';
|
|
12
12
|
import { VerificationMode } from '../../../models/IVerificationMode';
|
|
13
13
|
import { Translations } from '../../../helpers/TranslationUtils';
|
|
14
|
+
import { FlowStatus } from '../../../models/FlowStatus';
|
|
14
15
|
// import { IDPose } from '../../libs/IDML5Detector/IDPose';
|
|
15
16
|
export class IdCapture {
|
|
16
17
|
// @State() private animationPath: string;
|
|
17
18
|
constructor() {
|
|
18
|
-
this.photoIsReady = photos => {
|
|
19
|
-
//this.closeCamera();
|
|
19
|
+
this.photoIsReady = (photos) => {
|
|
20
20
|
this.eventPhotoCapture.emit(photos);
|
|
21
21
|
};
|
|
22
22
|
this.videoStarted = undefined;
|
|
@@ -30,7 +30,6 @@ export class IdCapture {
|
|
|
30
30
|
this.verified = false;
|
|
31
31
|
this.cameras = new Cameras();
|
|
32
32
|
this.showDemo = true;
|
|
33
|
-
this.baseComponent = new BaseComponent(FlowSteps.CiFrontCapture);
|
|
34
33
|
}
|
|
35
34
|
eventVideoStarted(event) {
|
|
36
35
|
this.videoStarted = true;
|
|
@@ -38,15 +37,41 @@ export class IdCapture {
|
|
|
38
37
|
}
|
|
39
38
|
async componentWillLoad() {
|
|
40
39
|
this.translations = await Translations.getValues();
|
|
41
|
-
this.titleMesage = this.translations.IdCaptureValues.Title;
|
|
42
|
-
//this.videoDemoStyle = this.device.isMobile ? { 'width': window.screen.width + 'px', 'height': window.screen.height + 'px', 'object-fit': 'fill' } : {};
|
|
43
40
|
if (!navigator.mediaDevices) {
|
|
44
41
|
this.apiErrorEvent.emit({ message: 'This browser does not support webRTC' });
|
|
45
42
|
}
|
|
43
|
+
this.baseComponent = new BaseComponent(this.flowStep);
|
|
44
|
+
}
|
|
45
|
+
initVariables() {
|
|
46
|
+
if (store.flowStatus == FlowStatus.IDFRONT) {
|
|
47
|
+
this.pose = IDPose.Straight;
|
|
48
|
+
this.flowStep = FlowSteps.CiFrontCapture;
|
|
49
|
+
this.titleMesage = this.translations.IdCaptureValues.Title;
|
|
50
|
+
this.verificationMode = VerificationMode.Full;
|
|
51
|
+
}
|
|
52
|
+
else if (store.flowStatus == FlowStatus.IDBACK) {
|
|
53
|
+
this.pose = IDPose.BackStraight;
|
|
54
|
+
this.flowStep = FlowSteps.CiBackCapture;
|
|
55
|
+
this.titleMesage = this.translations.IdCaptureValues.TtileRotate;
|
|
56
|
+
this.verificationMode = VerificationMode.Full;
|
|
57
|
+
}
|
|
58
|
+
else if (store.flowStatus == FlowStatus.IDTILT) {
|
|
59
|
+
this.titleMesage = this.translations.IdCaptureValues.IDPoseMapping;
|
|
60
|
+
this.pose = IDPose.Tilted;
|
|
61
|
+
this.flowStep = FlowSteps.CiTilt;
|
|
62
|
+
this.verificationMode = VerificationMode.Tilt;
|
|
63
|
+
}
|
|
46
64
|
}
|
|
47
65
|
async componentDidLoad() {
|
|
48
|
-
await this.baseComponent.logStep(
|
|
49
|
-
this.
|
|
66
|
+
await this.baseComponent.logStep(this.flowStep, FlowMoments.Initialized);
|
|
67
|
+
this.initVariables();
|
|
68
|
+
if (store.flowStatus == FlowStatus.IDBACK) {
|
|
69
|
+
this.demoVideo.src = IdCaptureValues.IDPoseDemoMapping[IDPose.Rotate];
|
|
70
|
+
this.demoVideo.play();
|
|
71
|
+
await delay(this.translations.GlobalValues.VideoLenght);
|
|
72
|
+
this.titleMesage = this.translations.IdCaptureValues.TitleBack;
|
|
73
|
+
}
|
|
74
|
+
this.demoVideo.src = IdCaptureValues.IDPoseDemoMapping[this.pose];
|
|
50
75
|
this.demoVideo.play();
|
|
51
76
|
await delay(this.translations.GlobalValues.VideoLenght);
|
|
52
77
|
this.showDemo = false;
|
|
@@ -58,7 +83,7 @@ export class IdCapture {
|
|
|
58
83
|
navigator.mediaDevices
|
|
59
84
|
.getUserMedia(constraints)
|
|
60
85
|
.then(stream => {
|
|
61
|
-
const superStream = Stream.getNewInstance(
|
|
86
|
+
const superStream = Stream.getNewInstance(this.verificationMode);
|
|
62
87
|
superStream.initStream(stream);
|
|
63
88
|
})
|
|
64
89
|
.catch(e => {
|
|
@@ -89,7 +114,7 @@ export class IdCapture {
|
|
|
89
114
|
else {
|
|
90
115
|
this.eventTimeElapsed.emit();
|
|
91
116
|
}
|
|
92
|
-
await this.baseComponent.logStep(
|
|
117
|
+
await this.baseComponent.logStep(this.flowStep, FlowMoments.Finalized);
|
|
93
118
|
}
|
|
94
119
|
async verificationFinished() {
|
|
95
120
|
if (this.verified)
|
|
@@ -97,15 +122,11 @@ export class IdCapture {
|
|
|
97
122
|
this.verified = true;
|
|
98
123
|
this.titleMesage = this.translations.IdCaptureValues.Loading;
|
|
99
124
|
this.closeCamera();
|
|
100
|
-
this.showDemo = true;
|
|
101
|
-
var loops = 0;
|
|
102
125
|
this.demoVideo.src = 'https://ekyc.blob.core.windows.net/$web/animations/uploading_id.mp4';
|
|
103
|
-
this.demoVideo.loop =
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
await delay(this.translations.GlobalValues.VideoLenght);
|
|
108
|
-
}
|
|
126
|
+
this.demoVideo.loop = true;
|
|
127
|
+
this.showDemo = true;
|
|
128
|
+
this.demoVideo.play();
|
|
129
|
+
await delay(10000);
|
|
109
130
|
this.eventTimeElapsed.emit();
|
|
110
131
|
}
|
|
111
132
|
render() {
|
|
@@ -121,9 +142,8 @@ export class IdCapture {
|
|
|
121
142
|
cameraStyleInner = { marginTop: Math.round((this.cameraSize.height - (this.cameraSize.width * 9) / 16) / 2) * -1 + 'px' };
|
|
122
143
|
}
|
|
123
144
|
let titleClass = this.verified ? 'color-black-2 text-center' : 'color-white text-center';
|
|
124
|
-
//let videoClass = this.device.isMobile ? '' : 'video-demo';
|
|
125
145
|
let bgDemo = this.verified ? 'container' : 'container bg-black';
|
|
126
|
-
return (h("div", { class: bgDemo }, h("div", { class: "container-video" }, h("div", { hidden: this.showDemo == false }, h("video", { id: "
|
|
146
|
+
return (h("div", { class: bgDemo }, h("div", { class: "container-video" }, h("div", { hidden: this.showDemo == false }, h("video", { id: "howTo", class: "video-demo", playsinline: true, ref: el => (this.demoVideo = el) }, h("source", { type: "video/mp4" }))), h("div", { hidden: this.showDemo }, h("div", { hidden: this.verified }, h("div", { class: "video-capture" }, h("div", { style: cameraStyle }, h("div", { style: cameraStyleInner }, h("camera-comp", { "capture-mode": "id" })))))), h("div", { class: "capture-title" }, h("h1", { class: titleClass }, this.titleMesage), h("p", { class: "main-text font-size-18 text-right mb-0" }, this.translations.GlobalValues.FooterText)))));
|
|
127
147
|
}
|
|
128
148
|
static get is() { return "id-capture"; }
|
|
129
149
|
static get originalStyleUrls() {
|
|
@@ -10,28 +10,21 @@ import { BaseComponent } from '../../base-component';
|
|
|
10
10
|
import { FlowMoments, FlowSteps } from '../../../models/FlowSteps';
|
|
11
11
|
import { VerificationMode } from '../../../models/IVerificationMode';
|
|
12
12
|
import { Translations } from '../../../helpers/TranslationUtils';
|
|
13
|
+
import { FlowStatus } from '../../../models/FlowStatus';
|
|
13
14
|
export class SelfieCapture {
|
|
14
|
-
// @State() private animationPath: string;
|
|
15
15
|
constructor() {
|
|
16
|
-
this.photoIsReady = photos => {
|
|
17
|
-
//this.closeCamera();
|
|
18
|
-
this.eventPhotoCapture.emit(photos);
|
|
19
|
-
};
|
|
20
16
|
this.videoStarted = undefined;
|
|
21
17
|
this.captureTaken = undefined;
|
|
22
18
|
this.verified = undefined;
|
|
23
19
|
this.titleMesage = undefined;
|
|
24
20
|
this.demoEnded = undefined;
|
|
25
21
|
this.demoVideo = undefined;
|
|
26
|
-
this.uploadingLink = undefined;
|
|
27
22
|
this.captureHeight = undefined;
|
|
28
23
|
this.captureWidth = undefined;
|
|
29
24
|
this.captureTaken = false;
|
|
30
25
|
this.verified = false;
|
|
31
26
|
this.cameras = new Cameras();
|
|
32
27
|
this.demoEnded = false;
|
|
33
|
-
this.uploadingLink = 'https://ekyc.blob.core.windows.net/$web/animations/uploading_selfie.mp4';
|
|
34
|
-
this.baseComponent = new BaseComponent(FlowSteps.SelfieCapture);
|
|
35
28
|
}
|
|
36
29
|
eventVideoStarted(event) {
|
|
37
30
|
this.videoStarted = true;
|
|
@@ -49,8 +42,20 @@ export class SelfieCapture {
|
|
|
49
42
|
}
|
|
50
43
|
}
|
|
51
44
|
async componentDidLoad() {
|
|
52
|
-
|
|
53
|
-
|
|
45
|
+
if (store.flowStatus == FlowStatus.LIVENESS) {
|
|
46
|
+
this.verificationMode = VerificationMode.Full;
|
|
47
|
+
this.currentStep = FlowSteps.SelfieCapture;
|
|
48
|
+
this.mainStream = Stream.getNewInstance(this.verificationMode);
|
|
49
|
+
this.demoVideo.src = SelfieCaptureValues.FacePoseDemoMapping[FacePose.Main];
|
|
50
|
+
}
|
|
51
|
+
else if (store.flowStatus == FlowStatus.LIVENESSGESTURE) {
|
|
52
|
+
this.verificationMode = VerificationMode.Tilt;
|
|
53
|
+
this.currentStep = FlowSteps.SelfieTilt;
|
|
54
|
+
this.mainStream = Stream.getNewInstance(this.verificationMode);
|
|
55
|
+
this.demoVideo.src = SelfieCaptureValues.FacePoseDemoMapping[this.mainStream.facePose];
|
|
56
|
+
}
|
|
57
|
+
this.baseComponent = new BaseComponent(this.currentStep);
|
|
58
|
+
await this.baseComponent.logStep(this.currentStep, FlowMoments.Initialized);
|
|
54
59
|
this.demoVideo.play();
|
|
55
60
|
await delay(this.translations.GlobalValues.VideoLenght);
|
|
56
61
|
this.demoEnded = true;
|
|
@@ -62,8 +67,7 @@ export class SelfieCapture {
|
|
|
62
67
|
navigator.mediaDevices
|
|
63
68
|
.getUserMedia(constraints)
|
|
64
69
|
.then(stream => {
|
|
65
|
-
|
|
66
|
-
superStream.initStream(stream);
|
|
70
|
+
this.mainStream.initStream(stream);
|
|
67
71
|
})
|
|
68
72
|
.catch(e => {
|
|
69
73
|
this.closeCamera();
|
|
@@ -72,8 +76,8 @@ export class SelfieCapture {
|
|
|
72
76
|
}, 100);
|
|
73
77
|
}
|
|
74
78
|
closeCamera() {
|
|
75
|
-
if (
|
|
76
|
-
|
|
79
|
+
if (this.mainStream) {
|
|
80
|
+
this.mainStream.dropStream();
|
|
77
81
|
}
|
|
78
82
|
}
|
|
79
83
|
disconnectedCallback() {
|
|
@@ -85,14 +89,14 @@ export class SelfieCapture {
|
|
|
85
89
|
if (this.captureTaken)
|
|
86
90
|
return;
|
|
87
91
|
this.captureTaken = true;
|
|
88
|
-
if (
|
|
89
|
-
let res = await
|
|
90
|
-
this.
|
|
92
|
+
if (this.mainStream) {
|
|
93
|
+
let res = await this.mainStream.takePhoto();
|
|
94
|
+
this.eventPhotoCapture.emit(res);
|
|
91
95
|
}
|
|
92
96
|
else {
|
|
93
97
|
this.eventTimeElapsed.emit();
|
|
94
98
|
}
|
|
95
|
-
await this.baseComponent.logStep(
|
|
99
|
+
await this.baseComponent.logStep(this.currentStep, FlowMoments.Finalized);
|
|
96
100
|
}
|
|
97
101
|
async verificationFinished() {
|
|
98
102
|
if (this.verified)
|
|
@@ -101,14 +105,10 @@ export class SelfieCapture {
|
|
|
101
105
|
this.titleMesage = this.translations.SelfieCaptureValues.Loading;
|
|
102
106
|
this.closeCamera();
|
|
103
107
|
this.demoEnded = false;
|
|
104
|
-
|
|
105
|
-
this.demoVideo.
|
|
106
|
-
this.demoVideo.
|
|
107
|
-
|
|
108
|
-
loops++;
|
|
109
|
-
this.demoVideo.play();
|
|
110
|
-
await delay(this.translations.GlobalValues.VideoLenght);
|
|
111
|
-
}
|
|
108
|
+
this.demoVideo.src = 'https://ekyc.blob.core.windows.net/$web/animations/uploading_selfie.mp4';
|
|
109
|
+
this.demoVideo.loop = true;
|
|
110
|
+
this.demoVideo.play();
|
|
111
|
+
await delay(10000);
|
|
112
112
|
this.eventTimeElapsed.emit();
|
|
113
113
|
}
|
|
114
114
|
render() {
|
|
@@ -147,7 +147,6 @@ export class SelfieCapture {
|
|
|
147
147
|
"titleMesage": {},
|
|
148
148
|
"demoEnded": {},
|
|
149
149
|
"demoVideo": {},
|
|
150
|
-
"uploadingLink": {},
|
|
151
150
|
"captureHeight": {},
|
|
152
151
|
"captureWidth": {}
|
|
153
152
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Stream } from '../../../helpers/Stream';
|
|
2
2
|
import { h } from '@stencil/core';
|
|
3
3
|
import store from '../../../helpers/store';
|
|
4
|
-
import { VerificationMode } from '../../../models/IVerificationMode';
|
|
5
4
|
// import { PipelineResult } from '../../../libs/FaceDetector/PipelineResult';
|
|
6
5
|
export class Camera {
|
|
7
6
|
constructor() {
|
|
@@ -47,8 +46,7 @@ export class Camera {
|
|
|
47
46
|
return (h("div", { class: "camera" }, h("video", { id: "video", loop: true, autoplay: true, playsinline: true, muted: true, class: cameraVideoClass, ref: el => (this.cameraVideo = el) }), h("canvas", { id: "output", class: cameraCanvasClass, ref: el => (this.cameraCanvas = el) })));
|
|
48
47
|
}
|
|
49
48
|
startStream() {
|
|
50
|
-
|
|
51
|
-
const stream = Stream.getNewInstance(captureMode);
|
|
49
|
+
const stream = Stream.instance;
|
|
52
50
|
stream.updateHtmlElements(this.cameraVideo, this.cameraCanvas, this.component);
|
|
53
51
|
if (this.captureMode == 'selfie') {
|
|
54
52
|
stream.setFaceDetection(true);
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { h } from '@stencil/core';
|
|
2
2
|
import store from '../../../helpers/store';
|
|
3
|
-
import { FlowStatus } from '../../../models/FlowStatus';
|
|
4
3
|
import { FlowSteps } from '../../../models/FlowSteps';
|
|
5
4
|
import { BaseComponent } from '../../base-component';
|
|
6
5
|
import { Translations } from '../../../helpers/TranslationUtils';
|
|
@@ -28,11 +27,11 @@ export class AgreementInfo {
|
|
|
28
27
|
}
|
|
29
28
|
async buttonClick() {
|
|
30
29
|
if (this.agreementsChecked && this.termsChecked) {
|
|
31
|
-
|
|
32
|
-
store.flowStatus =
|
|
30
|
+
try {
|
|
31
|
+
store.flowStatus = await this.baseComponent.apiCall.GetNextFlowState();
|
|
33
32
|
}
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
catch (e) {
|
|
34
|
+
this.apiErrorEvent.emit(e);
|
|
36
35
|
}
|
|
37
36
|
}
|
|
38
37
|
}
|
|
@@ -37,33 +37,25 @@ export class LandingValidation {
|
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
async initRequest() {
|
|
40
|
-
|
|
41
|
-
this.warningText = this.translations.LandingValues.WarningMd;
|
|
42
|
-
}
|
|
43
|
-
else {
|
|
44
|
-
this.warningText = this.translations.LandingValues.Warning;
|
|
45
|
-
}
|
|
40
|
+
this.warningText = this.translations.LandingValues.Warning;
|
|
46
41
|
}
|
|
47
42
|
async startFlow() {
|
|
48
|
-
if (
|
|
43
|
+
if (!this.buttonDisabled) {
|
|
49
44
|
this.buttonDisabled = true;
|
|
50
45
|
if (store.environment === 'DEMO') {
|
|
51
46
|
store.flowStatus = FlowStatus.COMPLETE;
|
|
52
47
|
return;
|
|
53
48
|
}
|
|
54
|
-
|
|
49
|
+
var cameraIsAccessible = await Cameras.InitCameras(store.device);
|
|
50
|
+
if (!cameraIsAccessible) {
|
|
55
51
|
if (store.device.mobileOS == MobileOS.iOS)
|
|
56
52
|
sessionStorage.setItem(SessionKeys.RefreshDoneKey, 'false');
|
|
57
|
-
store.flowStatus = FlowStatus.CAMERAERROR;
|
|
58
|
-
}
|
|
59
|
-
else if (store.agreementsValidation) {
|
|
60
|
-
store.flowStatus = FlowStatus.AGREEMENT;
|
|
61
53
|
}
|
|
62
|
-
|
|
63
|
-
store.flowStatus =
|
|
54
|
+
try {
|
|
55
|
+
store.flowStatus = await this.baseComponent.apiCall.LandingValidationStartFlow(cameraIsAccessible);
|
|
64
56
|
}
|
|
65
|
-
|
|
66
|
-
|
|
57
|
+
catch (e) {
|
|
58
|
+
this.apiErrorEvent.emit(e);
|
|
67
59
|
}
|
|
68
60
|
}
|
|
69
61
|
}
|
|
@@ -73,9 +65,9 @@ export class LandingValidation {
|
|
|
73
65
|
async leaveFlow() {
|
|
74
66
|
if (this.buttonDisabled)
|
|
75
67
|
return;
|
|
76
|
-
store.initialised = false;
|
|
77
68
|
try {
|
|
78
|
-
await this.baseComponent.apiCall.AbortRequest();
|
|
69
|
+
let abortResult = await this.baseComponent.apiCall.AbortRequest();
|
|
70
|
+
store.flowStatus = FlowStatus[abortResult.state];
|
|
79
71
|
Events.flowAborted();
|
|
80
72
|
}
|
|
81
73
|
catch (e) {
|
|
@@ -84,7 +76,7 @@ export class LandingValidation {
|
|
|
84
76
|
}
|
|
85
77
|
}
|
|
86
78
|
render() {
|
|
87
|
-
return (h("div", { class: "container" }, h("div", { class: "row" }, h("div", null, h("h1", { class: "text-center" }, this.translations.LandingValues.Title), h("div", { class: "d-flex space-between align-center" }, h("p", { class: "main-text font-size-2" }, this.translations.LandingValues.Description), h("div", { class: "img-info" }, h("div", { class: "i-effect" }), h("img", { src: info })))), h("div", { class: "info-container" }, h("div", { class: "img-text" }, h("div", { class: "bg-img" }, h("img", { src: idSvg })), h("h3", null, this.translations.LandingValues.IdInfo)), h("div", { class: "img-text" }, h("div", { class: "bg-img" }, h("img", { src: idDevice })), h("h3", null, this.translations.LandingValues.DeviceInfo)), h("div", { class: "img-text" }, h("div", { class: "bg-img" }, h("img", { src: idValidation })), h("h3", null, this.translations.LandingValues.SmsInfo))), h("div", { class: "terms-container" }, h("h3", { class: "font-size-2 mb-1 text-center" }, this.warningText)), h("div", { class: "pos-relative show-bottom" }, h("div", { class: "btn-buletin" }, h("button", { class: "main-button", type: "button", disabled:
|
|
79
|
+
return (h("div", { class: "container" }, h("div", { class: "row" }, h("div", null, h("h1", { class: "text-center" }, this.translations.LandingValues.Title), h("div", { class: "d-flex space-between align-center" }, h("p", { class: "main-text font-size-2" }, this.translations.LandingValues.Description), h("div", { class: "img-info" }, h("div", { class: "i-effect" }), h("img", { src: info })))), h("div", { class: "info-container" }, h("div", { class: "img-text" }, h("div", { class: "bg-img" }, h("img", { src: idSvg })), h("h3", null, this.translations.LandingValues.IdInfo)), h("div", { class: "img-text" }, h("div", { class: "bg-img" }, h("img", { src: idDevice })), h("h3", null, this.translations.LandingValues.DeviceInfo)), h("div", { class: "img-text" }, h("div", { class: "bg-img" }, h("img", { src: idValidation })), h("h3", null, this.translations.LandingValues.SmsInfo))), h("div", { class: "terms-container" }, h("h3", { class: "font-size-2 mb-1 text-center" }, this.warningText)), h("div", { class: "pos-relative show-bottom" }, h("div", { class: "btn-buletin" }, h("button", { class: "main-button", type: "button", disabled: this.buttonDisabled, onClick: () => this.startFlow() }, this.translations.LandingValues.Button), h("p", { class: "main-text font-size-2 link-text mb-0", onClick: () => this.leaveFlow() }, this.translations.LandingValues.ButtonLeave), h("p", { class: "main-text font-size-18 text-right mb-0" }, this.translations.GlobalValues.FooterText))))));
|
|
88
80
|
}
|
|
89
81
|
static get is() { return "landing-validation"; }
|
|
90
82
|
static get originalStyleUrls() {
|
|
@@ -30,7 +30,7 @@ export class MobileRedirect {
|
|
|
30
30
|
this.infoTextTop = this.translations.MobileRedirectValues.InfoTop;
|
|
31
31
|
this.infoTextBottom = this.translations.MobileRedirectValues.InfoBottom;
|
|
32
32
|
let envUri = store.environment == 'QA' ? 'test' : 'ect';
|
|
33
|
-
let baseUri = store.
|
|
33
|
+
let baseUri = store.apiBaseUrl.includes("apimd") ? 'https://onmd.id-kyc.com/' : 'https://onro.id-kyc.com/';
|
|
34
34
|
this.redirectLink = baseUri + envUri + '/mobileredirect?redirectId=' + store.redirectId;
|
|
35
35
|
if (store.phoneNumber && store.phoneNumber != '') {
|
|
36
36
|
this.contact = store.phoneNumber;
|