@ekyc_qoobiss/qbs-ect-cmp 3.6.27 → 3.6.28
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_19.cjs.entry.js +9498 -0
- package/dist/cjs/base-component-aa9e52bf.js +832 -0
- package/dist/cjs/index-41696e0e.js +1573 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/loader-dots.cjs.entry.js +19 -0
- package/dist/cjs/loader.cjs.js +22 -0
- package/dist/cjs/qbs-ect-cmp.cjs.js +23 -0
- package/dist/cjs/random-actions.cjs.entry.js +23 -0
- package/dist/collection/assets/canvas-masks/face_green.svg +8 -0
- package/dist/collection/assets/canvas-masks/face_white.svg +8 -0
- package/dist/collection/assets/canvas-masks/id_green.svg +6 -0
- package/dist/collection/assets/canvas-masks/id_white.svg +6 -0
- package/dist/collection/assets/complete.svg +4 -0
- package/dist/collection/assets/landing/device.svg +14 -0
- package/dist/collection/assets/landing/id.svg +3 -0
- package/dist/collection/assets/landing/info.svg +3 -0
- package/dist/collection/assets/landing/validation.svg +16 -0
- package/dist/collection/assets/loader.svg +29 -0
- package/dist/collection/collection-manifest.json +32 -0
- package/dist/collection/components/base-component.js +63 -0
- package/dist/collection/components/common/agreement-check/agreement-check.css +0 -0
- package/dist/collection/components/common/agreement-check/agreement-check.js +104 -0
- package/dist/collection/components/common/camera-error/camera-error.css +0 -0
- package/dist/{qbs-ect-cmp/camera-error.entry.js → collection/components/common/camera-error/camera-error.js} +52 -20
- package/dist/collection/components/common/capture-error/capture-error.css +0 -0
- package/dist/{qbs-ect-cmp/capture-error.entry.js → collection/components/common/capture-error/capture-error.js} +63 -16
- package/dist/collection/components/common/how-to-info/how-to-info.css +0 -0
- package/dist/collection/components/common/how-to-info/how-to-info.js +121 -0
- package/dist/collection/components/common/id-back-capture/id-back-capture.css +35 -0
- package/dist/{qbs-ect-cmp/id-back-capture.entry.js → collection/components/common/id-back-capture/id-back-capture.js} +94 -24
- package/dist/collection/components/common/id-capture/id-capture.css +35 -0
- package/dist/{qbs-ect-cmp/id-capture.entry.js → collection/components/common/id-capture/id-capture.js} +94 -24
- package/dist/collection/components/common/id-tilt/id-tilt.css +35 -0
- package/dist/{qbs-ect-cmp/id-tilt.entry.js → collection/components/common/id-tilt/id-tilt.js} +94 -24
- package/dist/collection/components/common/random-actions/random-actions.css +0 -0
- package/dist/collection/components/common/random-actions/random-actions.js +24 -0
- package/dist/collection/components/common/selfie-capture/selfie-capture.css +7 -0
- package/dist/{qbs-ect-cmp/selfie-capture.entry.js → collection/components/common/selfie-capture/selfie-capture.js} +95 -24
- package/dist/collection/components/common/selfie-tilt/selfie-tilt.css +7 -0
- package/dist/{qbs-ect-cmp/selfie-tilt.entry.js → collection/components/common/selfie-tilt/selfie-tilt.js} +95 -24
- package/dist/collection/components/controls/camera/camera.css +47 -0
- package/dist/collection/components/controls/camera/camera.js +289 -0
- package/dist/collection/components/controls/loader-dots/loader-dots.css +61 -0
- package/dist/collection/components/controls/loader-dots/loader-dots.js +18 -0
- package/dist/collection/components/flow/agreement-info/agreement-info.css +0 -0
- package/dist/{qbs-ect-cmp/agreement-info.entry.js → collection/components/flow/agreement-info/agreement-info.js} +57 -18
- package/dist/collection/components/flow/end-redirect/end-redirect.css +128 -0
- package/dist/collection/components/flow/end-redirect/end-redirect.js +47 -0
- package/dist/collection/components/flow/error-end/error-end.css +0 -0
- package/dist/collection/components/flow/error-end/error-end.js +61 -0
- package/dist/collection/components/flow/landing-validation/landing-validation.css +0 -0
- package/dist/collection/components/flow/landing-validation/landing-validation.js +122 -0
- package/dist/collection/components/flow/mobile-redirect/mobile-redirect.css +10 -0
- package/dist/collection/components/flow/mobile-redirect/mobile-redirect.js +143 -0
- package/dist/collection/components/flow/process-id/process-id.css +0 -0
- package/dist/{qbs-ect-cmp/process-id.entry.js → collection/components/flow/process-id/process-id.js} +100 -32
- package/dist/collection/components/flow/sms-code-validation/sms-code-validation.css +0 -0
- package/dist/{qbs-ect-cmp/sms-code-validation.entry.js → collection/components/flow/sms-code-validation/sms-code-validation.js} +63 -30
- package/dist/collection/components/flow/user-liveness/user-liveness.css +0 -0
- package/dist/{qbs-ect-cmp/user-liveness.entry.js → collection/components/flow/user-liveness/user-liveness.js} +91 -25
- package/dist/collection/components/identification-component/identification-component.css +991 -0
- package/dist/collection/components/identification-component/identification-component.js +408 -0
- package/dist/collection/global.js +0 -0
- package/dist/collection/helpers/ApiCall.js +223 -0
- package/dist/{qbs-ect-cmp/Cameras-dfbebc29.js → collection/helpers/Cameras.js} +6 -9
- package/dist/collection/helpers/DeviceDetection.js +85 -0
- package/dist/collection/helpers/Events.js +58 -0
- package/dist/collection/helpers/ML5.js +38 -0
- package/dist/collection/helpers/Stream.js +229 -0
- package/dist/collection/helpers/TranslationUtils.js +37 -0
- package/dist/collection/helpers/canvas.js +10 -0
- package/dist/collection/helpers/index.js +21 -0
- package/dist/collection/helpers/security.js +25 -0
- package/dist/collection/helpers/store.js +48 -0
- package/dist/collection/helpers/textValues.js +48 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/libs/FaceML5Detector/FaceML5Detector.js +182 -0
- package/dist/collection/libs/FaceML5Detector/FacePose.js +85 -0
- package/dist/collection/libs/IDML5Detector/IDML5Detector.js +99 -0
- package/dist/{qbs-ect-cmp/IDPose-181bcb25.js → collection/libs/IDML5Detector/IDPose.js} +2 -4
- package/dist/{qbs-ect-cmp/CaptureFlow-db5d90a4.js → collection/models/CaptureFlow.js} +4 -6
- package/dist/collection/models/FlowStatus.js +14 -0
- package/dist/collection/models/FlowSteps.js +30 -0
- package/dist/collection/models/IAbortResult.js +1 -0
- package/dist/collection/models/IAddRequest.js +1 -0
- package/dist/collection/models/IAgreement.js +1 -0
- package/dist/collection/models/ICamera.js +1 -0
- package/dist/{qbs-ect-cmp/IDevice-15ecfdeb.js → collection/models/IDevice.js} +4 -6
- package/dist/collection/models/IEctStore.js +1 -0
- package/dist/collection/models/IGeneration.js +1 -0
- package/dist/collection/models/ILinkSend.js +1 -0
- package/dist/collection/models/ILogResult.js +1 -0
- package/dist/collection/models/IOrderStatus.js +1 -0
- package/dist/collection/models/IOtpCheck.js +1 -0
- package/dist/collection/models/IOtpSend.js +1 -0
- package/dist/collection/models/ITranslationValues.js +1 -0
- package/dist/collection/models/IUploadFile.js +1 -0
- package/dist/collection/models/IVerificationMode.js +5 -0
- package/dist/collection/models/OrderStatuses.js +8 -0
- package/dist/{qbs-ect-cmp/utils-8225f0b7.js → collection/utils/utils.js} +8 -10
- package/dist/esm/agreement-check_19.entry.js +9476 -0
- package/dist/{qbs-ect-cmp/base-component-2e490fd9.js → esm/base-component-b7f50d31.js} +384 -62
- package/dist/esm/index-cf54a432.js +1543 -0
- package/dist/esm/index.js +1 -0
- package/dist/{qbs-ect-cmp → esm}/loader-dots.entry.js +1 -1
- package/dist/esm/loader.js +18 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/css-shim.js +1 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/esm/qbs-ect-cmp.js +18 -0
- package/dist/{qbs-ect-cmp → esm}/random-actions.entry.js +2 -4
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/loader/cdn.js +3 -0
- package/dist/loader/index.cjs.js +3 -0
- package/dist/loader/index.d.ts +21 -0
- package/dist/loader/index.es2017.js +3 -0
- package/dist/loader/index.js +4 -0
- package/dist/loader/package.json +11 -0
- package/dist/qbs-ect-cmp/index.esm.js +0 -1
- package/dist/qbs-ect-cmp/p-054dc5b3.entry.js +1 -0
- package/dist/qbs-ect-cmp/p-215a7e76.entry.js +1 -0
- package/dist/qbs-ect-cmp/p-7bedffaa.js +1 -0
- package/dist/qbs-ect-cmp/p-8942656c.js +2 -0
- package/dist/qbs-ect-cmp/p-c32a782a.entry.js +1373 -0
- package/dist/qbs-ect-cmp/qbs-ect-cmp.css +1 -320
- package/dist/qbs-ect-cmp/qbs-ect-cmp.esm.js +1 -148
- package/package.json +1 -1
- package/dist/qbs-ect-cmp/ML5-657ef934.js +0 -1370
- package/dist/qbs-ect-cmp/Stream-b867a2be.js +0 -3104
- package/dist/qbs-ect-cmp/_commonjsHelpers-321aa363.js +0 -44
- package/dist/qbs-ect-cmp/agreement-check.entry.js +0 -41
- package/dist/qbs-ect-cmp/app-globals-0f993ce5.js +0 -3
- package/dist/qbs-ect-cmp/camera-comp.entry.js +0 -103
- package/dist/qbs-ect-cmp/css-shim-b7d3d95f.js +0 -4
- package/dist/qbs-ect-cmp/dom-64053c71.js +0 -73
- package/dist/qbs-ect-cmp/end-redirect.entry.js +0 -25
- package/dist/qbs-ect-cmp/error-end.entry.js +0 -19
- package/dist/qbs-ect-cmp/how-to-info.entry.js +0 -52
- package/dist/qbs-ect-cmp/identification-component.entry.js +0 -909
- package/dist/qbs-ect-cmp/index-78a05b9e.js +0 -3371
- package/dist/qbs-ect-cmp/landing-validation.entry.js +0 -90
- package/dist/qbs-ect-cmp/mobile-redirect.entry.js +0 -2984
- package/dist/qbs-ect-cmp/shadow-css-98135883.js +0 -387
- package/dist/qbs-ect-cmp/textValues-6bcc85dd.js +0 -302
|
@@ -1,15 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import '
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const captureErrorCss = "";
|
|
8
|
-
|
|
9
|
-
const CaptureError = class {
|
|
10
|
-
constructor(hostRef) {
|
|
11
|
-
registerInstance(this, hostRef);
|
|
12
|
-
this.eventCaptureErrorDone = createEvent(this, "captureErrorDone", 7);
|
|
1
|
+
import { h } from '@stencil/core';
|
|
2
|
+
import { delay } from '../../../utils/utils';
|
|
3
|
+
import { BaseComponent } from '../../base-component';
|
|
4
|
+
import { FlowMoments, FlowSteps } from '../../../models/FlowSteps';
|
|
5
|
+
export class CaptureError {
|
|
6
|
+
constructor() {
|
|
13
7
|
this.type = undefined;
|
|
14
8
|
this.buttonEnabled = undefined;
|
|
15
9
|
this.buttonText = undefined;
|
|
@@ -47,7 +41,60 @@ const CaptureError = class {
|
|
|
47
41
|
render() {
|
|
48
42
|
return (h("div", { class: "container" }, h("div", { class: "row" }, h("h1", { class: "color-red" }, this.titleR1), h("h1", { class: "color-red" }, this.titleR2), h("div", null, h("p", { class: "color-red font-weight-bold font-size-25 mt-5" }, this.descriptionR1), h("p", { class: "color-red font-weight-bold font-size-25 mt-5" }, this.descriptionR2)), h("div", { class: "pos-relative show-bottom" }, h("div", { class: "btn-buletin" }, h("button", { class: "main-button", type: "button", disabled: !this.buttonEnabled, onClick: () => this.buttonClick() }, this.buttonText), h("p", { class: "main-text font-size-18 text-right mb-0" }, this.baseComponent.translations.GlobalValues.FooterText))))));
|
|
49
43
|
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
44
|
+
static get is() { return "capture-error"; }
|
|
45
|
+
static get originalStyleUrls() {
|
|
46
|
+
return {
|
|
47
|
+
"$": ["capture-error.css"]
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
static get styleUrls() {
|
|
51
|
+
return {
|
|
52
|
+
"$": ["capture-error.css"]
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
static get properties() {
|
|
56
|
+
return {
|
|
57
|
+
"type": {
|
|
58
|
+
"type": "string",
|
|
59
|
+
"mutable": false,
|
|
60
|
+
"complexType": {
|
|
61
|
+
"original": "string",
|
|
62
|
+
"resolved": "string",
|
|
63
|
+
"references": {}
|
|
64
|
+
},
|
|
65
|
+
"required": false,
|
|
66
|
+
"optional": false,
|
|
67
|
+
"docs": {
|
|
68
|
+
"tags": [],
|
|
69
|
+
"text": ""
|
|
70
|
+
},
|
|
71
|
+
"attribute": "type",
|
|
72
|
+
"reflect": false
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
static get states() {
|
|
77
|
+
return {
|
|
78
|
+
"buttonEnabled": {},
|
|
79
|
+
"buttonText": {}
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
static get events() {
|
|
83
|
+
return [{
|
|
84
|
+
"method": "eventCaptureErrorDone",
|
|
85
|
+
"name": "captureErrorDone",
|
|
86
|
+
"bubbles": true,
|
|
87
|
+
"cancelable": true,
|
|
88
|
+
"composed": true,
|
|
89
|
+
"docs": {
|
|
90
|
+
"tags": [],
|
|
91
|
+
"text": ""
|
|
92
|
+
},
|
|
93
|
+
"complexType": {
|
|
94
|
+
"original": "any",
|
|
95
|
+
"resolved": "any",
|
|
96
|
+
"references": {}
|
|
97
|
+
}
|
|
98
|
+
}];
|
|
99
|
+
}
|
|
100
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { h } from '@stencil/core';
|
|
2
|
+
import store from '../../../helpers/store';
|
|
3
|
+
import { FlowStatus } from '../../../models/FlowStatus';
|
|
4
|
+
import { BaseComponent } from '../../base-component';
|
|
5
|
+
import { FlowSteps } from '../../../models/FlowSteps';
|
|
6
|
+
export class HowToInfo {
|
|
7
|
+
constructor() { this.idSide = undefined; this.topTitle = undefined; this.subTitle = undefined; this.imagePath = undefined; this.buttonText = undefined; this.buttonEnabled = undefined; }
|
|
8
|
+
async componentDidLoad() {
|
|
9
|
+
await this.baseComponent.initialize();
|
|
10
|
+
}
|
|
11
|
+
async disconnectedCallback() {
|
|
12
|
+
await this.baseComponent.finalize();
|
|
13
|
+
}
|
|
14
|
+
buttonClick() {
|
|
15
|
+
this.buttonEnabled = false;
|
|
16
|
+
this.eventHowToInfoDone.emit();
|
|
17
|
+
}
|
|
18
|
+
componentWillLoad() {
|
|
19
|
+
this.subTitle = '';
|
|
20
|
+
this.buttonEnabled = true;
|
|
21
|
+
if (store.flowStatus == FlowStatus.ID) {
|
|
22
|
+
this.topTitle = this.baseComponent.translations.HowToValues.IdTitile;
|
|
23
|
+
this.imagePath = 'https://ekyc.blob.core.windows.net/$web/howto_id.png';
|
|
24
|
+
this.buttonText = this.baseComponent.translations.HowToValues.IdButton;
|
|
25
|
+
if (this.idSide == 'front') {
|
|
26
|
+
this.baseComponent = new BaseComponent(FlowSteps.CiFrontHowTo);
|
|
27
|
+
this.subTitle = this.baseComponent.translations.HowToValues.IdSubTitileFace;
|
|
28
|
+
}
|
|
29
|
+
if (this.idSide == 'back') {
|
|
30
|
+
this.baseComponent = new BaseComponent(FlowSteps.CiBackHowTo);
|
|
31
|
+
this.subTitle = this.baseComponent.translations.HowToValues.IdSubTitileBack;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
if (store.flowStatus == FlowStatus.LIVENESS) {
|
|
35
|
+
this.baseComponent = new BaseComponent(FlowSteps.SelfieHowTo);
|
|
36
|
+
this.topTitle = this.baseComponent.translations.HowToValues.SelfieTitile;
|
|
37
|
+
this.subTitle = this.baseComponent.translations.HowToValues.SelfieSubTitile;
|
|
38
|
+
this.imagePath = 'https://ekyc.blob.core.windows.net/$web/howto_selfie.png';
|
|
39
|
+
this.buttonText = this.baseComponent.translations.HowToValues.SelfieButton;
|
|
40
|
+
}
|
|
41
|
+
this.baseComponent.setEventEmitter(this.apiErrorEvent);
|
|
42
|
+
}
|
|
43
|
+
render() {
|
|
44
|
+
let sub = this.subTitle != '' ? h("p", { class: "font-size-2" }, this.subTitle) : null;
|
|
45
|
+
return (h("div", { class: "container" }, h("div", { class: "row" }, h("div", { class: "div-ci align-center" }, h("img", { src: this.imagePath })), h("div", { class: "text-center" }, h("h1", null, this.topTitle), sub), h("div", { class: "pos-relative show-bottom" }, h("div", { class: "btn-buletin" }, h("button", { class: "main-button", disabled: !this.buttonEnabled, onClick: () => this.buttonClick() }, this.buttonText), h("p", { class: "main-text font-size-18 text-right mb-0" }, this.baseComponent.translations.GlobalValues.FooterText))))));
|
|
46
|
+
}
|
|
47
|
+
static get is() { return "how-to-info"; }
|
|
48
|
+
static get originalStyleUrls() {
|
|
49
|
+
return {
|
|
50
|
+
"$": ["how-to-info.css"]
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
static get styleUrls() {
|
|
54
|
+
return {
|
|
55
|
+
"$": ["how-to-info.css"]
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
static get properties() {
|
|
59
|
+
return {
|
|
60
|
+
"idSide": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"mutable": false,
|
|
63
|
+
"complexType": {
|
|
64
|
+
"original": "string",
|
|
65
|
+
"resolved": "string",
|
|
66
|
+
"references": {}
|
|
67
|
+
},
|
|
68
|
+
"required": false,
|
|
69
|
+
"optional": false,
|
|
70
|
+
"docs": {
|
|
71
|
+
"tags": [],
|
|
72
|
+
"text": ""
|
|
73
|
+
},
|
|
74
|
+
"attribute": "id-side",
|
|
75
|
+
"reflect": false
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
static get states() {
|
|
80
|
+
return {
|
|
81
|
+
"topTitle": {},
|
|
82
|
+
"subTitle": {},
|
|
83
|
+
"imagePath": {},
|
|
84
|
+
"buttonText": {},
|
|
85
|
+
"buttonEnabled": {}
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
static get events() {
|
|
89
|
+
return [{
|
|
90
|
+
"method": "eventHowToInfoDone",
|
|
91
|
+
"name": "howToInfoDone",
|
|
92
|
+
"bubbles": true,
|
|
93
|
+
"cancelable": true,
|
|
94
|
+
"composed": true,
|
|
95
|
+
"docs": {
|
|
96
|
+
"tags": [],
|
|
97
|
+
"text": ""
|
|
98
|
+
},
|
|
99
|
+
"complexType": {
|
|
100
|
+
"original": "any",
|
|
101
|
+
"resolved": "any",
|
|
102
|
+
"references": {}
|
|
103
|
+
}
|
|
104
|
+
}, {
|
|
105
|
+
"method": "apiErrorEvent",
|
|
106
|
+
"name": "apiError",
|
|
107
|
+
"bubbles": true,
|
|
108
|
+
"cancelable": true,
|
|
109
|
+
"composed": true,
|
|
110
|
+
"docs": {
|
|
111
|
+
"tags": [],
|
|
112
|
+
"text": ""
|
|
113
|
+
},
|
|
114
|
+
"complexType": {
|
|
115
|
+
"original": "any",
|
|
116
|
+
"resolved": "any",
|
|
117
|
+
"references": {}
|
|
118
|
+
}
|
|
119
|
+
}];
|
|
120
|
+
}
|
|
121
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/* .cameraContainer {
|
|
2
|
+
width: 100%;
|
|
3
|
+
height: 100%;
|
|
4
|
+
z-index: 10;
|
|
5
|
+
position: relative;
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
} */
|
|
8
|
+
|
|
9
|
+
.logo {
|
|
10
|
+
max-height: 450px;
|
|
11
|
+
max-width: 450px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/* .block {
|
|
15
|
+
width: 90%;
|
|
16
|
+
padding-left: 5%;
|
|
17
|
+
padding-right: 5%;
|
|
18
|
+
margin-top: 5vh;
|
|
19
|
+
} */
|
|
20
|
+
|
|
21
|
+
.canvas-on-video {
|
|
22
|
+
max-width: 100%;
|
|
23
|
+
max-height: 100%;
|
|
24
|
+
position: absolute;
|
|
25
|
+
z-index: 2;
|
|
26
|
+
transform: scale(-1, 1);
|
|
27
|
+
}
|
|
28
|
+
/*
|
|
29
|
+
@media screen and (max-height: 414px) {
|
|
30
|
+
.logo {
|
|
31
|
+
background-size: 140px;
|
|
32
|
+
max-height: 140px;
|
|
33
|
+
max-width: 140px;
|
|
34
|
+
}
|
|
35
|
+
} */
|
|
@@ -1,22 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import '
|
|
9
|
-
import '
|
|
10
|
-
import '
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { h } from '@stencil/core';
|
|
2
|
+
import { Cameras } from '../../../helpers/Cameras';
|
|
3
|
+
import { Stream } from '../../../helpers/Stream';
|
|
4
|
+
import { IDML5Detector } from '../../../libs/IDML5Detector/IDML5Detector';
|
|
5
|
+
import { FaceML5Detector } from '../../../libs/FaceML5Detector/FaceML5Detector';
|
|
6
|
+
import { IDPose } from '../../../libs/IDML5Detector/IDPose';
|
|
7
|
+
import { delay } from '../../../utils/utils';
|
|
8
|
+
import store from '../../../helpers/store';
|
|
9
|
+
import { BaseComponent } from '../../base-component';
|
|
10
|
+
import { FlowMoments, FlowSteps } from '../../../models/FlowSteps';
|
|
11
|
+
import { VerificationMode } from '../../../models/IVerificationMode';
|
|
12
|
+
import { IdCaptureValues } from '../../../helpers/textValues';
|
|
13
|
+
// import { IDPose } from '../../libs/IDML5Detector/IDPose';
|
|
14
|
+
export class IdBackCapture {
|
|
15
15
|
// @State() private animationPath: string;
|
|
16
|
-
constructor(
|
|
17
|
-
registerInstance(this, hostRef);
|
|
18
|
-
this.eventPhotoCapture = createEvent(this, "photoIdBackCapture", 7);
|
|
19
|
-
this.apiErrorEvent = createEvent(this, "apiError", 7);
|
|
16
|
+
constructor() {
|
|
20
17
|
this.photoIsReady = photos => {
|
|
21
18
|
//this.closeCamera();
|
|
22
19
|
this.eventPhotoCapture.emit(photos);
|
|
@@ -58,7 +55,7 @@ const IdBackCapture = class {
|
|
|
58
55
|
this.openCamera();
|
|
59
56
|
}
|
|
60
57
|
async openCamera() {
|
|
61
|
-
const constraints = this.cameras.GetConstraints(
|
|
58
|
+
const constraints = this.cameras.GetConstraints(store.cameraId, store.device);
|
|
62
59
|
setTimeout(() => {
|
|
63
60
|
navigator.mediaDevices
|
|
64
61
|
.getUserMedia(constraints)
|
|
@@ -114,8 +111,81 @@ const IdBackCapture = class {
|
|
|
114
111
|
let bgDemo = this.verified ? 'container' : 'container bg-black';
|
|
115
112
|
return (h("div", { class: bgDemo }, h("div", { class: "container-video" }, h("div", { hidden: this.showDemo == false }, h("video", { id: "howtoBack", 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.baseComponent.translations.GlobalValues.FooterText)))));
|
|
116
113
|
}
|
|
117
|
-
get
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
114
|
+
static get is() { return "id-back-capture"; }
|
|
115
|
+
static get originalStyleUrls() {
|
|
116
|
+
return {
|
|
117
|
+
"$": ["id-back-capture.css"]
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
static get styleUrls() {
|
|
121
|
+
return {
|
|
122
|
+
"$": ["id-back-capture.css"]
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
static get states() {
|
|
126
|
+
return {
|
|
127
|
+
"videoStarted": {},
|
|
128
|
+
"cameraSize": {},
|
|
129
|
+
"captureTaken": {},
|
|
130
|
+
"verified": {},
|
|
131
|
+
"titleMesage": {},
|
|
132
|
+
"showDemo": {},
|
|
133
|
+
"demoVideo": {}
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
static get events() {
|
|
137
|
+
return [{
|
|
138
|
+
"method": "eventPhotoCapture",
|
|
139
|
+
"name": "photoIdBackCapture",
|
|
140
|
+
"bubbles": true,
|
|
141
|
+
"cancelable": true,
|
|
142
|
+
"composed": true,
|
|
143
|
+
"docs": {
|
|
144
|
+
"tags": [],
|
|
145
|
+
"text": ""
|
|
146
|
+
},
|
|
147
|
+
"complexType": {
|
|
148
|
+
"original": "any",
|
|
149
|
+
"resolved": "any",
|
|
150
|
+
"references": {}
|
|
151
|
+
}
|
|
152
|
+
}, {
|
|
153
|
+
"method": "apiErrorEvent",
|
|
154
|
+
"name": "apiError",
|
|
155
|
+
"bubbles": true,
|
|
156
|
+
"cancelable": true,
|
|
157
|
+
"composed": true,
|
|
158
|
+
"docs": {
|
|
159
|
+
"tags": [],
|
|
160
|
+
"text": ""
|
|
161
|
+
},
|
|
162
|
+
"complexType": {
|
|
163
|
+
"original": "any",
|
|
164
|
+
"resolved": "any",
|
|
165
|
+
"references": {}
|
|
166
|
+
}
|
|
167
|
+
}];
|
|
168
|
+
}
|
|
169
|
+
static get elementRef() { return "component"; }
|
|
170
|
+
static get listeners() {
|
|
171
|
+
return [{
|
|
172
|
+
"name": "videoStarted",
|
|
173
|
+
"method": "eventVideoStarted",
|
|
174
|
+
"target": undefined,
|
|
175
|
+
"capture": false,
|
|
176
|
+
"passive": false
|
|
177
|
+
}, {
|
|
178
|
+
"name": "verificationFinished",
|
|
179
|
+
"method": "verificationFinished",
|
|
180
|
+
"target": undefined,
|
|
181
|
+
"capture": false,
|
|
182
|
+
"passive": false
|
|
183
|
+
}, {
|
|
184
|
+
"name": "takePhoto",
|
|
185
|
+
"method": "takePhoto",
|
|
186
|
+
"target": undefined,
|
|
187
|
+
"capture": false,
|
|
188
|
+
"passive": false
|
|
189
|
+
}];
|
|
190
|
+
}
|
|
191
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/* .cameraContainer {
|
|
2
|
+
width: 100%;
|
|
3
|
+
height: 100%;
|
|
4
|
+
z-index: 10;
|
|
5
|
+
position: relative;
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
} */
|
|
8
|
+
|
|
9
|
+
.logo {
|
|
10
|
+
max-height: 450px;
|
|
11
|
+
max-width: 450px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/* .block {
|
|
15
|
+
width: 90%;
|
|
16
|
+
padding-left: 5%;
|
|
17
|
+
padding-right: 5%;
|
|
18
|
+
margin-top: 5vh;
|
|
19
|
+
} */
|
|
20
|
+
|
|
21
|
+
.canvas-on-video {
|
|
22
|
+
max-width: 100%;
|
|
23
|
+
max-height: 100%;
|
|
24
|
+
position: absolute;
|
|
25
|
+
z-index: 2;
|
|
26
|
+
transform: scale(-1, 1);
|
|
27
|
+
}
|
|
28
|
+
/*
|
|
29
|
+
@media screen and (max-height: 414px) {
|
|
30
|
+
.logo {
|
|
31
|
+
background-size: 140px;
|
|
32
|
+
max-height: 140px;
|
|
33
|
+
max-width: 140px;
|
|
34
|
+
}
|
|
35
|
+
} */
|
|
@@ -1,22 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import '
|
|
9
|
-
import '
|
|
10
|
-
import '
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { h } from '@stencil/core';
|
|
2
|
+
import { Cameras } from '../../../helpers/Cameras';
|
|
3
|
+
import { Stream } from '../../../helpers/Stream';
|
|
4
|
+
import { IdCaptureValues } from '../../../helpers/textValues';
|
|
5
|
+
import { IDML5Detector } from '../../../libs/IDML5Detector/IDML5Detector';
|
|
6
|
+
import { FaceML5Detector } from '../../../libs/FaceML5Detector/FaceML5Detector';
|
|
7
|
+
import { IDPose } from '../../../libs/IDML5Detector/IDPose';
|
|
8
|
+
import { delay } from '../../../utils/utils';
|
|
9
|
+
import store from '../../../helpers/store';
|
|
10
|
+
import { BaseComponent } from '../../base-component';
|
|
11
|
+
import { FlowMoments, FlowSteps } from '../../../models/FlowSteps';
|
|
12
|
+
import { VerificationMode } from '../../../models/IVerificationMode';
|
|
13
|
+
// import { IDPose } from '../../libs/IDML5Detector/IDPose';
|
|
14
|
+
export class IdCapture {
|
|
15
15
|
// @State() private animationPath: string;
|
|
16
|
-
constructor(
|
|
17
|
-
registerInstance(this, hostRef);
|
|
18
|
-
this.eventPhotoCapture = createEvent(this, "photoIdCapture", 7);
|
|
19
|
-
this.apiErrorEvent = createEvent(this, "apiError", 7);
|
|
16
|
+
constructor() {
|
|
20
17
|
this.photoIsReady = photos => {
|
|
21
18
|
//this.closeCamera();
|
|
22
19
|
this.eventPhotoCapture.emit(photos);
|
|
@@ -54,7 +51,7 @@ const IdCapture = class {
|
|
|
54
51
|
this.openCamera();
|
|
55
52
|
}
|
|
56
53
|
async openCamera() {
|
|
57
|
-
const constraints = this.cameras.GetConstraints(
|
|
54
|
+
const constraints = this.cameras.GetConstraints(store.cameraId, store.device);
|
|
58
55
|
setTimeout(() => {
|
|
59
56
|
navigator.mediaDevices
|
|
60
57
|
.getUserMedia(constraints)
|
|
@@ -115,8 +112,81 @@ const IdCapture = class {
|
|
|
115
112
|
let bgDemo = this.verified ? 'container' : 'container bg-black';
|
|
116
113
|
return (h("div", { class: bgDemo }, h("div", { class: "container-video" }, h("div", { hidden: this.showDemo == false }, h("video", { id: "howtoFront", 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.baseComponent.translations.GlobalValues.FooterText)))));
|
|
117
114
|
}
|
|
118
|
-
get
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
115
|
+
static get is() { return "id-capture"; }
|
|
116
|
+
static get originalStyleUrls() {
|
|
117
|
+
return {
|
|
118
|
+
"$": ["id-capture.css"]
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
static get styleUrls() {
|
|
122
|
+
return {
|
|
123
|
+
"$": ["id-capture.css"]
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
static get states() {
|
|
127
|
+
return {
|
|
128
|
+
"videoStarted": {},
|
|
129
|
+
"cameraSize": {},
|
|
130
|
+
"captureTaken": {},
|
|
131
|
+
"verified": {},
|
|
132
|
+
"titleMesage": {},
|
|
133
|
+
"showDemo": {},
|
|
134
|
+
"demoVideo": {}
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
static get events() {
|
|
138
|
+
return [{
|
|
139
|
+
"method": "eventPhotoCapture",
|
|
140
|
+
"name": "photoIdCapture",
|
|
141
|
+
"bubbles": true,
|
|
142
|
+
"cancelable": true,
|
|
143
|
+
"composed": true,
|
|
144
|
+
"docs": {
|
|
145
|
+
"tags": [],
|
|
146
|
+
"text": ""
|
|
147
|
+
},
|
|
148
|
+
"complexType": {
|
|
149
|
+
"original": "any",
|
|
150
|
+
"resolved": "any",
|
|
151
|
+
"references": {}
|
|
152
|
+
}
|
|
153
|
+
}, {
|
|
154
|
+
"method": "apiErrorEvent",
|
|
155
|
+
"name": "apiError",
|
|
156
|
+
"bubbles": true,
|
|
157
|
+
"cancelable": true,
|
|
158
|
+
"composed": true,
|
|
159
|
+
"docs": {
|
|
160
|
+
"tags": [],
|
|
161
|
+
"text": ""
|
|
162
|
+
},
|
|
163
|
+
"complexType": {
|
|
164
|
+
"original": "any",
|
|
165
|
+
"resolved": "any",
|
|
166
|
+
"references": {}
|
|
167
|
+
}
|
|
168
|
+
}];
|
|
169
|
+
}
|
|
170
|
+
static get elementRef() { return "component"; }
|
|
171
|
+
static get listeners() {
|
|
172
|
+
return [{
|
|
173
|
+
"name": "videoStarted",
|
|
174
|
+
"method": "eventVideoStarted",
|
|
175
|
+
"target": undefined,
|
|
176
|
+
"capture": false,
|
|
177
|
+
"passive": false
|
|
178
|
+
}, {
|
|
179
|
+
"name": "takePhoto",
|
|
180
|
+
"method": "takePhoto",
|
|
181
|
+
"target": undefined,
|
|
182
|
+
"capture": false,
|
|
183
|
+
"passive": false
|
|
184
|
+
}, {
|
|
185
|
+
"name": "verificationFinished",
|
|
186
|
+
"method": "verificationFinished",
|
|
187
|
+
"target": undefined,
|
|
188
|
+
"capture": false,
|
|
189
|
+
"passive": false
|
|
190
|
+
}];
|
|
191
|
+
}
|
|
192
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/* .cameraContainer {
|
|
2
|
+
width: 100%;
|
|
3
|
+
height: 100%;
|
|
4
|
+
z-index: 10;
|
|
5
|
+
position: relative;
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
} */
|
|
8
|
+
|
|
9
|
+
.logo {
|
|
10
|
+
max-height: 450px;
|
|
11
|
+
max-width: 450px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/* .block {
|
|
15
|
+
width: 90%;
|
|
16
|
+
padding-left: 5%;
|
|
17
|
+
padding-right: 5%;
|
|
18
|
+
margin-top: 5vh;
|
|
19
|
+
} */
|
|
20
|
+
|
|
21
|
+
.canvas-on-video {
|
|
22
|
+
max-width: 100%;
|
|
23
|
+
max-height: 100%;
|
|
24
|
+
position: absolute;
|
|
25
|
+
z-index: 2;
|
|
26
|
+
transform: scale(-1, 1);
|
|
27
|
+
}
|
|
28
|
+
/*
|
|
29
|
+
@media screen and (max-height: 414px) {
|
|
30
|
+
.logo {
|
|
31
|
+
background-size: 140px;
|
|
32
|
+
max-height: 140px;
|
|
33
|
+
max-width: 140px;
|
|
34
|
+
}
|
|
35
|
+
} */
|