@ekyc_qoobiss/qbs-ect-cmp 3.2.4 → 3.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/agreement-check_18.cjs.entry.js +14 -4
- package/dist/collection/components/identification-component/identification-component.js +10 -2
- package/dist/collection/helpers/ApiCall.js +1 -1
- package/dist/collection/helpers/DeviceDetection.js +2 -0
- package/dist/collection/models/IDevice.js +1 -0
- package/dist/esm/agreement-check_18.entry.js +14 -4
- package/dist/qbs-ect-cmp/{p-9c12a757.entry.js → p-419e65b4.entry.js} +2 -2
- package/dist/qbs-ect-cmp/qbs-ect-cmp.esm.js +1 -1
- package/dist/types/models/IDevice.d.ts +1 -0
- package/package.json +1 -1
|
@@ -542,7 +542,7 @@ class ApiCall {
|
|
|
542
542
|
let data = {
|
|
543
543
|
requestId: state.requestId,
|
|
544
544
|
action: FlowStatus[state.flowStatus],
|
|
545
|
-
message:
|
|
545
|
+
message: JSON.stringify({ error, context }),
|
|
546
546
|
};
|
|
547
547
|
let result = await this.post(this.urls.AddLog, JSON.stringify(data));
|
|
548
548
|
return result.saved;
|
|
@@ -612,6 +612,7 @@ var Browser;
|
|
|
612
612
|
Browser["Chrome"] = "chrome";
|
|
613
613
|
Browser["Firefox"] = "firefox";
|
|
614
614
|
Browser["Safari"] = "safari";
|
|
615
|
+
Browser["Mi"] = "mi";
|
|
615
616
|
Browser["Unknown"] = "unknown";
|
|
616
617
|
})(Browser || (Browser = {}));
|
|
617
618
|
|
|
@@ -676,6 +677,8 @@ class DeviceDetection {
|
|
|
676
677
|
return Browser.Firefox;
|
|
677
678
|
else if (!isChrome && /safari/i.test(navigator.userAgent))
|
|
678
679
|
return Browser.Safari;
|
|
680
|
+
else if (!isChrome && / Mi /i.test(navigator.userAgent))
|
|
681
|
+
return Browser.Mi;
|
|
679
682
|
else
|
|
680
683
|
return Browser.Unknown;
|
|
681
684
|
}
|
|
@@ -6310,7 +6313,7 @@ function v4(options, buf, offset) {
|
|
|
6310
6313
|
}
|
|
6311
6314
|
|
|
6312
6315
|
const name = "@ekyc_qoobiss/qbs-ect-cmp";
|
|
6313
|
-
const version$1 = "3.
|
|
6316
|
+
const version$1 = "3.3.1";
|
|
6314
6317
|
const description = "Person Identification Component";
|
|
6315
6318
|
const main = "./dist/index.cjs.js";
|
|
6316
6319
|
const module$1 = "./dist/index.js";
|
|
@@ -6468,7 +6471,10 @@ const IdentificationComponent = class {
|
|
|
6468
6471
|
else {
|
|
6469
6472
|
this.errorTitle = data;
|
|
6470
6473
|
}
|
|
6471
|
-
|
|
6474
|
+
try {
|
|
6475
|
+
await this.baseComponent.apiCall.AddLog(apiLogData, getLogMessage(this.order_id, this.redirect_id, this.token));
|
|
6476
|
+
}
|
|
6477
|
+
catch (_c) { }
|
|
6472
6478
|
Events.flowError(data);
|
|
6473
6479
|
state.flowStatus = FlowStatus.ERROREND;
|
|
6474
6480
|
}
|
|
@@ -6574,10 +6580,14 @@ const IdentificationComponent = class {
|
|
|
6574
6580
|
}
|
|
6575
6581
|
try {
|
|
6576
6582
|
if (state.debug)
|
|
6577
|
-
this.baseComponent.apiCall.AddLog('
|
|
6583
|
+
this.baseComponent.apiCall.AddLog({ phase: 'debug mode' }, this.logInit);
|
|
6578
6584
|
}
|
|
6579
6585
|
catch (_a) { }
|
|
6580
6586
|
try {
|
|
6587
|
+
if (state.device.browser == Browser.Mi) {
|
|
6588
|
+
this.apiErrorEmitter('Mi Browser nu este acceptat. Va rugam utilizati Chrome.', 'Request Initialisation RequestId:' + state.requestId + ' RedirectId:' + state.redirectId);
|
|
6589
|
+
return;
|
|
6590
|
+
}
|
|
6581
6591
|
if (!state.device.isMobile && state.redirectId == '') {
|
|
6582
6592
|
state.redirectId = v4();
|
|
6583
6593
|
this.redirect_id = state.redirectId;
|
|
@@ -8,6 +8,7 @@ import * as uuid from 'uuid';
|
|
|
8
8
|
import packageJson from '../../../package.json';
|
|
9
9
|
import { getLogMessage } from '../../utils/utils';
|
|
10
10
|
import { BaseComponent } from '../base-component';
|
|
11
|
+
import { Browser } from '../../models/IDevice';
|
|
11
12
|
export class IdentificationComponent {
|
|
12
13
|
async onTokenChange(newValue, _oldValue) {
|
|
13
14
|
if (store.debug)
|
|
@@ -96,7 +97,10 @@ export class IdentificationComponent {
|
|
|
96
97
|
else {
|
|
97
98
|
this.errorTitle = data;
|
|
98
99
|
}
|
|
99
|
-
|
|
100
|
+
try {
|
|
101
|
+
await this.baseComponent.apiCall.AddLog(apiLogData, getLogMessage(this.order_id, this.redirect_id, this.token));
|
|
102
|
+
}
|
|
103
|
+
catch (_c) { }
|
|
100
104
|
Events.flowError(data);
|
|
101
105
|
store.flowStatus = FlowStatus.ERROREND;
|
|
102
106
|
}
|
|
@@ -201,10 +205,14 @@ export class IdentificationComponent {
|
|
|
201
205
|
}
|
|
202
206
|
try {
|
|
203
207
|
if (store.debug)
|
|
204
|
-
this.baseComponent.apiCall.AddLog('
|
|
208
|
+
this.baseComponent.apiCall.AddLog({ phase: 'debug mode' }, this.logInit);
|
|
205
209
|
}
|
|
206
210
|
catch (_a) { }
|
|
207
211
|
try {
|
|
212
|
+
if (store.device.browser == Browser.Mi) {
|
|
213
|
+
this.apiErrorEmitter('Mi Browser nu este acceptat. Va rugam utilizati Chrome.', 'Request Initialisation RequestId:' + store.requestId + ' RedirectId:' + store.redirectId);
|
|
214
|
+
return;
|
|
215
|
+
}
|
|
208
216
|
if (!store.device.isMobile && store.redirectId == '') {
|
|
209
217
|
store.redirectId = uuid.v4();
|
|
210
218
|
this.redirect_id = store.redirectId;
|
|
@@ -116,7 +116,7 @@ export class ApiCall {
|
|
|
116
116
|
let data = {
|
|
117
117
|
requestId: store.requestId,
|
|
118
118
|
action: FlowStatus[store.flowStatus],
|
|
119
|
-
message:
|
|
119
|
+
message: JSON.stringify({ error, context }),
|
|
120
120
|
};
|
|
121
121
|
let result = await this.post(this.urls.AddLog, JSON.stringify(data));
|
|
122
122
|
return result.saved;
|
|
@@ -60,6 +60,8 @@ export class DeviceDetection {
|
|
|
60
60
|
return Browser.Firefox;
|
|
61
61
|
else if (!isChrome && /safari/i.test(navigator.userAgent))
|
|
62
62
|
return Browser.Safari;
|
|
63
|
+
else if (!isChrome && / Mi /i.test(navigator.userAgent))
|
|
64
|
+
return Browser.Mi;
|
|
63
65
|
else
|
|
64
66
|
return Browser.Unknown;
|
|
65
67
|
}
|
|
@@ -538,7 +538,7 @@ class ApiCall {
|
|
|
538
538
|
let data = {
|
|
539
539
|
requestId: state.requestId,
|
|
540
540
|
action: FlowStatus[state.flowStatus],
|
|
541
|
-
message:
|
|
541
|
+
message: JSON.stringify({ error, context }),
|
|
542
542
|
};
|
|
543
543
|
let result = await this.post(this.urls.AddLog, JSON.stringify(data));
|
|
544
544
|
return result.saved;
|
|
@@ -608,6 +608,7 @@ var Browser;
|
|
|
608
608
|
Browser["Chrome"] = "chrome";
|
|
609
609
|
Browser["Firefox"] = "firefox";
|
|
610
610
|
Browser["Safari"] = "safari";
|
|
611
|
+
Browser["Mi"] = "mi";
|
|
611
612
|
Browser["Unknown"] = "unknown";
|
|
612
613
|
})(Browser || (Browser = {}));
|
|
613
614
|
|
|
@@ -672,6 +673,8 @@ class DeviceDetection {
|
|
|
672
673
|
return Browser.Firefox;
|
|
673
674
|
else if (!isChrome && /safari/i.test(navigator.userAgent))
|
|
674
675
|
return Browser.Safari;
|
|
676
|
+
else if (!isChrome && / Mi /i.test(navigator.userAgent))
|
|
677
|
+
return Browser.Mi;
|
|
675
678
|
else
|
|
676
679
|
return Browser.Unknown;
|
|
677
680
|
}
|
|
@@ -6306,7 +6309,7 @@ function v4(options, buf, offset) {
|
|
|
6306
6309
|
}
|
|
6307
6310
|
|
|
6308
6311
|
const name = "@ekyc_qoobiss/qbs-ect-cmp";
|
|
6309
|
-
const version$1 = "3.
|
|
6312
|
+
const version$1 = "3.3.1";
|
|
6310
6313
|
const description = "Person Identification Component";
|
|
6311
6314
|
const main = "./dist/index.cjs.js";
|
|
6312
6315
|
const module = "./dist/index.js";
|
|
@@ -6464,7 +6467,10 @@ const IdentificationComponent = class {
|
|
|
6464
6467
|
else {
|
|
6465
6468
|
this.errorTitle = data;
|
|
6466
6469
|
}
|
|
6467
|
-
|
|
6470
|
+
try {
|
|
6471
|
+
await this.baseComponent.apiCall.AddLog(apiLogData, getLogMessage(this.order_id, this.redirect_id, this.token));
|
|
6472
|
+
}
|
|
6473
|
+
catch (_c) { }
|
|
6468
6474
|
Events.flowError(data);
|
|
6469
6475
|
state.flowStatus = FlowStatus.ERROREND;
|
|
6470
6476
|
}
|
|
@@ -6570,10 +6576,14 @@ const IdentificationComponent = class {
|
|
|
6570
6576
|
}
|
|
6571
6577
|
try {
|
|
6572
6578
|
if (state.debug)
|
|
6573
|
-
this.baseComponent.apiCall.AddLog('
|
|
6579
|
+
this.baseComponent.apiCall.AddLog({ phase: 'debug mode' }, this.logInit);
|
|
6574
6580
|
}
|
|
6575
6581
|
catch (_a) { }
|
|
6576
6582
|
try {
|
|
6583
|
+
if (state.device.browser == Browser.Mi) {
|
|
6584
|
+
this.apiErrorEmitter('Mi Browser nu este acceptat. Va rugam utilizati Chrome.', 'Request Initialisation RequestId:' + state.requestId + ' RedirectId:' + state.redirectId);
|
|
6585
|
+
return;
|
|
6586
|
+
}
|
|
6577
6587
|
if (!state.device.isMobile && state.redirectId == '') {
|
|
6578
6588
|
state.redirectId = v4();
|
|
6579
6589
|
this.redirect_id = state.redirectId;
|