@progress/kendo-angular-barcodes 0.1.0

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 (66) hide show
  1. package/LICENSE.md +11 -0
  2. package/NOTICE.txt +614 -0
  3. package/README.md +31 -0
  4. package/dist/cdn/js/kendo-angular-barcodes.js +20 -0
  5. package/dist/cdn/main.js +5 -0
  6. package/dist/es/barcode.component.js +139 -0
  7. package/dist/es/barcode.module.js +52 -0
  8. package/dist/es/barcodes.module.js +50 -0
  9. package/dist/es/base.component.js +114 -0
  10. package/dist/es/chart-types/barcode-types.js +4 -0
  11. package/dist/es/chart-types/field-types.js +4 -0
  12. package/dist/es/chart-types/qrcode-types.js +4 -0
  13. package/dist/es/chart-types.js +4 -0
  14. package/dist/es/index.js +9 -0
  15. package/dist/es/main.js +9 -0
  16. package/dist/es/package-metadata.js +15 -0
  17. package/dist/es/qrcode.component.js +137 -0
  18. package/dist/es/qrcode.module.js +52 -0
  19. package/dist/es2015/barcode.component.d.ts +311 -0
  20. package/dist/es2015/barcode.component.js +134 -0
  21. package/dist/es2015/barcode.module.d.ts +37 -0
  22. package/dist/es2015/barcode.module.js +49 -0
  23. package/dist/es2015/barcodes.module.d.ts +37 -0
  24. package/dist/es2015/barcodes.module.js +47 -0
  25. package/dist/es2015/base.component.d.ts +54 -0
  26. package/dist/es2015/base.component.js +102 -0
  27. package/dist/es2015/chart-types/barcode-types.d.ts +109 -0
  28. package/dist/es2015/chart-types/barcode-types.js +4 -0
  29. package/dist/es2015/chart-types/field-types.d.ts +59 -0
  30. package/dist/es2015/chart-types/field-types.js +4 -0
  31. package/dist/es2015/chart-types/qrcode-types.d.ts +124 -0
  32. package/dist/es2015/chart-types/qrcode-types.js +4 -0
  33. package/dist/es2015/chart-types.d.ts +7 -0
  34. package/dist/es2015/chart-types.js +4 -0
  35. package/dist/es2015/index.d.ts +9 -0
  36. package/dist/es2015/index.js +9 -0
  37. package/dist/es2015/index.metadata.json +1 -0
  38. package/dist/es2015/main.d.ts +10 -0
  39. package/dist/es2015/main.js +9 -0
  40. package/dist/es2015/package-metadata.d.ts +9 -0
  41. package/dist/es2015/package-metadata.js +15 -0
  42. package/dist/es2015/qrcode.component.d.ts +288 -0
  43. package/dist/es2015/qrcode.component.js +132 -0
  44. package/dist/es2015/qrcode.module.d.ts +37 -0
  45. package/dist/es2015/qrcode.module.js +49 -0
  46. package/dist/fesm2015/index.js +492 -0
  47. package/dist/fesm5/index.js +522 -0
  48. package/dist/npm/barcode.component.js +141 -0
  49. package/dist/npm/barcode.module.js +54 -0
  50. package/dist/npm/barcodes.module.js +52 -0
  51. package/dist/npm/base.component.js +116 -0
  52. package/dist/npm/chart-types/barcode-types.js +6 -0
  53. package/dist/npm/chart-types/field-types.js +6 -0
  54. package/dist/npm/chart-types/qrcode-types.js +6 -0
  55. package/dist/npm/chart-types.js +6 -0
  56. package/dist/npm/index.js +13 -0
  57. package/dist/npm/main.js +16 -0
  58. package/dist/npm/package-metadata.js +17 -0
  59. package/dist/npm/qrcode.component.js +139 -0
  60. package/dist/npm/qrcode.module.js +54 -0
  61. package/dist/systemjs/kendo-angular-barcodes.js +5 -0
  62. package/package.json +154 -0
  63. package/schematics/collection.json +12 -0
  64. package/schematics/ngAdd/index.js +18 -0
  65. package/schematics/ngAdd/index.js.map +1 -0
  66. package/schematics/ngAdd/schema.json +28 -0
@@ -0,0 +1,5 @@
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
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("tslib"),require("@angular/core"),require("@progress/kendo-angular-common"),require("@progress/kendo-charts"),require("@progress/kendo-drawing"),require("@progress/kendo-licensing")):"function"==typeof define&&define.amd?define(["tslib","@angular/core","@progress/kendo-angular-common","@progress/kendo-charts","@progress/kendo-drawing","@progress/kendo-licensing"],t):"object"==typeof exports?exports.KendoAngularBarcodes=t(require("tslib"),require("@angular/core"),require("@progress/kendo-angular-common"),require("@progress/kendo-charts"),require("@progress/kendo-drawing"),require("@progress/kendo-licensing")):e.KendoAngularBarcodes=t(e.tslib,e["@angular/core"],e["@progress/kendo-angular-common"],e["@progress/kendo-charts"],e["@progress/kendo-drawing"],e["@progress/kendo-licensing"])}(window,(function(e,t,o,r,n,i){return function(e){var t={};function o(r){if(t[r])return t[r].exports;var n=t[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,o),n.l=!0,n.exports}return o.m=e,o.c=t,o.d=function(e,t,r){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(o.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)o.d(r,n,function(t){return e[t]}.bind(null,n));return r},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=9)}([function(t,o){t.exports=e},function(e,o){e.exports=t},function(e,t){e.exports=o},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o(0),n=o(1),i=o(4),a=function(e){function t(t,o,r){var n=e.call(this,t,o,r)||this;return n.element=t,n.renderer=o,n.ngZone=r,n.resizeRateLimit=10,n}return r.__extends(t,e),Object.defineProperty(t.prototype,"options",{get:function(){return{renderAs:this.renderAs,background:this.background,border:this.border,checksum:this.checksum,color:this.color,height:this.height,padding:this.padding,text:this.text,type:this.type,value:this.value,width:this.width}},enumerable:!0,configurable:!0}),t.prototype.createInstance=function(e,t){return new i.Barcode(e,t)},r.__decorate([n.Input(),r.__metadata("design:type",String)],t.prototype,"background",void 0),r.__decorate([n.Input(),r.__metadata("design:type",Object)],t.prototype,"border",void 0),r.__decorate([n.Input(),r.__metadata("design:type",Boolean)],t.prototype,"checksum",void 0),r.__decorate([n.Input(),r.__metadata("design:type",String)],t.prototype,"color",void 0),r.__decorate([n.Input(),r.__metadata("design:type",Number)],t.prototype,"height",void 0),r.__decorate([n.Input(),r.__metadata("design:type",Object)],t.prototype,"padding",void 0),r.__decorate([n.Input(),r.__metadata("design:type",String)],t.prototype,"renderAs",void 0),r.__decorate([n.Input(),r.__metadata("design:type",Object)],t.prototype,"text",void 0),r.__decorate([n.Input(),r.__metadata("design:type",String)],t.prototype,"type",void 0),r.__decorate([n.Input(),r.__metadata("design:type",Object)],t.prototype,"value",void 0),r.__decorate([n.Input(),r.__metadata("design:type",Number)],t.prototype,"width",void 0),r.__decorate([n.Input(),r.__metadata("design:type",Number)],t.prototype,"resizeRateLimit",void 0),t=r.__decorate([n.Component({changeDetection:n.ChangeDetectionStrategy.OnPush,exportAs:"kendoBarcode",selector:"kendo-barcode",template:'\n <kendo-resize-sensor (resize)="onResize()" [rateLimit]="resizeRateLimit"></kendo-resize-sensor>\n '}),r.__metadata("design:paramtypes",[n.ElementRef,n.Renderer2,n.NgZone])],t)}(o(5).BaseComponent);t.BarcodeComponent=a},function(e,t){e.exports=r},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o(0),n=o(1),i=o(2),a=o(10),d=o(11),s=o(12),p=function(){function e(e,t,o){this.element=e,this.renderer=t,this.ngZone=o,this.resizeRateLimit=10,d.validatePackage(s.packageMetadata)}return Object.defineProperty(e.prototype,"autoResize",{get:function(){return this.resizeRateLimit>0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"canRender",{get:function(){return i.isDocumentAvailable()&&Boolean(this.element)},enumerable:!0,configurable:!0}),e.prototype.ngAfterViewInit=function(){this.refresh()},e.prototype.ngOnChanges=function(e){e.renderAs&&this.instance&&(this.instance.destroy(),this.instance=null),this.refresh()},e.prototype.resize=function(){this.instance&&this.instance.redraw()},e.prototype.onResize=function(){this.autoResize&&this.resize()},e.prototype.exportImage=function(e){return void 0===e&&(e={}),a.exportImage(this.exportVisual(),e)},e.prototype.exportSVG=function(e){return void 0===e&&(e={}),a.exportSVG(this.exportVisual(),e)},e.prototype.exportVisual=function(){return this.instance.exportVisual()},e.prototype.refresh=function(){if(this.canRender)if(this.instance)this.instance.setOptions(this.options);else{var e=this.element.nativeElement;this.instance=this.createInstance(e,this.options)}},r.__decorate([n.Input(),r.__metadata("design:type",Number)],e.prototype,"resizeRateLimit",void 0),r.__decorate([n.ViewChild("surface",{static:!0}),r.__metadata("design:type",n.ElementRef)],e.prototype,"surfaceElement",void 0),e}();t.BaseComponent=p},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o(0),n=o(1),i=o(4),a=o(5),d=function(e){function t(t,o,r){var n=e.call(this,t,o,r)||this;return n.element=t,n.renderer=o,n.ngZone=r,n.resizeRateLimit=10,n}return r.__extends(t,e),Object.defineProperty(t.prototype,"options",{get:function(){return{background:this.background||"#fff",border:this.border,color:this.color||"#000",encoding:this.encoding,errorCorrection:this.errorCorrection||"L",overlay:this.overlay||{},padding:this.padding,renderAs:this.renderAs,size:this.size,value:this.value}},enumerable:!0,configurable:!0}),t.prototype.createInstance=function(e,t){return new i.QRCode(e,t)},r.__decorate([n.Input(),r.__metadata("design:type",String)],t.prototype,"background",void 0),r.__decorate([n.Input(),r.__metadata("design:type",Object)],t.prototype,"border",void 0),r.__decorate([n.Input(),r.__metadata("design:type",String)],t.prototype,"color",void 0),r.__decorate([n.Input(),r.__metadata("design:type",String)],t.prototype,"encoding",void 0),r.__decorate([n.Input(),r.__metadata("design:type",String)],t.prototype,"errorCorrection",void 0),r.__decorate([n.Input(),r.__metadata("design:type",Object)],t.prototype,"overlay",void 0),r.__decorate([n.Input(),r.__metadata("design:type",Number)],t.prototype,"padding",void 0),r.__decorate([n.Input(),r.__metadata("design:type",String)],t.prototype,"renderAs",void 0),r.__decorate([n.Input(),r.__metadata("design:type",Object)],t.prototype,"size",void 0),r.__decorate([n.Input(),r.__metadata("design:type",Object)],t.prototype,"value",void 0),r.__decorate([n.Input(),r.__metadata("design:type",Number)],t.prototype,"resizeRateLimit",void 0),t=r.__decorate([n.Component({changeDetection:n.ChangeDetectionStrategy.OnPush,selector:"kendo-qrcode",exportAs:"kendoQRCode",template:'\n <kendo-resize-sensor (resize)="onResize()" [rateLimit]="resizeRateLimit"></kendo-resize-sensor>\n '}),r.__metadata("design:paramtypes",[n.ElementRef,n.Renderer2,n.NgZone])],t)}(a.BaseComponent);t.QRCodeComponent=d},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o(0),n=o(1),i=o(2),a=o(3),d=function(){function e(){}return e=r.__decorate([n.NgModule({declarations:[a.BarcodeComponent],imports:[i.ResizeSensorModule],exports:[a.BarcodeComponent]})],e)}();t.BarcodeModule=d},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o(0),n=o(1),i=o(2),a=o(6),d=function(){function e(){}return e=r.__decorate([n.NgModule({declarations:[a.QRCodeComponent],imports:[i.ResizeSensorModule],exports:[a.QRCodeComponent]})],e)}();t.QRCodeModule=d},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o(3);t.BarcodeComponent=r.BarcodeComponent;var n=o(6);t.QRCodeComponent=n.QRCodeComponent;var i=o(7);t.BarcodeModule=i.BarcodeModule;var a=o(8);t.QRCodeModule=a.QRCodeModule;var d=o(13);t.BarcodesModule=d.BarcodesModule},function(e,t){e.exports=n},function(e,t){e.exports=i},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.packageMetadata={name:"@progress/kendo-angular-barcodes",productName:"Kendo UI for Angular",productCodes:["KENDOUIANGULAR","KENDOUICOMPLETE"],publishDate:1638370938,version:"",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"}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o(0),n=o(1),i=o(7),a=o(8),d=function(){function e(){}return e=r.__decorate([n.NgModule({exports:[i.BarcodeModule,a.QRCodeModule]})],e)}();t.BarcodesModule=d}])}));
@@ -0,0 +1,139 @@
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
+ import * as tslib_1 from "tslib";
6
+ import { ChangeDetectionStrategy, Component, ElementRef, Input, NgZone, Renderer2 } from '@angular/core';
7
+ import { Barcode } from '@progress/kendo-charts';
8
+ import { BaseComponent } from './base.component';
9
+ /**
10
+ * Represents the Kendo UI Barcode component for Angular.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * import { Component } from '@angular/core';
15
+ *
16
+ * _@Component({
17
+ * selector: 'my-app',
18
+ * template: `
19
+ * <kendo-barcode type="EAN8" value="1234567">
20
+ * </kendo-barcode>
21
+ * `
22
+ * })
23
+ * export class AppComponent {
24
+ * }
25
+ * ```
26
+ */
27
+ var BarcodeComponent = /** @class */ (function (_super) {
28
+ tslib_1.__extends(BarcodeComponent, _super);
29
+ function BarcodeComponent(element, renderer, ngZone) {
30
+ var _this = _super.call(this, element, renderer, ngZone) || this;
31
+ _this.element = element;
32
+ _this.renderer = renderer;
33
+ _this.ngZone = ngZone;
34
+ /**
35
+ * Limits the automatic resizing of the Barcode. Sets the maximum number of times per second
36
+ * that the component redraws its content when the size of its container changes.
37
+ * Defaults to `10`. To disable the automatic resizing, set it to `0`.
38
+ *
39
+ * @example
40
+ * ```ts
41
+ * _@Component({
42
+ * selector: 'my-app',
43
+ * template: `
44
+ * <kendo-barcode type="EAN8" [value]="1234567"
45
+ * [resizeRateLimit]="2">
46
+ * </kendo-barcode>
47
+ * `
48
+ * })
49
+ * export class AppComponent {
50
+ * }
51
+ * ```
52
+ */
53
+ _this.resizeRateLimit = 10;
54
+ return _this;
55
+ }
56
+ Object.defineProperty(BarcodeComponent.prototype, "options", {
57
+ get: function () {
58
+ return {
59
+ renderAs: this.renderAs,
60
+ background: this.background,
61
+ border: this.border,
62
+ checksum: this.checksum,
63
+ color: this.color,
64
+ height: this.height,
65
+ padding: this.padding,
66
+ text: this.text,
67
+ type: this.type,
68
+ value: this.value,
69
+ width: this.width
70
+ };
71
+ },
72
+ enumerable: true,
73
+ configurable: true
74
+ });
75
+ BarcodeComponent.prototype.createInstance = function (element, options) {
76
+ return new Barcode(element, options);
77
+ };
78
+ tslib_1.__decorate([
79
+ Input(),
80
+ tslib_1.__metadata("design:type", String)
81
+ ], BarcodeComponent.prototype, "background", void 0);
82
+ tslib_1.__decorate([
83
+ Input(),
84
+ tslib_1.__metadata("design:type", Object)
85
+ ], BarcodeComponent.prototype, "border", void 0);
86
+ tslib_1.__decorate([
87
+ Input(),
88
+ tslib_1.__metadata("design:type", Boolean)
89
+ ], BarcodeComponent.prototype, "checksum", void 0);
90
+ tslib_1.__decorate([
91
+ Input(),
92
+ tslib_1.__metadata("design:type", String)
93
+ ], BarcodeComponent.prototype, "color", void 0);
94
+ tslib_1.__decorate([
95
+ Input(),
96
+ tslib_1.__metadata("design:type", Number)
97
+ ], BarcodeComponent.prototype, "height", void 0);
98
+ tslib_1.__decorate([
99
+ Input(),
100
+ tslib_1.__metadata("design:type", Object)
101
+ ], BarcodeComponent.prototype, "padding", void 0);
102
+ tslib_1.__decorate([
103
+ Input(),
104
+ tslib_1.__metadata("design:type", String)
105
+ ], BarcodeComponent.prototype, "renderAs", void 0);
106
+ tslib_1.__decorate([
107
+ Input(),
108
+ tslib_1.__metadata("design:type", Object)
109
+ ], BarcodeComponent.prototype, "text", void 0);
110
+ tslib_1.__decorate([
111
+ Input(),
112
+ tslib_1.__metadata("design:type", String)
113
+ ], BarcodeComponent.prototype, "type", void 0);
114
+ tslib_1.__decorate([
115
+ Input(),
116
+ tslib_1.__metadata("design:type", Object)
117
+ ], BarcodeComponent.prototype, "value", void 0);
118
+ tslib_1.__decorate([
119
+ Input(),
120
+ tslib_1.__metadata("design:type", Number)
121
+ ], BarcodeComponent.prototype, "width", void 0);
122
+ tslib_1.__decorate([
123
+ Input(),
124
+ tslib_1.__metadata("design:type", Number)
125
+ ], BarcodeComponent.prototype, "resizeRateLimit", void 0);
126
+ BarcodeComponent = tslib_1.__decorate([
127
+ Component({
128
+ changeDetection: ChangeDetectionStrategy.OnPush,
129
+ exportAs: 'kendoBarcode',
130
+ selector: 'kendo-barcode',
131
+ template: "\n <kendo-resize-sensor (resize)=\"onResize()\" [rateLimit]=\"resizeRateLimit\"></kendo-resize-sensor>\n "
132
+ }),
133
+ tslib_1.__metadata("design:paramtypes", [ElementRef,
134
+ Renderer2,
135
+ NgZone])
136
+ ], BarcodeComponent);
137
+ return BarcodeComponent;
138
+ }(BaseComponent));
139
+ export { BarcodeComponent };
@@ -0,0 +1,52 @@
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
+ import * as tslib_1 from "tslib";
6
+ import { NgModule } from '@angular/core';
7
+ import { ResizeSensorModule } from '@progress/kendo-angular-common';
8
+ import { BarcodeComponent } from './barcode.component';
9
+ /**
10
+ * Represents the [NgModule]({{ site.data.urls.angular['ngmoduleapi'] }})
11
+ * definition for the Barcode component.
12
+ *
13
+ * @example
14
+ *
15
+ * ```ts-no-run
16
+ * // Import the Barcode module
17
+ * import { BarcodeModule } from '@progress/kendo-angular-barcodes';
18
+ *
19
+ * // The browser platform with a compiler
20
+ * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
21
+ *
22
+ * import { NgModule } from '@angular/core';
23
+ *
24
+ * // Import the app component
25
+ * import { AppComponent } from './app.component';
26
+ *
27
+ * // Define the app module
28
+ * _@NgModule({
29
+ * declarations: [AppComponent], // declare app component
30
+ * imports: [BrowserModule, BarcodeModule], // import Barcode module
31
+ * bootstrap: [AppComponent]
32
+ * })
33
+ * export class AppModule {}
34
+ *
35
+ * // Compile and launch the module
36
+ * platformBrowserDynamic().bootstrapModule(AppModule);
37
+ *
38
+ * ```
39
+ */
40
+ var BarcodeModule = /** @class */ (function () {
41
+ function BarcodeModule() {
42
+ }
43
+ BarcodeModule = tslib_1.__decorate([
44
+ NgModule({
45
+ declarations: [BarcodeComponent],
46
+ imports: [ResizeSensorModule],
47
+ exports: [BarcodeComponent]
48
+ })
49
+ ], BarcodeModule);
50
+ return BarcodeModule;
51
+ }());
52
+ export { BarcodeModule };
@@ -0,0 +1,50 @@
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
+ import * as tslib_1 from "tslib";
6
+ import { NgModule } from '@angular/core';
7
+ import { BarcodeModule } from './barcode.module';
8
+ import { QRCodeModule } from './qrcode.module';
9
+ /**
10
+ * Represents the [NgModule]({{ site.data.urls.angular['ngmoduleapi'] }})
11
+ * definition for the Barcode and QR Code components.
12
+ *
13
+ * @example
14
+ *
15
+ * ```ts-no-run
16
+ * // Import the Barcodes module
17
+ * import { BarcodesModule } from '@progress/kendo-angular-barcodes';
18
+ *
19
+ * // The browser platform with a compiler
20
+ * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
21
+ *
22
+ * import { NgModule } from '@angular/core';
23
+ *
24
+ * // Import the app component
25
+ * import { AppComponent } from './app.component';
26
+ *
27
+ * // Define the app module
28
+ * _@NgModule({
29
+ * declarations: [AppComponent], // declare app component
30
+ * imports: [BrowserModule, BarcodesModule], // import Barcodes module
31
+ * bootstrap: [AppComponent]
32
+ * })
33
+ * export class AppModule {}
34
+ *
35
+ * // Compile and launch the module
36
+ * platformBrowserDynamic().bootstrapModule(AppModule);
37
+ *
38
+ * ```
39
+ */
40
+ var BarcodesModule = /** @class */ (function () {
41
+ function BarcodesModule() {
42
+ }
43
+ BarcodesModule = tslib_1.__decorate([
44
+ NgModule({
45
+ exports: [BarcodeModule, QRCodeModule]
46
+ })
47
+ ], BarcodesModule);
48
+ return BarcodesModule;
49
+ }());
50
+ export { BarcodesModule };
@@ -0,0 +1,114 @@
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
+ import * as tslib_1 from "tslib";
6
+ import { ElementRef, Input, ViewChild } from '@angular/core';
7
+ import { isDocumentAvailable } from '@progress/kendo-angular-common';
8
+ import { exportImage, exportSVG } from '@progress/kendo-drawing';
9
+ import { validatePackage } from '@progress/kendo-licensing';
10
+ import { packageMetadata } from './package-metadata';
11
+ /**
12
+ * @hidden
13
+ */
14
+ var BaseComponent = /** @class */ (function () {
15
+ function BaseComponent(element, renderer, ngZone) {
16
+ this.element = element;
17
+ this.renderer = renderer;
18
+ this.ngZone = ngZone;
19
+ this.resizeRateLimit = 10;
20
+ validatePackage(packageMetadata);
21
+ }
22
+ Object.defineProperty(BaseComponent.prototype, "autoResize", {
23
+ get: function () {
24
+ return this.resizeRateLimit > 0;
25
+ },
26
+ enumerable: true,
27
+ configurable: true
28
+ });
29
+ Object.defineProperty(BaseComponent.prototype, "canRender", {
30
+ get: function () {
31
+ return isDocumentAvailable() && Boolean(this.element);
32
+ },
33
+ enumerable: true,
34
+ configurable: true
35
+ });
36
+ BaseComponent.prototype.ngAfterViewInit = function () {
37
+ this.refresh();
38
+ };
39
+ BaseComponent.prototype.ngOnChanges = function (changes) {
40
+ // Need to create a new instance if the rendering mode changes.
41
+ if (changes['renderAs'] && this.instance) {
42
+ this.instance.destroy();
43
+ this.instance = null;
44
+ }
45
+ this.refresh();
46
+ };
47
+ /**
48
+ * Detects the size of the container and redraws the component.
49
+ * Resizing is automatic unless you set the `resizeRateLimit` option to `0`.
50
+ */
51
+ BaseComponent.prototype.resize = function () {
52
+ if (this.instance) {
53
+ this.instance.redraw();
54
+ }
55
+ };
56
+ /**
57
+ * @hidden
58
+ */
59
+ BaseComponent.prototype.onResize = function () {
60
+ if (this.autoResize) {
61
+ this.resize();
62
+ }
63
+ };
64
+ /**
65
+ * Exports the component as an image. The export operation is asynchronous and returns a promise.
66
+ *
67
+ * @param {ImageExportOptions} options - The parameters for the exported image.
68
+ * @returns {Promise<string>} - A promise that will be resolved with a PNG image encoded as a Data URI.
69
+ */
70
+ BaseComponent.prototype.exportImage = function (options) {
71
+ if (options === void 0) { options = {}; }
72
+ return exportImage(this.exportVisual(), options);
73
+ };
74
+ /**
75
+ * Exports the component as an SVG document. The export operation is asynchronous and returns a promise.
76
+ *
77
+ * @param options - The parameters for the exported file.
78
+ * @returns - A promise that will be resolved with an SVG document that is encoded as a Data URI.
79
+ */
80
+ BaseComponent.prototype.exportSVG = function (options) {
81
+ if (options === void 0) { options = {}; }
82
+ return exportSVG(this.exportVisual(), options);
83
+ };
84
+ /**
85
+ * Exports the component as a Drawing Group.
86
+ *
87
+ * @returns - The exported Group.
88
+ */
89
+ BaseComponent.prototype.exportVisual = function () {
90
+ return this.instance.exportVisual();
91
+ };
92
+ BaseComponent.prototype.refresh = function () {
93
+ if (!this.canRender) {
94
+ return;
95
+ }
96
+ if (!this.instance) {
97
+ var element = this.element.nativeElement;
98
+ this.instance = this.createInstance(element, this.options);
99
+ }
100
+ else {
101
+ this.instance.setOptions(this.options);
102
+ }
103
+ };
104
+ tslib_1.__decorate([
105
+ Input(),
106
+ tslib_1.__metadata("design:type", Number)
107
+ ], BaseComponent.prototype, "resizeRateLimit", void 0);
108
+ tslib_1.__decorate([
109
+ ViewChild('surface', { static: true }),
110
+ tslib_1.__metadata("design:type", ElementRef)
111
+ ], BaseComponent.prototype, "surfaceElement", void 0);
112
+ return BaseComponent;
113
+ }());
114
+ export { BaseComponent };
@@ -0,0 +1,4 @@
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
+ *-------------------------------------------------------------------------------------------*/
@@ -0,0 +1,4 @@
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
+ *-------------------------------------------------------------------------------------------*/
@@ -0,0 +1,4 @@
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
+ *-------------------------------------------------------------------------------------------*/
@@ -0,0 +1,4 @@
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
+ *-------------------------------------------------------------------------------------------*/
@@ -0,0 +1,9 @@
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
+ /**
6
+ * Generated bundle index. Do not edit.
7
+ */
8
+ export * from './main';
9
+ export { BaseComponent } from './base.component';
@@ -0,0 +1,9 @@
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
+ 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';
@@ -0,0 +1,15 @@
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
+ /**
6
+ * @hidden
7
+ */
8
+ export var packageMetadata = {
9
+ name: '@progress/kendo-angular-barcodes',
10
+ productName: 'Kendo UI for Angular',
11
+ productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
12
+ publishDate: 1638370938,
13
+ version: '',
14
+ 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'
15
+ };
@@ -0,0 +1,137 @@
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
+ import * as tslib_1 from "tslib";
6
+ import { ChangeDetectionStrategy, Component, ElementRef, Input, NgZone, Renderer2 } from '@angular/core';
7
+ import { QRCode } from '@progress/kendo-charts';
8
+ import { BaseComponent } from './base.component';
9
+ var DEFAULT_COLOR = '#000';
10
+ var DEFAULT_BACKGROUND = '#fff';
11
+ var DEFAULT_ERROR_CORRECTION = 'L';
12
+ /**
13
+ * Represents the Kendo UI QR Code 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-qrcode value="https://www.telerik.com/kendo-angular-ui">
23
+ * </kendo-qrcode>
24
+ * `
25
+ * })
26
+ * export class AppComponent {
27
+ * }
28
+ * ```
29
+ */
30
+ var QRCodeComponent = /** @class */ (function (_super) {
31
+ tslib_1.__extends(QRCodeComponent, _super);
32
+ function QRCodeComponent(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 QR Code. 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-qrcode value="https://www.telerik.com/kendo-angular-ui"
48
+ * [resizeRateLimit]="2">
49
+ * </kendo-qrcode>
50
+ * `
51
+ * })
52
+ * export class AppComponent {
53
+ * }
54
+ * ```
55
+ */
56
+ _this.resizeRateLimit = 10;
57
+ return _this;
58
+ }
59
+ Object.defineProperty(QRCodeComponent.prototype, "options", {
60
+ get: function () {
61
+ return {
62
+ background: this.background || DEFAULT_BACKGROUND,
63
+ border: this.border,
64
+ color: this.color || DEFAULT_COLOR,
65
+ encoding: this.encoding,
66
+ errorCorrection: this.errorCorrection || DEFAULT_ERROR_CORRECTION,
67
+ overlay: this.overlay || {},
68
+ padding: this.padding,
69
+ renderAs: this.renderAs,
70
+ size: this.size,
71
+ value: this.value
72
+ };
73
+ },
74
+ enumerable: true,
75
+ configurable: true
76
+ });
77
+ QRCodeComponent.prototype.createInstance = function (element, options) {
78
+ return new QRCode(element, options);
79
+ };
80
+ tslib_1.__decorate([
81
+ Input(),
82
+ tslib_1.__metadata("design:type", String)
83
+ ], QRCodeComponent.prototype, "background", void 0);
84
+ tslib_1.__decorate([
85
+ Input(),
86
+ tslib_1.__metadata("design:type", Object)
87
+ ], QRCodeComponent.prototype, "border", void 0);
88
+ tslib_1.__decorate([
89
+ Input(),
90
+ tslib_1.__metadata("design:type", String)
91
+ ], QRCodeComponent.prototype, "color", void 0);
92
+ tslib_1.__decorate([
93
+ Input(),
94
+ tslib_1.__metadata("design:type", String)
95
+ ], QRCodeComponent.prototype, "encoding", void 0);
96
+ tslib_1.__decorate([
97
+ Input(),
98
+ tslib_1.__metadata("design:type", String)
99
+ ], QRCodeComponent.prototype, "errorCorrection", void 0);
100
+ tslib_1.__decorate([
101
+ Input(),
102
+ tslib_1.__metadata("design:type", Object)
103
+ ], QRCodeComponent.prototype, "overlay", void 0);
104
+ tslib_1.__decorate([
105
+ Input(),
106
+ tslib_1.__metadata("design:type", Number)
107
+ ], QRCodeComponent.prototype, "padding", void 0);
108
+ tslib_1.__decorate([
109
+ Input(),
110
+ tslib_1.__metadata("design:type", String)
111
+ ], QRCodeComponent.prototype, "renderAs", void 0);
112
+ tslib_1.__decorate([
113
+ Input(),
114
+ tslib_1.__metadata("design:type", Object)
115
+ ], QRCodeComponent.prototype, "size", void 0);
116
+ tslib_1.__decorate([
117
+ Input(),
118
+ tslib_1.__metadata("design:type", Object)
119
+ ], QRCodeComponent.prototype, "value", void 0);
120
+ tslib_1.__decorate([
121
+ Input(),
122
+ tslib_1.__metadata("design:type", Number)
123
+ ], QRCodeComponent.prototype, "resizeRateLimit", void 0);
124
+ QRCodeComponent = tslib_1.__decorate([
125
+ Component({
126
+ changeDetection: ChangeDetectionStrategy.OnPush,
127
+ selector: 'kendo-qrcode',
128
+ exportAs: 'kendoQRCode',
129
+ template: "\n <kendo-resize-sensor (resize)=\"onResize()\" [rateLimit]=\"resizeRateLimit\"></kendo-resize-sensor>\n "
130
+ }),
131
+ tslib_1.__metadata("design:paramtypes", [ElementRef,
132
+ Renderer2,
133
+ NgZone])
134
+ ], QRCodeComponent);
135
+ return QRCodeComponent;
136
+ }(BaseComponent));
137
+ export { QRCodeComponent };
@@ -0,0 +1,52 @@
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
+ import * as tslib_1 from "tslib";
6
+ import { NgModule } from '@angular/core';
7
+ import { ResizeSensorModule } from '@progress/kendo-angular-common';
8
+ import { QRCodeComponent } from './qrcode.component';
9
+ /**
10
+ * Represents the [NgModule]({{ site.data.urls.angular['ngmoduleapi'] }})
11
+ * definition for the QR Code component.
12
+ *
13
+ * @example
14
+ *
15
+ * ```ts-no-run
16
+ * // Import the QR Code module
17
+ * import { QRCodeModule } from '@progress/kendo-angular-barcodes';
18
+ *
19
+ * // The browser platform with a compiler
20
+ * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
21
+ *
22
+ * import { NgModule } from '@angular/core';
23
+ *
24
+ * // Import the app component
25
+ * import { AppComponent } from './app.component';
26
+ *
27
+ * // Define the app module
28
+ * _@NgModule({
29
+ * declarations: [AppComponent], // declare app component
30
+ * imports: [BrowserModule, QRCodeModule], // import QRCodeModule module
31
+ * bootstrap: [AppComponent]
32
+ * })
33
+ * export class AppModule {}
34
+ *
35
+ * // Compile and launch the module
36
+ * platformBrowserDynamic().bootstrapModule(AppModule);
37
+ *
38
+ * ```
39
+ */
40
+ var QRCodeModule = /** @class */ (function () {
41
+ function QRCodeModule() {
42
+ }
43
+ QRCodeModule = tslib_1.__decorate([
44
+ NgModule({
45
+ declarations: [QRCodeComponent],
46
+ imports: [ResizeSensorModule],
47
+ exports: [QRCodeComponent]
48
+ })
49
+ ], QRCodeModule);
50
+ return QRCodeModule;
51
+ }());
52
+ export { QRCodeModule };