|
| 1 | +import React from "react"; |
| 2 | +import { BarCodeProperties } from "./../index"; |
| 3 | +import { BarCodeLabelPosition, BarCodeRenderAs, BarCodeType } from './../index'; |
| 4 | +export { BarCodeProperties } from "./../index"; |
| 5 | +export { BarCodeLabelPosition, BarCodeRenderAs, BarCodeType } from './../index'; |
| 6 | +export declare const Smart: any; |
| 7 | +export interface BarCodeProps extends BarCodeProperties { |
| 8 | + className?: string; |
| 9 | + style?: React.CSSProperties; |
| 10 | + onInvalid?: ((event?: Event) => void) | undefined; |
| 11 | + onCreate?: ((event?: Event) => void) | undefined; |
| 12 | + onReady?: ((event?: Event) => void) | undefined; |
| 13 | +} |
| 14 | +/** |
| 15 | + Barcodes encodes text value in a specific pattern. |
| 16 | +*/ |
| 17 | +export declare class BarCode extends React.Component<React.HTMLAttributes<Element> & BarCodeProps, any> { |
| 18 | + private _id; |
| 19 | + private nativeElement; |
| 20 | + private componentRef; |
| 21 | + get id(): string; |
| 22 | + /** Sets the background color of the barcode element. |
| 23 | + * Property type: string |
| 24 | + */ |
| 25 | + get backgroundColor(): string; |
| 26 | + set backgroundColor(value: string); |
| 27 | + /** Sets whether the barcode label is visible. |
| 28 | + * Property type: boolean |
| 29 | + */ |
| 30 | + get disaplyLabel(): boolean; |
| 31 | + set disaplyLabel(value: boolean); |
| 32 | + /** Sets the color of the barcode label. |
| 33 | + * Property type: string |
| 34 | + */ |
| 35 | + get labelCOlor(): string; |
| 36 | + set labelCOlor(value: string); |
| 37 | + /** Sets the font family of the barcode label. |
| 38 | + * Property type: string |
| 39 | + */ |
| 40 | + get labelFont(): string; |
| 41 | + set labelFont(value: string); |
| 42 | + /** Sets the font size of the barcode label. |
| 43 | + * Property type: number |
| 44 | + */ |
| 45 | + get labelFontSize(): number; |
| 46 | + set labelFontSize(value: number); |
| 47 | + /** Sets the bottom margin of the barcode label. |
| 48 | + * Property type: number |
| 49 | + */ |
| 50 | + get labelMarginBottom(): number; |
| 51 | + set labelMarginBottom(value: number); |
| 52 | + /** Sets the top margin of the barcode label. |
| 53 | + * Property type: number |
| 54 | + */ |
| 55 | + get labelMarginTop(): number; |
| 56 | + set labelMarginTop(value: number); |
| 57 | + /** Sets the position of the barcode label. |
| 58 | + * Property type: BarCodeLabelPosition |
| 59 | + */ |
| 60 | + get labelPosition(): BarCodeLabelPosition; |
| 61 | + set labelPosition(value: BarCodeLabelPosition); |
| 62 | + /** Sets the color of the barcode lines. |
| 63 | + * Property type: string |
| 64 | + */ |
| 65 | + get lineColor(): string; |
| 66 | + set lineColor(value: string); |
| 67 | + /** Sets the height of the barcode line. |
| 68 | + * Property type: number |
| 69 | + */ |
| 70 | + get lineHeight(): number; |
| 71 | + set lineHeight(value: number); |
| 72 | + /** Sets the width of the barcode line. |
| 73 | + * Property type: number |
| 74 | + */ |
| 75 | + get lineWidth(): number; |
| 76 | + set lineWidth(value: number); |
| 77 | + /** Sets the rendering mode of the barcode. |
| 78 | + * Property type: BarCodeRenderAs |
| 79 | + */ |
| 80 | + get renderAs(): BarCodeRenderAs; |
| 81 | + set renderAs(value: BarCodeRenderAs); |
| 82 | + /** Sets the barcode type |
| 83 | + * Property type: BarCodeType |
| 84 | + */ |
| 85 | + get type(): BarCodeType; |
| 86 | + set type(value: BarCodeType); |
| 87 | + /** Sets or gets the value of the barcode. |
| 88 | + * Property type: string |
| 89 | + */ |
| 90 | + get value(): string; |
| 91 | + set value(value: string); |
| 92 | + get properties(): string[]; |
| 93 | + /** This event is triggered when the value of the barcode is invalid. |
| 94 | + * @param event. The custom event. Custom event was created with: event.detail( value, invalidCharacters) |
| 95 | + * value - the invalid value of the barcode. |
| 96 | + * invalidCharacters - An array indicating the invalid characters. |
| 97 | + */ |
| 98 | + onInvalid?: ((event?: Event) => void) | undefined; |
| 99 | + /** This event occurs, when the React component is created. |
| 100 | + * @param event. The custom event. */ |
| 101 | + onCreate?: ((event?: Event) => void) | undefined; |
| 102 | + /** This event occurs, when the React component is completely rendered. |
| 103 | + * @param event. The custom event. */ |
| 104 | + onReady?: ((event?: Event) => void) | undefined; |
| 105 | + get eventListeners(): string[]; |
| 106 | + /** Exports the barcode. |
| 107 | + * @param {string} format. The format of the exported file - svg, png, jpg |
| 108 | + * @param {string} fileName?. The name of the exported file |
| 109 | + */ |
| 110 | + export(format: string, fileName?: string): void; |
| 111 | + /** Gets the base64 string of the barcode |
| 112 | + * @param {string} format. The dataURL format of the string - svg, png, jpg |
| 113 | + * @returns {string} |
| 114 | + */ |
| 115 | + getDataURL(format: string): Promise<any>; |
| 116 | + /** Gets the base64 string of the barcode |
| 117 | + * @param {string} format. The dataURL format of the string - svg, png, jpg |
| 118 | + * @returns {any} |
| 119 | + */ |
| 120 | + getDataURLAsync(format: string): Promise<any>; |
| 121 | + /** Gets the validity of the barcode |
| 122 | + * @returns {boolean} |
| 123 | + */ |
| 124 | + isValid(): Promise<any>; |
| 125 | + constructor(props: any); |
| 126 | + componentDidRender(initialize: boolean): void; |
| 127 | + componentDidMount(): void; |
| 128 | + componentDidUpdate(): void; |
| 129 | + componentWillUnmount(): void; |
| 130 | + render(): React.ReactElement<{ |
| 131 | + ref: any; |
| 132 | + }, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)>; |
| 133 | +} |
| 134 | +export default BarCode; |
0 commit comments