UNPKG

ngx-qrcode-styling

Version:

This library is built for the purpose for generating QR codes with a logo and styling.

145 lines (144 loc) 4.23 kB
import { ElementRef, OnInit } from '@angular/core'; import { AsyncSubject } from 'rxjs'; import { CornerDotType, CornerSquareType, DotType, DrawType, ErrorCorrectionLevel, FrameStyle, Gradient, Mode, Options, ShapeType, TemplateType, TypeNumber, UnknownObject } from './ngx-qrcode-styling.options'; import { NgxQrcodeStylingService } from './ngx-qrcode-styling.service'; import * as i0 from "@angular/core"; export declare class NgxQrcodeStylingComponent implements OnInit { private canvas; private service; /** * Options */ config: Options; /** * TemplateType */ template: TemplateType; /** * DrawType */ type: DrawType; /** * ShapeType */ shape: ShapeType; /** * number */ width: number; /** * number */ height: number; /** * number */ margin: number; /** * string */ data: string; /** * string */ image: string; /** * number */ scale: number; /** * number */ rotate: number; /** * number */ zIndex: 1 | 2; /** * object */ frameOptions: { style?: FrameStyle; height?: number; width?: number; x?: number; y?: number; background?: string; texts?: UnknownObject[]; contents?: UnknownObject[]; containers?: UnknownObject[]; }; /** * object */ qrOptions: { typeNumber?: TypeNumber; mode?: Mode; errorCorrectionLevel?: ErrorCorrectionLevel; }; /** * object */ imageOptions: { hideBackgroundDots?: boolean; imageSize?: number; crossOrigin?: string; margin?: number; }; /** * object */ dotsOptions: { type?: DotType; color?: string; gradient?: Gradient; }; /** * object */ cornersSquareOptions: { type?: CornerSquareType; color?: string; gradient?: Gradient; }; /** * object */ cornersDotOptions: { type?: CornerDotType; color?: string; gradient?: Gradient; }; /** * object */ backgroundOptions: { round?: number; color?: string; gradient?: Gradient; }; constructor(canvas: ElementRef, service: NgxQrcodeStylingService); ngOnInit(): void; /** * create * @param config * @returns */ create(config: Options): AsyncSubject<any>; /** * update * @param config * @param configUpdate * @returns */ update(config: Options, configUpdate: Options): AsyncSubject<any>; /** * download image * @param fileName eg: demo.png * @param timeout * @returns */ download(fileName?: string, timeout?: number): AsyncSubject<any>; static ɵfac: i0.ɵɵFactoryDeclaration<NgxQrcodeStylingComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<NgxQrcodeStylingComponent, "ngx-qrcode-styling", never, { "config": { "alias": "config"; "required": false; }; "template": { "alias": "template"; "required": false; }; "type": { "alias": "type"; "required": false; }; "shape": { "alias": "shape"; "required": false; }; "width": { "alias": "width"; "required": false; }; "height": { "alias": "height"; "required": false; }; "margin": { "alias": "margin"; "required": false; }; "data": { "alias": "data"; "required": false; }; "image": { "alias": "image"; "required": false; }; "scale": { "alias": "scale"; "required": false; }; "rotate": { "alias": "rotate"; "required": false; }; "zIndex": { "alias": "zIndex"; "required": false; }; "frameOptions": { "alias": "frameOptions"; "required": false; }; "qrOptions": { "alias": "qrOptions"; "required": false; }; "imageOptions": { "alias": "imageOptions"; "required": false; }; "dotsOptions": { "alias": "dotsOptions"; "required": false; }; "cornersSquareOptions": { "alias": "cornersSquareOptions"; "required": false; }; "cornersDotOptions": { "alias": "cornersDotOptions"; "required": false; }; "backgroundOptions": { "alias": "backgroundOptions"; "required": false; }; }, {}, never, ["*"], true, never>; }