@ekyc_qoobiss/qbs-ect-cmp 3.6.25 → 3.6.27
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/i18n/en.json +100 -0
- package/dist/i18n/ro.json +100 -0
- package/dist/i18n/ru.json +100 -0
- package/dist/{collection/helpers/Cameras.js → qbs-ect-cmp/Cameras-dfbebc29.js} +9 -6
- package/dist/{collection/models/CaptureFlow.js → qbs-ect-cmp/CaptureFlow-db5d90a4.js} +6 -4
- package/dist/{collection/libs/IDML5Detector/IDPose.js → qbs-ect-cmp/IDPose-181bcb25.js} +4 -2
- package/dist/{collection/models/IDevice.js → qbs-ect-cmp/IDevice-15ecfdeb.js} +6 -4
- package/dist/qbs-ect-cmp/ML5-657ef934.js +1370 -0
- package/dist/qbs-ect-cmp/Stream-b867a2be.js +3104 -0
- package/dist/qbs-ect-cmp/_commonjsHelpers-321aa363.js +44 -0
- package/dist/qbs-ect-cmp/agreement-check.entry.js +41 -0
- package/dist/qbs-ect-cmp/agreement-info.entry.js +66 -0
- package/dist/qbs-ect-cmp/app-globals-0f993ce5.js +3 -0
- package/dist/qbs-ect-cmp/base-component-2e490fd9.js +502 -0
- package/dist/qbs-ect-cmp/camera-comp.entry.js +103 -0
- package/dist/qbs-ect-cmp/camera-error.entry.js +59 -0
- package/dist/qbs-ect-cmp/capture-error.entry.js +53 -0
- package/dist/qbs-ect-cmp/css-shim-b7d3d95f.js +4 -0
- package/dist/qbs-ect-cmp/dom-64053c71.js +73 -0
- package/dist/qbs-ect-cmp/end-redirect.entry.js +25 -0
- package/dist/qbs-ect-cmp/error-end.entry.js +19 -0
- package/dist/qbs-ect-cmp/how-to-info.entry.js +52 -0
- package/dist/{collection/components/common/id-back-capture/id-back-capture.js → qbs-ect-cmp/id-back-capture.entry.js} +30 -100
- package/dist/{collection/components/common/id-capture/id-capture.js → qbs-ect-cmp/id-capture.entry.js} +28 -98
- package/dist/{collection/components/common/id-tilt/id-tilt.js → qbs-ect-cmp/id-tilt.entry.js} +28 -98
- package/dist/qbs-ect-cmp/identification-component.entry.js +909 -0
- package/dist/qbs-ect-cmp/index-78a05b9e.js +3371 -0
- package/dist/qbs-ect-cmp/index.esm.js +1 -0
- package/dist/qbs-ect-cmp/landing-validation.entry.js +90 -0
- package/dist/{esm → qbs-ect-cmp}/loader-dots.entry.js +1 -1
- package/dist/qbs-ect-cmp/mobile-redirect.entry.js +2984 -0
- package/dist/{collection/components/flow/process-id/process-id.js → qbs-ect-cmp/process-id.entry.js} +32 -100
- package/dist/qbs-ect-cmp/qbs-ect-cmp.css +320 -1
- package/dist/qbs-ect-cmp/qbs-ect-cmp.esm.js +148 -1
- package/dist/{esm → qbs-ect-cmp}/random-actions.entry.js +6 -3
- package/dist/{collection/components/common/selfie-capture/selfie-capture.js → qbs-ect-cmp/selfie-capture.entry.js} +28 -99
- package/dist/{collection/components/common/selfie-tilt/selfie-tilt.js → qbs-ect-cmp/selfie-tilt.entry.js} +29 -99
- package/dist/qbs-ect-cmp/shadow-css-98135883.js +387 -0
- package/dist/qbs-ect-cmp/sms-code-validation.entry.js +106 -0
- package/dist/{esm/store-fdeed827.js → qbs-ect-cmp/textValues-6bcc85dd.js} +51 -147
- package/dist/{collection/components/flow/user-liveness/user-liveness.js → qbs-ect-cmp/user-liveness.entry.js} +30 -91
- package/dist/{collection/utils/utils.js → qbs-ect-cmp/utils-8225f0b7.js} +10 -8
- package/dist/types/components/base-component.d.ts +2 -0
- package/dist/types/components/common/agreement-check/agreement-check.d.ts +1 -0
- package/dist/types/components/common/random-actions/random-actions.d.ts +2 -0
- package/dist/types/components/flow/end-redirect/end-redirect.d.ts +1 -0
- package/dist/types/components/identification-component/identification-component.d.ts +1 -0
- package/dist/types/components.d.ts +2 -0
- package/dist/types/helpers/TranslationUtils.d.ts +9 -0
- package/dist/types/helpers/textValues.d.ts +8 -95
- package/dist/types/models/IEctStore.d.ts +1 -0
- package/dist/types/models/ITranslationValues.d.ts +101 -0
- package/package.json +1 -1
- package/dist/cjs/agreement-check_19.cjs.entry.js +0 -10012
- package/dist/cjs/index-41696e0e.js +0 -1573
- package/dist/cjs/index.cjs.js +0 -2
- package/dist/cjs/loader-dots.cjs.entry.js +0 -19
- package/dist/cjs/loader.cjs.js +0 -22
- package/dist/cjs/qbs-ect-cmp.cjs.js +0 -23
- package/dist/cjs/random-actions.cjs.entry.js +0 -22
- package/dist/cjs/store-f1a0f55c.js +0 -413
- package/dist/collection/assets/canvas-masks/face_green.svg +0 -8
- package/dist/collection/assets/canvas-masks/face_white.svg +0 -8
- package/dist/collection/assets/canvas-masks/id_green.svg +0 -6
- package/dist/collection/assets/canvas-masks/id_white.svg +0 -6
- package/dist/collection/assets/complete.svg +0 -4
- package/dist/collection/assets/landing/device.svg +0 -14
- package/dist/collection/assets/landing/id.svg +0 -3
- package/dist/collection/assets/landing/info.svg +0 -3
- package/dist/collection/assets/landing/validation.svg +0 -16
- package/dist/collection/assets/loader.svg +0 -29
- package/dist/collection/collection-manifest.json +0 -32
- package/dist/collection/components/base-component.js +0 -59
- package/dist/collection/components/common/agreement-check/agreement-check.css +0 -0
- package/dist/collection/components/common/agreement-check/agreement-check.js +0 -101
- package/dist/collection/components/common/camera-error/camera-error.css +0 -0
- package/dist/collection/components/common/camera-error/camera-error.js +0 -91
- package/dist/collection/components/common/capture-error/capture-error.css +0 -0
- package/dist/collection/components/common/capture-error/capture-error.js +0 -101
- 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 +0 -122
- package/dist/collection/components/common/id-back-capture/id-back-capture.css +0 -35
- package/dist/collection/components/common/id-capture/id-capture.css +0 -35
- package/dist/collection/components/common/id-tilt/id-tilt.css +0 -35
- package/dist/collection/components/common/random-actions/random-actions.css +0 -0
- package/dist/collection/components/common/random-actions/random-actions.js +0 -20
- package/dist/collection/components/common/selfie-capture/selfie-capture.css +0 -7
- package/dist/collection/components/common/selfie-tilt/selfie-tilt.css +0 -7
- package/dist/collection/components/controls/camera/camera.css +0 -47
- package/dist/collection/components/controls/camera/camera.js +0 -289
- package/dist/collection/components/controls/loader-dots/loader-dots.css +0 -61
- package/dist/collection/components/controls/loader-dots/loader-dots.js +0 -18
- package/dist/collection/components/flow/agreement-info/agreement-info.css +0 -0
- package/dist/collection/components/flow/agreement-info/agreement-info.js +0 -106
- package/dist/collection/components/flow/end-redirect/end-redirect.css +0 -128
- package/dist/collection/components/flow/end-redirect/end-redirect.js +0 -44
- package/dist/collection/components/flow/error-end/error-end.css +0 -0
- package/dist/collection/components/flow/error-end/error-end.js +0 -61
- package/dist/collection/components/flow/landing-validation/landing-validation.css +0 -0
- package/dist/collection/components/flow/landing-validation/landing-validation.js +0 -122
- package/dist/collection/components/flow/mobile-redirect/mobile-redirect.css +0 -10
- package/dist/collection/components/flow/mobile-redirect/mobile-redirect.js +0 -144
- package/dist/collection/components/flow/process-id/process-id.css +0 -0
- package/dist/collection/components/flow/sms-code-validation/sms-code-validation.css +0 -0
- package/dist/collection/components/flow/sms-code-validation/sms-code-validation.js +0 -140
- package/dist/collection/components/flow/user-liveness/user-liveness.css +0 -0
- package/dist/collection/components/identification-component/identification-component.css +0 -991
- package/dist/collection/components/identification-component/identification-component.js +0 -387
- package/dist/collection/global.js +0 -0
- package/dist/collection/helpers/ApiCall.js +0 -223
- package/dist/collection/helpers/DeviceDetection.js +0 -85
- package/dist/collection/helpers/Events.js +0 -58
- package/dist/collection/helpers/ML5.js +0 -38
- package/dist/collection/helpers/Stream.js +0 -229
- package/dist/collection/helpers/canvas.js +0 -10
- package/dist/collection/helpers/index.js +0 -21
- package/dist/collection/helpers/security.js +0 -25
- package/dist/collection/helpers/store.js +0 -47
- package/dist/collection/helpers/textValues.js +0 -145
- package/dist/collection/index.js +0 -1
- package/dist/collection/libs/FaceML5Detector/FaceML5Detector.js +0 -229
- package/dist/collection/libs/FaceML5Detector/FacePose.js +0 -85
- package/dist/collection/libs/IDML5Detector/IDML5Detector.js +0 -99
- package/dist/collection/models/FlowStatus.js +0 -14
- package/dist/collection/models/FlowSteps.js +0 -30
- package/dist/collection/models/IAbortResult.js +0 -1
- package/dist/collection/models/IAddRequest.js +0 -1
- package/dist/collection/models/IAgreement.js +0 -1
- package/dist/collection/models/ICamera.js +0 -1
- package/dist/collection/models/IEctStore.js +0 -1
- package/dist/collection/models/IGeneration.js +0 -1
- package/dist/collection/models/ILinkSend.js +0 -1
- package/dist/collection/models/ILogResult.js +0 -1
- package/dist/collection/models/IOrderStatus.js +0 -1
- package/dist/collection/models/IOtpCheck.js +0 -1
- package/dist/collection/models/IOtpSend.js +0 -1
- package/dist/collection/models/IUploadFile.js +0 -1
- package/dist/collection/models/IVerificationMode.js +0 -5
- package/dist/collection/models/OrderStatuses.js +0 -8
- package/dist/esm/agreement-check_19.entry.js +0 -9990
- package/dist/esm/index-cf54a432.js +0 -1543
- package/dist/esm/index.js +0 -1
- package/dist/esm/loader.js +0 -18
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/esm/qbs-ect-cmp.js +0 -18
- package/dist/index.cjs.js +0 -1
- package/dist/index.js +0 -1
- package/dist/loader/cdn.js +0 -3
- package/dist/loader/index.cjs.js +0 -3
- package/dist/loader/index.d.ts +0 -21
- package/dist/loader/index.es2017.js +0 -3
- package/dist/loader/index.js +0 -4
- package/dist/loader/package.json +0 -11
- package/dist/qbs-ect-cmp/p-054dc5b3.entry.js +0 -1
- package/dist/qbs-ect-cmp/p-0b381be5.js +0 -1
- package/dist/qbs-ect-cmp/p-4ef6223b.entry.js +0 -1373
- package/dist/qbs-ect-cmp/p-6be3b9ca.entry.js +0 -1
- package/dist/qbs-ect-cmp/p-8942656c.js +0 -2
|
@@ -1,19 +1,22 @@
|
|
|
1
|
-
import { h } from '
|
|
2
|
-
import { Cameras } from '
|
|
3
|
-
import { Stream } from '
|
|
4
|
-
import { IdCaptureValues } from '
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { r as registerInstance, e as createEvent, h, i as getElement } from './index-78a05b9e.js';
|
|
2
|
+
import { C as Cameras } from './Cameras-dfbebc29.js';
|
|
3
|
+
import { S as Stream, V as VerificationMode, I as IDML5Detector, F as FaceML5Detector } from './Stream-b867a2be.js';
|
|
4
|
+
import { I as IdCaptureValues, s as state } from './textValues-6bcc85dd.js';
|
|
5
|
+
import { I as IDPose } from './IDPose-181bcb25.js';
|
|
6
|
+
import { d as delay } from './utils-8225f0b7.js';
|
|
7
|
+
import { B as BaseComponent, F as FlowSteps, a as FlowMoments } from './base-component-2e490fd9.js';
|
|
8
|
+
import './IDevice-15ecfdeb.js';
|
|
9
|
+
import './ML5-657ef934.js';
|
|
10
|
+
import './_commonjsHelpers-321aa363.js';
|
|
11
|
+
|
|
12
|
+
const idCaptureCss = ".logo{max-height:450px;max-width:450px}.canvas-on-video{max-width:100%;max-height:100%;position:absolute;z-index:2;transform:scale(-1, 1)}";
|
|
13
|
+
|
|
14
|
+
const IdCapture = class {
|
|
15
15
|
// @State() private animationPath: string;
|
|
16
|
-
constructor() {
|
|
16
|
+
constructor(hostRef) {
|
|
17
|
+
registerInstance(this, hostRef);
|
|
18
|
+
this.eventPhotoCapture = createEvent(this, "photoIdCapture", 7);
|
|
19
|
+
this.apiErrorEvent = createEvent(this, "apiError", 7);
|
|
17
20
|
this.photoIsReady = photos => {
|
|
18
21
|
//this.closeCamera();
|
|
19
22
|
this.eventPhotoCapture.emit(photos);
|
|
@@ -36,7 +39,7 @@ export class IdCapture {
|
|
|
36
39
|
this.cameraSize = event.detail;
|
|
37
40
|
}
|
|
38
41
|
async componentWillLoad() {
|
|
39
|
-
this.titleMesage = IdCaptureValues.Title;
|
|
42
|
+
this.titleMesage = this.baseComponent.translations.IdCaptureValues.Title;
|
|
40
43
|
//this.videoDemoStyle = this.device.isMobile ? { 'width': window.screen.width + 'px', 'height': window.screen.height + 'px', 'object-fit': 'fill' } : {};
|
|
41
44
|
if (!navigator.mediaDevices) {
|
|
42
45
|
this.apiErrorEvent.emit({ message: 'This browser does not support webRTC' });
|
|
@@ -46,12 +49,12 @@ export class IdCapture {
|
|
|
46
49
|
await this.baseComponent.logStep(FlowSteps.CiFrontCapture, FlowMoments.Initialized);
|
|
47
50
|
this.demoVideo.src = IdCaptureValues.IDPoseDemoMapping[IDPose.Straight];
|
|
48
51
|
this.demoVideo.play();
|
|
49
|
-
await delay(
|
|
52
|
+
await delay(this.baseComponent.translations.GlobalValues.VideoLenght);
|
|
50
53
|
this.showDemo = false;
|
|
51
54
|
this.openCamera();
|
|
52
55
|
}
|
|
53
56
|
async openCamera() {
|
|
54
|
-
const constraints = this.cameras.GetConstraints(
|
|
57
|
+
const constraints = this.cameras.GetConstraints(state.cameraId, state.device);
|
|
55
58
|
setTimeout(() => {
|
|
56
59
|
navigator.mediaDevices
|
|
57
60
|
.getUserMedia(constraints)
|
|
@@ -88,7 +91,7 @@ export class IdCapture {
|
|
|
88
91
|
if (this.verified)
|
|
89
92
|
return;
|
|
90
93
|
this.verified = true;
|
|
91
|
-
this.titleMesage = IdCaptureValues.Loading;
|
|
94
|
+
this.titleMesage = this.baseComponent.translations.IdCaptureValues.Loading;
|
|
92
95
|
this.closeCamera();
|
|
93
96
|
this.showDemo = true;
|
|
94
97
|
this.demoVideo.src = 'https://ekyc.blob.core.windows.net/$web/animations/uploading_id.mp4';
|
|
@@ -110,83 +113,10 @@ export class IdCapture {
|
|
|
110
113
|
let titleClass = this.verified ? 'color-black-2 text-center' : 'color-white text-center';
|
|
111
114
|
//let videoClass = this.device.isMobile ? '' : 'video-demo';
|
|
112
115
|
let bgDemo = this.verified ? 'container' : 'container bg-black';
|
|
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" },
|
|
116
|
+
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)))));
|
|
114
117
|
}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
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
|
-
}
|
|
118
|
+
get component() { return getElement(this); }
|
|
119
|
+
};
|
|
120
|
+
IdCapture.style = idCaptureCss;
|
|
121
|
+
|
|
122
|
+
export { IdCapture as id_capture };
|
package/dist/{collection/components/common/id-tilt/id-tilt.js → qbs-ect-cmp/id-tilt.entry.js}
RENAMED
|
@@ -1,19 +1,22 @@
|
|
|
1
|
-
import { h } from '
|
|
2
|
-
import { Cameras } from '
|
|
3
|
-
import { Stream } from '
|
|
4
|
-
import { IdCaptureValues } from '
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { r as registerInstance, e as createEvent, h, i as getElement } from './index-78a05b9e.js';
|
|
2
|
+
import { C as Cameras } from './Cameras-dfbebc29.js';
|
|
3
|
+
import { S as Stream, V as VerificationMode, I as IDML5Detector, F as FaceML5Detector } from './Stream-b867a2be.js';
|
|
4
|
+
import { I as IdCaptureValues, s as state } from './textValues-6bcc85dd.js';
|
|
5
|
+
import { I as IDPose } from './IDPose-181bcb25.js';
|
|
6
|
+
import { d as delay } from './utils-8225f0b7.js';
|
|
7
|
+
import { B as BaseComponent, F as FlowSteps, a as FlowMoments } from './base-component-2e490fd9.js';
|
|
8
|
+
import './IDevice-15ecfdeb.js';
|
|
9
|
+
import './ML5-657ef934.js';
|
|
10
|
+
import './_commonjsHelpers-321aa363.js';
|
|
11
|
+
|
|
12
|
+
const idTiltCss = ".logo{max-height:450px;max-width:450px}.canvas-on-video{max-width:100%;max-height:100%;position:absolute;z-index:2;transform:scale(-1, 1)}";
|
|
13
|
+
|
|
14
|
+
const IdTilt = class {
|
|
15
15
|
// @State() private animationPath: string;
|
|
16
|
-
constructor() {
|
|
16
|
+
constructor(hostRef) {
|
|
17
|
+
registerInstance(this, hostRef);
|
|
18
|
+
this.eventPhotoCapture = createEvent(this, "photoTiltCapture", 7);
|
|
19
|
+
this.apiErrorEvent = createEvent(this, "apiError", 7);
|
|
17
20
|
this.photoIsReady = photos => {
|
|
18
21
|
//this.closeCamera();
|
|
19
22
|
this.eventPhotoCapture.emit(photos);
|
|
@@ -36,7 +39,7 @@ export class IdTilt {
|
|
|
36
39
|
this.cameraSize = event.detail;
|
|
37
40
|
}
|
|
38
41
|
async componentWillLoad() {
|
|
39
|
-
this.titleMesage = IdCaptureValues.IDPoseMapping
|
|
42
|
+
this.titleMesage = this.baseComponent.translations.IdCaptureValues.IDPoseMapping;
|
|
40
43
|
//this.videoDemoStyle = this.device.isMobile ? { 'width': window.screen.width + 'px', 'height': window.screen.height + 'px', 'object-fit': 'fill' } : {};
|
|
41
44
|
if (!navigator.mediaDevices) {
|
|
42
45
|
this.apiErrorEvent.emit({ message: 'This browser does not support webRTC' });
|
|
@@ -46,12 +49,12 @@ export class IdTilt {
|
|
|
46
49
|
await this.baseComponent.logStep(FlowSteps.CiTilt, FlowMoments.Initialized);
|
|
47
50
|
this.demoVideo.src = IdCaptureValues.IDPoseDemoMapping[IDPose.Tilted];
|
|
48
51
|
this.demoVideo.play();
|
|
49
|
-
await delay(
|
|
52
|
+
await delay(this.baseComponent.translations.GlobalValues.VideoLenght);
|
|
50
53
|
this.showDemo = false;
|
|
51
54
|
this.openCamera();
|
|
52
55
|
}
|
|
53
56
|
async openCamera() {
|
|
54
|
-
const constraints = this.cameras.GetConstraints(
|
|
57
|
+
const constraints = this.cameras.GetConstraints(state.cameraId, state.device);
|
|
55
58
|
setTimeout(() => {
|
|
56
59
|
navigator.mediaDevices
|
|
57
60
|
.getUserMedia(constraints)
|
|
@@ -88,7 +91,7 @@ export class IdTilt {
|
|
|
88
91
|
if (this.verified)
|
|
89
92
|
return;
|
|
90
93
|
this.verified = true;
|
|
91
|
-
this.titleMesage = IdCaptureValues.Loading;
|
|
94
|
+
this.titleMesage = this.baseComponent.translations.IdCaptureValues.Loading;
|
|
92
95
|
this.closeCamera();
|
|
93
96
|
this.showDemo = true;
|
|
94
97
|
this.demoVideo.src = 'https://ekyc.blob.core.windows.net/$web/animations/uploading_id.mp4';
|
|
@@ -110,83 +113,10 @@ export class IdTilt {
|
|
|
110
113
|
let titleClass = this.verified ? 'color-black-2 text-center' : 'color-white text-center';
|
|
111
114
|
//let videoClass = this.device.isMobile ? '' : 'video-demo';
|
|
112
115
|
let bgDemo = this.verified ? 'container' : 'container bg-black';
|
|
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": "tilt" })))))), h("div", { class: "capture-title" }, h("h1", { class: titleClass }, this.titleMesage), h("p", { class: "main-text font-size-18 text-right mb-0" },
|
|
116
|
+
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": "tilt" })))))), 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)))));
|
|
114
117
|
}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
}
|
|
121
|
-
static get styleUrls() {
|
|
122
|
-
return {
|
|
123
|
-
"$": ["id-tilt.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": "photoTiltCapture",
|
|
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
|
-
}
|
|
118
|
+
get component() { return getElement(this); }
|
|
119
|
+
};
|
|
120
|
+
IdTilt.style = idTiltCss;
|
|
121
|
+
|
|
122
|
+
export { IdTilt as id_tilt };
|