capacitor-plugin-scanbot-sdk
Version:
Scanbot Document and Barcode Scanner SDK for Capacitor
264 lines (242 loc) • 8.37 kB
TypeScript
import { ArOverlayGeneralConfiguration } from '../../ui_v2/barcode/ArTrackingOverlayConfiguration';
import { BarcodeInfoMapping } from '../../ui_v2/barcode/BarcodeInfoMapping';
import { BadgedButton, ButtonConfiguration, IconStyle, StyledText } from '../../ui_v2/common/Common';
import type { DeepPartial } from '../../utils/utils';
import { PartiallyConstructible } from '../../utils/utils';
/**
Configuration of the mode used for scanning multiple barcodes.
- `COUNTING`:
Scan barcodes even if they have the same value and count the number of repeated barcodes.
- `UNIQUE`:
Only scan barcodes with unique values. Subsequent barcodes with the same values will be ignored.
*/
export type MultipleBarcodesScanningMode = 'COUNTING' | 'UNIQUE';
export declare const MultipleBarcodesScanningModeValues: MultipleBarcodesScanningMode[];
/**
Configuration of the barcode result sheet's default visibility state.
- `BUTTON`:
Result sheet is hidden and can be opened by pressing the button. The button can show the total barcode count.
- `COLLAPSED_SHEET`:
Result sheet is visible and collapsed and can be expanded by dragging it up.
*/
export type SheetMode = 'BUTTON' | 'COLLAPSED_SHEET';
export declare const SheetModeValues: SheetMode[];
/**
Configuration of the barcodes result sheet's height while collapsed.
- `SMALL`:
Result sheet is collapsed as much as possible, showing only the top part.
- `LARGE`:
Result sheet is not completely collapsed, revealing more information.
*/
export type CollapsedVisibleHeight = 'SMALL' | 'LARGE';
export declare const CollapsedVisibleHeightValues: CollapsedVisibleHeight[];
/**
Configuration of the preview mode for scanning multiple barcodes.
*/
export declare class Sheet extends PartiallyConstructible {
/**
Mode used for the preview for scanning multiple barcodes.
Default is COLLAPSED_SHEET
*/
mode: SheetMode;
/**
Height of the collapsed result sheet.
Default is SMALL
*/
collapsedVisibleHeight: CollapsedVisibleHeight;
/**
Configuration of the list button.
*/
listButton: BadgedButton;
/** @param source {@displayType `DeepPartial<Sheet>`} */
constructor(source?: DeepPartial<Sheet>);
}
/**
Configuration of the swipe-to-delete button.
*/
export declare class SwipeToDelete extends PartiallyConstructible {
/**
Whether swipe to delete is enabled or not.
Default is true
*/
enabled: boolean;
/**
Color of the swipe-to-delete button.
Default is "?sbColorNegative"
*/
backgroundColor: string;
/**
Color of the icon on the swipe-to-delete button.
Default is "?sbColorOnPrimary"
*/
iconColor: string;
/** @param source {@displayType `DeepPartial<SwipeToDelete>`} */
constructor(source?: DeepPartial<SwipeToDelete>);
}
/**
Configuration of the dialog to manually edit the barcode count.
*/
export declare class ManualCountEditDialog extends PartiallyConstructible {
/**
Color of the edit dialog's background.
Default is "?sbColorSurface"
*/
sheetColor: string;
/**
Color of the divider and separator lines in the edit dialog.
Default is "?sbColorOutline"
*/
dividerColor: string;
/**
Background color of the overlay surrounding the edit dialog.
Default is "?sbColorModalOverlay"
*/
modalOverlayColor: string;
/**
Configuration of the edit dialog's title.
*/
title: StyledText;
/**
Configuration of the edit dialog's info text.
*/
info: StyledText;
/**
Configuration of the edit dialog's confirm button. Hiding both the update and cancel buttons simultaneously is an undefined behavior.
*/
updateButton: ButtonConfiguration;
/**
Configuration of the edit dialog's cancel button. Hiding both the update and cancel buttons simultaneously is an undefined behavior.
*/
cancelButton: ButtonConfiguration;
/**
Configuration of the edit dialog's button to clear the entered count number.
*/
clearTextButton: IconStyle;
/** @param source {@displayType `DeepPartial<ManualCountEditDialog>`} */
constructor(source?: DeepPartial<ManualCountEditDialog>);
}
/**
Configuration of the list containing the barcodes that have already been scanned.
*/
export declare class SheetContent extends PartiallyConstructible {
/**
Color of the list's background.
Default is "?sbColorSurface"
*/
sheetColor: string;
/**
The color of the dividers in the list sheet.
Default is "?sbColorOutline"
*/
dividerColor: string;
/**
Enables the user to change the number of scanned items by pressing +,-, or changing the number using a keyboard.
Default is true
*/
manualCountChangeEnabled: boolean;
/**
The color of the outline of the manual counting buttons in the list sheet.
Default is "?sbColorOutline"
*/
manualCountOutlineColor: string;
/**
Color of the buttons for manually changing the barcode count.
Default is "?sbColorPrimary"
*/
manualCountChangeColor: string;
/**
Configuration of the barcode list's title. By default displays the total number of scanned barcodes.
*/
title: StyledText;
/**
Configuration of the button for clearing the barcode list.
*/
clearAllButton: ButtonConfiguration;
/**
Configuration of the title of a barcode list entry (displaying the barcode's value).
*/
barcodeItemTitle: StyledText;
/**
Configuration of the subtitle of a barcode list entry (displaying the barcode's symbology).
*/
barcodeItemSubtitle: StyledText;
/**
Visibility of the barcode image in a barcode list entry.
Default is true
*/
barcodeItemImageVisible: boolean;
/**
Configuration of the barcode list's submit button.
*/
submitButton: ButtonConfiguration;
/**
Configuration of the button to start scanning displayed in an empty barcode list.
*/
startScanningButton: ButtonConfiguration;
/**
Configuration of the title displayed in an empty barcode list.
*/
placeholderTitle: StyledText;
/**
Configuration of the subtitle displayed in an empty barcode list.
*/
placeholderSubtitle: StyledText;
/**
Background color of the icon displayed in an empty barcode list.
Default is "?sbColorOutline"
*/
placeholderIconBackground: string;
/**
Configuration of the icon displayed in an empty barcode list.
*/
placeholderIcon: IconStyle;
/**
The style of the swipe-to-delete button.
*/
swipeToDelete: SwipeToDelete;
/** @param source {@displayType `DeepPartial<SheetContent>`} */
constructor(source?: DeepPartial<SheetContent>);
}
/**
Configuration of the mode for scanning multiple barcodes.
*/
export declare class MultipleScanningMode extends PartiallyConstructible {
readonly _type: 'MultipleScanningMode';
/**
Time interval in milliseconds before a barcode is counted again. 0 = no delay. The default value is 1000.
Default is 1000
*/
countingRepeatDelay: number;
/**
Whether the user can submit an empty barcode list.
Default is false
*/
allowEmptySubmission: boolean;
/**
Mode used for scanning multiple barcodes.
Default is COUNTING
*/
mode: MultipleBarcodesScanningMode;
/**
Configuration of the preview mode for scanning multiple barcodes.
*/
sheet: Sheet;
/**
Configuration of the list containing the barcodes that have already been scanned.
*/
sheetContent: SheetContent;
/**
Configuration of the dialog to manually edit the barcode count.
*/
manualCountEditDialog: ManualCountEditDialog;
/**
Appearance of the barcode info mapping.
*/
barcodeInfoMapping: BarcodeInfoMapping;
/**
Configuration of the AR overlay.
*/
arOverlay: ArOverlayGeneralConfiguration;
/** @param source {@displayType `DeepPartial<MultipleScanningMode>`} */
constructor(source?: DeepPartial<MultipleScanningMode>);
}