@ekyc_qoobiss/qbs-ect-cmp 3.6.28 → 3.6.29
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-b918ffb1.js +346 -0
- package/dist/cjs/agreement-check_19.cjs.entry.js +783 -284
- package/dist/cjs/random-actions.cjs.entry.js +5 -6
- package/dist/collection/components/base-component.js +0 -4
- package/dist/collection/components/common/agreement-check/agreement-check.js +6 -2
- package/dist/collection/components/common/camera-error/camera-error.js +7 -5
- package/dist/collection/components/common/capture-error/capture-error.js +12 -10
- package/dist/collection/components/common/how-to-info/how-to-info.js +11 -9
- package/dist/collection/components/common/id-back-capture/id-back-capture.js +8 -6
- package/dist/collection/components/common/id-capture/id-capture.js +6 -4
- package/dist/collection/components/common/id-tilt/id-tilt.js +6 -4
- package/dist/collection/components/common/random-actions/random-actions.js +5 -6
- package/dist/collection/components/common/selfie-capture/selfie-capture.js +7 -5
- package/dist/collection/components/common/selfie-tilt/selfie-tilt.js +8 -6
- package/dist/collection/components/flow/agreement-info/agreement-info.js +4 -2
- package/dist/collection/components/flow/end-redirect/end-redirect.js +5 -4
- package/dist/collection/components/flow/landing-validation/landing-validation.js +5 -3
- package/dist/collection/components/flow/mobile-redirect/mobile-redirect.js +8 -6
- package/dist/collection/components/flow/sms-code-validation/sms-code-validation.js +12 -10
- package/dist/esm/TranslationUtils-8ceeb437.js +339 -0
- package/dist/esm/agreement-check_19.entry.js +575 -76
- package/dist/esm/random-actions.entry.js +5 -6
- package/dist/qbs-ect-cmp/p-473a4636.entry.js +1 -0
- package/dist/qbs-ect-cmp/{p-c32a782a.entry.js → p-b2c9c8d7.entry.js} +2 -2
- package/dist/qbs-ect-cmp/p-e568a07c.js +1 -0
- package/dist/qbs-ect-cmp/qbs-ect-cmp.esm.js +1 -1
- package/dist/types/components/base-component.d.ts +0 -2
- package/dist/types/components/common/agreement-check/agreement-check.d.ts +2 -0
- package/dist/types/components/common/camera-error/camera-error.d.ts +1 -0
- package/dist/types/components/common/capture-error/capture-error.d.ts +1 -0
- package/dist/types/components/common/how-to-info/how-to-info.d.ts +2 -1
- 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/id-tilt/id-tilt.d.ts +1 -0
- package/dist/types/components/common/random-actions/random-actions.d.ts +2 -2
- package/dist/types/components/common/selfie-capture/selfie-capture.d.ts +2 -1
- package/dist/types/components/common/selfie-tilt/selfie-tilt.d.ts +2 -1
- package/dist/types/components/flow/agreement-info/agreement-info.d.ts +2 -1
- package/dist/types/components/flow/end-redirect/end-redirect.d.ts +2 -1
- package/dist/types/components/flow/landing-validation/landing-validation.d.ts +1 -0
- package/dist/types/components/flow/mobile-redirect/mobile-redirect.d.ts +1 -0
- package/dist/types/components/flow/sms-code-validation/sms-code-validation.d.ts +2 -1
- package/package.json +1 -1
- package/dist/cjs/base-component-aa9e52bf.js +0 -832
- package/dist/esm/base-component-b7f50d31.js +0 -824
- package/dist/qbs-ect-cmp/p-215a7e76.entry.js +0 -1
- package/dist/qbs-ect-cmp/p-7bedffaa.js +0 -1
|
@@ -1,5 +1,487 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-cf54a432.js';
|
|
2
|
-
import { A as
|
|
2
|
+
import { A as ApiUrls, s as state, F as FlowStatus, T as Translations, S as SessionKeys, I as IdCaptureValues, a as SelfieCaptureValues } from './TranslationUtils-8ceeb437.js';
|
|
3
|
+
|
|
4
|
+
var OrderStatuses;
|
|
5
|
+
(function (OrderStatuses) {
|
|
6
|
+
OrderStatuses[OrderStatuses["Capturing"] = 0] = "Capturing";
|
|
7
|
+
OrderStatuses[OrderStatuses["FinishedCapturing"] = 1] = "FinishedCapturing";
|
|
8
|
+
OrderStatuses[OrderStatuses["Waiting"] = 2] = "Waiting";
|
|
9
|
+
OrderStatuses[OrderStatuses["NotFound"] = 3] = "NotFound";
|
|
10
|
+
OrderStatuses[OrderStatuses["Aborted"] = 4] = "Aborted";
|
|
11
|
+
})(OrderStatuses || (OrderStatuses = {}));
|
|
12
|
+
|
|
13
|
+
var FlowSteps;
|
|
14
|
+
(function (FlowSteps) {
|
|
15
|
+
FlowSteps[FlowSteps["ComponentLoaded"] = 'component-loaded'] = "ComponentLoaded";
|
|
16
|
+
FlowSteps[FlowSteps["MobileRedirect"] = 'mobile-redirect'] = "MobileRedirect";
|
|
17
|
+
FlowSteps[FlowSteps["Landing"] = 'landing'] = "Landing";
|
|
18
|
+
FlowSteps[FlowSteps["Agreements"] = 'agreements'] = "Agreements";
|
|
19
|
+
FlowSteps[FlowSteps["OtpSend"] = 'otp-send'] = "OtpSend";
|
|
20
|
+
FlowSteps[FlowSteps["OtpCheck"] = 'otp-check'] = "OtpCheck";
|
|
21
|
+
FlowSteps[FlowSteps["CiFront"] = 'ci-front'] = "CiFront";
|
|
22
|
+
FlowSteps[FlowSteps["CiFrontHowTo"] = 'ci-front-how-to'] = "CiFrontHowTo";
|
|
23
|
+
FlowSteps[FlowSteps["CiFrontCapture"] = 'ci-front-capture'] = "CiFrontCapture";
|
|
24
|
+
FlowSteps[FlowSteps["CiBack"] = 'ci-back'] = "CiBack";
|
|
25
|
+
FlowSteps[FlowSteps["CiBackHowTo"] = 'ci-back-how-to'] = "CiBackHowTo";
|
|
26
|
+
FlowSteps[FlowSteps["CiBackCapture"] = 'ci-back-capture'] = "CiBackCapture";
|
|
27
|
+
FlowSteps[FlowSteps["CiTilt"] = 'ci-tilt'] = "CiTilt";
|
|
28
|
+
FlowSteps[FlowSteps["CiError"] = 'ci-error'] = "CiError";
|
|
29
|
+
FlowSteps[FlowSteps["SelfieHowTo"] = 'selfie-how-to'] = "SelfieHowTo";
|
|
30
|
+
FlowSteps[FlowSteps["SelfieTilt"] = 'selfie-tilt'] = "SelfieTilt";
|
|
31
|
+
FlowSteps[FlowSteps["SelfieCapture"] = 'selfie-capture'] = "SelfieCapture";
|
|
32
|
+
FlowSteps[FlowSteps["Selfie"] = 'selfie'] = "Selfie";
|
|
33
|
+
FlowSteps[FlowSteps["SelfieError"] = 'selfie-error'] = "SelfieError";
|
|
34
|
+
FlowSteps[FlowSteps["End"] = 'end'] = "End";
|
|
35
|
+
FlowSteps[FlowSteps["CameraError"] = 'camera-error'] = "CameraError";
|
|
36
|
+
})(FlowSteps || (FlowSteps = {}));
|
|
37
|
+
var FlowMoments;
|
|
38
|
+
(function (FlowMoments) {
|
|
39
|
+
FlowMoments[FlowMoments["Initialized"] = 'initialized'] = "Initialized";
|
|
40
|
+
FlowMoments[FlowMoments["Finalized"] = 'finalized'] = "Finalized";
|
|
41
|
+
FlowMoments[FlowMoments["None"] = 'none'] = "None";
|
|
42
|
+
})(FlowMoments || (FlowMoments = {}));
|
|
43
|
+
|
|
44
|
+
class ApiCall {
|
|
45
|
+
constructor() {
|
|
46
|
+
this.serviceErrors = ['Service Unavailable', 'Unauthorized'];
|
|
47
|
+
this.toBase64 = (file) => new Promise((resolve, reject) => {
|
|
48
|
+
const reader = new FileReader();
|
|
49
|
+
reader.readAsDataURL(file);
|
|
50
|
+
reader.onload = () => resolve(reader.result);
|
|
51
|
+
reader.onerror = error => reject(error);
|
|
52
|
+
});
|
|
53
|
+
this.urls = new ApiUrls();
|
|
54
|
+
}
|
|
55
|
+
// private async http2<T>(method: string, url: string, data: string): Promise<T> {
|
|
56
|
+
// return new Promise((resolve, reject) => {
|
|
57
|
+
// var xhr = new XMLHttpRequest();
|
|
58
|
+
// xhr.open(method, url);
|
|
59
|
+
// xhr.onload = function () {
|
|
60
|
+
// if (xhr.status >= 200 && xhr.status < 300) {
|
|
61
|
+
// resolve(xhr.response);
|
|
62
|
+
// } else {
|
|
63
|
+
// reject({
|
|
64
|
+
// status: xhr.status,
|
|
65
|
+
// statusText: xhr.statusText,
|
|
66
|
+
// });
|
|
67
|
+
// }
|
|
68
|
+
// };
|
|
69
|
+
// xhr.onerror = function () {
|
|
70
|
+
// reject({
|
|
71
|
+
// status: xhr.status,
|
|
72
|
+
// statusText: xhr.statusText,
|
|
73
|
+
// });
|
|
74
|
+
// };
|
|
75
|
+
// xhr.send(data);
|
|
76
|
+
// });
|
|
77
|
+
// }
|
|
78
|
+
async http(request) {
|
|
79
|
+
const response = await fetch(request);
|
|
80
|
+
if (!response.ok) {
|
|
81
|
+
throw new Error(response.statusText);
|
|
82
|
+
}
|
|
83
|
+
try {
|
|
84
|
+
// may error if there is no body
|
|
85
|
+
return await response.json();
|
|
86
|
+
}
|
|
87
|
+
catch (ex) {
|
|
88
|
+
throw new Error('No json found in response ' + ex);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
async post(url, data, withRetry = true) {
|
|
92
|
+
var request = new Request(state.apiBaseUrl + url, {
|
|
93
|
+
method: 'POST',
|
|
94
|
+
body: data,
|
|
95
|
+
headers: {
|
|
96
|
+
'Content-Type': 'application/json',
|
|
97
|
+
'Authorization': 'IDKYC-TOKEN ' + state.token,
|
|
98
|
+
},
|
|
99
|
+
});
|
|
100
|
+
try {
|
|
101
|
+
return await this.http(request);
|
|
102
|
+
}
|
|
103
|
+
catch (ex) {
|
|
104
|
+
if (!withRetry || this.serviceErrors.includes(ex.message)) {
|
|
105
|
+
throw ex;
|
|
106
|
+
}
|
|
107
|
+
this.AddLog('Error in post ', ex);
|
|
108
|
+
try {
|
|
109
|
+
var request2 = new Request(state.apiBaseUrl + url, {
|
|
110
|
+
method: 'POST',
|
|
111
|
+
body: data,
|
|
112
|
+
headers: {
|
|
113
|
+
'Content-Type': 'application/json',
|
|
114
|
+
'Authorization': 'IDKYC-TOKEN ' + state.token,
|
|
115
|
+
},
|
|
116
|
+
});
|
|
117
|
+
return await this.http(request2);
|
|
118
|
+
}
|
|
119
|
+
catch (ex2) {
|
|
120
|
+
this.AddLog('Error in post ', ex2);
|
|
121
|
+
var request3 = new Request(state.apiBaseUrl + url, {
|
|
122
|
+
method: 'POST',
|
|
123
|
+
body: data,
|
|
124
|
+
headers: {
|
|
125
|
+
'Content-Type': 'application/json',
|
|
126
|
+
'Authorization': 'IDKYC-TOKEN ' + state.token,
|
|
127
|
+
},
|
|
128
|
+
});
|
|
129
|
+
return await this.http(request3);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
async get(url, withRetry = true) {
|
|
134
|
+
var request = new Request(state.apiBaseUrl + url, {
|
|
135
|
+
method: 'GET',
|
|
136
|
+
headers: {
|
|
137
|
+
'Content-Type': 'application/json',
|
|
138
|
+
'Authorization': 'IDKYC-TOKEN ' + state.token,
|
|
139
|
+
},
|
|
140
|
+
});
|
|
141
|
+
try {
|
|
142
|
+
return await this.http(request);
|
|
143
|
+
}
|
|
144
|
+
catch (ex) {
|
|
145
|
+
if (!withRetry || this.serviceErrors.includes(ex.message)) {
|
|
146
|
+
throw ex;
|
|
147
|
+
}
|
|
148
|
+
this.AddLog('Error in get ', ex);
|
|
149
|
+
try {
|
|
150
|
+
var request2 = new Request(state.apiBaseUrl + url, {
|
|
151
|
+
method: 'GET',
|
|
152
|
+
headers: {
|
|
153
|
+
'Content-Type': 'application/json',
|
|
154
|
+
'Authorization': 'IDKYC-TOKEN ' + state.token,
|
|
155
|
+
},
|
|
156
|
+
});
|
|
157
|
+
return await this.http(request2);
|
|
158
|
+
}
|
|
159
|
+
catch (ex2) {
|
|
160
|
+
this.AddLog('Error in get ', ex2);
|
|
161
|
+
var request3 = new Request(state.apiBaseUrl + url, {
|
|
162
|
+
method: 'GET',
|
|
163
|
+
headers: {
|
|
164
|
+
'Content-Type': 'application/json',
|
|
165
|
+
'Authorization': 'IDKYC-TOKEN ' + state.token,
|
|
166
|
+
},
|
|
167
|
+
});
|
|
168
|
+
return await this.http(request3);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
async SendOTPCode(requestId, phoneNumber) {
|
|
173
|
+
let data = { requestId: requestId, phone: phoneNumber };
|
|
174
|
+
let jsonResp = await this.post(this.urls.OtpSend, JSON.stringify(data));
|
|
175
|
+
return jsonResp.sent;
|
|
176
|
+
}
|
|
177
|
+
async CheckOTPCode(requestId, otpCode) {
|
|
178
|
+
let data = { requestId: requestId, otp: otpCode };
|
|
179
|
+
let jsonResp = await this.post(this.urls.OtpCheck, JSON.stringify(data));
|
|
180
|
+
return jsonResp.valid;
|
|
181
|
+
}
|
|
182
|
+
async AddIdentificationRequest(deviceInfo, version) {
|
|
183
|
+
if (state.debug)
|
|
184
|
+
console.log('Calling identity request with store:' + JSON.stringify(state));
|
|
185
|
+
let data = {
|
|
186
|
+
requestId: state.requestId,
|
|
187
|
+
clientDeviceInfo: JSON.stringify(deviceInfo),
|
|
188
|
+
redirectId: state.redirectId,
|
|
189
|
+
phoneNumber: state.phoneNumber,
|
|
190
|
+
version: version,
|
|
191
|
+
};
|
|
192
|
+
let jsonResp = await this.post(this.urls.IdentityInsert, JSON.stringify(data));
|
|
193
|
+
if (state.requestId == '') {
|
|
194
|
+
state.requestId = jsonResp.requestId;
|
|
195
|
+
}
|
|
196
|
+
state.hasIdBack = jsonResp.hasIdBack;
|
|
197
|
+
state.hasIdTilt = jsonResp.hasIdTilt;
|
|
198
|
+
state.hasSelfieGesture = jsonResp.hasSelfieGesture;
|
|
199
|
+
state.agreementsValidation = jsonResp.agreementsValidation;
|
|
200
|
+
state.phoneValidation = jsonResp.phoneValidation;
|
|
201
|
+
state.phoneNumber = jsonResp.phoneNumber;
|
|
202
|
+
return true;
|
|
203
|
+
}
|
|
204
|
+
async UploadFileForRequestB64(requestId, type, file) {
|
|
205
|
+
let data = {
|
|
206
|
+
requestId: requestId,
|
|
207
|
+
type: type,
|
|
208
|
+
data: await this.toBase64(file),
|
|
209
|
+
};
|
|
210
|
+
let respJson = await this.post(this.urls.UploadCapture, JSON.stringify(data));
|
|
211
|
+
if (!state.hasIdBack && type == 'IdFront') {
|
|
212
|
+
return respJson.isValid;
|
|
213
|
+
}
|
|
214
|
+
if (state.hasIdBack && type == 'IdBack') {
|
|
215
|
+
return respJson.isValid;
|
|
216
|
+
}
|
|
217
|
+
if (type == 'Selfie') {
|
|
218
|
+
return respJson.isValid;
|
|
219
|
+
}
|
|
220
|
+
return true;
|
|
221
|
+
}
|
|
222
|
+
async GetAgreement(agreementType) {
|
|
223
|
+
let resp = await this.get(this.urls.GetAgreement + '?type=' + agreementType + '&requestId=' + state.requestId);
|
|
224
|
+
return resp.htmlText;
|
|
225
|
+
}
|
|
226
|
+
async GenerateAgreement(agreementType) {
|
|
227
|
+
let data = { requestId: state.requestId, documentType: agreementType };
|
|
228
|
+
let resp = await this.post(this.urls.GenerateAgreement, JSON.stringify(data));
|
|
229
|
+
return resp.generation;
|
|
230
|
+
}
|
|
231
|
+
async GetStatus(requestId) {
|
|
232
|
+
let resp = await this.get(this.urls.GetStatus + '?orderId=' + requestId);
|
|
233
|
+
return OrderStatuses[resp.status];
|
|
234
|
+
}
|
|
235
|
+
async SendLink(link, phoneNumber) {
|
|
236
|
+
let data = { requestId: state.requestId, link: link, phoneNumber: phoneNumber };
|
|
237
|
+
let resp = await this.post(this.urls.SendLink, JSON.stringify(data));
|
|
238
|
+
return resp.sent;
|
|
239
|
+
}
|
|
240
|
+
async AddLog(error, context) {
|
|
241
|
+
try {
|
|
242
|
+
let data = {
|
|
243
|
+
requestId: state.requestId,
|
|
244
|
+
action: FlowStatus[state.flowStatus],
|
|
245
|
+
message: JSON.stringify({ error, context }),
|
|
246
|
+
};
|
|
247
|
+
let result = await this.post(this.urls.AddLog, JSON.stringify(data), false);
|
|
248
|
+
return result.saved;
|
|
249
|
+
}
|
|
250
|
+
catch (_a) { }
|
|
251
|
+
}
|
|
252
|
+
async AddStep(step, moment) {
|
|
253
|
+
let data = { requestId: state.requestId, redirectId: state.redirectId, step: FlowSteps[step], moment: FlowMoments[moment], timestamp: new Date().toISOString() };
|
|
254
|
+
let result = await this.post(this.urls.AddStep, JSON.stringify(data));
|
|
255
|
+
return result.saved;
|
|
256
|
+
}
|
|
257
|
+
async AbortRequest() {
|
|
258
|
+
let result = await this.post(this.urls.AbortRequest, JSON.stringify({ requestId: state.requestId }));
|
|
259
|
+
return result.saved;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
var MobileOS;
|
|
264
|
+
(function (MobileOS) {
|
|
265
|
+
MobileOS["Android"] = "android";
|
|
266
|
+
MobileOS["iOS"] = "ios";
|
|
267
|
+
MobileOS["Unknown"] = "unknown";
|
|
268
|
+
MobileOS["WindowsPhone"] = "Windows Phone";
|
|
269
|
+
})(MobileOS || (MobileOS = {}));
|
|
270
|
+
var DesktopOS;
|
|
271
|
+
(function (DesktopOS) {
|
|
272
|
+
DesktopOS["Linux"] = "linux";
|
|
273
|
+
DesktopOS["MacOS"] = "mac_os";
|
|
274
|
+
DesktopOS["Unix"] = "unix";
|
|
275
|
+
DesktopOS["Unknown"] = "unknown";
|
|
276
|
+
DesktopOS["Windows"] = "windows";
|
|
277
|
+
})(DesktopOS || (DesktopOS = {}));
|
|
278
|
+
var Browser;
|
|
279
|
+
(function (Browser) {
|
|
280
|
+
Browser["Chrome"] = "chrome";
|
|
281
|
+
Browser["Firefox"] = "firefox";
|
|
282
|
+
Browser["Safari"] = "safari";
|
|
283
|
+
Browser["Mi"] = "mi";
|
|
284
|
+
Browser["Unknown"] = "unknown";
|
|
285
|
+
})(Browser || (Browser = {}));
|
|
286
|
+
|
|
287
|
+
class DeviceDetection {
|
|
288
|
+
constructor() {
|
|
289
|
+
var _a, _b, _c, _d;
|
|
290
|
+
this.supportedScreenOrientation = (_b = (_a = ((screen === null || screen === void 0 ? void 0 : screen.orientation) || {}).type) !== null && _a !== void 0 ? _a : screen.mozOrientation) !== null && _b !== void 0 ? _b : screen.msOrientation;
|
|
291
|
+
this.safariScreenOrientation = !(screen === null || screen === void 0 ? void 0 : screen.orientation) && matchMedia('(orientation: portrait)').matches ? 'portrait-primary' : 'landscape-primary';
|
|
292
|
+
this.initialScreenOrientation = (_d = (_c = this.supportedScreenOrientation) !== null && _c !== void 0 ? _c : this.safariScreenOrientation) !== null && _d !== void 0 ? _d : 'portrait-primary';
|
|
293
|
+
this.userAgent = navigator.userAgent || navigator.vendor || window.opera || undefined;
|
|
294
|
+
this.isMobile = this.isMobileDevice();
|
|
295
|
+
this.isTablet = this.isTabletDevice();
|
|
296
|
+
this.isDesktop = !this.isMobile && !this.isTablet;
|
|
297
|
+
}
|
|
298
|
+
// Device typology
|
|
299
|
+
isMobileDevice() {
|
|
300
|
+
const regexs = [/(Android)(.+)(Mobile)/i, /BlackBerry/i, /iPhone|iPod/i, /Opera Mini/i, /IEMobile/i];
|
|
301
|
+
return regexs.some(b => this.userAgent.match(b));
|
|
302
|
+
}
|
|
303
|
+
isTabletDevice() {
|
|
304
|
+
const regex = /(ipad|tablet|(android(?!.*mobile))|(windows(?!.*phone)(.*touch))|kindle|playbook|silk|(puffin(?!.*(IP|AP|WP))))/;
|
|
305
|
+
return regex.test(this.userAgent.toLowerCase());
|
|
306
|
+
}
|
|
307
|
+
// Device Operating System
|
|
308
|
+
getMobileOS() {
|
|
309
|
+
if (this.isMobileDevice()) {
|
|
310
|
+
if (/windows phone/i.test(this.userAgent))
|
|
311
|
+
return MobileOS.WindowsPhone;
|
|
312
|
+
else if (/android/i.test(this.userAgent))
|
|
313
|
+
return MobileOS.Android;
|
|
314
|
+
else if (/iPad|iPhone|iPod/.test(this.userAgent) && !window.MSStream)
|
|
315
|
+
return MobileOS.iOS;
|
|
316
|
+
return MobileOS.Unknown;
|
|
317
|
+
}
|
|
318
|
+
else
|
|
319
|
+
return undefined;
|
|
320
|
+
}
|
|
321
|
+
getDesktopOS() {
|
|
322
|
+
if (this.isDesktop) {
|
|
323
|
+
if (this.userAgent.indexOf('Win') !== -1)
|
|
324
|
+
return DesktopOS.Windows;
|
|
325
|
+
else if (this.userAgent.indexOf('Mac') !== -1)
|
|
326
|
+
return DesktopOS.MacOS;
|
|
327
|
+
else if (this.userAgent.indexOf('X11') !== -1)
|
|
328
|
+
return DesktopOS.Unix;
|
|
329
|
+
else if (this.userAgent.indexOf('Linux') !== -1)
|
|
330
|
+
return DesktopOS.Linux;
|
|
331
|
+
return DesktopOS.Unknown;
|
|
332
|
+
}
|
|
333
|
+
else
|
|
334
|
+
return undefined;
|
|
335
|
+
}
|
|
336
|
+
getDeviceOS() {
|
|
337
|
+
var _a;
|
|
338
|
+
return (_a = this.getMobileOS()) !== null && _a !== void 0 ? _a : this.getDesktopOS();
|
|
339
|
+
}
|
|
340
|
+
getBrowser() {
|
|
341
|
+
if (/XiaoMi/i.test(this.userAgent) || /MiuiBrowser/i.test(this.userAgent))
|
|
342
|
+
return Browser.Mi;
|
|
343
|
+
var isChrome = /chrome/i.test(this.userAgent);
|
|
344
|
+
if (isChrome)
|
|
345
|
+
return Browser.Chrome;
|
|
346
|
+
if (/firefox/i.test(navigator.userAgent))
|
|
347
|
+
return Browser.Firefox;
|
|
348
|
+
else if (!isChrome && /safari/i.test(navigator.userAgent))
|
|
349
|
+
return Browser.Safari;
|
|
350
|
+
else
|
|
351
|
+
return Browser.Unknown;
|
|
352
|
+
}
|
|
353
|
+
getDevice() {
|
|
354
|
+
var device = {
|
|
355
|
+
isDesktop: this.isDesktop,
|
|
356
|
+
desktopOS: this.getDesktopOS(),
|
|
357
|
+
isWindowsDesktop: this.getDeviceOS() === DesktopOS.Windows,
|
|
358
|
+
isLinuxOrUnixDesktop: this.getDeviceOS() === DesktopOS.Linux || this.getDeviceOS() === DesktopOS.Unix,
|
|
359
|
+
isMobile: this.isMobile,
|
|
360
|
+
mobileOS: this.getMobileOS(),
|
|
361
|
+
isAndroidDevice: this.getDeviceOS() === MobileOS.Android,
|
|
362
|
+
isAppleDevice: this.getDeviceOS() === MobileOS.iOS || this.getDeviceOS() === DesktopOS.MacOS,
|
|
363
|
+
isUnknownMobileDevice: this.getDeviceOS() === MobileOS.Unknown,
|
|
364
|
+
browser: this.getBrowser(),
|
|
365
|
+
isTablet: this.isTablet,
|
|
366
|
+
initialScreenOrientation: this.initialScreenOrientation,
|
|
367
|
+
};
|
|
368
|
+
return device;
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
class Events {
|
|
373
|
+
static init(element) {
|
|
374
|
+
this.callingModule = element;
|
|
375
|
+
}
|
|
376
|
+
static flowEvent(step, moment) {
|
|
377
|
+
const eventName = `ect-${step.toString()}-${moment.toString()}-event`;
|
|
378
|
+
this.callingModule.dispatchEvent(new CustomEvent(eventName, {
|
|
379
|
+
detail: {},
|
|
380
|
+
bubbles: true,
|
|
381
|
+
cancelable: true,
|
|
382
|
+
composed: true,
|
|
383
|
+
}));
|
|
384
|
+
}
|
|
385
|
+
static flowStarted() {
|
|
386
|
+
this.callingModule.dispatchEvent(new CustomEvent('ect-started', {
|
|
387
|
+
detail: {},
|
|
388
|
+
bubbles: true,
|
|
389
|
+
cancelable: true,
|
|
390
|
+
composed: true,
|
|
391
|
+
}));
|
|
392
|
+
}
|
|
393
|
+
static flowAborted() {
|
|
394
|
+
sessionStorage.clear();
|
|
395
|
+
this.callingModule.dispatchEvent(new CustomEvent('ect-aborted', {
|
|
396
|
+
detail: {},
|
|
397
|
+
bubbles: true,
|
|
398
|
+
cancelable: true,
|
|
399
|
+
composed: true,
|
|
400
|
+
}));
|
|
401
|
+
}
|
|
402
|
+
static flowCompleted() {
|
|
403
|
+
sessionStorage.clear();
|
|
404
|
+
this.callingModule.dispatchEvent(new CustomEvent('ect-completed', {
|
|
405
|
+
detail: {},
|
|
406
|
+
bubbles: true,
|
|
407
|
+
cancelable: true,
|
|
408
|
+
composed: true,
|
|
409
|
+
}));
|
|
410
|
+
}
|
|
411
|
+
static flowError(error) {
|
|
412
|
+
sessionStorage.clear();
|
|
413
|
+
this.callingModule.dispatchEvent(new CustomEvent('ect-error', {
|
|
414
|
+
detail: { error },
|
|
415
|
+
bubbles: true,
|
|
416
|
+
cancelable: true,
|
|
417
|
+
composed: true,
|
|
418
|
+
}));
|
|
419
|
+
}
|
|
420
|
+
static tokenExpired() {
|
|
421
|
+
sessionStorage.clear();
|
|
422
|
+
this.callingModule.dispatchEvent(new CustomEvent('ect-session-expired', {
|
|
423
|
+
detail: {},
|
|
424
|
+
bubbles: true,
|
|
425
|
+
cancelable: true,
|
|
426
|
+
composed: true,
|
|
427
|
+
}));
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
class BaseComponent {
|
|
432
|
+
constructor(step) {
|
|
433
|
+
this.apiErrorEvent = null;
|
|
434
|
+
this.processError = null;
|
|
435
|
+
this.apiCall = new ApiCall();
|
|
436
|
+
if (step)
|
|
437
|
+
this.flowStep = step;
|
|
438
|
+
if (!state.device) {
|
|
439
|
+
state.device = new DeviceDetection().getDevice();
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
setEventEmitter(event) {
|
|
443
|
+
this.apiErrorEvent = event;
|
|
444
|
+
}
|
|
445
|
+
setErrorCallback(callback) {
|
|
446
|
+
this.processError = callback;
|
|
447
|
+
}
|
|
448
|
+
async logStep(step, moment) {
|
|
449
|
+
Events.flowEvent(step, moment);
|
|
450
|
+
try {
|
|
451
|
+
await this.apiCall.AddStep(step, moment);
|
|
452
|
+
}
|
|
453
|
+
catch (e) {
|
|
454
|
+
if (this.apiErrorEvent)
|
|
455
|
+
this.apiErrorEvent.emit(e);
|
|
456
|
+
else
|
|
457
|
+
this.processError(e, `${step}-${moment}`);
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
async initialize() {
|
|
461
|
+
Events.flowEvent(this.flowStep, FlowMoments.Initialized);
|
|
462
|
+
try {
|
|
463
|
+
await this.apiCall.AddStep(this.flowStep, FlowMoments.Initialized);
|
|
464
|
+
}
|
|
465
|
+
catch (e) {
|
|
466
|
+
if (this.apiErrorEvent)
|
|
467
|
+
this.apiErrorEvent.emit(e);
|
|
468
|
+
else
|
|
469
|
+
this.processError(e, `${this.flowStep}-${FlowMoments.Initialized}`);
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
async finalize() {
|
|
473
|
+
Events.flowEvent(this.flowStep, FlowMoments.Finalized);
|
|
474
|
+
try {
|
|
475
|
+
await this.apiCall.AddStep(this.flowStep, FlowMoments.Finalized);
|
|
476
|
+
}
|
|
477
|
+
catch (e) {
|
|
478
|
+
if (this.apiErrorEvent)
|
|
479
|
+
this.apiErrorEvent.emit(e);
|
|
480
|
+
else
|
|
481
|
+
this.processError(e, `${this.flowStep}-${FlowMoments.Finalized}`);
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
}
|
|
3
485
|
|
|
4
486
|
const agreementCheckCss = "";
|
|
5
487
|
|
|
@@ -14,9 +496,12 @@ const AgreementCheck = class {
|
|
|
14
496
|
this.scrollClass = 'scroll';
|
|
15
497
|
this.apiCalls = new ApiCall();
|
|
16
498
|
this.buttonEnabled = true;
|
|
17
|
-
this.baseComponent = new BaseComponent(FlowSteps.
|
|
499
|
+
this.baseComponent = new BaseComponent(FlowSteps.Agreements);
|
|
18
500
|
this.baseComponent.setEventEmitter(this.apiErrorEvent);
|
|
19
501
|
}
|
|
502
|
+
async componentWillLoad() {
|
|
503
|
+
this.translations = await Translations.getValues();
|
|
504
|
+
}
|
|
20
505
|
async componentDidLoad() {
|
|
21
506
|
try {
|
|
22
507
|
this.htmlContent = await this.apiCalls.GetAgreement(this.agreementType);
|
|
@@ -30,7 +515,7 @@ const AgreementCheck = class {
|
|
|
30
515
|
this.agreementAcceptance.emit({ agreementType: this.agreementType, result });
|
|
31
516
|
}
|
|
32
517
|
render() {
|
|
33
|
-
let content = (h("div", { class: "container" }, h("div", { class: "row" }, h("div", { class: this.scrollClass, innerHTML: this.htmlContent }), h("div", { class: "pos-relative show-bottom" }, h("div", { class: "btn-buletin" }, h("div", { class: "d-flex two-buttons" }, h("button", { class: "normal-button red-button", disabled: !this.buttonEnabled, onClick: () => this.buttonClick(false) }, this.
|
|
518
|
+
let content = (h("div", { class: "container" }, h("div", { class: "row" }, h("div", { class: this.scrollClass, innerHTML: this.htmlContent }), h("div", { class: "pos-relative show-bottom" }, h("div", { class: "btn-buletin" }, h("div", { class: "d-flex two-buttons" }, h("button", { class: "normal-button red-button", disabled: !this.buttonEnabled, onClick: () => this.buttonClick(false) }, this.translations.AgreementCheckValues.ButtonNo), h("button", { class: "normal-button", disabled: !this.buttonEnabled, onClick: () => this.buttonClick(true) }, this.translations.AgreementCheckValues.ButtonYes)), h("p", { class: "main-text font-size-18 text-right mb-0" }, this.translations.GlobalValues.FooterText))))));
|
|
34
519
|
return this.htmlContent ? content : h("div", null);
|
|
35
520
|
}
|
|
36
521
|
};
|
|
@@ -54,7 +539,8 @@ const AgreementInfo = class {
|
|
|
54
539
|
async componentDidLoad() {
|
|
55
540
|
await this.baseComponent.initialize();
|
|
56
541
|
}
|
|
57
|
-
componentWillLoad() {
|
|
542
|
+
async componentWillLoad() {
|
|
543
|
+
this.translations = await Translations.getValues();
|
|
58
544
|
this.openAgreements = false;
|
|
59
545
|
this.openTerms = false;
|
|
60
546
|
}
|
|
@@ -90,7 +576,7 @@ const AgreementInfo = class {
|
|
|
90
576
|
render() {
|
|
91
577
|
let agreementsCheck = h("agreement-check", { agreementType: "agreement" });
|
|
92
578
|
let termsCheck = h("agreement-check", { agreementType: "terms" });
|
|
93
|
-
let mainComp = (h("div", { class: "container" }, h("div", { class: "row" }, h("div", null, h("h1", { class: "text-center" }, this.
|
|
579
|
+
let mainComp = (h("div", { class: "container" }, h("div", { class: "row" }, h("div", null, h("h1", { class: "text-center" }, this.translations.AgreementInfoValues.Title), h("div", { class: "d-flex space-between align-center" }, h("h3", { class: "main-text font-size-2", onClick: () => this.agreementsClicked() }, h("input", { type: "checkbox", readOnly: true, checked: this.agreementsChecked }), this.translations.AgreementInfoValues.Agreement)), h("div", { class: "d-flex space-between align-center" }, h("h3", { class: "main-text font-size-2", onClick: () => this.termsClicked() }, h("input", { type: "checkbox", readOnly: true, checked: this.termsChecked }), this.translations.AgreementInfoValues.Terms))), h("div", { class: "pos-relative show-bottom" }, h("div", { class: "btn-buletin" }, h("button", { class: "main-button", onClick: () => this.buttonClick() }, this.translations.AgreementInfoValues.Button), h("p", { class: "main-text font-size-18 text-right mb-0" }, this.translations.GlobalValues.FooterText))))));
|
|
94
580
|
return this.openAgreements ? agreementsCheck : this.openTerms ? termsCheck : mainComp;
|
|
95
581
|
}
|
|
96
582
|
};
|
|
@@ -4605,15 +5091,16 @@ const CameraError = class {
|
|
|
4605
5091
|
this.baseComponent.setEventEmitter(this.apiErrorEvent);
|
|
4606
5092
|
}
|
|
4607
5093
|
async componentWillLoad() {
|
|
5094
|
+
this.translations = await Translations.getValues();
|
|
4608
5095
|
this.buttonDisabled = false;
|
|
4609
|
-
this.title = this.
|
|
4610
|
-
this.description = this.
|
|
4611
|
-
this.buttonText = this.
|
|
5096
|
+
this.title = this.translations.CameraErrorValues.Title;
|
|
5097
|
+
this.description = this.translations.CameraErrorValues.Description;
|
|
5098
|
+
this.buttonText = this.translations.CameraErrorValues.Button;
|
|
4612
5099
|
}
|
|
4613
5100
|
async componentDidLoad() {
|
|
4614
5101
|
await this.baseComponent.initialize();
|
|
4615
5102
|
if (state.device.mobileOS != MobileOS.iOS) {
|
|
4616
|
-
this.demoVideo.src = this.
|
|
5103
|
+
this.demoVideo.src = this.translations.CameraErrorValues.HowToLink;
|
|
4617
5104
|
this.demoVideo.loop = true;
|
|
4618
5105
|
this.demoVideo.play();
|
|
4619
5106
|
}
|
|
@@ -4639,7 +5126,7 @@ const CameraError = class {
|
|
|
4639
5126
|
}
|
|
4640
5127
|
}
|
|
4641
5128
|
render() {
|
|
4642
|
-
return (h("div", { class: "container" }, h("div", { class: "row" }, h("h1", { class: "color-red" }, this.title), h("div", null, h("p", { class: "color-red font-weight-bold font-size-25 mt-5" }, this.description)), h("div", { hidden: state.device.mobileOS == MobileOS.iOS }, h("video", { id: "howtoPermissions", class: "video-demo", playsinline: true, ref: el => (this.demoVideo = el) }, h("source", { type: "video/mp4" }))), h("div", { class: "pos-relative show-bottom" }, h("div", { class: "btn-buletin" }, h("button", { class: "main-button", type: "button", disabled: this.buttonDisabled, onClick: () => this.buttonClick() }, this.buttonText), h("p", { class: "main-text font-size-18 text-right mb-0" }, this.
|
|
5129
|
+
return (h("div", { class: "container" }, h("div", { class: "row" }, h("h1", { class: "color-red" }, this.title), h("div", null, h("p", { class: "color-red font-weight-bold font-size-25 mt-5" }, this.description)), h("div", { hidden: state.device.mobileOS == MobileOS.iOS }, h("video", { id: "howtoPermissions", class: "video-demo", playsinline: true, ref: el => (this.demoVideo = el) }, h("source", { type: "video/mp4" }))), h("div", { class: "pos-relative show-bottom" }, h("div", { class: "btn-buletin" }, h("button", { class: "main-button", type: "button", disabled: this.buttonDisabled, onClick: () => this.buttonClick() }, this.buttonText), h("p", { class: "main-text font-size-18 text-right mb-0" }, this.translations.GlobalValues.FooterText))))));
|
|
4643
5130
|
}
|
|
4644
5131
|
};
|
|
4645
5132
|
CameraError.style = cameraErrorCss;
|
|
@@ -4656,18 +5143,19 @@ const CaptureError = class {
|
|
|
4656
5143
|
this.baseComponent = new BaseComponent(FlowSteps.CiError);
|
|
4657
5144
|
}
|
|
4658
5145
|
async componentWillLoad() {
|
|
5146
|
+
this.translations = await Translations.getValues();
|
|
4659
5147
|
this.buttonEnabled = false;
|
|
4660
5148
|
if (this.type == 'ID') {
|
|
4661
|
-
this.titleR1 = this.
|
|
4662
|
-
this.titleR2 = this.
|
|
4663
|
-
this.descriptionR1 = this.
|
|
4664
|
-
this.descriptionR2 = this.
|
|
5149
|
+
this.titleR1 = this.translations.IdCaptureValues.ErrorTitleR1;
|
|
5150
|
+
this.titleR2 = this.translations.IdCaptureValues.ErrorTitleR2;
|
|
5151
|
+
this.descriptionR1 = this.translations.IdCaptureValues.ErrorR1;
|
|
5152
|
+
this.descriptionR2 = this.translations.IdCaptureValues.ErrorR2;
|
|
4665
5153
|
}
|
|
4666
5154
|
if (this.type == 'LIVENESS') {
|
|
4667
|
-
this.titleR1 = this.
|
|
4668
|
-
this.titleR2 = this.
|
|
4669
|
-
this.descriptionR1 = this.
|
|
4670
|
-
this.descriptionR2 = this.
|
|
5155
|
+
this.titleR1 = this.translations.SelfieCaptureValues.ErrorTitleR1;
|
|
5156
|
+
this.titleR2 = this.translations.SelfieCaptureValues.ErrorTitleR2;
|
|
5157
|
+
this.descriptionR1 = this.translations.SelfieCaptureValues.ErrorR1;
|
|
5158
|
+
this.descriptionR2 = this.translations.SelfieCaptureValues.ErrorR2;
|
|
4671
5159
|
}
|
|
4672
5160
|
}
|
|
4673
5161
|
async componentDidLoad() {
|
|
@@ -4676,7 +5164,7 @@ const CaptureError = class {
|
|
|
4676
5164
|
this.buttonText = i.toString();
|
|
4677
5165
|
await delay(1000);
|
|
4678
5166
|
}
|
|
4679
|
-
this.buttonText = this.
|
|
5167
|
+
this.buttonText = this.translations.IdCaptureValues.Button;
|
|
4680
5168
|
this.buttonEnabled = true;
|
|
4681
5169
|
}
|
|
4682
5170
|
async buttonClick() {
|
|
@@ -4685,7 +5173,7 @@ const CaptureError = class {
|
|
|
4685
5173
|
this.eventCaptureErrorDone.emit();
|
|
4686
5174
|
}
|
|
4687
5175
|
render() {
|
|
4688
|
-
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.
|
|
5176
|
+
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.translations.GlobalValues.FooterText))))));
|
|
4689
5177
|
}
|
|
4690
5178
|
};
|
|
4691
5179
|
CaptureError.style = captureErrorCss;
|
|
@@ -4698,13 +5186,15 @@ const EndRedirect = class {
|
|
|
4698
5186
|
constructor(hostRef) {
|
|
4699
5187
|
registerInstance(this, hostRef);
|
|
4700
5188
|
this.apiErrorEvent = createEvent(this, "apiError", 7);
|
|
4701
|
-
|
|
5189
|
+
}
|
|
5190
|
+
async componentWillLoad() {
|
|
5191
|
+
this.translations = await Translations.getValues();
|
|
4702
5192
|
}
|
|
4703
5193
|
async componentDidLoad() {
|
|
4704
5194
|
Events.flowCompleted();
|
|
4705
5195
|
}
|
|
4706
5196
|
render() {
|
|
4707
|
-
return (h("div", { class: "container" }, h("div", { class: "row" }, h("div", null, h("h1", { class: "text-center" }, this.
|
|
5197
|
+
return (h("div", { class: "container" }, h("div", { class: "row" }, h("div", null, h("h1", { class: "text-center" }, this.translations.CompleteValues.Title), h("p", { class: "main-text font-size-18 mt-8 text-center" }, this.translations.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: completeSvg }))))), h("div", { class: "text-center" }, h("p", { class: "font-weight-900 font-size-3 color-black-2 text-center mt-20" }, this.translations.CompleteValues.Message), h("p", null, state.requestId)), h("div", { class: "btn-buletin" }, h("p", { class: "main-text font-size-18 text-center mb-0" }, this.translations.GlobalValues.FooterText)))));
|
|
4708
5198
|
}
|
|
4709
5199
|
};
|
|
4710
5200
|
EndRedirect.style = endRedirectCss;
|
|
@@ -4738,34 +5228,35 @@ const HowToInfo = class {
|
|
|
4738
5228
|
this.buttonEnabled = false;
|
|
4739
5229
|
this.eventHowToInfoDone.emit();
|
|
4740
5230
|
}
|
|
4741
|
-
componentWillLoad() {
|
|
5231
|
+
async componentWillLoad() {
|
|
5232
|
+
this.translations = await Translations.getValues();
|
|
4742
5233
|
this.subTitle = '';
|
|
4743
5234
|
this.buttonEnabled = true;
|
|
4744
5235
|
if (state.flowStatus == FlowStatus.ID) {
|
|
4745
|
-
this.topTitle = this.
|
|
5236
|
+
this.topTitle = this.translations.HowToValues.IdTitile;
|
|
4746
5237
|
this.imagePath = 'https://ekyc.blob.core.windows.net/$web/howto_id.png';
|
|
4747
|
-
this.buttonText = this.
|
|
5238
|
+
this.buttonText = this.translations.HowToValues.IdButton;
|
|
4748
5239
|
if (this.idSide == 'front') {
|
|
4749
5240
|
this.baseComponent = new BaseComponent(FlowSteps.CiFrontHowTo);
|
|
4750
|
-
this.subTitle = this.
|
|
5241
|
+
this.subTitle = this.translations.HowToValues.IdSubTitileFace;
|
|
4751
5242
|
}
|
|
4752
5243
|
if (this.idSide == 'back') {
|
|
4753
5244
|
this.baseComponent = new BaseComponent(FlowSteps.CiBackHowTo);
|
|
4754
|
-
this.subTitle = this.
|
|
5245
|
+
this.subTitle = this.translations.HowToValues.IdSubTitileBack;
|
|
4755
5246
|
}
|
|
4756
5247
|
}
|
|
4757
5248
|
if (state.flowStatus == FlowStatus.LIVENESS) {
|
|
4758
5249
|
this.baseComponent = new BaseComponent(FlowSteps.SelfieHowTo);
|
|
4759
|
-
this.topTitle = this.
|
|
4760
|
-
this.subTitle = this.
|
|
5250
|
+
this.topTitle = this.translations.HowToValues.SelfieTitile;
|
|
5251
|
+
this.subTitle = this.translations.HowToValues.SelfieSubTitile;
|
|
4761
5252
|
this.imagePath = 'https://ekyc.blob.core.windows.net/$web/howto_selfie.png';
|
|
4762
|
-
this.buttonText = this.
|
|
5253
|
+
this.buttonText = this.translations.HowToValues.SelfieButton;
|
|
4763
5254
|
}
|
|
4764
5255
|
this.baseComponent.setEventEmitter(this.apiErrorEvent);
|
|
4765
5256
|
}
|
|
4766
5257
|
render() {
|
|
4767
5258
|
let sub = this.subTitle != '' ? h("p", { class: "font-size-2" }, this.subTitle) : null;
|
|
4768
|
-
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.
|
|
5259
|
+
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.translations.GlobalValues.FooterText))))));
|
|
4769
5260
|
}
|
|
4770
5261
|
};
|
|
4771
5262
|
HowToInfo.style = howToInfoCss;
|
|
@@ -4937,6 +5428,7 @@ const IdBackCapture = class {
|
|
|
4937
5428
|
this.cameraSize = event.detail;
|
|
4938
5429
|
}
|
|
4939
5430
|
async componentWillLoad() {
|
|
5431
|
+
this.translations = await Translations.getValues();
|
|
4940
5432
|
//this.videoDemoStyle = this.device.isMobile ? { width: window.screen.width + 'px', height: window.screen.height + 'px', 'object-fit': 'fill' } : {};
|
|
4941
5433
|
if (!navigator.mediaDevices) {
|
|
4942
5434
|
this.apiErrorEvent.emit({ message: 'This browser does not support webRTC' });
|
|
@@ -4944,14 +5436,14 @@ const IdBackCapture = class {
|
|
|
4944
5436
|
}
|
|
4945
5437
|
async componentDidLoad() {
|
|
4946
5438
|
await this.baseComponent.logStep(FlowSteps.CiBackCapture, FlowMoments.Initialized);
|
|
4947
|
-
this.titleMesage = this.
|
|
5439
|
+
this.titleMesage = this.translations.IdCaptureValues.TtileRotate;
|
|
4948
5440
|
this.demoVideo.src = IdCaptureValues.IDPoseDemoMapping[IDPose.Rotate];
|
|
4949
5441
|
this.demoVideo.play();
|
|
4950
|
-
await delay(this.
|
|
4951
|
-
this.titleMesage = this.
|
|
5442
|
+
await delay(this.translations.GlobalValues.VideoLenght);
|
|
5443
|
+
this.titleMesage = this.translations.IdCaptureValues.TitleBack;
|
|
4952
5444
|
this.demoVideo.src = IdCaptureValues.IDPoseDemoMapping[IDPose.BackStraight];
|
|
4953
5445
|
this.demoVideo.play();
|
|
4954
|
-
await delay(this.
|
|
5446
|
+
await delay(this.translations.GlobalValues.VideoLenght);
|
|
4955
5447
|
this.showDemo = false;
|
|
4956
5448
|
this.openCamera();
|
|
4957
5449
|
}
|
|
@@ -4985,7 +5477,7 @@ const IdBackCapture = class {
|
|
|
4985
5477
|
if (this.verified)
|
|
4986
5478
|
return;
|
|
4987
5479
|
this.verified = true;
|
|
4988
|
-
this.titleMesage = this.
|
|
5480
|
+
this.titleMesage = this.translations.IdCaptureValues.Loading;
|
|
4989
5481
|
this.closeCamera();
|
|
4990
5482
|
this.showDemo = true;
|
|
4991
5483
|
this.demoVideo.src = 'https://ekyc.blob.core.windows.net/$web/animations/uploading_id.mp4';
|
|
@@ -5010,7 +5502,7 @@ const IdBackCapture = class {
|
|
|
5010
5502
|
let titleClass = this.verified ? 'color-black-2 text-center' : 'color-white text-center';
|
|
5011
5503
|
//let videoClass = this.device.isMobile ? '' : 'video-demo';
|
|
5012
5504
|
let bgDemo = this.verified ? 'container' : 'container bg-black';
|
|
5013
|
-
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.
|
|
5505
|
+
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.translations.GlobalValues.FooterText)))));
|
|
5014
5506
|
}
|
|
5015
5507
|
get component() { return getElement(this); }
|
|
5016
5508
|
};
|
|
@@ -5046,7 +5538,8 @@ const IdCapture = class {
|
|
|
5046
5538
|
this.cameraSize = event.detail;
|
|
5047
5539
|
}
|
|
5048
5540
|
async componentWillLoad() {
|
|
5049
|
-
this.
|
|
5541
|
+
this.translations = await Translations.getValues();
|
|
5542
|
+
this.titleMesage = this.translations.IdCaptureValues.Title;
|
|
5050
5543
|
//this.videoDemoStyle = this.device.isMobile ? { 'width': window.screen.width + 'px', 'height': window.screen.height + 'px', 'object-fit': 'fill' } : {};
|
|
5051
5544
|
if (!navigator.mediaDevices) {
|
|
5052
5545
|
this.apiErrorEvent.emit({ message: 'This browser does not support webRTC' });
|
|
@@ -5056,7 +5549,7 @@ const IdCapture = class {
|
|
|
5056
5549
|
await this.baseComponent.logStep(FlowSteps.CiFrontCapture, FlowMoments.Initialized);
|
|
5057
5550
|
this.demoVideo.src = IdCaptureValues.IDPoseDemoMapping[IDPose.Straight];
|
|
5058
5551
|
this.demoVideo.play();
|
|
5059
|
-
await delay(this.
|
|
5552
|
+
await delay(this.translations.GlobalValues.VideoLenght);
|
|
5060
5553
|
this.showDemo = false;
|
|
5061
5554
|
this.openCamera();
|
|
5062
5555
|
}
|
|
@@ -5098,7 +5591,7 @@ const IdCapture = class {
|
|
|
5098
5591
|
if (this.verified)
|
|
5099
5592
|
return;
|
|
5100
5593
|
this.verified = true;
|
|
5101
|
-
this.titleMesage = this.
|
|
5594
|
+
this.titleMesage = this.translations.IdCaptureValues.Loading;
|
|
5102
5595
|
this.closeCamera();
|
|
5103
5596
|
this.showDemo = true;
|
|
5104
5597
|
this.demoVideo.src = 'https://ekyc.blob.core.windows.net/$web/animations/uploading_id.mp4';
|
|
@@ -5120,7 +5613,7 @@ const IdCapture = class {
|
|
|
5120
5613
|
let titleClass = this.verified ? 'color-black-2 text-center' : 'color-white text-center';
|
|
5121
5614
|
//let videoClass = this.device.isMobile ? '' : 'video-demo';
|
|
5122
5615
|
let bgDemo = this.verified ? 'container' : 'container bg-black';
|
|
5123
|
-
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.
|
|
5616
|
+
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.translations.GlobalValues.FooterText)))));
|
|
5124
5617
|
}
|
|
5125
5618
|
get component() { return getElement(this); }
|
|
5126
5619
|
};
|
|
@@ -5156,7 +5649,8 @@ const IdTilt = class {
|
|
|
5156
5649
|
this.cameraSize = event.detail;
|
|
5157
5650
|
}
|
|
5158
5651
|
async componentWillLoad() {
|
|
5159
|
-
this.
|
|
5652
|
+
this.translations = await Translations.getValues();
|
|
5653
|
+
this.titleMesage = this.translations.IdCaptureValues.IDPoseMapping;
|
|
5160
5654
|
//this.videoDemoStyle = this.device.isMobile ? { 'width': window.screen.width + 'px', 'height': window.screen.height + 'px', 'object-fit': 'fill' } : {};
|
|
5161
5655
|
if (!navigator.mediaDevices) {
|
|
5162
5656
|
this.apiErrorEvent.emit({ message: 'This browser does not support webRTC' });
|
|
@@ -5166,7 +5660,7 @@ const IdTilt = class {
|
|
|
5166
5660
|
await this.baseComponent.logStep(FlowSteps.CiTilt, FlowMoments.Initialized);
|
|
5167
5661
|
this.demoVideo.src = IdCaptureValues.IDPoseDemoMapping[IDPose.Tilted];
|
|
5168
5662
|
this.demoVideo.play();
|
|
5169
|
-
await delay(this.
|
|
5663
|
+
await delay(this.translations.GlobalValues.VideoLenght);
|
|
5170
5664
|
this.showDemo = false;
|
|
5171
5665
|
this.openCamera();
|
|
5172
5666
|
}
|
|
@@ -5208,7 +5702,7 @@ const IdTilt = class {
|
|
|
5208
5702
|
if (this.verified)
|
|
5209
5703
|
return;
|
|
5210
5704
|
this.verified = true;
|
|
5211
|
-
this.titleMesage = this.
|
|
5705
|
+
this.titleMesage = this.translations.IdCaptureValues.Loading;
|
|
5212
5706
|
this.closeCamera();
|
|
5213
5707
|
this.showDemo = true;
|
|
5214
5708
|
this.demoVideo.src = 'https://ekyc.blob.core.windows.net/$web/animations/uploading_id.mp4';
|
|
@@ -5230,7 +5724,7 @@ const IdTilt = class {
|
|
|
5230
5724
|
let titleClass = this.verified ? 'color-black-2 text-center' : 'color-white text-center';
|
|
5231
5725
|
//let videoClass = this.device.isMobile ? '' : 'video-demo';
|
|
5232
5726
|
let bgDemo = this.verified ? 'container' : 'container bg-black';
|
|
5233
|
-
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.
|
|
5727
|
+
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.translations.GlobalValues.FooterText)))));
|
|
5234
5728
|
}
|
|
5235
5729
|
get component() { return getElement(this); }
|
|
5236
5730
|
};
|
|
@@ -5302,7 +5796,7 @@ function v4(options, buf, offset) {
|
|
|
5302
5796
|
}
|
|
5303
5797
|
|
|
5304
5798
|
const name = "@ekyc_qoobiss/qbs-ect-cmp";
|
|
5305
|
-
const version$1 = "3.6.
|
|
5799
|
+
const version$1 = "3.6.29";
|
|
5306
5800
|
const description = "Person Identification Component";
|
|
5307
5801
|
const main = "./dist/index.cjs.js";
|
|
5308
5802
|
const module = "./dist/index.js";
|
|
@@ -5622,6 +6116,7 @@ const LandingValidation = class {
|
|
|
5622
6116
|
}
|
|
5623
6117
|
async componentWillLoad() {
|
|
5624
6118
|
Events.flowStarted();
|
|
6119
|
+
this.translations = await Translations.getValues();
|
|
5625
6120
|
this.baseComponent.apiCall = new ApiCall();
|
|
5626
6121
|
this.buttonDisabled = false;
|
|
5627
6122
|
await this.initRequest();
|
|
@@ -5633,10 +6128,10 @@ const LandingValidation = class {
|
|
|
5633
6128
|
}
|
|
5634
6129
|
async initRequest() {
|
|
5635
6130
|
if (state.hasIdBack) {
|
|
5636
|
-
this.warningText = this.
|
|
6131
|
+
this.warningText = this.translations.LandingValues.WarningMd;
|
|
5637
6132
|
}
|
|
5638
6133
|
else {
|
|
5639
|
-
this.warningText = this.
|
|
6134
|
+
this.warningText = this.translations.LandingValues.Warning;
|
|
5640
6135
|
}
|
|
5641
6136
|
}
|
|
5642
6137
|
async startFlow() {
|
|
@@ -5679,7 +6174,7 @@ const LandingValidation = class {
|
|
|
5679
6174
|
}
|
|
5680
6175
|
}
|
|
5681
6176
|
render() {
|
|
5682
|
-
return (h("div", { class: "container" }, h("div", { class: "row" }, h("div", null, h("h1", { class: "text-center" }, this.
|
|
6177
|
+
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: infoSvg })))), 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: deviceSvg })), h("h3", null, this.translations.LandingValues.DeviceInfo)), h("div", { class: "img-text" }, h("div", { class: "bg-img" }, h("img", { src: validationSvg })), 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: !state.initialised || 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))))));
|
|
5683
6178
|
}
|
|
5684
6179
|
};
|
|
5685
6180
|
LandingValidation.style = landingValidationCss;
|
|
@@ -8579,8 +9074,9 @@ const MobileRedirect = class {
|
|
|
8579
9074
|
}
|
|
8580
9075
|
async componentWillLoad() {
|
|
8581
9076
|
Events.flowStarted();
|
|
8582
|
-
this.
|
|
8583
|
-
this.
|
|
9077
|
+
this.translations = await Translations.getValues();
|
|
9078
|
+
this.infoTextTop = this.translations.MobileRedirectValues.InfoTop;
|
|
9079
|
+
this.infoTextBottom = this.translations.MobileRedirectValues.InfoBottom;
|
|
8584
9080
|
let envUri = state.environment == 'QA' ? 'test' : 'ect';
|
|
8585
9081
|
let baseUri = state.hasIdBack ? 'https://onmd.id-kyc.com/' : 'https://onro.id-kyc.com/';
|
|
8586
9082
|
this.redirectLink = baseUri + envUri + '/mobileredirect?redirectId=' + state.redirectId;
|
|
@@ -8614,12 +9110,12 @@ const MobileRedirect = class {
|
|
|
8614
9110
|
this.apiErrorEvent.emit({ message: 'No order was started for this process.' });
|
|
8615
9111
|
}
|
|
8616
9112
|
if (this.orderStatus == OrderStatuses.Capturing) {
|
|
8617
|
-
this.infoTextTop = this.
|
|
9113
|
+
this.infoTextTop = this.translations.MobileRedirectValues.InfoWaiting;
|
|
8618
9114
|
this.waitingMobile = true;
|
|
8619
9115
|
}
|
|
8620
9116
|
if (this.orderStatus == OrderStatuses.Aborted) {
|
|
8621
9117
|
this.waitingMobile = false;
|
|
8622
|
-
this.infoTextTop = this.
|
|
9118
|
+
this.infoTextTop = this.translations.MobileRedirectValues.InfoAborted;
|
|
8623
9119
|
Events.flowAborted();
|
|
8624
9120
|
}
|
|
8625
9121
|
}
|
|
@@ -8631,7 +9127,7 @@ const MobileRedirect = class {
|
|
|
8631
9127
|
return;
|
|
8632
9128
|
}
|
|
8633
9129
|
this.waitingMobile = true;
|
|
8634
|
-
this.infoTextTop = this.
|
|
9130
|
+
this.infoTextTop = this.translations.MobileRedirectValues.InfoWaiting;
|
|
8635
9131
|
try {
|
|
8636
9132
|
await this.baseComponent.apiCall.SendLink(this.redirectLink, this.contact);
|
|
8637
9133
|
}
|
|
@@ -8649,7 +9145,7 @@ const MobileRedirect = class {
|
|
|
8649
9145
|
ev.target.value = this.contact;
|
|
8650
9146
|
}
|
|
8651
9147
|
render() {
|
|
8652
|
-
return (h("div", { class: "container" }, h("div", { class: "row" }, h("div", { hidden: this.waitingMobile }, h("div", { class: "text-center" }, h("p", { class: "font-size-2" }, this.infoTextTop)), h("div", { class: "qr-canvas align-center" }, h("img", { src: this.qrCode })), h("div", { class: "text-center" }, h("p", { class: "font-size-2" }, this.infoTextBottom)), h("div", { class: "input-container mb-15" }, h("label", { class: "font-size-18 mb-1 color-red", hidden: this.invalidValue == false }, h("b", null, this.
|
|
9148
|
+
return (h("div", { class: "container" }, h("div", { class: "row" }, h("div", { hidden: this.waitingMobile }, h("div", { class: "text-center" }, h("p", { class: "font-size-2" }, this.infoTextTop)), h("div", { class: "qr-canvas align-center" }, h("img", { src: this.qrCode })), h("div", { class: "text-center" }, h("p", { class: "font-size-2" }, this.infoTextBottom)), h("div", { class: "input-container mb-15" }, h("label", { class: "font-size-18 mb-1 color-red", hidden: this.invalidValue == false }, h("b", null, this.translations.MobileRedirectValues.Validation)), h("input", { type: "text", id: "codeInput", class: "main-input", disabled: this.prefilledPhone, value: this.contact, onInput: ev => this.handleChangeContact(ev) })), h("div", { class: "pos-relative" }, h("div", { class: "btn-buletin" }, h("button", { class: "main-button", onClick: () => this.buttonClick() }, "Trimite"), h("p", { class: "main-text font-size-18 text-right mb-0" }, this.translations.GlobalValues.FooterText)))), h("div", { hidden: this.waitingMobile == false }, h("div", { class: "text-center" }, h("p", { class: "font-size-2" }, this.infoTextTop))))));
|
|
8653
9149
|
}
|
|
8654
9150
|
};
|
|
8655
9151
|
MobileRedirect.style = mobileRedirectCss;
|
|
@@ -8985,8 +9481,9 @@ const SelfieCapture = class {
|
|
|
8985
9481
|
this.captureHeight = height - Math.round((window.screen.height - height) / 2);
|
|
8986
9482
|
this.captureWidth = Math.round((this.captureHeight * 9) / 16);
|
|
8987
9483
|
}
|
|
8988
|
-
componentWillLoad() {
|
|
8989
|
-
this.
|
|
9484
|
+
async componentWillLoad() {
|
|
9485
|
+
this.translations = await Translations.getValues();
|
|
9486
|
+
this.titleMesage = this.translations.SelfieCaptureValues.Title;
|
|
8990
9487
|
//this.videoDemoStyle = this.device.isMobile ? { 'width': window.screen.width + 'px', 'height': window.screen.height + 'px', 'object-fit': 'fill' } : {};
|
|
8991
9488
|
if (!navigator.mediaDevices) {
|
|
8992
9489
|
this.apiErrorEvent.emit({ message: 'This browser does not support webRTC' });
|
|
@@ -8996,7 +9493,7 @@ const SelfieCapture = class {
|
|
|
8996
9493
|
await this.baseComponent.logStep(FlowSteps.SelfieCapture, FlowMoments.Initialized);
|
|
8997
9494
|
this.demoVideo.src = SelfieCaptureValues.FacePoseDemoMapping[FacePose.Main];
|
|
8998
9495
|
this.demoVideo.play();
|
|
8999
|
-
await delay(this.
|
|
9496
|
+
await delay(this.translations.GlobalValues.VideoLenght);
|
|
9000
9497
|
this.demoEnded = true;
|
|
9001
9498
|
this.openCamera();
|
|
9002
9499
|
}
|
|
@@ -9037,7 +9534,7 @@ const SelfieCapture = class {
|
|
|
9037
9534
|
if (this.verified)
|
|
9038
9535
|
return;
|
|
9039
9536
|
this.verified = true;
|
|
9040
|
-
this.titleMesage = this.
|
|
9537
|
+
this.titleMesage = this.translations.SelfieCaptureValues.Loading;
|
|
9041
9538
|
this.closeCamera();
|
|
9042
9539
|
this.demoEnded = false;
|
|
9043
9540
|
this.demoVideo.src = this.uploadingLink;
|
|
@@ -9059,7 +9556,7 @@ const SelfieCapture = class {
|
|
|
9059
9556
|
let titleClass = this.verified ? 'color-black-2 text-center' : 'color-white text-center';
|
|
9060
9557
|
//let videoClass = this.device.isMobile ? '' : 'video-demo';
|
|
9061
9558
|
let bgDemo = this.verified ? 'container' : 'container bg-black';
|
|
9062
|
-
return (h("div", { class: bgDemo }, h("div", { class: "container-video" }, h("div", { hidden: this.demoEnded }, h("video", { id: "howtoSelfie", class: "video-demo", playsinline: true, ref: el => (this.demoVideo = el) }, h("source", { type: "video/mp4" }))), h("div", { hidden: this.demoEnded == false }, h("div", { hidden: this.verified }, h("div", { class: "video-capture" }, h("div", { style: cameraStyle }, h("camera-comp", { "capture-mode": "selfie" }))))), h("div", { class: "capture-title" }, h("h1", { class: titleClass }, this.titleMesage), h("p", { class: "main-text font-size-18 text-right mb-0" }, this.
|
|
9559
|
+
return (h("div", { class: bgDemo }, h("div", { class: "container-video" }, h("div", { hidden: this.demoEnded }, h("video", { id: "howtoSelfie", class: "video-demo", playsinline: true, ref: el => (this.demoVideo = el) }, h("source", { type: "video/mp4" }))), h("div", { hidden: this.demoEnded == false }, h("div", { hidden: this.verified }, h("div", { class: "video-capture" }, h("div", { style: cameraStyle }, h("camera-comp", { "capture-mode": "selfie" }))))), 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)))));
|
|
9063
9560
|
}
|
|
9064
9561
|
get component() { return getElement(this); }
|
|
9065
9562
|
};
|
|
@@ -9100,8 +9597,9 @@ const SelfieTilt = class {
|
|
|
9100
9597
|
this.captureHeight = height - Math.round((window.screen.height - height) / 2);
|
|
9101
9598
|
this.captureWidth = Math.round((this.captureHeight * 9) / 16);
|
|
9102
9599
|
}
|
|
9103
|
-
componentWillLoad() {
|
|
9104
|
-
this.
|
|
9600
|
+
async componentWillLoad() {
|
|
9601
|
+
this.translations = await Translations.getValues();
|
|
9602
|
+
this.titleMesage = this.translations.SelfieCaptureValues.Title;
|
|
9105
9603
|
//this.videoDemoStyle = this.device.isMobile ? { 'width': window.screen.width + 'px', 'height': window.screen.height + 'px', 'object-fit': 'fill' } : {};
|
|
9106
9604
|
if (!navigator.mediaDevices) {
|
|
9107
9605
|
this.apiErrorEvent.emit({ message: 'This browser does not support webRTC' });
|
|
@@ -9110,11 +9608,11 @@ const SelfieTilt = class {
|
|
|
9110
9608
|
async componentDidLoad() {
|
|
9111
9609
|
this.mainStream = Stream.getInstance(VerificationMode.Tilt);
|
|
9112
9610
|
await this.baseComponent.logStep(FlowSteps.SelfieTilt, FlowMoments.Initialized);
|
|
9113
|
-
this.titleMesage = this.
|
|
9611
|
+
this.titleMesage = this.translations.SelfieCaptureValues.FacePoseMapping[Object.values(FacePose).indexOf(this.mainStream.facePose)];
|
|
9114
9612
|
this.demoEnded = false;
|
|
9115
9613
|
this.demoVideo.src = SelfieCaptureValues.FacePoseDemoMapping[this.mainStream.facePose];
|
|
9116
9614
|
this.demoVideo.play();
|
|
9117
|
-
await delay(this.
|
|
9615
|
+
await delay(this.translations.GlobalValues.VideoLenght);
|
|
9118
9616
|
this.demoEnded = true;
|
|
9119
9617
|
this.openCamera();
|
|
9120
9618
|
}
|
|
@@ -9154,7 +9652,7 @@ const SelfieTilt = class {
|
|
|
9154
9652
|
if (this.verified)
|
|
9155
9653
|
return;
|
|
9156
9654
|
this.verified = true;
|
|
9157
|
-
this.titleMesage = this.
|
|
9655
|
+
this.titleMesage = this.translations.SelfieCaptureValues.Loading;
|
|
9158
9656
|
this.closeCamera();
|
|
9159
9657
|
this.demoEnded = false;
|
|
9160
9658
|
this.demoVideo.src = this.uploadingLink;
|
|
@@ -9176,7 +9674,7 @@ const SelfieTilt = class {
|
|
|
9176
9674
|
let titleClass = this.verified ? 'color-black-2 text-center' : 'color-white text-center';
|
|
9177
9675
|
//let videoClass = this.device.isMobile ? '' : 'video-demo';
|
|
9178
9676
|
let bgDemo = this.verified ? 'container' : 'container bg-black';
|
|
9179
|
-
return (h("div", { class: bgDemo }, h("div", { class: "container-video" }, h("div", { hidden: this.demoEnded }, h("video", { id: "howtoSelfie", class: "video-demo", playsinline: true, ref: el => (this.demoVideo = el) }, h("source", { type: "video/mp4" }))), h("div", { hidden: this.demoEnded == false }, h("div", { hidden: this.verified }, h("div", { class: "video-capture" }, h("div", { style: cameraStyle }, h("camera-comp", { "capture-mode": "selfie" }))))), h("div", { class: "capture-title" }, h("h1", { class: titleClass }, this.titleMesage), h("p", { class: "main-text font-size-18 text-right mb-0" }, this.
|
|
9677
|
+
return (h("div", { class: bgDemo }, h("div", { class: "container-video" }, h("div", { hidden: this.demoEnded }, h("video", { id: "howtoSelfie", class: "video-demo", playsinline: true, ref: el => (this.demoVideo = el) }, h("source", { type: "video/mp4" }))), h("div", { hidden: this.demoEnded == false }, h("div", { hidden: this.verified }, h("div", { class: "video-capture" }, h("div", { style: cameraStyle }, h("camera-comp", { "capture-mode": "selfie" }))))), 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)))));
|
|
9180
9678
|
}
|
|
9181
9679
|
get component() { return getElement(this); }
|
|
9182
9680
|
};
|
|
@@ -9229,11 +9727,12 @@ const SmsCodeValidation = class {
|
|
|
9229
9727
|
async disconnectedCallback() {
|
|
9230
9728
|
await this.baseComponent.finalize();
|
|
9231
9729
|
}
|
|
9232
|
-
componentWillRender() {
|
|
9730
|
+
async componentWillRender() {
|
|
9731
|
+
this.translations = await Translations.getValues();
|
|
9233
9732
|
if (state.flowStatus == FlowStatus.PHONE) {
|
|
9234
|
-
this.title = this.
|
|
9235
|
-
this.details = this.
|
|
9236
|
-
this.buttonText = this.
|
|
9733
|
+
this.title = this.translations.PhoneValidationValues.Title;
|
|
9734
|
+
this.details = this.translations.PhoneValidationValues.Description;
|
|
9735
|
+
this.buttonText = this.translations.PhoneValidationValues.Button;
|
|
9237
9736
|
if (state.phoneNumber && state.phoneNumber != '') {
|
|
9238
9737
|
this.phoneNumber = state.phoneNumber;
|
|
9239
9738
|
this.prefilledPhone = true;
|
|
@@ -9241,9 +9740,9 @@ const SmsCodeValidation = class {
|
|
|
9241
9740
|
}
|
|
9242
9741
|
}
|
|
9243
9742
|
if (state.flowStatus == FlowStatus.CODE || state.flowStatus == FlowStatus.CODEERROR) {
|
|
9244
|
-
this.title = this.
|
|
9245
|
-
this.details = this.
|
|
9246
|
-
this.buttonText = this.
|
|
9743
|
+
this.title = this.translations.CodeValidationValues.Title;
|
|
9744
|
+
this.details = this.translations.CodeValidationValues.Description;
|
|
9745
|
+
this.buttonText = this.translations.CodeValidationValues.Button;
|
|
9247
9746
|
}
|
|
9248
9747
|
}
|
|
9249
9748
|
async componentDidLoad() {
|
|
@@ -9269,15 +9768,15 @@ const SmsCodeValidation = class {
|
|
|
9269
9768
|
let inputBlock;
|
|
9270
9769
|
let errorBlock;
|
|
9271
9770
|
if (state.flowStatus == FlowStatus.CODEERROR) {
|
|
9272
|
-
errorBlock = h("p", { class: "main-text font-size-18 mt-15 color-red text-center" }, this.
|
|
9771
|
+
errorBlock = h("p", { class: "main-text font-size-18 mt-15 color-red text-center" }, this.translations.CodeValidationValues.Error);
|
|
9273
9772
|
}
|
|
9274
9773
|
if (state.flowStatus == FlowStatus.PHONE) {
|
|
9275
|
-
inputBlock = (h("div", { class: "input-container mb-15" }, h("label", { class: "font-size-18 mb-1" }, h("b", null, this.
|
|
9774
|
+
inputBlock = (h("div", { class: "input-container mb-15" }, h("label", { class: "font-size-18 mb-1" }, h("b", null, this.translations.PhoneValidationValues.Label)), h("input", { type: "tel", id: "phoneInput", class: "main-input", disabled: this.prefilledPhone, onInput: ev => this.handleChangePhone(ev), value: this.phoneNumber })));
|
|
9276
9775
|
}
|
|
9277
9776
|
else {
|
|
9278
9777
|
inputBlock = (h("div", { class: "input-container mb-15" }, h("input", { type: "text", id: "codeInput", class: "main-input", onInput: ev => this.handleChangeCode(ev), value: this.code })));
|
|
9279
9778
|
}
|
|
9280
|
-
return (h("div", { class: "container" }, h("div", { class: "row row-validare" }, h("div", null, h("h1", { class: "text-center" }, this.title), errorBlock == null ? h("p", { class: "main-text font-size-2 mt-15 mb-20 text-center" }, this.details) : errorBlock), inputBlock, h("div", { class: "pos-relative show-bottom" }, h("div", { class: "btn-buletin" }, h("button", { id: "action", disabled: !this.canSend, class: "main-button", onClick: () => this.doAction() }, this.buttonText), h("p", { class: "main-text font-size-18 text-right mb-0" }, this.
|
|
9779
|
+
return (h("div", { class: "container" }, h("div", { class: "row row-validare" }, h("div", null, h("h1", { class: "text-center" }, this.title), errorBlock == null ? h("p", { class: "main-text font-size-2 mt-15 mb-20 text-center" }, this.details) : errorBlock), inputBlock, h("div", { class: "pos-relative show-bottom" }, h("div", { class: "btn-buletin" }, h("button", { id: "action", disabled: !this.canSend, class: "main-button", onClick: () => this.doAction() }, this.buttonText), h("p", { class: "main-text font-size-18 text-right mb-0" }, this.translations.GlobalValues.FooterText))))));
|
|
9281
9780
|
}
|
|
9282
9781
|
};
|
|
9283
9782
|
SmsCodeValidation.style = smsCodeValidationCss;
|