@ekyc_qoobiss/qbs-ect-cmp 3.6.27 → 3.6.29

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 (168) hide show
  1. package/dist/cjs/TranslationUtils-b918ffb1.js +346 -0
  2. package/dist/cjs/agreement-check_19.cjs.entry.js +9997 -0
  3. package/dist/cjs/index-41696e0e.js +1573 -0
  4. package/dist/cjs/index.cjs.js +2 -0
  5. package/dist/cjs/loader-dots.cjs.entry.js +19 -0
  6. package/dist/cjs/loader.cjs.js +22 -0
  7. package/dist/cjs/qbs-ect-cmp.cjs.js +23 -0
  8. package/dist/cjs/random-actions.cjs.entry.js +22 -0
  9. package/dist/collection/assets/canvas-masks/face_green.svg +8 -0
  10. package/dist/collection/assets/canvas-masks/face_white.svg +8 -0
  11. package/dist/collection/assets/canvas-masks/id_green.svg +6 -0
  12. package/dist/collection/assets/canvas-masks/id_white.svg +6 -0
  13. package/dist/collection/assets/complete.svg +4 -0
  14. package/dist/collection/assets/landing/device.svg +14 -0
  15. package/dist/collection/assets/landing/id.svg +3 -0
  16. package/dist/collection/assets/landing/info.svg +3 -0
  17. package/dist/collection/assets/landing/validation.svg +16 -0
  18. package/dist/collection/assets/loader.svg +29 -0
  19. package/dist/collection/collection-manifest.json +32 -0
  20. package/dist/collection/components/base-component.js +59 -0
  21. package/dist/collection/components/common/agreement-check/agreement-check.css +0 -0
  22. package/dist/collection/components/common/agreement-check/agreement-check.js +108 -0
  23. package/dist/collection/components/common/camera-error/camera-error.css +0 -0
  24. package/dist/collection/components/common/camera-error/camera-error.js +93 -0
  25. package/dist/collection/components/common/capture-error/capture-error.css +0 -0
  26. package/dist/collection/components/common/capture-error/capture-error.js +102 -0
  27. package/dist/collection/components/common/how-to-info/how-to-info.css +0 -0
  28. package/dist/collection/components/common/how-to-info/how-to-info.js +123 -0
  29. package/dist/collection/components/common/id-back-capture/id-back-capture.css +35 -0
  30. package/dist/{qbs-ect-cmp/id-back-capture.entry.js → collection/components/common/id-back-capture/id-back-capture.js} +102 -30
  31. package/dist/collection/components/common/id-capture/id-capture.css +35 -0
  32. package/dist/{qbs-ect-cmp/id-capture.entry.js → collection/components/common/id-capture/id-capture.js} +100 -28
  33. package/dist/collection/components/common/id-tilt/id-tilt.css +35 -0
  34. package/dist/{qbs-ect-cmp/id-tilt.entry.js → collection/components/common/id-tilt/id-tilt.js} +100 -28
  35. package/dist/collection/components/common/random-actions/random-actions.css +0 -0
  36. package/dist/collection/components/common/random-actions/random-actions.js +23 -0
  37. package/dist/collection/components/common/selfie-capture/selfie-capture.css +7 -0
  38. package/dist/{qbs-ect-cmp/selfie-capture.entry.js → collection/components/common/selfie-capture/selfie-capture.js} +102 -29
  39. package/dist/collection/components/common/selfie-tilt/selfie-tilt.css +7 -0
  40. package/dist/{qbs-ect-cmp/selfie-tilt.entry.js → collection/components/common/selfie-tilt/selfie-tilt.js} +103 -30
  41. package/dist/collection/components/controls/camera/camera.css +47 -0
  42. package/dist/collection/components/controls/camera/camera.js +289 -0
  43. package/dist/collection/components/controls/loader-dots/loader-dots.css +61 -0
  44. package/dist/collection/components/controls/loader-dots/loader-dots.js +18 -0
  45. package/dist/collection/components/flow/agreement-info/agreement-info.css +0 -0
  46. package/dist/collection/components/flow/agreement-info/agreement-info.js +107 -0
  47. package/dist/collection/components/flow/end-redirect/end-redirect.css +128 -0
  48. package/dist/collection/components/flow/end-redirect/end-redirect.js +48 -0
  49. package/dist/collection/components/flow/error-end/error-end.css +0 -0
  50. package/dist/collection/components/flow/error-end/error-end.js +61 -0
  51. package/dist/collection/components/flow/landing-validation/landing-validation.css +0 -0
  52. package/dist/collection/components/flow/landing-validation/landing-validation.js +124 -0
  53. package/dist/collection/components/flow/mobile-redirect/mobile-redirect.css +10 -0
  54. package/dist/collection/components/flow/mobile-redirect/mobile-redirect.js +145 -0
  55. package/dist/collection/components/flow/process-id/process-id.css +0 -0
  56. package/dist/{qbs-ect-cmp/process-id.entry.js → collection/components/flow/process-id/process-id.js} +100 -32
  57. package/dist/collection/components/flow/sms-code-validation/sms-code-validation.css +0 -0
  58. package/dist/collection/components/flow/sms-code-validation/sms-code-validation.js +141 -0
  59. package/dist/collection/components/flow/user-liveness/user-liveness.css +0 -0
  60. package/dist/{qbs-ect-cmp/user-liveness.entry.js → collection/components/flow/user-liveness/user-liveness.js} +91 -25
  61. package/dist/collection/components/identification-component/identification-component.css +991 -0
  62. package/dist/collection/components/identification-component/identification-component.js +408 -0
  63. package/dist/collection/global.js +0 -0
  64. package/dist/collection/helpers/ApiCall.js +223 -0
  65. package/dist/{qbs-ect-cmp/Cameras-dfbebc29.js → collection/helpers/Cameras.js} +6 -9
  66. package/dist/collection/helpers/DeviceDetection.js +85 -0
  67. package/dist/collection/helpers/Events.js +58 -0
  68. package/dist/collection/helpers/ML5.js +38 -0
  69. package/dist/collection/helpers/Stream.js +229 -0
  70. package/dist/collection/helpers/TranslationUtils.js +37 -0
  71. package/dist/collection/helpers/canvas.js +10 -0
  72. package/dist/collection/helpers/index.js +21 -0
  73. package/dist/collection/helpers/security.js +25 -0
  74. package/dist/collection/helpers/store.js +48 -0
  75. package/dist/collection/helpers/textValues.js +48 -0
  76. package/dist/collection/index.js +1 -0
  77. package/dist/collection/libs/FaceML5Detector/FaceML5Detector.js +182 -0
  78. package/dist/collection/libs/FaceML5Detector/FacePose.js +85 -0
  79. package/dist/collection/libs/IDML5Detector/IDML5Detector.js +99 -0
  80. package/dist/{qbs-ect-cmp/IDPose-181bcb25.js → collection/libs/IDML5Detector/IDPose.js} +2 -4
  81. package/dist/{qbs-ect-cmp/CaptureFlow-db5d90a4.js → collection/models/CaptureFlow.js} +4 -6
  82. package/dist/collection/models/FlowStatus.js +14 -0
  83. package/dist/collection/models/FlowSteps.js +30 -0
  84. package/dist/collection/models/IAbortResult.js +1 -0
  85. package/dist/collection/models/IAddRequest.js +1 -0
  86. package/dist/collection/models/IAgreement.js +1 -0
  87. package/dist/collection/models/ICamera.js +1 -0
  88. package/dist/{qbs-ect-cmp/IDevice-15ecfdeb.js → collection/models/IDevice.js} +4 -6
  89. package/dist/collection/models/IEctStore.js +1 -0
  90. package/dist/collection/models/IGeneration.js +1 -0
  91. package/dist/collection/models/ILinkSend.js +1 -0
  92. package/dist/collection/models/ILogResult.js +1 -0
  93. package/dist/collection/models/IOrderStatus.js +1 -0
  94. package/dist/collection/models/IOtpCheck.js +1 -0
  95. package/dist/collection/models/IOtpSend.js +1 -0
  96. package/dist/collection/models/ITranslationValues.js +1 -0
  97. package/dist/collection/models/IUploadFile.js +1 -0
  98. package/dist/collection/models/IVerificationMode.js +5 -0
  99. package/dist/collection/models/OrderStatuses.js +8 -0
  100. package/dist/{qbs-ect-cmp/utils-8225f0b7.js → collection/utils/utils.js} +8 -10
  101. package/dist/{qbs-ect-cmp/textValues-6bcc85dd.js → esm/TranslationUtils-8ceeb437.js} +84 -47
  102. package/dist/esm/agreement-check_19.entry.js +9975 -0
  103. package/dist/esm/index-cf54a432.js +1543 -0
  104. package/dist/esm/index.js +1 -0
  105. package/dist/{qbs-ect-cmp → esm}/loader-dots.entry.js +1 -1
  106. package/dist/esm/loader.js +18 -0
  107. package/dist/esm/polyfills/core-js.js +11 -0
  108. package/dist/esm/polyfills/css-shim.js +1 -0
  109. package/dist/esm/polyfills/dom.js +79 -0
  110. package/dist/esm/polyfills/es5-html-element.js +1 -0
  111. package/dist/esm/polyfills/index.js +34 -0
  112. package/dist/esm/polyfills/system.js +6 -0
  113. package/dist/esm/qbs-ect-cmp.js +18 -0
  114. package/dist/{qbs-ect-cmp → esm}/random-actions.entry.js +6 -9
  115. package/dist/index.cjs.js +1 -0
  116. package/dist/index.js +1 -0
  117. package/dist/loader/cdn.js +3 -0
  118. package/dist/loader/index.cjs.js +3 -0
  119. package/dist/loader/index.d.ts +21 -0
  120. package/dist/loader/index.es2017.js +3 -0
  121. package/dist/loader/index.js +4 -0
  122. package/dist/loader/package.json +11 -0
  123. package/dist/qbs-ect-cmp/index.esm.js +0 -1
  124. package/dist/qbs-ect-cmp/p-054dc5b3.entry.js +1 -0
  125. package/dist/qbs-ect-cmp/p-473a4636.entry.js +1 -0
  126. package/dist/qbs-ect-cmp/p-8942656c.js +2 -0
  127. package/dist/qbs-ect-cmp/p-b2c9c8d7.entry.js +1373 -0
  128. package/dist/qbs-ect-cmp/p-e568a07c.js +1 -0
  129. package/dist/qbs-ect-cmp/qbs-ect-cmp.css +1 -320
  130. package/dist/qbs-ect-cmp/qbs-ect-cmp.esm.js +1 -148
  131. package/dist/types/components/base-component.d.ts +0 -2
  132. package/dist/types/components/common/agreement-check/agreement-check.d.ts +2 -0
  133. package/dist/types/components/common/camera-error/camera-error.d.ts +1 -0
  134. package/dist/types/components/common/capture-error/capture-error.d.ts +1 -0
  135. package/dist/types/components/common/how-to-info/how-to-info.d.ts +2 -1
  136. package/dist/types/components/common/id-back-capture/id-back-capture.d.ts +1 -0
  137. package/dist/types/components/common/id-capture/id-capture.d.ts +1 -0
  138. package/dist/types/components/common/id-tilt/id-tilt.d.ts +1 -0
  139. package/dist/types/components/common/random-actions/random-actions.d.ts +2 -2
  140. package/dist/types/components/common/selfie-capture/selfie-capture.d.ts +2 -1
  141. package/dist/types/components/common/selfie-tilt/selfie-tilt.d.ts +2 -1
  142. package/dist/types/components/flow/agreement-info/agreement-info.d.ts +2 -1
  143. package/dist/types/components/flow/end-redirect/end-redirect.d.ts +2 -1
  144. package/dist/types/components/flow/landing-validation/landing-validation.d.ts +1 -0
  145. package/dist/types/components/flow/mobile-redirect/mobile-redirect.d.ts +1 -0
  146. package/dist/types/components/flow/sms-code-validation/sms-code-validation.d.ts +2 -1
  147. package/package.json +1 -1
  148. package/dist/qbs-ect-cmp/ML5-657ef934.js +0 -1370
  149. package/dist/qbs-ect-cmp/Stream-b867a2be.js +0 -3104
  150. package/dist/qbs-ect-cmp/_commonjsHelpers-321aa363.js +0 -44
  151. package/dist/qbs-ect-cmp/agreement-check.entry.js +0 -41
  152. package/dist/qbs-ect-cmp/agreement-info.entry.js +0 -66
  153. package/dist/qbs-ect-cmp/app-globals-0f993ce5.js +0 -3
  154. package/dist/qbs-ect-cmp/base-component-2e490fd9.js +0 -502
  155. package/dist/qbs-ect-cmp/camera-comp.entry.js +0 -103
  156. package/dist/qbs-ect-cmp/camera-error.entry.js +0 -59
  157. package/dist/qbs-ect-cmp/capture-error.entry.js +0 -53
  158. package/dist/qbs-ect-cmp/css-shim-b7d3d95f.js +0 -4
  159. package/dist/qbs-ect-cmp/dom-64053c71.js +0 -73
  160. package/dist/qbs-ect-cmp/end-redirect.entry.js +0 -25
  161. package/dist/qbs-ect-cmp/error-end.entry.js +0 -19
  162. package/dist/qbs-ect-cmp/how-to-info.entry.js +0 -52
  163. package/dist/qbs-ect-cmp/identification-component.entry.js +0 -909
  164. package/dist/qbs-ect-cmp/index-78a05b9e.js +0 -3371
  165. package/dist/qbs-ect-cmp/landing-validation.entry.js +0 -90
  166. package/dist/qbs-ect-cmp/mobile-redirect.entry.js +0 -2984
  167. package/dist/qbs-ect-cmp/shadow-css-98135883.js +0 -387
  168. package/dist/qbs-ect-cmp/sms-code-validation.entry.js +0 -106
@@ -0,0 +1,102 @@
1
+ import { h } from '@stencil/core';
2
+ import { delay } from '../../../utils/utils';
3
+ import { BaseComponent } from '../../base-component';
4
+ import { FlowMoments, FlowSteps } from '../../../models/FlowSteps';
5
+ import { Translations } from '../../../helpers/TranslationUtils';
6
+ export class CaptureError {
7
+ constructor() {
8
+ this.type = undefined;
9
+ this.buttonEnabled = undefined;
10
+ this.buttonText = undefined;
11
+ this.baseComponent = new BaseComponent(FlowSteps.CiError);
12
+ }
13
+ async componentWillLoad() {
14
+ this.translations = await Translations.getValues();
15
+ this.buttonEnabled = false;
16
+ if (this.type == 'ID') {
17
+ this.titleR1 = this.translations.IdCaptureValues.ErrorTitleR1;
18
+ this.titleR2 = this.translations.IdCaptureValues.ErrorTitleR2;
19
+ this.descriptionR1 = this.translations.IdCaptureValues.ErrorR1;
20
+ this.descriptionR2 = this.translations.IdCaptureValues.ErrorR2;
21
+ }
22
+ if (this.type == 'LIVENESS') {
23
+ this.titleR1 = this.translations.SelfieCaptureValues.ErrorTitleR1;
24
+ this.titleR2 = this.translations.SelfieCaptureValues.ErrorTitleR2;
25
+ this.descriptionR1 = this.translations.SelfieCaptureValues.ErrorR1;
26
+ this.descriptionR2 = this.translations.SelfieCaptureValues.ErrorR2;
27
+ }
28
+ }
29
+ async componentDidLoad() {
30
+ await this.baseComponent.logStep(FlowSteps.CiError, FlowMoments.Initialized);
31
+ for (let i = 5; i >= 1; i--) {
32
+ this.buttonText = i.toString();
33
+ await delay(1000);
34
+ }
35
+ this.buttonText = this.translations.IdCaptureValues.Button;
36
+ this.buttonEnabled = true;
37
+ }
38
+ async buttonClick() {
39
+ this.buttonEnabled = false;
40
+ await this.baseComponent.logStep(FlowSteps.CiError, FlowMoments.Finalized);
41
+ this.eventCaptureErrorDone.emit();
42
+ }
43
+ render() {
44
+ return (h("div", { class: "container" }, h("div", { class: "row" }, h("h1", { class: "color-red" }, this.titleR1), h("h1", { class: "color-red" }, this.titleR2), h("div", null, h("p", { class: "color-red font-weight-bold font-size-25 mt-5" }, this.descriptionR1), h("p", { class: "color-red font-weight-bold font-size-25 mt-5" }, this.descriptionR2)), h("div", { class: "pos-relative show-bottom" }, h("div", { class: "btn-buletin" }, h("button", { class: "main-button", type: "button", disabled: !this.buttonEnabled, onClick: () => this.buttonClick() }, this.buttonText), h("p", { class: "main-text font-size-18 text-right mb-0" }, this.translations.GlobalValues.FooterText))))));
45
+ }
46
+ static get is() { return "capture-error"; }
47
+ static get originalStyleUrls() {
48
+ return {
49
+ "$": ["capture-error.css"]
50
+ };
51
+ }
52
+ static get styleUrls() {
53
+ return {
54
+ "$": ["capture-error.css"]
55
+ };
56
+ }
57
+ static get properties() {
58
+ return {
59
+ "type": {
60
+ "type": "string",
61
+ "mutable": false,
62
+ "complexType": {
63
+ "original": "string",
64
+ "resolved": "string",
65
+ "references": {}
66
+ },
67
+ "required": false,
68
+ "optional": false,
69
+ "docs": {
70
+ "tags": [],
71
+ "text": ""
72
+ },
73
+ "attribute": "type",
74
+ "reflect": false
75
+ }
76
+ };
77
+ }
78
+ static get states() {
79
+ return {
80
+ "buttonEnabled": {},
81
+ "buttonText": {}
82
+ };
83
+ }
84
+ static get events() {
85
+ return [{
86
+ "method": "eventCaptureErrorDone",
87
+ "name": "captureErrorDone",
88
+ "bubbles": true,
89
+ "cancelable": true,
90
+ "composed": true,
91
+ "docs": {
92
+ "tags": [],
93
+ "text": ""
94
+ },
95
+ "complexType": {
96
+ "original": "any",
97
+ "resolved": "any",
98
+ "references": {}
99
+ }
100
+ }];
101
+ }
102
+ }
@@ -0,0 +1,123 @@
1
+ import { h } from '@stencil/core';
2
+ import store from '../../../helpers/store';
3
+ import { FlowStatus } from '../../../models/FlowStatus';
4
+ import { BaseComponent } from '../../base-component';
5
+ import { FlowSteps } from '../../../models/FlowSteps';
6
+ import { Translations } from '../../../helpers/TranslationUtils';
7
+ export class HowToInfo {
8
+ constructor() { this.idSide = undefined; this.topTitle = undefined; this.subTitle = undefined; this.imagePath = undefined; this.buttonText = undefined; this.buttonEnabled = undefined; }
9
+ async componentDidLoad() {
10
+ await this.baseComponent.initialize();
11
+ }
12
+ async disconnectedCallback() {
13
+ await this.baseComponent.finalize();
14
+ }
15
+ buttonClick() {
16
+ this.buttonEnabled = false;
17
+ this.eventHowToInfoDone.emit();
18
+ }
19
+ async componentWillLoad() {
20
+ this.translations = await Translations.getValues();
21
+ this.subTitle = '';
22
+ this.buttonEnabled = true;
23
+ if (store.flowStatus == FlowStatus.ID) {
24
+ this.topTitle = this.translations.HowToValues.IdTitile;
25
+ this.imagePath = 'https://ekyc.blob.core.windows.net/$web/howto_id.png';
26
+ this.buttonText = this.translations.HowToValues.IdButton;
27
+ if (this.idSide == 'front') {
28
+ this.baseComponent = new BaseComponent(FlowSteps.CiFrontHowTo);
29
+ this.subTitle = this.translations.HowToValues.IdSubTitileFace;
30
+ }
31
+ if (this.idSide == 'back') {
32
+ this.baseComponent = new BaseComponent(FlowSteps.CiBackHowTo);
33
+ this.subTitle = this.translations.HowToValues.IdSubTitileBack;
34
+ }
35
+ }
36
+ if (store.flowStatus == FlowStatus.LIVENESS) {
37
+ this.baseComponent = new BaseComponent(FlowSteps.SelfieHowTo);
38
+ this.topTitle = this.translations.HowToValues.SelfieTitile;
39
+ this.subTitle = this.translations.HowToValues.SelfieSubTitile;
40
+ this.imagePath = 'https://ekyc.blob.core.windows.net/$web/howto_selfie.png';
41
+ this.buttonText = this.translations.HowToValues.SelfieButton;
42
+ }
43
+ this.baseComponent.setEventEmitter(this.apiErrorEvent);
44
+ }
45
+ render() {
46
+ let sub = this.subTitle != '' ? h("p", { class: "font-size-2" }, this.subTitle) : null;
47
+ return (h("div", { class: "container" }, h("div", { class: "row" }, h("div", { class: "div-ci align-center" }, h("img", { src: this.imagePath })), h("div", { class: "text-center" }, h("h1", null, this.topTitle), sub), h("div", { class: "pos-relative show-bottom" }, h("div", { class: "btn-buletin" }, h("button", { class: "main-button", disabled: !this.buttonEnabled, onClick: () => this.buttonClick() }, this.buttonText), h("p", { class: "main-text font-size-18 text-right mb-0" }, this.translations.GlobalValues.FooterText))))));
48
+ }
49
+ static get is() { return "how-to-info"; }
50
+ static get originalStyleUrls() {
51
+ return {
52
+ "$": ["how-to-info.css"]
53
+ };
54
+ }
55
+ static get styleUrls() {
56
+ return {
57
+ "$": ["how-to-info.css"]
58
+ };
59
+ }
60
+ static get properties() {
61
+ return {
62
+ "idSide": {
63
+ "type": "string",
64
+ "mutable": false,
65
+ "complexType": {
66
+ "original": "string",
67
+ "resolved": "string",
68
+ "references": {}
69
+ },
70
+ "required": false,
71
+ "optional": false,
72
+ "docs": {
73
+ "tags": [],
74
+ "text": ""
75
+ },
76
+ "attribute": "id-side",
77
+ "reflect": false
78
+ }
79
+ };
80
+ }
81
+ static get states() {
82
+ return {
83
+ "topTitle": {},
84
+ "subTitle": {},
85
+ "imagePath": {},
86
+ "buttonText": {},
87
+ "buttonEnabled": {}
88
+ };
89
+ }
90
+ static get events() {
91
+ return [{
92
+ "method": "eventHowToInfoDone",
93
+ "name": "howToInfoDone",
94
+ "bubbles": true,
95
+ "cancelable": true,
96
+ "composed": true,
97
+ "docs": {
98
+ "tags": [],
99
+ "text": ""
100
+ },
101
+ "complexType": {
102
+ "original": "any",
103
+ "resolved": "any",
104
+ "references": {}
105
+ }
106
+ }, {
107
+ "method": "apiErrorEvent",
108
+ "name": "apiError",
109
+ "bubbles": true,
110
+ "cancelable": true,
111
+ "composed": true,
112
+ "docs": {
113
+ "tags": [],
114
+ "text": ""
115
+ },
116
+ "complexType": {
117
+ "original": "any",
118
+ "resolved": "any",
119
+ "references": {}
120
+ }
121
+ }];
122
+ }
123
+ }
@@ -0,0 +1,35 @@
1
+ /* .cameraContainer {
2
+ width: 100%;
3
+ height: 100%;
4
+ z-index: 10;
5
+ position: relative;
6
+ overflow: hidden;
7
+ } */
8
+
9
+ .logo {
10
+ max-height: 450px;
11
+ max-width: 450px;
12
+ }
13
+
14
+ /* .block {
15
+ width: 90%;
16
+ padding-left: 5%;
17
+ padding-right: 5%;
18
+ margin-top: 5vh;
19
+ } */
20
+
21
+ .canvas-on-video {
22
+ max-width: 100%;
23
+ max-height: 100%;
24
+ position: absolute;
25
+ z-index: 2;
26
+ transform: scale(-1, 1);
27
+ }
28
+ /*
29
+ @media screen and (max-height: 414px) {
30
+ .logo {
31
+ background-size: 140px;
32
+ max-height: 140px;
33
+ max-width: 140px;
34
+ }
35
+ } */
@@ -1,22 +1,20 @@
1
- import { r as registerInstance, e as createEvent, h, i as getElement } from './index-78a05b9e.js';
2
- import { C as Cameras } from './Cameras-dfbebc29.js';
3
- import { S as Stream, V as VerificationMode, I as IDML5Detector, F as FaceML5Detector } from './Stream-b867a2be.js';
4
- import { I as IDPose } from './IDPose-181bcb25.js';
5
- import { d as delay } from './utils-8225f0b7.js';
6
- import { I as IdCaptureValues, s as state } from './textValues-6bcc85dd.js';
7
- import { B as BaseComponent, F as FlowSteps, a as FlowMoments } from './base-component-2e490fd9.js';
8
- import './IDevice-15ecfdeb.js';
9
- import './ML5-657ef934.js';
10
- import './_commonjsHelpers-321aa363.js';
11
-
12
- const idBackCaptureCss = ".logo{max-height:450px;max-width:450px}.canvas-on-video{max-width:100%;max-height:100%;position:absolute;z-index:2;transform:scale(-1, 1)}";
13
-
14
- const IdBackCapture = class {
1
+ import { h } from '@stencil/core';
2
+ import { Cameras } from '../../../helpers/Cameras';
3
+ import { Stream } from '../../../helpers/Stream';
4
+ import { IDML5Detector } from '../../../libs/IDML5Detector/IDML5Detector';
5
+ import { FaceML5Detector } from '../../../libs/FaceML5Detector/FaceML5Detector';
6
+ import { IDPose } from '../../../libs/IDML5Detector/IDPose';
7
+ import { delay } from '../../../utils/utils';
8
+ import store from '../../../helpers/store';
9
+ import { BaseComponent } from '../../base-component';
10
+ import { FlowMoments, FlowSteps } from '../../../models/FlowSteps';
11
+ import { VerificationMode } from '../../../models/IVerificationMode';
12
+ import { IdCaptureValues } from '../../../helpers/textValues';
13
+ import { Translations } from '../../../helpers/TranslationUtils';
14
+ // import { IDPose } from '../../libs/IDML5Detector/IDPose';
15
+ export class IdBackCapture {
15
16
  // @State() private animationPath: string;
16
- constructor(hostRef) {
17
- registerInstance(this, hostRef);
18
- this.eventPhotoCapture = createEvent(this, "photoIdBackCapture", 7);
19
- this.apiErrorEvent = createEvent(this, "apiError", 7);
17
+ constructor() {
20
18
  this.photoIsReady = photos => {
21
19
  //this.closeCamera();
22
20
  this.eventPhotoCapture.emit(photos);
@@ -39,6 +37,7 @@ const IdBackCapture = class {
39
37
  this.cameraSize = event.detail;
40
38
  }
41
39
  async componentWillLoad() {
40
+ this.translations = await Translations.getValues();
42
41
  //this.videoDemoStyle = this.device.isMobile ? { width: window.screen.width + 'px', height: window.screen.height + 'px', 'object-fit': 'fill' } : {};
43
42
  if (!navigator.mediaDevices) {
44
43
  this.apiErrorEvent.emit({ message: 'This browser does not support webRTC' });
@@ -46,19 +45,19 @@ const IdBackCapture = class {
46
45
  }
47
46
  async componentDidLoad() {
48
47
  await this.baseComponent.logStep(FlowSteps.CiBackCapture, FlowMoments.Initialized);
49
- this.titleMesage = this.baseComponent.translations.IdCaptureValues.TtileRotate;
48
+ this.titleMesage = this.translations.IdCaptureValues.TtileRotate;
50
49
  this.demoVideo.src = IdCaptureValues.IDPoseDemoMapping[IDPose.Rotate];
51
50
  this.demoVideo.play();
52
- await delay(this.baseComponent.translations.GlobalValues.VideoLenght);
53
- this.titleMesage = this.baseComponent.translations.IdCaptureValues.TitleBack;
51
+ await delay(this.translations.GlobalValues.VideoLenght);
52
+ this.titleMesage = this.translations.IdCaptureValues.TitleBack;
54
53
  this.demoVideo.src = IdCaptureValues.IDPoseDemoMapping[IDPose.BackStraight];
55
54
  this.demoVideo.play();
56
- await delay(this.baseComponent.translations.GlobalValues.VideoLenght);
55
+ await delay(this.translations.GlobalValues.VideoLenght);
57
56
  this.showDemo = false;
58
57
  this.openCamera();
59
58
  }
60
59
  async openCamera() {
61
- const constraints = this.cameras.GetConstraints(state.cameraId, state.device);
60
+ const constraints = this.cameras.GetConstraints(store.cameraId, store.device);
62
61
  setTimeout(() => {
63
62
  navigator.mediaDevices
64
63
  .getUserMedia(constraints)
@@ -87,7 +86,7 @@ const IdBackCapture = class {
87
86
  if (this.verified)
88
87
  return;
89
88
  this.verified = true;
90
- this.titleMesage = this.baseComponent.translations.IdCaptureValues.Loading;
89
+ this.titleMesage = this.translations.IdCaptureValues.Loading;
91
90
  this.closeCamera();
92
91
  this.showDemo = true;
93
92
  this.demoVideo.src = 'https://ekyc.blob.core.windows.net/$web/animations/uploading_id.mp4';
@@ -112,10 +111,83 @@ const IdBackCapture = class {
112
111
  let titleClass = this.verified ? 'color-black-2 text-center' : 'color-white text-center';
113
112
  //let videoClass = this.device.isMobile ? '' : 'video-demo';
114
113
  let bgDemo = this.verified ? 'container' : 'container bg-black';
115
- return (h("div", { class: bgDemo }, h("div", { class: "container-video" }, h("div", { hidden: this.showDemo == false }, h("video", { id: "howtoBack", class: "video-demo", playsinline: true, ref: el => (this.demoVideo = el) }, h("source", { type: "video/mp4" }))), h("div", { hidden: this.showDemo }, h("div", { hidden: this.verified }, h("div", { class: "video-capture" }, h("div", { style: cameraStyle }, h("div", { style: cameraStyleInner }, h("camera-comp", { "capture-mode": "id" })))))), h("div", { class: "capture-title" }, h("h1", { class: titleClass }, this.titleMesage), h("p", { class: "main-text font-size-18 text-right mb-0" }, this.baseComponent.translations.GlobalValues.FooterText)))));
114
+ return (h("div", { class: bgDemo }, h("div", { class: "container-video" }, h("div", { hidden: this.showDemo == false }, h("video", { id: "howtoBack", class: "video-demo", playsinline: true, ref: el => (this.demoVideo = el) }, h("source", { type: "video/mp4" }))), h("div", { hidden: this.showDemo }, h("div", { hidden: this.verified }, h("div", { class: "video-capture" }, h("div", { style: cameraStyle }, h("div", { style: cameraStyleInner }, h("camera-comp", { "capture-mode": "id" })))))), h("div", { class: "capture-title" }, h("h1", { class: titleClass }, this.titleMesage), h("p", { class: "main-text font-size-18 text-right mb-0" }, this.translations.GlobalValues.FooterText)))));
116
115
  }
117
- get component() { return getElement(this); }
118
- };
119
- IdBackCapture.style = idBackCaptureCss;
120
-
121
- export { IdBackCapture as id_back_capture };
116
+ static get is() { return "id-back-capture"; }
117
+ static get originalStyleUrls() {
118
+ return {
119
+ "$": ["id-back-capture.css"]
120
+ };
121
+ }
122
+ static get styleUrls() {
123
+ return {
124
+ "$": ["id-back-capture.css"]
125
+ };
126
+ }
127
+ static get states() {
128
+ return {
129
+ "videoStarted": {},
130
+ "cameraSize": {},
131
+ "captureTaken": {},
132
+ "verified": {},
133
+ "titleMesage": {},
134
+ "showDemo": {},
135
+ "demoVideo": {}
136
+ };
137
+ }
138
+ static get events() {
139
+ return [{
140
+ "method": "eventPhotoCapture",
141
+ "name": "photoIdBackCapture",
142
+ "bubbles": true,
143
+ "cancelable": true,
144
+ "composed": true,
145
+ "docs": {
146
+ "tags": [],
147
+ "text": ""
148
+ },
149
+ "complexType": {
150
+ "original": "any",
151
+ "resolved": "any",
152
+ "references": {}
153
+ }
154
+ }, {
155
+ "method": "apiErrorEvent",
156
+ "name": "apiError",
157
+ "bubbles": true,
158
+ "cancelable": true,
159
+ "composed": true,
160
+ "docs": {
161
+ "tags": [],
162
+ "text": ""
163
+ },
164
+ "complexType": {
165
+ "original": "any",
166
+ "resolved": "any",
167
+ "references": {}
168
+ }
169
+ }];
170
+ }
171
+ static get elementRef() { return "component"; }
172
+ static get listeners() {
173
+ return [{
174
+ "name": "videoStarted",
175
+ "method": "eventVideoStarted",
176
+ "target": undefined,
177
+ "capture": false,
178
+ "passive": false
179
+ }, {
180
+ "name": "verificationFinished",
181
+ "method": "verificationFinished",
182
+ "target": undefined,
183
+ "capture": false,
184
+ "passive": false
185
+ }, {
186
+ "name": "takePhoto",
187
+ "method": "takePhoto",
188
+ "target": undefined,
189
+ "capture": false,
190
+ "passive": false
191
+ }];
192
+ }
193
+ }
@@ -0,0 +1,35 @@
1
+ /* .cameraContainer {
2
+ width: 100%;
3
+ height: 100%;
4
+ z-index: 10;
5
+ position: relative;
6
+ overflow: hidden;
7
+ } */
8
+
9
+ .logo {
10
+ max-height: 450px;
11
+ max-width: 450px;
12
+ }
13
+
14
+ /* .block {
15
+ width: 90%;
16
+ padding-left: 5%;
17
+ padding-right: 5%;
18
+ margin-top: 5vh;
19
+ } */
20
+
21
+ .canvas-on-video {
22
+ max-width: 100%;
23
+ max-height: 100%;
24
+ position: absolute;
25
+ z-index: 2;
26
+ transform: scale(-1, 1);
27
+ }
28
+ /*
29
+ @media screen and (max-height: 414px) {
30
+ .logo {
31
+ background-size: 140px;
32
+ max-height: 140px;
33
+ max-width: 140px;
34
+ }
35
+ } */
@@ -1,22 +1,20 @@
1
- import { r as registerInstance, e as createEvent, h, i as getElement } from './index-78a05b9e.js';
2
- import { C as Cameras } from './Cameras-dfbebc29.js';
3
- import { S as Stream, V as VerificationMode, I as IDML5Detector, F as FaceML5Detector } from './Stream-b867a2be.js';
4
- import { I as IdCaptureValues, s as state } from './textValues-6bcc85dd.js';
5
- import { I as IDPose } from './IDPose-181bcb25.js';
6
- import { d as delay } from './utils-8225f0b7.js';
7
- import { B as BaseComponent, F as FlowSteps, a as FlowMoments } from './base-component-2e490fd9.js';
8
- import './IDevice-15ecfdeb.js';
9
- import './ML5-657ef934.js';
10
- import './_commonjsHelpers-321aa363.js';
11
-
12
- const idCaptureCss = ".logo{max-height:450px;max-width:450px}.canvas-on-video{max-width:100%;max-height:100%;position:absolute;z-index:2;transform:scale(-1, 1)}";
13
-
14
- const IdCapture = class {
1
+ import { h } from '@stencil/core';
2
+ import { Cameras } from '../../../helpers/Cameras';
3
+ import { Stream } from '../../../helpers/Stream';
4
+ import { IdCaptureValues } from '../../../helpers/textValues';
5
+ import { IDML5Detector } from '../../../libs/IDML5Detector/IDML5Detector';
6
+ import { FaceML5Detector } from '../../../libs/FaceML5Detector/FaceML5Detector';
7
+ import { IDPose } from '../../../libs/IDML5Detector/IDPose';
8
+ import { delay } from '../../../utils/utils';
9
+ import store from '../../../helpers/store';
10
+ import { BaseComponent } from '../../base-component';
11
+ import { FlowMoments, FlowSteps } from '../../../models/FlowSteps';
12
+ import { VerificationMode } from '../../../models/IVerificationMode';
13
+ import { Translations } from '../../../helpers/TranslationUtils';
14
+ // import { IDPose } from '../../libs/IDML5Detector/IDPose';
15
+ export class IdCapture {
15
16
  // @State() private animationPath: string;
16
- constructor(hostRef) {
17
- registerInstance(this, hostRef);
18
- this.eventPhotoCapture = createEvent(this, "photoIdCapture", 7);
19
- this.apiErrorEvent = createEvent(this, "apiError", 7);
17
+ constructor() {
20
18
  this.photoIsReady = photos => {
21
19
  //this.closeCamera();
22
20
  this.eventPhotoCapture.emit(photos);
@@ -39,7 +37,8 @@ const IdCapture = class {
39
37
  this.cameraSize = event.detail;
40
38
  }
41
39
  async componentWillLoad() {
42
- this.titleMesage = this.baseComponent.translations.IdCaptureValues.Title;
40
+ this.translations = await Translations.getValues();
41
+ this.titleMesage = this.translations.IdCaptureValues.Title;
43
42
  //this.videoDemoStyle = this.device.isMobile ? { 'width': window.screen.width + 'px', 'height': window.screen.height + 'px', 'object-fit': 'fill' } : {};
44
43
  if (!navigator.mediaDevices) {
45
44
  this.apiErrorEvent.emit({ message: 'This browser does not support webRTC' });
@@ -49,12 +48,12 @@ const IdCapture = class {
49
48
  await this.baseComponent.logStep(FlowSteps.CiFrontCapture, FlowMoments.Initialized);
50
49
  this.demoVideo.src = IdCaptureValues.IDPoseDemoMapping[IDPose.Straight];
51
50
  this.demoVideo.play();
52
- await delay(this.baseComponent.translations.GlobalValues.VideoLenght);
51
+ await delay(this.translations.GlobalValues.VideoLenght);
53
52
  this.showDemo = false;
54
53
  this.openCamera();
55
54
  }
56
55
  async openCamera() {
57
- const constraints = this.cameras.GetConstraints(state.cameraId, state.device);
56
+ const constraints = this.cameras.GetConstraints(store.cameraId, store.device);
58
57
  setTimeout(() => {
59
58
  navigator.mediaDevices
60
59
  .getUserMedia(constraints)
@@ -91,7 +90,7 @@ const IdCapture = class {
91
90
  if (this.verified)
92
91
  return;
93
92
  this.verified = true;
94
- this.titleMesage = this.baseComponent.translations.IdCaptureValues.Loading;
93
+ this.titleMesage = this.translations.IdCaptureValues.Loading;
95
94
  this.closeCamera();
96
95
  this.showDemo = true;
97
96
  this.demoVideo.src = 'https://ekyc.blob.core.windows.net/$web/animations/uploading_id.mp4';
@@ -113,10 +112,83 @@ const IdCapture = class {
113
112
  let titleClass = this.verified ? 'color-black-2 text-center' : 'color-white text-center';
114
113
  //let videoClass = this.device.isMobile ? '' : 'video-demo';
115
114
  let bgDemo = this.verified ? 'container' : 'container bg-black';
116
- return (h("div", { class: bgDemo }, h("div", { class: "container-video" }, h("div", { hidden: this.showDemo == false }, h("video", { id: "howtoFront", class: "video-demo", playsinline: true, ref: el => (this.demoVideo = el) }, h("source", { type: "video/mp4" }))), h("div", { hidden: this.showDemo }, h("div", { hidden: this.verified }, h("div", { class: "video-capture" }, h("div", { style: cameraStyle }, h("div", { style: cameraStyleInner }, h("camera-comp", { "capture-mode": "id" })))))), h("div", { class: "capture-title" }, h("h1", { class: titleClass }, this.titleMesage), h("p", { class: "main-text font-size-18 text-right mb-0" }, this.baseComponent.translations.GlobalValues.FooterText)))));
115
+ return (h("div", { class: bgDemo }, h("div", { class: "container-video" }, h("div", { hidden: this.showDemo == false }, h("video", { id: "howtoFront", class: "video-demo", playsinline: true, ref: el => (this.demoVideo = el) }, h("source", { type: "video/mp4" }))), h("div", { hidden: this.showDemo }, h("div", { hidden: this.verified }, h("div", { class: "video-capture" }, h("div", { style: cameraStyle }, h("div", { style: cameraStyleInner }, h("camera-comp", { "capture-mode": "id" })))))), h("div", { class: "capture-title" }, h("h1", { class: titleClass }, this.titleMesage), h("p", { class: "main-text font-size-18 text-right mb-0" }, this.translations.GlobalValues.FooterText)))));
117
116
  }
118
- get component() { return getElement(this); }
119
- };
120
- IdCapture.style = idCaptureCss;
121
-
122
- export { IdCapture as id_capture };
117
+ static get is() { return "id-capture"; }
118
+ static get originalStyleUrls() {
119
+ return {
120
+ "$": ["id-capture.css"]
121
+ };
122
+ }
123
+ static get styleUrls() {
124
+ return {
125
+ "$": ["id-capture.css"]
126
+ };
127
+ }
128
+ static get states() {
129
+ return {
130
+ "videoStarted": {},
131
+ "cameraSize": {},
132
+ "captureTaken": {},
133
+ "verified": {},
134
+ "titleMesage": {},
135
+ "showDemo": {},
136
+ "demoVideo": {}
137
+ };
138
+ }
139
+ static get events() {
140
+ return [{
141
+ "method": "eventPhotoCapture",
142
+ "name": "photoIdCapture",
143
+ "bubbles": true,
144
+ "cancelable": true,
145
+ "composed": true,
146
+ "docs": {
147
+ "tags": [],
148
+ "text": ""
149
+ },
150
+ "complexType": {
151
+ "original": "any",
152
+ "resolved": "any",
153
+ "references": {}
154
+ }
155
+ }, {
156
+ "method": "apiErrorEvent",
157
+ "name": "apiError",
158
+ "bubbles": true,
159
+ "cancelable": true,
160
+ "composed": true,
161
+ "docs": {
162
+ "tags": [],
163
+ "text": ""
164
+ },
165
+ "complexType": {
166
+ "original": "any",
167
+ "resolved": "any",
168
+ "references": {}
169
+ }
170
+ }];
171
+ }
172
+ static get elementRef() { return "component"; }
173
+ static get listeners() {
174
+ return [{
175
+ "name": "videoStarted",
176
+ "method": "eventVideoStarted",
177
+ "target": undefined,
178
+ "capture": false,
179
+ "passive": false
180
+ }, {
181
+ "name": "takePhoto",
182
+ "method": "takePhoto",
183
+ "target": undefined,
184
+ "capture": false,
185
+ "passive": false
186
+ }, {
187
+ "name": "verificationFinished",
188
+ "method": "verificationFinished",
189
+ "target": undefined,
190
+ "capture": false,
191
+ "passive": false
192
+ }];
193
+ }
194
+ }
@@ -0,0 +1,35 @@
1
+ /* .cameraContainer {
2
+ width: 100%;
3
+ height: 100%;
4
+ z-index: 10;
5
+ position: relative;
6
+ overflow: hidden;
7
+ } */
8
+
9
+ .logo {
10
+ max-height: 450px;
11
+ max-width: 450px;
12
+ }
13
+
14
+ /* .block {
15
+ width: 90%;
16
+ padding-left: 5%;
17
+ padding-right: 5%;
18
+ margin-top: 5vh;
19
+ } */
20
+
21
+ .canvas-on-video {
22
+ max-width: 100%;
23
+ max-height: 100%;
24
+ position: absolute;
25
+ z-index: 2;
26
+ transform: scale(-1, 1);
27
+ }
28
+ /*
29
+ @media screen and (max-height: 414px) {
30
+ .logo {
31
+ background-size: 140px;
32
+ max-height: 140px;
33
+ max-width: 140px;
34
+ }
35
+ } */