@syncfusion/ej2
Version:
A modern JavaScript UI toolkit that has been built from the ground up to be lightweight, responsive, modular and touch friendly. It is written in TypeScript and has no external dependencies.
1,746 lines (1,745 loc) • 13.7 MB
Plain Text
declare namespace ej {
export namespace barcodeGenerator {
//node_modules/@syncfusion/ej2-barcode-generator/src/qrcode/qrcode.d.ts
/**
* Represents the Qrcode control
* ```
*/
export class QRCodeGenerator extends base.Component<HTMLElement> implements base.INotifyPropertyChanged {
/**
* Constructor for creating the widget
*
* @param {QRCodeGeneratorModel} options - Provide the instance.
* @param {HTMLElement} element - Provide the element .
*/
constructor(options?: QRCodeGeneratorModel, element?: HTMLElement | string);
/**
* Defines the height of the QR code model.
*
* @default '100%'
*/
height: string | number;
/**
* Specifies the logo overlay configuration for the QR code.
*
* @default ''
*/
logo: QRCodeLogoModel;
/**
* Defines the width of the QR code model.
*
* @default '100%'
*/
width: string | number;
/**
* Defines the QR code rendering mode.
*
* * SVG - Renders the bar-code objects as SVG elements
* * Canvas - Renders the bar-code in a canvas
*
* @default 'SVG'
*/
mode: RenderingMode;
/**
* Defines the xDimension of the QR code model.
*
*/
xDimension: number;
/**
* Defines the error correction level of the QR code.
*
* @aspDefaultValueIgnore
* @aspNumberEnum
* @default undefined
*/
errorCorrectionLevel: ErrorCorrectionLevel;
/**
* Defines the margin properties for the QR code.
*
* @default ''
*/
margin: MarginModel;
/**
* Defines the background color of the QR code.
*
* @default 'white'
*/
backgroundColor: string;
/**
* Triggers if you enter any invalid character.
*
* @event
*/
invalid: base.EmitType<Object>;
/**
* Defines the forecolor of the QR code.
*
* @default 'black'
*/
foreColor: string;
/**
* Defines the text properties for the QR code.
*
* @default ''
*/
displayText: DisplayTextModel;
/**
* * Defines the version of the QR code.
*
* @aspDefaultValueIgnore
* @aspNumberEnum
* @default undefined
*/
version: QRCodeVersion;
private widthChange;
private heightChange;
private isSvgMode;
private barcodeRenderer;
/**
* Defines the type of barcode to be rendered.
*
* @default undefined
*/
value: string;
/** @private */
localeObj: base.L10n;
/** @private */
private defaultLocale;
private barcodeCanvas;
/**
* Renders the barcode control .
*
* @returns {void}
*/
render(): void;
private triggerEvent;
private renderElements;
private setCulture;
private getElementSize;
private initialize;
protected preRender(): void;
/**
* Get the properties to be maintained in the persisted state.
*
* @returns {string} Get the properties to be maintained in the persisted state.
*/
getPersistData(): string;
/**
* Returns the module name of the barcode
*
* @returns {string} Returns the module name of the barcode
*/
getModuleName(): string;
/**
* It is used to destroy the Barcode component.
*
* @function destroy
* @returns {void}
*/
destroy(): void;
private initializePrivateVariables;
/**
* Export the barcode as an image in the specified image type and downloads it in the browser.
*
* @returns {void} Export the barcode as an image in the specified image type and downloads it in the browser.
* @param {string} filename - Specifies the filename of the barcode image to be download.
* @param {BarcodeExportType} barcodeExportType - Defines the format of the barcode to be exported
*/
exportImage(filename: string, barcodeExportType: BarcodeExportType): void;
/**
* Export the barcode as an image in the specified image type and returns it as base64 string.
*
* @returns {string} Export the barcode as an image in the specified image type and returns it as base64 string.
* @param {BarcodeExportType} barcodeExportType - Defines the format of the barcode to be exported
*/
exportAsBase64Image(barcodeExportType: BarcodeExportType): Promise<string>;
onPropertyChanged(newProp: QRCodeGeneratorModel, oldProp: QRCodeGeneratorModel): void;
}
//node_modules/@syncfusion/ej2-barcode-generator/src/qrcode/qrcode-model.d.ts
/**
* Interface for a class QRCodeGenerator
*/
export interface QRCodeGeneratorModel extends base.ComponentModel{
/**
* Defines the height of the QR code model.
*
* @default '100%'
*/
height?: string | number;
/**
* Specifies the logo overlay configuration for the QR code.
*
* @default ''
*/
logo?: QRCodeLogoModel;
/**
* Defines the width of the QR code model.
*
* @default '100%'
*/
width?: string | number;
/**
* Defines the QR code rendering mode.
*
* * SVG - Renders the bar-code objects as SVG elements
* * Canvas - Renders the bar-code in a canvas
*
* @default 'SVG'
*/
mode?: RenderingMode;
/**
* Defines the xDimension of the QR code model.
*
*/
xDimension?: number;
/**
* Defines the error correction level of the QR code.
*
* @aspDefaultValueIgnore
* @aspNumberEnum
* @default undefined
*/
errorCorrectionLevel?: ErrorCorrectionLevel;
/**
* Defines the margin properties for the QR code.
*
* @default ''
*/
margin?: MarginModel;
/**
* Defines the background color of the QR code.
*
* @default 'white'
*/
backgroundColor?: string;
/**
* Triggers if you enter any invalid character.
*
* @event
*/
invalid?: base.EmitType<Object>;
/**
* Defines the forecolor of the QR code.
*
* @default 'black'
*/
foreColor?: string;
/**
* Defines the text properties for the QR code.
*
* @default ''
*/
displayText?: DisplayTextModel;
/**
* * Defines the version of the QR code.
*
* @aspDefaultValueIgnore
* @aspNumberEnum
* @default undefined
*/
version?: QRCodeVersion;
/**
* Defines the type of barcode to be rendered.
*
* @default undefined
*/
value?: string;
}
//node_modules/@syncfusion/ej2-barcode-generator/src/qrcode/qr-error-correction.d.ts
/**
* Qrcode used to calculate the Qrcode control
*/
export class ErrorCorrectionCodewords {
/**
* Holds the length
*/
private mLength;
/**
* Holds the Error Correction Code Word
*/
private eccw;
/**
* Holds the databits
*/
private databits;
/**
* Holds the Data Code word
*/
private mDataCodeWord;
/**
* Holds G(x)
*/
private gx;
/**
* Holds all the values of Alpha
*/
private alpha;
/**
* Holds the Decimal value
*/
private decimalValue;
/**
* Holds the values of QR Barcode
*/
private mQrBarcodeValues;
/**
* Sets and Gets the Data code word
*
* @param {string} value - Sets and Gets the Data code word
* @private
*/
DC: string[];
/**
* Sets and Gets the DataBits
*
* @param {string} value - Sets and Gets the DataBits
* @private
*/
DataBits: number;
/**
* Sets and Gets the Error Correction Code Words
*
* @param {string} value - Sets and Gets the Error Correction Code Words
* @private
*/
Eccw: number;
/**
* Initializes Error correction code word
*
* @param {QRCodeVersion} version - version of the qr code
* @param {ErrorCorrectionLevel} correctionLevel - defines the level of error correction.
*/
constructor(version: QRCodeVersion, correctionLevel: ErrorCorrectionLevel);
/**
* Gets the Error correction code word
*
* @returns { number} Gets the Error correction code word
* @private
*/
getErcw(): string[];
/**
* Convert to decimal
*
* @returns {void}Convert to decimal.
* @param {string[]} inString - Provide the version for the QR code
* @private
*/
private toDecimal;
/**
* Convert decimal to binary.
*
* @returns {string[]}Convert decimal to binary.
* @param {number[]} decimalRepresentation - Provide the version for the QR code
* @private
*/
private toBinary;
/**
* Polynomial division.
*
* @returns {string[]}Polynomial division.
* @private
*/
private divide;
private xORPolynoms;
private multiplyGeneratorPolynomByLeadterm;
private convertToDecNotation;
private convertToAlphaNotation;
private findLargestExponent;
private getIntValFromAlphaExp;
/**
* Find the element in the alpha
*
* @returns {number}Find the element in the alpha.
* @param {QRCodeVersion} element - Provide the element for the Qr code
* @param {ErrorCorrectionLevel} alpha -provide the number
* @private
*/
private findElement;
/**
* Gets g(x) of the element
*/
/**
* Gets g(x) of the element
*
* @returns {number}Gets g(x) of the element .
* @param {QRCodeVersion} element - Provide the element for the Qr code
* @param {ErrorCorrectionLevel} alpha -provide the number
* @private
*/
private getElement;
}
//node_modules/@syncfusion/ej2-barcode-generator/src/qrcode/qr-code-util.d.ts
/**
* Qrcode used to calculate the Qrcode control
*/
export class QRCode {
private mVersion;
private mInputMode;
private validInput;
/**
* Total bits required in mixing mode.
*/
private totalBits;
/**
* Holds the data of Function Pattern.
*/
private mModuleValue;
private mDataAllocationValues;
private mQrBarcodeValues;
/**
* Set version for mixing mode.
*/
private mixVersionERC;
/**
* Data to be currently encoded in Mixing Mode
*/
private mixExecutablePart;
/**
* Count of mixing mode blocks.
*/
private mixDataCount;
/**
* Holds the Number of Modules.
*/
private mNoOfModules;
/**
* Check if User Mentioned Mode
*/
private mIsUserMentionedMode;
private chooseDefaultMode;
/** @private */
text: string;
private mixRemainingPart;
private isXdimension;
private mXDimension;
/**
* Get or Private set the XDimension values.
*
* @returns {number}Get or Private set the XDimension values..
* @private
*/
/**
* Get or Private set the XDimension values.
*
* @param {number} value - Get or Private set the XDimension values.
* @private
*/
XDimension: number;
private inputMode;
/**
*Get or Private set the version
*
* @returns {QRCodeVersion}Get or Private set the version
* @private
*/
/**
* Get or Private set the version
*
* @param {QRCodeVersion} value - Get or Private set the version
* @private
*/
version: QRCodeVersion;
private mIsEci;
/** @private */
mIsUserMentionedErrorCorrectionLevel: boolean;
private isSvgMode;
private mEciAssignmentNumber;
/** @private */
mIsUserMentionedVersion: boolean;
/** @private */
mErrorCorrectionLevel: ErrorCorrectionLevel;
private textList;
private mode;
private getBaseAttributes;
private getInstance;
private drawImage;
/**
* Draw the QR code in SVG.
*
* @param {HTMLElement} char - Provide the char to render .
* @param {HTMLElement} canvas - Provide the canvas element .
* @param {HTMLElement} height - Provide the height for the canvas element .
* @param {HTMLElement} width - Provide the width for the canvas element .
* @param {HTMLElement} margin - Provide the margin for thecanvas element .
* @param {HTMLElement} displayText - Provide display text for the canvas element .
* @param {HTMLElement} mode - Provide the mode to render .
* @param {HTMLElement} foreColor - Provide the color for the barcode to render.
* @param {HTMLElement} logo - Provide the logo for the QR code.
* @returns {boolean} Draw the barcode SVG .
* @private
*/
draw(char: string, canvas: HTMLElement, height: number, width: number, margin?: MarginModel, displayText?: DisplayTextModel, mode?: boolean, foreColor?: string, logo?: QRCodeLogoModel): boolean;
private containsRect;
private drawText;
private drawDisplayText;
private generateValues;
/**
* Draw the PDP in the given location
*
* @returns {void} Draw the PDP in the given location.
* @param {string} x - The x co-ordinate.
* @param {string} y - The y co-ordinate.
* @private
*/
private drawPDP;
/**
* Draw the Timing Pattern
*
* @returns {void} Draw the PDP in the given location.
* @private
*/
private drawTimingPattern;
private initialize;
/**
* Adds quietzone to the QR Barcode..\
*
* @returns {void} Adds quietzone to the QR Barcode. .
* @private
*/
private addQuietZone;
/**
* Draw the Format Information.\
*
* @returns {void} Draw the Format Information .
* @private
*/
private drawFormatInformation;
/**
* Allocates the Encoded Data and then Mask
*
* @param Data - Encoded Data
*/
private dataAllocationAndMasking;
/**
* Allocates Format and Version Information.\
*
* @returns {void} Allocates Format and Version Information.
* @private
*/
private allocateFormatAndVersionInformation;
/**
*Draw the Alignment Pattern in the given location.\
*
* @returns {void} Draw the Alignment Pattern in the given location .
* @param {HTMLElement} x - Provide the canvas element .
* @param {HTMLElement} y - Provide the canvas element .
* @private
*/
private drawAlignmentPattern;
/**
*Gets the Allignment pattern coordinates of the current version.\
*
* @returns {number[]}Gets the Allignment pattern coordinates of the current version. .
* @private
*/
private getAlignmentPatternCoOrdinates;
/**
* Encode the Input Data
*/
private encodeData;
/**
* Converts string value to Boolean\
*
* @returns {boolean[]} Converts string value to Boolean .
* @param {HTMLElement} numberInString - Provide the canvas element .
* @param {number} noOfBits - Provide the canvas element .
* @private
*/
private stringToBoolArray;
/**
* Converts Integer value to Boolean\
*
* @returns {boolean[]} Converts Integer value to Boolean .
* @param {HTMLElement} number -The Integer value .
* @param {number} noOfBits - Number of Bits .
* @private
*/
private intToBoolArray;
/**
* Splits the Code words\
*
* @returns {boolean[]} Splits the Code words .
* @param {HTMLElement} ds -The Encoded value Blocks .
* @param {number} blk - Index of Block Number .
* @param {number} count - Length of the Block .
* @private
*/
private splitCodeWord;
/**
* Creates the Blocks\
*
* @returns {boolean[]} Creates the Blocks .
* @param {HTMLElement} encodeData -The Encoded value. .
* @param {number} noOfBlocks -Number of Blocks .
* @private
*/
private createBlocks;
}
/** @private */
export class ModuleValue {
isBlack: boolean;
isFilled: boolean;
isPdp: boolean;
constructor();
}
//node_modules/@syncfusion/ej2-barcode-generator/src/qrcode/qr-barcode-values.d.ts
/**
* Qrcode used to calculate the Qrcode control
*/
export class PdfQRBarcodeValues {
/**
* Holds the Version Information.
*/
private mVersion;
/**
* Holds the Error Correction Level.
*/
private mErrorCorrectionLevel;
/**
* Holds the Number of Data code word.
*/
private mNumberOfDataCodeWord;
/**
* Holds the Number of Error correcting code words.
*/
private mNumberOfErrorCorrectingCodeWords;
/**
* Holds the Number of Error correction Blocks.
*/
private mNumberOfErrorCorrectionBlocks;
/**
* Holds the End value of the version.
*/
private mEnd;
/**
* Holds the Data copacity of the version.
*/
private mDataCapacity;
/**
* Holds the Format Information.
*/
private mFormatInformation;
/**
* Holds the Version Information.
*/
private mVersionInformation;
/**
* Holds all the values of Error correcting code words.
*/
private numberOfErrorCorrectingCodeWords;
/**
* Hexadecimal values of CP437 characters
*/
private cp437CharSet;
/**
* Hexadecimal values of ISO8859_2 characters
*/
private iso88592CharSet;
/**
* Hexadecimal values of ISO8859_3 characters
*/
private iso88593CharSet;
/**
* Hexadecimal values of ISO8859_4 characters
*/
private iso88594CharSet;
/**
* Hexadecimal values of Windows1250 characters
*/
private windows1250CharSet;
/**
* Hexadecimal values of Windows1251 characters
*/
private windows1251CharSet;
/**
* Hexadecimal values of Windows1252 characters
*/
private windows1252CharSet;
/**
* Hexadecimal values of Windows1256 characters
*/
private windows1256CharSet;
/**
* Equivalent values of CP437 characters
*/
private cp437ReplaceNumber;
/**
* Equivalent values of ISO8859_2 characters
*/
private iso88592ReplaceNumber;
/**
* Equivalent values of ISO8859_3 characters
*/
private iso88593ReplaceNumber;
/**
* Equivalent values of ISO8859_4 characters
*/
private iso88594ReplaceNumber;
/**
* Equivalent values of Windows1250 characters
*/
private windows1250ReplaceNumber;
/**
* Equivalent values of Windows1251 characters
*/
private windows1251ReplaceNumber;
/**
* Equivalent values of Windows1252 characters
*/
private windows1252ReplaceNumber;
/**
* Equivalent values of Windows1256 characters
*/
private windows1256ReplaceNumber;
/**
* Holds all the end values.
*/
/** @private */
endValues: number[];
/**
* Holds all the Data capacity values.
*/
/** @private */
dataCapacityValues: number[];
/**
* Holds all the Numeric Data capacity of the Error correction level Low.
*/
/** @private */
numericDataCapacityLow: number[];
/**
* Holds all the Numeric Data capacity of the Error correction level Medium.
*/
/** @private */
numericDataCapacityMedium: number[];
/**
* Holds all the Numeric Data capacity of the Error correction level Quartile.
*/
/** @private */
numericDataCapacityQuartile: number[];
/**
* Holds all the Numeric Data capacity of the Error correction level High.
*/
/** @private */
numericDataCapacityHigh: number[];
/**
* Holds all the Alpha numeric Data capacity of the Error correction level Low.
*/
/** @private */
alphanumericDataCapacityLow: number[];
/**
* Holds all the Alpha numeric Data capacity of the Error correction level Medium.
*/
/** @private */
alphanumericDataCapacityMedium: number[];
/**
* Holds all the Alpha numeric Data capacity of the Error correction level Quartile.
*/
/** @private */
alphanumericDataCapacityQuartile: number[];
/**
* Holds all the Alpha numeric Data capacity of the Error correction level High.
*/
/** @private */
alphanumericDataCapacityHigh: number[];
/**
* Holds all the Binary Data capacity of the Error correction level Low.
*/
/** @private */
binaryDataCapacityLow: number[];
/**
* Holds all the Binary Data capacity of the Error correction level Medium.
*/
/** @private */
binaryDataCapacityMedium: number[];
/**
* Holds all the Binary Data capacity of the Error correction level Quartile.
*/
/** @private */
binaryDataCapacityQuartile: number[];
/**
* Holds all the Binary Data capacity of the Error correction level High.
*/
/** @private */
binaryDataCapacityHigh: number[];
/**
* Holds all the Mixed Data capacity of the Error correction level Low.
*/
private mixedDataCapacityLow;
/**
* Holds all the Mixed Data capacity of the Error correction level Medium.
*/
private mixedDataCapacityMedium;
/**
* Holds all the Mixed Data capacity of the Error correction level Quartile.
*/
private mixedDataCapacityQuartile;
/**
* Holds all the Mixed Data capacity of the Error correction level High.
*/
private mixedDataCapacityHigh;
/**
* Get or public set the Number of Data code words.
*
* @returns { number} Get or public set the Number of Data code words.
* @private
*/
/**
* Get or public set the Number of Data code words.
*
* @param {number} value - Get or public set the Number of Data code words.
* @private
*/
NumberOfDataCodeWord: number;
/**
* Get or Private set the Number of Error correction Blocks.
*
* @returns { number} Get or Private set the Number of Error correction Blocks.
* @private
*/
/**
* Get or Private set the Number of Error correction code words.
*
* @param {number} value - Get or Private set the Number of Error correction code words.
* @private
*/
NumberOfErrorCorrectingCodeWords: number;
/**
* Get or Private set the Number of Error correction Blocks.
*
* @returns { number[]}Get or Private set the Number of Error correction Blocks.
* @private
*/
/**
* set or Private set the Number of Error correction Blocks.
*
* @param {number[]} value - et or Private set the Number of Error correction Blocks.
* @private
*/
NumberOfErrorCorrectionBlocks: number[];
/**
* Set the End value of the Current Version.
*/
private End;
/**
* Get or Private set the Data capacity.
*
* @returns { number[]}Get or Private set the Data capacity.
* @private
*/
/**
* Get or Private set the Data capacity.
*
* @param {string} value - Get or Private set the Data capacity.
* @private
*/
private DataCapacity;
/**
* Get or Private set the Format Information.
*
* @returns { number[]} Get or Private set the Format Information.
* @private
*/
/**
* Get or Private set the Format Information.
*
* @param {string} value - Get or Private set the Format Information.
* @private
*/
FormatInformation: number[];
/**
* Get or Private set the Version Information.
*
* @returns { number[]} Validate the given input.
* @private
*/
/** @private */
/**
* Get or Private set the Version Information.
*
* @param {string} value - Get or Private set the Version Information.
* @private
*/
VersionInformation: number[];
/**
* Initializes the values
*
* @param version - version of the qr code
* @param errorCorrectionLevel - defines the level of error correction.
*/
constructor(version: QRCodeVersion, errorCorrectionLevel: ErrorCorrectionLevel);
/**
* Gets the Alphanumeric values.
*
* @param {string} value - Defines the format of the qrcode to be exported
* @returns {number} Gets the Alphanumeric values.
* @private
*/
getAlphaNumericValues(value: string): number;
/**
* Gets number of data code words.
*/
private obtainNumberOfDataCodeWord;
/**
* Get number of Error correction code words.
*
* @returns {number} Get number of Error correction code words.
* @private
*/
private obtainNumberOfErrorCorrectingCodeWords;
/**
* Gets number of Error correction Blocks.
*/
private obtainNumberOfErrorCorrectionBlocks;
/**
* Gets the End of the version.
*
* @returns {number} Gets the End of the version.
* @private
*/
private obtainEnd;
/**
* Gets Data capacity
*
* @returns {number} Gets Data capacity
* @private
*/
private obtainDataCapacity;
/**
* Gets format information
*
* @returns {number} Gets format information
* @private
*/
private obtainFormatInformation;
/**
* Gets version information .
*
* @returns {number}Gets version information.
* @private
*/
private obtainVersionInformation;
/**
* Gets Numeric Data capacity .
*
* @returns {number}Gets Numeric Data capacity.
* @param {QRCodeVersion} version - Provide the version for the QR code
* @param {ErrorCorrectionLevel} errorCorrectionLevel -provide the error correction level
* @private
*/
getNumericDataCapacity(version: QRCodeVersion, errorCorrectionLevel: ErrorCorrectionLevel): number;
/**
* Gets Alphanumeric data capacity. .
*
* @returns {number}Gets Alphanumeric data capacity..
* @param {QRCodeVersion} version - Provide the version for the QR code
* @param {ErrorCorrectionLevel} errorCorrectionLevel -provide the error correction level
* @private
*/
getAlphanumericDataCapacity(version: QRCodeVersion, errorCorrectionLevel: ErrorCorrectionLevel): number;
/**
* get the binary data capacity .
*
* @returns {number} get the binary data capacity.
* @param {QRCodeVersion} version - Provide the version for the QR code
* @param {ErrorCorrectionLevel} errorCorrectionLevel -provide the error correction level
* @private
*/
getBinaryDataCapacity(version: QRCodeVersion, errorCorrectionLevel: ErrorCorrectionLevel): number;
}
//node_modules/@syncfusion/ej2-barcode-generator/src/datamatrix/datamatrix.d.ts
/**
* Represents the Datamatrix control
* ```
*/
export class DataMatrixGenerator extends base.Component<HTMLElement> implements base.INotifyPropertyChanged {
/**
* Defines encoding type of the DataMatrix.
*
* @default 'Auto'
*/
encoding: DataMatrixEncoding;
/**
* Defines encoding type of the DataMatrix.
*
* @default 'Auto'
*/
size: DataMatrixSize;
/**
* Defines the DataMatrix rendering mode.
* * SVG - Renders the bar-code objects as SVG elements
* * Canvas - Renders the bar-code in a canvas
*
* @default 'SVG'
*/
mode: RenderingMode;
/**
* Defines the value of the DataMatrix to be rendered.
*
* @default undefined
*/
value: string;
/**
* Defines the height of the DataMatrix.
*
* @default '100%'
*/
height: string | number;
/**
* Defines the width of the DataMatrix.
*
* @default '100%'
*/
width: string | number;
/**
* Defines the text properties for the DataMatrix.
*
* @default ''
*/
displayText: DisplayTextModel;
/**
* Defines the margin properties for the DataMatrix.
*
* @default ''
*/
margin: MarginModel;
/**
* Defines the background color of the DataMatrix.
*
* @default 'white'
*/
backgroundColor: string;
/**
* Triggers if you enter any invalid character.
*
* @event
*/
invalid: base.EmitType<Object>;
/**
* Defines the forecolor of the DataMatrix.
*
* @default 'black'
*/
foreColor: string;
/**
* Defines the xDimension of the DataMatrix.
*/
xDimension: number;
/** @private */
private barcodeRenderer;
private barcodeCanvas;
/** @private */
localeObj: base.L10n;
/** @private */
private defaultLocale;
/**
* It is used to destroy the Barcode component.
*
* @function destroy
* @returns {void}
*/
destroy(): void;
private initializePrivateVariables;
/**
* Constructor for creating the widget
*
* @param {DataMatrixGeneratorModel} options The barcode model.
* @param {HTMLElement | string} element The barcode element.
*/
constructor(options?: DataMatrixGeneratorModel, element?: HTMLElement | string);
/**
* Get the properties to be maintained in the persisted state.
*
* @returns {string} Get the properties to be maintained in the persisted state.
*/
getPersistData(): string;
/**
* Returns the module name of the barcode
*
* @returns {string} Returns the module name of the barcode
*/
getModuleName(): string;
private setCulture;
private getElementSize;
private initialize;
private triggerEvent;
protected preRender(): void;
onPropertyChanged(newProp: DataMatrixGeneratorModel, oldProp: DataMatrixGeneratorModel): void;
private checkdata;
/**
* Export the barcode as an image in the specified image type and downloads it in the browser.
*
* @returns {void} Export the barcode as an image in the specified image type and downloads it in the browser.
* @param {string} fileName - Specifies the filename of the barcode image to be download.
* @param {BarcodeExportType} exportType - Defines the format of the barcode to be exported
*/
exportImage(fileName: string, exportType: BarcodeExportType): void;
/**
* Export the barcode as an image in the specified image type and returns it as base64 string.
*
* @returns {string} Export the barcode as an image in the specified image type and returns it as base64 string.
* @param {BarcodeExportType} barcodeExportType - Defines the format of the barcode to be exported
*/
exportAsBase64Image(barcodeExportType: BarcodeExportType): Promise<string>;
private renderElements;
/**
* Renders the barcode control
*
* @returns {void}
*/
render(): void;
}
//node_modules/@syncfusion/ej2-barcode-generator/src/datamatrix/datamatrix-util.d.ts
/**
* DataMatrix used to calculate the DataMatrix barcode
*/
export class DataMatrix {
/** @private */
encodingValue: DataMatrixEncoding;
/** @private */
height: string | number;
/** @private */
width: string | number;
/** @private */
margin: MarginModel;
/** @private */
displayText: DisplayTextModel;
/** @private */
foreColor: string;
/** @private */
isSvgMode: boolean;
/** @private */
value: string;
private barcodeRenderer;
/** @private */
size: DataMatrixSize;
private mXDimension;
private mDataMatrixArray;
private actualColumns;
private actualRows;
/** @private */
XDimension: number;
private encodedCodeword;
private mSymbolAttribute;
private GetData;
private fillZero;
private DataMatrixNumericEncoder;
private ComputeBase256Codeword;
private DataMatrixBaseEncoder;
private copy;
private DataMatrixEncoder;
private PrepareDataCodeword;
private PdfDataMatrixSymbolAttribute;
private getmSymbolAttributes;
private PadCodewords;
private EccProduct;
/**
* Validate the given input to check whether the input is valid one or not.\
*
* @returns {boolean | string} Validate the given input to check whether the input is valid one or not .
* @param {HTMLElement} char - Provide the canvas element .
* @param {HTMLElement} characters - Provide the canvas element .
* @private
*/
private validateInput;
private ComputeErrorCorrection;
private CreateLogArrays;
private EccSum;
private EccDoublify;
private CreateRSPolynomial;
private PrepareCodeword;
private copyArray;
private ecc200placementbit;
private ecc200placementblock;
private ecc200placementcornerD;
private ecc200placementcornerA;
private ecc200placementcornerB;
private ecc200placementcornerC;
private ecc200placement;
private getActualRows;
private getActualColumns;
private AddQuiteZone;
private drawImage;
private CreateMatrix;
private create1DMatrixArray;
private create2DMartixArray;
/**
* Build the datamatrix.\
*
* @returns {number[] | string} Build the datamatrix .
* @private
*/
BuildDataMatrix(): number[] | string;
private drawText;
private getInstance;
private drawDisplayText;
private getDrawableSize;
/**
* Draw the barcode SVG.\
*
* @returns {void} Draw the barcode SVG .
* @param {HTMLElement} canvas - Provide the canvas element .
* @private
*/
draw(canvas: HTMLElement): void;
}
//node_modules/@syncfusion/ej2-barcode-generator/src/datamatrix/datamatrix-model.d.ts
/**
* Interface for a class DataMatrixGenerator
*/
export interface DataMatrixGeneratorModel extends base.ComponentModel{
/**
* Defines encoding type of the DataMatrix.
*
* @default 'Auto'
*/
encoding?: DataMatrixEncoding;
/**
* Defines encoding type of the DataMatrix.
*
* @default 'Auto'
*/
size?: DataMatrixSize;
/**
* Defines the DataMatrix rendering mode.
* * SVG - Renders the bar-code objects as SVG elements
* * Canvas - Renders the bar-code in a canvas
*
* @default 'SVG'
*/
mode?: RenderingMode;
/**
* Defines the value of the DataMatrix to be rendered.
*
* @default undefined
*/
value?: string;
/**
* Defines the height of the DataMatrix.
*
* @default '100%'
*/
height?: string | number;
/**
* Defines the width of the DataMatrix.
*
* @default '100%'
*/
width?: string | number;
/**
* Defines the text properties for the DataMatrix.
*
* @default ''
*/
displayText?: DisplayTextModel;
/**
* Defines the margin properties for the DataMatrix.
*
* @default ''
*/
margin?: MarginModel;
/**
* Defines the background color of the DataMatrix.
*
* @default 'white'
*/
backgroundColor?: string;
/**
* Triggers if you enter any invalid character.
*
* @event
*/
invalid?: base.EmitType<Object>;
/**
* Defines the forecolor of the DataMatrix.
*
* @default 'black'
*/
foreColor?: string;
/**
* Defines the xDimension of the DataMatrix.
*/
xDimension?: number;
}
//node_modules/@syncfusion/ej2-barcode-generator/src/barcode/one-dimension.d.ts
/**
* onedimension class is used to render all type of one dimensional shapes
*/
export abstract class OneDimension extends BarcodeBase {
private getInstance;
/**
* Return the drawable size of the rectangle .
*
* @returns {Rect} Return the drawable size of the rectangle.
* @param {MarginModel} margin - Specifies the filename of the barcode image to be download.
* @param {number} w - Specifies the filename of the barcode image to be download.
* @param {number} h - Defines the format of the barcode to be exported
* @private
*/
getDrawableSize(margin: MarginModel, w: number, h: number): Rect;
private getBaseAttributes;
private getBarLineRatio;
private multipleWidth;
private barCodeType;
private checkStartValueCondition;
private checkEndValueCondition;
private getDisplayText;
private checkExtraHeight;
private getWidthValue;
/**
* Returns the module name of the barcode
*
* @param {number[] | string[]} code - Returns the code as string or number collection.
* @param {HTMLElement} canvas - Returns the canvas.
* @param {string} isUpcE - Returns the UPCE values as string.
* @returns {void} Calculate the barcode attribute
* @private
*/
calculateBarCodeAttributes(code: number[] | string[], canvas: HTMLElement, isUpcE?: string): void;
private canIncrementCheck;
private verticalTextMargin;
private getAlignmentPosition;
/**
*Will draw the image for the barcode .
*
* @param {HTMLCanvasElement} canvas Barcode canvas element.
* @param {BaseAttributes []} options Barcode attributes .
* @function drawImage
* @returns {void} Export the barcode as an image in the specified image type and downloads it in the browser.
* @memberof Barcode
* @private
*/
drawImage(canvas: HTMLCanvasElement, options: BaseAttributes[]): void;
private updateDisplayTextSize;
private alignDisplayText;
private updateOverlappedTextPosition;
private drawText;
}
//node_modules/@syncfusion/ej2-barcode-generator/src/barcode/barcode.d.ts
/**
* Represents the Barcode control
* ```html
* <div id='barcode'/>
* ```
* ```typescript
* let barcode: Barcode = new Barcode({
* width:'1000px', height:'500px' });
* barcode.appendTo('#barcode');
* ```
*/
export class BarcodeGenerator extends base.Component<HTMLElement> implements base.INotifyPropertyChanged {
/**
* Defines the width of the barcode model.
* ```html
* <div id='barcode'/>
* ```
* ```typescript
* let barcode: Barcode = new Barcode({
* width:'1000px', height:'500px' });
* barcode.appendTo('#barcode');
* ```
*
* @default '100%'
*/
width: string | number;
/**
* Defines the height of the barcode model.
* ```html
* <div id='barcode'/>
* ```
* ```typescript
* let barcode: Barcode = new Barcode({
* height:'1000px', height:'500px' });
* barcode.appendTo('#barcode');
* ```
*
* @default '100'
*
*/
height: string | number;
/**
* Defines the barcode rendering mode.
* * SVG - Renders the bar-code objects as SVG elements
* * Canvas - Renders the bar-code in a canvas
*
* @default 'SVG'
*
*/
mode: RenderingMode;
/**
* Defines the type of barcode to be rendered.
*
* @default 'Code128'
*
*/
type: BarcodeType;
/**
* Defines the value of the barcode to be rendered.
*
* @default undefined
*
*/
value: string;
/**
* Defines the checksum for the barcode.
*
* @default 'true'
*
*/
enableCheckSum: boolean;
/**
* Defines the text properties for the barcode.
*
* @default ''
*
*/
displayText: DisplayTextModel;
/**
* Defines the margin properties for the barcode.
*
* @default ''
*
*/
margin: MarginModel;
/**
* Defines the background color of the barcode.
*
* @default 'white'
*
*/
backgroundColor: string;
/**
* Defines the forecolor of the barcode.
*
* @default 'black'
*
*/
foreColor: string;
/**
* Triggers if you enter any invalid character.
*
* @event
*/
invalid: base.EmitType<Object>;
/** @private */
localeObj: base.L10n;
/** @private */
private defaultLocale;
private barcodeCanvas;
private barcodeRenderer;
/**
* Constructor for creating the widget
*
* @param {BarcodeGeneratorModel} options The barcode model.
* @param {HTMLElement | string} element The barcode element.
*/
constructor(options?: BarcodeGeneratorModel, element?: HTMLElement | string);
private triggerEvent;
onPropertyChanged(newProp: BarcodeGeneratorModel, oldProp: BarcodeGeneratorModel): void;
private initialize;
/**
* Export the barcode as an image in the specified image type and downloads it in the browser.
*
* @returns {void} Export the barcode as an image in the specified image type and downloads it in the browser.
* @param {string} filename - Specifies the filename of the barcode image to be download.
* @param {BarcodeExportType} exportType - Defines the format of the barcode to be exported
*/
exportImage(filename: string, exportType: BarcodeExportType): void;
/**
* Export the barcode as an image in the specified image type and returns it as base64 string.
*
* @returns {string} Export the barcode as an image in the specified image type and returns it as base64 string.
* @param {BarcodeExportType} exportType - Defines the format of the barcode to be exported
*/
exportAsBase64Image(exportType: BarcodeExportType): Promise<string>;
private renderElements;
private refreshCanvasBarcode;
private clearCanvas;
/**
* Get the properties to be maintained in the persisted state.
*
* @returns {string} Get the properties to be maintained in the persisted state.
*/
getPersistData(): string;
/**
* @private
* @param real
*/
private getElementSize;
protected preRender(): void;
private initializePrivateVariables;
/**
* Method to set culture for chart
*/
private setCulture;
/**
* Renders the barcode control with nodes and connectors
*
* @returns {void}
*/
render(): void;
/**
* Returns the module name of the barcode
*
* @returns {string} Returns the module name of the barcode
*/
getModuleName(): string;
/**
*To provide the array of modules needed for control rendering
*
* @function destroy
* @returns {base.ModuleDeclaration[]} To provide the array of modules needed for control rendering
* @private
*/
requiredModules(): base.ModuleDeclaration[];
/**
* It is used to destroy the Barcode component.
*
* @function destroy
* @returns {void}
*/
destroy(): void;
}
//node_modules/@syncfusion/ej2-barcode-generator/src/barcode/barcode-model.d.ts
/**
* Interface for a class BarcodeGenerator
*/
export interface BarcodeGeneratorModel extends base.ComponentModel{
/**
* Defines the width of the barcode model.
* ```html
* <div id='barcode'/>
* ```
* ```typescript
* let barcode$: Barcode = new Barcode({
* width:'1000px', height:'500px' });
* barcode.appendTo('#barcode');
* ```
*
* @default '100%'
*/
width?: string | number;
/**
* Defines the height of the barcode model.
* ```html
* <div id='barcode'/>
* ```
* ```typescript
* let barcode$: Barcode = new Barcode({
* height:'1000px', height:'500px' });
* barcode.appendTo('#barcode');
* ```
*
* @default '100'
*
*/
height?: string | number;
/**
* Defines the barcode rendering mode.
* * SVG - Renders the bar-code objects as SVG elements
* * Canvas - Renders the bar-code in a canvas
*
* @default 'SVG'
*
*/
mode?: RenderingMode;
/**
* Defines the type of barcode to be rendered.
*
* @default 'Code128'
*
*/
type?: BarcodeType;
/**
* Defines the value of the barcode to be rendered.
*
* @default undefined
*
*/
value?: string;
/**
* Defines the checksum for the barcode.
*
* @default 'true'
*
*/
enableCheckSum?: boolean;
/**
* Defines the text properties for the barcode.
*
* @default ''
*
*/
displayText?: DisplayTextModel;
/**
* Defines the margin properties for the barcode.
*
* @default ''
*
*/
margin?: MarginModel;
/**
* Defines the background color of the barcode.
*
* @default 'white'
*
*/
backgroundColor?: string;
/**
* Defines the forecolor of the barcode.
*
* @default 'black'
*
*/
foreColor?: string;
/**
* Triggers if you enter any invalid character.
*
* @event
*/
invalid?: base.EmitType<Object>;
}
//node_modules/@syncfusion/ej2-barcode-generator/src/barcode/barcode-base.d.ts
/**
* defines the common methods for the barcode
*/
export abstract class BarcodeBase {
abstract validateInput(char: string, characters: string): boolean | string;
abstract drawImage(canvas: HTMLCanvasElement, options: BaseAttributes[], labelPosition: number, barcodeSize: Rect, endValue: number, textRender: string): void;
abstract getDrawableSize(margin: MarginModel, widthValue: number, height: number): void;
height: string | number;
width: string | number;
margin: MarginModel;
displayText: DisplayTextModel;
value: string;
foreColor: string;
type: BarcodeType;
isSvgMode: boolean;
alignment: Alignment;
enableCheckSum: boolean;
encodingValue: DataMatrixEncoding;
size: DataMatrixSize;
}
//node_modules/@syncfusion/ej2-barcode-generator/src/barcode/utility/dom-util.d.ts
/**
* DOM util
*/
/**
*will create the hrml element for the barcode .\
*
* @returns {HTMLElement} Will download the barode as image .
* @param {string} elementType - Provide the element type as string .
* @param {HTMLCanvasElement} attribute - Provide the object .
* @private
*/
export function createHtmlElement(elementType: string, attribute?: Object): HTMLElement;
/**
*will get the child nodes .\
*
* @returns {HTMLElement} will provide the svg element .
* @param {string} node - Provide the element type as string .
* @private
*/
export function getChildNode(node: SVGElement): SVGElement[] | HTMLCollection;
/**
*will return the size of the text .\
*
* @returns {Size} will provide the svg element .
* @param {BaseAttributes} textContent - Provide the base attribtues of the text .
* @private
*/
export function measureText(textContent: BaseAttributes): Size;
/**
*Will assign the attributes .\
*
* @returns {void} Will assign the attrbutes .
* @param {HTMLElement} element - Provide the element .
* @param {Object} attributes - Provide the attribtues .
* @private
*/
export function setAttribute(element: HTMLElement | SVGElement, attributes: {
[key: string]: any;
}): void;
/**
*Will create the required SVG element .\
*
* @returns {HTMLElement | SVGElement} Will create the required SVG element .
* @param {string} elementType - Provide the element type.
* @param {Object} attribute - Provide the attribtues .
* @private
*/
export function createSvgElement(elementType: string, attribute: Object): HTMLElement | SVGElement;
/**
*Will create measure element .\
*
* @returns {void} Will create measure element .
* @private
*/
export function createMeasureElements(): void;
//node_modules/@syncfusion/ej2-barcode-generator/src/barcode/utility/barcode-util.d.ts
/**
* Barcode util
*/
/**
* Draw the root element for the barcode.\
*
* @returns {BarcodeRenderer} Draw the barcode SVG .
* @param {QRCodeGeneratorModel} newProp - Provide the new property element .
* @param {HTMLElement} barcodeCanvas - Provide the canvas element .
* @param {RenderingMode} mode - Provide rendering mode .
* @param {string} id - Provide id for the element .
* @private
*/
export function removeChildElements(newProp: QRCodeGeneratorModel | DataMatrixGeneratorModel, barcodeCanvas: HTMLElement, mode: RenderingMode, id: string): BarcodeRenderer;
/**
* Get the attributes for the barcodes.\
*
* @returns {BaseAttributes} Get the attributes for the barcodes .
* @param {QRCodeGeneratorModel} width - Provide the canvas element .
* @param {number} height - Provide the height of the element .
* @param {number} offSetX - Provide the offset X for the element .
* @param {number} offsetY - Provide the offset X for the element .
* @param {string} color - Provide the color for the element .
* @param {string} strokeColor - Provide the stroke color for the element .
* @private
*/
export function getBaseAttributes(width: number, height: number, offSetX: number, offsetY: number, color: string, strokeColor?: string): BaseAttributes;
/**
* Clear the canvas element.\
*
* @returns {void} Clear the canvas element .
* @param {QRCodeGenerator} view - Provide the view .
* @param {HTMLCanvasElement} barcodeCanvas - Provide the canvas element .
* @private
*/
export function clearCanvas(view: QRCodeGenerator | DataMatrixGenerator, barcodeCanvas: HTMLCanvasElement): void;
/**
* Refresh the canvas barcode.\
*
* @returns {void} Refresh the canvas barcode .
* @param {QRCodeGenerator} qrCodeGenerator - Provide the qr code element .
* @param {HTMLCanvasElement} barcodeCanvas - Provide the canvas element .
* @private
*/
export function refreshCanvasBarcode(qrCodeGenerator: QRCodeGenerator | DataMatrixGenerator, barcodeCanvas: HTMLCanvasElement): void;
/**
* Will download the barode .\
*
* @returns {void} Will download the barode as image .
* @param {QRCodeGenerator} type - Provide the qr code element .
* @param {HTMLCanvasElement} fileName - Provide the canvas element .
* @param {HTMLCanvasElement} url - Provide the url string value .
* @private
*/
export function triggerDownload(type: string, fileName: string, url: string): void;
/**
* Will export the barode .\
*
* @returns {string} Will download the barode as image .
* @param {QRCodeGenerator} exportType - Provide the export type .
* @param {HTMLCanvasElement} fileName - Provide the file name .
* @param {HTMLCanvasElement} element - Provide the url string value .
* @param {HTMLCanvasElement} isReturnBase64 - Provide the url string value .
* @param {HTMLCanvasElement} code - Provide the url string value .
* @private
*/
export function export