@ekyc_qoobiss/qbs-ect-cmp 3.5.8 → 3.5.10

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.
Files changed (26) hide show
  1. package/dist/cjs/agreement-check_18.cjs.entry.js +33 -26
  2. package/dist/collection/components/base-component.js +0 -1
  3. package/dist/collection/components/common/camera-error/camera-error.js +2 -2
  4. package/dist/collection/components/common/how-to-info/how-to-info.js +2 -2
  5. package/dist/collection/components/flow/agreement-info/agreement-info.js +2 -2
  6. package/dist/collection/components/flow/id-double-side/id-double-side.js +2 -2
  7. package/dist/collection/components/flow/id-single-side/id-single-side.js +2 -2
  8. package/dist/collection/components/flow/landing-validation/landing-validation.js +2 -3
  9. package/dist/collection/components/flow/mobile-redirect/mobile-redirect.js +2 -3
  10. package/dist/collection/components/flow/sms-code-validation/sms-code-validation.js +2 -2
  11. package/dist/collection/components/flow/user-liveness/user-liveness.js +2 -2
  12. package/dist/collection/components/identification-component/identification-component.js +15 -5
  13. package/dist/esm/agreement-check_18.entry.js +33 -26
  14. package/dist/qbs-ect-cmp/{p-2c0531f0.entry.js → p-18c20b1f.entry.js} +2 -2
  15. package/dist/qbs-ect-cmp/qbs-ect-cmp.esm.js +1 -1
  16. package/dist/types/components/common/camera-error/camera-error.d.ts +1 -1
  17. package/dist/types/components/common/how-to-info/how-to-info.d.ts +1 -1
  18. package/dist/types/components/flow/agreement-info/agreement-info.d.ts +1 -1
  19. package/dist/types/components/flow/id-double-side/id-double-side.d.ts +1 -1
  20. package/dist/types/components/flow/id-single-side/id-single-side.d.ts +1 -1
  21. package/dist/types/components/flow/landing-validation/landing-validation.d.ts +1 -1
  22. package/dist/types/components/flow/mobile-redirect/mobile-redirect.d.ts +1 -1
  23. package/dist/types/components/flow/sms-code-validation/sms-code-validation.d.ts +1 -1
  24. package/dist/types/components/flow/user-liveness/user-liveness.d.ts +1 -1
  25. package/dist/types/components/identification-component/identification-component.d.ts +1 -1
  26. package/package.json +1 -1
@@ -866,7 +866,6 @@ class BaseComponent {
866
866
  if (!state.device) {
867
867
  state.device = new DeviceDetection().getDevice();
868
868
  }
869
- Events.init(window);
870
869
  }
871
870
  setEventEmitter(event) {
872
871
  this.apiErrorEvent = event;
@@ -934,8 +933,8 @@ const AgreementInfo = class {
934
933
  this.openAgreements = false;
935
934
  this.openTerms = false;
936
935
  }
937
- disconnectedCallback() {
938
- this.baseComponent.finalize();
936
+ async disconnectedCallback() {
937
+ await this.baseComponent.finalize();
939
938
  }
940
939
  async buttonClick() {
941
940
  if (this.agreementsChecked && this.termsChecked) {
@@ -5542,8 +5541,8 @@ const CameraError = class {
5542
5541
  }
5543
5542
  }
5544
5543
  }
5545
- disconnectedCallback() {
5546
- this.baseComponent.finalize();
5544
+ async disconnectedCallback() {
5545
+ await this.baseComponent.finalize();
5547
5546
  }
5548
5547
  async buttonClick() {
5549
5548
  this.buttonDisabled = true;
@@ -5641,8 +5640,8 @@ const HowToInfo = class {
5641
5640
  async componentDidLoad() {
5642
5641
  await this.baseComponent.initialize();
5643
5642
  }
5644
- disconnectedCallback() {
5645
- this.baseComponent.finalize();
5643
+ async disconnectedCallback() {
5644
+ await this.baseComponent.finalize();
5646
5645
  }
5647
5646
  buttonClick() {
5648
5647
  this.buttonEnabled = false;
@@ -6215,8 +6214,8 @@ const IdDoubleSide = class {
6215
6214
  state.recordingRetryCount = 0;
6216
6215
  state.flowStatus = FlowStatus.LIVENESS;
6217
6216
  }
6218
- disconnectedCallback() {
6219
- this.baseComponent.finalize();
6217
+ async disconnectedCallback() {
6218
+ await this.baseComponent.finalize();
6220
6219
  }
6221
6220
  switchCamera() {
6222
6221
  if (this.captureRetryCount == 1) {
@@ -6350,8 +6349,8 @@ const IdSingleSide = class {
6350
6349
  }
6351
6350
  state.flowStatus = FlowStatus.LIVENESS;
6352
6351
  }
6353
- disconnectedCallback() {
6354
- this.baseComponent.finalize();
6352
+ async disconnectedCallback() {
6353
+ await this.baseComponent.finalize();
6355
6354
  }
6356
6355
  switchCamera() {
6357
6356
  if (this.captureRetryCount == 1) {
@@ -6438,7 +6437,7 @@ function v4(options, buf, offset) {
6438
6437
  }
6439
6438
 
6440
6439
  const name = "@ekyc_qoobiss/qbs-ect-cmp";
6441
- const version$1 = "3.5.8";
6440
+ const version$1 = "3.5.10";
6442
6441
  const description = "Person Identification Component";
6443
6442
  const main = "./dist/index.cjs.js";
6444
6443
  const module$1 = "./dist/index.js";
@@ -6623,9 +6622,18 @@ const IdentificationComponent = class {
6623
6622
  if (this.env && this.env != '') {
6624
6623
  state.environment = this.env;
6625
6624
  }
6626
- this.baseComponent = new BaseComponent(null);
6625
+ this.baseComponent = new BaseComponent(FlowSteps.ComponentLoaded);
6627
6626
  this.baseComponent.setErrorCallback(this.apiErrorEmitter);
6628
- this.baseComponent.logStep(FlowSteps.ComponentLoaded, FlowMoments.Initialized);
6627
+ window.onbeforeunload = () => {
6628
+ setTimeout(function () {
6629
+ setTimeout(() => {
6630
+ alert('Parasirea procesului de identificare va duce la pierderea datelor introduse.');
6631
+ }, 1000);
6632
+ }, 100);
6633
+ };
6634
+ window.onunload = async () => {
6635
+ await this.baseComponent.finalize();
6636
+ };
6629
6637
  if (state.debug)
6630
6638
  this.logInit = getLogMessage(this.order_id, this.redirect_id, this.token);
6631
6639
  if (this.token) {
@@ -6680,6 +6688,7 @@ const IdentificationComponent = class {
6680
6688
  state.requestId = savedRequest;
6681
6689
  this.order_id = savedRequest;
6682
6690
  }
6691
+ await this.baseComponent.initialize();
6683
6692
  if (flowStatusToSet == null) {
6684
6693
  var flowSt = sessionStorage.getItem(SessionKeys.FlowStatusKey);
6685
6694
  if (flowSt) {
@@ -6731,8 +6740,8 @@ const IdentificationComponent = class {
6731
6740
  }
6732
6741
  ML5.getInstance();
6733
6742
  }
6734
- disconnectedCallback() {
6735
- this.baseComponent.finalize();
6743
+ async disconnectedCallback() {
6744
+ await this.baseComponent.finalize();
6736
6745
  }
6737
6746
  render() {
6738
6747
  let currentBlock = index.h("div", null);
@@ -6812,7 +6821,6 @@ const LandingValidation = class {
6812
6821
  await this.initRequest();
6813
6822
  }
6814
6823
  async componentDidLoad() {
6815
- Events.init(window);
6816
6824
  Events.flowStarted();
6817
6825
  if (state.environment !== 'DEMO') {
6818
6826
  await this.baseComponent.initialize();
@@ -6849,8 +6857,8 @@ const LandingValidation = class {
6849
6857
  }
6850
6858
  }
6851
6859
  }
6852
- disconnectedCallback() {
6853
- this.baseComponent.finalize();
6860
+ async disconnectedCallback() {
6861
+ await this.baseComponent.finalize();
6854
6862
  }
6855
6863
  async leaveFlow() {
6856
6864
  if (this.buttonDisabled)
@@ -9782,7 +9790,6 @@ const MobileRedirect = class {
9782
9790
  });
9783
9791
  }
9784
9792
  async componentDidLoad() {
9785
- Events.init(window);
9786
9793
  Events.flowStarted();
9787
9794
  await this.baseComponent.initialize();
9788
9795
  await delay(5000);
@@ -9811,8 +9818,8 @@ const MobileRedirect = class {
9811
9818
  Events.flowAborted();
9812
9819
  }
9813
9820
  }
9814
- disconnectedCallback() {
9815
- this.baseComponent.finalize();
9821
+ async disconnectedCallback() {
9822
+ await this.baseComponent.finalize();
9816
9823
  }
9817
9824
  async buttonClick() {
9818
9825
  if (this.contact == '' || this.contact.length != 10) {
@@ -10019,8 +10026,8 @@ const SmsCodeValidation = class {
10019
10026
  this.apiErrorEvent.emit(e);
10020
10027
  }
10021
10028
  }
10022
- disconnectedCallback() {
10023
- this.baseComponent.finalize();
10029
+ async disconnectedCallback() {
10030
+ await this.baseComponent.finalize();
10024
10031
  }
10025
10032
  componentWillRender() {
10026
10033
  if (state.flowStatus == FlowStatus.PHONE) {
@@ -10153,8 +10160,8 @@ const UserLiveness = class {
10153
10160
  this.selfieFlow.verificationFinished = true;
10154
10161
  await this.endFlow();
10155
10162
  }
10156
- disconnectedCallback() {
10157
- this.baseComponent.finalize();
10163
+ async disconnectedCallback() {
10164
+ await this.baseComponent.finalize();
10158
10165
  }
10159
10166
  async uploadPhoto() {
10160
10167
  if (this.selfieFlow.photoFile == null || this.selfieFlow.photoDone) {
@@ -13,7 +13,6 @@ export class BaseComponent {
13
13
  if (!store.device) {
14
14
  store.device = new DeviceDetection().getDevice();
15
15
  }
16
- Events.init(window);
17
16
  }
18
17
  setEventEmitter(event) {
19
18
  this.apiErrorEvent = event;
@@ -35,8 +35,8 @@ export class CameraError {
35
35
  }
36
36
  }
37
37
  }
38
- disconnectedCallback() {
39
- this.baseComponent.finalize();
38
+ async disconnectedCallback() {
39
+ await this.baseComponent.finalize();
40
40
  }
41
41
  async buttonClick() {
42
42
  this.buttonDisabled = true;
@@ -9,8 +9,8 @@ export class HowToInfo {
9
9
  async componentDidLoad() {
10
10
  await this.baseComponent.initialize();
11
11
  }
12
- disconnectedCallback() {
13
- this.baseComponent.finalize();
12
+ async disconnectedCallback() {
13
+ await this.baseComponent.finalize();
14
14
  }
15
15
  buttonClick() {
16
16
  this.buttonEnabled = false;
@@ -22,8 +22,8 @@ export class AgreementInfo {
22
22
  this.openAgreements = false;
23
23
  this.openTerms = false;
24
24
  }
25
- disconnectedCallback() {
26
- this.baseComponent.finalize();
25
+ async disconnectedCallback() {
26
+ await this.baseComponent.finalize();
27
27
  }
28
28
  async buttonClick() {
29
29
  if (this.agreementsChecked && this.termsChecked) {
@@ -173,8 +173,8 @@ export class IdDoubleSide {
173
173
  store.recordingRetryCount = 0;
174
174
  store.flowStatus = FlowStatus.LIVENESS;
175
175
  }
176
- disconnectedCallback() {
177
- this.baseComponent.finalize();
176
+ async disconnectedCallback() {
177
+ await this.baseComponent.finalize();
178
178
  }
179
179
  switchCamera() {
180
180
  if (this.captureRetryCount == 1) {
@@ -114,8 +114,8 @@ export class IdSingleSide {
114
114
  }
115
115
  store.flowStatus = FlowStatus.LIVENESS;
116
116
  }
117
- disconnectedCallback() {
118
- this.baseComponent.finalize();
117
+ async disconnectedCallback() {
118
+ await this.baseComponent.finalize();
119
119
  }
120
120
  switchCamera() {
121
121
  if (this.captureRetryCount == 1) {
@@ -29,7 +29,6 @@ export class LandingValidation {
29
29
  await this.initRequest();
30
30
  }
31
31
  async componentDidLoad() {
32
- Events.init(window);
33
32
  Events.flowStarted();
34
33
  if (store.environment !== 'DEMO') {
35
34
  await this.baseComponent.initialize();
@@ -66,8 +65,8 @@ export class LandingValidation {
66
65
  }
67
66
  }
68
67
  }
69
- disconnectedCallback() {
70
- this.baseComponent.finalize();
68
+ async disconnectedCallback() {
69
+ await this.baseComponent.finalize();
71
70
  }
72
71
  async leaveFlow() {
73
72
  if (this.buttonDisabled)
@@ -42,7 +42,6 @@ export class MobileRedirect {
42
42
  });
43
43
  }
44
44
  async componentDidLoad() {
45
- Events.init(window);
46
45
  Events.flowStarted();
47
46
  await this.baseComponent.initialize();
48
47
  await delay(5000);
@@ -71,8 +70,8 @@ export class MobileRedirect {
71
70
  Events.flowAborted();
72
71
  }
73
72
  }
74
- disconnectedCallback() {
75
- this.baseComponent.finalize();
73
+ async disconnectedCallback() {
74
+ await this.baseComponent.finalize();
76
75
  }
77
76
  async buttonClick() {
78
77
  if (this.contact == '' || this.contact.length != 10) {
@@ -44,8 +44,8 @@ export class SmsCodeValidation {
44
44
  this.apiErrorEvent.emit(e);
45
45
  }
46
46
  }
47
- disconnectedCallback() {
48
- this.baseComponent.finalize();
47
+ async disconnectedCallback() {
48
+ await this.baseComponent.finalize();
49
49
  }
50
50
  componentWillRender() {
51
51
  if (store.flowStatus == FlowStatus.PHONE) {
@@ -79,8 +79,8 @@ export class UserLiveness {
79
79
  this.selfieFlow.verificationFinished = true;
80
80
  await this.endFlow();
81
81
  }
82
- disconnectedCallback() {
83
- this.baseComponent.finalize();
82
+ async disconnectedCallback() {
83
+ await this.baseComponent.finalize();
84
84
  }
85
85
  async uploadPhoto() {
86
86
  if (this.selfieFlow.photoFile == null || this.selfieFlow.photoDone) {
@@ -9,7 +9,7 @@ import packageJson from '../../../package.json';
9
9
  import { getLogMessage } from '../../utils/utils';
10
10
  import { BaseComponent } from '../base-component';
11
11
  import { Browser } from '../../models/IDevice';
12
- import { FlowMoments, FlowSteps } from '../../models/FlowSteps';
12
+ import { FlowSteps } from '../../models/FlowSteps';
13
13
  export class IdentificationComponent {
14
14
  async onTokenChange(newValue, _oldValue) {
15
15
  if (store.debug)
@@ -124,9 +124,18 @@ export class IdentificationComponent {
124
124
  if (this.env && this.env != '') {
125
125
  store.environment = this.env;
126
126
  }
127
- this.baseComponent = new BaseComponent(null);
127
+ this.baseComponent = new BaseComponent(FlowSteps.ComponentLoaded);
128
128
  this.baseComponent.setErrorCallback(this.apiErrorEmitter);
129
- this.baseComponent.logStep(FlowSteps.ComponentLoaded, FlowMoments.Initialized);
129
+ window.onbeforeunload = () => {
130
+ setTimeout(function () {
131
+ setTimeout(() => {
132
+ alert('Parasirea procesului de identificare va duce la pierderea datelor introduse.');
133
+ }, 1000);
134
+ }, 100);
135
+ };
136
+ window.onunload = async () => {
137
+ await this.baseComponent.finalize();
138
+ };
130
139
  if (store.debug)
131
140
  this.logInit = getLogMessage(this.order_id, this.redirect_id, this.token);
132
141
  if (this.token) {
@@ -181,6 +190,7 @@ export class IdentificationComponent {
181
190
  store.requestId = savedRequest;
182
191
  this.order_id = savedRequest;
183
192
  }
193
+ await this.baseComponent.initialize();
184
194
  if (flowStatusToSet == null) {
185
195
  var flowSt = sessionStorage.getItem(SessionKeys.FlowStatusKey);
186
196
  if (flowSt) {
@@ -232,8 +242,8 @@ export class IdentificationComponent {
232
242
  }
233
243
  ML5.getInstance();
234
244
  }
235
- disconnectedCallback() {
236
- this.baseComponent.finalize();
245
+ async disconnectedCallback() {
246
+ await this.baseComponent.finalize();
237
247
  }
238
248
  render() {
239
249
  let currentBlock = h("div", null);
@@ -862,7 +862,6 @@ class BaseComponent {
862
862
  if (!state.device) {
863
863
  state.device = new DeviceDetection().getDevice();
864
864
  }
865
- Events.init(window);
866
865
  }
867
866
  setEventEmitter(event) {
868
867
  this.apiErrorEvent = event;
@@ -930,8 +929,8 @@ const AgreementInfo = class {
930
929
  this.openAgreements = false;
931
930
  this.openTerms = false;
932
931
  }
933
- disconnectedCallback() {
934
- this.baseComponent.finalize();
932
+ async disconnectedCallback() {
933
+ await this.baseComponent.finalize();
935
934
  }
936
935
  async buttonClick() {
937
936
  if (this.agreementsChecked && this.termsChecked) {
@@ -5538,8 +5537,8 @@ const CameraError = class {
5538
5537
  }
5539
5538
  }
5540
5539
  }
5541
- disconnectedCallback() {
5542
- this.baseComponent.finalize();
5540
+ async disconnectedCallback() {
5541
+ await this.baseComponent.finalize();
5543
5542
  }
5544
5543
  async buttonClick() {
5545
5544
  this.buttonDisabled = true;
@@ -5637,8 +5636,8 @@ const HowToInfo = class {
5637
5636
  async componentDidLoad() {
5638
5637
  await this.baseComponent.initialize();
5639
5638
  }
5640
- disconnectedCallback() {
5641
- this.baseComponent.finalize();
5639
+ async disconnectedCallback() {
5640
+ await this.baseComponent.finalize();
5642
5641
  }
5643
5642
  buttonClick() {
5644
5643
  this.buttonEnabled = false;
@@ -6211,8 +6210,8 @@ const IdDoubleSide = class {
6211
6210
  state.recordingRetryCount = 0;
6212
6211
  state.flowStatus = FlowStatus.LIVENESS;
6213
6212
  }
6214
- disconnectedCallback() {
6215
- this.baseComponent.finalize();
6213
+ async disconnectedCallback() {
6214
+ await this.baseComponent.finalize();
6216
6215
  }
6217
6216
  switchCamera() {
6218
6217
  if (this.captureRetryCount == 1) {
@@ -6346,8 +6345,8 @@ const IdSingleSide = class {
6346
6345
  }
6347
6346
  state.flowStatus = FlowStatus.LIVENESS;
6348
6347
  }
6349
- disconnectedCallback() {
6350
- this.baseComponent.finalize();
6348
+ async disconnectedCallback() {
6349
+ await this.baseComponent.finalize();
6351
6350
  }
6352
6351
  switchCamera() {
6353
6352
  if (this.captureRetryCount == 1) {
@@ -6434,7 +6433,7 @@ function v4(options, buf, offset) {
6434
6433
  }
6435
6434
 
6436
6435
  const name = "@ekyc_qoobiss/qbs-ect-cmp";
6437
- const version$1 = "3.5.8";
6436
+ const version$1 = "3.5.10";
6438
6437
  const description = "Person Identification Component";
6439
6438
  const main = "./dist/index.cjs.js";
6440
6439
  const module = "./dist/index.js";
@@ -6619,9 +6618,18 @@ const IdentificationComponent = class {
6619
6618
  if (this.env && this.env != '') {
6620
6619
  state.environment = this.env;
6621
6620
  }
6622
- this.baseComponent = new BaseComponent(null);
6621
+ this.baseComponent = new BaseComponent(FlowSteps.ComponentLoaded);
6623
6622
  this.baseComponent.setErrorCallback(this.apiErrorEmitter);
6624
- this.baseComponent.logStep(FlowSteps.ComponentLoaded, FlowMoments.Initialized);
6623
+ window.onbeforeunload = () => {
6624
+ setTimeout(function () {
6625
+ setTimeout(() => {
6626
+ alert('Parasirea procesului de identificare va duce la pierderea datelor introduse.');
6627
+ }, 1000);
6628
+ }, 100);
6629
+ };
6630
+ window.onunload = async () => {
6631
+ await this.baseComponent.finalize();
6632
+ };
6625
6633
  if (state.debug)
6626
6634
  this.logInit = getLogMessage(this.order_id, this.redirect_id, this.token);
6627
6635
  if (this.token) {
@@ -6676,6 +6684,7 @@ const IdentificationComponent = class {
6676
6684
  state.requestId = savedRequest;
6677
6685
  this.order_id = savedRequest;
6678
6686
  }
6687
+ await this.baseComponent.initialize();
6679
6688
  if (flowStatusToSet == null) {
6680
6689
  var flowSt = sessionStorage.getItem(SessionKeys.FlowStatusKey);
6681
6690
  if (flowSt) {
@@ -6727,8 +6736,8 @@ const IdentificationComponent = class {
6727
6736
  }
6728
6737
  ML5.getInstance();
6729
6738
  }
6730
- disconnectedCallback() {
6731
- this.baseComponent.finalize();
6739
+ async disconnectedCallback() {
6740
+ await this.baseComponent.finalize();
6732
6741
  }
6733
6742
  render() {
6734
6743
  let currentBlock = h("div", null);
@@ -6808,7 +6817,6 @@ const LandingValidation = class {
6808
6817
  await this.initRequest();
6809
6818
  }
6810
6819
  async componentDidLoad() {
6811
- Events.init(window);
6812
6820
  Events.flowStarted();
6813
6821
  if (state.environment !== 'DEMO') {
6814
6822
  await this.baseComponent.initialize();
@@ -6845,8 +6853,8 @@ const LandingValidation = class {
6845
6853
  }
6846
6854
  }
6847
6855
  }
6848
- disconnectedCallback() {
6849
- this.baseComponent.finalize();
6856
+ async disconnectedCallback() {
6857
+ await this.baseComponent.finalize();
6850
6858
  }
6851
6859
  async leaveFlow() {
6852
6860
  if (this.buttonDisabled)
@@ -9778,7 +9786,6 @@ const MobileRedirect = class {
9778
9786
  });
9779
9787
  }
9780
9788
  async componentDidLoad() {
9781
- Events.init(window);
9782
9789
  Events.flowStarted();
9783
9790
  await this.baseComponent.initialize();
9784
9791
  await delay(5000);
@@ -9807,8 +9814,8 @@ const MobileRedirect = class {
9807
9814
  Events.flowAborted();
9808
9815
  }
9809
9816
  }
9810
- disconnectedCallback() {
9811
- this.baseComponent.finalize();
9817
+ async disconnectedCallback() {
9818
+ await this.baseComponent.finalize();
9812
9819
  }
9813
9820
  async buttonClick() {
9814
9821
  if (this.contact == '' || this.contact.length != 10) {
@@ -10015,8 +10022,8 @@ const SmsCodeValidation = class {
10015
10022
  this.apiErrorEvent.emit(e);
10016
10023
  }
10017
10024
  }
10018
- disconnectedCallback() {
10019
- this.baseComponent.finalize();
10025
+ async disconnectedCallback() {
10026
+ await this.baseComponent.finalize();
10020
10027
  }
10021
10028
  componentWillRender() {
10022
10029
  if (state.flowStatus == FlowStatus.PHONE) {
@@ -10149,8 +10156,8 @@ const UserLiveness = class {
10149
10156
  this.selfieFlow.verificationFinished = true;
10150
10157
  await this.endFlow();
10151
10158
  }
10152
- disconnectedCallback() {
10153
- this.baseComponent.finalize();
10159
+ async disconnectedCallback() {
10160
+ await this.baseComponent.finalize();
10154
10161
  }
10155
10162
  async uploadPhoto() {
10156
10163
  if (this.selfieFlow.photoFile == null || this.selfieFlow.photoDone) {