/**----------------------------------------------------------------------------------------- * Copyright © 2026 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ import * as i0 from '@angular/core'; import { OnChanges, AfterViewInit, ElementRef, Renderer2, SimpleChanges } from '@angular/core'; import { BarcodeOptions as BarcodeOptions$1, Barcode, QRCodeOptions as QRCodeOptions$1, QRCode } from '@progress/kendo-charts'; import { ImageExportOptions, SVGExportOptions, Group, geometry } from '@progress/kendo-drawing'; import { ValidatorFn } from '@angular/forms'; /** * @hidden */ declare abstract class BaseComponent implements OnChanges, AfterViewInit { protected element: ElementRef; protected renderer: Renderer2; resizeRateLimit: number; protected instance: any; protected abstract get options(): any; protected get autoResize(): boolean; protected get canRender(): boolean; constructor(element: ElementRef, renderer: Renderer2); ngAfterViewInit(): void; ngOnChanges(changes: SimpleChanges): void; /** * Detects the size of the container and redraws the component. * Resizing is automatic unless you set the `resizeRateLimit` option to `0`. */ resize(): void; /** * @hidden */ onResize(): void; /** * Exports the component as an image. The export operation is asynchronous and returns a promise. * * @param {ImageExportOptions} options - The parameters for the exported image. * @returns {Promise} - A promise that will be resolved with a PNG image encoded as a Data URI. */ exportImage(options?: ImageExportOptions): Promise; /** * Exports the component as an SVG document. The export operation is asynchronous and returns a promise. * * @param options - The parameters for the exported file. * @returns - A promise that will be resolved with an SVG document that is encoded as a Data URI. */ exportSVG(options?: SVGExportOptions): Promise; /** * Exports the component as a Drawing Group. * * @returns - The exported Group. */ exportVisual(): Group; protected abstract createInstance(element: any, options: any): any; protected refresh(): void; protected isDevMode(): boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * Lists the dash line types. */ type DashType = 'dash' | 'dashDot' | 'dot' | 'longDash' | 'longDashDot' | 'longDashDotDot' | 'solid'; /** * Represents the appearance settings for border lines. */ interface Border { /** * Sets the color of the border line. Accepts a valid CSS color string, including hex and rgb. */ color?: string; /** * Sets the dash type of the border line. */ dashType?: DashType; /** * Sets the width of the border line in pixels. */ width?: number; } /** * Represents the margin options for each side. */ interface Margin { /** * Sets the top margin in pixels. */ top?: number; /** * Sets the right margin in pixels. */ right?: number; /** * Sets the bottom margin in pixels. */ bottom?: number; /** * Sets the left margin in pixels. */ left?: number; } /** * Represents the padding options for each side. */ interface Padding { /** * Sets the top padding in pixels. */ top?: number; /** * Sets the right padding in pixels. */ right?: number; /** * Sets the bottom padding in pixels. */ bottom?: number; /** * Sets the left padding in pixels. */ left?: number; } /** * Sets the rendering mode of the component. * * The supported values are: * * `"canvas"`—Renders the component as a Canvas element. * * `"svg"`—Renders the component as an inline SVG document. */ type RenderMode = 'svg' | 'canvas'; /** * Lists the supported symbologies (encodings) for the Barcode component. */ type BarcodeType = 'EAN8' | 'EAN13' | 'UPCE' | 'UPCA' | 'Code11' | 'Code39' | 'Code39Extended' | 'Code93' | 'Code93Extended' | 'Code128' | 'Code128A' | 'Code128B' | 'Code128C' | 'GS1-128' | 'MSImod10' | 'MSImod11' | 'MSImod1010' | 'MSImod1110' | 'POSTNET'; /** * Represents the Barcode text label. */ interface BarcodeText { /** * Sets the color of the text. Accepts any valid CSS color string, including hex and rgb. * * @default "black" */ color?: string; /** * Sets the font of the text. * * @default "16px Consolas, Monaco, Sans Mono, monospace, sans-serif" */ font?: string; /** * Sets the margin of the text. A numeric value sets all margins. * * @default 0 */ margin?: Margin | number; /** * Shows or hides the Barcode text label. * * If you set this property to `false`, the Barcode does not display the value as text below the barcode lines. * * @default true */ visible?: boolean; } /** * Represents the Barcode options. */ interface BarcodeOptions { /** * Sets the background color of the Barcode. Accepts a valid CSS color string, including hex and rgb. * * @default "white" */ background?: string; /** * Sets the border of the Barcode. */ border?: Border; /** * Shows the checksum digit next to the value in the text area. * * @default true */ checksum?: boolean; /** * Sets the color of the Barcode. Accepts a valid CSS color string, including hex and rgb. * * @default "black" */ color?: string; /** * Sets the height of the Barcode in pixels. * * @default 100 */ height?: number; /** * Sets the padding of the Barcode. A numeric value sets all paddings. * * @default 0 */ padding?: Padding | number; /** * Sets the preferred rendering mode of the Barcode. * * @default "svg" */ renderAs?: RenderMode; /** * Configures the Barcode text label. */ text?: BarcodeText; /** * Sets the symbology (encoding) the Barcode uses. * * @default "Code39" */ type: BarcodeType; /** * Sets the value of the Barcode. */ value: number | string; /** * Sets the width of the Barcode in pixels. * * @default 300 */ width?: number; } /** * Lists the QR Code encoding modes. * * The possible values are: * `"ISO_8859_1"`—Supports all characters from the [ISO/IEC 8859-1](https://en.wikipedia.org/wiki/ISO/IEC_8859-1) character set. * `"UTF_8"`—Supports all [Unicode](https://en.wikipedia.org/wiki/List_of_Unicode_characters) characters. */ type QRCodeEncoding = 'ISO_8859_1' | 'UTF_8'; /** * Lists the QR Code error correction levels. * * * `"L"`—Approximately 7% of the codewords can be restored. * * `"M"`—Approximately 15% of the codewords can be restored. * * `"Q"`—Approximately 25% of the codewords can be restored. * * `"H"`—Approximately 30% of the codewords can be restored. */ type QRCodeErrorCorrection = 'L' | 'M' | 'Q' | 'H'; /** * Provides the image overlay options for the QR Code. */ interface QRCodeOverlay { /** * Sets the overlay height in pixels. */ height?: number; /** * Sets the source image for the overlay. * * Required only when `type` is set to `'image'`. */ imageUrl?: string; /** * Sets the overlay type. * * @default 'image' */ type?: 'image' | 'swiss'; /** * Sets the overlay width in pixels. */ width?: number; } /** * Provides the QR Code options. */ interface QRCodeOptions { /** * Sets the background color of the QR Code. Accepts a valid CSS color string, including hex and rgb. * * @default "white" */ background?: string; /** * Sets the border of the QR Code. */ border?: Border; /** * Sets the color of the QR Code. Accepts a valid CSS color string, including hex and rgb. * * @default "black" */ color?: string; /** * Sets the encoding mode used to encode the value. * * > **Important** The UTF-8 encoding is not included in the specifications and is not supported by all readers. * * @default "ISO_8859_1" */ encoding?: QRCodeEncoding; /** * Sets the error correction level to use. * * @default "L" */ errorCorrection?: QRCodeErrorCorrection; /** * Sets an optional image overlay that is placed over the QR Code. * * > **Note** Always test if the code reads correctly with the applied overlay. * > Depending on the length of the value and the size of the overlay, you might need to raise the `errorCorrection` level to `"M"` or `"H"`. */ overlay?: QRCodeOverlay; /** * Sets the padding of the QR Code. A numeric value sets all paddings. * * @default 0 */ padding?: Padding | number; /** * Sets the preferred rendering mode of the QR Code. * * @default "svg" */ renderAs?: RenderMode; /** * Sets the size of a QR Code. Numeric values are treated as pixels. * * If you do not specify a size, the size is determined from the element width and height. * If the element has width or height of zero, a default value of 200 pixels is used. * * @default "200px" */ size?: number | string; /** * Sets the value of the QR Code. */ value: number | string; } /** * Represents the [Kendo UI Barcode component for Angular](https://www.telerik.com/kendo-angular-ui/components/barcodes/barcode). * * Use this component to display a barcode in your Angular application. * * @example * ```typescript * import { Component } from '@angular/core'; * * @Component({ * selector: 'my-app', * template: ` * * * ` * }) * export class AppComponent { * } * ``` */ declare class BarcodeComponent extends BaseComponent { protected element: ElementRef; protected renderer: Renderer2; /** * Sets the background color of the Barcode. Accepts any valid CSS color string, such as hex or rgb. * * @default "white" */ background?: string; /** * Configures the border of the Barcode. */ border?: Border; /** * Shows the checksum digit next to the value in the text area when set to `true`. * * @default false */ checksum?: boolean; /** * Sets the color of the Barcode. Accepts any valid CSS color string, such as hex or rgb. * * @default "black" */ color?: string; /** * Sets the height of the Barcode in pixels. * * You can also set the Barcode dimensions using CSS. */ height?: number; /** * Sets the padding of the Barcode. Use a number to set all paddings, or a `Padding` object for the individual sides. * * @default 0 */ padding?: Padding | number; /** * Sets the rendering mode of the Barcode. * * Use `"canvas"` to render as a Canvas element or `"svg"` to render as an inline SVG. * * @default "svg" */ renderAs?: RenderMode; /** * Configures the Barcode text label. */ text?: BarcodeText; /** * Sets the symbology (encoding) for the Barcode. * * @default "Code39" */ type: BarcodeType; /** * Sets the value of the Barcode. */ value: number | string; /** * Sets the width of the Barcode in pixels. * * You can also set the Barcode dimensions using CSS. */ width?: number; /** * Limits how often the Barcode resizes automatically. Sets the maximum number of redraws per second when the container size changes. * Set to `0` to disable automatic resizing. * * @default 10 */ resizeRateLimit: number; protected get options(): BarcodeOptions$1; constructor(element: ElementRef, renderer: Renderer2); protected createInstance(element: any, options: any): Barcode; protected onError(error: Error): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * Represents the [Kendo UI QR Code component for Angular](https://www.telerik.com/kendo-angular-ui/components/barcodes/qrcode). * * Shows a QR Code for the provided value. * * @example * ```ts * import { Component } from '@angular/core'; * * @Component({ * selector: 'my-app', * template: ` * * * ` * }) * export class AppComponent { * } * ``` */ declare class QRCodeComponent extends BaseComponent { protected element: ElementRef; protected renderer: Renderer2; /** * Sets the background color of the QR Code. Accepts any valid CSS color string, such as hex or rgb. * * @default "white" */ background?: string; /** * Sets the border of the QR Code. */ border?: Border; /** * Sets the color of the QR Code. Accepts any valid CSS color string, such as hex or rgb. * * @default "black" */ color?: string; /** * Sets the encoding mode for the value. * * > **Important** The UTF-8 encoding is not part of the specifications and some readers may not support it. * * @default "ISO_8859_1" */ encoding?: QRCodeEncoding; /** * Sets the error correction level. * * @default "L" */ errorCorrection?: QRCodeErrorCorrection; /** * Sets an optional image overlay to display over the QR Code. * * > **Note** Always test if the code scans correctly with the overlay. If needed, increase the `errorCorrection` level to `"M"` or `"H"`. */ overlay?: QRCodeOverlay; /** * Sets the padding for the QR Code in pixels. * * @default 0 */ padding?: number; /** * Sets the rendering mode for the QR Code. * * @default "svg" */ renderAs?: RenderMode; /** * Sets the size of the QR Code. Numeric values are in pixels. * * If no size is specified, the size will be determined from the element width and height. * If the element has width or height of zero, a default value of 200 pixels will be used. * * @default "200px" */ size?: number | string; /** * Sets the value to encode in the QR Code. */ value: number | string; /** * Limits how often the QR Code resizes automatically. Sets the maximum redraws per second when the container size changes. * Set to `0` to disable automatic resizing. * * @default 10 */ resizeRateLimit: number; protected get options(): QRCodeOptions$1; constructor(element: ElementRef, renderer: Renderer2); protected createInstance(element: any, options: any): QRCode; protected onError(error: Error): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi']) definition for the Barcode component. * * Use this module to add Barcode support to your application. * * @example * * ```ts * // Import the BarcodeModule. * import { BarcodeModule } from '@progress/kendo-angular-barcodes'; * * import { NgModule } from '@angular/core'; * import { BrowserModule } from '@angular/platform-browser'; * import { AppComponent } from './app.component'; * * @NgModule({ * declarations: [AppComponent], * imports: [BrowserModule, BarcodeModule], * bootstrap: [AppComponent] * }) * export class AppModule {} * ``` */ declare class BarcodeModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } /** * Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi']) definition for the QR Code component. * * Use this module to add QR Code support to your application. * * @example * ```ts * // Import the QRCodeModule * import { QRCodeModule } from '@progress/kendo-angular-barcodes'; * * import { NgModule } from '@angular/core'; * import { BrowserModule } from '@angular/platform-browser'; * import { AppComponent } from './app.component'; * * @NgModule({ * declarations: [AppComponent], * imports: [BrowserModule, QRCodeModule], * bootstrap: [AppComponent] * }) * export class AppModule {} * ``` */ declare class QRCodeModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } /** * Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi']) definition for the Barcode and QR Code components. * * Use this module to add Barcode and QR Code features to your application. * * @example * * ```ts * // Import the Barcodes module. * import { BarcodesModule } from '@progress/kendo-angular-barcodes'; * * import { NgModule } from '@angular/core'; * import { BrowserModule } from '@angular/platform-browser'; * import { AppComponent } from './app.component'; * * @NgModule({ * declarations: [AppComponent], * imports: [BrowserModule, BarcodesModule], * bootstrap: [AppComponent] * }) * export class AppModule {} * ``` */ declare class BarcodesModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } /** * Creates a validator for a specific Barcode type. * * Use this function to validate a Barcode value for a given `BarcodeType`. * * @param type Specifies the type of the Barcode. * @param size Specifies the size of the barcode, excluding the text label, padding, and border. This parameter is optional. * @returns Returns a validator function. The function returns an error map with the `barcode` property if validation fails. Otherwise, it returns `null` if valid. * * @example * ```typescript * const control = new FormControl('1234', createBarcodeValidator('EAN8')); * console.log(control.errors); * // { * // barcode: { * // message: 'The value of the "EAN13" encoding should be 12 symbols', * // value: '1234', * // type: 'EAN13' * // } * // } * ``` */ declare const createBarcodeValidator: (type: BarcodeType, size?: geometry.Size) => ValidatorFn; /** * Creates a value validator for a specific QR Code encoding. * * @param {QRCodeEncoding} encoding Sets the QR Code encoding. Defaults to `ISO_8859_1`. * @returns {ValidatorFn} Returns a validator function. The function returns an error map with the `qrcode` property if the value is invalid. Otherwise, it returns `null`. * * @example * ```ts-no-run * const control = new FormControl('Фоо', createQRCodeValidator()); * console.log(control.errors); * * // { * // qrcode: { * // message: 'Unsupported character in QR Code: "Ф".', * // value: '1234', * // type: 'EAN13' * // } * // } * ``` */ declare const createQRCodeValidator: (encoding?: QRCodeEncoding) => ValidatorFn; /** * Use this utility array to access all Barcode related components and directives in a standalone Angular component. */ declare const KENDO_BARCODE: readonly [typeof BarcodeComponent]; /** * Use this utility array to access all QRCode related components and directives in a standalone Angular component. */ declare const KENDO_QRCODE: readonly [typeof QRCodeComponent]; /** * Use this utility array to access all `@progress/kendo-angular-barcodes` related components and directives in a standalone Angular component. */ declare const KENDO_BARCODES: readonly [typeof BarcodeComponent, typeof QRCodeComponent]; export { BarcodeComponent, BarcodeModule, BarcodesModule, KENDO_BARCODE, KENDO_BARCODES, KENDO_QRCODE, QRCodeComponent, QRCodeModule, createBarcodeValidator, createQRCodeValidator }; export type { BarcodeOptions, BarcodeText, BarcodeType, Border, DashType, Margin, Padding, QRCodeEncoding, QRCodeErrorCorrection, QRCodeOptions, QRCodeOverlay, RenderMode };