import * as i0 from "@angular/core"; import { Signal, TemplateRef } from "@angular/core"; import { NzQRCodeI18nInterface } from "ng-zorro-antd/i18n"; /** * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE */ declare namespace qrcodegen { type bit = number; type byte = number; type int = number; export class QrCode { readonly version: int; readonly errorCorrectionLevel: QrCode.Ecc; static encodeText(text: string, ecl: QrCode.Ecc): QrCode; static encodeBinary(data: readonly byte[], ecl: QrCode.Ecc): QrCode; static encodeSegments(segs: readonly QrSegment[], ecl: QrCode.Ecc, minVersion?: int, maxVersion?: int, mask?: int, boostEcl?: boolean): QrCode; readonly size: int; readonly mask: int; private readonly modules; private readonly isFunction; constructor(version: int, errorCorrectionLevel: QrCode.Ecc, dataCodewords: readonly byte[], msk: int); getModule(x: int, y: int): boolean; getModules(): boolean[][]; private drawFunctionPatterns; private drawFormatBits; private drawVersion; private drawFinderPattern; private drawAlignmentPattern; private setFunctionModule; private addEccAndInterleave; private drawCodewords; private applyMask; private getPenaltyScore; private getAlignmentPatternPositions; private static getNumRawDataModules; private static getNumDataCodewords; private static reedSolomonComputeDivisor; private static reedSolomonComputeRemainder; private static reedSolomonMultiply; private finderPenaltyCountPatterns; private finderPenaltyTerminateAndCount; private finderPenaltyAddHistory; static readonly MIN_VERSION: int; static readonly MAX_VERSION: int; private static readonly PENALTY_N1; private static readonly PENALTY_N2; private static readonly PENALTY_N3; private static readonly PENALTY_N4; private static readonly ECC_CODEWORDS_PER_BLOCK; private static readonly NUM_ERROR_CORRECTION_BLOCKS; } export class QrSegment { readonly mode: QrSegment.Mode; readonly numChars: int; private readonly bitData; static makeBytes(data: readonly byte[]): QrSegment; static makeNumeric(digits: string): QrSegment; static makeAlphanumeric(text: string): QrSegment; static makeSegments(text: string): QrSegment[]; static makeEci(assignVal: int): QrSegment; static isNumeric(text: string): boolean; static isAlphanumeric(text: string): boolean; constructor(mode: QrSegment.Mode, numChars: int, bitData: bit[]); getData(): bit[]; static getTotalBits(segs: readonly QrSegment[], version: int): number; private static toUtf8ByteArray; private static readonly NUMERIC_REGEX; private static readonly ALPHANUMERIC_REGEX; private static readonly ALPHANUMERIC_CHARSET; } export {}; } declare namespace qrcodegen { namespace QrCode { type int = number; export class Ecc { readonly ordinal: int; readonly formatBits: int; static readonly LOW: Ecc; static readonly MEDIUM: Ecc; static readonly QUARTILE: Ecc; static readonly HIGH: Ecc; private constructor(); } export {}; } } declare namespace qrcodegen { namespace QrSegment { type int = number; export class Mode { readonly modeBits: int; private readonly numBitsCharCount; static readonly NUMERIC: Mode; static readonly ALPHANUMERIC: Mode; static readonly BYTE: Mode; static readonly KANJI: Mode; static readonly ECI: Mode; private constructor(); numCharCountBits(ver: int): int; } export {}; } } import Ecc$1 = qrcodegen.QrCode.Ecc; import QrCode$1 = qrcodegen.QrCode; type Modules = ReturnType; interface Excavation { x: number; y: number; w: number; h: number; } type ErrorCorrectionLevel = 'L' | 'M' | 'Q' | 'H'; type CrossOrigin = 'anonymous' | 'use-credentials' | '' | undefined; type ERROR_LEVEL_MAPPED_TYPE = { [index in ErrorCorrectionLevel]: Ecc$1; }; interface ImageSettings { /** * The URI of the embedded image. */ src: string; /** * The height, in pixels, of the image. */ height: number; /** * The width, in pixels, of the image. */ width: number; /** * Whether or not to "excavate" the modules around the embedded image. This * means that any modules the embedded image overlaps will use the background * color. */ excavate: boolean; /** * The horizontal offset of the embedded image, starting from the top left corner. * Will center if not specified. */ x?: number; /** * The vertical offset of the embedded image, starting from the top left corner. * Will center if not specified. */ y?: number; /** * The opacity of the embedded image in the range of 0-1. * @defaultValue 1 */ opacity?: number; /** * The cross-origin value to use when loading the image. This is used to * ensure compatibility with CORS, particularly when extracting image data * from QRCodeCanvas. * Note: `undefined` is treated differently than the seemingly equivalent * empty string. This is intended to align with HTML behavior where omitting * the attribute behaves differently than the empty string. */ crossOrigin?: CrossOrigin; } declare namespace qrcode_component_d_exports { export { NzQRCodeComponent }; } export declare class NzQRCodeComponent { private i18n; locale: Signal; protected isBrowser: boolean; readonly nzValue: import("@angular/core").InputSignal; readonly nzType: import("@angular/core").InputSignal<"canvas" | "svg">; readonly nzColor: import("@angular/core").InputSignal; readonly nzBgColor: import("@angular/core").InputSignal; readonly nzSize: import("@angular/core").InputSignal; readonly nzIcon: import("@angular/core").InputSignal; readonly nzIconSize: import("@angular/core").InputSignal; readonly nzBordered: import("@angular/core").InputSignal; readonly nzStatus: import("@angular/core").InputSignal<"active" | "expired" | "loading" | "scanned">; readonly nzLevel: import("@angular/core").InputSignal; readonly nzStatusRender: import("@angular/core").InputSignal | null>; readonly nzBoostLevel: import("@angular/core").InputSignal; readonly nzPadding: import("@angular/core").InputSignal; readonly nzRefresh: import("@angular/core").OutputEmitterRef; margin: import("@angular/core").WritableSignal; cells: import("@angular/core").WritableSignal; numCells: import("@angular/core").WritableSignal; calculatedImageSettings: import("@angular/core").WritableSignal<{ x: number; y: number; h: number; w: number; excavation: Excavation | null; opacity: number; crossOrigin: CrossOrigin; } | null>; protected imageSettings: Signal; constructor(); reloadQRCode(): void; updateQRCodeData(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } export declare class NzQRCodeModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; }