/* * Copyright (c) 2025, Salesforce, Inc. * All rights reserved. * For full license text, see the LICENSE.txt file */ /** * The `lightning/barcodeScanner` component scans barcodes on a mobile device. * @see {@link https://developer.salesforce.com/docs/component-library/bundle/lightning-barcodeScanner/documentation | Lightning Barcode Scanner Documentation} */ declare module "lightning/barcodeScanner" { import { LightningElement } from "lwc"; /** * Scans barcodes on a mobile device. */ export default class BarcodeScanner extends LightningElement { /** * An object representing configuration details for a barcode scanning session. * The default value is an object with all supported barcode types. */ scannerOptions: ScannerOptions; /** * Enables continuous scanning when set to true. * The default value is false. */ enableContinuousScan: boolean; /** * The URL of a custom image for the enabled icon. * The default value is 'action:scan_enabled'. */ enabledIconSrc: string; /** * The URL of a custom image for the disabled icon. * The default value is 'action:scan_disabled'. */ disabledIconSrc: string; /** * The size of the barcode scanner icon. Supported values are 'small', 'medium', and 'large'. * The default value is 'medium'. */ iconSize: string; /** * Assistive technology text to describe the enabled barcode scanner icon. * The default value is 'Scanner enabled'. */ enabledAlternativeText: string; /** * Assistive technology text to describe the disabled barcode scanner icon. * The default value is 'Scanner disabled'. */ disabledAlternativeText: string; /** * Disables the barcode scanner button when set to true. * The default value is false. */ disabled: boolean; } /** * Represents configuration options for a barcode scanning session. * @see {@link https://developer.salesforce.com/docs/platform/lwc/guide/reference-lightning-barcodescanner-data-types#barcodescanneroptions | Barcode Scanner Options} */ export interface ScannerOptions { barcodeTypes?: string[]; instructionText?: string; successText?: string; showSuccessCheckMark?: boolean; supportInvertedColors?: boolean; vibrateOnSuccess?: boolean; scannerSize?: string; cameraFacing?: string; backgroundViewHTML?: string; presentWithAnimation?: boolean; manualConfirmation?: boolean; previewBarcodeData?: boolean; enableBulkScan?: boolean; enableMultiScan?: boolean; } }