@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.
- package/LICENSE.md +11 -0
- package/NOTICE.txt +614 -0
- package/README.md +31 -0
- package/dist/cdn/js/kendo-angular-barcodes.js +20 -0
- package/dist/cdn/main.js +5 -0
- package/dist/es/barcode.component.js +139 -0
- package/dist/es/barcode.module.js +52 -0
- package/dist/es/barcodes.module.js +50 -0
- package/dist/es/base.component.js +114 -0
- package/dist/es/chart-types/barcode-types.js +4 -0
- package/dist/es/chart-types/field-types.js +4 -0
- package/dist/es/chart-types/qrcode-types.js +4 -0
- package/dist/es/chart-types.js +4 -0
- package/dist/es/index.js +9 -0
- package/dist/es/main.js +9 -0
- package/dist/es/package-metadata.js +15 -0
- package/dist/es/qrcode.component.js +137 -0
- package/dist/es/qrcode.module.js +52 -0
- package/dist/es2015/barcode.component.d.ts +311 -0
- package/dist/es2015/barcode.component.js +134 -0
- package/dist/es2015/barcode.module.d.ts +37 -0
- package/dist/es2015/barcode.module.js +49 -0
- package/dist/es2015/barcodes.module.d.ts +37 -0
- package/dist/es2015/barcodes.module.js +47 -0
- package/dist/es2015/base.component.d.ts +54 -0
- package/dist/es2015/base.component.js +102 -0
- package/dist/es2015/chart-types/barcode-types.d.ts +109 -0
- package/dist/es2015/chart-types/barcode-types.js +4 -0
- package/dist/es2015/chart-types/field-types.d.ts +59 -0
- package/dist/es2015/chart-types/field-types.js +4 -0
- package/dist/es2015/chart-types/qrcode-types.d.ts +124 -0
- package/dist/es2015/chart-types/qrcode-types.js +4 -0
- package/dist/es2015/chart-types.d.ts +7 -0
- package/dist/es2015/chart-types.js +4 -0
- package/dist/es2015/index.d.ts +9 -0
- package/dist/es2015/index.js +9 -0
- package/dist/es2015/index.metadata.json +1 -0
- package/dist/es2015/main.d.ts +10 -0
- package/dist/es2015/main.js +9 -0
- package/dist/es2015/package-metadata.d.ts +9 -0
- package/dist/es2015/package-metadata.js +15 -0
- package/dist/es2015/qrcode.component.d.ts +288 -0
- package/dist/es2015/qrcode.component.js +132 -0
- package/dist/es2015/qrcode.module.d.ts +37 -0
- package/dist/es2015/qrcode.module.js +49 -0
- package/dist/fesm2015/index.js +492 -0
- package/dist/fesm5/index.js +522 -0
- package/dist/npm/barcode.component.js +141 -0
- package/dist/npm/barcode.module.js +54 -0
- package/dist/npm/barcodes.module.js +52 -0
- package/dist/npm/base.component.js +116 -0
- package/dist/npm/chart-types/barcode-types.js +6 -0
- package/dist/npm/chart-types/field-types.js +6 -0
- package/dist/npm/chart-types/qrcode-types.js +6 -0
- package/dist/npm/chart-types.js +6 -0
- package/dist/npm/index.js +13 -0
- package/dist/npm/main.js +16 -0
- package/dist/npm/package-metadata.js +17 -0
- package/dist/npm/qrcode.component.js +139 -0
- package/dist/npm/qrcode.module.js +54 -0
- package/dist/systemjs/kendo-angular-barcodes.js +5 -0
- package/package.json +154 -0
- package/schematics/collection.json +12 -0
- package/schematics/ngAdd/index.js +18 -0
- package/schematics/ngAdd/index.js.map +1 -0
- package/schematics/ngAdd/schema.json +28 -0
|
@@ -0,0 +1,311 @@
|
|
|
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 { ElementRef, NgZone, Renderer2 } from '@angular/core';
|
|
6
|
+
import { Barcode, BarcodeOptions } from '@progress/kendo-charts';
|
|
7
|
+
import { BaseComponent } from './base.component';
|
|
8
|
+
import { BarcodeText, BarcodeType, Border, Padding, RenderMode } from './chart-types';
|
|
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
|
+
export declare class BarcodeComponent extends BaseComponent {
|
|
28
|
+
protected element: ElementRef;
|
|
29
|
+
protected renderer: Renderer2;
|
|
30
|
+
protected ngZone: NgZone;
|
|
31
|
+
/**
|
|
32
|
+
* The background color of the Barcode. Accepts a valid CSS color string, including hex and rgb.
|
|
33
|
+
*
|
|
34
|
+
* @default "white"
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```ts-preview
|
|
38
|
+
* import { Component } from '@angular/core';
|
|
39
|
+
*
|
|
40
|
+
* _@Component({
|
|
41
|
+
* selector: 'my-app',
|
|
42
|
+
* template: `
|
|
43
|
+
* <kendo-barcode type="EAN8" value="1234567"
|
|
44
|
+
* background="#fc0">
|
|
45
|
+
* </kendo-barcode>
|
|
46
|
+
* `
|
|
47
|
+
* })
|
|
48
|
+
* export class AppComponent {
|
|
49
|
+
* }
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
background?: string;
|
|
53
|
+
/**
|
|
54
|
+
* The border of the Barcode.
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```ts-preview
|
|
58
|
+
* import { Component } from '@angular/core';
|
|
59
|
+
* import { Border } from '@progress/kendo-angular-barcodes';
|
|
60
|
+
*
|
|
61
|
+
* _@Component({
|
|
62
|
+
* selector: 'my-app',
|
|
63
|
+
* template: `
|
|
64
|
+
* <kendo-barcode type="EAN8" value="1234567"
|
|
65
|
+
* [border]="barcodeBorder" [padding]="5">
|
|
66
|
+
* </kendo-barcode>
|
|
67
|
+
* `
|
|
68
|
+
* })
|
|
69
|
+
* export class AppComponent {
|
|
70
|
+
* barcodeBorder: Border = {
|
|
71
|
+
* color: '#fc0',
|
|
72
|
+
* width: 2
|
|
73
|
+
* };
|
|
74
|
+
* }
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
77
|
+
border?: Border;
|
|
78
|
+
/**
|
|
79
|
+
* If set to `true`, the Barcode will display the checksum digit next to the value in the text area.
|
|
80
|
+
*
|
|
81
|
+
* @default false
|
|
82
|
+
*
|
|
83
|
+
* @example
|
|
84
|
+
* ```ts-preview
|
|
85
|
+
* _@Component({
|
|
86
|
+
* selector: 'my-app',
|
|
87
|
+
* template: `
|
|
88
|
+
* <kendo-barcode type="EAN8" value="1234567"
|
|
89
|
+
* [checksum]="true">
|
|
90
|
+
* </kendo-barcode>
|
|
91
|
+
* `
|
|
92
|
+
* })
|
|
93
|
+
* export class AppComponent {
|
|
94
|
+
* }
|
|
95
|
+
* ```
|
|
96
|
+
*/
|
|
97
|
+
checksum?: boolean;
|
|
98
|
+
/**
|
|
99
|
+
* The color of the Barcode. Accepts a valid CSS color string, including hex and rgb.
|
|
100
|
+
*
|
|
101
|
+
* @default "black"
|
|
102
|
+
*
|
|
103
|
+
* @example
|
|
104
|
+
* ```ts-preview
|
|
105
|
+
* _@Component({
|
|
106
|
+
* selector: 'my-app',
|
|
107
|
+
* template: `
|
|
108
|
+
* <kendo-barcode type="EAN8" value="1234567"
|
|
109
|
+
* color="#fc0">
|
|
110
|
+
* </kendo-barcode>
|
|
111
|
+
* `
|
|
112
|
+
* })
|
|
113
|
+
* export class AppComponent {
|
|
114
|
+
* }
|
|
115
|
+
* ```
|
|
116
|
+
*/
|
|
117
|
+
color?: string;
|
|
118
|
+
/**
|
|
119
|
+
* The height of the Barcode in pixels.
|
|
120
|
+
*
|
|
121
|
+
* The Barcode dimensions can also be set through regular CSS styling.
|
|
122
|
+
*
|
|
123
|
+
* @example
|
|
124
|
+
* ```ts-preview
|
|
125
|
+
* _@Component({
|
|
126
|
+
* selector: 'my-app',
|
|
127
|
+
* template: `
|
|
128
|
+
* <kendo-barcode type="EAN8" value="1234567"
|
|
129
|
+
* [width]="200" [height]="100">
|
|
130
|
+
* </kendo-barcode>
|
|
131
|
+
*
|
|
132
|
+
* <kendo-barcode type="EAN8" value="1234567"
|
|
133
|
+
* style="width: 200px; height: 100px;">
|
|
134
|
+
* </kendo-barcode>
|
|
135
|
+
* `
|
|
136
|
+
* })
|
|
137
|
+
* export class AppComponent {
|
|
138
|
+
* }
|
|
139
|
+
* ```
|
|
140
|
+
*/
|
|
141
|
+
height?: number;
|
|
142
|
+
/**
|
|
143
|
+
* The padding of the Barcode. A numeric value sets all paddings.
|
|
144
|
+
*
|
|
145
|
+
* @default 0
|
|
146
|
+
*
|
|
147
|
+
* @example
|
|
148
|
+
* ```ts-preview
|
|
149
|
+
* import { Component } from '@angular/core';
|
|
150
|
+
* import { Padding } from '@progress/kendo-angular-barcodes';
|
|
151
|
+
*
|
|
152
|
+
* _@Component({
|
|
153
|
+
* selector: 'my-app',
|
|
154
|
+
* template: `
|
|
155
|
+
* <kendo-barcode type="EAN8" value="1234567"
|
|
156
|
+
* [padding]="5" background="#fc0">
|
|
157
|
+
* </kendo-barcode>
|
|
158
|
+
*
|
|
159
|
+
* <kendo-barcode type="EAN8" value="1234567"
|
|
160
|
+
* [padding]="barcodePadding" background="#cf0">
|
|
161
|
+
* </kendo-barcode>
|
|
162
|
+
* `
|
|
163
|
+
* })
|
|
164
|
+
* export class AppComponent {
|
|
165
|
+
* barcodePadding: Padding = {
|
|
166
|
+
* top: 20,
|
|
167
|
+
* bottom: 10,
|
|
168
|
+
* left: 5,
|
|
169
|
+
* right: 5
|
|
170
|
+
* };
|
|
171
|
+
* }
|
|
172
|
+
* ```
|
|
173
|
+
*/
|
|
174
|
+
padding?: Padding | number;
|
|
175
|
+
/**
|
|
176
|
+
* Sets the preferred rendering mode of the Barcode.
|
|
177
|
+
*
|
|
178
|
+
* The supported values are:
|
|
179
|
+
* * `"canvas"`—Renders the component as a Canvas element.
|
|
180
|
+
* * `"svg"`—Renders the component as an inline SVG document.
|
|
181
|
+
*
|
|
182
|
+
* @default "svg"
|
|
183
|
+
*
|
|
184
|
+
* @example
|
|
185
|
+
* ```ts-preview
|
|
186
|
+
* _@Component({
|
|
187
|
+
* selector: 'my-app',
|
|
188
|
+
* template: `
|
|
189
|
+
* <kendo-barcode type="EAN8" value="1234567"
|
|
190
|
+
* renderAs="canvas">
|
|
191
|
+
* </kendo-barcode>
|
|
192
|
+
* `
|
|
193
|
+
* })
|
|
194
|
+
* export class AppComponent {
|
|
195
|
+
* }
|
|
196
|
+
* ```
|
|
197
|
+
*/
|
|
198
|
+
renderAs?: RenderMode;
|
|
199
|
+
/**
|
|
200
|
+
* The Barcode text label configuration.
|
|
201
|
+
*
|
|
202
|
+
* @example
|
|
203
|
+
* ```ts-preview
|
|
204
|
+
* import { Component } from '@angular/core';
|
|
205
|
+
* import { BarcodeText } from '@progress/kendo-angular-barcodes';
|
|
206
|
+
*
|
|
207
|
+
* _@Component({
|
|
208
|
+
* selector: 'my-app',
|
|
209
|
+
* template: `
|
|
210
|
+
* <kendo-barcode type="EAN8" value="1234567"
|
|
211
|
+
* [text]="barcodeText">
|
|
212
|
+
* </kendo-barcode>
|
|
213
|
+
* `
|
|
214
|
+
* })
|
|
215
|
+
* export class AppComponent {
|
|
216
|
+
* barcodeText: BarcodeText = {
|
|
217
|
+
* color: '#fc0',
|
|
218
|
+
* font: '20px monospace'
|
|
219
|
+
* };
|
|
220
|
+
* }
|
|
221
|
+
* ```
|
|
222
|
+
*/
|
|
223
|
+
text?: BarcodeText;
|
|
224
|
+
/**
|
|
225
|
+
* The symbology (encoding) the Barcode will use.
|
|
226
|
+
*
|
|
227
|
+
* @default "Code39"
|
|
228
|
+
*
|
|
229
|
+
* @example
|
|
230
|
+
* ```ts-preview
|
|
231
|
+
* import { Component } from '@angular/core';
|
|
232
|
+
*
|
|
233
|
+
* _@Component({
|
|
234
|
+
* selector: 'my-app',
|
|
235
|
+
* template: `
|
|
236
|
+
* <kendo-barcode type="EAN13" value="123456789987">
|
|
237
|
+
* </kendo-barcode>
|
|
238
|
+
* `
|
|
239
|
+
* })
|
|
240
|
+
* export class AppComponent {
|
|
241
|
+
* }
|
|
242
|
+
* ```
|
|
243
|
+
*/
|
|
244
|
+
type: BarcodeType;
|
|
245
|
+
/**
|
|
246
|
+
* The value of the Barcode.
|
|
247
|
+
*
|
|
248
|
+
* @example
|
|
249
|
+
* ```ts-preview
|
|
250
|
+
* import { Component } from '@angular/core';
|
|
251
|
+
*
|
|
252
|
+
* _@Component({
|
|
253
|
+
* selector: 'my-app',
|
|
254
|
+
* template: `
|
|
255
|
+
* <kendo-barcode type="EAN13" value="123456789987">
|
|
256
|
+
* </kendo-barcode>
|
|
257
|
+
* `
|
|
258
|
+
* })
|
|
259
|
+
* export class AppComponent {
|
|
260
|
+
* }
|
|
261
|
+
* ```
|
|
262
|
+
*/
|
|
263
|
+
value: number | string;
|
|
264
|
+
/**
|
|
265
|
+
* The width of the Barcode in pixels.
|
|
266
|
+
*
|
|
267
|
+
* The Barcode dimensions can also be set through regular CSS styling.
|
|
268
|
+
*
|
|
269
|
+
* @example
|
|
270
|
+
* ```ts-preview
|
|
271
|
+
* _@Component({
|
|
272
|
+
* selector: 'my-app',
|
|
273
|
+
* template: `
|
|
274
|
+
* <kendo-barcode type="EAN8" value="1234567"
|
|
275
|
+
* [width]="200" [height]="100">
|
|
276
|
+
* </kendo-barcode>
|
|
277
|
+
*
|
|
278
|
+
* <kendo-barcode type="EAN8" value="1234567"
|
|
279
|
+
* style="width: 200px; height: 100px;">
|
|
280
|
+
* </kendo-barcode>
|
|
281
|
+
* `
|
|
282
|
+
* })
|
|
283
|
+
* export class AppComponent {
|
|
284
|
+
* }
|
|
285
|
+
* ```
|
|
286
|
+
*/
|
|
287
|
+
width?: number;
|
|
288
|
+
/**
|
|
289
|
+
* Limits the automatic resizing of the Barcode. Sets the maximum number of times per second
|
|
290
|
+
* that the component redraws its content when the size of its container changes.
|
|
291
|
+
* Defaults to `10`. To disable the automatic resizing, set it to `0`.
|
|
292
|
+
*
|
|
293
|
+
* @example
|
|
294
|
+
* ```ts
|
|
295
|
+
* _@Component({
|
|
296
|
+
* selector: 'my-app',
|
|
297
|
+
* template: `
|
|
298
|
+
* <kendo-barcode type="EAN8" [value]="1234567"
|
|
299
|
+
* [resizeRateLimit]="2">
|
|
300
|
+
* </kendo-barcode>
|
|
301
|
+
* `
|
|
302
|
+
* })
|
|
303
|
+
* export class AppComponent {
|
|
304
|
+
* }
|
|
305
|
+
* ```
|
|
306
|
+
*/
|
|
307
|
+
resizeRateLimit: number;
|
|
308
|
+
protected readonly options: BarcodeOptions;
|
|
309
|
+
constructor(element: ElementRef, renderer: Renderer2, ngZone: NgZone);
|
|
310
|
+
protected createInstance(element: any, options: any): Barcode;
|
|
311
|
+
}
|
|
@@ -0,0 +1,134 @@
|
|
|
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
|
+
let BarcodeComponent = class BarcodeComponent extends BaseComponent {
|
|
28
|
+
constructor(element, renderer, ngZone) {
|
|
29
|
+
super(element, renderer, ngZone);
|
|
30
|
+
this.element = element;
|
|
31
|
+
this.renderer = renderer;
|
|
32
|
+
this.ngZone = ngZone;
|
|
33
|
+
/**
|
|
34
|
+
* Limits the automatic resizing of the Barcode. Sets the maximum number of times per second
|
|
35
|
+
* that the component redraws its content when the size of its container changes.
|
|
36
|
+
* Defaults to `10`. To disable the automatic resizing, set it to `0`.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```ts
|
|
40
|
+
* _@Component({
|
|
41
|
+
* selector: 'my-app',
|
|
42
|
+
* template: `
|
|
43
|
+
* <kendo-barcode type="EAN8" [value]="1234567"
|
|
44
|
+
* [resizeRateLimit]="2">
|
|
45
|
+
* </kendo-barcode>
|
|
46
|
+
* `
|
|
47
|
+
* })
|
|
48
|
+
* export class AppComponent {
|
|
49
|
+
* }
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
this.resizeRateLimit = 10;
|
|
53
|
+
}
|
|
54
|
+
get options() {
|
|
55
|
+
return {
|
|
56
|
+
renderAs: this.renderAs,
|
|
57
|
+
background: this.background,
|
|
58
|
+
border: this.border,
|
|
59
|
+
checksum: this.checksum,
|
|
60
|
+
color: this.color,
|
|
61
|
+
height: this.height,
|
|
62
|
+
padding: this.padding,
|
|
63
|
+
text: this.text,
|
|
64
|
+
type: this.type,
|
|
65
|
+
value: this.value,
|
|
66
|
+
width: this.width
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
createInstance(element, options) {
|
|
70
|
+
return new Barcode(element, options);
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
tslib_1.__decorate([
|
|
74
|
+
Input(),
|
|
75
|
+
tslib_1.__metadata("design:type", String)
|
|
76
|
+
], BarcodeComponent.prototype, "background", void 0);
|
|
77
|
+
tslib_1.__decorate([
|
|
78
|
+
Input(),
|
|
79
|
+
tslib_1.__metadata("design:type", Object)
|
|
80
|
+
], BarcodeComponent.prototype, "border", void 0);
|
|
81
|
+
tslib_1.__decorate([
|
|
82
|
+
Input(),
|
|
83
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
84
|
+
], BarcodeComponent.prototype, "checksum", void 0);
|
|
85
|
+
tslib_1.__decorate([
|
|
86
|
+
Input(),
|
|
87
|
+
tslib_1.__metadata("design:type", String)
|
|
88
|
+
], BarcodeComponent.prototype, "color", void 0);
|
|
89
|
+
tslib_1.__decorate([
|
|
90
|
+
Input(),
|
|
91
|
+
tslib_1.__metadata("design:type", Number)
|
|
92
|
+
], BarcodeComponent.prototype, "height", void 0);
|
|
93
|
+
tslib_1.__decorate([
|
|
94
|
+
Input(),
|
|
95
|
+
tslib_1.__metadata("design:type", Object)
|
|
96
|
+
], BarcodeComponent.prototype, "padding", void 0);
|
|
97
|
+
tslib_1.__decorate([
|
|
98
|
+
Input(),
|
|
99
|
+
tslib_1.__metadata("design:type", String)
|
|
100
|
+
], BarcodeComponent.prototype, "renderAs", void 0);
|
|
101
|
+
tslib_1.__decorate([
|
|
102
|
+
Input(),
|
|
103
|
+
tslib_1.__metadata("design:type", Object)
|
|
104
|
+
], BarcodeComponent.prototype, "text", void 0);
|
|
105
|
+
tslib_1.__decorate([
|
|
106
|
+
Input(),
|
|
107
|
+
tslib_1.__metadata("design:type", String)
|
|
108
|
+
], BarcodeComponent.prototype, "type", void 0);
|
|
109
|
+
tslib_1.__decorate([
|
|
110
|
+
Input(),
|
|
111
|
+
tslib_1.__metadata("design:type", Object)
|
|
112
|
+
], BarcodeComponent.prototype, "value", void 0);
|
|
113
|
+
tslib_1.__decorate([
|
|
114
|
+
Input(),
|
|
115
|
+
tslib_1.__metadata("design:type", Number)
|
|
116
|
+
], BarcodeComponent.prototype, "width", void 0);
|
|
117
|
+
tslib_1.__decorate([
|
|
118
|
+
Input(),
|
|
119
|
+
tslib_1.__metadata("design:type", Number)
|
|
120
|
+
], BarcodeComponent.prototype, "resizeRateLimit", void 0);
|
|
121
|
+
BarcodeComponent = tslib_1.__decorate([
|
|
122
|
+
Component({
|
|
123
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
124
|
+
exportAs: 'kendoBarcode',
|
|
125
|
+
selector: 'kendo-barcode',
|
|
126
|
+
template: `
|
|
127
|
+
<kendo-resize-sensor (resize)="onResize()" [rateLimit]="resizeRateLimit"></kendo-resize-sensor>
|
|
128
|
+
`
|
|
129
|
+
}),
|
|
130
|
+
tslib_1.__metadata("design:paramtypes", [ElementRef,
|
|
131
|
+
Renderer2,
|
|
132
|
+
NgZone])
|
|
133
|
+
], BarcodeComponent);
|
|
134
|
+
export { BarcodeComponent };
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
* Represents the [NgModule]({{ site.data.urls.angular['ngmoduleapi'] }})
|
|
7
|
+
* definition for the Barcode component.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
*
|
|
11
|
+
* ```ts-no-run
|
|
12
|
+
* // Import the Barcode module
|
|
13
|
+
* import { BarcodeModule } from '@progress/kendo-angular-barcodes';
|
|
14
|
+
*
|
|
15
|
+
* // The browser platform with a compiler
|
|
16
|
+
* import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
17
|
+
*
|
|
18
|
+
* import { NgModule } from '@angular/core';
|
|
19
|
+
*
|
|
20
|
+
* // Import the app component
|
|
21
|
+
* import { AppComponent } from './app.component';
|
|
22
|
+
*
|
|
23
|
+
* // Define the app module
|
|
24
|
+
* _@NgModule({
|
|
25
|
+
* declarations: [AppComponent], // declare app component
|
|
26
|
+
* imports: [BrowserModule, BarcodeModule], // import Barcode module
|
|
27
|
+
* bootstrap: [AppComponent]
|
|
28
|
+
* })
|
|
29
|
+
* export class AppModule {}
|
|
30
|
+
*
|
|
31
|
+
* // Compile and launch the module
|
|
32
|
+
* platformBrowserDynamic().bootstrapModule(AppModule);
|
|
33
|
+
*
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
export declare class BarcodeModule {
|
|
37
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
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
|
+
let BarcodeModule = class BarcodeModule {
|
|
41
|
+
};
|
|
42
|
+
BarcodeModule = tslib_1.__decorate([
|
|
43
|
+
NgModule({
|
|
44
|
+
declarations: [BarcodeComponent],
|
|
45
|
+
imports: [ResizeSensorModule],
|
|
46
|
+
exports: [BarcodeComponent]
|
|
47
|
+
})
|
|
48
|
+
], BarcodeModule);
|
|
49
|
+
export { BarcodeModule };
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
* Represents the [NgModule]({{ site.data.urls.angular['ngmoduleapi'] }})
|
|
7
|
+
* definition for the Barcode and QR Code components.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
*
|
|
11
|
+
* ```ts-no-run
|
|
12
|
+
* // Import the Barcodes module
|
|
13
|
+
* import { BarcodesModule } from '@progress/kendo-angular-barcodes';
|
|
14
|
+
*
|
|
15
|
+
* // The browser platform with a compiler
|
|
16
|
+
* import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
17
|
+
*
|
|
18
|
+
* import { NgModule } from '@angular/core';
|
|
19
|
+
*
|
|
20
|
+
* // Import the app component
|
|
21
|
+
* import { AppComponent } from './app.component';
|
|
22
|
+
*
|
|
23
|
+
* // Define the app module
|
|
24
|
+
* _@NgModule({
|
|
25
|
+
* declarations: [AppComponent], // declare app component
|
|
26
|
+
* imports: [BrowserModule, BarcodesModule], // import Barcodes module
|
|
27
|
+
* bootstrap: [AppComponent]
|
|
28
|
+
* })
|
|
29
|
+
* export class AppModule {}
|
|
30
|
+
*
|
|
31
|
+
* // Compile and launch the module
|
|
32
|
+
* platformBrowserDynamic().bootstrapModule(AppModule);
|
|
33
|
+
*
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
export declare class BarcodesModule {
|
|
37
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
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
|
+
let BarcodesModule = class BarcodesModule {
|
|
41
|
+
};
|
|
42
|
+
BarcodesModule = tslib_1.__decorate([
|
|
43
|
+
NgModule({
|
|
44
|
+
exports: [BarcodeModule, QRCodeModule]
|
|
45
|
+
})
|
|
46
|
+
], BarcodesModule);
|
|
47
|
+
export { BarcodesModule };
|
|
@@ -0,0 +1,54 @@
|
|
|
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 { AfterViewInit, ElementRef, NgZone, OnChanges, Renderer2, SimpleChanges } from '@angular/core';
|
|
6
|
+
import { Group, ImageExportOptions, SVGExportOptions } from '@progress/kendo-drawing';
|
|
7
|
+
/**
|
|
8
|
+
* @hidden
|
|
9
|
+
*/
|
|
10
|
+
export declare abstract class BaseComponent implements OnChanges, AfterViewInit {
|
|
11
|
+
protected element: ElementRef;
|
|
12
|
+
protected renderer: Renderer2;
|
|
13
|
+
protected ngZone: NgZone;
|
|
14
|
+
resizeRateLimit: number;
|
|
15
|
+
surfaceElement: ElementRef;
|
|
16
|
+
protected instance: any;
|
|
17
|
+
protected abstract readonly options: any;
|
|
18
|
+
protected readonly autoResize: boolean;
|
|
19
|
+
protected readonly canRender: boolean;
|
|
20
|
+
constructor(element: ElementRef, renderer: Renderer2, ngZone: NgZone);
|
|
21
|
+
ngAfterViewInit(): void;
|
|
22
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
23
|
+
/**
|
|
24
|
+
* Detects the size of the container and redraws the component.
|
|
25
|
+
* Resizing is automatic unless you set the `resizeRateLimit` option to `0`.
|
|
26
|
+
*/
|
|
27
|
+
resize(): void;
|
|
28
|
+
/**
|
|
29
|
+
* @hidden
|
|
30
|
+
*/
|
|
31
|
+
onResize(): void;
|
|
32
|
+
/**
|
|
33
|
+
* Exports the component as an image. The export operation is asynchronous and returns a promise.
|
|
34
|
+
*
|
|
35
|
+
* @param {ImageExportOptions} options - The parameters for the exported image.
|
|
36
|
+
* @returns {Promise<string>} - A promise that will be resolved with a PNG image encoded as a Data URI.
|
|
37
|
+
*/
|
|
38
|
+
exportImage(options?: ImageExportOptions): Promise<string>;
|
|
39
|
+
/**
|
|
40
|
+
* Exports the component as an SVG document. The export operation is asynchronous and returns a promise.
|
|
41
|
+
*
|
|
42
|
+
* @param options - The parameters for the exported file.
|
|
43
|
+
* @returns - A promise that will be resolved with an SVG document that is encoded as a Data URI.
|
|
44
|
+
*/
|
|
45
|
+
exportSVG(options?: SVGExportOptions): Promise<string>;
|
|
46
|
+
/**
|
|
47
|
+
* Exports the component as a Drawing Group.
|
|
48
|
+
*
|
|
49
|
+
* @returns - The exported Group.
|
|
50
|
+
*/
|
|
51
|
+
exportVisual(): Group;
|
|
52
|
+
protected abstract createInstance(element: any, options: any): any;
|
|
53
|
+
protected refresh(): void;
|
|
54
|
+
}
|