@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,522 @@
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 { __decorate, __metadata, __extends } from 'tslib';
6
+ import { Input, ViewChild, ElementRef, Component, ChangeDetectionStrategy, Renderer2, NgZone, NgModule } from '@angular/core';
7
+ import { Barcode, QRCode } from '@progress/kendo-charts';
8
+ import { isDocumentAvailable, ResizeSensorModule } from '@progress/kendo-angular-common';
9
+ import { exportImage, exportSVG } from '@progress/kendo-drawing';
10
+ import { validatePackage } from '@progress/kendo-licensing';
11
+
12
+ /**
13
+ * @hidden
14
+ */
15
+ var packageMetadata = {
16
+ name: '@progress/kendo-angular-barcodes',
17
+ productName: 'Kendo UI for Angular',
18
+ productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
19
+ publishDate: 1638370938,
20
+ version: '',
21
+ 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'
22
+ };
23
+
24
+ /**
25
+ * @hidden
26
+ */
27
+ var BaseComponent = /** @class */ (function () {
28
+ function BaseComponent(element, renderer, ngZone) {
29
+ this.element = element;
30
+ this.renderer = renderer;
31
+ this.ngZone = ngZone;
32
+ this.resizeRateLimit = 10;
33
+ validatePackage(packageMetadata);
34
+ }
35
+ Object.defineProperty(BaseComponent.prototype, "autoResize", {
36
+ get: function () {
37
+ return this.resizeRateLimit > 0;
38
+ },
39
+ enumerable: true,
40
+ configurable: true
41
+ });
42
+ Object.defineProperty(BaseComponent.prototype, "canRender", {
43
+ get: function () {
44
+ return isDocumentAvailable() && Boolean(this.element);
45
+ },
46
+ enumerable: true,
47
+ configurable: true
48
+ });
49
+ BaseComponent.prototype.ngAfterViewInit = function () {
50
+ this.refresh();
51
+ };
52
+ BaseComponent.prototype.ngOnChanges = function (changes) {
53
+ // Need to create a new instance if the rendering mode changes.
54
+ if (changes['renderAs'] && this.instance) {
55
+ this.instance.destroy();
56
+ this.instance = null;
57
+ }
58
+ this.refresh();
59
+ };
60
+ /**
61
+ * Detects the size of the container and redraws the component.
62
+ * Resizing is automatic unless you set the `resizeRateLimit` option to `0`.
63
+ */
64
+ BaseComponent.prototype.resize = function () {
65
+ if (this.instance) {
66
+ this.instance.redraw();
67
+ }
68
+ };
69
+ /**
70
+ * @hidden
71
+ */
72
+ BaseComponent.prototype.onResize = function () {
73
+ if (this.autoResize) {
74
+ this.resize();
75
+ }
76
+ };
77
+ /**
78
+ * Exports the component as an image. The export operation is asynchronous and returns a promise.
79
+ *
80
+ * @param {ImageExportOptions} options - The parameters for the exported image.
81
+ * @returns {Promise<string>} - A promise that will be resolved with a PNG image encoded as a Data URI.
82
+ */
83
+ BaseComponent.prototype.exportImage = function (options) {
84
+ if (options === void 0) { options = {}; }
85
+ return exportImage(this.exportVisual(), options);
86
+ };
87
+ /**
88
+ * Exports the component as an SVG document. The export operation is asynchronous and returns a promise.
89
+ *
90
+ * @param options - The parameters for the exported file.
91
+ * @returns - A promise that will be resolved with an SVG document that is encoded as a Data URI.
92
+ */
93
+ BaseComponent.prototype.exportSVG = function (options) {
94
+ if (options === void 0) { options = {}; }
95
+ return exportSVG(this.exportVisual(), options);
96
+ };
97
+ /**
98
+ * Exports the component as a Drawing Group.
99
+ *
100
+ * @returns - The exported Group.
101
+ */
102
+ BaseComponent.prototype.exportVisual = function () {
103
+ return this.instance.exportVisual();
104
+ };
105
+ BaseComponent.prototype.refresh = function () {
106
+ if (!this.canRender) {
107
+ return;
108
+ }
109
+ if (!this.instance) {
110
+ var element = this.element.nativeElement;
111
+ this.instance = this.createInstance(element, this.options);
112
+ }
113
+ else {
114
+ this.instance.setOptions(this.options);
115
+ }
116
+ };
117
+ __decorate([
118
+ Input(),
119
+ __metadata("design:type", Number)
120
+ ], BaseComponent.prototype, "resizeRateLimit", void 0);
121
+ __decorate([
122
+ ViewChild('surface', { static: true }),
123
+ __metadata("design:type", ElementRef)
124
+ ], BaseComponent.prototype, "surfaceElement", void 0);
125
+ return BaseComponent;
126
+ }());
127
+
128
+ /**
129
+ * Represents the Kendo UI Barcode component for Angular.
130
+ *
131
+ * @example
132
+ * ```ts
133
+ * import { Component } from '@angular/core';
134
+ *
135
+ * _@Component({
136
+ * selector: 'my-app',
137
+ * template: `
138
+ * <kendo-barcode type="EAN8" value="1234567">
139
+ * </kendo-barcode>
140
+ * `
141
+ * })
142
+ * export class AppComponent {
143
+ * }
144
+ * ```
145
+ */
146
+ var BarcodeComponent = /** @class */ (function (_super) {
147
+ __extends(BarcodeComponent, _super);
148
+ function BarcodeComponent(element, renderer, ngZone) {
149
+ var _this = _super.call(this, element, renderer, ngZone) || this;
150
+ _this.element = element;
151
+ _this.renderer = renderer;
152
+ _this.ngZone = ngZone;
153
+ /**
154
+ * Limits the automatic resizing of the Barcode. Sets the maximum number of times per second
155
+ * that the component redraws its content when the size of its container changes.
156
+ * Defaults to `10`. To disable the automatic resizing, set it to `0`.
157
+ *
158
+ * @example
159
+ * ```ts
160
+ * _@Component({
161
+ * selector: 'my-app',
162
+ * template: `
163
+ * <kendo-barcode type="EAN8" [value]="1234567"
164
+ * [resizeRateLimit]="2">
165
+ * </kendo-barcode>
166
+ * `
167
+ * })
168
+ * export class AppComponent {
169
+ * }
170
+ * ```
171
+ */
172
+ _this.resizeRateLimit = 10;
173
+ return _this;
174
+ }
175
+ Object.defineProperty(BarcodeComponent.prototype, "options", {
176
+ get: function () {
177
+ return {
178
+ renderAs: this.renderAs,
179
+ background: this.background,
180
+ border: this.border,
181
+ checksum: this.checksum,
182
+ color: this.color,
183
+ height: this.height,
184
+ padding: this.padding,
185
+ text: this.text,
186
+ type: this.type,
187
+ value: this.value,
188
+ width: this.width
189
+ };
190
+ },
191
+ enumerable: true,
192
+ configurable: true
193
+ });
194
+ BarcodeComponent.prototype.createInstance = function (element, options) {
195
+ return new Barcode(element, options);
196
+ };
197
+ __decorate([
198
+ Input(),
199
+ __metadata("design:type", String)
200
+ ], BarcodeComponent.prototype, "background", void 0);
201
+ __decorate([
202
+ Input(),
203
+ __metadata("design:type", Object)
204
+ ], BarcodeComponent.prototype, "border", void 0);
205
+ __decorate([
206
+ Input(),
207
+ __metadata("design:type", Boolean)
208
+ ], BarcodeComponent.prototype, "checksum", void 0);
209
+ __decorate([
210
+ Input(),
211
+ __metadata("design:type", String)
212
+ ], BarcodeComponent.prototype, "color", void 0);
213
+ __decorate([
214
+ Input(),
215
+ __metadata("design:type", Number)
216
+ ], BarcodeComponent.prototype, "height", void 0);
217
+ __decorate([
218
+ Input(),
219
+ __metadata("design:type", Object)
220
+ ], BarcodeComponent.prototype, "padding", void 0);
221
+ __decorate([
222
+ Input(),
223
+ __metadata("design:type", String)
224
+ ], BarcodeComponent.prototype, "renderAs", void 0);
225
+ __decorate([
226
+ Input(),
227
+ __metadata("design:type", Object)
228
+ ], BarcodeComponent.prototype, "text", void 0);
229
+ __decorate([
230
+ Input(),
231
+ __metadata("design:type", String)
232
+ ], BarcodeComponent.prototype, "type", void 0);
233
+ __decorate([
234
+ Input(),
235
+ __metadata("design:type", Object)
236
+ ], BarcodeComponent.prototype, "value", void 0);
237
+ __decorate([
238
+ Input(),
239
+ __metadata("design:type", Number)
240
+ ], BarcodeComponent.prototype, "width", void 0);
241
+ __decorate([
242
+ Input(),
243
+ __metadata("design:type", Number)
244
+ ], BarcodeComponent.prototype, "resizeRateLimit", void 0);
245
+ BarcodeComponent = __decorate([
246
+ Component({
247
+ changeDetection: ChangeDetectionStrategy.OnPush,
248
+ exportAs: 'kendoBarcode',
249
+ selector: 'kendo-barcode',
250
+ template: "\n <kendo-resize-sensor (resize)=\"onResize()\" [rateLimit]=\"resizeRateLimit\"></kendo-resize-sensor>\n "
251
+ }),
252
+ __metadata("design:paramtypes", [ElementRef,
253
+ Renderer2,
254
+ NgZone])
255
+ ], BarcodeComponent);
256
+ return BarcodeComponent;
257
+ }(BaseComponent));
258
+
259
+ var DEFAULT_COLOR = '#000';
260
+ var DEFAULT_BACKGROUND = '#fff';
261
+ var DEFAULT_ERROR_CORRECTION = 'L';
262
+ /**
263
+ * Represents the Kendo UI QR Code component for Angular.
264
+ *
265
+ * @example
266
+ * ```ts
267
+ * import { Component } from '@angular/core';
268
+ *
269
+ * _@Component({
270
+ * selector: 'my-app',
271
+ * template: `
272
+ * <kendo-qrcode value="https://www.telerik.com/kendo-angular-ui">
273
+ * </kendo-qrcode>
274
+ * `
275
+ * })
276
+ * export class AppComponent {
277
+ * }
278
+ * ```
279
+ */
280
+ var QRCodeComponent = /** @class */ (function (_super) {
281
+ __extends(QRCodeComponent, _super);
282
+ function QRCodeComponent(element, renderer, ngZone) {
283
+ var _this = _super.call(this, element, renderer, ngZone) || this;
284
+ _this.element = element;
285
+ _this.renderer = renderer;
286
+ _this.ngZone = ngZone;
287
+ /**
288
+ * Limits the automatic resizing of the QR Code. Sets the maximum number of times per second
289
+ * that the component redraws its content when the size of its container changes.
290
+ * Defaults to `10`. To disable the automatic resizing, set it to `0`.
291
+ *
292
+ * @example
293
+ * ```ts
294
+ * _@Component({
295
+ * selector: 'my-app',
296
+ * template: `
297
+ * <kendo-qrcode value="https://www.telerik.com/kendo-angular-ui"
298
+ * [resizeRateLimit]="2">
299
+ * </kendo-qrcode>
300
+ * `
301
+ * })
302
+ * export class AppComponent {
303
+ * }
304
+ * ```
305
+ */
306
+ _this.resizeRateLimit = 10;
307
+ return _this;
308
+ }
309
+ Object.defineProperty(QRCodeComponent.prototype, "options", {
310
+ get: function () {
311
+ return {
312
+ background: this.background || DEFAULT_BACKGROUND,
313
+ border: this.border,
314
+ color: this.color || DEFAULT_COLOR,
315
+ encoding: this.encoding,
316
+ errorCorrection: this.errorCorrection || DEFAULT_ERROR_CORRECTION,
317
+ overlay: this.overlay || {},
318
+ padding: this.padding,
319
+ renderAs: this.renderAs,
320
+ size: this.size,
321
+ value: this.value
322
+ };
323
+ },
324
+ enumerable: true,
325
+ configurable: true
326
+ });
327
+ QRCodeComponent.prototype.createInstance = function (element, options) {
328
+ return new QRCode(element, options);
329
+ };
330
+ __decorate([
331
+ Input(),
332
+ __metadata("design:type", String)
333
+ ], QRCodeComponent.prototype, "background", void 0);
334
+ __decorate([
335
+ Input(),
336
+ __metadata("design:type", Object)
337
+ ], QRCodeComponent.prototype, "border", void 0);
338
+ __decorate([
339
+ Input(),
340
+ __metadata("design:type", String)
341
+ ], QRCodeComponent.prototype, "color", void 0);
342
+ __decorate([
343
+ Input(),
344
+ __metadata("design:type", String)
345
+ ], QRCodeComponent.prototype, "encoding", void 0);
346
+ __decorate([
347
+ Input(),
348
+ __metadata("design:type", String)
349
+ ], QRCodeComponent.prototype, "errorCorrection", void 0);
350
+ __decorate([
351
+ Input(),
352
+ __metadata("design:type", Object)
353
+ ], QRCodeComponent.prototype, "overlay", void 0);
354
+ __decorate([
355
+ Input(),
356
+ __metadata("design:type", Number)
357
+ ], QRCodeComponent.prototype, "padding", void 0);
358
+ __decorate([
359
+ Input(),
360
+ __metadata("design:type", String)
361
+ ], QRCodeComponent.prototype, "renderAs", void 0);
362
+ __decorate([
363
+ Input(),
364
+ __metadata("design:type", Object)
365
+ ], QRCodeComponent.prototype, "size", void 0);
366
+ __decorate([
367
+ Input(),
368
+ __metadata("design:type", Object)
369
+ ], QRCodeComponent.prototype, "value", void 0);
370
+ __decorate([
371
+ Input(),
372
+ __metadata("design:type", Number)
373
+ ], QRCodeComponent.prototype, "resizeRateLimit", void 0);
374
+ QRCodeComponent = __decorate([
375
+ Component({
376
+ changeDetection: ChangeDetectionStrategy.OnPush,
377
+ selector: 'kendo-qrcode',
378
+ exportAs: 'kendoQRCode',
379
+ template: "\n <kendo-resize-sensor (resize)=\"onResize()\" [rateLimit]=\"resizeRateLimit\"></kendo-resize-sensor>\n "
380
+ }),
381
+ __metadata("design:paramtypes", [ElementRef,
382
+ Renderer2,
383
+ NgZone])
384
+ ], QRCodeComponent);
385
+ return QRCodeComponent;
386
+ }(BaseComponent));
387
+
388
+ /**
389
+ * Represents the [NgModule]({{ site.data.urls.angular['ngmoduleapi'] }})
390
+ * definition for the Barcode component.
391
+ *
392
+ * @example
393
+ *
394
+ * ```ts-no-run
395
+ * // Import the Barcode module
396
+ * import { BarcodeModule } from '@progress/kendo-angular-barcodes';
397
+ *
398
+ * // The browser platform with a compiler
399
+ * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
400
+ *
401
+ * import { NgModule } from '@angular/core';
402
+ *
403
+ * // Import the app component
404
+ * import { AppComponent } from './app.component';
405
+ *
406
+ * // Define the app module
407
+ * _@NgModule({
408
+ * declarations: [AppComponent], // declare app component
409
+ * imports: [BrowserModule, BarcodeModule], // import Barcode module
410
+ * bootstrap: [AppComponent]
411
+ * })
412
+ * export class AppModule {}
413
+ *
414
+ * // Compile and launch the module
415
+ * platformBrowserDynamic().bootstrapModule(AppModule);
416
+ *
417
+ * ```
418
+ */
419
+ var BarcodeModule = /** @class */ (function () {
420
+ function BarcodeModule() {
421
+ }
422
+ BarcodeModule = __decorate([
423
+ NgModule({
424
+ declarations: [BarcodeComponent],
425
+ imports: [ResizeSensorModule],
426
+ exports: [BarcodeComponent]
427
+ })
428
+ ], BarcodeModule);
429
+ return BarcodeModule;
430
+ }());
431
+
432
+ /**
433
+ * Represents the [NgModule]({{ site.data.urls.angular['ngmoduleapi'] }})
434
+ * definition for the QR Code component.
435
+ *
436
+ * @example
437
+ *
438
+ * ```ts-no-run
439
+ * // Import the QR Code module
440
+ * import { QRCodeModule } from '@progress/kendo-angular-barcodes';
441
+ *
442
+ * // The browser platform with a compiler
443
+ * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
444
+ *
445
+ * import { NgModule } from '@angular/core';
446
+ *
447
+ * // Import the app component
448
+ * import { AppComponent } from './app.component';
449
+ *
450
+ * // Define the app module
451
+ * _@NgModule({
452
+ * declarations: [AppComponent], // declare app component
453
+ * imports: [BrowserModule, QRCodeModule], // import QRCodeModule module
454
+ * bootstrap: [AppComponent]
455
+ * })
456
+ * export class AppModule {}
457
+ *
458
+ * // Compile and launch the module
459
+ * platformBrowserDynamic().bootstrapModule(AppModule);
460
+ *
461
+ * ```
462
+ */
463
+ var QRCodeModule = /** @class */ (function () {
464
+ function QRCodeModule() {
465
+ }
466
+ QRCodeModule = __decorate([
467
+ NgModule({
468
+ declarations: [QRCodeComponent],
469
+ imports: [ResizeSensorModule],
470
+ exports: [QRCodeComponent]
471
+ })
472
+ ], QRCodeModule);
473
+ return QRCodeModule;
474
+ }());
475
+
476
+ /**
477
+ * Represents the [NgModule]({{ site.data.urls.angular['ngmoduleapi'] }})
478
+ * definition for the Barcode and QR Code components.
479
+ *
480
+ * @example
481
+ *
482
+ * ```ts-no-run
483
+ * // Import the Barcodes module
484
+ * import { BarcodesModule } from '@progress/kendo-angular-barcodes';
485
+ *
486
+ * // The browser platform with a compiler
487
+ * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
488
+ *
489
+ * import { NgModule } from '@angular/core';
490
+ *
491
+ * // Import the app component
492
+ * import { AppComponent } from './app.component';
493
+ *
494
+ * // Define the app module
495
+ * _@NgModule({
496
+ * declarations: [AppComponent], // declare app component
497
+ * imports: [BrowserModule, BarcodesModule], // import Barcodes module
498
+ * bootstrap: [AppComponent]
499
+ * })
500
+ * export class AppModule {}
501
+ *
502
+ * // Compile and launch the module
503
+ * platformBrowserDynamic().bootstrapModule(AppModule);
504
+ *
505
+ * ```
506
+ */
507
+ var BarcodesModule = /** @class */ (function () {
508
+ function BarcodesModule() {
509
+ }
510
+ BarcodesModule = __decorate([
511
+ NgModule({
512
+ exports: [BarcodeModule, QRCodeModule]
513
+ })
514
+ ], BarcodesModule);
515
+ return BarcodesModule;
516
+ }());
517
+
518
+ /**
519
+ * Generated bundle index. Do not edit.
520
+ */
521
+
522
+ export { BaseComponent, BarcodeComponent, QRCodeComponent, BarcodeModule, QRCodeModule, BarcodesModule };
@@ -0,0 +1,141 @@
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
+ /**
12
+ * Represents the Kendo UI Barcode component for Angular.
13
+ *
14
+ * @example
15
+ * ```ts
16
+ * import { Component } from '@angular/core';
17
+ *
18
+ * _@Component({
19
+ * selector: 'my-app',
20
+ * template: `
21
+ * <kendo-barcode type="EAN8" value="1234567">
22
+ * </kendo-barcode>
23
+ * `
24
+ * })
25
+ * export class AppComponent {
26
+ * }
27
+ * ```
28
+ */
29
+ var BarcodeComponent = /** @class */ (function (_super) {
30
+ tslib_1.__extends(BarcodeComponent, _super);
31
+ function BarcodeComponent(element, renderer, ngZone) {
32
+ var _this = _super.call(this, element, renderer, ngZone) || this;
33
+ _this.element = element;
34
+ _this.renderer = renderer;
35
+ _this.ngZone = ngZone;
36
+ /**
37
+ * Limits the automatic resizing of the Barcode. Sets the maximum number of times per second
38
+ * that the component redraws its content when the size of its container changes.
39
+ * Defaults to `10`. To disable the automatic resizing, set it to `0`.
40
+ *
41
+ * @example
42
+ * ```ts
43
+ * _@Component({
44
+ * selector: 'my-app',
45
+ * template: `
46
+ * <kendo-barcode type="EAN8" [value]="1234567"
47
+ * [resizeRateLimit]="2">
48
+ * </kendo-barcode>
49
+ * `
50
+ * })
51
+ * export class AppComponent {
52
+ * }
53
+ * ```
54
+ */
55
+ _this.resizeRateLimit = 10;
56
+ return _this;
57
+ }
58
+ Object.defineProperty(BarcodeComponent.prototype, "options", {
59
+ get: function () {
60
+ return {
61
+ renderAs: this.renderAs,
62
+ background: this.background,
63
+ border: this.border,
64
+ checksum: this.checksum,
65
+ color: this.color,
66
+ height: this.height,
67
+ padding: this.padding,
68
+ text: this.text,
69
+ type: this.type,
70
+ value: this.value,
71
+ width: this.width
72
+ };
73
+ },
74
+ enumerable: true,
75
+ configurable: true
76
+ });
77
+ BarcodeComponent.prototype.createInstance = function (element, options) {
78
+ return new kendo_charts_1.Barcode(element, options);
79
+ };
80
+ tslib_1.__decorate([
81
+ core_1.Input(),
82
+ tslib_1.__metadata("design:type", String)
83
+ ], BarcodeComponent.prototype, "background", void 0);
84
+ tslib_1.__decorate([
85
+ core_1.Input(),
86
+ tslib_1.__metadata("design:type", Object)
87
+ ], BarcodeComponent.prototype, "border", void 0);
88
+ tslib_1.__decorate([
89
+ core_1.Input(),
90
+ tslib_1.__metadata("design:type", Boolean)
91
+ ], BarcodeComponent.prototype, "checksum", void 0);
92
+ tslib_1.__decorate([
93
+ core_1.Input(),
94
+ tslib_1.__metadata("design:type", String)
95
+ ], BarcodeComponent.prototype, "color", void 0);
96
+ tslib_1.__decorate([
97
+ core_1.Input(),
98
+ tslib_1.__metadata("design:type", Number)
99
+ ], BarcodeComponent.prototype, "height", void 0);
100
+ tslib_1.__decorate([
101
+ core_1.Input(),
102
+ tslib_1.__metadata("design:type", Object)
103
+ ], BarcodeComponent.prototype, "padding", void 0);
104
+ tslib_1.__decorate([
105
+ core_1.Input(),
106
+ tslib_1.__metadata("design:type", String)
107
+ ], BarcodeComponent.prototype, "renderAs", void 0);
108
+ tslib_1.__decorate([
109
+ core_1.Input(),
110
+ tslib_1.__metadata("design:type", Object)
111
+ ], BarcodeComponent.prototype, "text", void 0);
112
+ tslib_1.__decorate([
113
+ core_1.Input(),
114
+ tslib_1.__metadata("design:type", String)
115
+ ], BarcodeComponent.prototype, "type", void 0);
116
+ tslib_1.__decorate([
117
+ core_1.Input(),
118
+ tslib_1.__metadata("design:type", Object)
119
+ ], BarcodeComponent.prototype, "value", void 0);
120
+ tslib_1.__decorate([
121
+ core_1.Input(),
122
+ tslib_1.__metadata("design:type", Number)
123
+ ], BarcodeComponent.prototype, "width", void 0);
124
+ tslib_1.__decorate([
125
+ core_1.Input(),
126
+ tslib_1.__metadata("design:type", Number)
127
+ ], BarcodeComponent.prototype, "resizeRateLimit", void 0);
128
+ BarcodeComponent = tslib_1.__decorate([
129
+ core_1.Component({
130
+ changeDetection: core_1.ChangeDetectionStrategy.OnPush,
131
+ exportAs: 'kendoBarcode',
132
+ selector: 'kendo-barcode',
133
+ template: "\n <kendo-resize-sensor (resize)=\"onResize()\" [rateLimit]=\"resizeRateLimit\"></kendo-resize-sensor>\n "
134
+ }),
135
+ tslib_1.__metadata("design:paramtypes", [core_1.ElementRef,
136
+ core_1.Renderer2,
137
+ core_1.NgZone])
138
+ ], BarcodeComponent);
139
+ return BarcodeComponent;
140
+ }(base_component_1.BaseComponent));
141
+ exports.BarcodeComponent = BarcodeComponent;