@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
@@ -1,26 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-5e4e5e7d.js');
6
-
7
- const mbTooltipCss = ":host{display:block}.mb-tooltip{display:none;position:absolute;margin:2px 40px 2px 32px;padding:8px;font-size:12px;line-height:16px;color:#374151;background-color:#fff;border:1px solid rgba(120, 120, 128, 0.2);filter:drop-shadow(0px 2px 4px rgba(31, 41, 55, 0.06)) drop-shadow(0px 4px 6px rgba(31, 41, 55, 0.1));border-radius:4px}.mb-tooltip.text-center{text-align:center}.mb-tooltip.text-left{text-align:left}.mb-tooltip.text-right{text-align:right}.mb-tooltip svg{display:block;float:left;margin:6px 14px 6px 6px}.mb-tooltip::after{position:absolute;display:block;content:\" \";background-color:#fff;width:10px;height:10px;transform:rotate(-45deg)}.mb-tooltip.arrow-none::after{display:none}.mb-tooltip.arrow-left::after{left:-3px;top:calc(50% - 5px)}.mb-tooltip.arrow-right::after{right:-3px;top:calc(50% - 5px)}.mb-tooltip.arrow-up::after{top:-3px;left:calc(50% - 5px)}.mb-tooltip.arrow-down::after{bottom:-3px;left:calc(50% - 5px)}.mb-tooltip.visible{display:block}";
8
-
9
- const MbTooltip = class {
10
- constructor(hostRef) {
11
- index.registerInstance(this, hostRef);
12
- this.show = undefined;
13
- this.message = undefined;
14
- this.arrowPosition = undefined;
15
- this.showWarningIcon = undefined;
16
- this.showInfoIcon = undefined;
17
- this.textAlign = undefined;
18
- this.containerWidth = undefined;
19
- }
20
- render() {
21
- return (index.h(index.Host, null, index.h("p", { part: "tooltip", class: `mb-tooltip ${this.show ? "visible" : ""} ${this.arrowPosition ? this.arrowPosition : "arrow-none"} ${this.textAlign ? this.textAlign : "text-center"} ` }, this.message)));
22
- }
23
- };
24
- MbTooltip.style = mbTooltipCss;
25
-
26
- exports.mb_tooltip = MbTooltip;
@@ -1,23 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-5e4e5e7d.js');
6
-
7
- /*
8
- Stencil Client Patch Browser v2.22.3 | MIT Licensed | https://stenciljs.com
9
- */
10
- const patchBrowser = () => {
11
- const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('stamps.cjs.js', document.baseURI).href));
12
- const opts = {};
13
- if (importMeta !== '') {
14
- opts.resourcesUrl = new URL('.', importMeta).href;
15
- }
16
- return index.promiseResolve(opts);
17
- };
18
-
19
- patchBrowser().then(options => {
20
- return index.bootstrapLazy([["mb-tooltip.cjs",[[1,"mb-tooltip",{"show":[4],"message":[1],"arrowPosition":[1,"arrow-position"],"showWarningIcon":[4,"show-warning-icon"],"showInfoIcon":[4,"show-info-icon"],"textAlign":[1,"text-align"],"containerWidth":[1,"container-width"]}]]],["document-detector_19.cjs",[[1,"document-detector",{"licenseKey":[1025,"license-key"],"config":[1040],"restart":[32],"setUiState":[64],"startCameraScan":[64],"startImageScan":[64],"startMultiSideImageScan":[64],"setUiMessage":[64],"getProductIntegrationInfo":[64],"restartComponent":[64]}],[1,"mb-component",{"allowHelloMessage":[4,"allow-hello-message"],"engineLocation":[1,"engine-location"],"workerLocation":[1,"worker-location"],"licenseKey":[1,"license-key"],"wasmType":[1025,"wasm-type"],"blinkIdVariant":[1,"blink-id-variant"],"recognizers":[1040],"recognizerOptions":[1040],"recognitionTimeout":[2,"recognition-timeout"],"recognitionPauseTimeout":[2,"recognition-pause-timeout"],"cameraExperienceStateDurations":[16],"includeSuccessFrame":[4,"include-success-frame"],"enableDrag":[4,"enable-drag"],"hideLoadingAndErrorUi":[4,"hide-loading-and-error-ui"],"rtl":[4],"scanFromCamera":[4,"scan-from-camera"],"scanFromImage":[4,"scan-from-image"],"thoroughScanFromImage":[4,"thorough-scan-from-image"],"galleryOverlayType":[1,"gallery-overlay-type"],"galleryDropType":[1,"gallery-drop-type"],"showActionLabels":[4,"show-action-labels"],"showModalWindows":[4,"show-modal-windows"],"showCameraFeedbackBarcodeMessage":[4,"show-camera-feedback-barcode-message"],"showScanningLine":[4,"show-scanning-line"],"iconCameraDefault":[1,"icon-camera-default"],"iconCameraActive":[1,"icon-camera-active"],"iconGalleryDefault":[1,"icon-gallery-default"],"iconDragAndDropGalleryDefault":[1,"icon-drag-and-drop-gallery-default"],"iconDragAndDropWarningDefault":[1,"icon-drag-and-drop-warning-default"],"iconGalleryActive":[1,"icon-gallery-active"],"iconInvalidFormat":[1,"icon-invalid-format"],"iconSpinnerScreenLoading":[1,"icon-spinner-screen-loading"],"iconSpinnerFromGalleryExperience":[1,"icon-spinner-from-gallery-experience"],"iconGalleryScanningCompleted":[1,"icon-gallery-scanning-completed"],"sdkService":[16],"translationService":[16],"cameraId":[1,"camera-id"],"allowHelpScreens":[4,"allow-help-screens"],"allowHelpScreensFab":[4,"allow-help-screens-fab"],"allowHelpScreensOnboarding":[4,"allow-help-screens-onboarding"],"allowHelpScreensOnboardingPerpetuity":[4,"allow-help-screens-onboarding-perpetuity"],"helpScreensTooltipPauseTimeout":[2,"help-screens-tooltip-pause-timeout"],"pingProxyUrl":[1,"ping-proxy-url"],"galleryExperienceModalErrorWindowVisible":[32],"clearIsCameraActive":[32],"apiProcessStatusVisible":[32],"apiProcessStatusState":[32],"startCameraScan":[64],"startImageScan":[64],"startMultiSideImageScan":[64],"setUiState":[64]},[[8,"keyup","handleKeyUp"]]],[1,"mb-container"],[1,"mb-feedback",{"visible":[4],"paragraphClassName":[32],"paragraphValue":[32],"show":[64]}],[1,"mb-camera-experience",{"type":[1],"cameraExperienceStateDurations":[16],"showOverlay":[4,"show-overlay"],"translationService":[16],"apiState":[1,"api-state"],"cameraFlipped":[1028,"camera-flipped"],"showScanningLine":[4,"show-scanning-line"],"showCameraFeedbackBarcodeMessage":[4,"show-camera-feedback-barcode-message"],"clearIsCameraActive":[4,"clear-is-camera-active"],"allowHelpScreens":[4,"allow-help-screens"],"allowHelpScreensFab":[4,"allow-help-screens-fab"],"allowHelpScreensOnboarding":[4,"allow-help-screens-onboarding"],"allowHelpScreensOnboardingPerpetuity":[4,"allow-help-screens-onboarding-perpetuity"],"helpScreensTooltipPauseTimeout":[2,"help-screens-tooltip-pause-timeout"],"cameraCursorBarcodeClassName":[32],"cameraCursorIdentityCardClassName":[32],"scanningLineBarcodeClassName":[32],"cameraMessageIdentityCardContent":[32],"cameraMessageIdentityCardClassName":[32],"setActiveCamera":[64],"populateCameraDevices":[64],"setCameraFlipState":[64],"initializeHelpScreens":[64],"openHelpScreensOnboarding":[64],"terminateHelpScreens":[64],"setState":[64],"resetState":[64]}],[1,"mb-api-process-status",{"visible":[4],"state":[1],"translationService":[16]}],[1,"mb-button",{"clickHandler":[16],"disabled":[4],"visible":[4],"selected":[4],"imageSrcDefault":[1,"image-src-default"],"imageSrcActive":[1,"image-src-active"],"imageAlt":[1,"image-alt"],"label":[1],"buttonTitle":[1,"button-title"]}],[1,"mb-completed",{"icon":[1]}],[1,"mb-image-box",{"boxTitle":[1,"box-title"],"anchorText":[1,"anchor-text"],"clear":[64]}],[1,"mb-screen",{"visible":[4]}],[1,"mb-spinner",{"icon":[1],"size":[1]}],[1,"mb-help",{"allow":[4],"allowFab":[4,"allow-fab"],"allowOnboarding":[4,"allow-onboarding"],"allowOnboardingPerpetuity":[4,"allow-onboarding-perpetuity"],"tooltipPauseTimeout":[2,"tooltip-pause-timeout"],"translationService":[16],"isInitialized":[32],"isTooltipShownHover":[32],"isTooltipShownTimer":[32],"isModalShown":[32],"activeStepIndex":[32],"initialize":[64],"openOnboarding":[64],"openHelpScreens":[64],"close":[64],"terminate":[64]}],[1,"mb-camera-toolbar",{"showClose":[4,"show-close"],"clearIsCameraActive":[4,"clear-is-camera-active"],"enableCameraFlip":[4,"enable-camera-flip"],"cameraFlipped":[4,"camera-flipped"],"showCloseButton":[32],"isDesktop":[32],"setActiveCamera":[64],"populateCameraDevices":[64]},[[2,"setIsCameraActive","handleSetIsCameraActive"]]],[1,"mb-button-classic",{"inverted":[4],"quit":[4],"disabled":[4],"preventDefault":[4,"prevent-default"],"clickHandler":[16]}],[1,"mb-camera-selection",{"clearIsCameraActive":[4,"clear-is-camera-active"],"activeCamera":[32],"cameraList":[32],"isListVisible":[32],"setActiveCamera":[64],"populateCameraDevices":[64]}],[1,"mb-overlay",{"fullscreen":[4],"visible":[4]}],[1,"mb-progress-tracker",{"size":[2],"current":[2]}],[1,"mb-tooltip-advanced",{"show":[4],"message":[1],"arrowPosition":[1,"arrow-position"],"textAlign":[1,"text-align"]}],[1,"mb-modal",{"visible":[4],"elevated":[4],"centered":[4],"modalTitle":[1,"modal-title"],"content":[1],"contentCentered":[4,"content-centered"],"showBackButton":[4,"show-back-button"],"hideFooter":[4,"hide-footer"],"hideCloseButton":[4,"hide-close-button"]}]]]], options);
21
- });
22
-
23
- exports.setNonce = index.setNonce;
@@ -1,156 +0,0 @@
1
- /**
2
- * Copyright (c) Microblink Ltd. All rights reserved.
3
- *
4
- * SASS variables, not customizable via CSS variables
5
- */
6
- /**
7
- * Camera experiences
8
- */
9
- /**
10
- * CSS variables
11
- *
12
- * Note: when adding or modifying these values during development, Stencil must
13
- * be reloaded for the changes to take effect.
14
- */
15
- :host {
16
- /* General properties */
17
- --mb-font-family: inherit;
18
- --mb-font-size: max(16px, 1rem);
19
- --mb-font-size-desktop: max(20px, 1rem);
20
- --mb-font-style: normal;
21
- --mb-font-weight: 400;
22
- --mb-letter-spacing: normal;
23
- --mb-line-height: 1.5em;
24
- /* Component (UI with buttons) */
25
- --mb-component-background: #f9fafb;
26
- --mb-component-width: 100%;
27
- --mb-component-font-color: #000;
28
- --mb-component-font-color-secondary: #3c3c43b2;
29
- --mb-component-font-size: 14px;
30
- --mb-component-text-transform: none;
31
- --mb-component-border-color: rgba(120, 120, 128, 0.2);
32
- --mb-component-border-radius: 5px;
33
- --mb-component-border-style: solid;
34
- --mb-component-border-width: 1px;
35
- --mb-component-box-shadow: none;
36
- --mb-component-button-size: 36px;
37
- --mb-component-button-icon-size: 20px;
38
- --mb-component-button-background: #fff;
39
- --mb-component-button-hover-background: #f9fafb;
40
- --mb-component-button-background-selected: rgba(72, 178, 232, 0.1);
41
- --mb-component-button-border-color: #d1d5db;
42
- --mb-component-button-border-color-selected: rgba(120, 120, 128, 0.2);
43
- --mb-component-button-border-color-focus: #9ca3af;
44
- --mb-component-button-border-color-hover: rgba(60, 60, 67, 0.29);
45
- --mb-component-button-border-color-disabled: rgba(116, 116, 128, 0.08);
46
- --mb-component-button-border-radius: 50%;
47
- --mb-component-button-border-style: solid;
48
- --mb-component-button-border-width: 1px;
49
- --mb-component-button-box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.1);
50
- --mb-component-button-box-shadow-disabled: none;
51
- --mb-component-button-classic-background: #0062f2;
52
- --mb-component-button-classic-hover-background: #3a89fd;
53
- --mb-component-button-classic-inverted-hover-background: #f9fafb;
54
- --mb-component-button-classic-focused-border-color: #142641;
55
- --mb-component-button-classic-inverted-text-color: #374151;
56
- --mb-component-button-classic-inverted-border-color: #9ca3af;
57
- --mb-component-button-classic-font-size: 14px;
58
- --mb-component-button-classic-font-weight: 700;
59
- --mb-component-button-classic-text-color: #fff;
60
- --mb-component-button-classic-line-height: 20px;
61
- --mb-component-button-classic-border-radius: 100px;
62
- --mb-component-image-box-border-color: rgba(120, 120, 128, 0.2);
63
- --mb-component-image-box-border-radius: 2px;
64
- --mb-component-image-box-border-width: 1px;
65
- --mb-component-image-box-label-height: 16px;
66
- --mb-component-image-box-label-color: rgba(60, 60, 67, 0.5);
67
- --mb-component-image-box-label-font-size: 14px;
68
- --mb-component-image-box-label-font-weight: 400;
69
- --mb-component-image-box-cta-height: 20px;
70
- --mb-component-image-box-cta-label-height: 20px;
71
- --mb-component-image-box-cta-color: var(
72
- --mb-component-button-classic-background
73
- );
74
- --mb-component-image-box-cta-color-hover: var(
75
- --mb-component-button-classic-hover-background
76
- );
77
- --mb-component-image-box-cta-font-size: 14px;
78
- --mb-component-image-box-cta-font-weight: 500;
79
- --mb-component-image-box-file-color: #000;
80
- --mb-component-image-box-file-font-weight: 400;
81
- --mb-component-action-buttons-justify-content: flex-end;
82
- --mb-component-action-buttons-gap: 8px;
83
- --mb-component-action-label: block;
84
- --mb-component-action-label-font-size: 14px;
85
- /* Camera scanning UI */
86
- --mb-blur-filter: 27px;
87
- --mb-blur-scanning-line: 4px;
88
- --mb-toolbar-color: #fff;
89
- --mb-toolbar-border-color: #fff;
90
- --mb-toolbar-border-radius: 4px;
91
- --mb-toolbar-list-border-radius: 4px;
92
- --mb-toolbar-list-item-border-radius: 2px;
93
- --mb-toolbar-list-item-active-text-color: #0062f2;
94
- --mb-toolbar-list-item-active-background-color: #e7f0ff;
95
- --mb-toolbar-selection-width: 298px;
96
- --mb-toolbar-list-background: #fff;
97
- --mb-toolbar-list-shadow: 0px 2px 8px rgba(0, 0, 0, 0.05),
98
- 0px 2px 24px rgba(0, 0, 0, 0.1);
99
- --mb-toolbar-camera-name-font-weight: 500;
100
- --mb-reticle-size: 6em;
101
- /* User feedback (messages below buttons) */
102
- --mb-feedback-font-color-error: #f43f5e;
103
- --mb-feedback-font-color-info: #6b7280;
104
- --mb-feedback-font-size: 12px;
105
- --mb-feedback-font-style: normal;
106
- --mb-feedback-font-weight: 400;
107
- --mb-feedback-letter-spacing: normal;
108
- --mb-feedback-line-height: 16px;
109
- --mb-feedback-text-transform: none;
110
- /* Overlays */
111
- --mb-overlay-draganddrop-background: #dceaff;
112
- --mb-overlay-draganddrop-background-error: #ffeaee;
113
- --mb-overlay-draganddrop-border-color: #3a89fd;
114
- --mb-overlay-draganddrop-text-color: #0062f2;
115
- --mb-overlay-draganddrop-text-error-color: #e11d48;
116
- --mb-overlay-draganddrop-border-color-error: #ff2d55;
117
- --mb-overlay-draganddrop-border-style: dashed;
118
- --mb-overlay-gallery-experience-background: rgba(0, 0, 0, 0.6);
119
- --mb-overlay-gallery-experience-font-color: #fff;
120
- --mb-overlay-gallery-experience-font-size: 1em;
121
- --mb-overlay-gallery-experience-font-weight: 500;
122
- --mb-overlay-gallery-experience-line-height: 1.5em;
123
- --mb-overlay-deviceselection-background: rgba(17, 24, 39, 0.15);
124
- /* Modals */
125
- --mb-modal-title-font-size: 1em;
126
- --mb-modal-title-line-height: 32px;
127
- --mb-modal-content-font-size: 0.875em;
128
- --mb-modal-content-line-height: 1.4em;
129
- --mb-modal-border-radius: 8px;
130
- --mb-modal-background: #ffffff;
131
- /* Help Screens */
132
- --mb-help-color-success: #10b981;
133
- --mb-help-color-danger: #f43f5e;
134
- --mb-help-font-color-primary: #142641;
135
- --mb-help-font-color-secondary: #4b5563;
136
- --mb-help-modal-background-color: var(--mb-modal-background);
137
- --mb-help-modal-backdrop-color: rgba(17, 23, 39, 0.5);
138
- --mb-help-lobby-button-background-color: white;
139
- --mb-help-lobby-button-border-color: white;
140
- --mb-help-lobby-button-hovered-background-color: #f3f4f6;
141
- --mb-help-lobby-button-hovered-border-color: #e7f0ff;
142
- --mb-help-lobby-button-focused-background-color: #f3f4f6;
143
- --mb-help-lobby-button-focused-border-color: #e7f0ff;
144
- --mb-help-lobby-button-icon-color: #0062f2;
145
- --mb-help-progress-tracker-dot-active-color: #0062f2;
146
- --mb-help-progress-tracker-dot-inactive-color: #c6c6c8;
147
- --mb-help-lobby-button-tooltip-background-color: #0062f2;
148
- --mb-help-lobby-button-tooltip-font-color: white;
149
- }
150
-
151
- :host {
152
- display: block;
153
- width: 100%;
154
- height: 100%;
155
- position: relative;
156
- }
@@ -1,416 +0,0 @@
1
- import { Host, h, } from "@stencil/core";
2
- import { SdkService } from "../../utils/sdk.service";
3
- import { TranslationService } from "../../utils/translation.service";
4
- import * as GenericHelpers from "../../utils/generic.helpers";
5
- import { StatusDocumentDetector } from "../../utils/status.document-detector";
6
- export class DocumentDetector {
7
- constructor() {
8
- this.blocked = false;
9
- this.allowHelloMessage = false;
10
- this.engineLocation = "https://storage.googleapis.com/jaak-storage/models/web/document-detector/v2.0.0";
11
- this.workerLocation = "https://storage.googleapis.com/jaak-storage/models/web/document-detector/v2.0.0/BlinkIDWasmSDK.worker.min.js";
12
- this.wasmType = "ADVANCE";
13
- this.blinkIdVariant = "lightweight";
14
- this.recognizers = ['BlinkIdMultiSideRecognizer'];
15
- this.recognizerOptions = {
16
- BlinkIdMultiSideRecognizer: {
17
- returnEncodedFullDocumentImage: true,
18
- returnEncodedFaceImage: true,
19
- returnEncodedSignatureImage: true,
20
- fullDocumentImageExtensionFactors: {
21
- upFactor: 0.1,
22
- downFactor: 0.1,
23
- leftFactor: 0.1,
24
- rightFactor: 0.1
25
- },
26
- fullDocumentImageDpi: 300
27
- }
28
- };
29
- this.recognitionPauseTimeout = 3800;
30
- this.cameraExperienceStateDurations = null;
31
- this.enableDrag = false;
32
- this.hideFeedback = true;
33
- this.hideLoadingAndErrorUi = false;
34
- this.scanFromCamera = true;
35
- this.scanFromImage = false;
36
- this.thoroughScanFromImage = false;
37
- this.galleryOverlayType = "INLINE";
38
- this.galleryDropType = "INLINE";
39
- this.showActionLabels = false;
40
- this.showModalWindows = false;
41
- this.showCameraFeedbackBarcodeMessage = false;
42
- this.cameraId = null;
43
- this.allowHelpScreensFab = false;
44
- this.allowHelpScreensOnboarding = false;
45
- this.allowHelpScreensOnboardingPerpetuity = false;
46
- this.helpScreensTooltipPauseTimeout = 15000;
47
- this.pingProxyUrl = null;
48
- this.fatalError = {
49
- emit: (data) => {
50
- this.status.emit(StatusDocumentDetector.ERROR);
51
- return undefined;
52
- }
53
- };
54
- this.ready = {
55
- emit: (data) => {
56
- this.status.emit(StatusDocumentDetector.INITIALIZING);
57
- return undefined;
58
- }
59
- };
60
- this.scanError = {
61
- emit: (data) => {
62
- this.status.emit(StatusDocumentDetector.ERROR);
63
- return undefined;
64
- }
65
- };
66
- this.scanSuccess = {
67
- emit: (data) => {
68
- this.results.emit(data?.data?.data);
69
- this.status.emit(StatusDocumentDetector.RESULTS_SUCCESS);
70
- return undefined;
71
- }
72
- };
73
- this.feedback = {
74
- emit: (data) => {
75
- console.log(data);
76
- return undefined;
77
- }
78
- };
79
- this.cameraScanStarted = {
80
- emit: () => {
81
- this.status.emit(StatusDocumentDetector.RECORDING);
82
- return undefined;
83
- }
84
- };
85
- this.imageScanStarted = {
86
- emit: () => {
87
- this.status.emit(StatusDocumentDetector.RUNNING);
88
- return undefined;
89
- }
90
- };
91
- this.scanAborted = {
92
- emit: () => {
93
- this.status.emit(StatusDocumentDetector.DETECTION_FAILED);
94
- return undefined;
95
- }
96
- };
97
- this.restart = false;
98
- this.licenseKey = undefined;
99
- this.config = undefined;
100
- }
101
- configHandler(newConfig) {
102
- if (newConfig && newConfig.key) {
103
- this.licenseKey = newConfig.key;
104
- }
105
- }
106
- async setUiState(state) {
107
- this.mbComponentEl.setUiState(state);
108
- }
109
- async startCameraScan() {
110
- this.mbComponentEl.startCameraScan();
111
- }
112
- async startImageScan(file) {
113
- this.mbComponentEl.startImageScan(file);
114
- }
115
- async startMultiSideImageScan(firstFile, secondFile) {
116
- this.mbComponentEl.startMultiSideImageScan(firstFile, secondFile);
117
- }
118
- async setUiMessage(state, message) {
119
- this.feedbackEl.show({ state, message });
120
- }
121
- async getProductIntegrationInfo() {
122
- return this.sdkService?.getProductIntegrationInfo();
123
- }
124
- async restartComponent() {
125
- this.sdkService?.delete();
126
- this.init();
127
- this.restart = true;
128
- setTimeout(() => {
129
- this.restart = false;
130
- setTimeout(() => {
131
- this.startCameraScan();
132
- }, 300);
133
- }, 100);
134
- }
135
- componentWillLoad() {
136
- if (this.config && this.config.key) {
137
- this.licenseKey = this.config.key;
138
- }
139
- this.init();
140
- }
141
- componentWillUpdate() {
142
- if (this.blocked) {
143
- return;
144
- }
145
- if (this.config && this.config.key) {
146
- this.licenseKey = this.config.key;
147
- }
148
- this.sdkService?.delete();
149
- this.init();
150
- }
151
- disconnectedCallback() {
152
- this.sdkService?.delete();
153
- }
154
- init() {
155
- const rawRecognizers = GenericHelpers.stringToArray(this.rawRecognizers);
156
- this.finalRecognizers = this.recognizers
157
- ? this.recognizers
158
- : rawRecognizers;
159
- const rawTranslations = GenericHelpers.stringToObject(this.rawTranslations);
160
- this.finalTranslations = this.translations
161
- ? this.translations
162
- : rawTranslations;
163
- this.translationService = new TranslationService(this.finalTranslations || {});
164
- this.sdkService = new SdkService();
165
- }
166
- render() {
167
- return (h(Host, null, h("mb-container", null, !this.restart && (h("mb-component", { dir: this.hostEl.getAttribute("dir"), ref: (el) => (this.mbComponentEl = el), allowHelloMessage: this.allowHelloMessage, recognitionPauseTimeout: this.recognitionPauseTimeout, cameraExperienceStateDurations: this.cameraExperienceStateDurations, engineLocation: this.engineLocation, workerLocation: this.workerLocation, licenseKey: this.licenseKey, wasmType: this.wasmType, blinkIdVariant: this.blinkIdVariant, recognizers: this.finalRecognizers, recognizerOptions: this.recognizerOptions, recognitionTimeout: this.recognitionTimeout, enableDrag: this.enableDrag, hideLoadingAndErrorUi: this.hideLoadingAndErrorUi, scanFromCamera: this.scanFromCamera, scanFromImage: this.scanFromImage, thoroughScanFromImage: this.thoroughScanFromImage, galleryOverlayType: this.galleryOverlayType, galleryDropType: this.galleryDropType, showActionLabels: this.showActionLabels, showModalWindows: this.showModalWindows, showCameraFeedbackBarcodeMessage: this.showCameraFeedbackBarcodeMessage, iconCameraDefault: this.iconCameraDefault, iconCameraActive: this.iconCameraActive, iconGalleryDefault: this.iconGalleryDefault, iconGalleryActive: this.iconGalleryActive, iconInvalidFormat: this.iconInvalidFormat, iconSpinnerScreenLoading: this.iconSpinnerScreenLoading, iconSpinnerFromGalleryExperience: this.iconSpinnerFromGalleryExperience, iconGalleryScanningCompleted: this.iconGalleryScanningCompleted, sdkService: this.sdkService, translationService: this.translationService, cameraId: this.cameraId, allowHelpScreens: false, pingProxyUrl: this.pingProxyUrl, allowHelpScreensFab: this.allowHelpScreensFab, allowHelpScreensOnboarding: this.allowHelpScreensOnboarding, allowHelpScreensOnboardingPerpetuity: this.allowHelpScreensOnboardingPerpetuity, helpScreensTooltipPauseTimeout: this.helpScreensTooltipPauseTimeout, onBlock: (ev) => {
168
- this.blocked = ev.detail;
169
- }, onFeedback: (ev) => {
170
- this.feedbackEl.show(ev.detail);
171
- this.feedback.emit(ev.detail);
172
- }, onScanSuccess: (ev) => this.scanSuccess.emit(ev.detail), onReady: (ev) => this.ready.emit(ev.detail), onCameraScanStarted: (ev) => this.cameraScanStarted.emit(ev.detail), onImageScanStarted: (ev) => this.imageScanStarted.emit(ev.detail), onScanError: (ev) => this.scanError.emit(ev.detail), onScanAborted: (ev) => this.scanAborted.emit(ev.detail) })), h("mb-feedback", { dir: this.hostEl.getAttribute("dir"), visible: !this.hideFeedback, ref: (el) => (this.feedbackEl = el) }))));
173
- }
174
- static get is() { return "document-detector"; }
175
- static get encapsulation() { return "shadow"; }
176
- static get originalStyleUrls() {
177
- return {
178
- "$": ["document-detector.scss"]
179
- };
180
- }
181
- static get styleUrls() {
182
- return {
183
- "$": ["document-detector.css"]
184
- };
185
- }
186
- static get properties() {
187
- return {
188
- "licenseKey": {
189
- "type": "string",
190
- "mutable": true,
191
- "complexType": {
192
- "original": "string",
193
- "resolved": "string",
194
- "references": {}
195
- },
196
- "required": false,
197
- "optional": false,
198
- "docs": {
199
- "tags": [],
200
- "text": ""
201
- },
202
- "attribute": "license-key",
203
- "reflect": false
204
- },
205
- "config": {
206
- "type": "unknown",
207
- "mutable": true,
208
- "complexType": {
209
- "original": "{\n key: string;\n }",
210
- "resolved": "{ key: string; }",
211
- "references": {}
212
- },
213
- "required": false,
214
- "optional": false,
215
- "docs": {
216
- "tags": [],
217
- "text": ""
218
- }
219
- }
220
- };
221
- }
222
- static get states() {
223
- return {
224
- "restart": {}
225
- };
226
- }
227
- static get events() {
228
- return [{
229
- "method": "results",
230
- "name": "results",
231
- "bubbles": true,
232
- "cancelable": true,
233
- "composed": true,
234
- "docs": {
235
- "tags": [],
236
- "text": ""
237
- },
238
- "complexType": {
239
- "original": "any",
240
- "resolved": "any",
241
- "references": {}
242
- }
243
- }, {
244
- "method": "status",
245
- "name": "status",
246
- "bubbles": true,
247
- "cancelable": true,
248
- "composed": true,
249
- "docs": {
250
- "tags": [],
251
- "text": ""
252
- },
253
- "complexType": {
254
- "original": "StatusDocumentDetector",
255
- "resolved": "StatusDocumentDetector.BACK_SIDE_DETECTION | StatusDocumentDetector.CHANGE_SIDE | StatusDocumentDetector.DETECTION_FAILED | StatusDocumentDetector.DOCUMENT_DETECTED | StatusDocumentDetector.DOCUMENT_NOT_FOUND | StatusDocumentDetector.ERROR | StatusDocumentDetector.FRONT_SIDE_DETECTION | StatusDocumentDetector.INITIALIZING | StatusDocumentDetector.RECORDING | StatusDocumentDetector.RESULTS_EMPTY | StatusDocumentDetector.RESULTS_SUCCESS | StatusDocumentDetector.RUNNING",
256
- "references": {
257
- "StatusDocumentDetector": {
258
- "location": "import",
259
- "path": "../../utils/status.document-detector"
260
- }
261
- }
262
- }
263
- }];
264
- }
265
- static get methods() {
266
- return {
267
- "setUiState": {
268
- "complexType": {
269
- "signature": "(state: \"ERROR\" | \"LOADING\" | \"NONE\" | \"SUCCESS\") => Promise<void>",
270
- "parameters": [{
271
- "tags": [],
272
- "text": ""
273
- }],
274
- "references": {
275
- "Promise": {
276
- "location": "global"
277
- }
278
- },
279
- "return": "Promise<void>"
280
- },
281
- "docs": {
282
- "text": "",
283
- "tags": []
284
- }
285
- },
286
- "startCameraScan": {
287
- "complexType": {
288
- "signature": "() => Promise<void>",
289
- "parameters": [],
290
- "references": {
291
- "Promise": {
292
- "location": "global"
293
- }
294
- },
295
- "return": "Promise<void>"
296
- },
297
- "docs": {
298
- "text": "",
299
- "tags": []
300
- }
301
- },
302
- "startImageScan": {
303
- "complexType": {
304
- "signature": "(file: File) => Promise<void>",
305
- "parameters": [{
306
- "tags": [],
307
- "text": ""
308
- }],
309
- "references": {
310
- "Promise": {
311
- "location": "global"
312
- },
313
- "File": {
314
- "location": "global"
315
- }
316
- },
317
- "return": "Promise<void>"
318
- },
319
- "docs": {
320
- "text": "",
321
- "tags": []
322
- }
323
- },
324
- "startMultiSideImageScan": {
325
- "complexType": {
326
- "signature": "(firstFile: File, secondFile: File) => Promise<void>",
327
- "parameters": [{
328
- "tags": [],
329
- "text": ""
330
- }, {
331
- "tags": [],
332
- "text": ""
333
- }],
334
- "references": {
335
- "Promise": {
336
- "location": "global"
337
- },
338
- "File": {
339
- "location": "global"
340
- }
341
- },
342
- "return": "Promise<void>"
343
- },
344
- "docs": {
345
- "text": "",
346
- "tags": []
347
- }
348
- },
349
- "setUiMessage": {
350
- "complexType": {
351
- "signature": "(state: \"FEEDBACK_ERROR\" | \"FEEDBACK_INFO\" | \"FEEDBACK_OK\", message: string) => Promise<void>",
352
- "parameters": [{
353
- "tags": [],
354
- "text": ""
355
- }, {
356
- "tags": [],
357
- "text": ""
358
- }],
359
- "references": {
360
- "Promise": {
361
- "location": "global"
362
- }
363
- },
364
- "return": "Promise<void>"
365
- },
366
- "docs": {
367
- "text": "",
368
- "tags": []
369
- }
370
- },
371
- "getProductIntegrationInfo": {
372
- "complexType": {
373
- "signature": "() => Promise<ProductIntegrationInfo>",
374
- "parameters": [],
375
- "references": {
376
- "Promise": {
377
- "location": "global"
378
- },
379
- "ProductIntegrationInfo": {
380
- "location": "import",
381
- "path": "../../utils/data-structures"
382
- }
383
- },
384
- "return": "Promise<ProductIntegrationInfo>"
385
- },
386
- "docs": {
387
- "text": "",
388
- "tags": []
389
- }
390
- },
391
- "restartComponent": {
392
- "complexType": {
393
- "signature": "() => Promise<void>",
394
- "parameters": [],
395
- "references": {
396
- "Promise": {
397
- "location": "global"
398
- }
399
- },
400
- "return": "Promise<void>"
401
- },
402
- "docs": {
403
- "text": "",
404
- "tags": []
405
- }
406
- }
407
- };
408
- }
409
- static get elementRef() { return "hostEl"; }
410
- static get watchers() {
411
- return [{
412
- "propName": "config",
413
- "methodName": "configHandler"
414
- }];
415
- }
416
- }