import { EditorAPI, Id } from '../types/CommonTypes'; import { ColorUsage } from '../types/ColorStyleTypes'; import { BarcodeConfigurationOptions, BarcodeType, BarcodeCharacterSet, BarcodeErrorCorrectionLevel } from '../types/BarcodeTypes'; import { BarcodeSource } from '../types/FrameTypes'; import { PositionEnum } from '../types/LayoutTypes'; /** * The BarcodeController is responsible for all communication regarding Barcodes. * Methods inside this controller can be called by `window.SDK.barcode.{method-name}` */ export declare class BarcodeController { #private; /** * @ignore */ constructor(editorAPI: EditorAPI); /** * This method updates properties of the barcode * @param id the id of the barcodeFrame that needs to be updated. * @param properties A property to update * @returns */ private setBarcodeProperties; /** * This method will set the background of a barcode enabled or disabled * @param id the id of the barcodeFrame that needs to be updated. * @param enableBackground Whether the barcode's background is visible. * @returns */ setEnableBackground: (id: Id, enableBackground: boolean) => Promise>; /** * This method will set the barcode background color of a specified barcode frame. * @param id the id of the barcodeFrame that needs to be updated. * @param backgroundColor the new barcode background color that you want to set to the barcodeFrame. * @returns */ setBackgroundColor: (id: Id, backgroundColor: ColorUsage) => Promise>; /** * This method will set the visibility of the barcode's bars. * @param id the id of the barcodeFrame that needs to be updated. * @param enableBars Whether the barcode bars are visible. * @returns */ setEnableBars: (id: Id, enableBars: boolean) => Promise>; /** * This method will set the bar color of a specified barcode frame. * @param id the id of the barcodeFrame that needs to be updated. * @param barColor the new bar color that you want to set to the barcodeFrame. * @returns */ setBarColor: (id: Id, barColor: ColorUsage) => Promise>; /** * This method will set the source of the barcode to the given source. * @param id the id of the barcodeFrame that needs to be updated. * @param source the new source that you want to set to the barcodeFrame. * @returns */ setBarcodeSource: (id: Id, source: BarcodeSource) => Promise>; /** * This method will remove the source from the barcode frame provided. * @param id the id of the barcodeFrame that needs to have the source removed. * @returns */ removeBarcodeSource: (id: Id) => Promise>; /** * This method enables/disables displaying the text of the barcode. * @param id the id of the barcodeFrame that needs to be updated. * @param enableText true if the text should be displayed, false otherwise. * @returns */ setEnableText: (id: Id, enableText: boolean) => Promise>; /** * This method sets the bar height for 1-dimensional barcodes. * @param id the id of the barcodeFrame that needs to be updated. * @param barHeight the height of the bars in the barcode. The string value will be calculated (f.e. 1+1 will result in 2) * @returns */ setBarHeight: (id: Id, barHeight: string) => Promise>; /** * This method sets the magnification for 1-dimensional barcodes. * @param id the id of the barcodeFrame that needs to be updated. * @param magnification the magnification of the barcode. This is a decimal value where 1 denotes 100%. (f.e. 1.5 will result in 150%) * @returns */ setMagnification: (id: Id, magnification: number) => Promise>; /** * This method sets the quiet zone value of a specific barcode. * @param id The id of the specific barcode frame * @param value The quiet zone value * @param position When defined will update the quiet value of a single position, * otherwise will set all positions to the same value. Depending on this parameter * being defined, the `areQuietZoneValuesCombined` will also be updated. */ setQuietZoneValue: (id: Id, value: string, position?: PositionEnum) => Promise>; /** * This method sets the combined state of the quiet zone values. * @param id The id of the specific barcode frame * @param value Whether the quiet zone values are combined */ setAreQuietZoneValuesCombined: (id: Id, value: boolean) => Promise>; /** * This method sets the character set for the barcode. * @param id The id of the specific barcode frame. * @param errorCorrectionLevel The error correction level to set. * @returns */ setErrorCorrectionLevel: (id: Id, errorCorrectionLevel: BarcodeErrorCorrectionLevel) => Promise>; /** * This method sets the character set for the barcode. * @param id The id of the specific barcode frame. * @param characterSet The character set to set. * @returns */ setCharacterSet: (id: Id, characterSet: BarcodeCharacterSet) => Promise>; /** * This method sets the flag to render the end characters of the barcode. This is not * supported for all barcode types. * @param id The id of the specific barcode frame. * @param drawLightMarginIndicator The flag indicating if the end characters should be drawn or not * @returns */ setDrawLightMarginIndicator: (id: Id, drawLightMarginIndicator: boolean) => Promise>; /** * This method sets the flag to render the start and end characters of the barcode. This is not * supported for all barcode types. * @param id The id of the specific barcode frame. * @param drawStartStopChars The flag indicating if the start and stop characters should be drawn or not * @returns */ setDrawStartStopChars: (id: Id, drawStartStopChars: boolean) => Promise>; /** * This method returns the possible configuration options which are valid for the given barcode type. * @param type the barcode type for which the configuration options are requested. * @returns a BarcodeConfigurationOptions object */ getBarcodeConfigationOptions: (type: BarcodeType) => BarcodeConfigurationOptions; }