@progress/kendo-angular-barcodes 1.0.0 → 2.0.0-dev.202204131407

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.
Files changed (70) hide show
  1. package/{dist/es2015/barcode-validator.d.ts → barcode-validator.d.ts} +0 -0
  2. package/{dist/es2015/barcode.component.d.ts → barcode.component.d.ts} +4 -1
  3. package/{dist/es2015/barcode.module.d.ts → barcode.module.d.ts} +6 -0
  4. package/{dist/es2015/barcodes.module.d.ts → barcodes.module.d.ts} +6 -0
  5. package/{dist/es2015/base.component.d.ts → base.component.d.ts} +6 -3
  6. package/bundles/kendo-angular-barcodes.umd.js +5 -0
  7. package/{dist/es2015/chart-types → chart-types}/barcode-types.d.ts +0 -0
  8. package/{dist/es2015/chart-types → chart-types}/field-types.d.ts +0 -0
  9. package/{dist/es2015/chart-types → chart-types}/qrcode-types.d.ts +0 -0
  10. package/{dist/es2015/chart-types.d.ts → chart-types.d.ts} +0 -0
  11. package/{dist/es2015 → esm2015}/barcode-validator.js +0 -2
  12. package/{dist/es2015 → esm2015}/barcode.component.js +42 -64
  13. package/{dist/es → esm2015}/barcode.module.js +14 -14
  14. package/{dist/es → esm2015}/barcodes.module.js +12 -12
  15. package/{dist/es2015 → esm2015}/base.component.js +12 -10
  16. package/{dist/es2015 → esm2015}/chart-types/barcode-types.js +1 -0
  17. package/{dist/es2015 → esm2015}/chart-types/field-types.js +1 -0
  18. package/{dist/es2015 → esm2015}/chart-types/qrcode-types.js +1 -0
  19. package/{dist/es → esm2015}/chart-types.js +3 -0
  20. package/{dist/es/index.js → esm2015/kendo-angular-barcodes.js} +0 -1
  21. package/{dist/es2015/main.d.ts → esm2015/main.js} +0 -0
  22. package/{dist/es2015 → esm2015}/package-metadata.js +1 -1
  23. package/{dist/es2015 → esm2015}/qrcode-validator.js +0 -0
  24. package/{dist/es2015 → esm2015}/qrcode.component.js +40 -60
  25. package/{dist/es2015 → esm2015}/qrcode.module.js +14 -11
  26. package/{dist/fesm2015/index.js → fesm2015/kendo-angular-barcodes.js} +129 -155
  27. package/{dist/es2015/index.d.ts → kendo-angular-barcodes.d.ts} +1 -1
  28. package/{dist/es/main.js → main.d.ts} +1 -0
  29. package/{dist/es2015/package-metadata.d.ts → package-metadata.d.ts} +0 -0
  30. package/package.json +30 -101
  31. package/{dist/es2015/qrcode-validator.d.ts → qrcode-validator.d.ts} +0 -0
  32. package/{dist/es2015/qrcode.component.d.ts → qrcode.component.d.ts} +4 -1
  33. package/{dist/es2015/qrcode.module.d.ts → qrcode.module.d.ts} +6 -0
  34. package/schematics/ngAdd/index.js +5 -2
  35. package/schematics/ngAdd/index.js.map +1 -1
  36. package/dist/cdn/js/kendo-angular-barcodes.js +0 -20
  37. package/dist/cdn/main.js +0 -5
  38. package/dist/es/barcode-validator.js +0 -51
  39. package/dist/es/barcode.component.js +0 -149
  40. package/dist/es/base.component.js +0 -117
  41. package/dist/es/chart-types/barcode-types.js +0 -4
  42. package/dist/es/chart-types/field-types.js +0 -4
  43. package/dist/es/chart-types/qrcode-types.js +0 -4
  44. package/dist/es/package-metadata.js +0 -15
  45. package/dist/es/qrcode-validator.js +0 -45
  46. package/dist/es/qrcode.component.js +0 -147
  47. package/dist/es/qrcode.module.js +0 -52
  48. package/dist/es2015/barcode.module.js +0 -49
  49. package/dist/es2015/barcodes.module.js +0 -47
  50. package/dist/es2015/chart-types.js +0 -4
  51. package/dist/es2015/index.js +0 -9
  52. package/dist/es2015/index.metadata.json +0 -1
  53. package/dist/es2015/main.js +0 -11
  54. package/dist/fesm5/index.js +0 -629
  55. package/dist/npm/barcode-validator.js +0 -53
  56. package/dist/npm/barcode.component.js +0 -151
  57. package/dist/npm/barcode.module.js +0 -54
  58. package/dist/npm/barcodes.module.js +0 -52
  59. package/dist/npm/base.component.js +0 -119
  60. package/dist/npm/chart-types/barcode-types.js +0 -6
  61. package/dist/npm/chart-types/field-types.js +0 -6
  62. package/dist/npm/chart-types/qrcode-types.js +0 -6
  63. package/dist/npm/chart-types.js +0 -6
  64. package/dist/npm/index.js +0 -13
  65. package/dist/npm/main.js +0 -20
  66. package/dist/npm/package-metadata.js +0 -17
  67. package/dist/npm/qrcode-validator.js +0 -47
  68. package/dist/npm/qrcode.component.js +0 -149
  69. package/dist/npm/qrcode.module.js +0 -54
  70. package/dist/systemjs/kendo-angular-barcodes.js +0 -5
@@ -1,151 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- "use strict";
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- var tslib_1 = require("tslib");
8
- var core_1 = require("@angular/core");
9
- var kendo_charts_1 = require("@progress/kendo-charts");
10
- var base_component_1 = require("./base.component");
11
- var package_metadata_1 = require("./package-metadata");
12
- /**
13
- * Represents the Kendo UI Barcode component for Angular.
14
- *
15
- * @example
16
- * ```ts
17
- * import { Component } from '@angular/core';
18
- *
19
- * _@Component({
20
- * selector: 'my-app',
21
- * template: `
22
- * <kendo-barcode type="EAN8" value="1234567">
23
- * </kendo-barcode>
24
- * `
25
- * })
26
- * export class AppComponent {
27
- * }
28
- * ```
29
- */
30
- var BarcodeComponent = /** @class */ (function (_super) {
31
- tslib_1.__extends(BarcodeComponent, _super);
32
- function BarcodeComponent(element, renderer, ngZone) {
33
- var _this = _super.call(this, element, renderer, ngZone) || this;
34
- _this.element = element;
35
- _this.renderer = renderer;
36
- _this.ngZone = ngZone;
37
- /**
38
- * Limits the automatic resizing of the Barcode. Sets the maximum number of times per second
39
- * that the component redraws its content when the size of its container changes.
40
- * Defaults to `10`. To disable the automatic resizing, set it to `0`.
41
- *
42
- * @example
43
- * ```ts
44
- * _@Component({
45
- * selector: 'my-app',
46
- * template: `
47
- * <kendo-barcode type="EAN8" [value]="1234567"
48
- * [resizeRateLimit]="2">
49
- * </kendo-barcode>
50
- * `
51
- * })
52
- * export class AppComponent {
53
- * }
54
- * ```
55
- */
56
- _this.resizeRateLimit = 10;
57
- return _this;
58
- }
59
- Object.defineProperty(BarcodeComponent.prototype, "options", {
60
- get: function () {
61
- return {
62
- renderAs: this.renderAs,
63
- background: this.background,
64
- border: this.border,
65
- checksum: this.checksum,
66
- color: this.color,
67
- height: this.height,
68
- padding: this.padding,
69
- text: this.text,
70
- type: this.type,
71
- value: this.value,
72
- width: this.width
73
- };
74
- },
75
- enumerable: true,
76
- configurable: true
77
- });
78
- BarcodeComponent.prototype.createInstance = function (element, options) {
79
- return new kendo_charts_1.Barcode(element, options, this.onError.bind(this));
80
- };
81
- BarcodeComponent.prototype.onError = function (error) {
82
- error.name = package_metadata_1.packageMetadata.productName + ' Barcode';
83
- if (this.isDevMode()) {
84
- throw error;
85
- }
86
- else {
87
- console.warn(error);
88
- }
89
- };
90
- tslib_1.__decorate([
91
- core_1.Input(),
92
- tslib_1.__metadata("design:type", String)
93
- ], BarcodeComponent.prototype, "background", void 0);
94
- tslib_1.__decorate([
95
- core_1.Input(),
96
- tslib_1.__metadata("design:type", Object)
97
- ], BarcodeComponent.prototype, "border", void 0);
98
- tslib_1.__decorate([
99
- core_1.Input(),
100
- tslib_1.__metadata("design:type", Boolean)
101
- ], BarcodeComponent.prototype, "checksum", void 0);
102
- tslib_1.__decorate([
103
- core_1.Input(),
104
- tslib_1.__metadata("design:type", String)
105
- ], BarcodeComponent.prototype, "color", void 0);
106
- tslib_1.__decorate([
107
- core_1.Input(),
108
- tslib_1.__metadata("design:type", Number)
109
- ], BarcodeComponent.prototype, "height", void 0);
110
- tslib_1.__decorate([
111
- core_1.Input(),
112
- tslib_1.__metadata("design:type", Object)
113
- ], BarcodeComponent.prototype, "padding", void 0);
114
- tslib_1.__decorate([
115
- core_1.Input(),
116
- tslib_1.__metadata("design:type", String)
117
- ], BarcodeComponent.prototype, "renderAs", void 0);
118
- tslib_1.__decorate([
119
- core_1.Input(),
120
- tslib_1.__metadata("design:type", Object)
121
- ], BarcodeComponent.prototype, "text", void 0);
122
- tslib_1.__decorate([
123
- core_1.Input(),
124
- tslib_1.__metadata("design:type", String)
125
- ], BarcodeComponent.prototype, "type", void 0);
126
- tslib_1.__decorate([
127
- core_1.Input(),
128
- tslib_1.__metadata("design:type", Object)
129
- ], BarcodeComponent.prototype, "value", void 0);
130
- tslib_1.__decorate([
131
- core_1.Input(),
132
- tslib_1.__metadata("design:type", Number)
133
- ], BarcodeComponent.prototype, "width", void 0);
134
- tslib_1.__decorate([
135
- core_1.Input(),
136
- tslib_1.__metadata("design:type", Number)
137
- ], BarcodeComponent.prototype, "resizeRateLimit", void 0);
138
- BarcodeComponent = tslib_1.__decorate([
139
- core_1.Component({
140
- changeDetection: core_1.ChangeDetectionStrategy.OnPush,
141
- exportAs: 'kendoBarcode',
142
- selector: 'kendo-barcode',
143
- template: "\n <kendo-resize-sensor (resize)=\"onResize()\" [rateLimit]=\"resizeRateLimit\"></kendo-resize-sensor>\n "
144
- }),
145
- tslib_1.__metadata("design:paramtypes", [core_1.ElementRef,
146
- core_1.Renderer2,
147
- core_1.NgZone])
148
- ], BarcodeComponent);
149
- return BarcodeComponent;
150
- }(base_component_1.BaseComponent));
151
- exports.BarcodeComponent = BarcodeComponent;
@@ -1,54 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- "use strict";
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- var tslib_1 = require("tslib");
8
- var core_1 = require("@angular/core");
9
- var kendo_angular_common_1 = require("@progress/kendo-angular-common");
10
- var barcode_component_1 = require("./barcode.component");
11
- /**
12
- * Represents the [NgModule]({{ site.data.urls.angular['ngmoduleapi'] }})
13
- * definition for the Barcode component.
14
- *
15
- * @example
16
- *
17
- * ```ts-no-run
18
- * // Import the Barcode module
19
- * import { BarcodeModule } from '@progress/kendo-angular-barcodes';
20
- *
21
- * // The browser platform with a compiler
22
- * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
23
- *
24
- * import { NgModule } from '@angular/core';
25
- *
26
- * // Import the app component
27
- * import { AppComponent } from './app.component';
28
- *
29
- * // Define the app module
30
- * _@NgModule({
31
- * declarations: [AppComponent], // declare app component
32
- * imports: [BrowserModule, BarcodeModule], // import Barcode module
33
- * bootstrap: [AppComponent]
34
- * })
35
- * export class AppModule {}
36
- *
37
- * // Compile and launch the module
38
- * platformBrowserDynamic().bootstrapModule(AppModule);
39
- *
40
- * ```
41
- */
42
- var BarcodeModule = /** @class */ (function () {
43
- function BarcodeModule() {
44
- }
45
- BarcodeModule = tslib_1.__decorate([
46
- core_1.NgModule({
47
- declarations: [barcode_component_1.BarcodeComponent],
48
- imports: [kendo_angular_common_1.ResizeSensorModule],
49
- exports: [barcode_component_1.BarcodeComponent]
50
- })
51
- ], BarcodeModule);
52
- return BarcodeModule;
53
- }());
54
- exports.BarcodeModule = BarcodeModule;
@@ -1,52 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- "use strict";
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- var tslib_1 = require("tslib");
8
- var core_1 = require("@angular/core");
9
- var barcode_module_1 = require("./barcode.module");
10
- var qrcode_module_1 = require("./qrcode.module");
11
- /**
12
- * Represents the [NgModule]({{ site.data.urls.angular['ngmoduleapi'] }})
13
- * definition for the Barcode and QR Code components.
14
- *
15
- * @example
16
- *
17
- * ```ts-no-run
18
- * // Import the Barcodes module
19
- * import { BarcodesModule } from '@progress/kendo-angular-barcodes';
20
- *
21
- * // The browser platform with a compiler
22
- * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
23
- *
24
- * import { NgModule } from '@angular/core';
25
- *
26
- * // Import the app component
27
- * import { AppComponent } from './app.component';
28
- *
29
- * // Define the app module
30
- * _@NgModule({
31
- * declarations: [AppComponent], // declare app component
32
- * imports: [BrowserModule, BarcodesModule], // import Barcodes module
33
- * bootstrap: [AppComponent]
34
- * })
35
- * export class AppModule {}
36
- *
37
- * // Compile and launch the module
38
- * platformBrowserDynamic().bootstrapModule(AppModule);
39
- *
40
- * ```
41
- */
42
- var BarcodesModule = /** @class */ (function () {
43
- function BarcodesModule() {
44
- }
45
- BarcodesModule = tslib_1.__decorate([
46
- core_1.NgModule({
47
- exports: [barcode_module_1.BarcodeModule, qrcode_module_1.QRCodeModule]
48
- })
49
- ], BarcodesModule);
50
- return BarcodesModule;
51
- }());
52
- exports.BarcodesModule = BarcodesModule;
@@ -1,119 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- "use strict";
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- var tslib_1 = require("tslib");
8
- var core_1 = require("@angular/core");
9
- var kendo_angular_common_1 = require("@progress/kendo-angular-common");
10
- var kendo_drawing_1 = require("@progress/kendo-drawing");
11
- var kendo_licensing_1 = require("@progress/kendo-licensing");
12
- var package_metadata_1 = require("./package-metadata");
13
- /**
14
- * @hidden
15
- */
16
- var BaseComponent = /** @class */ (function () {
17
- function BaseComponent(element, renderer, ngZone) {
18
- this.element = element;
19
- this.renderer = renderer;
20
- this.ngZone = ngZone;
21
- this.resizeRateLimit = 10;
22
- kendo_licensing_1.validatePackage(package_metadata_1.packageMetadata);
23
- }
24
- Object.defineProperty(BaseComponent.prototype, "autoResize", {
25
- get: function () {
26
- return this.resizeRateLimit > 0;
27
- },
28
- enumerable: true,
29
- configurable: true
30
- });
31
- Object.defineProperty(BaseComponent.prototype, "canRender", {
32
- get: function () {
33
- return kendo_angular_common_1.isDocumentAvailable() && Boolean(this.element);
34
- },
35
- enumerable: true,
36
- configurable: true
37
- });
38
- BaseComponent.prototype.ngAfterViewInit = function () {
39
- this.refresh();
40
- };
41
- BaseComponent.prototype.ngOnChanges = function (changes) {
42
- // Need to create a new instance if the rendering mode changes.
43
- if (changes['renderAs'] && this.instance) {
44
- this.instance.destroy();
45
- this.instance = null;
46
- }
47
- this.refresh();
48
- };
49
- /**
50
- * Detects the size of the container and redraws the component.
51
- * Resizing is automatic unless you set the `resizeRateLimit` option to `0`.
52
- */
53
- BaseComponent.prototype.resize = function () {
54
- if (this.instance) {
55
- this.instance.redraw();
56
- }
57
- };
58
- /**
59
- * @hidden
60
- */
61
- BaseComponent.prototype.onResize = function () {
62
- if (this.autoResize) {
63
- this.resize();
64
- }
65
- };
66
- /**
67
- * Exports the component as an image. The export operation is asynchronous and returns a promise.
68
- *
69
- * @param {ImageExportOptions} options - The parameters for the exported image.
70
- * @returns {Promise<string>} - A promise that will be resolved with a PNG image encoded as a Data URI.
71
- */
72
- BaseComponent.prototype.exportImage = function (options) {
73
- if (options === void 0) { options = {}; }
74
- return kendo_drawing_1.exportImage(this.exportVisual(), options);
75
- };
76
- /**
77
- * Exports the component as an SVG document. The export operation is asynchronous and returns a promise.
78
- *
79
- * @param options - The parameters for the exported file.
80
- * @returns - A promise that will be resolved with an SVG document that is encoded as a Data URI.
81
- */
82
- BaseComponent.prototype.exportSVG = function (options) {
83
- if (options === void 0) { options = {}; }
84
- return kendo_drawing_1.exportSVG(this.exportVisual(), options);
85
- };
86
- /**
87
- * Exports the component as a Drawing Group.
88
- *
89
- * @returns - The exported Group.
90
- */
91
- BaseComponent.prototype.exportVisual = function () {
92
- return this.instance.exportVisual();
93
- };
94
- BaseComponent.prototype.refresh = function () {
95
- if (!this.canRender) {
96
- return;
97
- }
98
- if (!this.instance) {
99
- var element = this.element.nativeElement;
100
- this.instance = this.createInstance(element, this.options);
101
- }
102
- else {
103
- this.instance.setOptions(this.options);
104
- }
105
- };
106
- BaseComponent.prototype.isDevMode = function () {
107
- return core_1.isDevMode();
108
- };
109
- tslib_1.__decorate([
110
- core_1.Input(),
111
- tslib_1.__metadata("design:type", Number)
112
- ], BaseComponent.prototype, "resizeRateLimit", void 0);
113
- tslib_1.__decorate([
114
- core_1.ViewChild('surface', { static: true }),
115
- tslib_1.__metadata("design:type", core_1.ElementRef)
116
- ], BaseComponent.prototype, "surfaceElement", void 0);
117
- return BaseComponent;
118
- }());
119
- exports.BaseComponent = BaseComponent;
@@ -1,6 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- "use strict";
6
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,6 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- "use strict";
6
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,6 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- "use strict";
6
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,6 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- "use strict";
6
- Object.defineProperty(exports, "__esModule", { value: true });
package/dist/npm/index.js DELETED
@@ -1,13 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- "use strict";
6
- /**
7
- * Generated bundle index. Do not edit.
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- var tslib_1 = require("tslib");
11
- tslib_1.__exportStar(require("./main"), exports);
12
- var base_component_1 = require("./base.component");
13
- exports.BaseComponent = base_component_1.BaseComponent
package/dist/npm/main.js DELETED
@@ -1,20 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- "use strict";
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- var barcode_component_1 = require("./barcode.component");
8
- exports.BarcodeComponent = barcode_component_1.BarcodeComponent;
9
- var qrcode_component_1 = require("./qrcode.component");
10
- exports.QRCodeComponent = qrcode_component_1.QRCodeComponent;
11
- var barcode_module_1 = require("./barcode.module");
12
- exports.BarcodeModule = barcode_module_1.BarcodeModule;
13
- var qrcode_module_1 = require("./qrcode.module");
14
- exports.QRCodeModule = qrcode_module_1.QRCodeModule;
15
- var barcodes_module_1 = require("./barcodes.module");
16
- exports.BarcodesModule = barcodes_module_1.BarcodesModule;
17
- var barcode_validator_1 = require("./barcode-validator");
18
- exports.createBarcodeValidator = barcode_validator_1.createBarcodeValidator;
19
- var qrcode_validator_1 = require("./qrcode-validator");
20
- exports.createQRCodeValidator = qrcode_validator_1.createQRCodeValidator;
@@ -1,17 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- "use strict";
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- /**
8
- * @hidden
9
- */
10
- exports.packageMetadata = {
11
- name: '@progress/kendo-angular-barcodes',
12
- productName: 'Kendo UI for Angular',
13
- productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
14
- publishDate: 1648115793,
15
- version: '',
16
- licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
17
- };
@@ -1,47 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- "use strict";
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- var kendo_charts_1 = require("@progress/kendo-charts");
8
- /**
9
- * Creates a value validator for a particular Barcode type.
10
- *
11
- * @param {QRCodeEncoding} encoding The QR Code encoding. Defaults to 'ISO_8859_1'.
12
- * @returns {ValidatorFn} A validator function that returns an error map with the `qrcode` property if the validation check fails, otherwise `null`.
13
- *
14
- * @example
15
- * ```ts-no-run
16
- * const control = new FormControl('Фоо', createQRCodeValidator());
17
- * console.log(control.errors);
18
- *
19
- * // {
20
- * // qrcode: {
21
- * // message: 'Unsupported character in QR Code: "Ф".',
22
- * // value: '1234',
23
- * // type: 'EAN13'
24
- * // }
25
- * // }
26
- * ```
27
- */
28
- exports.createQRCodeValidator = function (encoding) {
29
- if (encoding === void 0) { encoding = 'ISO_8859_1'; }
30
- var validator = kendo_charts_1.qrcodeValidator(encoding);
31
- return function (control) {
32
- if (!control.value) {
33
- return null;
34
- }
35
- var result = validator(control.value);
36
- if (result.valid === true) {
37
- return null;
38
- }
39
- return {
40
- qrcode: {
41
- message: result.error.message,
42
- value: control.value,
43
- encoding: encoding
44
- }
45
- };
46
- };
47
- };
@@ -1,149 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- "use strict";
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- var tslib_1 = require("tslib");
8
- var core_1 = require("@angular/core");
9
- var kendo_charts_1 = require("@progress/kendo-charts");
10
- var base_component_1 = require("./base.component");
11
- var package_metadata_1 = require("./package-metadata");
12
- var DEFAULT_COLOR = '#000';
13
- var DEFAULT_BACKGROUND = '#fff';
14
- var DEFAULT_ERROR_CORRECTION = 'L';
15
- /**
16
- * Represents the Kendo UI QR Code component for Angular.
17
- *
18
- * @example
19
- * ```ts
20
- * import { Component } from '@angular/core';
21
- *
22
- * _@Component({
23
- * selector: 'my-app',
24
- * template: `
25
- * <kendo-qrcode value="https://www.telerik.com/kendo-angular-ui">
26
- * </kendo-qrcode>
27
- * `
28
- * })
29
- * export class AppComponent {
30
- * }
31
- * ```
32
- */
33
- var QRCodeComponent = /** @class */ (function (_super) {
34
- tslib_1.__extends(QRCodeComponent, _super);
35
- function QRCodeComponent(element, renderer, ngZone) {
36
- var _this = _super.call(this, element, renderer, ngZone) || this;
37
- _this.element = element;
38
- _this.renderer = renderer;
39
- _this.ngZone = ngZone;
40
- /**
41
- * Limits the automatic resizing of the QR Code. Sets the maximum number of times per second
42
- * that the component redraws its content when the size of its container changes.
43
- * Defaults to `10`. To disable the automatic resizing, set it to `0`.
44
- *
45
- * @example
46
- * ```ts
47
- * _@Component({
48
- * selector: 'my-app',
49
- * template: `
50
- * <kendo-qrcode value="https://www.telerik.com/kendo-angular-ui"
51
- * [resizeRateLimit]="2">
52
- * </kendo-qrcode>
53
- * `
54
- * })
55
- * export class AppComponent {
56
- * }
57
- * ```
58
- */
59
- _this.resizeRateLimit = 10;
60
- return _this;
61
- }
62
- Object.defineProperty(QRCodeComponent.prototype, "options", {
63
- get: function () {
64
- return {
65
- background: this.background || DEFAULT_BACKGROUND,
66
- border: this.border,
67
- color: this.color || DEFAULT_COLOR,
68
- encoding: this.encoding,
69
- errorCorrection: this.errorCorrection || DEFAULT_ERROR_CORRECTION,
70
- overlay: this.overlay || {},
71
- padding: this.padding,
72
- renderAs: this.renderAs,
73
- size: this.size,
74
- value: this.value
75
- };
76
- },
77
- enumerable: true,
78
- configurable: true
79
- });
80
- QRCodeComponent.prototype.createInstance = function (element, options) {
81
- return new kendo_charts_1.QRCode(element, options, this.onError.bind(this));
82
- };
83
- QRCodeComponent.prototype.onError = function (error) {
84
- error.name = package_metadata_1.packageMetadata.productName + ' QRCode';
85
- if (this.isDevMode()) {
86
- throw error;
87
- }
88
- else {
89
- console.warn(error);
90
- }
91
- };
92
- tslib_1.__decorate([
93
- core_1.Input(),
94
- tslib_1.__metadata("design:type", String)
95
- ], QRCodeComponent.prototype, "background", void 0);
96
- tslib_1.__decorate([
97
- core_1.Input(),
98
- tslib_1.__metadata("design:type", Object)
99
- ], QRCodeComponent.prototype, "border", void 0);
100
- tslib_1.__decorate([
101
- core_1.Input(),
102
- tslib_1.__metadata("design:type", String)
103
- ], QRCodeComponent.prototype, "color", void 0);
104
- tslib_1.__decorate([
105
- core_1.Input(),
106
- tslib_1.__metadata("design:type", String)
107
- ], QRCodeComponent.prototype, "encoding", void 0);
108
- tslib_1.__decorate([
109
- core_1.Input(),
110
- tslib_1.__metadata("design:type", String)
111
- ], QRCodeComponent.prototype, "errorCorrection", void 0);
112
- tslib_1.__decorate([
113
- core_1.Input(),
114
- tslib_1.__metadata("design:type", Object)
115
- ], QRCodeComponent.prototype, "overlay", void 0);
116
- tslib_1.__decorate([
117
- core_1.Input(),
118
- tslib_1.__metadata("design:type", Number)
119
- ], QRCodeComponent.prototype, "padding", void 0);
120
- tslib_1.__decorate([
121
- core_1.Input(),
122
- tslib_1.__metadata("design:type", String)
123
- ], QRCodeComponent.prototype, "renderAs", void 0);
124
- tslib_1.__decorate([
125
- core_1.Input(),
126
- tslib_1.__metadata("design:type", Object)
127
- ], QRCodeComponent.prototype, "size", void 0);
128
- tslib_1.__decorate([
129
- core_1.Input(),
130
- tslib_1.__metadata("design:type", Object)
131
- ], QRCodeComponent.prototype, "value", void 0);
132
- tslib_1.__decorate([
133
- core_1.Input(),
134
- tslib_1.__metadata("design:type", Number)
135
- ], QRCodeComponent.prototype, "resizeRateLimit", void 0);
136
- QRCodeComponent = tslib_1.__decorate([
137
- core_1.Component({
138
- changeDetection: core_1.ChangeDetectionStrategy.OnPush,
139
- selector: 'kendo-qrcode',
140
- exportAs: 'kendoQRCode',
141
- template: "\n <kendo-resize-sensor (resize)=\"onResize()\" [rateLimit]=\"resizeRateLimit\"></kendo-resize-sensor>\n "
142
- }),
143
- tslib_1.__metadata("design:paramtypes", [core_1.ElementRef,
144
- core_1.Renderer2,
145
- core_1.NgZone])
146
- ], QRCodeComponent);
147
- return QRCodeComponent;
148
- }(base_component_1.BaseComponent));
149
- exports.QRCodeComponent = QRCodeComponent;