@ekyc_qoobiss/qbs-ect-cmp 2.1.20 → 2.1.22

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.
@@ -5333,11 +5333,13 @@ const EndRedirect = class {
5333
5333
  async componentDidLoad() {
5334
5334
  Events.init(window);
5335
5335
  Events.flowCompleted();
5336
- try {
5337
- await this.apiCall.AddStep(FlowSteps.End);
5338
- }
5339
- catch (e) {
5340
- this.apiErrorEvent.emit(e);
5336
+ if (state.environment !== 'DEMO') {
5337
+ try {
5338
+ await this.apiCall.AddStep(FlowSteps.End);
5339
+ }
5340
+ catch (e) {
5341
+ this.apiErrorEvent.emit(e);
5342
+ }
5341
5343
  }
5342
5344
  }
5343
5345
  render() {
@@ -6180,7 +6182,7 @@ function v4(options, buf, offset) {
6180
6182
  }
6181
6183
 
6182
6184
  const name = "@ekyc_qoobiss/qbs-ect-cmp";
6183
- const version$1 = "2.1.20";
6185
+ const version$1 = "2.1.22";
6184
6186
  const description = "Person Identification Component";
6185
6187
  const main = "./dist/index.cjs.js";
6186
6188
  const module$1 = "./dist/index.js";
@@ -6439,6 +6441,10 @@ const IdentificationComponent = class {
6439
6441
  if (state.initialised) {
6440
6442
  return;
6441
6443
  }
6444
+ if (state.environment == 'DEMO') {
6445
+ state.initialised = true;
6446
+ return;
6447
+ }
6442
6448
  try {
6443
6449
  if (state.debug)
6444
6450
  this.apiCall.AddLog(this.logInit);
@@ -6462,7 +6468,7 @@ const IdentificationComponent = class {
6462
6468
  }
6463
6469
  render() {
6464
6470
  let currentBlock = index.h("div", null);
6465
- if (this.device.isMobile) {
6471
+ if (this.device.isMobile || state.environment == 'DEMO') {
6466
6472
  if (state.flowStatus == FlowStatus.LANDING) {
6467
6473
  currentBlock = index.h("landing-validation", { device: this.device });
6468
6474
  }
@@ -6539,11 +6545,13 @@ const LandingValidation = class {
6539
6545
  async componentDidLoad() {
6540
6546
  Events.init(window);
6541
6547
  Events.flowStarted();
6542
- try {
6543
- await this.apiCall.AddStep(FlowSteps.Landing);
6544
- }
6545
- catch (e) {
6546
- this.apiErrorEvent.emit(e);
6548
+ if (state.environment !== 'DEMO') {
6549
+ try {
6550
+ await this.apiCall.AddStep(FlowSteps.Landing);
6551
+ }
6552
+ catch (e) {
6553
+ this.apiErrorEvent.emit(e);
6554
+ }
6547
6555
  }
6548
6556
  }
6549
6557
  async initRequest() {
@@ -6557,6 +6565,10 @@ const LandingValidation = class {
6557
6565
  async startFlow() {
6558
6566
  if (state.initialised) {
6559
6567
  this.buttonDisabled = true;
6568
+ if (state.environment === 'DEMO') {
6569
+ state.flowStatus = FlowStatus.COMPLETE;
6570
+ return;
6571
+ }
6560
6572
  if (!(await Cameras.InitCameras(this.device))) {
6561
6573
  if (this.device.isIos)
6562
6574
  sessionStorage.setItem(SessionKeys.RefreshDoneKey, 'false');
@@ -13,11 +13,13 @@ export class EndRedirect {
13
13
  async componentDidLoad() {
14
14
  Events.init(window);
15
15
  Events.flowCompleted();
16
- try {
17
- await this.apiCall.AddStep(FlowSteps.End);
18
- }
19
- catch (e) {
20
- this.apiErrorEvent.emit(e);
16
+ if (store.environment !== 'DEMO') {
17
+ try {
18
+ await this.apiCall.AddStep(FlowSteps.End);
19
+ }
20
+ catch (e) {
21
+ this.apiErrorEvent.emit(e);
22
+ }
21
23
  }
22
24
  }
23
25
  render() {
@@ -25,11 +25,13 @@ export class LandingValidation {
25
25
  async componentDidLoad() {
26
26
  Events.init(window);
27
27
  Events.flowStarted();
28
- try {
29
- await this.apiCall.AddStep(FlowSteps.Landing);
30
- }
31
- catch (e) {
32
- this.apiErrorEvent.emit(e);
28
+ if (store.environment !== 'DEMO') {
29
+ try {
30
+ await this.apiCall.AddStep(FlowSteps.Landing);
31
+ }
32
+ catch (e) {
33
+ this.apiErrorEvent.emit(e);
34
+ }
33
35
  }
34
36
  }
35
37
  async initRequest() {
@@ -43,6 +45,10 @@ export class LandingValidation {
43
45
  async startFlow() {
44
46
  if (store.initialised) {
45
47
  this.buttonDisabled = true;
48
+ if (store.environment === 'DEMO') {
49
+ store.flowStatus = FlowStatus.COMPLETE;
50
+ return;
51
+ }
46
52
  if (!(await Cameras.InitCameras(this.device))) {
47
53
  if (this.device.isIos)
48
54
  sessionStorage.setItem(SessionKeys.RefreshDoneKey, 'false');
@@ -196,6 +196,10 @@ export class IdentificationComponent {
196
196
  if (store.initialised) {
197
197
  return;
198
198
  }
199
+ if (store.environment == 'DEMO') {
200
+ store.initialised = true;
201
+ return;
202
+ }
199
203
  try {
200
204
  if (store.debug)
201
205
  this.apiCall.AddLog(this.logInit);
@@ -219,7 +223,7 @@ export class IdentificationComponent {
219
223
  }
220
224
  render() {
221
225
  let currentBlock = h("div", null);
222
- if (this.device.isMobile) {
226
+ if (this.device.isMobile || store.environment == 'DEMO') {
223
227
  if (store.flowStatus == FlowStatus.LANDING) {
224
228
  currentBlock = h("landing-validation", { device: this.device });
225
229
  }
@@ -5329,11 +5329,13 @@ const EndRedirect = class {
5329
5329
  async componentDidLoad() {
5330
5330
  Events.init(window);
5331
5331
  Events.flowCompleted();
5332
- try {
5333
- await this.apiCall.AddStep(FlowSteps.End);
5334
- }
5335
- catch (e) {
5336
- this.apiErrorEvent.emit(e);
5332
+ if (state.environment !== 'DEMO') {
5333
+ try {
5334
+ await this.apiCall.AddStep(FlowSteps.End);
5335
+ }
5336
+ catch (e) {
5337
+ this.apiErrorEvent.emit(e);
5338
+ }
5337
5339
  }
5338
5340
  }
5339
5341
  render() {
@@ -6176,7 +6178,7 @@ function v4(options, buf, offset) {
6176
6178
  }
6177
6179
 
6178
6180
  const name = "@ekyc_qoobiss/qbs-ect-cmp";
6179
- const version$1 = "2.1.20";
6181
+ const version$1 = "2.1.22";
6180
6182
  const description = "Person Identification Component";
6181
6183
  const main = "./dist/index.cjs.js";
6182
6184
  const module = "./dist/index.js";
@@ -6435,6 +6437,10 @@ const IdentificationComponent = class {
6435
6437
  if (state.initialised) {
6436
6438
  return;
6437
6439
  }
6440
+ if (state.environment == 'DEMO') {
6441
+ state.initialised = true;
6442
+ return;
6443
+ }
6438
6444
  try {
6439
6445
  if (state.debug)
6440
6446
  this.apiCall.AddLog(this.logInit);
@@ -6458,7 +6464,7 @@ const IdentificationComponent = class {
6458
6464
  }
6459
6465
  render() {
6460
6466
  let currentBlock = h("div", null);
6461
- if (this.device.isMobile) {
6467
+ if (this.device.isMobile || state.environment == 'DEMO') {
6462
6468
  if (state.flowStatus == FlowStatus.LANDING) {
6463
6469
  currentBlock = h("landing-validation", { device: this.device });
6464
6470
  }
@@ -6535,11 +6541,13 @@ const LandingValidation = class {
6535
6541
  async componentDidLoad() {
6536
6542
  Events.init(window);
6537
6543
  Events.flowStarted();
6538
- try {
6539
- await this.apiCall.AddStep(FlowSteps.Landing);
6540
- }
6541
- catch (e) {
6542
- this.apiErrorEvent.emit(e);
6544
+ if (state.environment !== 'DEMO') {
6545
+ try {
6546
+ await this.apiCall.AddStep(FlowSteps.Landing);
6547
+ }
6548
+ catch (e) {
6549
+ this.apiErrorEvent.emit(e);
6550
+ }
6543
6551
  }
6544
6552
  }
6545
6553
  async initRequest() {
@@ -6553,6 +6561,10 @@ const LandingValidation = class {
6553
6561
  async startFlow() {
6554
6562
  if (state.initialised) {
6555
6563
  this.buttonDisabled = true;
6564
+ if (state.environment === 'DEMO') {
6565
+ state.flowStatus = FlowStatus.COMPLETE;
6566
+ return;
6567
+ }
6556
6568
  if (!(await Cameras.InitCameras(this.device))) {
6557
6569
  if (this.device.isIos)
6558
6570
  sessionStorage.setItem(SessionKeys.RefreshDoneKey, 'false');