UNPKG

ngx-simple-qrcode

Version:
130 lines (124 loc) 5.22 kB
import * as i0 from '@angular/core'; import { Component, Input, ViewChild, NgModule } from '@angular/core'; import kjua from 'kjua'; class NgxSimpleQrcodeComponent { constructor() { this.render = "image"; this.crisp = true; this.minVersion = 1; this.ecLevel = 'L'; this.size = 200; this.fill = '#333'; this.back = '#fff'; this.text = ''; this.rounded = 0; this.quiet = 0; this.mode = 'plain'; this.mSize = 30; this.mPosX = 50; this.mPosY = 50; this.label = ''; this.fontname = 'sans'; this.fontcolor = '#262626'; this.image = null; } ngOnInit() { } ngAfterViewInit() { const el = kjua({ render: this.render, crisp: this.crisp, minVersion: this.minVersion, ecLevel: this.ecLevel, size: this.size, fill: this.fill, back: this.back, text: this.text, rounded: this.rounded, quiet: this.quiet, mode: this.mode, mSize: this.mSize, mPosX: this.mPosX, mPosY: this.mPosY, label: this.label, fontname: this.fontname, fontcolor: this.fontcolor, image: this.image, }); this.qrcodeNode.nativeElement.appendChild(el); } } NgxSimpleQrcodeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: NgxSimpleQrcodeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); NgxSimpleQrcodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.0", type: NgxSimpleQrcodeComponent, selector: "ngx-simple-qrcode", inputs: { render: "render", crisp: "crisp", minVersion: "minVersion", ecLevel: "ecLevel", size: "size", fill: "fill", back: "back", text: "text", rounded: "rounded", quiet: "quiet", mode: "mode", mSize: "mSize", mPosX: "mPosX", mPosY: "mPosY", label: "label", fontname: "fontname", fontcolor: "fontcolor", image: "image" }, viewQueries: [{ propertyName: "qrcodeNode", first: true, predicate: ["qrcode"], descendants: true }], ngImport: i0, template: ` <div class="ngx-simple-qrcode" #qrcode></div> `, isInline: true, styles: [":host{display:inline-flex}.ngx-simple-qrcode{display:inline-block}.ngx-simple-qrcode img{display:block}\n"] }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: NgxSimpleQrcodeComponent, decorators: [{ type: Component, args: [{ selector: 'ngx-simple-qrcode', template: ` <div class="ngx-simple-qrcode" #qrcode></div> `, styles: [":host{display:inline-flex}.ngx-simple-qrcode{display:inline-block}.ngx-simple-qrcode img{display:block}\n"] }] }], propDecorators: { render: [{ type: Input }], crisp: [{ type: Input }], minVersion: [{ type: Input }], ecLevel: [{ type: Input }], size: [{ type: Input }], fill: [{ type: Input }], back: [{ type: Input }], text: [{ type: Input }], rounded: [{ type: Input }], quiet: [{ type: Input }], mode: [{ type: Input }], mSize: [{ type: Input }], mPosX: [{ type: Input }], mPosY: [{ type: Input }], label: [{ type: Input }], fontname: [{ type: Input }], fontcolor: [{ type: Input }], image: [{ type: Input }], qrcodeNode: [{ type: ViewChild, args: ["qrcode"] }] } }); class NgxSimpleQrcodeModule { } NgxSimpleQrcodeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: NgxSimpleQrcodeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); NgxSimpleQrcodeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: NgxSimpleQrcodeModule, declarations: [NgxSimpleQrcodeComponent], exports: [NgxSimpleQrcodeComponent] }); NgxSimpleQrcodeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: NgxSimpleQrcodeModule, imports: [[]] }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: NgxSimpleQrcodeModule, decorators: [{ type: NgModule, args: [{ declarations: [ NgxSimpleQrcodeComponent ], imports: [], exports: [ NgxSimpleQrcodeComponent ] }] }] }); /* * Public API Surface of ngx-simple-qrcode */ /** * Generated bundle index. Do not edit. */ export { NgxSimpleQrcodeComponent, NgxSimpleQrcodeModule }; //# sourceMappingURL=ngx-simple-qrcode.mjs.map