@progress/kendo-angular-barcodes 21.4.1-develop.1 → 22.0.0-develop.1
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.
- package/base.component.d.ts +1 -1
- package/fesm2022/progress-kendo-angular-barcodes.mjs +24 -24
- package/package.json +9 -17
- package/schematics/ngAdd/index.js +1 -1
- package/esm2022/barcode-validator.mjs +0 -50
- package/esm2022/barcode.component.mjs +0 -178
- package/esm2022/barcode.module.mjs +0 -46
- package/esm2022/barcodes.module.mjs +0 -47
- package/esm2022/base.component.mjs +0 -112
- package/esm2022/chart-types/barcode-types.mjs +0 -5
- package/esm2022/chart-types/field-types.mjs +0 -5
- package/esm2022/chart-types/qrcode-types.mjs +0 -5
- package/esm2022/chart-types.mjs +0 -7
- package/esm2022/directives.mjs +0 -25
- package/esm2022/index.mjs +0 -13
- package/esm2022/package-metadata.mjs +0 -16
- package/esm2022/progress-kendo-angular-barcodes.mjs +0 -8
- package/esm2022/qrcode-validator.mjs +0 -44
- package/esm2022/qrcode.component.mjs +0 -178
- package/esm2022/qrcode.module.mjs +0 -45
package/base.component.d.ts
CHANGED
|
@@ -54,5 +54,5 @@ export declare abstract class BaseComponent implements OnChanges, AfterViewInit
|
|
|
54
54
|
protected refresh(): void;
|
|
55
55
|
protected isDevMode(): boolean;
|
|
56
56
|
static ɵfac: i0.ɵɵFactoryDeclaration<BaseComponent, never>;
|
|
57
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<BaseComponent, never, never, { "resizeRateLimit": { "alias": "resizeRateLimit"; "required": false; }; }, {}, never, never,
|
|
57
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<BaseComponent, never, never, { "resizeRateLimit": { "alias": "resizeRateLimit"; "required": false; }; }, {}, never, never, true, never>;
|
|
58
58
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import * as i0 from '@angular/core';
|
|
6
|
-
import { isDevMode,
|
|
6
|
+
import { isDevMode, ViewChild, Input, Directive, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
|
7
7
|
import { Barcode, QRCode, barcodeValidator, qrcodeValidator } from '@progress/kendo-charts';
|
|
8
8
|
import { isDocumentAvailable, ResizeSensorComponent, ResizeBatchService } from '@progress/kendo-angular-common';
|
|
9
9
|
import { exportImage, exportSVG } from '@progress/kendo-drawing';
|
|
@@ -17,8 +17,8 @@ const packageMetadata = {
|
|
|
17
17
|
productName: 'Kendo UI for Angular',
|
|
18
18
|
productCode: 'KENDOUIANGULAR',
|
|
19
19
|
productCodes: ['KENDOUIANGULAR'],
|
|
20
|
-
publishDate:
|
|
21
|
-
version: '
|
|
20
|
+
publishDate: 1768396029,
|
|
21
|
+
version: '22.0.0-develop.1',
|
|
22
22
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
23
23
|
};
|
|
24
24
|
|
|
@@ -113,10 +113,10 @@ class BaseComponent {
|
|
|
113
113
|
isDevMode() {
|
|
114
114
|
return isDevMode();
|
|
115
115
|
}
|
|
116
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
117
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
116
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: BaseComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
|
|
117
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.18", type: BaseComponent, isStandalone: true, inputs: { resizeRateLimit: "resizeRateLimit" }, viewQueries: [{ propertyName: "surfaceElement", first: true, predicate: ["surface"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0 });
|
|
118
118
|
}
|
|
119
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
119
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: BaseComponent, decorators: [{
|
|
120
120
|
type: Directive
|
|
121
121
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }], propDecorators: { resizeRateLimit: [{
|
|
122
122
|
type: Input
|
|
@@ -251,12 +251,12 @@ class BarcodeComponent extends BaseComponent {
|
|
|
251
251
|
console.warn(error);
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
255
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
254
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: BarcodeComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
255
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.18", type: BarcodeComponent, isStandalone: true, selector: "kendo-barcode", inputs: { background: "background", border: "border", checksum: "checksum", color: "color", height: "height", padding: "padding", renderAs: "renderAs", text: "text", type: "type", value: "value", width: "width", resizeRateLimit: "resizeRateLimit" }, exportAs: ["kendoBarcode"], usesInheritance: true, ngImport: i0, template: `
|
|
256
256
|
<kendo-resize-sensor (resize)="onResize()" [rateLimit]="resizeRateLimit"></kendo-resize-sensor>
|
|
257
257
|
`, isInline: true, dependencies: [{ kind: "component", type: ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
258
258
|
}
|
|
259
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
259
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: BarcodeComponent, decorators: [{
|
|
260
260
|
type: Component,
|
|
261
261
|
args: [{
|
|
262
262
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
@@ -422,12 +422,12 @@ class QRCodeComponent extends BaseComponent {
|
|
|
422
422
|
console.warn(error);
|
|
423
423
|
}
|
|
424
424
|
}
|
|
425
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
426
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
425
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: QRCodeComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
426
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.18", type: QRCodeComponent, isStandalone: true, selector: "kendo-qrcode", inputs: { background: "background", border: "border", color: "color", encoding: "encoding", errorCorrection: "errorCorrection", overlay: "overlay", padding: "padding", renderAs: "renderAs", size: "size", value: "value", resizeRateLimit: "resizeRateLimit" }, exportAs: ["kendoQRCode"], usesInheritance: true, ngImport: i0, template: `
|
|
427
427
|
<kendo-resize-sensor (resize)="onResize()" [rateLimit]="resizeRateLimit"></kendo-resize-sensor>
|
|
428
428
|
`, isInline: true, dependencies: [{ kind: "component", type: ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
429
429
|
}
|
|
430
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
430
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: QRCodeComponent, decorators: [{
|
|
431
431
|
type: Component,
|
|
432
432
|
args: [{
|
|
433
433
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
@@ -508,11 +508,11 @@ const KENDO_BARCODES = [
|
|
|
508
508
|
* ```
|
|
509
509
|
*/
|
|
510
510
|
class BarcodeModule {
|
|
511
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
512
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
513
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
511
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: BarcodeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
512
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.18", ngImport: i0, type: BarcodeModule, imports: [BarcodeComponent], exports: [BarcodeComponent] });
|
|
513
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: BarcodeModule, providers: [ResizeBatchService], imports: [KENDO_BARCODE] });
|
|
514
514
|
}
|
|
515
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
515
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: BarcodeModule, decorators: [{
|
|
516
516
|
type: NgModule,
|
|
517
517
|
args: [{
|
|
518
518
|
imports: [...KENDO_BARCODE],
|
|
@@ -545,11 +545,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
545
545
|
* ```
|
|
546
546
|
*/
|
|
547
547
|
class QRCodeModule {
|
|
548
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
549
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
550
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
548
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: QRCodeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
549
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.18", ngImport: i0, type: QRCodeModule, imports: [QRCodeComponent], exports: [QRCodeComponent] });
|
|
550
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: QRCodeModule, providers: [ResizeBatchService], imports: [KENDO_QRCODE] });
|
|
551
551
|
}
|
|
552
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
552
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: QRCodeModule, decorators: [{
|
|
553
553
|
type: NgModule,
|
|
554
554
|
args: [{
|
|
555
555
|
imports: [...KENDO_QRCODE],
|
|
@@ -583,11 +583,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
583
583
|
* ```
|
|
584
584
|
*/
|
|
585
585
|
class BarcodesModule {
|
|
586
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
587
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
588
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
586
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: BarcodesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
587
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.18", ngImport: i0, type: BarcodesModule, imports: [BarcodeComponent, QRCodeComponent], exports: [BarcodeComponent, QRCodeComponent] });
|
|
588
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: BarcodesModule, providers: [ResizeBatchService], imports: [KENDO_BARCODES] });
|
|
589
589
|
}
|
|
590
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
590
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: BarcodesModule, decorators: [{
|
|
591
591
|
type: NgModule,
|
|
592
592
|
args: [{
|
|
593
593
|
imports: [...KENDO_BARCODES],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-angular-barcodes",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "22.0.0-develop.1",
|
|
4
4
|
"description": "Kendo UI Angular Barcodes",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "Progress",
|
|
@@ -15,28 +15,22 @@
|
|
|
15
15
|
"QR Code"
|
|
16
16
|
],
|
|
17
17
|
"@progress": {
|
|
18
|
-
"friendlyName": "Barcodes"
|
|
19
|
-
"package": {
|
|
20
|
-
"productName": "Kendo UI for Angular",
|
|
21
|
-
"productCode": "KENDOUIANGULAR",
|
|
22
|
-
"publishDate": 1768386616,
|
|
23
|
-
"licensingDocsUrl": "https://www.telerik.com/kendo-angular-ui/my-license/"
|
|
24
|
-
}
|
|
18
|
+
"friendlyName": "Barcodes"
|
|
25
19
|
},
|
|
26
20
|
"peerDependencies": {
|
|
27
|
-
"@angular/animations": "
|
|
28
|
-
"@angular/common": "
|
|
29
|
-
"@angular/core": "
|
|
30
|
-
"@angular/forms": "
|
|
31
|
-
"@angular/platform-browser": "
|
|
32
|
-
"@progress/kendo-angular-common": "
|
|
21
|
+
"@angular/animations": "19 - 21",
|
|
22
|
+
"@angular/common": "19 - 21",
|
|
23
|
+
"@angular/core": "19 - 21",
|
|
24
|
+
"@angular/forms": "19 - 21",
|
|
25
|
+
"@angular/platform-browser": "19 - 21",
|
|
26
|
+
"@progress/kendo-angular-common": "22.0.0-develop.1",
|
|
33
27
|
"@progress/kendo-drawing": "^1.23.1",
|
|
34
28
|
"@progress/kendo-licensing": "^1.7.0",
|
|
35
29
|
"rxjs": "^6.5.3 || ^7.0.0"
|
|
36
30
|
},
|
|
37
31
|
"dependencies": {
|
|
38
32
|
"tslib": "^2.3.1",
|
|
39
|
-
"@progress/kendo-angular-schematics": "
|
|
33
|
+
"@progress/kendo-angular-schematics": "22.0.0-develop.1",
|
|
40
34
|
"@progress/kendo-charts": "2.9.0"
|
|
41
35
|
},
|
|
42
36
|
"schematics": "./schematics/collection.json",
|
|
@@ -48,8 +42,6 @@
|
|
|
48
42
|
},
|
|
49
43
|
".": {
|
|
50
44
|
"types": "./index.d.ts",
|
|
51
|
-
"esm2022": "./esm2022/progress-kendo-angular-barcodes.mjs",
|
|
52
|
-
"esm": "./esm2022/progress-kendo-angular-barcodes.mjs",
|
|
53
45
|
"default": "./fesm2022/progress-kendo-angular-barcodes.mjs"
|
|
54
46
|
}
|
|
55
47
|
},
|
|
@@ -14,7 +14,7 @@ function default_1(options) {
|
|
|
14
14
|
package: 'barcodes',
|
|
15
15
|
// Additional dependencies to install (required by npm 6.x)
|
|
16
16
|
peerDependencies: {
|
|
17
|
-
// '@progress/kendo-angular-foo': '
|
|
17
|
+
// '@progress/kendo-angular-foo': '22.0.0-develop.1'
|
|
18
18
|
} });
|
|
19
19
|
return (0, schematics_1.externalSchematic)('@progress/kendo-angular-schematics', 'ng-add', finalOptions);
|
|
20
20
|
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { barcodeValidator } from '@progress/kendo-charts';
|
|
6
|
-
/**
|
|
7
|
-
* @hidden
|
|
8
|
-
*/
|
|
9
|
-
const isPresent = (value) => value !== null && value !== undefined;
|
|
10
|
-
/**
|
|
11
|
-
* Creates a validator for a specific Barcode type.
|
|
12
|
-
*
|
|
13
|
-
* Use this function to validate a Barcode value for a given `BarcodeType`.
|
|
14
|
-
*
|
|
15
|
-
* @param type Specifies the type of the Barcode.
|
|
16
|
-
* @param size Specifies the size of the barcode, excluding the text label, padding, and border. This parameter is optional.
|
|
17
|
-
* @returns Returns a validator function. The function returns an error map with the `barcode` property if validation fails. Otherwise, it returns `null` if valid.
|
|
18
|
-
*
|
|
19
|
-
* @example
|
|
20
|
-
* ```typescript
|
|
21
|
-
* const control = new FormControl('1234', createBarcodeValidator('EAN8'));
|
|
22
|
-
* console.log(control.errors);
|
|
23
|
-
* // {
|
|
24
|
-
* // barcode: {
|
|
25
|
-
* // message: 'The value of the "EAN13" encoding should be 12 symbols',
|
|
26
|
-
* // value: '1234',
|
|
27
|
-
* // type: 'EAN13'
|
|
28
|
-
* // }
|
|
29
|
-
* // }
|
|
30
|
-
* ```
|
|
31
|
-
*/
|
|
32
|
-
export const createBarcodeValidator = (type, size) => {
|
|
33
|
-
const validator = barcodeValidator(type, size);
|
|
34
|
-
return (control) => {
|
|
35
|
-
if (!isPresent(control.value) || control.value === '') {
|
|
36
|
-
return null;
|
|
37
|
-
}
|
|
38
|
-
const result = validator(control.value);
|
|
39
|
-
if (result.valid === true) {
|
|
40
|
-
return null;
|
|
41
|
-
}
|
|
42
|
-
return {
|
|
43
|
-
barcode: {
|
|
44
|
-
message: result.error.message,
|
|
45
|
-
value: control.value,
|
|
46
|
-
type: type
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
|
-
};
|
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { ChangeDetectionStrategy, Component, ElementRef, Input, NgZone, Renderer2 } from '@angular/core';
|
|
6
|
-
import { Barcode } from '@progress/kendo-charts';
|
|
7
|
-
import { BaseComponent } from './base.component';
|
|
8
|
-
import { packageMetadata } from './package-metadata';
|
|
9
|
-
import { ResizeSensorComponent } from '@progress/kendo-angular-common';
|
|
10
|
-
import * as i0 from "@angular/core";
|
|
11
|
-
/**
|
|
12
|
-
* Represents the [Kendo UI Barcode component for Angular](slug:overview_barcode_barcodes).
|
|
13
|
-
*
|
|
14
|
-
* Use this component to display a barcode in your Angular application.
|
|
15
|
-
*
|
|
16
|
-
* @example
|
|
17
|
-
* ```typescript
|
|
18
|
-
* import { Component } from '@angular/core';
|
|
19
|
-
*
|
|
20
|
-
* @Component({
|
|
21
|
-
* selector: 'my-app',
|
|
22
|
-
* template: `
|
|
23
|
-
* <kendo-barcode type="EAN8" value="1234567">
|
|
24
|
-
* </kendo-barcode>
|
|
25
|
-
* `
|
|
26
|
-
* })
|
|
27
|
-
* export class AppComponent {
|
|
28
|
-
* }
|
|
29
|
-
* ```
|
|
30
|
-
*/
|
|
31
|
-
export class BarcodeComponent extends BaseComponent {
|
|
32
|
-
element;
|
|
33
|
-
renderer;
|
|
34
|
-
ngZone;
|
|
35
|
-
/**
|
|
36
|
-
* Sets the background color of the Barcode. Accepts any valid CSS color string, such as hex or rgb.
|
|
37
|
-
*
|
|
38
|
-
* @default "white"
|
|
39
|
-
*/
|
|
40
|
-
background;
|
|
41
|
-
/**
|
|
42
|
-
* Configures the border of the Barcode.
|
|
43
|
-
*/
|
|
44
|
-
border;
|
|
45
|
-
/**
|
|
46
|
-
* Shows the checksum digit next to the value in the text area when set to `true`.
|
|
47
|
-
*
|
|
48
|
-
* @default false
|
|
49
|
-
*/
|
|
50
|
-
checksum;
|
|
51
|
-
/**
|
|
52
|
-
* Sets the color of the Barcode. Accepts any valid CSS color string, such as hex or rgb.
|
|
53
|
-
*
|
|
54
|
-
* @default "black"
|
|
55
|
-
*/
|
|
56
|
-
color;
|
|
57
|
-
/**
|
|
58
|
-
* Sets the height of the Barcode in pixels.
|
|
59
|
-
*
|
|
60
|
-
* You can also set the Barcode dimensions using CSS.
|
|
61
|
-
*/
|
|
62
|
-
height;
|
|
63
|
-
/**
|
|
64
|
-
* Sets the padding of the Barcode. Use a number to set all paddings, or a `Padding` object for the individual sides.
|
|
65
|
-
*
|
|
66
|
-
* @default 0
|
|
67
|
-
*/
|
|
68
|
-
padding;
|
|
69
|
-
/**
|
|
70
|
-
* Sets the rendering mode of the Barcode.
|
|
71
|
-
*
|
|
72
|
-
* Use `"canvas"` to render as a Canvas element or `"svg"` to render as an inline SVG.
|
|
73
|
-
*
|
|
74
|
-
* @default "svg"
|
|
75
|
-
*/
|
|
76
|
-
renderAs;
|
|
77
|
-
/**
|
|
78
|
-
* Configures the Barcode text label.
|
|
79
|
-
*/
|
|
80
|
-
text;
|
|
81
|
-
/**
|
|
82
|
-
* Sets the symbology (encoding) for the Barcode.
|
|
83
|
-
*
|
|
84
|
-
* @default "Code39"
|
|
85
|
-
*/
|
|
86
|
-
type;
|
|
87
|
-
/**
|
|
88
|
-
* Sets the value of the Barcode.
|
|
89
|
-
*/
|
|
90
|
-
value;
|
|
91
|
-
/**
|
|
92
|
-
* Sets the width of the Barcode in pixels.
|
|
93
|
-
*
|
|
94
|
-
* You can also set the Barcode dimensions using CSS.
|
|
95
|
-
*/
|
|
96
|
-
width;
|
|
97
|
-
/**
|
|
98
|
-
* Limits how often the Barcode resizes automatically. Sets the maximum number of redraws per second when the container size changes.
|
|
99
|
-
* Set to `0` to disable automatic resizing.
|
|
100
|
-
*
|
|
101
|
-
* @default 10
|
|
102
|
-
*/
|
|
103
|
-
resizeRateLimit = 10;
|
|
104
|
-
get options() {
|
|
105
|
-
return {
|
|
106
|
-
renderAs: this.renderAs,
|
|
107
|
-
background: this.background,
|
|
108
|
-
border: this.border,
|
|
109
|
-
checksum: this.checksum,
|
|
110
|
-
color: this.color,
|
|
111
|
-
height: this.height,
|
|
112
|
-
padding: this.padding,
|
|
113
|
-
text: this.text,
|
|
114
|
-
type: this.type,
|
|
115
|
-
value: this.value,
|
|
116
|
-
width: this.width
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
constructor(element, renderer, ngZone) {
|
|
120
|
-
super(element, renderer, ngZone);
|
|
121
|
-
this.element = element;
|
|
122
|
-
this.renderer = renderer;
|
|
123
|
-
this.ngZone = ngZone;
|
|
124
|
-
}
|
|
125
|
-
createInstance(element, options) {
|
|
126
|
-
return new Barcode(element, options, this.onError.bind(this));
|
|
127
|
-
}
|
|
128
|
-
onError(error) {
|
|
129
|
-
error.name = packageMetadata.productName + ' Barcode';
|
|
130
|
-
if (this.isDevMode()) {
|
|
131
|
-
throw error;
|
|
132
|
-
}
|
|
133
|
-
else {
|
|
134
|
-
console.warn(error);
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: BarcodeComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
138
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: BarcodeComponent, isStandalone: true, selector: "kendo-barcode", inputs: { background: "background", border: "border", checksum: "checksum", color: "color", height: "height", padding: "padding", renderAs: "renderAs", text: "text", type: "type", value: "value", width: "width", resizeRateLimit: "resizeRateLimit" }, exportAs: ["kendoBarcode"], usesInheritance: true, ngImport: i0, template: `
|
|
139
|
-
<kendo-resize-sensor (resize)="onResize()" [rateLimit]="resizeRateLimit"></kendo-resize-sensor>
|
|
140
|
-
`, isInline: true, dependencies: [{ kind: "component", type: ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
141
|
-
}
|
|
142
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: BarcodeComponent, decorators: [{
|
|
143
|
-
type: Component,
|
|
144
|
-
args: [{
|
|
145
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
146
|
-
exportAs: 'kendoBarcode',
|
|
147
|
-
selector: 'kendo-barcode',
|
|
148
|
-
template: `
|
|
149
|
-
<kendo-resize-sensor (resize)="onResize()" [rateLimit]="resizeRateLimit"></kendo-resize-sensor>
|
|
150
|
-
`,
|
|
151
|
-
standalone: true,
|
|
152
|
-
imports: [ResizeSensorComponent]
|
|
153
|
-
}]
|
|
154
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }], propDecorators: { background: [{
|
|
155
|
-
type: Input
|
|
156
|
-
}], border: [{
|
|
157
|
-
type: Input
|
|
158
|
-
}], checksum: [{
|
|
159
|
-
type: Input
|
|
160
|
-
}], color: [{
|
|
161
|
-
type: Input
|
|
162
|
-
}], height: [{
|
|
163
|
-
type: Input
|
|
164
|
-
}], padding: [{
|
|
165
|
-
type: Input
|
|
166
|
-
}], renderAs: [{
|
|
167
|
-
type: Input
|
|
168
|
-
}], text: [{
|
|
169
|
-
type: Input
|
|
170
|
-
}], type: [{
|
|
171
|
-
type: Input
|
|
172
|
-
}], value: [{
|
|
173
|
-
type: Input
|
|
174
|
-
}], width: [{
|
|
175
|
-
type: Input
|
|
176
|
-
}], resizeRateLimit: [{
|
|
177
|
-
type: Input
|
|
178
|
-
}] } });
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { NgModule } from '@angular/core';
|
|
6
|
-
import { KENDO_BARCODE } from './directives';
|
|
7
|
-
import { ResizeBatchService } from '@progress/kendo-angular-common';
|
|
8
|
-
import * as i0 from "@angular/core";
|
|
9
|
-
import * as i1 from "./barcode.component";
|
|
10
|
-
//IMPORTANT: NgModule export kept for backwards compatibility
|
|
11
|
-
/**
|
|
12
|
-
* Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi']) definition for the Barcode component.
|
|
13
|
-
*
|
|
14
|
-
* Use this module to add Barcode support to your application.
|
|
15
|
-
*
|
|
16
|
-
* @example
|
|
17
|
-
*
|
|
18
|
-
* ```ts
|
|
19
|
-
* // Import the BarcodeModule.
|
|
20
|
-
* import { BarcodeModule } from '@progress/kendo-angular-barcodes';
|
|
21
|
-
*
|
|
22
|
-
* import { NgModule } from '@angular/core';
|
|
23
|
-
* import { BrowserModule } from '@angular/platform-browser';
|
|
24
|
-
* import { AppComponent } from './app.component';
|
|
25
|
-
*
|
|
26
|
-
* @NgModule({
|
|
27
|
-
* declarations: [AppComponent],
|
|
28
|
-
* imports: [BrowserModule, BarcodeModule],
|
|
29
|
-
* bootstrap: [AppComponent]
|
|
30
|
-
* })
|
|
31
|
-
* export class AppModule {}
|
|
32
|
-
* ```
|
|
33
|
-
*/
|
|
34
|
-
export class BarcodeModule {
|
|
35
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: BarcodeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
36
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.14", ngImport: i0, type: BarcodeModule, imports: [i1.BarcodeComponent], exports: [i1.BarcodeComponent] });
|
|
37
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: BarcodeModule, providers: [ResizeBatchService], imports: [KENDO_BARCODE] });
|
|
38
|
-
}
|
|
39
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: BarcodeModule, decorators: [{
|
|
40
|
-
type: NgModule,
|
|
41
|
-
args: [{
|
|
42
|
-
imports: [...KENDO_BARCODE],
|
|
43
|
-
exports: [...KENDO_BARCODE],
|
|
44
|
-
providers: [ResizeBatchService]
|
|
45
|
-
}]
|
|
46
|
-
}] });
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { NgModule } from '@angular/core';
|
|
6
|
-
import { KENDO_BARCODES } from './directives';
|
|
7
|
-
import { ResizeBatchService } from '@progress/kendo-angular-common';
|
|
8
|
-
import * as i0 from "@angular/core";
|
|
9
|
-
import * as i1 from "./barcode.component";
|
|
10
|
-
import * as i2 from "./qrcode.component";
|
|
11
|
-
//IMPORTANT: NgModule export kept for backwards compatibility
|
|
12
|
-
/**
|
|
13
|
-
* Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi']) definition for the Barcode and QR Code components.
|
|
14
|
-
*
|
|
15
|
-
* Use this module to add Barcode and QR Code features to your application.
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
*
|
|
19
|
-
* ```ts
|
|
20
|
-
* // Import the Barcodes module.
|
|
21
|
-
* import { BarcodesModule } from '@progress/kendo-angular-barcodes';
|
|
22
|
-
*
|
|
23
|
-
* import { NgModule } from '@angular/core';
|
|
24
|
-
* import { BrowserModule } from '@angular/platform-browser';
|
|
25
|
-
* import { AppComponent } from './app.component';
|
|
26
|
-
*
|
|
27
|
-
* @NgModule({
|
|
28
|
-
* declarations: [AppComponent],
|
|
29
|
-
* imports: [BrowserModule, BarcodesModule],
|
|
30
|
-
* bootstrap: [AppComponent]
|
|
31
|
-
* })
|
|
32
|
-
* export class AppModule {}
|
|
33
|
-
* ```
|
|
34
|
-
*/
|
|
35
|
-
export class BarcodesModule {
|
|
36
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: BarcodesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
37
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.14", ngImport: i0, type: BarcodesModule, imports: [i1.BarcodeComponent, i2.QRCodeComponent], exports: [i1.BarcodeComponent, i2.QRCodeComponent] });
|
|
38
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: BarcodesModule, providers: [ResizeBatchService], imports: [KENDO_BARCODES] });
|
|
39
|
-
}
|
|
40
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: BarcodesModule, decorators: [{
|
|
41
|
-
type: NgModule,
|
|
42
|
-
args: [{
|
|
43
|
-
imports: [...KENDO_BARCODES],
|
|
44
|
-
exports: [...KENDO_BARCODES],
|
|
45
|
-
providers: [ResizeBatchService]
|
|
46
|
-
}]
|
|
47
|
-
}] });
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Directive, ElementRef, Input, isDevMode, NgZone, Renderer2, ViewChild } from '@angular/core';
|
|
6
|
-
import { isDocumentAvailable } from '@progress/kendo-angular-common';
|
|
7
|
-
import { exportImage, exportSVG } from '@progress/kendo-drawing';
|
|
8
|
-
import { validatePackage } from '@progress/kendo-licensing';
|
|
9
|
-
import { packageMetadata } from './package-metadata';
|
|
10
|
-
import * as i0 from "@angular/core";
|
|
11
|
-
/**
|
|
12
|
-
* @hidden
|
|
13
|
-
*/
|
|
14
|
-
export class BaseComponent {
|
|
15
|
-
element;
|
|
16
|
-
renderer;
|
|
17
|
-
ngZone;
|
|
18
|
-
resizeRateLimit = 10;
|
|
19
|
-
surfaceElement;
|
|
20
|
-
instance;
|
|
21
|
-
get autoResize() {
|
|
22
|
-
return this.resizeRateLimit > 0;
|
|
23
|
-
}
|
|
24
|
-
get canRender() {
|
|
25
|
-
return isDocumentAvailable() && Boolean(this.element);
|
|
26
|
-
}
|
|
27
|
-
constructor(element, renderer, ngZone) {
|
|
28
|
-
this.element = element;
|
|
29
|
-
this.renderer = renderer;
|
|
30
|
-
this.ngZone = ngZone;
|
|
31
|
-
validatePackage(packageMetadata);
|
|
32
|
-
}
|
|
33
|
-
ngAfterViewInit() {
|
|
34
|
-
this.refresh();
|
|
35
|
-
}
|
|
36
|
-
ngOnChanges(changes) {
|
|
37
|
-
// Need to create a new instance if the rendering mode changes.
|
|
38
|
-
if (changes['renderAs'] && this.instance) {
|
|
39
|
-
this.instance.destroy();
|
|
40
|
-
this.instance = null;
|
|
41
|
-
}
|
|
42
|
-
this.refresh();
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Detects the size of the container and redraws the component.
|
|
46
|
-
* Resizing is automatic unless you set the `resizeRateLimit` option to `0`.
|
|
47
|
-
*/
|
|
48
|
-
resize() {
|
|
49
|
-
if (this.instance) {
|
|
50
|
-
this.instance.redraw();
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* @hidden
|
|
55
|
-
*/
|
|
56
|
-
onResize() {
|
|
57
|
-
if (this.autoResize) {
|
|
58
|
-
this.resize();
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Exports the component as an image. The export operation is asynchronous and returns a promise.
|
|
63
|
-
*
|
|
64
|
-
* @param {ImageExportOptions} options - The parameters for the exported image.
|
|
65
|
-
* @returns {Promise<string>} - A promise that will be resolved with a PNG image encoded as a Data URI.
|
|
66
|
-
*/
|
|
67
|
-
exportImage(options = {}) {
|
|
68
|
-
return exportImage(this.exportVisual(), options);
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Exports the component as an SVG document. The export operation is asynchronous and returns a promise.
|
|
72
|
-
*
|
|
73
|
-
* @param options - The parameters for the exported file.
|
|
74
|
-
* @returns - A promise that will be resolved with an SVG document that is encoded as a Data URI.
|
|
75
|
-
*/
|
|
76
|
-
exportSVG(options = {}) {
|
|
77
|
-
return exportSVG(this.exportVisual(), options);
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* Exports the component as a Drawing Group.
|
|
81
|
-
*
|
|
82
|
-
* @returns - The exported Group.
|
|
83
|
-
*/
|
|
84
|
-
exportVisual() {
|
|
85
|
-
return this.instance.exportVisual();
|
|
86
|
-
}
|
|
87
|
-
refresh() {
|
|
88
|
-
if (!this.canRender) {
|
|
89
|
-
return;
|
|
90
|
-
}
|
|
91
|
-
if (!this.instance) {
|
|
92
|
-
const element = this.element.nativeElement;
|
|
93
|
-
this.instance = this.createInstance(element, this.options);
|
|
94
|
-
}
|
|
95
|
-
else {
|
|
96
|
-
this.instance.setOptions(this.options);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
isDevMode() {
|
|
100
|
-
return isDevMode();
|
|
101
|
-
}
|
|
102
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: BaseComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
|
|
103
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: BaseComponent, inputs: { resizeRateLimit: "resizeRateLimit" }, viewQueries: [{ propertyName: "surfaceElement", first: true, predicate: ["surface"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0 });
|
|
104
|
-
}
|
|
105
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: BaseComponent, decorators: [{
|
|
106
|
-
type: Directive
|
|
107
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }], propDecorators: { resizeRateLimit: [{
|
|
108
|
-
type: Input
|
|
109
|
-
}], surfaceElement: [{
|
|
110
|
-
type: ViewChild,
|
|
111
|
-
args: ['surface', { static: true }]
|
|
112
|
-
}] } });
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
export {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
export {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
export {};
|
package/esm2022/chart-types.mjs
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
export * from './chart-types/barcode-types';
|
|
6
|
-
export * from './chart-types/qrcode-types';
|
|
7
|
-
export * from './chart-types/field-types';
|
package/esm2022/directives.mjs
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { BarcodeComponent } from "./barcode.component";
|
|
6
|
-
import { QRCodeComponent } from "./qrcode.component";
|
|
7
|
-
/**
|
|
8
|
-
* Use this utility array to access all Barcode related components and directives in a standalone Angular component.
|
|
9
|
-
*/
|
|
10
|
-
export const KENDO_BARCODE = [
|
|
11
|
-
BarcodeComponent
|
|
12
|
-
];
|
|
13
|
-
/**
|
|
14
|
-
* Use this utility array to access all QRCode related components and directives in a standalone Angular component.
|
|
15
|
-
*/
|
|
16
|
-
export const KENDO_QRCODE = [
|
|
17
|
-
QRCodeComponent
|
|
18
|
-
];
|
|
19
|
-
/**
|
|
20
|
-
* Use this utility array to access all `@progress/kendo-angular-barcodes` related components and directives in a standalone Angular component.
|
|
21
|
-
*/
|
|
22
|
-
export const KENDO_BARCODES = [
|
|
23
|
-
...KENDO_BARCODE,
|
|
24
|
-
...KENDO_QRCODE
|
|
25
|
-
];
|
package/esm2022/index.mjs
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
export { BarcodeComponent } from './barcode.component';
|
|
6
|
-
export { QRCodeComponent } from './qrcode.component';
|
|
7
|
-
export { BarcodeModule } from './barcode.module';
|
|
8
|
-
export { QRCodeModule } from './qrcode.module';
|
|
9
|
-
export { BarcodesModule } from './barcodes.module';
|
|
10
|
-
export { createBarcodeValidator } from './barcode-validator';
|
|
11
|
-
export { createQRCodeValidator } from './qrcode-validator';
|
|
12
|
-
export * from './chart-types';
|
|
13
|
-
export * from './directives';
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
/**
|
|
6
|
-
* @hidden
|
|
7
|
-
*/
|
|
8
|
-
export const packageMetadata = {
|
|
9
|
-
name: '@progress/kendo-angular-barcodes',
|
|
10
|
-
productName: 'Kendo UI for Angular',
|
|
11
|
-
productCode: 'KENDOUIANGULAR',
|
|
12
|
-
productCodes: ['KENDOUIANGULAR'],
|
|
13
|
-
publishDate: 1768386616,
|
|
14
|
-
version: '21.4.1-develop.1',
|
|
15
|
-
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
16
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
/**
|
|
6
|
-
* Generated bundle index. Do not edit.
|
|
7
|
-
*/
|
|
8
|
-
export * from './index';
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { qrcodeValidator } from '@progress/kendo-charts';
|
|
6
|
-
/**
|
|
7
|
-
* Creates a value validator for a specific QR Code encoding.
|
|
8
|
-
*
|
|
9
|
-
* @param {QRCodeEncoding} encoding Sets the QR Code encoding. Defaults to `ISO_8859_1`.
|
|
10
|
-
* @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`.
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* ```ts-no-run
|
|
14
|
-
* const control = new FormControl('Фоо', createQRCodeValidator());
|
|
15
|
-
* console.log(control.errors);
|
|
16
|
-
*
|
|
17
|
-
* // {
|
|
18
|
-
* // qrcode: {
|
|
19
|
-
* // message: 'Unsupported character in QR Code: "Ф".',
|
|
20
|
-
* // value: '1234',
|
|
21
|
-
* // type: 'EAN13'
|
|
22
|
-
* // }
|
|
23
|
-
* // }
|
|
24
|
-
* ```
|
|
25
|
-
*/
|
|
26
|
-
export const createQRCodeValidator = (encoding = 'ISO_8859_1') => {
|
|
27
|
-
const validator = qrcodeValidator(encoding);
|
|
28
|
-
return (control) => {
|
|
29
|
-
if (!control.value) {
|
|
30
|
-
return null;
|
|
31
|
-
}
|
|
32
|
-
const result = validator(control.value);
|
|
33
|
-
if (result.valid === true) {
|
|
34
|
-
return null;
|
|
35
|
-
}
|
|
36
|
-
return {
|
|
37
|
-
qrcode: {
|
|
38
|
-
message: result.error.message,
|
|
39
|
-
value: control.value,
|
|
40
|
-
encoding: encoding
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
|
-
};
|
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { ChangeDetectionStrategy, Component, ElementRef, Input, NgZone, Renderer2 } from '@angular/core';
|
|
6
|
-
import { QRCode } from '@progress/kendo-charts';
|
|
7
|
-
import { BaseComponent } from './base.component';
|
|
8
|
-
import { packageMetadata } from './package-metadata';
|
|
9
|
-
import { ResizeSensorComponent } from '@progress/kendo-angular-common';
|
|
10
|
-
import * as i0 from "@angular/core";
|
|
11
|
-
const DEFAULT_COLOR = '#000';
|
|
12
|
-
const DEFAULT_BACKGROUND = '#fff';
|
|
13
|
-
const DEFAULT_ERROR_CORRECTION = 'L';
|
|
14
|
-
/**
|
|
15
|
-
* Represents the [Kendo UI QR Code component for Angular](slug:overview_qrcode_barcodes).
|
|
16
|
-
*
|
|
17
|
-
* Shows a QR Code for the provided value.
|
|
18
|
-
*
|
|
19
|
-
* @example
|
|
20
|
-
* ```ts
|
|
21
|
-
* import { Component } from '@angular/core';
|
|
22
|
-
*
|
|
23
|
-
* @Component({
|
|
24
|
-
* selector: 'my-app',
|
|
25
|
-
* template: `
|
|
26
|
-
* <kendo-qrcode value="https://www.telerik.com/kendo-angular-ui">
|
|
27
|
-
* </kendo-qrcode>
|
|
28
|
-
* `
|
|
29
|
-
* })
|
|
30
|
-
* export class AppComponent {
|
|
31
|
-
* }
|
|
32
|
-
* ```
|
|
33
|
-
*/
|
|
34
|
-
export class QRCodeComponent extends BaseComponent {
|
|
35
|
-
element;
|
|
36
|
-
renderer;
|
|
37
|
-
ngZone;
|
|
38
|
-
/**
|
|
39
|
-
* Sets the background color of the QR Code. Accepts any valid CSS color string, such as hex or rgb.
|
|
40
|
-
*
|
|
41
|
-
* @default "white"
|
|
42
|
-
*/
|
|
43
|
-
background;
|
|
44
|
-
/**
|
|
45
|
-
* Sets the border of the QR Code.
|
|
46
|
-
*/
|
|
47
|
-
border;
|
|
48
|
-
/**
|
|
49
|
-
* Sets the color of the QR Code. Accepts any valid CSS color string, such as hex or rgb.
|
|
50
|
-
*
|
|
51
|
-
* @default "black"
|
|
52
|
-
*/
|
|
53
|
-
color;
|
|
54
|
-
/**
|
|
55
|
-
* Sets the encoding mode for the value.
|
|
56
|
-
*
|
|
57
|
-
* > **Important** The UTF-8 encoding is not part of the specifications and some readers may not support it.
|
|
58
|
-
*
|
|
59
|
-
* @default "ISO_8859_1"
|
|
60
|
-
*/
|
|
61
|
-
encoding;
|
|
62
|
-
/**
|
|
63
|
-
* Sets the error correction level.
|
|
64
|
-
*
|
|
65
|
-
* @default "L"
|
|
66
|
-
*/
|
|
67
|
-
errorCorrection;
|
|
68
|
-
/**
|
|
69
|
-
* Sets an optional image overlay to display over the QR Code.
|
|
70
|
-
*
|
|
71
|
-
* > **Note** Always test if the code scans correctly with the overlay. If needed, increase the `errorCorrection` level to `"M"` or `"H"`.
|
|
72
|
-
*/
|
|
73
|
-
overlay;
|
|
74
|
-
/**
|
|
75
|
-
* Sets the padding for the QR Code in pixels.
|
|
76
|
-
*
|
|
77
|
-
* @default 0
|
|
78
|
-
*/
|
|
79
|
-
padding;
|
|
80
|
-
/**
|
|
81
|
-
* Sets the rendering mode for the QR Code.
|
|
82
|
-
*
|
|
83
|
-
* @default "svg"
|
|
84
|
-
* ```
|
|
85
|
-
*/
|
|
86
|
-
renderAs;
|
|
87
|
-
/**
|
|
88
|
-
* Sets the size of the QR Code. Numeric values are in pixels.
|
|
89
|
-
*
|
|
90
|
-
* If no size is specified, the size will be determined from the element width and height.
|
|
91
|
-
* If the element has width or height of zero, a default value of 200 pixels will be used.
|
|
92
|
-
*
|
|
93
|
-
* @default "200px"
|
|
94
|
-
*/
|
|
95
|
-
size;
|
|
96
|
-
/**
|
|
97
|
-
* Sets the value to encode in the QR Code.
|
|
98
|
-
*/
|
|
99
|
-
value;
|
|
100
|
-
/**
|
|
101
|
-
* Limits how often the QR Code resizes automatically. Sets the maximum redraws per second when the container size changes.
|
|
102
|
-
* Set to `0` to disable automatic resizing.
|
|
103
|
-
*
|
|
104
|
-
* @default 10
|
|
105
|
-
*/
|
|
106
|
-
resizeRateLimit = 10;
|
|
107
|
-
get options() {
|
|
108
|
-
return {
|
|
109
|
-
background: this.background || DEFAULT_BACKGROUND,
|
|
110
|
-
border: this.border,
|
|
111
|
-
color: this.color || DEFAULT_COLOR,
|
|
112
|
-
encoding: this.encoding,
|
|
113
|
-
errorCorrection: this.errorCorrection || DEFAULT_ERROR_CORRECTION,
|
|
114
|
-
overlay: this.overlay || {},
|
|
115
|
-
padding: this.padding,
|
|
116
|
-
renderAs: this.renderAs,
|
|
117
|
-
size: this.size,
|
|
118
|
-
value: this.value
|
|
119
|
-
};
|
|
120
|
-
}
|
|
121
|
-
constructor(element, renderer, ngZone) {
|
|
122
|
-
super(element, renderer, ngZone);
|
|
123
|
-
this.element = element;
|
|
124
|
-
this.renderer = renderer;
|
|
125
|
-
this.ngZone = ngZone;
|
|
126
|
-
}
|
|
127
|
-
createInstance(element, options) {
|
|
128
|
-
return new QRCode(element, options, this.onError.bind(this));
|
|
129
|
-
}
|
|
130
|
-
onError(error) {
|
|
131
|
-
error.name = packageMetadata.productName + ' QRCode';
|
|
132
|
-
if (this.isDevMode()) {
|
|
133
|
-
throw error;
|
|
134
|
-
}
|
|
135
|
-
else {
|
|
136
|
-
console.warn(error);
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: QRCodeComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
140
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: QRCodeComponent, isStandalone: true, selector: "kendo-qrcode", inputs: { background: "background", border: "border", color: "color", encoding: "encoding", errorCorrection: "errorCorrection", overlay: "overlay", padding: "padding", renderAs: "renderAs", size: "size", value: "value", resizeRateLimit: "resizeRateLimit" }, exportAs: ["kendoQRCode"], usesInheritance: true, ngImport: i0, template: `
|
|
141
|
-
<kendo-resize-sensor (resize)="onResize()" [rateLimit]="resizeRateLimit"></kendo-resize-sensor>
|
|
142
|
-
`, isInline: true, dependencies: [{ kind: "component", type: ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
143
|
-
}
|
|
144
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: QRCodeComponent, decorators: [{
|
|
145
|
-
type: Component,
|
|
146
|
-
args: [{
|
|
147
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
148
|
-
selector: 'kendo-qrcode',
|
|
149
|
-
exportAs: 'kendoQRCode',
|
|
150
|
-
template: `
|
|
151
|
-
<kendo-resize-sensor (resize)="onResize()" [rateLimit]="resizeRateLimit"></kendo-resize-sensor>
|
|
152
|
-
`,
|
|
153
|
-
standalone: true,
|
|
154
|
-
imports: [ResizeSensorComponent]
|
|
155
|
-
}]
|
|
156
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }], propDecorators: { background: [{
|
|
157
|
-
type: Input
|
|
158
|
-
}], border: [{
|
|
159
|
-
type: Input
|
|
160
|
-
}], color: [{
|
|
161
|
-
type: Input
|
|
162
|
-
}], encoding: [{
|
|
163
|
-
type: Input
|
|
164
|
-
}], errorCorrection: [{
|
|
165
|
-
type: Input
|
|
166
|
-
}], overlay: [{
|
|
167
|
-
type: Input
|
|
168
|
-
}], padding: [{
|
|
169
|
-
type: Input
|
|
170
|
-
}], renderAs: [{
|
|
171
|
-
type: Input
|
|
172
|
-
}], size: [{
|
|
173
|
-
type: Input
|
|
174
|
-
}], value: [{
|
|
175
|
-
type: Input
|
|
176
|
-
}], resizeRateLimit: [{
|
|
177
|
-
type: Input
|
|
178
|
-
}] } });
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { NgModule } from '@angular/core';
|
|
6
|
-
import { KENDO_QRCODE } from './directives';
|
|
7
|
-
import { ResizeBatchService } from '@progress/kendo-angular-common';
|
|
8
|
-
import * as i0 from "@angular/core";
|
|
9
|
-
import * as i1 from "./qrcode.component";
|
|
10
|
-
//IMPORTANT: NgModule export kept for backwards compatibility
|
|
11
|
-
/**
|
|
12
|
-
* Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi']) definition for the QR Code component.
|
|
13
|
-
*
|
|
14
|
-
* Use this module to add QR Code support to your application.
|
|
15
|
-
*
|
|
16
|
-
* @example
|
|
17
|
-
* ```ts
|
|
18
|
-
* // Import the QRCodeModule
|
|
19
|
-
* import { QRCodeModule } from '@progress/kendo-angular-barcodes';
|
|
20
|
-
*
|
|
21
|
-
* import { NgModule } from '@angular/core';
|
|
22
|
-
* import { BrowserModule } from '@angular/platform-browser';
|
|
23
|
-
* import { AppComponent } from './app.component';
|
|
24
|
-
*
|
|
25
|
-
* @NgModule({
|
|
26
|
-
* declarations: [AppComponent],
|
|
27
|
-
* imports: [BrowserModule, QRCodeModule],
|
|
28
|
-
* bootstrap: [AppComponent]
|
|
29
|
-
* })
|
|
30
|
-
* export class AppModule {}
|
|
31
|
-
* ```
|
|
32
|
-
*/
|
|
33
|
-
export class QRCodeModule {
|
|
34
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: QRCodeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
35
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.14", ngImport: i0, type: QRCodeModule, imports: [i1.QRCodeComponent], exports: [i1.QRCodeComponent] });
|
|
36
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: QRCodeModule, providers: [ResizeBatchService], imports: [KENDO_QRCODE] });
|
|
37
|
-
}
|
|
38
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: QRCodeModule, decorators: [{
|
|
39
|
-
type: NgModule,
|
|
40
|
-
args: [{
|
|
41
|
-
imports: [...KENDO_QRCODE],
|
|
42
|
-
exports: [...KENDO_QRCODE],
|
|
43
|
-
providers: [ResizeBatchService]
|
|
44
|
-
}]
|
|
45
|
-
}] });
|