@ekyc_qoobiss/qbs-ect-cmp 3.6.7 → 3.6.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 (52) hide show
  1. package/dist/cjs/Stream-1b0beea8.js +5349 -0
  2. package/dist/cjs/agreement-check_18.cjs.entry.js +763 -6009
  3. package/dist/cjs/id-double-side.cjs.entry.js +208 -0
  4. package/dist/cjs/id-single-side.cjs.entry.js +147 -0
  5. package/dist/cjs/loader.cjs.js +1 -1
  6. package/dist/cjs/qbs-ect-cmp.cjs.js +1 -1
  7. package/dist/collection/collection-manifest.json +2 -0
  8. package/dist/collection/components/common/id-back-capture/id-back-capture.js +4 -19
  9. package/dist/collection/components/common/id-capture/id-capture.js +4 -19
  10. package/dist/collection/components/common/id-tilt/id-tilt.css +35 -0
  11. package/dist/collection/components/common/id-tilt/id-tilt.js +194 -0
  12. package/dist/collection/components/common/selfie-capture/selfie-capture.js +4 -3
  13. package/dist/collection/components/controls/camera/camera.js +3 -1
  14. package/dist/collection/components/flow/process-id/process-id.css +0 -0
  15. package/dist/collection/components/flow/process-id/process-id.js +375 -0
  16. package/dist/collection/components/identification-component/identification-component.js +2 -5
  17. package/dist/collection/helpers/Stream.js +10 -8
  18. package/dist/collection/helpers/store.js +1 -0
  19. package/dist/collection/libs/IDML5Detector/IDML5Detector.js +12 -12
  20. package/dist/collection/models/CaptureFlow.js +16 -0
  21. package/dist/collection/models/FlowSteps.js +1 -0
  22. package/dist/collection/models/IRecordingCallback.js +1 -0
  23. package/dist/collection/models/IVerificationMode.js +5 -0
  24. package/dist/esm/Stream-0935dac1.js +5325 -0
  25. package/dist/esm/agreement-check_18.entry.js +446 -5692
  26. package/dist/esm/id-double-side.entry.js +204 -0
  27. package/dist/esm/id-single-side.entry.js +143 -0
  28. package/dist/esm/{index-9d69e511.js → index-5d6f9123.js} +1 -1
  29. package/dist/esm/loader-dots.entry.js +1 -1
  30. package/dist/esm/loader.js +3 -3
  31. package/dist/esm/qbs-ect-cmp.js +3 -3
  32. package/dist/qbs-ect-cmp/{p-4c8e922b.entry.js → p-7c33dd41.entry.js} +1 -1
  33. package/dist/qbs-ect-cmp/p-933b4d66.entry.js +1 -0
  34. package/dist/qbs-ect-cmp/{p-06e42b28.js → p-aacd7024.js} +1 -1
  35. package/dist/qbs-ect-cmp/{p-3083aa5e.entry.js → p-c8a04b87.js} +26 -26
  36. package/dist/qbs-ect-cmp/p-d95265e0.entry.js +1 -0
  37. package/dist/qbs-ect-cmp/p-e5c2d08c.entry.js +1 -0
  38. package/dist/qbs-ect-cmp/qbs-ect-cmp.esm.js +1 -1
  39. package/dist/types/components/common/id-back-capture/id-back-capture.d.ts +0 -1
  40. package/dist/types/components/common/id-capture/id-capture.d.ts +0 -1
  41. package/dist/types/components/common/id-tilt/id-tilt.d.ts +26 -0
  42. package/dist/types/components/controls/camera/camera.d.ts +3 -2
  43. package/dist/types/components/flow/process-id/process-id.d.ts +28 -0
  44. package/dist/types/components.d.ts +37 -0
  45. package/dist/types/helpers/Stream.d.ts +5 -2
  46. package/dist/types/libs/IDML5Detector/IDML5Detector.d.ts +4 -3
  47. package/dist/types/models/CaptureFlow.d.ts +29 -0
  48. package/dist/types/models/FlowSteps.d.ts +1 -0
  49. package/dist/types/models/IEctStore.d.ts +1 -0
  50. package/dist/types/models/IRecordingCallback.d.ts +4 -0
  51. package/dist/types/models/IVerificationMode.d.ts +4 -0
  52. package/package.json +1 -1
@@ -1,11 +1,10 @@
1
1
  import { ML5 } from '../../helpers/ML5';
2
- import { IDPose } from './IDPose';
3
- import { GlobalValues } from '../../helpers/textValues';
4
2
  // @ts-ignore
5
3
  import id_white_svg from '../../assets/canvas-masks/id_white.svg';
6
4
  // @ts-ignore
7
5
  import id_green_svg from '../../assets/canvas-masks/id_green.svg';
8
6
  import { delay } from '../../utils/utils';
7
+ import { VerificationMode } from '../../models/IVerificationMode';
9
8
  export class IDML5Detector {
10
9
  static getInstance(stream, isMobile) {
11
10
  if (!IDML5Detector.instance) {
@@ -16,8 +15,7 @@ export class IDML5Detector {
16
15
  constructor(stream, _isMobile) {
17
16
  this.MAX_DETECTION = 1000 * 25;
18
17
  this.initTime = null;
19
- this.full = 0;
20
- this.tilted = 0;
18
+ this.checked = false;
21
19
  this.start = null;
22
20
  this.stream = stream;
23
21
  this.ml5 = ML5.getInstance();
@@ -27,16 +25,20 @@ export class IDML5Detector {
27
25
  this.canvasElement = canvasElement;
28
26
  // this.component = component;
29
27
  }
30
- initDetector() {
28
+ initDetector(mode) {
31
29
  this.initTime = Date.now();
32
30
  this.continue = true;
31
+ if (mode == VerificationMode.Full)
32
+ this.targetedLabel = 'full';
33
+ else
34
+ this.targetedLabel = 'tilted';
33
35
  // this.width = this.videoElement.videoWidth;
34
36
  // this.height = this.videoElement.videoHeight;
35
37
  this.drawFrame('white');
36
38
  delay(2000).then(() => this.classifyVideo());
37
39
  }
38
40
  classifyVideo() {
39
- if (this.full == 1 && this.tilted == 1) {
41
+ if (this.checked) {
40
42
  if (this.start == null)
41
43
  this.start = Date.now();
42
44
  if (Date.now() > this.start + 500) {
@@ -57,15 +59,13 @@ export class IDML5Detector {
57
59
  this.stream.timeElapsed();
58
60
  return;
59
61
  }
60
- if (results[0].label == 'full' && results[0].confidence > 0.9 && this.full == 0) {
61
- this.full = 1;
62
+ if (results[0].label == this.targetedLabel && results[0].confidence > 0.9 && !this.checked) {
63
+ this.checked = true;
62
64
  this.stream.autoCapturing();
63
65
  await this.drawFrame('green');
64
- this.stream.changeIDPose(IDPose.Tilted);
65
- await delay(GlobalValues.VideoLenght);
66
66
  }
67
- if (results[0].label == 'tilted' && results[0].confidence > 0.8 && this.full == 1 && this.tilted == 0) {
68
- this.tilted = 1;
67
+ if (results[0].label == this.targetedLabel && results[0].confidence > 0.8 && !this.checked) {
68
+ this.checked = true;
69
69
  await this.drawFrame('green');
70
70
  }
71
71
  this.classifyVideo();
@@ -0,0 +1,16 @@
1
+ export var CaptureUploadTypes;
2
+ (function (CaptureUploadTypes) {
3
+ CaptureUploadTypes["IdFront"] = "IdFront";
4
+ CaptureUploadTypes["IdBack"] = "IdBack";
5
+ CaptureUploadTypes["IdFrontVideo"] = "IdFrontVideo";
6
+ CaptureUploadTypes["None"] = "None";
7
+ })(CaptureUploadTypes || (CaptureUploadTypes = {}));
8
+ export var CaptureFlowStatus;
9
+ (function (CaptureFlowStatus) {
10
+ CaptureFlowStatus[CaptureFlowStatus["HowToFront"] = 0] = "HowToFront";
11
+ CaptureFlowStatus[CaptureFlowStatus["IdFront"] = 1] = "IdFront";
12
+ CaptureFlowStatus[CaptureFlowStatus["HowToBack"] = 2] = "HowToBack";
13
+ CaptureFlowStatus[CaptureFlowStatus["IdBack"] = 3] = "IdBack";
14
+ CaptureFlowStatus[CaptureFlowStatus["Tilt"] = 4] = "Tilt";
15
+ CaptureFlowStatus[CaptureFlowStatus["End"] = 5] = "End";
16
+ })(CaptureFlowStatus || (CaptureFlowStatus = {}));
@@ -16,6 +16,7 @@ export var FlowSteps;
16
16
  FlowSteps[FlowSteps["CiBackHoldAnimation"] = 'ci-back-hold-animation'] = "CiBackHoldAnimation";
17
17
  FlowSteps[FlowSteps["CiBackTiltAnimation"] = 'ci-back-tilt-animation'] = "CiBackTiltAnimation";
18
18
  FlowSteps[FlowSteps["CiBackCapture"] = 'ci-back-capture'] = "CiBackCapture";
19
+ FlowSteps[FlowSteps["CiTilt"] = 'ci-tilt'] = "CiTilt";
19
20
  FlowSteps[FlowSteps["SelfieHowTo"] = 'selfie-how-to'] = "SelfieHowTo";
20
21
  FlowSteps[FlowSteps["SelfieHoldAnimation"] = 'selfie-hold-animation'] = "SelfieHoldAnimation";
21
22
  FlowSteps[FlowSteps["SelfieTiltAnimation"] = 'selfie-tilt-animation'] = "SelfieTiltAnimation";
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ export var VerificationMode;
2
+ (function (VerificationMode) {
3
+ VerificationMode[VerificationMode["Full"] = 0] = "Full";
4
+ VerificationMode[VerificationMode["Tilt"] = 1] = "Tilt";
5
+ })(VerificationMode || (VerificationMode = {}));