@jaak.ai/stamps 1.0.0-dev.9 → 2.0.0-beta.1
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.
- package/LICENSE +21 -0
- package/README.md +470 -390
- package/dist/cjs/index-DGM9-FNg.js +1402 -0
- package/dist/cjs/index-DGM9-FNg.js.map +1 -0
- package/dist/cjs/index.cjs.js +3 -0
- package/dist/cjs/index.cjs.js.map +1 -0
- package/dist/cjs/jaak-stamps-webcomponent.cjs.js +27 -0
- package/dist/cjs/jaak-stamps-webcomponent.cjs.js.map +1 -0
- package/dist/cjs/jaak-stamps.cjs.entry.js +925 -0
- package/dist/cjs/jaak-stamps.cjs.entry.js.map +1 -0
- package/dist/cjs/jaak-stamps.entry.cjs.js.map +1 -0
- package/dist/cjs/loader.cjs.js +8 -15
- package/dist/cjs/loader.cjs.js.map +1 -0
- package/dist/collection/collection-manifest.json +3 -22
- package/dist/collection/components/my-component/my-component.css +530 -0
- package/dist/collection/components/my-component/my-component.js +1162 -0
- package/dist/collection/components/my-component/my-component.js.map +1 -0
- package/dist/collection/index.js +2 -1
- package/dist/collection/index.js.map +1 -0
- package/dist/collection/utils/utils.js +4 -0
- package/dist/collection/utils/utils.js.map +1 -0
- package/dist/components/index.d.ts +33 -0
- package/dist/components/index.js +1195 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/jaak-stamps.d.ts +11 -0
- package/dist/components/jaak-stamps.js +971 -0
- package/dist/components/jaak-stamps.js.map +1 -0
- package/dist/esm/index-DqoVMnc7.js +1393 -0
- package/dist/esm/index-DqoVMnc7.js.map +1 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/jaak-stamps-webcomponent.js +23 -0
- package/dist/esm/jaak-stamps-webcomponent.js.map +1 -0
- package/dist/esm/jaak-stamps.entry.js +923 -0
- package/dist/esm/jaak-stamps.entry.js.map +1 -0
- package/dist/esm/loader.js +9 -14
- package/dist/esm/loader.js.map +1 -0
- package/dist/jaak-stamps-webcomponent/index.esm.js +2 -0
- package/dist/jaak-stamps-webcomponent/index.esm.js.map +1 -0
- package/dist/jaak-stamps-webcomponent/jaak-stamps-webcomponent.esm.js +2 -0
- package/dist/jaak-stamps-webcomponent/jaak-stamps-webcomponent.esm.js.map +1 -0
- package/dist/jaak-stamps-webcomponent/jaak-stamps.entry.esm.js.map +1 -0
- package/dist/jaak-stamps-webcomponent/loader.esm.js.map +1 -0
- package/dist/jaak-stamps-webcomponent/p-DqoVMnc7.js +3 -0
- package/dist/jaak-stamps-webcomponent/p-DqoVMnc7.js.map +1 -0
- package/dist/jaak-stamps-webcomponent/p-dd6cc14e.entry.js +2 -0
- package/dist/jaak-stamps-webcomponent/p-dd6cc14e.entry.js.map +1 -0
- package/dist/types/components/my-component/my-component.d.ts +119 -0
- package/dist/types/components.d.ts +50 -1353
- package/dist/types/index.d.ts +10 -1
- package/dist/types/stencil-public-runtime.d.ts +93 -28
- package/dist/types/utils/utils.d.ts +1 -0
- package/loader/cdn.js +1 -3
- package/loader/index.cjs.js +1 -3
- package/loader/index.d.ts +5 -2
- package/loader/index.es2017.js +1 -3
- package/loader/index.js +1 -3
- package/package.json +22 -26
- package/dist/cjs/document-detector_19.cjs.entry.js +0 -8540
- package/dist/cjs/index-5e4e5e7d.js +0 -1685
- package/dist/cjs/mb-tooltip.cjs.entry.js +0 -26
- package/dist/cjs/stamps.cjs.js +0 -23
- package/dist/collection/components/document-detector/document-detector.css +0 -156
- package/dist/collection/components/document-detector/document-detector.js +0 -416
- package/dist/collection/components/shared/mb-api-process-status/mb-api-process-status.css +0 -360
- package/dist/collection/components/shared/mb-api-process-status/mb-api-process-status.js +0 -124
- package/dist/collection/components/shared/mb-button/mb-button.css +0 -95
- package/dist/collection/components/shared/mb-button/mb-button.js +0 -201
- package/dist/collection/components/shared/mb-button-classic/mb-button-classic.css +0 -100
- package/dist/collection/components/shared/mb-button-classic/mb-button-classic.js +0 -130
- package/dist/collection/components/shared/mb-camera-experience/mb-camera-experience.css +0 -740
- package/dist/collection/components/shared/mb-camera-experience/mb-camera-experience.js +0 -827
- package/dist/collection/components/shared/mb-camera-experience/mb-camera-experience.utils.js +0 -55
- package/dist/collection/components/shared/mb-camera-selection/mb-camera-selection.css +0 -124
- package/dist/collection/components/shared/mb-camera-selection/mb-camera-selection.js +0 -194
- package/dist/collection/components/shared/mb-camera-toolbar/mb-camera-toolbar.css +0 -80
- package/dist/collection/components/shared/mb-camera-toolbar/mb-camera-toolbar.js +0 -275
- package/dist/collection/components/shared/mb-completed/mb-completed.css +0 -17
- package/dist/collection/components/shared/mb-completed/mb-completed.js +0 -48
- package/dist/collection/components/shared/mb-component/mb-component.css +0 -321
- package/dist/collection/components/shared/mb-component/mb-component.js +0 -2269
- package/dist/collection/components/shared/mb-component/mb-component.utils.js +0 -14
- package/dist/collection/components/shared/mb-container/mb-container.css +0 -7
- package/dist/collection/components/shared/mb-container/mb-container.js +0 -23
- package/dist/collection/components/shared/mb-feedback/mb-feedback.css +0 -36
- package/dist/collection/components/shared/mb-feedback/mb-feedback.js +0 -91
- package/dist/collection/components/shared/mb-feedback/mb-feedback.utils.js +0 -11
- package/dist/collection/components/shared/mb-help/mb-help.css +0 -191
- package/dist/collection/components/shared/mb-help/mb-help.js +0 -409
- package/dist/collection/components/shared/mb-help/mb-help.model.js +0 -5
- package/dist/collection/components/shared/mb-image-box/mb-image-box.css +0 -78
- package/dist/collection/components/shared/mb-image-box/mb-image-box.js +0 -150
- package/dist/collection/components/shared/mb-modal/mb-modal.css +0 -106
- package/dist/collection/components/shared/mb-modal/mb-modal.js +0 -239
- package/dist/collection/components/shared/mb-overlay/mb-overlay.css +0 -46
- package/dist/collection/components/shared/mb-overlay/mb-overlay.js +0 -76
- package/dist/collection/components/shared/mb-progress-tracker/mb-progress-tracker.css +0 -24
- package/dist/collection/components/shared/mb-progress-tracker/mb-progress-tracker.js +0 -80
- package/dist/collection/components/shared/mb-screen/mb-screen.css +0 -19
- package/dist/collection/components/shared/mb-screen/mb-screen.js +0 -48
- package/dist/collection/components/shared/mb-spinner/mb-spinner.css +0 -30
- package/dist/collection/components/shared/mb-spinner/mb-spinner.js +0 -67
- package/dist/collection/components/shared/mb-tooltip/mb-tooltip.css +0 -62
- package/dist/collection/components/shared/mb-tooltip/mb-tooltip.js +0 -150
- package/dist/collection/components/shared/mb-tooltip-advanced/mb-tooltip-advanced.css +0 -91
- package/dist/collection/components/shared/mb-tooltip-advanced/mb-tooltip-advanced.js +0 -96
- package/dist/collection/utils/data-structures.js +0 -189
- package/dist/collection/utils/device.helpers.js +0 -37
- package/dist/collection/utils/error-structures.js +0 -47
- package/dist/collection/utils/generic.helpers.js +0 -82
- package/dist/collection/utils/sdk.service.js +0 -943
- package/dist/collection/utils/state-lifter.js +0 -3
- package/dist/collection/utils/status.document-detector.js +0 -15
- package/dist/collection/utils/translation.service.js +0 -97
- package/dist/esm/document-detector_19.entry.js +0 -8518
- package/dist/esm/index-dc740acb.js +0 -1656
- package/dist/esm/mb-tooltip.entry.js +0 -22
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/esm/stamps.js +0 -18
- package/dist/stamps/index.esm.js +0 -0
- package/dist/stamps/p-7f07a434.js +0 -2
- package/dist/stamps/p-ec3f5972.entry.js +0 -1
- package/dist/stamps/p-f4015454.entry.js +0 -9
- package/dist/stamps/stamps.esm.js +0 -1
- package/dist/types/components/document-detector/document-detector.d.ts +0 -86
- package/dist/types/components/shared/mb-api-process-status/mb-api-process-status.d.ts +0 -30
- package/dist/types/components/shared/mb-button/mb-button.d.ts +0 -41
- package/dist/types/components/shared/mb-button-classic/mb-button-classic.d.ts +0 -27
- package/dist/types/components/shared/mb-camera-experience/mb-camera-experience.d.ts +0 -141
- package/dist/types/components/shared/mb-camera-experience/mb-camera-experience.utils.d.ts +0 -3
- package/dist/types/components/shared/mb-camera-selection/mb-camera-selection.d.ts +0 -33
- package/dist/types/components/shared/mb-camera-toolbar/mb-camera-toolbar.d.ts +0 -54
- package/dist/types/components/shared/mb-completed/mb-completed.d.ts +0 -12
- package/dist/types/components/shared/mb-component/mb-component.d.ts +0 -308
- package/dist/types/components/shared/mb-component/mb-component.utils.d.ts +0 -3
- package/dist/types/components/shared/mb-container/mb-container.d.ts +0 -8
- package/dist/types/components/shared/mb-feedback/mb-feedback.d.ts +0 -19
- package/dist/types/components/shared/mb-feedback/mb-feedback.utils.d.ts +0 -2
- package/dist/types/components/shared/mb-help/mb-help.d.ts +0 -66
- package/dist/types/components/shared/mb-help/mb-help.model.d.ts +0 -9
- package/dist/types/components/shared/mb-image-box/mb-image-box.d.ts +0 -35
- package/dist/types/components/shared/mb-modal/mb-modal.d.ts +0 -53
- package/dist/types/components/shared/mb-overlay/mb-overlay.d.ts +0 -17
- package/dist/types/components/shared/mb-progress-tracker/mb-progress-tracker.d.ts +0 -19
- package/dist/types/components/shared/mb-screen/mb-screen.d.ts +0 -12
- package/dist/types/components/shared/mb-spinner/mb-spinner.d.ts +0 -16
- package/dist/types/components/shared/mb-tooltip/mb-tooltip.d.ts +0 -10
- package/dist/types/components/shared/mb-tooltip-advanced/mb-tooltip-advanced.d.ts +0 -7
- package/dist/types/utils/data-structures.d.ts +0 -264
- package/dist/types/utils/device.helpers.d.ts +0 -7
- package/dist/types/utils/error-structures.d.ts +0 -44
- package/dist/types/utils/generic.helpers.d.ts +0 -21
- package/dist/types/utils/sdk.service.d.ts +0 -52
- package/dist/types/utils/state-lifter.d.ts +0 -3
- package/dist/types/utils/status.document-detector.d.ts +0 -14
- package/dist/types/utils/translation.service.d.ts +0 -77
- package/loader/package.json +0 -11
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { Host, h } from "@stencil/core";
|
|
2
|
-
export class MbTooltipAdvanced {
|
|
3
|
-
constructor() {
|
|
4
|
-
this.show = undefined;
|
|
5
|
-
this.message = undefined;
|
|
6
|
-
this.arrowPosition = undefined;
|
|
7
|
-
this.textAlign = undefined;
|
|
8
|
-
}
|
|
9
|
-
render() {
|
|
10
|
-
return (h(Host, null, h("p", { part: "tooltip", class: `mb-tooltip ${this.show ? "visible" : ""} ${this.arrowPosition ? this.arrowPosition : "arrow-none"} ${this.textAlign ? this.textAlign : "text-center"} ` }, this.message)));
|
|
11
|
-
}
|
|
12
|
-
static get is() { return "mb-tooltip-advanced"; }
|
|
13
|
-
static get encapsulation() { return "shadow"; }
|
|
14
|
-
static get originalStyleUrls() {
|
|
15
|
-
return {
|
|
16
|
-
"$": ["mb-tooltip-advanced.scss"]
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
static get styleUrls() {
|
|
20
|
-
return {
|
|
21
|
-
"$": ["mb-tooltip-advanced.css"]
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
static get properties() {
|
|
25
|
-
return {
|
|
26
|
-
"show": {
|
|
27
|
-
"type": "boolean",
|
|
28
|
-
"mutable": false,
|
|
29
|
-
"complexType": {
|
|
30
|
-
"original": "boolean",
|
|
31
|
-
"resolved": "boolean",
|
|
32
|
-
"references": {}
|
|
33
|
-
},
|
|
34
|
-
"required": false,
|
|
35
|
-
"optional": false,
|
|
36
|
-
"docs": {
|
|
37
|
-
"tags": [],
|
|
38
|
-
"text": ""
|
|
39
|
-
},
|
|
40
|
-
"attribute": "show",
|
|
41
|
-
"reflect": false
|
|
42
|
-
},
|
|
43
|
-
"message": {
|
|
44
|
-
"type": "string",
|
|
45
|
-
"mutable": false,
|
|
46
|
-
"complexType": {
|
|
47
|
-
"original": "string",
|
|
48
|
-
"resolved": "string",
|
|
49
|
-
"references": {}
|
|
50
|
-
},
|
|
51
|
-
"required": false,
|
|
52
|
-
"optional": false,
|
|
53
|
-
"docs": {
|
|
54
|
-
"tags": [],
|
|
55
|
-
"text": ""
|
|
56
|
-
},
|
|
57
|
-
"attribute": "message",
|
|
58
|
-
"reflect": false
|
|
59
|
-
},
|
|
60
|
-
"arrowPosition": {
|
|
61
|
-
"type": "string",
|
|
62
|
-
"mutable": false,
|
|
63
|
-
"complexType": {
|
|
64
|
-
"original": "| \"arrow-left\"\n | \"arrow-right\"\n | \"arrow-up\"\n | \"arrow-up-left\"\n | \"arrow-up-right\"\n | \"arrow-down\"\n | \"arrow-down-left\"\n | \"arrow-down-right\"",
|
|
65
|
-
"resolved": "\"arrow-down\" | \"arrow-down-left\" | \"arrow-down-right\" | \"arrow-left\" | \"arrow-right\" | \"arrow-up\" | \"arrow-up-left\" | \"arrow-up-right\"",
|
|
66
|
-
"references": {}
|
|
67
|
-
},
|
|
68
|
-
"required": false,
|
|
69
|
-
"optional": true,
|
|
70
|
-
"docs": {
|
|
71
|
-
"tags": [],
|
|
72
|
-
"text": ""
|
|
73
|
-
},
|
|
74
|
-
"attribute": "arrow-position",
|
|
75
|
-
"reflect": false
|
|
76
|
-
},
|
|
77
|
-
"textAlign": {
|
|
78
|
-
"type": "string",
|
|
79
|
-
"mutable": false,
|
|
80
|
-
"complexType": {
|
|
81
|
-
"original": "\"text-center\" | \"text-left\" | \"text-right\"",
|
|
82
|
-
"resolved": "\"text-center\" | \"text-left\" | \"text-right\"",
|
|
83
|
-
"references": {}
|
|
84
|
-
},
|
|
85
|
-
"required": false,
|
|
86
|
-
"optional": true,
|
|
87
|
-
"docs": {
|
|
88
|
-
"tags": [],
|
|
89
|
-
"text": ""
|
|
90
|
-
},
|
|
91
|
-
"attribute": "text-align",
|
|
92
|
-
"reflect": false
|
|
93
|
-
}
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
}
|
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
export { SDKError, } from "@microblink/blinkid-in-browser-sdk";
|
|
2
|
-
/**
|
|
3
|
-
* Events
|
|
4
|
-
*/
|
|
5
|
-
export class EventReady {
|
|
6
|
-
constructor(sdk) {
|
|
7
|
-
this.sdk = sdk;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
export class EventScanError {
|
|
11
|
-
constructor(code, fatal, message, recognizerName, details) {
|
|
12
|
-
this.code = code;
|
|
13
|
-
this.fatal = fatal;
|
|
14
|
-
this.message = message;
|
|
15
|
-
this.recognizerName = recognizerName;
|
|
16
|
-
if (details) {
|
|
17
|
-
this.details = details;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
export class EventScanSuccess {
|
|
22
|
-
constructor(recognizer, recognizerName) {
|
|
23
|
-
this.recognizer = recognizer;
|
|
24
|
-
this.recognizerName = recognizerName;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Error codes
|
|
29
|
-
*/
|
|
30
|
-
export var Code;
|
|
31
|
-
(function (Code) {
|
|
32
|
-
Code["EmptyResult"] = "EMPTY_RESULT";
|
|
33
|
-
Code["InvalidRecognizerOptions"] = "INVALID_RECOGNIZER_OPTIONS";
|
|
34
|
-
Code["NoImageFileFound"] = "NO_IMAGE_FILE_FOUND";
|
|
35
|
-
Code["NoFirstImageFileFound"] = "NO_FIRST_IMAGE_FILE_FOUND";
|
|
36
|
-
Code["NoSecondImageFileFound"] = "NO_SECOND_IMAGE_FILE_FOUND";
|
|
37
|
-
Code["GenericScanError"] = "GENERIC_SCAN_ERROR";
|
|
38
|
-
Code["CameraNotAllowed"] = "CAMERA_NOT_ALLOWED";
|
|
39
|
-
Code["CameraInUse"] = "CAMERA_IN_USE";
|
|
40
|
-
Code["CameraGenericError"] = "CAMERA_GENERIC_ERROR";
|
|
41
|
-
})(Code || (Code = {}));
|
|
42
|
-
/**
|
|
43
|
-
* Scan structures
|
|
44
|
-
*/
|
|
45
|
-
export const AvailableRecognizers = {
|
|
46
|
-
IdBarcodeRecognizer: "createIdBarcodeRecognizer",
|
|
47
|
-
BlinkIdSingleSideRecognizer: "createBlinkIdSingleSideRecognizer",
|
|
48
|
-
BlinkIdMultiSideRecognizer: "createBlinkIdMultiSideRecognizer",
|
|
49
|
-
};
|
|
50
|
-
export var ImageRecognitionType;
|
|
51
|
-
(function (ImageRecognitionType) {
|
|
52
|
-
ImageRecognitionType["SingleSide"] = "SingleSide";
|
|
53
|
-
ImageRecognitionType["MultiSide"] = "MultiSide";
|
|
54
|
-
})(ImageRecognitionType || (ImageRecognitionType = {}));
|
|
55
|
-
export var MultiSideImageType;
|
|
56
|
-
(function (MultiSideImageType) {
|
|
57
|
-
MultiSideImageType["First"] = "First";
|
|
58
|
-
MultiSideImageType["Second"] = "Second";
|
|
59
|
-
})(MultiSideImageType || (MultiSideImageType = {}));
|
|
60
|
-
export var RecognitionStatus;
|
|
61
|
-
(function (RecognitionStatus) {
|
|
62
|
-
RecognitionStatus["NoImageFileFound"] = "NoImageFileFound";
|
|
63
|
-
RecognitionStatus["NoFirstImageFileFound"] = "NoFirstImageFileFound";
|
|
64
|
-
RecognitionStatus["NoSecondImageFileFound"] = "NoSecondImageFileFound";
|
|
65
|
-
RecognitionStatus["Preparing"] = "Preparing";
|
|
66
|
-
RecognitionStatus["Ready"] = "Ready";
|
|
67
|
-
RecognitionStatus["Processing"] = "Processing";
|
|
68
|
-
RecognitionStatus["DetectionFailed"] = "DetectionFailed";
|
|
69
|
-
RecognitionStatus["WrongSide"] = "WrongSide";
|
|
70
|
-
RecognitionStatus["FacePhotoCovered"] = "FacePhotoCovered";
|
|
71
|
-
RecognitionStatus["EmptyResultState"] = "EmptyResultState";
|
|
72
|
-
RecognitionStatus["OnFirstSideResult"] = "OnFirstSideResult";
|
|
73
|
-
RecognitionStatus["ScanSuccessful"] = "ScanSuccessful";
|
|
74
|
-
RecognitionStatus["DocumentClassified"] = "DocumentClassified";
|
|
75
|
-
// Camera states
|
|
76
|
-
RecognitionStatus["DetectionStatusChange"] = "DetectionStatusChange";
|
|
77
|
-
RecognitionStatus["NoSupportForMediaDevices"] = "NoSupportForMediaDevices";
|
|
78
|
-
RecognitionStatus["CameraNotFound"] = "CameraNotFound";
|
|
79
|
-
RecognitionStatus["CameraNotAllowed"] = "CameraNotAllowed";
|
|
80
|
-
RecognitionStatus["UnableToAccessCamera"] = "UnableToAccessCamera";
|
|
81
|
-
RecognitionStatus["CameraInUse"] = "CameraInUse";
|
|
82
|
-
RecognitionStatus["CameraGenericError"] = "CameraGenericError";
|
|
83
|
-
// Blur and glare
|
|
84
|
-
RecognitionStatus["BlurDetected"] = "BlurDetected";
|
|
85
|
-
RecognitionStatus["GlareDetected"] = "GlareDetected";
|
|
86
|
-
// Passport states
|
|
87
|
-
RecognitionStatus["MovePassportLeft"] = "MovePassportLeft";
|
|
88
|
-
RecognitionStatus["MovePassportRight"] = "MovePassportRight";
|
|
89
|
-
RecognitionStatus["MovePassportUp"] = "MovePassportUp";
|
|
90
|
-
RecognitionStatus["MovePassportDown"] = "MovePassportDown";
|
|
91
|
-
RecognitionStatus["MovePassportDownError"] = "MovePassportDownError";
|
|
92
|
-
RecognitionStatus["MovePassportUpError"] = "MovePassportUpError";
|
|
93
|
-
RecognitionStatus["MovePassportRightError"] = "MovePassportRightError";
|
|
94
|
-
RecognitionStatus["MovePassportLeftError"] = "MovePassportLeftError";
|
|
95
|
-
RecognitionStatus["ScanPassportLeft"] = "ScanPassportLeft";
|
|
96
|
-
RecognitionStatus["ScanPassportRight"] = "ScanPassportRight";
|
|
97
|
-
RecognitionStatus["ScanPassportUp"] = "ScanPassportUp";
|
|
98
|
-
RecognitionStatus["ScanPassportDown"] = "ScanPassportDown";
|
|
99
|
-
// Errors
|
|
100
|
-
RecognitionStatus["UnknownError"] = "UnknownError";
|
|
101
|
-
RecognitionStatus["BarcodeScanningStarted"] = "BarcodeScanningStarted";
|
|
102
|
-
// BlinkIDSDK.DetectionStatus
|
|
103
|
-
RecognitionStatus["DetectionStatusFail"] = "Fail";
|
|
104
|
-
RecognitionStatus["DetectionStatusSuccess"] = "Success";
|
|
105
|
-
RecognitionStatus["DetectionStatusCameraTooHigh"] = "CameraTooHigh";
|
|
106
|
-
RecognitionStatus["DetectionStatusFallbackSuccess"] = "FallbackSuccess";
|
|
107
|
-
RecognitionStatus["DetectionStatusPartial"] = "Partial";
|
|
108
|
-
RecognitionStatus["DetectionStatusCameraAtAngle"] = "CameraAtAngle";
|
|
109
|
-
RecognitionStatus["DetectionStatusCameraTooNear"] = "CameraTooNear";
|
|
110
|
-
RecognitionStatus["DetectionStatusDocumentTooCloseToEdge"] = "DocumentTooCloseToEdge";
|
|
111
|
-
})(RecognitionStatus || (RecognitionStatus = {}));
|
|
112
|
-
export var CameraExperience;
|
|
113
|
-
(function (CameraExperience) {
|
|
114
|
-
CameraExperience["Barcode"] = "BARCODE";
|
|
115
|
-
CameraExperience["CardMultiSide"] = "CARD_MULTI_SIDE";
|
|
116
|
-
CameraExperience["CardSingleSide"] = "CARD_SINGLE_SIDE";
|
|
117
|
-
CameraExperience["PaymentCard"] = "PAYMENT_CARD";
|
|
118
|
-
CameraExperience["Passport"] = "PASSPORT";
|
|
119
|
-
})(CameraExperience || (CameraExperience = {}));
|
|
120
|
-
export var CameraExperienceState;
|
|
121
|
-
(function (CameraExperienceState) {
|
|
122
|
-
CameraExperienceState["BarcodeScanning"] = "BarcodeScanning";
|
|
123
|
-
CameraExperienceState["AdjustAngle"] = "AdjustAngle";
|
|
124
|
-
CameraExperienceState["Classification"] = "Classification";
|
|
125
|
-
CameraExperienceState["Default"] = "Default";
|
|
126
|
-
CameraExperienceState["Detection"] = "Detection";
|
|
127
|
-
CameraExperienceState["Done"] = "Done";
|
|
128
|
-
CameraExperienceState["DoneAll"] = "DoneAll";
|
|
129
|
-
CameraExperienceState["Flip"] = "Flip";
|
|
130
|
-
CameraExperienceState["WrongSide"] = "WrongSide";
|
|
131
|
-
CameraExperienceState["MoveCloser"] = "MoveCloser";
|
|
132
|
-
CameraExperienceState["MoveFarther"] = "MoveFarther";
|
|
133
|
-
CameraExperienceState["BlurDetected"] = "BlurDetected";
|
|
134
|
-
CameraExperienceState["GlareDetected"] = "GlareDetected";
|
|
135
|
-
CameraExperienceState["FacePhotoCovered"] = "FacePhotoCovered";
|
|
136
|
-
// passport states
|
|
137
|
-
CameraExperienceState["MovePassportLeft"] = "MovePassportLeft";
|
|
138
|
-
CameraExperienceState["MovePassportRight"] = "MovePassportRight";
|
|
139
|
-
CameraExperienceState["MovePassportUp"] = "MovePassportUp";
|
|
140
|
-
CameraExperienceState["MovePassportDown"] = "MovePassportDown";
|
|
141
|
-
CameraExperienceState["ScanPassportLeft"] = "ScanPassportLeft";
|
|
142
|
-
CameraExperienceState["ScanPassportRight"] = "ScanPassportRight";
|
|
143
|
-
CameraExperienceState["ScanPassportUp"] = "ScanPassportUp";
|
|
144
|
-
CameraExperienceState["ScanPassportDown"] = "ScanPassportDown";
|
|
145
|
-
CameraExperienceState["MovePassportDownError"] = "MovePassportDownError";
|
|
146
|
-
CameraExperienceState["MovePassportUpError"] = "MovePassportUpError";
|
|
147
|
-
CameraExperienceState["MovePassportRightError"] = "MovePassportRightError";
|
|
148
|
-
CameraExperienceState["MovePassportLeftError"] = "MovePassportLeftError";
|
|
149
|
-
})(CameraExperienceState || (CameraExperienceState = {}));
|
|
150
|
-
export const CameraExperienceStateDuration = new Map([
|
|
151
|
-
[CameraExperienceState.BarcodeScanning, 3500],
|
|
152
|
-
[CameraExperienceState.AdjustAngle, 2500],
|
|
153
|
-
[CameraExperienceState.Default, 500],
|
|
154
|
-
[CameraExperienceState.Done, 1000],
|
|
155
|
-
[CameraExperienceState.DoneAll, 400],
|
|
156
|
-
[CameraExperienceState.Flip, 3500],
|
|
157
|
-
[CameraExperienceState.WrongSide, 1500],
|
|
158
|
-
[CameraExperienceState.MoveCloser, 2500],
|
|
159
|
-
[CameraExperienceState.MoveFarther, 2500],
|
|
160
|
-
[CameraExperienceState.BlurDetected, 2500],
|
|
161
|
-
[CameraExperienceState.GlareDetected, 2500],
|
|
162
|
-
[CameraExperienceState.FacePhotoCovered, 2500],
|
|
163
|
-
[CameraExperienceState.MovePassportLeft, 2500],
|
|
164
|
-
[CameraExperienceState.MovePassportRight, 2500],
|
|
165
|
-
[CameraExperienceState.MovePassportUp, 2500],
|
|
166
|
-
[CameraExperienceState.MovePassportDown, 2500],
|
|
167
|
-
[CameraExperienceState.ScanPassportLeft, 1500],
|
|
168
|
-
[CameraExperienceState.ScanPassportRight, 1500],
|
|
169
|
-
[CameraExperienceState.ScanPassportUp, 1500],
|
|
170
|
-
[CameraExperienceState.ScanPassportDown, 1500],
|
|
171
|
-
[CameraExperienceState.MovePassportDownError, 2500],
|
|
172
|
-
[CameraExperienceState.MovePassportUpError, 2500],
|
|
173
|
-
[CameraExperienceState.MovePassportRightError, 2500],
|
|
174
|
-
[CameraExperienceState.MovePassportLeftError, 2500],
|
|
175
|
-
]);
|
|
176
|
-
/**
|
|
177
|
-
* User feedback structures
|
|
178
|
-
*/
|
|
179
|
-
export var FeedbackCode;
|
|
180
|
-
(function (FeedbackCode) {
|
|
181
|
-
FeedbackCode["CameraDisabled"] = "CAMERA_DISABLED";
|
|
182
|
-
FeedbackCode["CameraGenericError"] = "CAMERA_GENERIC_ERROR";
|
|
183
|
-
FeedbackCode["CameraInUse"] = "CAMERA_IN_USE";
|
|
184
|
-
FeedbackCode["CameraNotAllowed"] = "CAMERA_NOT_ALLOWED";
|
|
185
|
-
FeedbackCode["GenericScanError"] = "GENERIC_SCAN_ERROR";
|
|
186
|
-
FeedbackCode["ScanStarted"] = "SCAN_STARTED";
|
|
187
|
-
FeedbackCode["ScanUnsuccessful"] = "SCAN_UNSUCCESSFUL";
|
|
188
|
-
FeedbackCode["ScanSuccessful"] = "SCAN_SUCCESSFUL";
|
|
189
|
-
})(FeedbackCode || (FeedbackCode = {}));
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import * as BlinkIDSDK from "@microblink/blinkid-in-browser-sdk";
|
|
2
|
-
export function hasVideoDevices() {
|
|
3
|
-
return new Promise((resolve) => {
|
|
4
|
-
if (!window.navigator ||
|
|
5
|
-
!window.navigator.mediaDevices ||
|
|
6
|
-
typeof window.navigator.mediaDevices.enumerateDevices !== "function") {
|
|
7
|
-
resolve(false);
|
|
8
|
-
return;
|
|
9
|
-
}
|
|
10
|
-
window.navigator.mediaDevices.enumerateDevices().then((devices) => {
|
|
11
|
-
devices = devices || [];
|
|
12
|
-
for (const device of devices) {
|
|
13
|
-
if (device && device.kind === "videoinput") {
|
|
14
|
-
resolve(true);
|
|
15
|
-
return;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
resolve(false);
|
|
19
|
-
});
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
export function isWasmSupported() {
|
|
23
|
-
return new Promise((resolve) => {
|
|
24
|
-
const wasmSupport = BlinkIDSDK.isBrowserSupported();
|
|
25
|
-
resolve(wasmSupport);
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
export async function checkMandatoryCapabilites() {
|
|
29
|
-
const wasmSupport = await isWasmSupported();
|
|
30
|
-
return wasmSupport;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Determine whether this is a desktop device based on the screen resolution.
|
|
34
|
-
*/
|
|
35
|
-
export function isDesktop() {
|
|
36
|
-
return !/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
|
37
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/* eslint-disable max-len */
|
|
2
|
-
/**
|
|
3
|
-
* Structures of Error Codes, Error Messages, and CustomError compatible objects for the Error Generator utility.
|
|
4
|
-
* Error Code convention: SECTION_OBJECT_(ACTION)_PROBLEM
|
|
5
|
-
*/
|
|
6
|
-
export var ErrorCodes;
|
|
7
|
-
(function (ErrorCodes) {
|
|
8
|
-
ErrorCodes["BrowserNotSupported"] = "BROWSER_NOT_SUPPORTED";
|
|
9
|
-
ErrorCodes["LicenseError"] = "LICENSE_ERROR";
|
|
10
|
-
ErrorCodes["SdkLoadFailed"] = "SDK_LOAD_FAILED";
|
|
11
|
-
ErrorCodes["InternetNotAvailable"] = "INTERNET_NOT_AVAILABLE";
|
|
12
|
-
ErrorCodes["InvalidRecognizers"] = "INVALID_RECOGNIZERS";
|
|
13
|
-
ErrorCodes["InvalidPingProxyUrl"] = "INVALID_PING_PROXY_URL";
|
|
14
|
-
ErrorCodes["PingProxyPermissionNotGranted"] = "PING_PROXY_PERMISSION_NOT_GRANTED";
|
|
15
|
-
})(ErrorCodes || (ErrorCodes = {}));
|
|
16
|
-
export var ErrorMessages;
|
|
17
|
-
(function (ErrorMessages) {
|
|
18
|
-
ErrorMessages["BrowserNotSupported"] = "Browser is not supported!";
|
|
19
|
-
ErrorMessages["LicenseError"] = "Something is wrong with the license.";
|
|
20
|
-
ErrorMessages["SdkLoadFailed"] = "Failed to load SDK!";
|
|
21
|
-
ErrorMessages["InvalidPingProxyUrl"] = "Provided ping proxy URL is not a valid secure URL in format 'https://{host}:{port?}'.";
|
|
22
|
-
ErrorMessages["PingProxyPermissionNotGranted"] = "Allow ping proxy permission not found in license.";
|
|
23
|
-
})(ErrorMessages || (ErrorMessages = {}));
|
|
24
|
-
export const componentErrors = {
|
|
25
|
-
browserNotSupported: {
|
|
26
|
-
code: ErrorCodes.BrowserNotSupported,
|
|
27
|
-
message: ErrorMessages.BrowserNotSupported,
|
|
28
|
-
},
|
|
29
|
-
licenseError: {
|
|
30
|
-
code: ErrorCodes.LicenseError,
|
|
31
|
-
message: ErrorMessages.LicenseError,
|
|
32
|
-
},
|
|
33
|
-
sdkLoadFailed: {
|
|
34
|
-
code: ErrorCodes.SdkLoadFailed,
|
|
35
|
-
message: ErrorMessages.SdkLoadFailed,
|
|
36
|
-
},
|
|
37
|
-
pingProxyErrors: {
|
|
38
|
-
invalidProxyUrl: {
|
|
39
|
-
message: ErrorMessages.InvalidPingProxyUrl,
|
|
40
|
-
code: ErrorCodes.InvalidPingProxyUrl,
|
|
41
|
-
},
|
|
42
|
-
permissionNotGranted: {
|
|
43
|
-
message: ErrorMessages.PingProxyPermissionNotGranted,
|
|
44
|
-
code: ErrorCodes.PingProxyPermissionNotGranted,
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
};
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
export function stringToArray(inputString) {
|
|
2
|
-
if (!inputString || !inputString.length) {
|
|
3
|
-
return [];
|
|
4
|
-
}
|
|
5
|
-
return inputString.split(",").map((el) => el.trim());
|
|
6
|
-
}
|
|
7
|
-
export function stringToObject(inputString) {
|
|
8
|
-
if (!inputString || !inputString.length) {
|
|
9
|
-
return {};
|
|
10
|
-
}
|
|
11
|
-
return JSON.parse(inputString);
|
|
12
|
-
}
|
|
13
|
-
export function hasSupportedImageFiles(files) {
|
|
14
|
-
const imageRegex = RegExp(/^image\//);
|
|
15
|
-
for (let i = 0; i < files.length; ++i) {
|
|
16
|
-
if (imageRegex.exec(files[i].type)) {
|
|
17
|
-
return true;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
return false;
|
|
21
|
-
}
|
|
22
|
-
export function extractFilenameFromPath(path) {
|
|
23
|
-
return path.split("\\").pop();
|
|
24
|
-
}
|
|
25
|
-
export function getImageFile(fileList) {
|
|
26
|
-
if (fileList === null) {
|
|
27
|
-
return null;
|
|
28
|
-
}
|
|
29
|
-
let image = null;
|
|
30
|
-
const imageRegex = RegExp(/^image\//);
|
|
31
|
-
for (let i = 0; i < fileList.length; ++i) {
|
|
32
|
-
if (imageRegex.exec(fileList[i].type)) {
|
|
33
|
-
image = fileList[i];
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
return image;
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Inspired by https://github.com/JedWatson/classnames.
|
|
40
|
-
* @param classes Class names and their conditions.
|
|
41
|
-
* @returns Joined string of class names.
|
|
42
|
-
*/
|
|
43
|
-
export function classNames(classes) {
|
|
44
|
-
const result = [];
|
|
45
|
-
const keys = Object.keys(classes);
|
|
46
|
-
keys.forEach((key) => {
|
|
47
|
-
if (classes[key]) {
|
|
48
|
-
result.push(key);
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
return result.join(" ");
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* @param root shadowroot to apply the query from
|
|
55
|
-
* @returns array of part selectors
|
|
56
|
-
*/
|
|
57
|
-
export function getWebComponentParts(root) {
|
|
58
|
-
const nodesWithPart = root.querySelectorAll("[part]");
|
|
59
|
-
const parts = new Set();
|
|
60
|
-
nodesWithPart.forEach((el) => {
|
|
61
|
-
const partsArray = el.getAttribute("part").split(" ");
|
|
62
|
-
partsArray.forEach((partName) => parts.add(partName));
|
|
63
|
-
});
|
|
64
|
-
return [...parts];
|
|
65
|
-
}
|
|
66
|
-
export function getWebComponentExportedParts(root) {
|
|
67
|
-
const nodesWithPart = root.querySelectorAll("[exportparts]");
|
|
68
|
-
const exportedParts = new Set();
|
|
69
|
-
nodesWithPart.forEach((el) => {
|
|
70
|
-
const exportedPartsArray = el.getAttribute("exportparts").split(" ");
|
|
71
|
-
exportedPartsArray.forEach((partName) => exportedParts.add(partName));
|
|
72
|
-
});
|
|
73
|
-
return [...exportedParts];
|
|
74
|
-
}
|
|
75
|
-
export function setWebComponentParts(hostEl) {
|
|
76
|
-
const partParts = [hostEl.tagName.toLowerCase(), hostEl.getAttribute("id")];
|
|
77
|
-
hostEl.setAttribute("part", partParts.join(" ").trim());
|
|
78
|
-
}
|
|
79
|
-
export function uuidv4() {
|
|
80
|
-
return ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, (c) => (c ^
|
|
81
|
-
(crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (c / 4)))).toString(16));
|
|
82
|
-
}
|