@microblink/blinkid-in-browser-sdk
Version:
A simple ID scanning library for WebAssembly-enabled browsers.
923 lines (922 loc) • 40.9 kB
TypeScript
/* eslint-disable */
/* tslint:disable */
/**
* This is an autogenerated file created by the Stencil compiler.
* It contains typing information for all components that exist in this project.
*/
import { HTMLStencilElement, JSXBase } from "@stencil/core/internal";
import { AnonymizationMode, CameraExperience, CameraExperienceState, EventFatalError, EventReady, EventScanError, EventScanSuccess, FeedbackMessage } from "./utils/data-structures";
import { TranslationService } from "./utils/translation.service";
import { SdkService } from "./utils/sdk.service";
export namespace Components {
interface BlinkidInBrowser {
/**
* Write a hello message to the browser console when license check is successfully performed. Hello message will contain the name and version of the SDK, which are required information for all support tickets. Default value is true.
*/
"allowHelloMessage": boolean;
/**
* Whether sensitive data should be removed from images, result fields or both. The setting only applies to certain documents. Default value is AnonymizationMode.FullResult which means that certain documents are anonymizied by default! For more information see `src/Recognizers/BlinkID/Generic/AnonymizationMode.ts` file.
*/
"anonymization": string;
/**
* Camera device ID passed from root component. Client can choose which camera to turn on if array of cameras exists.
*/
"cameraId": string | null;
/**
* Set to 'false' if component should not enable drag and drop functionality. Default value is 'true'.
*/
"enableDrag": boolean;
/**
* Absolute location of WASM and related JS/data files. Useful when resource files should be loaded over CDN, or when web frameworks/libraries are used which store resources in specific locations, e.g. inside "assets" folder. Important: if engine is hosted on another origin, CORS must be enabled between two hosts. That is, server where engine is hosted must have 'Access-Control-Allow-Origin' header for the location of the web app. Important: SDK and WASM resources must be from the same version of package. Default value is empty string, i.e. "". In case of empty string, value of "window.location.origin" property is going to be used.
*/
"engineLocation": string;
/**
* If set to 'true', UI component will not display feedback, i.e. information and error messages. Setting this attribute to 'false' won't disable 'scanError' and 'scanInfo' events. Default value is 'false'.
*/
"hideFeedback": boolean;
/**
* If set to 'true', UI component will become visible after successful SDK initialization. Also, error screen is not going to be displayed in case of initialization error. If set to 'false', loading and error screens of the UI component will be visible during initialization and in case of an error. Default value is 'false'.
*/
"hideLoadingAndErrorUi": boolean;
/**
* Hover state of iconCameraDefault.
*/
"iconCameraActive": string;
/**
* Provide alternative camera icon. Every value that is placed here is passed as a value of `src` attribute to <img> element. This attribute can be used to provide location, base64 or any URL of alternative camera icon. Image is scaled to 20x20 pixels.
*/
"iconCameraDefault": string;
/**
* Hover state of iconGalleryDefault.
*/
"iconGalleryActive": string;
/**
* Provide alternative gallery icon. This icon is also used during drag and drop action. Every value that is placed here is passed as a value of `src` attribute to <img> element. This attribute can be used to provide location, base64 or any URL of alternative gallery icon. Image is scaled to 20x20 pixels. In drag and drop dialog image is scaled to 24x24 pixels.
*/
"iconGalleryDefault": string;
/**
* Provide alternative invalid format icon which is used during drag and drop action. Every value that is placed here is passed as a value of `src` attribute to <img> element. This attribute can be used to provide location, base64 or any URL of alternative gallery icon. Image is scaled to 24x24 pixels.
*/
"iconInvalidFormat": string;
/**
* Provide alternative loading icon. CSS rotation is applied to this icon. Every value that is placed here is passed as a value of `src` attribute to <img> element. This attribute can be used to provide location, base64 or any URL of alternative gallery icon. Image is scaled to 24x24 pixels.
*/
"iconSpinnerFromGalleryExperience": string;
/**
* Provide alternative loading icon. CSS rotation is applied to this icon. Every value that is placed here is passed as a value of `src` attribute to <img> element. This attribute can be used to provide location, base64 or any URL of alternative gallery icon. Image is scaled to 24x24 pixels.
*/
"iconSpinnerScreenLoading": string;
/**
* Set to 'true' if success frame should be included in final scanning results. Default value is 'false'.
*/
"includeSuccessFrame": boolean;
/**
* License key which is going to be used to unlock WASM library. Keep in mind that UI component will reinitialize every time license key is changed.
*/
"licenseKey": string;
/**
* Specify additional recognizer options. For a full list of available recognizer options see source code of a recognizer. For example, list of available recognizer options for BlinkIdRecognizer can be seen in the `src/Recognizers/BlinkID/Generic/BlinkIdRecognizer.ts` file. Example: `<blinkid-in-browser recognizer-options="scanCroppedDocumentImage"></blinkid-in-browser>`
*/
"rawRecognizerOptions": string;
/**
* List of recognizers which should be used. Available recognizers for BlinkID: - IdBarcodeRecognizer - BlinkIdRecognizer - BlinkIdCombinedRecognizer - cannot be used in combination with other recognizers - when defined, scan from image is not available Recognizers can be defined by setting HTML attribute "recognizers", for example: `<blinkid-in-browser recognizers="IdBarcodeRecognizer,BlinkIdRecognizer"></blinkid-in-browser>`
*/
"rawRecognizers": string;
/**
* Set custom translations for UI component. List of available translation keys can be found in `src/utils/translation.service.ts` file.
*/
"rawTranslations": string;
/**
* Specify additional recognizer options. For a full list of available recognizer options see source code of a recognizer. For example, list of available recognizer options for BlinkIdRecognizer can be seen in the `src/Recognizers/BlinkID/Generic/BlinkIdRecognizer.ts` file. Example: ``` const blinkId = document.querySelector('blinkid-in-browser'); blinkid.recognizerOptions = ['scanCroppedDocumentImage']; ```
*/
"recognizerOptions": Array<string>;
/**
* List of recognizers which should be used. Available recognizers for BlinkID: - IdBarcodeRecognizer - BlinkIdRecognizer - BlinkIdCombinedRecognizer - cannot be used in combination with other recognizers - when defined, scan from image is not available Recognizers can be defined by setting JS property "recognizers", for example: ``` const blinkId = document.querySelector('blinkid-in-browser'); blinkId.recognizers = ['IdBarcodeRecognizer', 'BlinkIdRecognizer']; ```
*/
"recognizers": Array<string>;
/**
* Set to 'true' if scan from camera should be enabled. If set to 'true' and camera is not available or disabled, related button will be visible but disabled. Default value is 'true'.
*/
"scanFromCamera": boolean;
/**
* Set to 'true' if scan from image should be enabled. Default value is 'true'.
*/
"scanFromImage": boolean;
/**
* Show message alongside UI component. Possible values for `state` are 'FEEDBACK_ERROR' | 'FEEDBACK_INFO' | 'FEEDBACK_OK'.
*/
"setUiMessage": (state: 'FEEDBACK_ERROR' | 'FEEDBACK_INFO' | 'FEEDBACK_OK', message: string) => Promise<void>;
/**
* Control UI state of camera overlay. Possible values are 'ERROR' | 'LOADING' | 'NONE' | 'SUCCESS'. In case of state `ERROR` and if `showModalWindows` is set to `true`, modal window with error message will be displayed. Otherwise, UI will close.
*/
"setUiState": (state: 'ERROR' | 'LOADING' | 'NONE' | 'SUCCESS') => Promise<void>;
/**
* Set to 'true' if text labels should be displayed below action buttons. Default value is 'false'.
*/
"showActionLabels": boolean;
/**
* Set to 'true' if modal window should be displayed in case of an error. Default value is 'false'.
*/
"showModalWindows": boolean;
/**
* Set to 'true' if scan from image should execute twice in case that first result is empty. If enabled, this option will add/remove 'scanCroppedDocumentImage' recognizer option for the second scan action.
*/
"thoroughScanFromImage": boolean;
/**
* Set custom translations for UI component. List of available translation keys can be found in `src/utils/translation.service.ts` file.
*/
"translations": { [key: string]: string };
}
interface MbApiProcessStatus {
/**
* State value of API processing received from parent element ('loading' or 'success').
*/
"state": 'ERROR' | 'LOADING' | 'NONE' | 'SUCCESS';
/**
* Instance of TranslationService passed from parent component.
*/
"translationService": TranslationService;
/**
* Element visibility, default is 'false'.
*/
"visible": boolean;
}
interface MbButton {
/**
* Set to 'true' if button should be disabled, and if click events should not be triggered.
*/
"disabled": boolean;
/**
* Set to 'true' if button contains an icon.
*/
"icon": boolean;
/**
* Passed description text for image element from parent component.
*/
"imageAlt": string;
/**
* Passed image from parent component.
*/
"imageSrcActive": string;
/**
* Passed image from parent component.
*/
"imageSrcDefault": string;
/**
* Set to string which should be displayed below the icon. If omitted, nothing will show.
*/
"label": string;
/**
* Set to 'true' if default event should be prevented.
*/
"preventDefault": boolean;
/**
* Instance of TranslationService passed from root component.
*/
"translationService": TranslationService;
/**
* Set to 'true' if button should be visible.
*/
"visible": boolean;
}
interface MbCameraExperience {
/**
* Api state passed from root component.
*/
"apiState": string;
/**
* Camera horizontal state passed from root component. Horizontal camera image can be mirrored
*/
"cameraFlipped": boolean;
/**
* Method is exposed outside which allow us to control Camera Flip state from parent component.
*/
"setCameraFlipState": (isFlipped: boolean) => Promise<void>;
/**
* Set camera scanning state.
*/
"setState": (state: CameraExperienceState, isBackSide?: boolean, force?: boolean) => Promise<void>;
/**
* 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.
*/
"showOverlay": boolean;
/**
* Show scanning line on camera
*/
"showScanningLine": boolean;
/**
* Instance of TranslationService passed from root component.
*/
"translationService": TranslationService;
/**
* Choose desired camera experience. Each experience type must be implemented in this component.
*/
"type": CameraExperience;
}
interface MbComponent {
/**
* See description in public component.
*/
"allowHelloMessage": boolean;
/**
* See description in public component.
*/
"anonymization": AnonymizationMode;
/**
* Camera device ID passed from root component.
*/
"cameraId": string | null;
/**
* See description in public component.
*/
"enableDrag": boolean;
/**
* See description in public component.
*/
"engineLocation": string;
/**
* See description in public component.
*/
"hideLoadingAndErrorUi": boolean;
/**
* See description in public component.
*/
"iconCameraActive": string;
/**
* See description in public component.
*/
"iconCameraDefault": string;
/**
* See description in public component.
*/
"iconGalleryActive": string;
/**
* See description in public component.
*/
"iconGalleryDefault": string;
/**
* See description in public component.
*/
"iconInvalidFormat": string;
/**
* See description in public component.
*/
"iconSpinnerFromGalleryExperience": string;
/**
* See description in public component.
*/
"iconSpinnerScreenLoading": string;
/**
* See description in public component.
*/
"includeSuccessFrame": boolean;
/**
* See description in public component.
*/
"licenseKey": string;
/**
* See description in public component.
*/
"recognizerOptions": Array<string>;
/**
* See description in public component.
*/
"recognizers": Array<string>;
/**
* See description in public component.
*/
"rtl": boolean;
/**
* See description in public component.
*/
"scanFromCamera": boolean;
/**
* See description in public component.
*/
"scanFromImage": boolean;
/**
* Instance of SdkService passed from root component.
*/
"sdkService": SdkService;
/**
* 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.
*/
"setUiState": (state: 'ERROR' | 'LOADING' | 'NONE' | 'SUCCESS') => Promise<void>;
/**
* See description in public component.
*/
"showActionLabels": boolean;
/**
* See description in public component.
*/
"showModalWindows": boolean;
/**
* See description in public component.
*/
"showScanningLine": boolean;
/**
* See description in public component.
*/
"thoroughScanFromImage": boolean;
/**
* Instance of TranslationService passed from root component.
*/
"translationService": TranslationService;
}
interface MbContainer {
}
interface MbFeedback {
/**
* Call when FeedbackMessage which should be displayed.
*/
"show": (feedback: FeedbackMessage) => Promise<void>;
/**
* Set to 'true' if component should be visible.
*/
"visible": boolean;
}
interface MbModal {
/**
* Passed body content from parent component
*/
"content": string;
/**
* Center content inside modal
*/
"contentCentered": boolean;
/**
* Passed title content from parent component
*/
"modalTitle": string;
/**
* Show modal content
*/
"visible": boolean;
}
interface MbOverlay {
/**
* Set to 'false' if overlay should not cover whole screen.
*/
"fullscreen": boolean;
/**
* Set to 'true' if overlay should be visible.
*/
"visible": boolean;
}
interface MbScreen {
/**
* Set to 'true' if screen should be visible.
*/
"visible": boolean;
}
interface MbSpinner {
/**
* Value of `src` attribute for <img> element.
*/
"icon": string;
/**
* Spinner size, can be 'default' or 'large'.
*/
"size": string;
}
}
declare global {
interface HTMLBlinkidInBrowserElement extends Components.BlinkidInBrowser, HTMLStencilElement {
}
var HTMLBlinkidInBrowserElement: {
prototype: HTMLBlinkidInBrowserElement;
new (): HTMLBlinkidInBrowserElement;
};
interface HTMLMbApiProcessStatusElement extends Components.MbApiProcessStatus, HTMLStencilElement {
}
var HTMLMbApiProcessStatusElement: {
prototype: HTMLMbApiProcessStatusElement;
new (): HTMLMbApiProcessStatusElement;
};
interface HTMLMbButtonElement extends Components.MbButton, HTMLStencilElement {
}
var HTMLMbButtonElement: {
prototype: HTMLMbButtonElement;
new (): HTMLMbButtonElement;
};
interface HTMLMbCameraExperienceElement extends Components.MbCameraExperience, HTMLStencilElement {
}
var HTMLMbCameraExperienceElement: {
prototype: HTMLMbCameraExperienceElement;
new (): HTMLMbCameraExperienceElement;
};
interface HTMLMbComponentElement extends Components.MbComponent, HTMLStencilElement {
}
var HTMLMbComponentElement: {
prototype: HTMLMbComponentElement;
new (): HTMLMbComponentElement;
};
interface HTMLMbContainerElement extends Components.MbContainer, HTMLStencilElement {
}
var HTMLMbContainerElement: {
prototype: HTMLMbContainerElement;
new (): HTMLMbContainerElement;
};
interface HTMLMbFeedbackElement extends Components.MbFeedback, HTMLStencilElement {
}
var HTMLMbFeedbackElement: {
prototype: HTMLMbFeedbackElement;
new (): HTMLMbFeedbackElement;
};
interface HTMLMbModalElement extends Components.MbModal, HTMLStencilElement {
}
var HTMLMbModalElement: {
prototype: HTMLMbModalElement;
new (): HTMLMbModalElement;
};
interface HTMLMbOverlayElement extends Components.MbOverlay, HTMLStencilElement {
}
var HTMLMbOverlayElement: {
prototype: HTMLMbOverlayElement;
new (): HTMLMbOverlayElement;
};
interface HTMLMbScreenElement extends Components.MbScreen, HTMLStencilElement {
}
var HTMLMbScreenElement: {
prototype: HTMLMbScreenElement;
new (): HTMLMbScreenElement;
};
interface HTMLMbSpinnerElement extends Components.MbSpinner, HTMLStencilElement {
}
var HTMLMbSpinnerElement: {
prototype: HTMLMbSpinnerElement;
new (): HTMLMbSpinnerElement;
};
interface HTMLElementTagNameMap {
"blinkid-in-browser": HTMLBlinkidInBrowserElement;
"mb-api-process-status": HTMLMbApiProcessStatusElement;
"mb-button": HTMLMbButtonElement;
"mb-camera-experience": HTMLMbCameraExperienceElement;
"mb-component": HTMLMbComponentElement;
"mb-container": HTMLMbContainerElement;
"mb-feedback": HTMLMbFeedbackElement;
"mb-modal": HTMLMbModalElement;
"mb-overlay": HTMLMbOverlayElement;
"mb-screen": HTMLMbScreenElement;
"mb-spinner": HTMLMbSpinnerElement;
}
}
declare namespace LocalJSX {
interface BlinkidInBrowser {
/**
* Write a hello message to the browser console when license check is successfully performed. Hello message will contain the name and version of the SDK, which are required information for all support tickets. Default value is true.
*/
"allowHelloMessage"?: boolean;
/**
* Whether sensitive data should be removed from images, result fields or both. The setting only applies to certain documents. Default value is AnonymizationMode.FullResult which means that certain documents are anonymizied by default! For more information see `src/Recognizers/BlinkID/Generic/AnonymizationMode.ts` file.
*/
"anonymization"?: string;
/**
* Camera device ID passed from root component. Client can choose which camera to turn on if array of cameras exists.
*/
"cameraId"?: string | null;
/**
* Set to 'false' if component should not enable drag and drop functionality. Default value is 'true'.
*/
"enableDrag"?: boolean;
/**
* Absolute location of WASM and related JS/data files. Useful when resource files should be loaded over CDN, or when web frameworks/libraries are used which store resources in specific locations, e.g. inside "assets" folder. Important: if engine is hosted on another origin, CORS must be enabled between two hosts. That is, server where engine is hosted must have 'Access-Control-Allow-Origin' header for the location of the web app. Important: SDK and WASM resources must be from the same version of package. Default value is empty string, i.e. "". In case of empty string, value of "window.location.origin" property is going to be used.
*/
"engineLocation"?: string;
/**
* If set to 'true', UI component will not display feedback, i.e. information and error messages. Setting this attribute to 'false' won't disable 'scanError' and 'scanInfo' events. Default value is 'false'.
*/
"hideFeedback"?: boolean;
/**
* If set to 'true', UI component will become visible after successful SDK initialization. Also, error screen is not going to be displayed in case of initialization error. If set to 'false', loading and error screens of the UI component will be visible during initialization and in case of an error. Default value is 'false'.
*/
"hideLoadingAndErrorUi"?: boolean;
/**
* Hover state of iconCameraDefault.
*/
"iconCameraActive"?: string;
/**
* Provide alternative camera icon. Every value that is placed here is passed as a value of `src` attribute to <img> element. This attribute can be used to provide location, base64 or any URL of alternative camera icon. Image is scaled to 20x20 pixels.
*/
"iconCameraDefault"?: string;
/**
* Hover state of iconGalleryDefault.
*/
"iconGalleryActive"?: string;
/**
* Provide alternative gallery icon. This icon is also used during drag and drop action. Every value that is placed here is passed as a value of `src` attribute to <img> element. This attribute can be used to provide location, base64 or any URL of alternative gallery icon. Image is scaled to 20x20 pixels. In drag and drop dialog image is scaled to 24x24 pixels.
*/
"iconGalleryDefault"?: string;
/**
* Provide alternative invalid format icon which is used during drag and drop action. Every value that is placed here is passed as a value of `src` attribute to <img> element. This attribute can be used to provide location, base64 or any URL of alternative gallery icon. Image is scaled to 24x24 pixels.
*/
"iconInvalidFormat"?: string;
/**
* Provide alternative loading icon. CSS rotation is applied to this icon. Every value that is placed here is passed as a value of `src` attribute to <img> element. This attribute can be used to provide location, base64 or any URL of alternative gallery icon. Image is scaled to 24x24 pixels.
*/
"iconSpinnerFromGalleryExperience"?: string;
/**
* Provide alternative loading icon. CSS rotation is applied to this icon. Every value that is placed here is passed as a value of `src` attribute to <img> element. This attribute can be used to provide location, base64 or any URL of alternative gallery icon. Image is scaled to 24x24 pixels.
*/
"iconSpinnerScreenLoading"?: string;
/**
* Set to 'true' if success frame should be included in final scanning results. Default value is 'false'.
*/
"includeSuccessFrame"?: boolean;
/**
* License key which is going to be used to unlock WASM library. Keep in mind that UI component will reinitialize every time license key is changed.
*/
"licenseKey"?: string;
/**
* Event which is emitted when camera scan is started, i.e. when user clicks on _scan from camera_ button.
*/
"onCameraScanStarted"?: (event: CustomEvent<null>) => void;
/**
* Event which is emitted during initialization of UI component. Each event contains `code` property which has deatils about fatal errror.
*/
"onFatalError"?: (event: CustomEvent<EventFatalError>) => void;
/**
* Event which is emitted during positive or negative user feedback. If attribute/property `hideFeedback` is set to `false`, UI component will display the feedback.
*/
"onFeedback"?: (event: CustomEvent<FeedbackMessage>) => void;
/**
* Event which is emitted when image scan is started, i.e. when user clicks on _scan from gallery button.
*/
"onImageScanStarted"?: (event: CustomEvent<null>) => void;
/**
* Event which is emitted when UI component is successfully initialized and ready for use.
*/
"onReady"?: (event: CustomEvent<EventReady>) => void;
/**
* Event which is emitted during or immediately after scan error.
*/
"onScanError"?: (event: CustomEvent<EventScanError>) => void;
/**
* Event which is emitted after successful scan. This event contains recognition results.
*/
"onScanSuccess"?: (event: CustomEvent<EventScanSuccess>) => void;
/**
* Specify additional recognizer options. For a full list of available recognizer options see source code of a recognizer. For example, list of available recognizer options for BlinkIdRecognizer can be seen in the `src/Recognizers/BlinkID/Generic/BlinkIdRecognizer.ts` file. Example: `<blinkid-in-browser recognizer-options="scanCroppedDocumentImage"></blinkid-in-browser>`
*/
"rawRecognizerOptions"?: string;
/**
* List of recognizers which should be used. Available recognizers for BlinkID: - IdBarcodeRecognizer - BlinkIdRecognizer - BlinkIdCombinedRecognizer - cannot be used in combination with other recognizers - when defined, scan from image is not available Recognizers can be defined by setting HTML attribute "recognizers", for example: `<blinkid-in-browser recognizers="IdBarcodeRecognizer,BlinkIdRecognizer"></blinkid-in-browser>`
*/
"rawRecognizers"?: string;
/**
* Set custom translations for UI component. List of available translation keys can be found in `src/utils/translation.service.ts` file.
*/
"rawTranslations"?: string;
/**
* Specify additional recognizer options. For a full list of available recognizer options see source code of a recognizer. For example, list of available recognizer options for BlinkIdRecognizer can be seen in the `src/Recognizers/BlinkID/Generic/BlinkIdRecognizer.ts` file. Example: ``` const blinkId = document.querySelector('blinkid-in-browser'); blinkid.recognizerOptions = ['scanCroppedDocumentImage']; ```
*/
"recognizerOptions"?: Array<string>;
/**
* List of recognizers which should be used. Available recognizers for BlinkID: - IdBarcodeRecognizer - BlinkIdRecognizer - BlinkIdCombinedRecognizer - cannot be used in combination with other recognizers - when defined, scan from image is not available Recognizers can be defined by setting JS property "recognizers", for example: ``` const blinkId = document.querySelector('blinkid-in-browser'); blinkId.recognizers = ['IdBarcodeRecognizer', 'BlinkIdRecognizer']; ```
*/
"recognizers"?: Array<string>;
/**
* Set to 'true' if scan from camera should be enabled. If set to 'true' and camera is not available or disabled, related button will be visible but disabled. Default value is 'true'.
*/
"scanFromCamera"?: boolean;
/**
* Set to 'true' if scan from image should be enabled. Default value is 'true'.
*/
"scanFromImage"?: boolean;
/**
* Set to 'true' if text labels should be displayed below action buttons. Default value is 'false'.
*/
"showActionLabels"?: boolean;
/**
* Set to 'true' if modal window should be displayed in case of an error. Default value is 'false'.
*/
"showModalWindows"?: boolean;
/**
* Set to 'true' if scan from image should execute twice in case that first result is empty. If enabled, this option will add/remove 'scanCroppedDocumentImage' recognizer option for the second scan action.
*/
"thoroughScanFromImage"?: boolean;
/**
* Set custom translations for UI component. List of available translation keys can be found in `src/utils/translation.service.ts` file.
*/
"translations"?: { [key: string]: string };
}
interface MbApiProcessStatus {
/**
* Emitted when user clicks on 'x' button.
*/
"onCloseFromStart"?: (event: CustomEvent<void>) => void;
/**
* Emitted when user clicks on 'Retry' button.
*/
"onCloseTryAgain"?: (event: CustomEvent<void>) => void;
/**
* State value of API processing received from parent element ('loading' or 'success').
*/
"state"?: 'ERROR' | 'LOADING' | 'NONE' | 'SUCCESS';
/**
* Instance of TranslationService passed from parent component.
*/
"translationService"?: TranslationService;
/**
* Element visibility, default is 'false'.
*/
"visible"?: boolean;
}
interface MbButton {
/**
* Set to 'true' if button should be disabled, and if click events should not be triggered.
*/
"disabled"?: boolean;
/**
* Set to 'true' if button contains an icon.
*/
"icon"?: boolean;
/**
* Passed description text for image element from parent component.
*/
"imageAlt"?: string;
/**
* Passed image from parent component.
*/
"imageSrcActive"?: string;
/**
* Passed image from parent component.
*/
"imageSrcDefault"?: string;
/**
* Set to string which should be displayed below the icon. If omitted, nothing will show.
*/
"label"?: string;
/**
* Event which is triggered when user clicks on button element. This event is not triggered when the button is disabled.
*/
"onButtonClick"?: (event: CustomEvent<UIEvent>) => void;
/**
* Set to 'true' if default event should be prevented.
*/
"preventDefault"?: boolean;
/**
* Instance of TranslationService passed from root component.
*/
"translationService"?: TranslationService;
/**
* Set to 'true' if button should be visible.
*/
"visible"?: boolean;
}
interface MbCameraExperience {
/**
* Api state passed from root component.
*/
"apiState"?: string;
/**
* Camera horizontal state passed from root component. Horizontal camera image can be mirrored
*/
"cameraFlipped"?: boolean;
/**
* Emitted when user clicks on 'X' button.
*/
"onClose"?: (event: CustomEvent<void>) => void;
/**
* Emitted when user clicks on Flip button.
*/
"onFlipCameraAction"?: (event: CustomEvent<void>) => void;
/**
* 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.
*/
"showOverlay"?: boolean;
/**
* Show scanning line on camera
*/
"showScanningLine"?: boolean;
/**
* Instance of TranslationService passed from root component.
*/
"translationService"?: TranslationService;
/**
* Choose desired camera experience. Each experience type must be implemented in this component.
*/
"type"?: CameraExperience;
}
interface MbComponent {
/**
* See description in public component.
*/
"allowHelloMessage"?: boolean;
/**
* See description in public component.
*/
"anonymization"?: AnonymizationMode;
/**
* Camera device ID passed from root component.
*/
"cameraId"?: string | null;
/**
* See description in public component.
*/
"enableDrag"?: boolean;
/**
* See description in public component.
*/
"engineLocation"?: string;
/**
* See description in public component.
*/
"hideLoadingAndErrorUi"?: boolean;
/**
* See description in public component.
*/
"iconCameraActive"?: string;
/**
* See description in public component.
*/
"iconCameraDefault"?: string;
/**
* See description in public component.
*/
"iconGalleryActive"?: string;
/**
* See description in public component.
*/
"iconGalleryDefault"?: string;
/**
* See description in public component.
*/
"iconInvalidFormat"?: string;
/**
* See description in public component.
*/
"iconSpinnerFromGalleryExperience"?: string;
/**
* See description in public component.
*/
"iconSpinnerScreenLoading"?: string;
/**
* See description in public component.
*/
"includeSuccessFrame"?: boolean;
/**
* See description in public component.
*/
"licenseKey"?: string;
/**
* See event 'cameraScanStarted' in public component.
*/
"onCameraScanStarted"?: (event: CustomEvent<null>) => void;
/**
* See event 'fatalError' in public component.
*/
"onFatalError"?: (event: CustomEvent<EventFatalError>) => void;
/**
* Event containing FeedbackMessage which can be passed to MbFeedback component.
*/
"onFeedback"?: (event: CustomEvent<FeedbackMessage>) => void;
/**
* See event 'imageScanStarted' in public component.
*/
"onImageScanStarted"?: (event: CustomEvent<null>) => void;
/**
* See event 'ready' in public component.
*/
"onReady"?: (event: CustomEvent<EventReady>) => void;
/**
* See event 'scanError' in public component.
*/
"onScanError"?: (event: CustomEvent<EventScanError>) => void;
/**
* See event 'scanSuccess' in public component.
*/
"onScanSuccess"?: (event: CustomEvent<EventScanSuccess>) => void;
/**
* See description in public component.
*/
"recognizerOptions"?: Array<string>;
/**
* See description in public component.
*/
"recognizers"?: Array<string>;
/**
* See description in public component.
*/
"rtl"?: boolean;
/**
* See description in public component.
*/
"scanFromCamera"?: boolean;
/**
* See description in public component.
*/
"scanFromImage"?: boolean;
/**
* Instance of SdkService passed from root component.
*/
"sdkService"?: SdkService;
/**
* See description in public component.
*/
"showActionLabels"?: boolean;
/**
* See description in public component.
*/
"showModalWindows"?: boolean;
/**
* See description in public component.
*/
"showScanningLine"?: boolean;
/**
* See description in public component.
*/
"thoroughScanFromImage"?: boolean;
/**
* Instance of TranslationService passed from root component.
*/
"translationService"?: TranslationService;
}
interface MbContainer {
}
interface MbFeedback {
/**
* Set to 'true' if component should be visible.
*/
"visible"?: boolean;
}
interface MbModal {
/**
* Passed body content from parent component
*/
"content"?: string;
/**
* Center content inside modal
*/
"contentCentered"?: boolean;
/**
* Passed title content from parent component
*/
"modalTitle"?: string;
/**
* Emitted when user clicks on 'X' button.
*/
"onClose"?: (event: CustomEvent<void>) => void;
/**
* Show modal content
*/
"visible"?: boolean;
}
interface MbOverlay {
/**
* Set to 'false' if overlay should not cover whole screen.
*/
"fullscreen"?: boolean;
/**
* Set to 'true' if overlay should be visible.
*/
"visible"?: boolean;
}
interface MbScreen {
/**
* Set to 'true' if screen should be visible.
*/
"visible"?: boolean;
}
interface MbSpinner {
/**
* Value of `src` attribute for <img> element.
*/
"icon"?: string;
/**
* Spinner size, can be 'default' or 'large'.
*/
"size"?: string;
}
interface IntrinsicElements {
"blinkid-in-browser": BlinkidInBrowser;
"mb-api-process-status": MbApiProcessStatus;
"mb-button": MbButton;
"mb-camera-experience": MbCameraExperience;
"mb-component": MbComponent;
"mb-container": MbContainer;
"mb-feedback": MbFeedback;
"mb-modal": MbModal;
"mb-overlay": MbOverlay;
"mb-screen": MbScreen;
"mb-spinner": MbSpinner;
}
}
export { LocalJSX as JSX };
declare module "@stencil/core" {
export namespace JSX {
interface IntrinsicElements {
"blinkid-in-browser": LocalJSX.BlinkidInBrowser & JSXBase.HTMLAttributes<HTMLBlinkidInBrowserElement>;
"mb-api-process-status": LocalJSX.MbApiProcessStatus & JSXBase.HTMLAttributes<HTMLMbApiProcessStatusElement>;
"mb-button": LocalJSX.MbButton & JSXBase.HTMLAttributes<HTMLMbButtonElement>;
"mb-camera-experience": LocalJSX.MbCameraExperience & JSXBase.HTMLAttributes<HTMLMbCameraExperienceElement>;
"mb-component": LocalJSX.MbComponent & JSXBase.HTMLAttributes<HTMLMbComponentElement>;
"mb-container": LocalJSX.MbContainer & JSXBase.HTMLAttributes<HTMLMbContainerElement>;
"mb-feedback": LocalJSX.MbFeedback & JSXBase.HTMLAttributes<HTMLMbFeedbackElement>;
"mb-modal": LocalJSX.MbModal & JSXBase.HTMLAttributes<HTMLMbModalElement>;
"mb-overlay": LocalJSX.MbOverlay & JSXBase.HTMLAttributes<HTMLMbOverlayElement>;
"mb-screen": LocalJSX.MbScreen & JSXBase.HTMLAttributes<HTMLMbScreenElement>;
"mb-spinner": LocalJSX.MbSpinner & JSXBase.HTMLAttributes<HTMLMbSpinnerElement>;
}
}
}