@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.
Files changed (162) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +470 -390
  3. package/dist/cjs/index-DGM9-FNg.js +1402 -0
  4. package/dist/cjs/index-DGM9-FNg.js.map +1 -0
  5. package/dist/cjs/index.cjs.js +3 -0
  6. package/dist/cjs/index.cjs.js.map +1 -0
  7. package/dist/cjs/jaak-stamps-webcomponent.cjs.js +27 -0
  8. package/dist/cjs/jaak-stamps-webcomponent.cjs.js.map +1 -0
  9. package/dist/cjs/jaak-stamps.cjs.entry.js +925 -0
  10. package/dist/cjs/jaak-stamps.cjs.entry.js.map +1 -0
  11. package/dist/cjs/jaak-stamps.entry.cjs.js.map +1 -0
  12. package/dist/cjs/loader.cjs.js +8 -15
  13. package/dist/cjs/loader.cjs.js.map +1 -0
  14. package/dist/collection/collection-manifest.json +3 -22
  15. package/dist/collection/components/my-component/my-component.css +530 -0
  16. package/dist/collection/components/my-component/my-component.js +1162 -0
  17. package/dist/collection/components/my-component/my-component.js.map +1 -0
  18. package/dist/collection/index.js +2 -1
  19. package/dist/collection/index.js.map +1 -0
  20. package/dist/collection/utils/utils.js +4 -0
  21. package/dist/collection/utils/utils.js.map +1 -0
  22. package/dist/components/index.d.ts +33 -0
  23. package/dist/components/index.js +1195 -0
  24. package/dist/components/index.js.map +1 -0
  25. package/dist/components/jaak-stamps.d.ts +11 -0
  26. package/dist/components/jaak-stamps.js +971 -0
  27. package/dist/components/jaak-stamps.js.map +1 -0
  28. package/dist/esm/index-DqoVMnc7.js +1393 -0
  29. package/dist/esm/index-DqoVMnc7.js.map +1 -0
  30. package/dist/esm/index.js +3 -0
  31. package/dist/esm/index.js.map +1 -0
  32. package/dist/esm/jaak-stamps-webcomponent.js +23 -0
  33. package/dist/esm/jaak-stamps-webcomponent.js.map +1 -0
  34. package/dist/esm/jaak-stamps.entry.js +923 -0
  35. package/dist/esm/jaak-stamps.entry.js.map +1 -0
  36. package/dist/esm/loader.js +9 -14
  37. package/dist/esm/loader.js.map +1 -0
  38. package/dist/jaak-stamps-webcomponent/index.esm.js +2 -0
  39. package/dist/jaak-stamps-webcomponent/index.esm.js.map +1 -0
  40. package/dist/jaak-stamps-webcomponent/jaak-stamps-webcomponent.esm.js +2 -0
  41. package/dist/jaak-stamps-webcomponent/jaak-stamps-webcomponent.esm.js.map +1 -0
  42. package/dist/jaak-stamps-webcomponent/jaak-stamps.entry.esm.js.map +1 -0
  43. package/dist/jaak-stamps-webcomponent/loader.esm.js.map +1 -0
  44. package/dist/jaak-stamps-webcomponent/p-DqoVMnc7.js +3 -0
  45. package/dist/jaak-stamps-webcomponent/p-DqoVMnc7.js.map +1 -0
  46. package/dist/jaak-stamps-webcomponent/p-dd6cc14e.entry.js +2 -0
  47. package/dist/jaak-stamps-webcomponent/p-dd6cc14e.entry.js.map +1 -0
  48. package/dist/types/components/my-component/my-component.d.ts +119 -0
  49. package/dist/types/components.d.ts +50 -1353
  50. package/dist/types/index.d.ts +10 -1
  51. package/dist/types/stencil-public-runtime.d.ts +93 -28
  52. package/dist/types/utils/utils.d.ts +1 -0
  53. package/loader/cdn.js +1 -3
  54. package/loader/index.cjs.js +1 -3
  55. package/loader/index.d.ts +5 -2
  56. package/loader/index.es2017.js +1 -3
  57. package/loader/index.js +1 -3
  58. package/package.json +22 -26
  59. package/dist/cjs/document-detector_19.cjs.entry.js +0 -8540
  60. package/dist/cjs/index-5e4e5e7d.js +0 -1685
  61. package/dist/cjs/mb-tooltip.cjs.entry.js +0 -26
  62. package/dist/cjs/stamps.cjs.js +0 -23
  63. package/dist/collection/components/document-detector/document-detector.css +0 -156
  64. package/dist/collection/components/document-detector/document-detector.js +0 -416
  65. package/dist/collection/components/shared/mb-api-process-status/mb-api-process-status.css +0 -360
  66. package/dist/collection/components/shared/mb-api-process-status/mb-api-process-status.js +0 -124
  67. package/dist/collection/components/shared/mb-button/mb-button.css +0 -95
  68. package/dist/collection/components/shared/mb-button/mb-button.js +0 -201
  69. package/dist/collection/components/shared/mb-button-classic/mb-button-classic.css +0 -100
  70. package/dist/collection/components/shared/mb-button-classic/mb-button-classic.js +0 -130
  71. package/dist/collection/components/shared/mb-camera-experience/mb-camera-experience.css +0 -740
  72. package/dist/collection/components/shared/mb-camera-experience/mb-camera-experience.js +0 -827
  73. package/dist/collection/components/shared/mb-camera-experience/mb-camera-experience.utils.js +0 -55
  74. package/dist/collection/components/shared/mb-camera-selection/mb-camera-selection.css +0 -124
  75. package/dist/collection/components/shared/mb-camera-selection/mb-camera-selection.js +0 -194
  76. package/dist/collection/components/shared/mb-camera-toolbar/mb-camera-toolbar.css +0 -80
  77. package/dist/collection/components/shared/mb-camera-toolbar/mb-camera-toolbar.js +0 -275
  78. package/dist/collection/components/shared/mb-completed/mb-completed.css +0 -17
  79. package/dist/collection/components/shared/mb-completed/mb-completed.js +0 -48
  80. package/dist/collection/components/shared/mb-component/mb-component.css +0 -321
  81. package/dist/collection/components/shared/mb-component/mb-component.js +0 -2269
  82. package/dist/collection/components/shared/mb-component/mb-component.utils.js +0 -14
  83. package/dist/collection/components/shared/mb-container/mb-container.css +0 -7
  84. package/dist/collection/components/shared/mb-container/mb-container.js +0 -23
  85. package/dist/collection/components/shared/mb-feedback/mb-feedback.css +0 -36
  86. package/dist/collection/components/shared/mb-feedback/mb-feedback.js +0 -91
  87. package/dist/collection/components/shared/mb-feedback/mb-feedback.utils.js +0 -11
  88. package/dist/collection/components/shared/mb-help/mb-help.css +0 -191
  89. package/dist/collection/components/shared/mb-help/mb-help.js +0 -409
  90. package/dist/collection/components/shared/mb-help/mb-help.model.js +0 -5
  91. package/dist/collection/components/shared/mb-image-box/mb-image-box.css +0 -78
  92. package/dist/collection/components/shared/mb-image-box/mb-image-box.js +0 -150
  93. package/dist/collection/components/shared/mb-modal/mb-modal.css +0 -106
  94. package/dist/collection/components/shared/mb-modal/mb-modal.js +0 -239
  95. package/dist/collection/components/shared/mb-overlay/mb-overlay.css +0 -46
  96. package/dist/collection/components/shared/mb-overlay/mb-overlay.js +0 -76
  97. package/dist/collection/components/shared/mb-progress-tracker/mb-progress-tracker.css +0 -24
  98. package/dist/collection/components/shared/mb-progress-tracker/mb-progress-tracker.js +0 -80
  99. package/dist/collection/components/shared/mb-screen/mb-screen.css +0 -19
  100. package/dist/collection/components/shared/mb-screen/mb-screen.js +0 -48
  101. package/dist/collection/components/shared/mb-spinner/mb-spinner.css +0 -30
  102. package/dist/collection/components/shared/mb-spinner/mb-spinner.js +0 -67
  103. package/dist/collection/components/shared/mb-tooltip/mb-tooltip.css +0 -62
  104. package/dist/collection/components/shared/mb-tooltip/mb-tooltip.js +0 -150
  105. package/dist/collection/components/shared/mb-tooltip-advanced/mb-tooltip-advanced.css +0 -91
  106. package/dist/collection/components/shared/mb-tooltip-advanced/mb-tooltip-advanced.js +0 -96
  107. package/dist/collection/utils/data-structures.js +0 -189
  108. package/dist/collection/utils/device.helpers.js +0 -37
  109. package/dist/collection/utils/error-structures.js +0 -47
  110. package/dist/collection/utils/generic.helpers.js +0 -82
  111. package/dist/collection/utils/sdk.service.js +0 -943
  112. package/dist/collection/utils/state-lifter.js +0 -3
  113. package/dist/collection/utils/status.document-detector.js +0 -15
  114. package/dist/collection/utils/translation.service.js +0 -97
  115. package/dist/esm/document-detector_19.entry.js +0 -8518
  116. package/dist/esm/index-dc740acb.js +0 -1656
  117. package/dist/esm/mb-tooltip.entry.js +0 -22
  118. package/dist/esm/polyfills/core-js.js +0 -11
  119. package/dist/esm/polyfills/css-shim.js +0 -1
  120. package/dist/esm/polyfills/dom.js +0 -79
  121. package/dist/esm/polyfills/es5-html-element.js +0 -1
  122. package/dist/esm/polyfills/index.js +0 -34
  123. package/dist/esm/polyfills/system.js +0 -6
  124. package/dist/esm/stamps.js +0 -18
  125. package/dist/stamps/index.esm.js +0 -0
  126. package/dist/stamps/p-7f07a434.js +0 -2
  127. package/dist/stamps/p-ec3f5972.entry.js +0 -1
  128. package/dist/stamps/p-f4015454.entry.js +0 -9
  129. package/dist/stamps/stamps.esm.js +0 -1
  130. package/dist/types/components/document-detector/document-detector.d.ts +0 -86
  131. package/dist/types/components/shared/mb-api-process-status/mb-api-process-status.d.ts +0 -30
  132. package/dist/types/components/shared/mb-button/mb-button.d.ts +0 -41
  133. package/dist/types/components/shared/mb-button-classic/mb-button-classic.d.ts +0 -27
  134. package/dist/types/components/shared/mb-camera-experience/mb-camera-experience.d.ts +0 -141
  135. package/dist/types/components/shared/mb-camera-experience/mb-camera-experience.utils.d.ts +0 -3
  136. package/dist/types/components/shared/mb-camera-selection/mb-camera-selection.d.ts +0 -33
  137. package/dist/types/components/shared/mb-camera-toolbar/mb-camera-toolbar.d.ts +0 -54
  138. package/dist/types/components/shared/mb-completed/mb-completed.d.ts +0 -12
  139. package/dist/types/components/shared/mb-component/mb-component.d.ts +0 -308
  140. package/dist/types/components/shared/mb-component/mb-component.utils.d.ts +0 -3
  141. package/dist/types/components/shared/mb-container/mb-container.d.ts +0 -8
  142. package/dist/types/components/shared/mb-feedback/mb-feedback.d.ts +0 -19
  143. package/dist/types/components/shared/mb-feedback/mb-feedback.utils.d.ts +0 -2
  144. package/dist/types/components/shared/mb-help/mb-help.d.ts +0 -66
  145. package/dist/types/components/shared/mb-help/mb-help.model.d.ts +0 -9
  146. package/dist/types/components/shared/mb-image-box/mb-image-box.d.ts +0 -35
  147. package/dist/types/components/shared/mb-modal/mb-modal.d.ts +0 -53
  148. package/dist/types/components/shared/mb-overlay/mb-overlay.d.ts +0 -17
  149. package/dist/types/components/shared/mb-progress-tracker/mb-progress-tracker.d.ts +0 -19
  150. package/dist/types/components/shared/mb-screen/mb-screen.d.ts +0 -12
  151. package/dist/types/components/shared/mb-spinner/mb-spinner.d.ts +0 -16
  152. package/dist/types/components/shared/mb-tooltip/mb-tooltip.d.ts +0 -10
  153. package/dist/types/components/shared/mb-tooltip-advanced/mb-tooltip-advanced.d.ts +0 -7
  154. package/dist/types/utils/data-structures.d.ts +0 -264
  155. package/dist/types/utils/device.helpers.d.ts +0 -7
  156. package/dist/types/utils/error-structures.d.ts +0 -44
  157. package/dist/types/utils/generic.helpers.d.ts +0 -21
  158. package/dist/types/utils/sdk.service.d.ts +0 -52
  159. package/dist/types/utils/state-lifter.d.ts +0 -3
  160. package/dist/types/utils/status.document-detector.d.ts +0 -14
  161. package/dist/types/utils/translation.service.d.ts +0 -77
  162. package/loader/package.json +0 -11
@@ -5,1378 +5,75 @@
5
5
  * It contains typing information for all components that exist in this project.
6
6
  */
7
7
  import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
- import { StatusDocumentDetector } from "./utils/status.document-detector";
9
- import { CameraEntry, CameraExperience, CameraExperienceState, CameraExperienceStateDurations, EventReady, EventScanError, EventScanSuccess, FeedbackMessage, ProductIntegrationInfo, SDKError } from "./utils/data-structures";
10
- import { TranslationService } from "./utils/translation.service";
11
- import { MbHelpCallbacks } from "./components/shared/mb-help/mb-help.model";
12
- import { BlinkIDVariant } from "@microblink/blinkid-in-browser-sdk";
13
- import { SdkService } from "./utils/sdk.service";
14
8
  export namespace Components {
15
- interface DocumentDetector {
16
- "config": {
17
- key: string;
18
- };
19
- "getProductIntegrationInfo": () => Promise<ProductIntegrationInfo>;
20
- "licenseKey": string;
21
- "restartComponent": () => Promise<void>;
22
- "setUiMessage": (state: "FEEDBACK_ERROR" | "FEEDBACK_INFO" | "FEEDBACK_OK", message: string) => Promise<void>;
23
- "setUiState": (state: "ERROR" | "LOADING" | "NONE" | "SUCCESS") => Promise<void>;
24
- "startCameraScan": () => Promise<void>;
25
- "startImageScan": (file: File) => Promise<void>;
26
- "startMultiSideImageScan": (firstFile: File, secondFile: File) => Promise<void>;
27
- }
28
- interface MbApiProcessStatus {
29
- /**
30
- * State value of API processing received from parent element ('loading' or 'success').
31
- */
32
- "state": "ERROR" | "LOADING" | "NONE" | "SUCCESS";
33
- /**
34
- * Instance of TranslationService passed from parent component.
35
- */
36
- "translationService": TranslationService;
37
- /**
38
- * Element visibility, default is 'false'.
39
- */
40
- "visible": boolean;
41
- }
42
- interface MbButton {
43
- "buttonTitle": string;
44
- /**
45
- * Function to call on click
46
- */
47
- "clickHandler": (ev: UIEvent) => void;
48
- /**
49
- * Set to 'true' if button should be disabled, and if click events should not be triggered.
50
- */
51
- "disabled": boolean;
52
- /**
53
- * Passed description text for image element from parent component.
54
- */
55
- "imageAlt": string;
56
- /**
57
- * Passed image from parent component.
58
- */
59
- "imageSrcActive": string;
60
- /**
61
- * Passed image from parent component.
62
- */
63
- "imageSrcDefault": string;
64
- /**
65
- * Set to string which should be displayed below the icon. If omitted, nothing will show.
66
- */
67
- "label": string;
68
- /**
69
- * Set to 'true' if button should enter 'selected' state.
70
- */
71
- "selected": boolean;
72
- /**
73
- * Set to 'true' if button should be visible.
74
- */
75
- "visible": boolean;
76
- }
77
- interface MbButtonClassic {
78
- /**
79
- * Function to call on click
80
- */
81
- "clickHandler": (ev: UIEvent) => void;
82
- /**
83
- * Set to 'true' if button should be disabled, and if click events should not be triggered.
84
- */
85
- "disabled": boolean;
86
- /**
87
- * Set to 'true' if button should be inverted style.
88
- */
89
- "inverted": boolean;
90
- /**
91
- * Set to 'true' if default event should be prevented.
92
- */
93
- "preventDefault": boolean;
94
- "quit": boolean;
95
- }
96
- interface MbCameraExperience {
97
- /**
98
- * Dictates if Help Screens usage is allowed (turned on).
99
- */
100
- "allowHelpScreens": boolean;
101
- /**
102
- * See description in public component.
103
- */
104
- "allowHelpScreensFab": boolean;
105
- /**
106
- * See description in public component.
107
- */
108
- "allowHelpScreensOnboarding": boolean;
109
- /**
110
- * See description in public component.
111
- */
112
- "allowHelpScreensOnboardingPerpetuity": boolean;
113
- /**
114
- * Api state passed from root component.
115
- */
116
- "apiState": string;
117
- /**
118
- * Configure camera experience state timeout durations
119
- */
120
- "cameraExperienceStateDurations": CameraExperienceStateDurations;
121
- /**
122
- * Camera horizontal state passed from root component. Horizontal camera image can be mirrored
123
- */
124
- "cameraFlipped": boolean;
125
- "clearIsCameraActive": boolean;
126
- /**
127
- * See description in public component.
128
- */
129
- "helpScreensTooltipPauseTimeout": number;
130
- /**
131
- * Initializes Help Screens.
132
- */
133
- "initializeHelpScreens": (callbacks: MbHelpCallbacks) => Promise<void>;
134
- /**
135
- * Opens Help Screens in the Onboarding mode.
136
- */
137
- "openHelpScreensOnboarding": () => Promise<void>;
138
- /**
139
- * Populate list of camera devices.
140
- */
141
- "populateCameraDevices": () => Promise<void>;
142
- /**
143
- * Set camera state to initial method.
144
- */
145
- "resetState": () => Promise<void>;
146
- /**
147
- * Change active camera.
148
- */
149
- "setActiveCamera": (cameraId: string) => Promise<void>;
150
- /**
151
- * Method is exposed outside which allow us to control Camera Flip state from parent component.
152
- */
153
- "setCameraFlipState": (isFlipped: boolean) => Promise<void>;
154
- /**
155
- * Set camera state which includes animation and message.
156
- */
157
- "setState": (state: CameraExperienceState, isBackSide?: boolean, force?: boolean) => Promise<void>;
158
- /**
159
- * Show camera feedback message on camera for Barcode scanning
160
- */
161
- "showCameraFeedbackBarcodeMessage": boolean;
162
- /**
163
- * Unless specifically granted by your license key, you are not allowed to modify or remove the Microblink logo displayed on the bottom of the camera overlay.
164
- */
165
- "showOverlay": boolean;
166
- /**
167
- * Show scanning line on camera
168
- */
169
- "showScanningLine": boolean;
170
- /**
171
- * Terminates Help Screens.
172
- */
173
- "terminateHelpScreens": () => Promise<void>;
174
- /**
175
- * Instance of TranslationService passed from root component.
176
- */
177
- "translationService": TranslationService;
178
- /**
179
- * Choose desired camera experience. Each experience type must be implemented in this component.
180
- */
181
- "type": CameraExperience;
182
- }
183
- interface MbCameraSelection {
184
- "clearIsCameraActive": boolean;
185
- /**
186
- * Populate list of camera devices.
187
- */
188
- "populateCameraDevices": () => Promise<void>;
189
- /**
190
- * Change active camera.
191
- */
192
- "setActiveCamera": (cameraId: string) => Promise<void>;
193
- }
194
- interface MbCameraToolbar {
195
- /**
196
- * Whether the camera is flipped, this property will be flip the relevant icon.
197
- */
198
- "cameraFlipped": boolean;
199
- "clearIsCameraActive": boolean;
200
- /**
201
- * Whether to show 'Camera flip' button.
202
- */
203
- "enableCameraFlip": boolean;
204
- /**
205
- * Populate list of camera devices.
206
- */
207
- "populateCameraDevices": () => Promise<void>;
208
- /**
209
- * Change active camera.
210
- */
211
- "setActiveCamera": (cameraId: string) => Promise<void>;
212
- /**
213
- * Set to `true` if close button should be displayed.
214
- */
215
- "showClose": boolean;
216
- }
217
- interface MbCompleted {
218
- /**
219
- * Value of `src` attribute for <img> element.
220
- */
221
- "icon": string;
222
- }
223
- interface MbComponent {
224
- /**
225
- * See description in public component.
226
- */
227
- "allowHelloMessage": boolean;
228
- /**
229
- * Dictates if Help Screens usage is allowed (turned on).
230
- */
231
- "allowHelpScreens": boolean;
232
- /**
233
- * See description in public component.
234
- */
235
- "allowHelpScreensFab": boolean;
236
- /**
237
- * See description in public component.
238
- */
239
- "allowHelpScreensOnboarding": boolean;
240
- /**
241
- * See description in public component.
242
- */
243
- "allowHelpScreensOnboardingPerpetuity": boolean;
244
- "blinkIdVariant"?: BlinkIDVariant;
245
- /**
246
- * See description in public component.
247
- */
248
- "cameraExperienceStateDurations": CameraExperienceStateDurations;
249
- /**
250
- * Camera device ID passed from root component.
251
- */
252
- "cameraId": string | null;
253
- /**
254
- * See description in public component.
255
- */
256
- "enableDrag": boolean;
257
- /**
258
- * See description in public component.
259
- */
260
- "engineLocation": string;
261
- /**
262
- * See description in public component.
263
- */
264
- "galleryDropType": "FULLSCREEN" | "INLINE";
265
- /**
266
- * See description in public component.
267
- */
268
- "galleryOverlayType": "FULLSCREEN" | "INLINE";
269
- /**
270
- * See description in public component.
271
- */
272
- "helpScreensTooltipPauseTimeout": number;
273
- /**
274
- * See description in public component.
275
- */
276
- "hideLoadingAndErrorUi": boolean;
277
- /**
278
- * See description in public component.
279
- */
280
- "iconCameraActive": string;
281
- /**
282
- * See description in public component.
283
- */
284
- "iconCameraDefault": string;
285
- /**
286
- * See description in public component.
287
- */
288
- "iconDragAndDropGalleryDefault": string;
289
- /**
290
- * See description in public component.
291
- */
292
- "iconDragAndDropWarningDefault": string;
293
- /**
294
- * See description in public component.
295
- */
296
- "iconGalleryActive": string;
297
- /**
298
- * See description in public component.
299
- */
300
- "iconGalleryDefault": string;
301
- /**
302
- * See description in public component.
303
- */
304
- "iconGalleryScanningCompleted": string;
305
- /**
306
- * See description in public component.
307
- */
308
- "iconInvalidFormat": string;
309
- /**
310
- * See description in public component.
311
- */
312
- "iconSpinnerFromGalleryExperience": string;
313
- /**
314
- * See description in public component.
315
- */
316
- "iconSpinnerScreenLoading": string;
317
- /**
318
- * See description in public component.
319
- */
320
- "includeSuccessFrame": boolean;
321
- /**
322
- * See description in public component.
323
- */
324
- "licenseKey": string;
325
- /**
326
- * See description in public component.
327
- */
328
- "pingProxyUrl": string | null;
329
- /**
330
- * See description in public component.
331
- */
332
- "recognitionPauseTimeout": number;
333
- /**
334
- * See description in public component.
335
- */
336
- "recognitionTimeout": number;
337
- /**
338
- * See description in public component.
339
- */
340
- "recognizerOptions": { [key: string]: any };
341
- /**
342
- * See description in public component.
343
- */
344
- "recognizers": Array<string>;
345
- /**
346
- * See description in public component.
347
- */
348
- "rtl": boolean;
349
- /**
350
- * See description in public component.
351
- */
352
- "scanFromCamera": boolean;
353
- /**
354
- * See description in public component.
355
- */
356
- "scanFromImage": boolean;
357
- /**
358
- * Instance of SdkService passed from root component.
359
- */
360
- "sdkService": SdkService;
361
- /**
362
- * Method is exposed outside which allow us to control UI state from parent component. In case of state `ERROR` and if `showModalWindows` is set to `true`, modal window with error message will be displayed.
363
- */
364
- "setUiState": (state: "ERROR" | "LOADING" | "NONE" | "SUCCESS") => Promise<void>;
365
- /**
366
- * See description in public component.
367
- */
368
- "showActionLabels": boolean;
369
- /**
370
- * See description in public component.
371
- */
372
- "showCameraFeedbackBarcodeMessage": boolean;
373
- /**
374
- * See description in public component.
375
- */
376
- "showModalWindows": boolean;
377
- /**
378
- * See description in public component.
379
- */
380
- "showScanningLine": boolean;
381
- /**
382
- * Starts camera scan using camera overlay with usage instructions.
383
- */
384
- "startCameraScan": () => Promise<void>;
385
- /**
386
- * Starts image scan, emits results from provided file.
387
- * @param file File to scan
388
- */
389
- "startImageScan": (file: File) => Promise<void>;
390
- /**
391
- * Starts multi-side image scan, emits results from provided files.
392
- * @param firstFile File to scan as first image
393
- * @param secondFile File to scan as second image
394
- */
395
- "startMultiSideImageScan": (firstFile: File, secondFile: File) => Promise<void>;
396
- /**
397
- * See description in public component.
398
- */
399
- "thoroughScanFromImage": boolean;
400
- /**
401
- * Instance of TranslationService passed from root component.
402
- */
403
- "translationService": TranslationService;
404
- /**
405
- * See description in public component.
406
- */
407
- "wasmType": string | null;
408
- /**
409
- * See description in public component.
410
- */
411
- "workerLocation": string;
412
- }
413
- interface MbContainer {
414
- }
415
- interface MbFeedback {
416
- /**
417
- * Call when FeedbackMessage which should be displayed.
418
- */
419
- "show": (feedback: FeedbackMessage) => Promise<void>;
420
- /**
421
- * Set to 'true' if component should be visible.
422
- */
423
- "visible": boolean;
424
- }
425
- interface MbHelp {
426
- /**
427
- * Dictates if usage is allowed (turned on).
428
- */
429
- "allow": boolean;
430
- /**
431
- * Dictates if Floating-Action-Button (Fab) is shown.
432
- */
433
- "allowFab": boolean;
434
- /**
435
- * Dictates if the onboarding is allowed.
436
- */
437
- "allowOnboarding": boolean;
438
- /**
439
- * Dictates if onboarding is executed all the time, or just once.
440
- */
441
- "allowOnboardingPerpetuity": boolean;
442
- /**
443
- * Closes modal.
444
- */
445
- "close": () => Promise<void>;
446
- /**
447
- * Initializes - starts tooltip timer, etc.
448
- */
449
- "initialize": (callbacks: MbHelpCallbacks) => Promise<void>;
450
- /**
451
- * Opens modal for Help Screens purpose.
452
- */
453
- "openHelpScreens": () => Promise<void>;
454
- /**
455
- * Opens modal for Onboarding purpose.
456
- */
457
- "openOnboarding": () => Promise<void>;
458
- /**
459
- * Terminates - cancels tooltip timer, closes modal, etc.
460
- */
461
- "terminate": () => Promise<void>;
462
- /**
463
- * Dictates Milliseconds after which a "Need Help?" tooltip will be shown.
464
- */
465
- "tooltipPauseTimeout": number;
466
- /**
467
- * Translation service.
468
- */
469
- "translationService": TranslationService;
470
- }
471
- interface MbImageBox {
472
- /**
473
- * Text which should be displayed inside 'Add image' anchor element when file is not selected.
474
- */
475
- "anchorText": string;
476
- /**
477
- * Text which represents name of the image.
478
- */
479
- "boxTitle": string;
480
- /**
481
- * Clear input image.
482
- */
483
- "clear": () => Promise<void>;
484
- }
485
- interface MbModal {
486
- /**
487
- * Center component
488
- */
489
- "centered": boolean;
490
- /**
491
- * Passed body content from parent component
492
- */
493
- "content": string;
494
- /**
495
- * Center content inside modal
496
- */
497
- "contentCentered": boolean;
498
- /**
499
- * Show shadow drop
500
- */
501
- "elevated": boolean;
502
- /**
503
- * Whether to hide the close button or not.
504
- */
505
- "hideCloseButton": boolean;
506
- /**
507
- * Whether to hide the footer or not
508
- */
509
- "hideFooter": boolean;
510
- /**
511
- * Passed title content from parent component
512
- */
513
- "modalTitle": string;
514
- /**
515
- * Whether to show back arrow or not
516
- */
517
- "showBackButton": boolean;
518
- /**
519
- * Show modal content
520
- */
521
- "visible": boolean;
522
- }
523
- interface MbOverlay {
524
- /**
525
- * Set to 'false' if overlay should not cover whole screen.
526
- */
527
- "fullscreen": boolean;
528
- /**
529
- * Set to 'true' if overlay should be visible.
530
- */
531
- "visible": boolean;
532
- }
533
- interface MbProgressTracker {
534
- /**
535
- * Current step. Steps start from 1 up to the size number. Default is 1.
536
- */
537
- "current": number;
538
- /**
539
- * Steps count. Default is 3.
540
- */
541
- "size": number;
542
- }
543
- interface MbScreen {
544
- /**
545
- * Set to 'true' if screen should be visible.
546
- */
547
- "visible": boolean;
548
- }
549
- interface MbSpinner {
550
- /**
551
- * Value of `src` attribute for <img> element.
552
- */
553
- "icon": string;
554
- /**
555
- * Spinner size, can be 'default' or 'large'.
556
- */
557
- "size": string;
558
- }
559
- interface MbTooltip {
560
- "arrowPosition"?: | "arrow-left"
561
- | "arrow-right"
562
- | "arrow-up"
563
- | "arrow-down"
564
- | "arrow-none";
565
- "containerWidth"?: string;
566
- "message": string;
567
- "show": boolean;
568
- "showInfoIcon"?: boolean;
569
- "showWarningIcon"?: boolean;
570
- "textAlign"?: "text-center" | "text-left" | "text-right";
571
- }
572
- interface MbTooltipAdvanced {
573
- "arrowPosition"?: | "arrow-left"
574
- | "arrow-right"
575
- | "arrow-up"
576
- | "arrow-up-left"
577
- | "arrow-up-right"
578
- | "arrow-down"
579
- | "arrow-down-left"
580
- | "arrow-down-right";
581
- "message": string;
582
- "show": boolean;
583
- "textAlign"?: "text-center" | "text-left" | "text-right";
584
- }
585
- }
586
- export interface DocumentDetectorCustomEvent<T> extends CustomEvent<T> {
587
- detail: T;
588
- target: HTMLDocumentDetectorElement;
589
- }
590
- export interface MbApiProcessStatusCustomEvent<T> extends CustomEvent<T> {
591
- detail: T;
592
- target: HTMLMbApiProcessStatusElement;
593
- }
594
- export interface MbCameraExperienceCustomEvent<T> extends CustomEvent<T> {
595
- detail: T;
596
- target: HTMLMbCameraExperienceElement;
597
- }
598
- export interface MbCameraSelectionCustomEvent<T> extends CustomEvent<T> {
599
- detail: T;
600
- target: HTMLMbCameraSelectionElement;
601
- }
602
- export interface MbCameraToolbarCustomEvent<T> extends CustomEvent<T> {
603
- detail: T;
604
- target: HTMLMbCameraToolbarElement;
605
- }
606
- export interface MbComponentCustomEvent<T> extends CustomEvent<T> {
607
- detail: T;
608
- target: HTMLMbComponentElement;
609
- }
610
- export interface MbImageBoxCustomEvent<T> extends CustomEvent<T> {
611
- detail: T;
612
- target: HTMLMbImageBoxElement;
613
- }
614
- export interface MbModalCustomEvent<T> extends CustomEvent<T> {
615
- detail: T;
616
- target: HTMLMbModalElement;
617
- }
618
- declare global {
619
- interface HTMLDocumentDetectorElement extends Components.DocumentDetector, HTMLStencilElement {
620
- }
621
- var HTMLDocumentDetectorElement: {
622
- prototype: HTMLDocumentDetectorElement;
623
- new (): HTMLDocumentDetectorElement;
624
- };
625
- interface HTMLMbApiProcessStatusElement extends Components.MbApiProcessStatus, HTMLStencilElement {
626
- }
627
- var HTMLMbApiProcessStatusElement: {
628
- prototype: HTMLMbApiProcessStatusElement;
629
- new (): HTMLMbApiProcessStatusElement;
630
- };
631
- interface HTMLMbButtonElement extends Components.MbButton, HTMLStencilElement {
632
- }
633
- var HTMLMbButtonElement: {
634
- prototype: HTMLMbButtonElement;
635
- new (): HTMLMbButtonElement;
636
- };
637
- interface HTMLMbButtonClassicElement extends Components.MbButtonClassic, HTMLStencilElement {
638
- }
639
- var HTMLMbButtonClassicElement: {
640
- prototype: HTMLMbButtonClassicElement;
641
- new (): HTMLMbButtonClassicElement;
642
- };
643
- interface HTMLMbCameraExperienceElement extends Components.MbCameraExperience, HTMLStencilElement {
644
- }
645
- var HTMLMbCameraExperienceElement: {
646
- prototype: HTMLMbCameraExperienceElement;
647
- new (): HTMLMbCameraExperienceElement;
648
- };
649
- interface HTMLMbCameraSelectionElement extends Components.MbCameraSelection, HTMLStencilElement {
650
- }
651
- var HTMLMbCameraSelectionElement: {
652
- prototype: HTMLMbCameraSelectionElement;
653
- new (): HTMLMbCameraSelectionElement;
654
- };
655
- interface HTMLMbCameraToolbarElement extends Components.MbCameraToolbar, HTMLStencilElement {
656
- }
657
- var HTMLMbCameraToolbarElement: {
658
- prototype: HTMLMbCameraToolbarElement;
659
- new (): HTMLMbCameraToolbarElement;
660
- };
661
- interface HTMLMbCompletedElement extends Components.MbCompleted, HTMLStencilElement {
662
- }
663
- var HTMLMbCompletedElement: {
664
- prototype: HTMLMbCompletedElement;
665
- new (): HTMLMbCompletedElement;
666
- };
667
- interface HTMLMbComponentElement extends Components.MbComponent, HTMLStencilElement {
668
- }
669
- var HTMLMbComponentElement: {
670
- prototype: HTMLMbComponentElement;
671
- new (): HTMLMbComponentElement;
672
- };
673
- interface HTMLMbContainerElement extends Components.MbContainer, HTMLStencilElement {
674
- }
675
- var HTMLMbContainerElement: {
676
- prototype: HTMLMbContainerElement;
677
- new (): HTMLMbContainerElement;
678
- };
679
- interface HTMLMbFeedbackElement extends Components.MbFeedback, HTMLStencilElement {
680
- }
681
- var HTMLMbFeedbackElement: {
682
- prototype: HTMLMbFeedbackElement;
683
- new (): HTMLMbFeedbackElement;
684
- };
685
- interface HTMLMbHelpElement extends Components.MbHelp, HTMLStencilElement {
686
- }
687
- var HTMLMbHelpElement: {
688
- prototype: HTMLMbHelpElement;
689
- new (): HTMLMbHelpElement;
690
- };
691
- interface HTMLMbImageBoxElement extends Components.MbImageBox, HTMLStencilElement {
692
- }
693
- var HTMLMbImageBoxElement: {
694
- prototype: HTMLMbImageBoxElement;
695
- new (): HTMLMbImageBoxElement;
696
- };
697
- interface HTMLMbModalElement extends Components.MbModal, HTMLStencilElement {
698
- }
699
- var HTMLMbModalElement: {
700
- prototype: HTMLMbModalElement;
701
- new (): HTMLMbModalElement;
702
- };
703
- interface HTMLMbOverlayElement extends Components.MbOverlay, HTMLStencilElement {
704
- }
705
- var HTMLMbOverlayElement: {
706
- prototype: HTMLMbOverlayElement;
707
- new (): HTMLMbOverlayElement;
708
- };
709
- interface HTMLMbProgressTrackerElement extends Components.MbProgressTracker, HTMLStencilElement {
710
- }
711
- var HTMLMbProgressTrackerElement: {
712
- prototype: HTMLMbProgressTrackerElement;
713
- new (): HTMLMbProgressTrackerElement;
714
- };
715
- interface HTMLMbScreenElement extends Components.MbScreen, HTMLStencilElement {
716
- }
717
- var HTMLMbScreenElement: {
718
- prototype: HTMLMbScreenElement;
719
- new (): HTMLMbScreenElement;
720
- };
721
- interface HTMLMbSpinnerElement extends Components.MbSpinner, HTMLStencilElement {
722
- }
723
- var HTMLMbSpinnerElement: {
724
- prototype: HTMLMbSpinnerElement;
725
- new (): HTMLMbSpinnerElement;
726
- };
727
- interface HTMLMbTooltipElement extends Components.MbTooltip, HTMLStencilElement {
728
- }
729
- var HTMLMbTooltipElement: {
730
- prototype: HTMLMbTooltipElement;
731
- new (): HTMLMbTooltipElement;
732
- };
733
- interface HTMLMbTooltipAdvancedElement extends Components.MbTooltipAdvanced, HTMLStencilElement {
734
- }
735
- var HTMLMbTooltipAdvancedElement: {
736
- prototype: HTMLMbTooltipAdvancedElement;
737
- new (): HTMLMbTooltipAdvancedElement;
738
- };
739
- interface HTMLElementTagNameMap {
740
- "document-detector": HTMLDocumentDetectorElement;
741
- "mb-api-process-status": HTMLMbApiProcessStatusElement;
742
- "mb-button": HTMLMbButtonElement;
743
- "mb-button-classic": HTMLMbButtonClassicElement;
744
- "mb-camera-experience": HTMLMbCameraExperienceElement;
745
- "mb-camera-selection": HTMLMbCameraSelectionElement;
746
- "mb-camera-toolbar": HTMLMbCameraToolbarElement;
747
- "mb-completed": HTMLMbCompletedElement;
748
- "mb-component": HTMLMbComponentElement;
749
- "mb-container": HTMLMbContainerElement;
750
- "mb-feedback": HTMLMbFeedbackElement;
751
- "mb-help": HTMLMbHelpElement;
752
- "mb-image-box": HTMLMbImageBoxElement;
753
- "mb-modal": HTMLMbModalElement;
754
- "mb-overlay": HTMLMbOverlayElement;
755
- "mb-progress-tracker": HTMLMbProgressTrackerElement;
756
- "mb-screen": HTMLMbScreenElement;
757
- "mb-spinner": HTMLMbSpinnerElement;
758
- "mb-tooltip": HTMLMbTooltipElement;
759
- "mb-tooltip-advanced": HTMLMbTooltipAdvancedElement;
760
- }
761
- }
762
- declare namespace LocalJSX {
763
- interface DocumentDetector {
764
- "config"?: {
765
- key: string;
766
- };
767
- "licenseKey"?: string;
768
- "onResults"?: (event: DocumentDetectorCustomEvent<any>) => void;
769
- "onStatus"?: (event: DocumentDetectorCustomEvent<StatusDocumentDetector>) => void;
770
- }
771
- interface MbApiProcessStatus {
772
- /**
773
- * Emitted when user clicks on 'x' button.
774
- */
775
- "onCloseFromStart"?: (event: MbApiProcessStatusCustomEvent<void>) => void;
776
- /**
777
- * Emitted when user clicks on 'Retry' button.
778
- */
779
- "onCloseTryAgain"?: (event: MbApiProcessStatusCustomEvent<void>) => void;
780
- /**
781
- * State value of API processing received from parent element ('loading' or 'success').
782
- */
783
- "state"?: "ERROR" | "LOADING" | "NONE" | "SUCCESS";
784
- /**
785
- * Instance of TranslationService passed from parent component.
786
- */
787
- "translationService"?: TranslationService;
9
+ interface JaakStamps {
788
10
  /**
789
- * Element visibility, default is 'false'.
11
+ * @default 10
790
12
  */
791
- "visible"?: boolean;
792
- }
793
- interface MbButton {
794
- "buttonTitle": string;
795
- /**
796
- * Function to call on click
797
- */
798
- "clickHandler": (ev: UIEvent) => void;
799
- /**
800
- * Set to 'true' if button should be disabled, and if click events should not be triggered.
801
- */
802
- "disabled"?: boolean;
803
- /**
804
- * Passed description text for image element from parent component.
805
- */
806
- "imageAlt"?: string;
807
- /**
808
- * Passed image from parent component.
809
- */
810
- "imageSrcActive": string;
811
- /**
812
- * Passed image from parent component.
813
- */
814
- "imageSrcDefault": string;
815
- /**
816
- * Set to string which should be displayed below the icon. If omitted, nothing will show.
817
- */
818
- "label"?: string;
819
- /**
820
- * Set to 'true' if button should enter 'selected' state.
821
- */
822
- "selected"?: boolean;
823
- /**
824
- * Set to 'true' if button should be visible.
825
- */
826
- "visible"?: boolean;
827
- }
828
- interface MbButtonClassic {
829
- /**
830
- * Function to call on click
831
- */
832
- "clickHandler": (ev: UIEvent) => void;
833
- /**
834
- * Set to 'true' if button should be disabled, and if click events should not be triggered.
835
- */
836
- "disabled"?: boolean;
837
- /**
838
- * Set to 'true' if button should be inverted style.
839
- */
840
- "inverted"?: boolean;
841
- /**
842
- * Set to 'true' if default event should be prevented.
843
- */
844
- "preventDefault"?: boolean;
845
- "quit"?: boolean;
846
- }
847
- interface MbCameraExperience {
848
- /**
849
- * Dictates if Help Screens usage is allowed (turned on).
850
- */
851
- "allowHelpScreens"?: boolean;
852
- /**
853
- * See description in public component.
854
- */
855
- "allowHelpScreensFab"?: boolean;
856
- /**
857
- * See description in public component.
858
- */
859
- "allowHelpScreensOnboarding"?: boolean;
860
- /**
861
- * See description in public component.
862
- */
863
- "allowHelpScreensOnboardingPerpetuity"?: boolean;
864
- /**
865
- * Api state passed from root component.
866
- */
867
- "apiState"?: string;
868
- /**
869
- * Configure camera experience state timeout durations
870
- */
871
- "cameraExperienceStateDurations"?: CameraExperienceStateDurations;
872
- /**
873
- * Camera horizontal state passed from root component. Horizontal camera image can be mirrored
874
- */
875
- "cameraFlipped"?: boolean;
876
- "clearIsCameraActive"?: boolean;
877
- /**
878
- * See description in public component.
879
- */
880
- "helpScreensTooltipPauseTimeout"?: number;
881
- /**
882
- * Emitted when user selects a different camera device.
883
- */
884
- "onChangeCameraDevice"?: (event: MbCameraExperienceCustomEvent<CameraEntry>) => void;
885
- /**
886
- * Emitted when user clicks on 'X' button.
887
- */
888
- "onClose"?: (event: MbCameraExperienceCustomEvent<void>) => void;
889
- /**
890
- * Emitted when user clicks on Flip button.
891
- */
892
- "onFlipCameraAction"?: (event: MbCameraExperienceCustomEvent<void>) => void;
893
- /**
894
- * Emitted when camera stream becomes active.
895
- */
896
- "onSetIsCameraActive"?: (event: MbCameraExperienceCustomEvent<boolean>) => void;
897
- /**
898
- * Show camera feedback message on camera for Barcode scanning
899
- */
900
- "showCameraFeedbackBarcodeMessage"?: boolean;
901
- /**
902
- * Unless specifically granted by your license key, you are not allowed to modify or remove the Microblink logo displayed on the bottom of the camera overlay.
903
- */
904
- "showOverlay"?: boolean;
905
- /**
906
- * Show scanning line on camera
907
- */
908
- "showScanningLine"?: boolean;
909
- /**
910
- * Instance of TranslationService passed from root component.
911
- */
912
- "translationService"?: TranslationService;
913
- /**
914
- * Choose desired camera experience. Each experience type must be implemented in this component.
915
- */
916
- "type"?: CameraExperience;
917
- }
918
- interface MbCameraSelection {
919
- "clearIsCameraActive"?: boolean;
920
- /**
921
- * Emitted when user selects a different camera device.
922
- */
923
- "onChangeCameraDevice"?: (event: MbCameraSelectionCustomEvent<CameraEntry>) => void;
924
- /**
925
- * Emitted when camera stream becomes active.
926
- */
927
- "onSetIsCameraActive"?: (event: MbCameraSelectionCustomEvent<boolean>) => void;
928
- }
929
- interface MbCameraToolbar {
930
- /**
931
- * Whether the camera is flipped, this property will be flip the relevant icon.
932
- */
933
- "cameraFlipped"?: boolean;
934
- "clearIsCameraActive"?: boolean;
935
- /**
936
- * Whether to show 'Camera flip' button.
937
- */
938
- "enableCameraFlip"?: boolean;
939
- /**
940
- * Emitted when user selects a different camera device.
941
- */
942
- "onChangeCameraDevice"?: (event: MbCameraToolbarCustomEvent<CameraEntry>) => void;
943
- /**
944
- * Event which is triggered when close button is clicked.
945
- */
946
- "onCloseEvent"?: (event: MbCameraToolbarCustomEvent<void>) => void;
947
- /**
948
- * Event which is triggered when flip camera button is clicked.
949
- */
950
- "onFlipEvent"?: (event: MbCameraToolbarCustomEvent<void>) => void;
951
- /**
952
- * Emitted when camera stream becomes active.
953
- */
954
- "onSetIsCameraActive"?: (event: MbCameraToolbarCustomEvent<boolean>) => void;
955
- /**
956
- * Set to `true` if close button should be displayed.
957
- */
958
- "showClose"?: boolean;
959
- }
960
- interface MbCompleted {
961
- /**
962
- * Value of `src` attribute for <img> element.
963
- */
964
- "icon"?: string;
965
- }
966
- interface MbComponent {
967
- /**
968
- * See description in public component.
969
- */
970
- "allowHelloMessage"?: boolean;
971
- /**
972
- * Dictates if Help Screens usage is allowed (turned on).
973
- */
974
- "allowHelpScreens"?: boolean;
975
- /**
976
- * See description in public component.
977
- */
978
- "allowHelpScreensFab"?: boolean;
979
- /**
980
- * See description in public component.
981
- */
982
- "allowHelpScreensOnboarding"?: boolean;
983
- /**
984
- * See description in public component.
985
- */
986
- "allowHelpScreensOnboardingPerpetuity"?: boolean;
987
- "blinkIdVariant"?: BlinkIDVariant;
988
- /**
989
- * See description in public component.
990
- */
991
- "cameraExperienceStateDurations"?: CameraExperienceStateDurations;
992
- /**
993
- * Camera device ID passed from root component.
994
- */
995
- "cameraId"?: string | null;
996
- /**
997
- * See description in public component.
998
- */
999
- "enableDrag"?: boolean;
1000
- /**
1001
- * See description in public component.
1002
- */
1003
- "engineLocation"?: string;
1004
- /**
1005
- * See description in public component.
1006
- */
1007
- "galleryDropType"?: "FULLSCREEN" | "INLINE";
1008
- /**
1009
- * See description in public component.
1010
- */
1011
- "galleryOverlayType"?: "FULLSCREEN" | "INLINE";
1012
- /**
1013
- * See description in public component.
1014
- */
1015
- "helpScreensTooltipPauseTimeout"?: number;
1016
- /**
1017
- * See description in public component.
1018
- */
1019
- "hideLoadingAndErrorUi"?: boolean;
1020
- /**
1021
- * See description in public component.
1022
- */
1023
- "iconCameraActive"?: string;
1024
- /**
1025
- * See description in public component.
1026
- */
1027
- "iconCameraDefault"?: string;
1028
- /**
1029
- * See description in public component.
1030
- */
1031
- "iconDragAndDropGalleryDefault"?: string;
1032
- /**
1033
- * See description in public component.
1034
- */
1035
- "iconDragAndDropWarningDefault"?: string;
1036
- /**
1037
- * See description in public component.
1038
- */
1039
- "iconGalleryActive"?: string;
1040
- /**
1041
- * See description in public component.
1042
- */
1043
- "iconGalleryDefault"?: string;
1044
- /**
1045
- * See description in public component.
1046
- */
1047
- "iconGalleryScanningCompleted"?: string;
1048
- /**
1049
- * See description in public component.
1050
- */
1051
- "iconInvalidFormat"?: string;
1052
- /**
1053
- * See description in public component.
1054
- */
1055
- "iconSpinnerFromGalleryExperience"?: string;
1056
- /**
1057
- * See description in public component.
1058
- */
1059
- "iconSpinnerScreenLoading"?: string;
1060
- /**
1061
- * See description in public component.
1062
- */
1063
- "includeSuccessFrame"?: boolean;
1064
- /**
1065
- * See description in public component.
1066
- */
1067
- "licenseKey"?: string;
1068
- /**
1069
- * Event containing boolean which used to check whether component is blocked.
1070
- */
1071
- "onBlock"?: (event: MbComponentCustomEvent<boolean>) => void;
1072
- /**
1073
- * See event 'cameraScanStarted' in public component.
1074
- */
1075
- "onCameraScanStarted"?: (event: MbComponentCustomEvent<null>) => void;
1076
- /**
1077
- * See event 'fatalError' in public component.
1078
- */
1079
- "onFatalError"?: (event: MbComponentCustomEvent<SDKError>) => void;
1080
- /**
1081
- * Event containing FeedbackMessage which can be passed to MbFeedback component.
1082
- */
1083
- "onFeedback"?: (event: MbComponentCustomEvent<FeedbackMessage>) => void;
1084
- /**
1085
- * See event 'imageScanStarted' in public component.
1086
- */
1087
- "onImageScanStarted"?: (event: MbComponentCustomEvent<null>) => void;
1088
- /**
1089
- * See event 'ready' in public component.
1090
- */
1091
- "onReady"?: (event: MbComponentCustomEvent<EventReady>) => void;
1092
- /**
1093
- * See event 'scanAborted' in public component.
1094
- */
1095
- "onScanAborted"?: (event: MbComponentCustomEvent<null>) => void;
1096
- /**
1097
- * See event 'scanError' in public component.
1098
- */
1099
- "onScanError"?: (event: MbComponentCustomEvent<EventScanError>) => void;
1100
- /**
1101
- * See event 'scanSuccess' in public component.
1102
- */
1103
- "onScanSuccess"?: (event: MbComponentCustomEvent<EventScanSuccess>) => void;
1104
- /**
1105
- * Emitted when camera stream becomes active.
1106
- */
1107
- "onSetIsCameraActive"?: (event: MbComponentCustomEvent<boolean>) => void;
1108
- /**
1109
- * See description in public component.
1110
- */
1111
- "pingProxyUrl"?: string | null;
1112
- /**
1113
- * See description in public component.
1114
- */
1115
- "recognitionPauseTimeout"?: number;
1116
- /**
1117
- * See description in public component.
1118
- */
1119
- "recognitionTimeout"?: number;
1120
- /**
1121
- * See description in public component.
1122
- */
1123
- "recognizerOptions"?: { [key: string]: any };
1124
- /**
1125
- * See description in public component.
1126
- */
1127
- "recognizers"?: Array<string>;
1128
- /**
1129
- * See description in public component.
1130
- */
1131
- "rtl"?: boolean;
1132
- /**
1133
- * See description in public component.
1134
- */
1135
- "scanFromCamera"?: boolean;
1136
- /**
1137
- * See description in public component.
1138
- */
1139
- "scanFromImage"?: boolean;
1140
- /**
1141
- * Instance of SdkService passed from root component.
1142
- */
1143
- "sdkService"?: SdkService;
1144
- /**
1145
- * See description in public component.
1146
- */
1147
- "showActionLabels"?: boolean;
1148
- /**
1149
- * See description in public component.
1150
- */
1151
- "showCameraFeedbackBarcodeMessage"?: boolean;
1152
- /**
1153
- * See description in public component.
1154
- */
1155
- "showModalWindows"?: boolean;
1156
- /**
1157
- * See description in public component.
1158
- */
1159
- "showScanningLine"?: boolean;
1160
- /**
1161
- * See description in public component.
1162
- */
1163
- "thoroughScanFromImage"?: boolean;
1164
- /**
1165
- * Instance of TranslationService passed from root component.
1166
- */
1167
- "translationService"?: TranslationService;
1168
- /**
1169
- * See description in public component.
1170
- */
1171
- "wasmType"?: string | null;
1172
- /**
1173
- * See description in public component.
1174
- */
1175
- "workerLocation"?: string;
1176
- }
1177
- interface MbContainer {
1178
- }
1179
- interface MbFeedback {
1180
- /**
1181
- * Set to 'true' if component should be visible.
1182
- */
1183
- "visible"?: boolean;
1184
- }
1185
- interface MbHelp {
1186
- /**
1187
- * Dictates if usage is allowed (turned on).
1188
- */
1189
- "allow"?: boolean;
1190
- /**
1191
- * Dictates if Floating-Action-Button (Fab) is shown.
1192
- */
1193
- "allowFab"?: boolean;
1194
- /**
1195
- * Dictates if the onboarding is allowed.
1196
- */
1197
- "allowOnboarding"?: boolean;
1198
- /**
1199
- * Dictates if onboarding is executed all the time, or just once.
1200
- */
1201
- "allowOnboardingPerpetuity"?: boolean;
1202
- /**
1203
- * Dictates Milliseconds after which a "Need Help?" tooltip will be shown.
1204
- */
1205
- "tooltipPauseTimeout"?: number;
1206
- /**
1207
- * Translation service.
1208
- */
1209
- "translationService": TranslationService;
1210
- }
1211
- interface MbImageBox {
1212
- /**
1213
- * Text which should be displayed inside 'Add image' anchor element when file is not selected.
1214
- */
1215
- "anchorText"?: string;
1216
- /**
1217
- * Text which represents name of the image.
1218
- */
1219
- "boxTitle"?: string;
1220
- /**
1221
- * Event which is triggered when selected image file is changed.
1222
- */
1223
- "onImageChange"?: (event: MbImageBoxCustomEvent<FileList>) => void;
1224
- }
1225
- interface MbModal {
1226
- /**
1227
- * Center component
1228
- */
1229
- "centered"?: boolean;
1230
- /**
1231
- * Passed body content from parent component
1232
- */
1233
- "content"?: string;
1234
- /**
1235
- * Center content inside modal
1236
- */
1237
- "contentCentered"?: boolean;
1238
- /**
1239
- * Show shadow drop
1240
- */
1241
- "elevated"?: boolean;
1242
- /**
1243
- * Whether to hide the close button or not.
1244
- */
1245
- "hideCloseButton"?: boolean;
13
+ "alignmentTolerance": number;
1246
14
  /**
1247
- * Whether to hide the footer or not
15
+ * @default false
1248
16
  */
1249
- "hideFooter"?: boolean;
1250
- /**
1251
- * Passed title content from parent component
1252
- */
1253
- "modalTitle"?: string;
1254
- /**
1255
- * Emitted when user clicks on 'Back Arrow' button.
1256
- */
1257
- "onBack"?: (event: MbModalCustomEvent<void>) => void;
1258
- /**
1259
- * Emitted when user clicks on 'X' button.
1260
- */
1261
- "onClose"?: (event: MbModalCustomEvent<void>) => void;
1262
- /**
1263
- * Whether to show back arrow or not
1264
- */
1265
- "showBackButton"?: boolean;
1266
- /**
1267
- * Show modal content
1268
- */
1269
- "visible"?: boolean;
1270
- }
1271
- interface MbOverlay {
1272
- /**
1273
- * Set to 'false' if overlay should not cover whole screen.
1274
- */
1275
- "fullscreen"?: boolean;
1276
- /**
1277
- * Set to 'true' if overlay should be visible.
1278
- */
1279
- "visible"?: boolean;
1280
- }
1281
- interface MbProgressTracker {
1282
- /**
1283
- * Current step. Steps start from 1 up to the size number. Default is 1.
1284
- */
1285
- "current"?: number;
1286
- /**
1287
- * Steps count. Default is 3.
1288
- */
1289
- "size"?: number;
17
+ "debug": boolean;
18
+ "getCapturedImages": () => Promise<{ front: { fullFrame: string; cropped: string; }; back: { fullFrame: string; cropped: string; }; metadata: { hasBackCapture: boolean; totalImages: number; }; }>;
19
+ "getStatus": () => Promise<{ isVideoActive: boolean; captureStep: "front" | "back" | "completed"; statusMessage: string; hasImages: boolean; isProcessCompleted: boolean; isModelPreloaded: boolean; }>;
20
+ "isProcessCompleted": () => Promise<boolean>;
21
+ "preloadModel": () => Promise<{ success: boolean; message: string; error?: undefined; } | { success: boolean; error: any; message?: undefined; }>;
22
+ "resetCapture": () => Promise<void>;
23
+ "skipBackCapture": () => Promise<void>;
24
+ "startCapture": () => Promise<void>;
25
+ "stopCapture": () => Promise<void>;
1290
26
  }
1291
- interface MbScreen {
1292
- /**
1293
- * Set to 'true' if screen should be visible.
1294
- */
1295
- "visible"?: boolean;
27
+ }
28
+ export interface JaakStampsCustomEvent<T> extends CustomEvent<T> {
29
+ detail: T;
30
+ target: HTMLJaakStampsElement;
31
+ }
32
+ declare global {
33
+ interface HTMLJaakStampsElementEventMap {
34
+ "captureCompleted": any;
35
+ "isReady": boolean;
36
+ }
37
+ interface HTMLJaakStampsElement extends Components.JaakStamps, HTMLStencilElement {
38
+ addEventListener<K extends keyof HTMLJaakStampsElementEventMap>(type: K, listener: (this: HTMLJaakStampsElement, ev: JaakStampsCustomEvent<HTMLJaakStampsElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
39
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
40
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
41
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
42
+ removeEventListener<K extends keyof HTMLJaakStampsElementEventMap>(type: K, listener: (this: HTMLJaakStampsElement, ev: JaakStampsCustomEvent<HTMLJaakStampsElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
43
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
44
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
45
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
46
+ }
47
+ var HTMLJaakStampsElement: {
48
+ prototype: HTMLJaakStampsElement;
49
+ new (): HTMLJaakStampsElement;
50
+ };
51
+ interface HTMLElementTagNameMap {
52
+ "jaak-stamps": HTMLJaakStampsElement;
1296
53
  }
1297
- interface MbSpinner {
54
+ }
55
+ declare namespace LocalJSX {
56
+ interface JaakStamps {
1298
57
  /**
1299
- * Value of `src` attribute for <img> element.
58
+ * @default 10
1300
59
  */
1301
- "icon"?: string;
60
+ "alignmentTolerance"?: number;
1302
61
  /**
1303
- * Spinner size, can be 'default' or 'large'.
62
+ * @default false
1304
63
  */
1305
- "size"?: string;
1306
- }
1307
- interface MbTooltip {
1308
- "arrowPosition"?: | "arrow-left"
1309
- | "arrow-right"
1310
- | "arrow-up"
1311
- | "arrow-down"
1312
- | "arrow-none";
1313
- "containerWidth"?: string;
1314
- "message"?: string;
1315
- "show"?: boolean;
1316
- "showInfoIcon"?: boolean;
1317
- "showWarningIcon"?: boolean;
1318
- "textAlign"?: "text-center" | "text-left" | "text-right";
1319
- }
1320
- interface MbTooltipAdvanced {
1321
- "arrowPosition"?: | "arrow-left"
1322
- | "arrow-right"
1323
- | "arrow-up"
1324
- | "arrow-up-left"
1325
- | "arrow-up-right"
1326
- | "arrow-down"
1327
- | "arrow-down-left"
1328
- | "arrow-down-right";
1329
- "message"?: string;
1330
- "show"?: boolean;
1331
- "textAlign"?: "text-center" | "text-left" | "text-right";
64
+ "debug"?: boolean;
65
+ "onCaptureCompleted"?: (event: JaakStampsCustomEvent<any>) => void;
66
+ "onIsReady"?: (event: JaakStampsCustomEvent<boolean>) => void;
1332
67
  }
1333
68
  interface IntrinsicElements {
1334
- "document-detector": DocumentDetector;
1335
- "mb-api-process-status": MbApiProcessStatus;
1336
- "mb-button": MbButton;
1337
- "mb-button-classic": MbButtonClassic;
1338
- "mb-camera-experience": MbCameraExperience;
1339
- "mb-camera-selection": MbCameraSelection;
1340
- "mb-camera-toolbar": MbCameraToolbar;
1341
- "mb-completed": MbCompleted;
1342
- "mb-component": MbComponent;
1343
- "mb-container": MbContainer;
1344
- "mb-feedback": MbFeedback;
1345
- "mb-help": MbHelp;
1346
- "mb-image-box": MbImageBox;
1347
- "mb-modal": MbModal;
1348
- "mb-overlay": MbOverlay;
1349
- "mb-progress-tracker": MbProgressTracker;
1350
- "mb-screen": MbScreen;
1351
- "mb-spinner": MbSpinner;
1352
- "mb-tooltip": MbTooltip;
1353
- "mb-tooltip-advanced": MbTooltipAdvanced;
69
+ "jaak-stamps": JaakStamps;
1354
70
  }
1355
71
  }
1356
72
  export { LocalJSX as JSX };
1357
73
  declare module "@stencil/core" {
1358
74
  export namespace JSX {
1359
75
  interface IntrinsicElements {
1360
- "document-detector": LocalJSX.DocumentDetector & JSXBase.HTMLAttributes<HTMLDocumentDetectorElement>;
1361
- "mb-api-process-status": LocalJSX.MbApiProcessStatus & JSXBase.HTMLAttributes<HTMLMbApiProcessStatusElement>;
1362
- "mb-button": LocalJSX.MbButton & JSXBase.HTMLAttributes<HTMLMbButtonElement>;
1363
- "mb-button-classic": LocalJSX.MbButtonClassic & JSXBase.HTMLAttributes<HTMLMbButtonClassicElement>;
1364
- "mb-camera-experience": LocalJSX.MbCameraExperience & JSXBase.HTMLAttributes<HTMLMbCameraExperienceElement>;
1365
- "mb-camera-selection": LocalJSX.MbCameraSelection & JSXBase.HTMLAttributes<HTMLMbCameraSelectionElement>;
1366
- "mb-camera-toolbar": LocalJSX.MbCameraToolbar & JSXBase.HTMLAttributes<HTMLMbCameraToolbarElement>;
1367
- "mb-completed": LocalJSX.MbCompleted & JSXBase.HTMLAttributes<HTMLMbCompletedElement>;
1368
- "mb-component": LocalJSX.MbComponent & JSXBase.HTMLAttributes<HTMLMbComponentElement>;
1369
- "mb-container": LocalJSX.MbContainer & JSXBase.HTMLAttributes<HTMLMbContainerElement>;
1370
- "mb-feedback": LocalJSX.MbFeedback & JSXBase.HTMLAttributes<HTMLMbFeedbackElement>;
1371
- "mb-help": LocalJSX.MbHelp & JSXBase.HTMLAttributes<HTMLMbHelpElement>;
1372
- "mb-image-box": LocalJSX.MbImageBox & JSXBase.HTMLAttributes<HTMLMbImageBoxElement>;
1373
- "mb-modal": LocalJSX.MbModal & JSXBase.HTMLAttributes<HTMLMbModalElement>;
1374
- "mb-overlay": LocalJSX.MbOverlay & JSXBase.HTMLAttributes<HTMLMbOverlayElement>;
1375
- "mb-progress-tracker": LocalJSX.MbProgressTracker & JSXBase.HTMLAttributes<HTMLMbProgressTrackerElement>;
1376
- "mb-screen": LocalJSX.MbScreen & JSXBase.HTMLAttributes<HTMLMbScreenElement>;
1377
- "mb-spinner": LocalJSX.MbSpinner & JSXBase.HTMLAttributes<HTMLMbSpinnerElement>;
1378
- "mb-tooltip": LocalJSX.MbTooltip & JSXBase.HTMLAttributes<HTMLMbTooltipElement>;
1379
- "mb-tooltip-advanced": LocalJSX.MbTooltipAdvanced & JSXBase.HTMLAttributes<HTMLMbTooltipAdvancedElement>;
76
+ "jaak-stamps": LocalJSX.JaakStamps & JSXBase.HTMLAttributes<HTMLJaakStampsElement>;
1380
77
  }
1381
78
  }
1382
79
  }