cmat 0.0.53 → 0.0.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -16,7 +16,6 @@ declare class CmatQRCodeComponent implements OnChanges {
|
|
|
16
16
|
margin: number;
|
|
17
17
|
qrdata: string;
|
|
18
18
|
scale: number;
|
|
19
|
-
version: number;
|
|
20
19
|
width: number;
|
|
21
20
|
alt?: string;
|
|
22
21
|
ariaLabel?: string;
|
|
@@ -38,7 +37,7 @@ declare class CmatQRCodeComponent implements OnChanges {
|
|
|
38
37
|
private _renderElement;
|
|
39
38
|
private _createQRCode;
|
|
40
39
|
static ɵfac: i0.ɵɵFactoryDeclaration<CmatQRCodeComponent, never>;
|
|
41
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CmatQRCodeComponent, "cmat-qrcode", ["cmatQRCode"], { "allowEmptyString": { "alias": "allowEmptyString"; "required": false; }; "cssClass": { "alias": "cssClass"; "required": false; }; "elementType": { "alias": "elementType"; "required": false; }; "errorCorrectionLevel": { "alias": "errorCorrectionLevel"; "required": false; }; "imageSrc": { "alias": "imageSrc"; "required": false; }; "imageHeight": { "alias": "imageHeight"; "required": false; }; "imageWidth": { "alias": "imageWidth"; "required": false; }; "margin": { "alias": "margin"; "required": false; }; "qrdata": { "alias": "qrdata"; "required": false; }; "scale": { "alias": "scale"; "required": false; }; "
|
|
40
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CmatQRCodeComponent, "cmat-qrcode", ["cmatQRCode"], { "allowEmptyString": { "alias": "allowEmptyString"; "required": false; }; "cssClass": { "alias": "cssClass"; "required": false; }; "elementType": { "alias": "elementType"; "required": false; }; "errorCorrectionLevel": { "alias": "errorCorrectionLevel"; "required": false; }; "imageSrc": { "alias": "imageSrc"; "required": false; }; "imageHeight": { "alias": "imageHeight"; "required": false; }; "imageWidth": { "alias": "imageWidth"; "required": false; }; "margin": { "alias": "margin"; "required": false; }; "qrdata": { "alias": "qrdata"; "required": false; }; "scale": { "alias": "scale"; "required": false; }; "width": { "alias": "width"; "required": false; }; "alt": { "alias": "alt"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "title": { "alias": "title"; "required": false; }; }, { "qrCodeURL": "qrCodeURL"; }, never, never, true, never>;
|
|
42
41
|
}
|
|
43
42
|
|
|
44
43
|
export { CmatQRCodeComponent };
|
|
@@ -12,7 +12,6 @@ class CmatQRCodeComponent {
|
|
|
12
12
|
this.margin = 4;
|
|
13
13
|
this.qrdata = '';
|
|
14
14
|
this.scale = 4;
|
|
15
|
-
this.version = 1;
|
|
16
15
|
this.width = 10;
|
|
17
16
|
this.qrCodeURL = new EventEmitter();
|
|
18
17
|
this.context = null;
|
|
@@ -125,7 +124,6 @@ class CmatQRCodeComponent {
|
|
|
125
124
|
errorCorrectionLevel: this.errorCorrectionLevel,
|
|
126
125
|
margin: this.margin,
|
|
127
126
|
scale: this.scale,
|
|
128
|
-
version: this.version,
|
|
129
127
|
width: this.width,
|
|
130
128
|
};
|
|
131
129
|
const centerImageSrc = this.imageSrc;
|
|
@@ -227,7 +225,7 @@ class CmatQRCodeComponent {
|
|
|
227
225
|
}
|
|
228
226
|
}
|
|
229
227
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: CmatQRCodeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
230
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.7", type: CmatQRCodeComponent, isStandalone: true, selector: "cmat-qrcode", inputs: { allowEmptyString: "allowEmptyString", cssClass: "cssClass", elementType: "elementType", errorCorrectionLevel: "errorCorrectionLevel", imageSrc: "imageSrc", imageHeight: "imageHeight", imageWidth: "imageWidth", margin: "margin", qrdata: "qrdata", scale: "scale",
|
|
228
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.7", type: CmatQRCodeComponent, isStandalone: true, selector: "cmat-qrcode", inputs: { allowEmptyString: "allowEmptyString", cssClass: "cssClass", elementType: "elementType", errorCorrectionLevel: "errorCorrectionLevel", imageSrc: "imageSrc", imageHeight: "imageHeight", imageWidth: "imageWidth", margin: "margin", qrdata: "qrdata", scale: "scale", width: "width", alt: "alt", ariaLabel: "ariaLabel", title: "title" }, outputs: { qrCodeURL: "qrCodeURL" }, viewQueries: [{ propertyName: "qrcElement", first: true, predicate: ["qrcElement"], descendants: true, static: true }], exportAs: ["cmatQRCode"], usesOnChanges: true, ngImport: i0, template: '<div #qrcElement [class]="cssClass"></div>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
231
229
|
}
|
|
232
230
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: CmatQRCodeComponent, decorators: [{
|
|
233
231
|
type: Component,
|
|
@@ -258,8 +256,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.7", ngImpor
|
|
|
258
256
|
type: Input
|
|
259
257
|
}], scale: [{
|
|
260
258
|
type: Input
|
|
261
|
-
}], version: [{
|
|
262
|
-
type: Input
|
|
263
259
|
}], width: [{
|
|
264
260
|
type: Input
|
|
265
261
|
}], alt: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cmat-components-qrcode.mjs","sources":["../../../projects/cmat/components/qrcode/qrcode.component.ts","../../../projects/cmat/components/qrcode/cmat-components-qrcode.ts"],"sourcesContent":["import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n ElementRef,\r\n EventEmitter,\r\n inject,\r\n Input,\r\n OnChanges,\r\n Output,\r\n Renderer2,\r\n ViewChild,\r\n ViewEncapsulation,\r\n} from '@angular/core';\r\nimport { DomSanitizer, SafeUrl } from '@angular/platform-browser';\r\nimport {\r\n QRCodeRenderersOptions,\r\n QRCodeToDataURLOptions,\r\n QRCodeToStringOptions,\r\n toCanvas,\r\n toDataURL,\r\n toString\r\n} from 'qrcode';\r\nimport { FixMeLater, QRCodeConfigType, QRCodeElementType, QRCodeErrorCorrectionLevel } from './qrcode.types';\r\n\r\n@Component({\r\n selector: 'cmat-qrcode',\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n template: '<div #qrcElement [class]=\"cssClass\"></div>',\r\n exportAs: 'cmatQRCode',\r\n})\r\nexport class CmatQRCodeComponent implements OnChanges {\r\n @Input() public allowEmptyString: boolean = false;\r\n @Input() public cssClass: string = 'qrcode';\r\n @Input() public elementType: QRCodeElementType = 'canvas';\r\n @Input()\r\n public errorCorrectionLevel: QRCodeErrorCorrectionLevel = 'M';\r\n @Input() public imageSrc?: string;\r\n @Input() public imageHeight?: number;\r\n @Input() public imageWidth?: number;\r\n @Input() public margin = 4;\r\n @Input() public qrdata = '';\r\n @Input() public scale = 4;\r\n @Input() public version: number = 1;\r\n @Input() public width = 10;\r\n\r\n @Input() public alt?: string;\r\n @Input() public ariaLabel?: string;\r\n @Input() public title?: string;\r\n\r\n @Output() qrCodeURL = new EventEmitter<SafeUrl>();\r\n\r\n @ViewChild('qrcElement', { static: true }) public qrcElement!: ElementRef;\r\n\r\n public context: CanvasRenderingContext2D | null = null;\r\n private _centerImage?: HTMLImageElement;\r\n private _renderer = inject(Renderer2);\r\n private _sanitizer = inject(DomSanitizer);\r\n private _currentOperationId = 0;\r\n\r\n ngOnChanges(): void {\r\n this._createQRCode();\r\n }\r\n\r\n convertBase64ImageUrlToBlob(base64ImageUrl: string): Blob {\r\n // split into two parts\r\n const parts = base64ImageUrl.split(';base64,');\r\n // hold the content/mime type f.e. image/png\r\n const imageType = parts[0].split(':')[1];\r\n // decode base64 string\r\n const decodedData = atob(parts[1]);\r\n // create unit8array of size same as row data length\r\n const uInt8Array = new Uint8Array(decodedData.length);\r\n // insert all character code into uint8array\r\n for (let i = 0; i < decodedData.length; ++i) {\r\n uInt8Array[i] = decodedData.charCodeAt(i)\r\n }\r\n // return blob image after conversion\r\n return new Blob([uInt8Array], { type: imageType });\r\n }\r\n\r\n emitQRCodeURL(element: HTMLCanvasElement | HTMLImageElement | SVGSVGElement): void {\r\n const className = element.constructor.name;\r\n if (className === SVGSVGElement.name) {\r\n const svgHTML = element.outerHTML;\r\n const blob = new Blob([svgHTML], { type: 'image/svg+xml' });\r\n const urlSvg = URL.createObjectURL(blob);\r\n const urlSanitized = this._sanitizer.bypassSecurityTrustUrl(urlSvg);\r\n this.qrCodeURL.emit(urlSanitized);\r\n return;\r\n }\r\n\r\n let urlImage = '';\r\n\r\n if (className === HTMLCanvasElement.name) {\r\n urlImage = (element as HTMLCanvasElement).toDataURL('image/png');\r\n }\r\n\r\n if (className === HTMLImageElement.name) {\r\n urlImage = (element as HTMLImageElement).src;\r\n }\r\n\r\n const blobData: Blob = this.convertBase64ImageUrlToBlob(urlImage);\r\n const urlBlob = URL.createObjectURL(blobData);\r\n const urlSanitized = this._sanitizer.bypassSecurityTrustUrl(urlBlob);\r\n this.qrCodeURL.emit(urlSanitized);\r\n }\r\n private _isValidQrCodeText(data: string | null): boolean {\r\n if (this.allowEmptyString === false) {\r\n return !(\r\n typeof data === 'undefined' ||\r\n data === '' ||\r\n data === 'null' ||\r\n data === null\r\n );\r\n }\r\n return !(typeof data === 'undefined');\r\n }\r\n\r\n private _toDataURL(qrCodeConfig: QRCodeToDataURLOptions): Promise<FixMeLater> {\r\n return new Promise(\r\n (\r\n resolve: (arg: FixMeLater) => FixMeLater,\r\n reject: (arg: FixMeLater) => FixMeLater\r\n ) => {\r\n toDataURL(\r\n this.qrdata,\r\n qrCodeConfig,\r\n (err: Error | null | undefined, url: string) => {\r\n if (err) {\r\n reject(err);\r\n } else {\r\n resolve(url);\r\n }\r\n }\r\n );\r\n }\r\n );\r\n }\r\n\r\n private _toCanvas(\r\n canvas: HTMLCanvasElement,\r\n qrCodeConfig: QRCodeRenderersOptions\r\n ): Promise<FixMeLater> {\r\n return new Promise(\r\n (\r\n resolve: (arg: FixMeLater) => FixMeLater,\r\n reject: (arg: FixMeLater) => FixMeLater\r\n ) => {\r\n toCanvas(\r\n canvas,\r\n this.qrdata,\r\n qrCodeConfig,\r\n (error: Error | null | undefined) => {\r\n if (error) {\r\n reject(error);\r\n } else {\r\n resolve('success');\r\n }\r\n }\r\n )\r\n }\r\n );\r\n }\r\n\r\n private _toSVG(qrCodeConfig: QRCodeToStringOptions): Promise<FixMeLater> {\r\n return new Promise(\r\n (\r\n resolve: (arg: FixMeLater) => FixMeLater,\r\n reject: (arg: FixMeLater) => FixMeLater\r\n ) => {\r\n toString(\r\n this.qrdata,\r\n qrCodeConfig,\r\n (err: Error | null | undefined, url: string) => {\r\n if (err) {\r\n reject(err);\r\n } else {\r\n resolve(url);\r\n }\r\n }\r\n )\r\n }\r\n );\r\n }\r\n\r\n private _renderElement(element: Element): void {\r\n for (const node of this.qrcElement.nativeElement.childNodes) {\r\n this._renderer.removeChild(this.qrcElement.nativeElement, node);\r\n }\r\n\r\n this._renderer.appendChild(this.qrcElement.nativeElement, element);\r\n\r\n }\r\n\r\n private _createQRCode(): void {\r\n const operationId = ++this._currentOperationId;\r\n\r\n try {\r\n if (!this._isValidQrCodeText(this.qrdata)) {\r\n throw new Error(\r\n '`qrdata`配置为空了, 设置\\'allowEmptyString=\"true\"\\'重写这个特性.'\r\n );\r\n }\r\n\r\n if (this._isValidQrCodeText(this.qrdata) && this.qrdata === '') {\r\n this.qrdata = ' ';\r\n }\r\n\r\n const config: QRCodeConfigType = {\r\n errorCorrectionLevel: this.errorCorrectionLevel,\r\n margin: this.margin,\r\n scale: this.scale,\r\n version: this.version,\r\n width: this.width,\r\n };\r\n\r\n const centerImageSrc = this.imageSrc;\r\n const centerImageHeight = this.imageHeight ?? 40;\r\n const centerImageWidth = this.imageWidth ?? 40;\r\n\r\n switch (this.elementType) {\r\n case 'canvas': {\r\n const canvasElement: HTMLCanvasElement =\r\n this._renderer.createElement('canvas');\r\n this.context = canvasElement.getContext('2d');\r\n this._toCanvas(canvasElement, config)\r\n .then(() => {\r\n if (operationId !== this._currentOperationId) {\r\n return; // 不是最新操作,直接返回\r\n }\r\n\r\n if (this.ariaLabel) {\r\n this._renderer.setAttribute(\r\n canvasElement,\r\n 'aria-label',\r\n `${this.ariaLabel}`\r\n );\r\n }\r\n if (this.title) {\r\n this._renderer.setAttribute(\r\n canvasElement,\r\n 'title',\r\n `${this.title}`\r\n );\r\n }\r\n\r\n if (centerImageSrc && this.context) {\r\n this._centerImage = new Image(\r\n centerImageWidth,\r\n centerImageHeight\r\n );\r\n\r\n if (centerImageSrc !== this._centerImage.src) {\r\n this._centerImage.crossOrigin = 'anonymous';\r\n this._centerImage.src = centerImageSrc;\r\n }\r\n\r\n if (centerImageHeight !== this._centerImage.height) {\r\n this._centerImage.height = centerImageHeight;\r\n }\r\n\r\n if (centerImageWidth !== this._centerImage.width) {\r\n this._centerImage.width = centerImageWidth;\r\n }\r\n\r\n const centerImage = this._centerImage;\r\n\r\n if (centerImage) {\r\n centerImage.onload = (): void => {\r\n if (operationId === this._currentOperationId) {\r\n this.context?.drawImage(\r\n centerImage,\r\n canvasElement.width / 2 - centerImageWidth / 2,\r\n canvasElement.height / 2 - centerImageHeight / 2,\r\n centerImageWidth,\r\n centerImageHeight\r\n );\r\n }\r\n }\r\n }\r\n }\r\n\r\n this._renderElement(canvasElement);\r\n this.emitQRCodeURL(canvasElement);\r\n })\r\n .catch((e) => {\r\n console.error('canvas error:', e);\r\n });\r\n break;\r\n }\r\n case 'svg': {\r\n const svgParentElement: HTMLElement =\r\n this._renderer.createElement('div');\r\n this._toSVG(config)\r\n .then((svgString: string) => {\r\n if (operationId !== this._currentOperationId) {\r\n return;\r\n }\r\n\r\n this._renderer.setProperty(\r\n svgParentElement,\r\n 'innerHTML',\r\n svgString\r\n );\r\n const svgElement = svgParentElement.firstChild as SVGSVGElement;\r\n this._renderer.setAttribute(svgElement, 'height', `${this.width}`);\r\n this._renderer.setAttribute(svgElement, 'width', `${this.width}`);\r\n this._renderElement(svgElement);\r\n this.emitQRCodeURL(svgElement);\r\n })\r\n .catch((e) => {\r\n console.error('svg error:', e);\r\n })\r\n break;\r\n }\r\n case 'url':\r\n case 'img':\r\n default: {\r\n const imgElement: HTMLImageElement =\r\n this._renderer.createElement('img');\r\n this._toDataURL(config)\r\n .then((dataUrl: string) => {\r\n if (operationId !== this._currentOperationId) {\r\n return;\r\n }\r\n\r\n if (this.alt) {\r\n imgElement.setAttribute('alt', this.alt);\r\n }\r\n if (this.ariaLabel) {\r\n imgElement.setAttribute('aria-label', this.ariaLabel);\r\n }\r\n imgElement.setAttribute('src', dataUrl);\r\n if (this.title) {\r\n imgElement.setAttribute('title', this.title);\r\n }\r\n this._renderElement(imgElement);\r\n this.emitQRCodeURL(imgElement);\r\n })\r\n .catch((e) => {\r\n console.error('img/url error:', e)\r\n });\r\n }\r\n }\r\n } catch (e: FixMeLater) {\r\n console.error('生成QRCode错误:', e.message);\r\n }\r\n }\r\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MA+Ba,mBAAmB,CAAA;AAPhC,IAAA,WAAA,GAAA;QAQoB,IAAA,CAAA,gBAAgB,GAAY,KAAK;QACjC,IAAA,CAAA,QAAQ,GAAW,QAAQ;QAC3B,IAAA,CAAA,WAAW,GAAsB,QAAQ;QAElD,IAAA,CAAA,oBAAoB,GAA+B,GAAG;QAI7C,IAAA,CAAA,MAAM,GAAG,CAAC;QACV,IAAA,CAAA,MAAM,GAAG,EAAE;QACX,IAAA,CAAA,KAAK,GAAG,CAAC;QACT,IAAA,CAAA,OAAO,GAAW,CAAC;QACnB,IAAA,CAAA,KAAK,GAAG,EAAE;AAMhB,QAAA,IAAA,CAAA,SAAS,GAAG,IAAI,YAAY,EAAW;QAI1C,IAAA,CAAA,OAAO,GAAoC,IAAI;AAE9C,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;AAC7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;;2FAG7C,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAP/B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,aAAa;oBACvB,aAAa,EAAE,iBAAiB,CAAC,IAAI;oBACrC,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,QAAQ,EAAE,4CAA4C;AACtD,oBAAA,QAAQ,EAAE,YAAY;AACzB,iBAAA;;sBAEI;;sBACA;;sBACA;;sBACA;;sBAEA;;sBACA;;sBACA;;sBACA;;sBACA;;sBACA;;sBACA;;sBACA;;sBAEA;;sBACA;;sBACA;;sBAEA;;sBAEA,SAAS;AAAC,gBAAA,IAAA,EAAA,CAAA,YAAY,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;;;ACpD7C;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"cmat-components-qrcode.mjs","sources":["../../../projects/cmat/components/qrcode/qrcode.component.ts","../../../projects/cmat/components/qrcode/cmat-components-qrcode.ts"],"sourcesContent":["import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n ElementRef,\r\n EventEmitter,\r\n inject,\r\n Input,\r\n OnChanges,\r\n Output,\r\n Renderer2,\r\n ViewChild,\r\n ViewEncapsulation,\r\n} from '@angular/core';\r\nimport { DomSanitizer, SafeUrl } from '@angular/platform-browser';\r\nimport {\r\n QRCodeRenderersOptions,\r\n QRCodeToDataURLOptions,\r\n QRCodeToStringOptions,\r\n toCanvas,\r\n toDataURL,\r\n toString\r\n} from 'qrcode';\r\nimport { FixMeLater, QRCodeConfigType, QRCodeElementType, QRCodeErrorCorrectionLevel } from './qrcode.types';\r\n\r\n@Component({\r\n selector: 'cmat-qrcode',\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n template: '<div #qrcElement [class]=\"cssClass\"></div>',\r\n exportAs: 'cmatQRCode',\r\n})\r\nexport class CmatQRCodeComponent implements OnChanges {\r\n @Input() public allowEmptyString: boolean = false;\r\n @Input() public cssClass: string = 'qrcode';\r\n @Input() public elementType: QRCodeElementType = 'canvas';\r\n @Input()\r\n public errorCorrectionLevel: QRCodeErrorCorrectionLevel = 'M';\r\n @Input() public imageSrc?: string;\r\n @Input() public imageHeight?: number;\r\n @Input() public imageWidth?: number;\r\n @Input() public margin = 4;\r\n @Input() public qrdata = '';\r\n @Input() public scale = 4;\r\n @Input() public width = 10;\r\n\r\n @Input() public alt?: string;\r\n @Input() public ariaLabel?: string;\r\n @Input() public title?: string;\r\n\r\n @Output() qrCodeURL = new EventEmitter<SafeUrl>();\r\n\r\n @ViewChild('qrcElement', { static: true }) public qrcElement!: ElementRef;\r\n\r\n public context: CanvasRenderingContext2D | null = null;\r\n private _centerImage?: HTMLImageElement;\r\n private _renderer = inject(Renderer2);\r\n private _sanitizer = inject(DomSanitizer);\r\n private _currentOperationId = 0;\r\n\r\n ngOnChanges(): void {\r\n this._createQRCode();\r\n }\r\n\r\n convertBase64ImageUrlToBlob(base64ImageUrl: string): Blob {\r\n // split into two parts\r\n const parts = base64ImageUrl.split(';base64,');\r\n // hold the content/mime type f.e. image/png\r\n const imageType = parts[0].split(':')[1];\r\n // decode base64 string\r\n const decodedData = atob(parts[1]);\r\n // create unit8array of size same as row data length\r\n const uInt8Array = new Uint8Array(decodedData.length);\r\n // insert all character code into uint8array\r\n for (let i = 0; i < decodedData.length; ++i) {\r\n uInt8Array[i] = decodedData.charCodeAt(i)\r\n }\r\n // return blob image after conversion\r\n return new Blob([uInt8Array], { type: imageType });\r\n }\r\n\r\n emitQRCodeURL(element: HTMLCanvasElement | HTMLImageElement | SVGSVGElement): void {\r\n const className = element.constructor.name;\r\n if (className === SVGSVGElement.name) {\r\n const svgHTML = element.outerHTML;\r\n const blob = new Blob([svgHTML], { type: 'image/svg+xml' });\r\n const urlSvg = URL.createObjectURL(blob);\r\n const urlSanitized = this._sanitizer.bypassSecurityTrustUrl(urlSvg);\r\n this.qrCodeURL.emit(urlSanitized);\r\n return;\r\n }\r\n\r\n let urlImage = '';\r\n\r\n if (className === HTMLCanvasElement.name) {\r\n urlImage = (element as HTMLCanvasElement).toDataURL('image/png');\r\n }\r\n\r\n if (className === HTMLImageElement.name) {\r\n urlImage = (element as HTMLImageElement).src;\r\n }\r\n\r\n const blobData: Blob = this.convertBase64ImageUrlToBlob(urlImage);\r\n const urlBlob = URL.createObjectURL(blobData);\r\n const urlSanitized = this._sanitizer.bypassSecurityTrustUrl(urlBlob);\r\n this.qrCodeURL.emit(urlSanitized);\r\n }\r\n private _isValidQrCodeText(data: string | null): boolean {\r\n if (this.allowEmptyString === false) {\r\n return !(\r\n typeof data === 'undefined' ||\r\n data === '' ||\r\n data === 'null' ||\r\n data === null\r\n );\r\n }\r\n return !(typeof data === 'undefined');\r\n }\r\n\r\n private _toDataURL(qrCodeConfig: QRCodeToDataURLOptions): Promise<FixMeLater> {\r\n return new Promise(\r\n (\r\n resolve: (arg: FixMeLater) => FixMeLater,\r\n reject: (arg: FixMeLater) => FixMeLater\r\n ) => {\r\n toDataURL(\r\n this.qrdata,\r\n qrCodeConfig,\r\n (err: Error | null | undefined, url: string) => {\r\n if (err) {\r\n reject(err);\r\n } else {\r\n resolve(url);\r\n }\r\n }\r\n );\r\n }\r\n );\r\n }\r\n\r\n private _toCanvas(\r\n canvas: HTMLCanvasElement,\r\n qrCodeConfig: QRCodeRenderersOptions\r\n ): Promise<FixMeLater> {\r\n return new Promise(\r\n (\r\n resolve: (arg: FixMeLater) => FixMeLater,\r\n reject: (arg: FixMeLater) => FixMeLater\r\n ) => {\r\n toCanvas(\r\n canvas,\r\n this.qrdata,\r\n qrCodeConfig,\r\n (error: Error | null | undefined) => {\r\n if (error) {\r\n reject(error);\r\n } else {\r\n resolve('success');\r\n }\r\n }\r\n )\r\n }\r\n );\r\n }\r\n\r\n private _toSVG(qrCodeConfig: QRCodeToStringOptions): Promise<FixMeLater> {\r\n return new Promise(\r\n (\r\n resolve: (arg: FixMeLater) => FixMeLater,\r\n reject: (arg: FixMeLater) => FixMeLater\r\n ) => {\r\n toString(\r\n this.qrdata,\r\n qrCodeConfig,\r\n (err: Error | null | undefined, url: string) => {\r\n if (err) {\r\n reject(err);\r\n } else {\r\n resolve(url);\r\n }\r\n }\r\n )\r\n }\r\n );\r\n }\r\n\r\n private _renderElement(element: Element): void {\r\n for (const node of this.qrcElement.nativeElement.childNodes) {\r\n this._renderer.removeChild(this.qrcElement.nativeElement, node);\r\n }\r\n\r\n this._renderer.appendChild(this.qrcElement.nativeElement, element);\r\n\r\n }\r\n\r\n private _createQRCode(): void {\r\n const operationId = ++this._currentOperationId;\r\n\r\n try {\r\n if (!this._isValidQrCodeText(this.qrdata)) {\r\n throw new Error(\r\n '`qrdata`配置为空了, 设置\\'allowEmptyString=\"true\"\\'重写这个特性.'\r\n );\r\n }\r\n\r\n if (this._isValidQrCodeText(this.qrdata) && this.qrdata === '') {\r\n this.qrdata = ' ';\r\n }\r\n\r\n const config: QRCodeConfigType = {\r\n errorCorrectionLevel: this.errorCorrectionLevel,\r\n margin: this.margin,\r\n scale: this.scale,\r\n width: this.width,\r\n };\r\n\r\n const centerImageSrc = this.imageSrc;\r\n const centerImageHeight = this.imageHeight ?? 40;\r\n const centerImageWidth = this.imageWidth ?? 40;\r\n\r\n switch (this.elementType) {\r\n case 'canvas': {\r\n const canvasElement: HTMLCanvasElement =\r\n this._renderer.createElement('canvas');\r\n this.context = canvasElement.getContext('2d');\r\n this._toCanvas(canvasElement, config)\r\n .then(() => {\r\n if (operationId !== this._currentOperationId) {\r\n return; // 不是最新操作,直接返回\r\n }\r\n\r\n if (this.ariaLabel) {\r\n this._renderer.setAttribute(\r\n canvasElement,\r\n 'aria-label',\r\n `${this.ariaLabel}`\r\n );\r\n }\r\n if (this.title) {\r\n this._renderer.setAttribute(\r\n canvasElement,\r\n 'title',\r\n `${this.title}`\r\n );\r\n }\r\n\r\n if (centerImageSrc && this.context) {\r\n this._centerImage = new Image(\r\n centerImageWidth,\r\n centerImageHeight\r\n );\r\n\r\n if (centerImageSrc !== this._centerImage.src) {\r\n this._centerImage.crossOrigin = 'anonymous';\r\n this._centerImage.src = centerImageSrc;\r\n }\r\n\r\n if (centerImageHeight !== this._centerImage.height) {\r\n this._centerImage.height = centerImageHeight;\r\n }\r\n\r\n if (centerImageWidth !== this._centerImage.width) {\r\n this._centerImage.width = centerImageWidth;\r\n }\r\n\r\n const centerImage = this._centerImage;\r\n\r\n if (centerImage) {\r\n centerImage.onload = (): void => {\r\n if (operationId === this._currentOperationId) {\r\n this.context?.drawImage(\r\n centerImage,\r\n canvasElement.width / 2 - centerImageWidth / 2,\r\n canvasElement.height / 2 - centerImageHeight / 2,\r\n centerImageWidth,\r\n centerImageHeight\r\n );\r\n }\r\n }\r\n }\r\n }\r\n\r\n this._renderElement(canvasElement);\r\n this.emitQRCodeURL(canvasElement);\r\n })\r\n .catch((e) => {\r\n console.error('canvas error:', e);\r\n });\r\n break;\r\n }\r\n case 'svg': {\r\n const svgParentElement: HTMLElement =\r\n this._renderer.createElement('div');\r\n this._toSVG(config)\r\n .then((svgString: string) => {\r\n if (operationId !== this._currentOperationId) {\r\n return;\r\n }\r\n\r\n this._renderer.setProperty(\r\n svgParentElement,\r\n 'innerHTML',\r\n svgString\r\n );\r\n const svgElement = svgParentElement.firstChild as SVGSVGElement;\r\n this._renderer.setAttribute(svgElement, 'height', `${this.width}`);\r\n this._renderer.setAttribute(svgElement, 'width', `${this.width}`);\r\n this._renderElement(svgElement);\r\n this.emitQRCodeURL(svgElement);\r\n })\r\n .catch((e) => {\r\n console.error('svg error:', e);\r\n })\r\n break;\r\n }\r\n case 'url':\r\n case 'img':\r\n default: {\r\n const imgElement: HTMLImageElement =\r\n this._renderer.createElement('img');\r\n this._toDataURL(config)\r\n .then((dataUrl: string) => {\r\n if (operationId !== this._currentOperationId) {\r\n return;\r\n }\r\n\r\n if (this.alt) {\r\n imgElement.setAttribute('alt', this.alt);\r\n }\r\n if (this.ariaLabel) {\r\n imgElement.setAttribute('aria-label', this.ariaLabel);\r\n }\r\n imgElement.setAttribute('src', dataUrl);\r\n if (this.title) {\r\n imgElement.setAttribute('title', this.title);\r\n }\r\n this._renderElement(imgElement);\r\n this.emitQRCodeURL(imgElement);\r\n })\r\n .catch((e) => {\r\n console.error('img/url error:', e)\r\n });\r\n }\r\n }\r\n } catch (e: FixMeLater) {\r\n console.error('生成QRCode错误:', e.message);\r\n }\r\n }\r\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MA+Ba,mBAAmB,CAAA;AAPhC,IAAA,WAAA,GAAA;QAQoB,IAAA,CAAA,gBAAgB,GAAY,KAAK;QACjC,IAAA,CAAA,QAAQ,GAAW,QAAQ;QAC3B,IAAA,CAAA,WAAW,GAAsB,QAAQ;QAElD,IAAA,CAAA,oBAAoB,GAA+B,GAAG;QAI7C,IAAA,CAAA,MAAM,GAAG,CAAC;QACV,IAAA,CAAA,MAAM,GAAG,EAAE;QACX,IAAA,CAAA,KAAK,GAAG,CAAC;QACT,IAAA,CAAA,KAAK,GAAG,EAAE;AAMhB,QAAA,IAAA,CAAA,SAAS,GAAG,IAAI,YAAY,EAAW;QAI1C,IAAA,CAAA,OAAO,GAAoC,IAAI;AAE9C,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;AAC7B,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,YAAY,CAAC;QACjC,IAAA,CAAA,mBAAmB,GAAG,CAAC;AAkSlC,IAAA;IAhSG,WAAW,GAAA;QACP,IAAI,CAAC,aAAa,EAAE;IACxB;AAEA,IAAA,2BAA2B,CAAC,cAAsB,EAAA;;QAE9C,MAAM,KAAK,GAAG,cAAc,CAAC,KAAK,CAAC,UAAU,CAAC;;AAE9C,QAAA,MAAM,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;;QAExC,MAAM,WAAW,GA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AA,CAAA,YAAY,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;;;ACnD7C;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cmat",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.54",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "Yu Tao",
|
|
6
6
|
"email": "916426364@qq.com"
|
|
@@ -73,22 +73,22 @@
|
|
|
73
73
|
"types": "./components/cascade/index.d.ts",
|
|
74
74
|
"default": "./fesm2022/cmat-components-cascade.mjs"
|
|
75
75
|
},
|
|
76
|
-
"./components/chip-input": {
|
|
77
|
-
"types": "./components/chip-input/index.d.ts",
|
|
78
|
-
"default": "./fesm2022/cmat-components-chip-input.mjs"
|
|
79
|
-
},
|
|
80
76
|
"./components/custom-formly": {
|
|
81
77
|
"types": "./components/custom-formly/index.d.ts",
|
|
82
78
|
"default": "./fesm2022/cmat-components-custom-formly.mjs"
|
|
83
79
|
},
|
|
84
|
-
"./components/
|
|
85
|
-
"types": "./components/
|
|
86
|
-
"default": "./fesm2022/cmat-components-
|
|
80
|
+
"./components/chip-input": {
|
|
81
|
+
"types": "./components/chip-input/index.d.ts",
|
|
82
|
+
"default": "./fesm2022/cmat-components-chip-input.mjs"
|
|
87
83
|
},
|
|
88
84
|
"./components/drawer": {
|
|
89
85
|
"types": "./components/drawer/index.d.ts",
|
|
90
86
|
"default": "./fesm2022/cmat-components-drawer.mjs"
|
|
91
87
|
},
|
|
88
|
+
"./components/date-range": {
|
|
89
|
+
"types": "./components/date-range/index.d.ts",
|
|
90
|
+
"default": "./fesm2022/cmat-components-date-range.mjs"
|
|
91
|
+
},
|
|
92
92
|
"./components/fullscreen": {
|
|
93
93
|
"types": "./components/fullscreen/index.d.ts",
|
|
94
94
|
"default": "./fesm2022/cmat-components-fullscreen.mjs"
|
|
@@ -105,13 +105,17 @@
|
|
|
105
105
|
"types": "./components/json-editor/index.d.ts",
|
|
106
106
|
"default": "./fesm2022/cmat-components-json-editor.mjs"
|
|
107
107
|
},
|
|
108
|
+
"./components/masonry": {
|
|
109
|
+
"types": "./components/masonry/index.d.ts",
|
|
110
|
+
"default": "./fesm2022/cmat-components-masonry.mjs"
|
|
111
|
+
},
|
|
108
112
|
"./components/knob-input": {
|
|
109
113
|
"types": "./components/knob-input/index.d.ts",
|
|
110
114
|
"default": "./fesm2022/cmat-components-knob-input.mjs"
|
|
111
115
|
},
|
|
112
|
-
"./components/
|
|
113
|
-
"types": "./components/
|
|
114
|
-
"default": "./fesm2022/cmat-components-
|
|
116
|
+
"./components/material-color-picker": {
|
|
117
|
+
"types": "./components/material-color-picker/index.d.ts",
|
|
118
|
+
"default": "./fesm2022/cmat-components-material-color-picker.mjs"
|
|
115
119
|
},
|
|
116
120
|
"./components/navigation": {
|
|
117
121
|
"types": "./components/navigation/index.d.ts",
|
|
@@ -121,10 +125,6 @@
|
|
|
121
125
|
"types": "./components/material-datetimepicker/index.d.ts",
|
|
122
126
|
"default": "./fesm2022/cmat-components-material-datetimepicker.mjs"
|
|
123
127
|
},
|
|
124
|
-
"./components/material-color-picker": {
|
|
125
|
-
"types": "./components/material-color-picker/index.d.ts",
|
|
126
|
-
"default": "./fesm2022/cmat-components-material-color-picker.mjs"
|
|
127
|
-
},
|
|
128
128
|
"./components/opt-input": {
|
|
129
129
|
"types": "./components/opt-input/index.d.ts",
|
|
130
130
|
"default": "./fesm2022/cmat-components-opt-input.mjs"
|
|
@@ -149,14 +149,14 @@
|
|
|
149
149
|
"types": "./components/progress-bar/index.d.ts",
|
|
150
150
|
"default": "./fesm2022/cmat-components-progress-bar.mjs"
|
|
151
151
|
},
|
|
152
|
-
"./components/qrcode": {
|
|
153
|
-
"types": "./components/qrcode/index.d.ts",
|
|
154
|
-
"default": "./fesm2022/cmat-components-qrcode.mjs"
|
|
155
|
-
},
|
|
156
152
|
"./components/rating": {
|
|
157
153
|
"types": "./components/rating/index.d.ts",
|
|
158
154
|
"default": "./fesm2022/cmat-components-rating.mjs"
|
|
159
155
|
},
|
|
156
|
+
"./components/qrcode": {
|
|
157
|
+
"types": "./components/qrcode/index.d.ts",
|
|
158
|
+
"default": "./fesm2022/cmat-components-qrcode.mjs"
|
|
159
|
+
},
|
|
160
160
|
"./components/select-search": {
|
|
161
161
|
"types": "./components/select-search/index.d.ts",
|
|
162
162
|
"default": "./fesm2022/cmat-components-select-search.mjs"
|
|
@@ -193,10 +193,6 @@
|
|
|
193
193
|
"types": "./components/upload/index.d.ts",
|
|
194
194
|
"default": "./fesm2022/cmat-components-upload.mjs"
|
|
195
195
|
},
|
|
196
|
-
"./directives/animate-on-scroll": {
|
|
197
|
-
"types": "./directives/animate-on-scroll/index.d.ts",
|
|
198
|
-
"default": "./fesm2022/cmat-directives-animate-on-scroll.mjs"
|
|
199
|
-
},
|
|
200
196
|
"./components/x6-angular-shape": {
|
|
201
197
|
"types": "./components/x6-angular-shape/index.d.ts",
|
|
202
198
|
"default": "./fesm2022/cmat-components-x6-angular-shape.mjs"
|
|
@@ -205,6 +201,10 @@
|
|
|
205
201
|
"types": "./directives/arrow-cursor/index.d.ts",
|
|
206
202
|
"default": "./fesm2022/cmat-directives-arrow-cursor.mjs"
|
|
207
203
|
},
|
|
204
|
+
"./directives/animate-on-scroll": {
|
|
205
|
+
"types": "./directives/animate-on-scroll/index.d.ts",
|
|
206
|
+
"default": "./fesm2022/cmat-directives-animate-on-scroll.mjs"
|
|
207
|
+
},
|
|
208
208
|
"./directives/autofocus": {
|
|
209
209
|
"types": "./directives/autofocus/index.d.ts",
|
|
210
210
|
"default": "./fesm2022/cmat-directives-autofocus.mjs"
|
|
@@ -221,10 +221,6 @@
|
|
|
221
221
|
"types": "./directives/digit-only/index.d.ts",
|
|
222
222
|
"default": "./fesm2022/cmat-directives-digit-only.mjs"
|
|
223
223
|
},
|
|
224
|
-
"./lib/mock-api": {
|
|
225
|
-
"types": "./lib/mock-api/index.d.ts",
|
|
226
|
-
"default": "./fesm2022/cmat-lib-mock-api.mjs"
|
|
227
|
-
},
|
|
228
224
|
"./directives/equal-validator": {
|
|
229
225
|
"types": "./directives/equal-validator/index.d.ts",
|
|
230
226
|
"default": "./fesm2022/cmat-directives-equal-validator.mjs"
|
|
@@ -233,25 +229,33 @@
|
|
|
233
229
|
"types": "./pipes/bytes/index.d.ts",
|
|
234
230
|
"default": "./fesm2022/cmat-pipes-bytes.mjs"
|
|
235
231
|
},
|
|
236
|
-
"./
|
|
237
|
-
"types": "./
|
|
238
|
-
"default": "./fesm2022/cmat-
|
|
232
|
+
"./lib/mock-api": {
|
|
233
|
+
"types": "./lib/mock-api/index.d.ts",
|
|
234
|
+
"default": "./fesm2022/cmat-lib-mock-api.mjs"
|
|
239
235
|
},
|
|
240
236
|
"./pipes/find-by-key": {
|
|
241
237
|
"types": "./pipes/find-by-key/index.d.ts",
|
|
242
238
|
"default": "./fesm2022/cmat-pipes-find-by-key.mjs"
|
|
243
239
|
},
|
|
240
|
+
"./pipes/date-format": {
|
|
241
|
+
"types": "./pipes/date-format/index.d.ts",
|
|
242
|
+
"default": "./fesm2022/cmat-pipes-date-format.mjs"
|
|
243
|
+
},
|
|
244
244
|
"./pipes/group-by": {
|
|
245
245
|
"types": "./pipes/group-by/index.d.ts",
|
|
246
246
|
"default": "./fesm2022/cmat-pipes-group-by.mjs"
|
|
247
247
|
},
|
|
248
|
+
"./pipes/keys": {
|
|
249
|
+
"types": "./pipes/keys/index.d.ts",
|
|
250
|
+
"default": "./fesm2022/cmat-pipes-keys.mjs"
|
|
251
|
+
},
|
|
248
252
|
"./services/alert": {
|
|
249
253
|
"types": "./services/alert/index.d.ts",
|
|
250
254
|
"default": "./fesm2022/cmat-services-alert.mjs"
|
|
251
255
|
},
|
|
252
|
-
"./pipes/
|
|
253
|
-
"types": "./pipes/
|
|
254
|
-
"default": "./fesm2022/cmat-pipes-
|
|
256
|
+
"./pipes/secure": {
|
|
257
|
+
"types": "./pipes/secure/index.d.ts",
|
|
258
|
+
"default": "./fesm2022/cmat-pipes-secure.mjs"
|
|
255
259
|
},
|
|
256
260
|
"./pipes/uppercase": {
|
|
257
261
|
"types": "./pipes/uppercase/index.d.ts",
|
|
@@ -261,10 +265,6 @@
|
|
|
261
265
|
"types": "./services/config/index.d.ts",
|
|
262
266
|
"default": "./fesm2022/cmat-services-config.mjs"
|
|
263
267
|
},
|
|
264
|
-
"./pipes/secure": {
|
|
265
|
-
"types": "./pipes/secure/index.d.ts",
|
|
266
|
-
"default": "./fesm2022/cmat-pipes-secure.mjs"
|
|
267
|
-
},
|
|
268
268
|
"./services/confirmation": {
|
|
269
269
|
"types": "./services/confirmation/index.d.ts",
|
|
270
270
|
"default": "./fesm2022/cmat-services-confirmation.mjs"
|
|
@@ -289,10 +289,6 @@
|
|
|
289
289
|
"types": "./services/media-watcher/index.d.ts",
|
|
290
290
|
"default": "./fesm2022/cmat-services-media-watcher.mjs"
|
|
291
291
|
},
|
|
292
|
-
"./services/platform": {
|
|
293
|
-
"types": "./services/platform/index.d.ts",
|
|
294
|
-
"default": "./fesm2022/cmat-services-platform.mjs"
|
|
295
|
-
},
|
|
296
292
|
"./services/splash-screen": {
|
|
297
293
|
"types": "./services/splash-screen/index.d.ts",
|
|
298
294
|
"default": "./fesm2022/cmat-services-splash-screen.mjs"
|
|
@@ -305,6 +301,10 @@
|
|
|
305
301
|
"types": "./services/translation/index.d.ts",
|
|
306
302
|
"default": "./fesm2022/cmat-services-translation.mjs"
|
|
307
303
|
},
|
|
304
|
+
"./services/platform": {
|
|
305
|
+
"types": "./services/platform/index.d.ts",
|
|
306
|
+
"default": "./fesm2022/cmat-services-platform.mjs"
|
|
307
|
+
},
|
|
308
308
|
"./services/utils": {
|
|
309
309
|
"types": "./services/utils/index.d.ts",
|
|
310
310
|
"default": "./fesm2022/cmat-services-utils.mjs"
|