@ekyc_qoobiss/qbs-ect-cmp 2.0.7 → 2.0.9

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.
@@ -2300,11 +2300,17 @@ class FaceML5Detector {
2300
2300
  // this.presentedFacePose = FacePose.TiltRight;
2301
2301
  }
2302
2302
  */
2303
- if (this.presentedFacePose != null && this.presentedFacePose == this.requestedFacePose) {
2303
+ // if (this.presentedFacePose != null && this.presentedFacePose == this.requestedFacePose) {
2304
+ // this.validFacePose = true;
2305
+ // await this.drawFrame('green', true);
2306
+ // this.validFaceFoundAgain = true;
2307
+ // //this.stream.changeFacePose();
2308
+ // }
2309
+ if (this.requestedFacePose) {
2310
+ await this.delay(3000);
2304
2311
  this.validFacePose = true;
2305
- await this.drawFrame('green', true);
2306
2312
  this.validFaceFoundAgain = true;
2307
- //this.stream.changeFacePose();
2313
+ await this.drawFrame('green', true);
2308
2314
  }
2309
2315
  }
2310
2316
  // //check if face is centered again
@@ -6106,6 +6112,7 @@ const IdentificationComponent = class {
6106
6112
  }
6107
6113
  constructor(hostRef) {
6108
6114
  index.registerInstance(this, hostRef);
6115
+ this.logInit = {};
6109
6116
  this.token = undefined;
6110
6117
  this.order_id = undefined;
6111
6118
  this.api_url = undefined;
@@ -6124,11 +6131,12 @@ const IdentificationComponent = class {
6124
6131
  if (this.env && this.env != '') {
6125
6132
  state.environment = this.env;
6126
6133
  }
6127
- this.logInit = {
6128
- store_values: { request_id: state.requestId, redirect_id: state.redirectId, token: state.token },
6129
- session_values: { request_id: sessionStorage.getItem(SessionKeys.RequestIdKey), token: sessionStorage.getItem(SessionKeys.TokenKey) },
6130
- paramete_values: { request_id: this.order_id, redirect_id: this.redirect_id, token: this.token },
6131
- };
6134
+ if (state.debug)
6135
+ this.logInit = {
6136
+ store_values: { request_id: state.requestId, redirect_id: state.redirectId, token: state.token },
6137
+ session_values: { request_id: sessionStorage.getItem(SessionKeys.RequestIdKey), token: sessionStorage.getItem(SessionKeys.TokenKey) },
6138
+ paramete_values: { request_id: this.order_id, redirect_id: this.redirect_id, token: this.token },
6139
+ };
6132
6140
  if (this.token) {
6133
6141
  if (state.debug)
6134
6142
  console.log('Store Token set with property value: ' + this.token);
@@ -6200,7 +6208,8 @@ const IdentificationComponent = class {
6200
6208
  return;
6201
6209
  }
6202
6210
  try {
6203
- this.apiCall.AddLog(this.logInit);
6211
+ if (state.debug)
6212
+ this.apiCall.AddLog(this.logInit);
6204
6213
  }
6205
6214
  catch (_a) { }
6206
6215
  try {
@@ -9244,6 +9253,8 @@ const MobileRedirect = class {
9244
9253
  }
9245
9254
  componentWillRender() { }
9246
9255
  async componentDidLoad() {
9256
+ Events.init(window);
9257
+ Events.flowStarted();
9247
9258
  await this.delay(5000);
9248
9259
  await this.checkStatus();
9249
9260
  while (this.orderStatus == OrderStatuses.Capturing || this.orderStatus == OrderStatuses.Waiting) {
@@ -9267,7 +9278,6 @@ const MobileRedirect = class {
9267
9278
  if (this.orderStatus == OrderStatuses.Aborted) {
9268
9279
  this.waitingMobile = false;
9269
9280
  this.infoTextTop = MobileRedirectValues.InfoAborted;
9270
- Events.init(window);
9271
9281
  Events.flowAborted();
9272
9282
  }
9273
9283
  }
@@ -41,6 +41,8 @@ export class MobileRedirect {
41
41
  }
42
42
  componentWillRender() { }
43
43
  async componentDidLoad() {
44
+ Events.init(window);
45
+ Events.flowStarted();
44
46
  await this.delay(5000);
45
47
  await this.checkStatus();
46
48
  while (this.orderStatus == OrderStatuses.Capturing || this.orderStatus == OrderStatuses.Waiting) {
@@ -64,7 +66,6 @@ export class MobileRedirect {
64
66
  if (this.orderStatus == OrderStatuses.Aborted) {
65
67
  this.waitingMobile = false;
66
68
  this.infoTextTop = MobileRedirectValues.InfoAborted;
67
- Events.init(window);
68
69
  Events.flowAborted();
69
70
  }
70
71
  }
@@ -100,6 +100,7 @@ export class IdentificationComponent {
100
100
  store.flowStatus = FlowStatus.ERROREND;
101
101
  }
102
102
  constructor() {
103
+ this.logInit = {};
103
104
  this.token = undefined;
104
105
  this.order_id = undefined;
105
106
  this.api_url = undefined;
@@ -118,11 +119,12 @@ export class IdentificationComponent {
118
119
  if (this.env && this.env != '') {
119
120
  store.environment = this.env;
120
121
  }
121
- this.logInit = {
122
- store_values: { request_id: store.requestId, redirect_id: store.redirectId, token: store.token },
123
- session_values: { request_id: sessionStorage.getItem(SessionKeys.RequestIdKey), token: sessionStorage.getItem(SessionKeys.TokenKey) },
124
- paramete_values: { request_id: this.order_id, redirect_id: this.redirect_id, token: this.token },
125
- };
122
+ if (store.debug)
123
+ this.logInit = {
124
+ store_values: { request_id: store.requestId, redirect_id: store.redirectId, token: store.token },
125
+ session_values: { request_id: sessionStorage.getItem(SessionKeys.RequestIdKey), token: sessionStorage.getItem(SessionKeys.TokenKey) },
126
+ paramete_values: { request_id: this.order_id, redirect_id: this.redirect_id, token: this.token },
127
+ };
126
128
  if (this.token) {
127
129
  if (store.debug)
128
130
  console.log('Store Token set with property value: ' + this.token);
@@ -194,7 +196,8 @@ export class IdentificationComponent {
194
196
  return;
195
197
  }
196
198
  try {
197
- this.apiCall.AddLog(this.logInit);
199
+ if (store.debug)
200
+ this.apiCall.AddLog(this.logInit);
198
201
  }
199
202
  catch (_a) { }
200
203
  try {
@@ -203,11 +203,17 @@ export class FaceML5Detector {
203
203
  // this.presentedFacePose = FacePose.TiltRight;
204
204
  }
205
205
  */
206
- if (this.presentedFacePose != null && this.presentedFacePose == this.requestedFacePose) {
206
+ // if (this.presentedFacePose != null && this.presentedFacePose == this.requestedFacePose) {
207
+ // this.validFacePose = true;
208
+ // await this.drawFrame('green', true);
209
+ // this.validFaceFoundAgain = true;
210
+ // //this.stream.changeFacePose();
211
+ // }
212
+ if (this.requestedFacePose) {
213
+ await this.delay(3000);
207
214
  this.validFacePose = true;
208
- await this.drawFrame('green', true);
209
215
  this.validFaceFoundAgain = true;
210
- //this.stream.changeFacePose();
216
+ await this.drawFrame('green', true);
211
217
  }
212
218
  }
213
219
  // //check if face is centered again
@@ -2296,11 +2296,17 @@ class FaceML5Detector {
2296
2296
  // this.presentedFacePose = FacePose.TiltRight;
2297
2297
  }
2298
2298
  */
2299
- if (this.presentedFacePose != null && this.presentedFacePose == this.requestedFacePose) {
2299
+ // if (this.presentedFacePose != null && this.presentedFacePose == this.requestedFacePose) {
2300
+ // this.validFacePose = true;
2301
+ // await this.drawFrame('green', true);
2302
+ // this.validFaceFoundAgain = true;
2303
+ // //this.stream.changeFacePose();
2304
+ // }
2305
+ if (this.requestedFacePose) {
2306
+ await this.delay(3000);
2300
2307
  this.validFacePose = true;
2301
- await this.drawFrame('green', true);
2302
2308
  this.validFaceFoundAgain = true;
2303
- //this.stream.changeFacePose();
2309
+ await this.drawFrame('green', true);
2304
2310
  }
2305
2311
  }
2306
2312
  // //check if face is centered again
@@ -6102,6 +6108,7 @@ const IdentificationComponent = class {
6102
6108
  }
6103
6109
  constructor(hostRef) {
6104
6110
  registerInstance(this, hostRef);
6111
+ this.logInit = {};
6105
6112
  this.token = undefined;
6106
6113
  this.order_id = undefined;
6107
6114
  this.api_url = undefined;
@@ -6120,11 +6127,12 @@ const IdentificationComponent = class {
6120
6127
  if (this.env && this.env != '') {
6121
6128
  state.environment = this.env;
6122
6129
  }
6123
- this.logInit = {
6124
- store_values: { request_id: state.requestId, redirect_id: state.redirectId, token: state.token },
6125
- session_values: { request_id: sessionStorage.getItem(SessionKeys.RequestIdKey), token: sessionStorage.getItem(SessionKeys.TokenKey) },
6126
- paramete_values: { request_id: this.order_id, redirect_id: this.redirect_id, token: this.token },
6127
- };
6130
+ if (state.debug)
6131
+ this.logInit = {
6132
+ store_values: { request_id: state.requestId, redirect_id: state.redirectId, token: state.token },
6133
+ session_values: { request_id: sessionStorage.getItem(SessionKeys.RequestIdKey), token: sessionStorage.getItem(SessionKeys.TokenKey) },
6134
+ paramete_values: { request_id: this.order_id, redirect_id: this.redirect_id, token: this.token },
6135
+ };
6128
6136
  if (this.token) {
6129
6137
  if (state.debug)
6130
6138
  console.log('Store Token set with property value: ' + this.token);
@@ -6196,7 +6204,8 @@ const IdentificationComponent = class {
6196
6204
  return;
6197
6205
  }
6198
6206
  try {
6199
- this.apiCall.AddLog(this.logInit);
6207
+ if (state.debug)
6208
+ this.apiCall.AddLog(this.logInit);
6200
6209
  }
6201
6210
  catch (_a) { }
6202
6211
  try {
@@ -9240,6 +9249,8 @@ const MobileRedirect = class {
9240
9249
  }
9241
9250
  componentWillRender() { }
9242
9251
  async componentDidLoad() {
9252
+ Events.init(window);
9253
+ Events.flowStarted();
9243
9254
  await this.delay(5000);
9244
9255
  await this.checkStatus();
9245
9256
  while (this.orderStatus == OrderStatuses.Capturing || this.orderStatus == OrderStatuses.Waiting) {
@@ -9263,7 +9274,6 @@ const MobileRedirect = class {
9263
9274
  if (this.orderStatus == OrderStatuses.Aborted) {
9264
9275
  this.waitingMobile = false;
9265
9276
  this.infoTextTop = MobileRedirectValues.InfoAborted;
9266
- Events.init(window);
9267
9277
  Events.flowAborted();
9268
9278
  }
9269
9279
  }