UNPKG

scanbot-web-sdk

Version:

Scanbot Web Document and Barcode Scanner SDK

32 lines (31 loc) 1.41 kB
import React from "react"; import { ScanbotCameraProps, ScanbotCameraState, ScannerView } from "./scanner-view"; import { IFinderScannerHandle } from "./interfaces/base/i-finder-scanner-handle"; import ViewFinder from "./view/view-finder"; import { ViewFinderScannerConfiguration } from "./model/configuration/view-finder-scanner-configuration"; export declare class FinderScannerProps extends ScanbotCameraProps { } export declare class FinderScannerState extends ScanbotCameraState { isFinderVisible?: boolean; } export default class FinderScannerView<P extends FinderScannerProps, S extends FinderScannerState> extends ScannerView<P, S> implements IFinderScannerHandle { finder?: ViewFinder; constructor(props: P); componentDidMount(): void; componentWillUnmount(): void; /** * You should use this variable in your 'detect' method override to check if the detection is paused. * @internal */ paused: boolean; resumeDetection(): void; pauseDetection(): void; isDetectionPaused(): boolean; /** * Start of the detection loop. This needs to be overridden and should contain your infinite detection loop. * Internally it is called by 'componentDidMount' and stopped only when the component is disposed. * @internal */ detect(): Promise<void>; renderView(configuration: ViewFinderScannerConfiguration): React.ReactNode; }