UNPKG

smart-webcomponents-angular

Version:

[![Price](https://img.shields.io/badge/price-COMMERCIAL-0098f7.svg)](https://jqwidgets.com/license/)

104 lines (103 loc) 5.64 kB
import { Barcode } from './../index'; import { BarcodeLabelPosition, BarcodeRenderAs, BarcodeType } from './../index'; import { AfterViewInit, ElementRef, OnInit, OnChanges, OnDestroy, SimpleChanges, EventEmitter } from '@angular/core'; import { BaseElement } from './smart.element'; import * as i0 from "@angular/core"; export { BarcodeLabelPosition, BarcodeRenderAs, BarcodeType, ElementRenderMode } from './../index'; export { Smart } from './smart.element'; export { Barcode } from './../index'; export declare class BarcodeComponent extends BaseElement implements OnInit, AfterViewInit, OnDestroy, OnChanges { constructor(ref: ElementRef<Barcode>); private eventHandlers; nativeElement: Barcode; /** @description Creates the component on demand. * @param properties An optional object of properties, which will be added to the template binded ones. */ createComponent(properties?: {}): any; /** @description Sets the background color of the barcode element. */ get backgroundColor(): string; set backgroundColor(value: string); /** @description Sets whether the barcode label is visible. */ get displayLabel(): boolean; set displayLabel(value: boolean); /** @description Sets the color of the barcode label. */ get labelColor(): string; set labelColor(value: string); /** @description Sets the font family of the barcode label. */ get labelFont(): string; set labelFont(value: string); /** @description Sets the font size of the barcode label. */ get labelFontSize(): number; set labelFontSize(value: number); /** @description Sets the bottom margin of the barcode label. */ get labelMarginBottom(): number; set labelMarginBottom(value: number); /** @description Sets the top margin of the barcode label. */ get labelMarginTop(): number; set labelMarginTop(value: number); /** @description Sets the position of the barcode label. */ get labelPosition(): BarcodeLabelPosition | string; set labelPosition(value: BarcodeLabelPosition | string); /** @description Sets the color of the barcode lines. */ get lineColor(): string; set lineColor(value: string); /** @description Sets the height of the barcode line. */ get lineHeight(): number; set lineHeight(value: number); /** @description Sets the width of the barcode line. */ get lineWidth(): number; set lineWidth(value: number); /** @description Sets the rendering mode of the barcode. */ get renderAs(): BarcodeRenderAs | string; set renderAs(value: BarcodeRenderAs | string); /** @description Sets the barcode type */ get type(): BarcodeType | string; set type(value: BarcodeType | string); /** @description Sets or gets the value of the barcode. */ get value(): string; set value(value: string); /** @description Sets or gets the width of the barcode. If the width is set to 0, the width of the barcode is calculated automatically. */ get width(): number; set width(value: number); /** @description Sets or gets the height of the barcode. If the height is set to 0, the height of the barcode is calculated automatically. */ get height(): number; set height(value: number); /** @description This event is triggered when the value of the barcode is invalid. * @param event. The custom event. Custom event was created with: event.detail( invalidCharacters, lengthValidity, patternValidity, value) * invalidCharacters - An array indicating the invalid characters. * lengthValidity - A boolean indicating the length validity. * patternValidity - A boolean indicating the pattern validity. * value - the invalid value of the barcode. */ onInvalid: EventEmitter<CustomEvent>; /** @description Exports the barcode. * @param {string} format. The format of the exported file - svg, png, jpg * @param {string} fileName?. The name of the exported file */ export(format: string, fileName?: string): void; /** @description Gets the base64 string of the barcode * @param {string} format. The dataURL format of the string - svg, png, jpg * @returns {string} */ getDataURL(format: any): Promise<any>; /** @description Gets the base64 string of the barcode * @param {string} format. The dataURL format of the string - svg, png, jpg * @returns {any} */ getDataURLAsync(format: any): Promise<any>; /** @description Gets the validity of the barcode * @returns {boolean} */ isValid(): Promise<any>; get isRendered(): boolean; ngOnInit(): void; ngAfterViewInit(): void; ngOnDestroy(): void; ngOnChanges(changes: SimpleChanges): void; /** @description Add event listeners. */ private listen; /** @description Remove event listeners. */ private unlisten; static ɵfac: i0.ɵɵFactoryDeclaration<BarcodeComponent, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<BarcodeComponent, "smart-barcode, [smart-barcode]", ["smart-barcode"], { "backgroundColor": "backgroundColor"; "displayLabel": "displayLabel"; "labelColor": "labelColor"; "labelFont": "labelFont"; "labelFontSize": "labelFontSize"; "labelMarginBottom": "labelMarginBottom"; "labelMarginTop": "labelMarginTop"; "labelPosition": "labelPosition"; "lineColor": "lineColor"; "lineHeight": "lineHeight"; "lineWidth": "lineWidth"; "renderAs": "renderAs"; "type": "type"; "value": "value"; "width": "width"; "height": "height"; }, { "onInvalid": "onInvalid"; }, never>; }