@progress/kendo-angular-barcodes 0.2.3 → 1.0.0-next.202203150945
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/bundles/kendo-angular-barcodes.umd.js +5 -0
- package/package.json +34 -101
- package/schematics/ngAdd/index.js +5 -2
- package/schematics/ngAdd/index.js.map +1 -1
- package/dist/cdn/js/kendo-angular-barcodes.js +0 -20
- package/dist/cdn/main.js +0 -5
- package/dist/es/barcode-validator.js +0 -51
- package/dist/es/barcode.component.js +0 -149
- package/dist/es/barcode.module.js +0 -52
- package/dist/es/barcodes.module.js +0 -50
- package/dist/es/base.component.js +0 -117
- package/dist/es/chart-types/barcode-types.js +0 -4
- package/dist/es/chart-types/field-types.js +0 -4
- package/dist/es/chart-types/qrcode-types.js +0 -4
- package/dist/es/chart-types.js +0 -4
- package/dist/es/index.js +0 -9
- package/dist/es/main.js +0 -11
- package/dist/es/package-metadata.js +0 -15
- package/dist/es/qrcode-validator.js +0 -45
- package/dist/es/qrcode.component.js +0 -147
- package/dist/es/qrcode.module.js +0 -52
- package/dist/es2015/barcode-validator.d.ts +0 -28
- package/dist/es2015/barcode-validator.js +0 -51
- package/dist/es2015/barcode.component.d.ts +0 -312
- package/dist/es2015/barcode.component.js +0 -144
- package/dist/es2015/barcode.module.d.ts +0 -37
- package/dist/es2015/barcode.module.js +0 -49
- package/dist/es2015/barcodes.module.d.ts +0 -37
- package/dist/es2015/barcodes.module.js +0 -47
- package/dist/es2015/base.component.d.ts +0 -55
- package/dist/es2015/base.component.js +0 -105
- package/dist/es2015/chart-types/barcode-types.d.ts +0 -109
- package/dist/es2015/chart-types/barcode-types.js +0 -4
- package/dist/es2015/chart-types/field-types.d.ts +0 -75
- package/dist/es2015/chart-types/field-types.js +0 -4
- package/dist/es2015/chart-types/qrcode-types.d.ts +0 -124
- package/dist/es2015/chart-types/qrcode-types.js +0 -4
- package/dist/es2015/chart-types.d.ts +0 -7
- package/dist/es2015/chart-types.js +0 -4
- package/dist/es2015/index.d.ts +0 -9
- package/dist/es2015/index.js +0 -9
- package/dist/es2015/index.metadata.json +0 -1
- package/dist/es2015/main.d.ts +0 -12
- package/dist/es2015/main.js +0 -11
- package/dist/es2015/package-metadata.d.ts +0 -9
- package/dist/es2015/package-metadata.js +0 -15
- package/dist/es2015/qrcode-validator.d.ts +0 -26
- package/dist/es2015/qrcode-validator.js +0 -44
- package/dist/es2015/qrcode.component.d.ts +0 -289
- package/dist/es2015/qrcode.component.js +0 -142
- package/dist/es2015/qrcode.module.d.ts +0 -37
- package/dist/es2015/qrcode.module.js +0 -49
- package/dist/fesm2015/index.js +0 -598
- package/dist/fesm5/index.js +0 -629
- package/dist/npm/barcode-validator.js +0 -53
- package/dist/npm/barcode.component.js +0 -151
- package/dist/npm/barcode.module.js +0 -54
- package/dist/npm/barcodes.module.js +0 -52
- package/dist/npm/base.component.js +0 -119
- package/dist/npm/chart-types/barcode-types.js +0 -6
- package/dist/npm/chart-types/field-types.js +0 -6
- package/dist/npm/chart-types/qrcode-types.js +0 -6
- package/dist/npm/chart-types.js +0 -6
- package/dist/npm/index.js +0 -13
- package/dist/npm/main.js +0 -20
- package/dist/npm/package-metadata.js +0 -17
- package/dist/npm/qrcode-validator.js +0 -47
- package/dist/npm/qrcode.component.js +0 -149
- package/dist/npm/qrcode.module.js +0 -54
- package/dist/systemjs/kendo-angular-barcodes.js +0 -5
|
@@ -1,144 +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
|
-
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
|
-
import { packageMetadata } from './package-metadata';
|
|
10
|
-
/**
|
|
11
|
-
* Represents the Kendo UI Barcode component for Angular.
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* ```ts
|
|
15
|
-
* import { Component } from '@angular/core';
|
|
16
|
-
*
|
|
17
|
-
* _@Component({
|
|
18
|
-
* selector: 'my-app',
|
|
19
|
-
* template: `
|
|
20
|
-
* <kendo-barcode type="EAN8" value="1234567">
|
|
21
|
-
* </kendo-barcode>
|
|
22
|
-
* `
|
|
23
|
-
* })
|
|
24
|
-
* export class AppComponent {
|
|
25
|
-
* }
|
|
26
|
-
* ```
|
|
27
|
-
*/
|
|
28
|
-
let BarcodeComponent = class BarcodeComponent extends BaseComponent {
|
|
29
|
-
constructor(element, renderer, ngZone) {
|
|
30
|
-
super(element, renderer, ngZone);
|
|
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
|
-
}
|
|
55
|
-
get options() {
|
|
56
|
-
return {
|
|
57
|
-
renderAs: this.renderAs,
|
|
58
|
-
background: this.background,
|
|
59
|
-
border: this.border,
|
|
60
|
-
checksum: this.checksum,
|
|
61
|
-
color: this.color,
|
|
62
|
-
height: this.height,
|
|
63
|
-
padding: this.padding,
|
|
64
|
-
text: this.text,
|
|
65
|
-
type: this.type,
|
|
66
|
-
value: this.value,
|
|
67
|
-
width: this.width
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
createInstance(element, options) {
|
|
71
|
-
return new Barcode(element, options, this.onError.bind(this));
|
|
72
|
-
}
|
|
73
|
-
onError(error) {
|
|
74
|
-
error.name = packageMetadata.productName + ' Barcode';
|
|
75
|
-
if (this.isDevMode()) {
|
|
76
|
-
throw error;
|
|
77
|
-
}
|
|
78
|
-
else {
|
|
79
|
-
console.warn(error);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
};
|
|
83
|
-
tslib_1.__decorate([
|
|
84
|
-
Input(),
|
|
85
|
-
tslib_1.__metadata("design:type", String)
|
|
86
|
-
], BarcodeComponent.prototype, "background", void 0);
|
|
87
|
-
tslib_1.__decorate([
|
|
88
|
-
Input(),
|
|
89
|
-
tslib_1.__metadata("design:type", Object)
|
|
90
|
-
], BarcodeComponent.prototype, "border", void 0);
|
|
91
|
-
tslib_1.__decorate([
|
|
92
|
-
Input(),
|
|
93
|
-
tslib_1.__metadata("design:type", Boolean)
|
|
94
|
-
], BarcodeComponent.prototype, "checksum", void 0);
|
|
95
|
-
tslib_1.__decorate([
|
|
96
|
-
Input(),
|
|
97
|
-
tslib_1.__metadata("design:type", String)
|
|
98
|
-
], BarcodeComponent.prototype, "color", void 0);
|
|
99
|
-
tslib_1.__decorate([
|
|
100
|
-
Input(),
|
|
101
|
-
tslib_1.__metadata("design:type", Number)
|
|
102
|
-
], BarcodeComponent.prototype, "height", void 0);
|
|
103
|
-
tslib_1.__decorate([
|
|
104
|
-
Input(),
|
|
105
|
-
tslib_1.__metadata("design:type", Object)
|
|
106
|
-
], BarcodeComponent.prototype, "padding", void 0);
|
|
107
|
-
tslib_1.__decorate([
|
|
108
|
-
Input(),
|
|
109
|
-
tslib_1.__metadata("design:type", String)
|
|
110
|
-
], BarcodeComponent.prototype, "renderAs", void 0);
|
|
111
|
-
tslib_1.__decorate([
|
|
112
|
-
Input(),
|
|
113
|
-
tslib_1.__metadata("design:type", Object)
|
|
114
|
-
], BarcodeComponent.prototype, "text", void 0);
|
|
115
|
-
tslib_1.__decorate([
|
|
116
|
-
Input(),
|
|
117
|
-
tslib_1.__metadata("design:type", String)
|
|
118
|
-
], BarcodeComponent.prototype, "type", void 0);
|
|
119
|
-
tslib_1.__decorate([
|
|
120
|
-
Input(),
|
|
121
|
-
tslib_1.__metadata("design:type", Object)
|
|
122
|
-
], BarcodeComponent.prototype, "value", void 0);
|
|
123
|
-
tslib_1.__decorate([
|
|
124
|
-
Input(),
|
|
125
|
-
tslib_1.__metadata("design:type", Number)
|
|
126
|
-
], BarcodeComponent.prototype, "width", void 0);
|
|
127
|
-
tslib_1.__decorate([
|
|
128
|
-
Input(),
|
|
129
|
-
tslib_1.__metadata("design:type", Number)
|
|
130
|
-
], BarcodeComponent.prototype, "resizeRateLimit", void 0);
|
|
131
|
-
BarcodeComponent = tslib_1.__decorate([
|
|
132
|
-
Component({
|
|
133
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
134
|
-
exportAs: 'kendoBarcode',
|
|
135
|
-
selector: 'kendo-barcode',
|
|
136
|
-
template: `
|
|
137
|
-
<kendo-resize-sensor (resize)="onResize()" [rateLimit]="resizeRateLimit"></kendo-resize-sensor>
|
|
138
|
-
`
|
|
139
|
-
}),
|
|
140
|
-
tslib_1.__metadata("design:paramtypes", [ElementRef,
|
|
141
|
-
Renderer2,
|
|
142
|
-
NgZone])
|
|
143
|
-
], BarcodeComponent);
|
|
144
|
-
export { BarcodeComponent };
|
|
@@ -1,37 +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
|
-
/**
|
|
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
|
-
}
|
|
@@ -1,49 +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
|
-
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 };
|
|
@@ -1,37 +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
|
-
/**
|
|
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
|
-
}
|
|
@@ -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
|
-
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 };
|
|
@@ -1,55 +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
|
-
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
|
-
protected isDevMode(): boolean;
|
|
55
|
-
}
|
|
@@ -1,105 +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
|
-
import * as tslib_1 from "tslib";
|
|
6
|
-
import { ElementRef, Input, isDevMode, 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
|
-
export class BaseComponent {
|
|
15
|
-
constructor(element, renderer, ngZone) {
|
|
16
|
-
this.element = element;
|
|
17
|
-
this.renderer = renderer;
|
|
18
|
-
this.ngZone = ngZone;
|
|
19
|
-
this.resizeRateLimit = 10;
|
|
20
|
-
validatePackage(packageMetadata);
|
|
21
|
-
}
|
|
22
|
-
get autoResize() {
|
|
23
|
-
return this.resizeRateLimit > 0;
|
|
24
|
-
}
|
|
25
|
-
get canRender() {
|
|
26
|
-
return isDocumentAvailable() && Boolean(this.element);
|
|
27
|
-
}
|
|
28
|
-
ngAfterViewInit() {
|
|
29
|
-
this.refresh();
|
|
30
|
-
}
|
|
31
|
-
ngOnChanges(changes) {
|
|
32
|
-
// Need to create a new instance if the rendering mode changes.
|
|
33
|
-
if (changes['renderAs'] && this.instance) {
|
|
34
|
-
this.instance.destroy();
|
|
35
|
-
this.instance = null;
|
|
36
|
-
}
|
|
37
|
-
this.refresh();
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Detects the size of the container and redraws the component.
|
|
41
|
-
* Resizing is automatic unless you set the `resizeRateLimit` option to `0`.
|
|
42
|
-
*/
|
|
43
|
-
resize() {
|
|
44
|
-
if (this.instance) {
|
|
45
|
-
this.instance.redraw();
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* @hidden
|
|
50
|
-
*/
|
|
51
|
-
onResize() {
|
|
52
|
-
if (this.autoResize) {
|
|
53
|
-
this.resize();
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Exports the component as an image. The export operation is asynchronous and returns a promise.
|
|
58
|
-
*
|
|
59
|
-
* @param {ImageExportOptions} options - The parameters for the exported image.
|
|
60
|
-
* @returns {Promise<string>} - A promise that will be resolved with a PNG image encoded as a Data URI.
|
|
61
|
-
*/
|
|
62
|
-
exportImage(options = {}) {
|
|
63
|
-
return exportImage(this.exportVisual(), options);
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Exports the component as an SVG document. The export operation is asynchronous and returns a promise.
|
|
67
|
-
*
|
|
68
|
-
* @param options - The parameters for the exported file.
|
|
69
|
-
* @returns - A promise that will be resolved with an SVG document that is encoded as a Data URI.
|
|
70
|
-
*/
|
|
71
|
-
exportSVG(options = {}) {
|
|
72
|
-
return exportSVG(this.exportVisual(), options);
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Exports the component as a Drawing Group.
|
|
76
|
-
*
|
|
77
|
-
* @returns - The exported Group.
|
|
78
|
-
*/
|
|
79
|
-
exportVisual() {
|
|
80
|
-
return this.instance.exportVisual();
|
|
81
|
-
}
|
|
82
|
-
refresh() {
|
|
83
|
-
if (!this.canRender) {
|
|
84
|
-
return;
|
|
85
|
-
}
|
|
86
|
-
if (!this.instance) {
|
|
87
|
-
const element = this.element.nativeElement;
|
|
88
|
-
this.instance = this.createInstance(element, this.options);
|
|
89
|
-
}
|
|
90
|
-
else {
|
|
91
|
-
this.instance.setOptions(this.options);
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
isDevMode() {
|
|
95
|
-
return isDevMode();
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
tslib_1.__decorate([
|
|
99
|
-
Input(),
|
|
100
|
-
tslib_1.__metadata("design:type", Number)
|
|
101
|
-
], BaseComponent.prototype, "resizeRateLimit", void 0);
|
|
102
|
-
tslib_1.__decorate([
|
|
103
|
-
ViewChild('surface', { static: true }),
|
|
104
|
-
tslib_1.__metadata("design:type", ElementRef)
|
|
105
|
-
], BaseComponent.prototype, "surfaceElement", void 0);
|
|
@@ -1,109 +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
|
-
import { Border, Margin, Padding, RenderMode } from './field-types';
|
|
6
|
-
/**
|
|
7
|
-
* Supported symbologies (encodings) for the Barcode component.
|
|
8
|
-
*/
|
|
9
|
-
export declare type BarcodeType = 'EAN8' | 'EAN13' | 'UPCE' | 'UPCA' | 'Code11' | 'Code39' | 'Code39Extended' | 'Code93' | 'Code93Extended' | 'Code128' | 'Code128A' | 'Code128B' | 'Code128C' | 'GS1-128' | 'MSImod10' | 'MSImod11' | 'MSImod1010' | 'MSImod1110' | 'POSTNET' | 'ean8' | 'ean13' | 'upce' | 'upca' | 'code11' | 'code39' | 'code39extended' | 'code93' | 'code93extended' | 'code128' | 'code128a' | 'code128b' | 'code128c' | 'gs1-128' | 'msimod10' | 'msimod11' | 'msimod1010' | 'msimod1110' | 'postnet';
|
|
10
|
-
/**
|
|
11
|
-
* The Barcode text label configuration.
|
|
12
|
-
*/
|
|
13
|
-
export interface BarcodeText {
|
|
14
|
-
/**
|
|
15
|
-
* The color of the text. Any valid CSS color string will work here, including hex and rgb.
|
|
16
|
-
*
|
|
17
|
-
* @default "black"
|
|
18
|
-
*/
|
|
19
|
-
color?: string;
|
|
20
|
-
/**
|
|
21
|
-
* The font of the text.
|
|
22
|
-
*
|
|
23
|
-
* @default "16px Consolas, Monaco, Sans Mono, monospace, sans-serif"
|
|
24
|
-
*/
|
|
25
|
-
font?: string;
|
|
26
|
-
/**
|
|
27
|
-
* The margin of the text. A numeric value sets all margins.
|
|
28
|
-
*
|
|
29
|
-
* @default 0
|
|
30
|
-
*/
|
|
31
|
-
margin?: Margin | number;
|
|
32
|
-
/**
|
|
33
|
-
* A flag indicating that the Barcode text label is visible.
|
|
34
|
-
*
|
|
35
|
-
* If set to `false`, the Barcode will not display the value as a text below the barcode lines.
|
|
36
|
-
*
|
|
37
|
-
* @default true
|
|
38
|
-
*/
|
|
39
|
-
visible?: boolean;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* The Barcode configuration options.
|
|
43
|
-
*/
|
|
44
|
-
export interface BarcodeOptions {
|
|
45
|
-
/**
|
|
46
|
-
* The background color of the Barcode. Accepts a valid CSS color string, including hex and rgb.
|
|
47
|
-
*
|
|
48
|
-
* @default "white"
|
|
49
|
-
*/
|
|
50
|
-
background?: string;
|
|
51
|
-
/**
|
|
52
|
-
* The border of the Barcode.
|
|
53
|
-
*/
|
|
54
|
-
border?: Border;
|
|
55
|
-
/**
|
|
56
|
-
* If set to `true`, the Barcode will display the checksum digit next to the value in the text area.
|
|
57
|
-
*
|
|
58
|
-
* @default true
|
|
59
|
-
*/
|
|
60
|
-
checksum?: boolean;
|
|
61
|
-
/**
|
|
62
|
-
* The color of the Barcode. Accepts a valid CSS color string, including hex and rgb.
|
|
63
|
-
*
|
|
64
|
-
* @default "black"
|
|
65
|
-
*/
|
|
66
|
-
color?: string;
|
|
67
|
-
/**
|
|
68
|
-
* The height of the Barcode in pixels.
|
|
69
|
-
*
|
|
70
|
-
* @default 100
|
|
71
|
-
*/
|
|
72
|
-
height?: number;
|
|
73
|
-
/**
|
|
74
|
-
* The padding of the Barcode. A numeric value sets all paddings.
|
|
75
|
-
*
|
|
76
|
-
* @default 0
|
|
77
|
-
*/
|
|
78
|
-
padding?: Padding | number;
|
|
79
|
-
/**
|
|
80
|
-
* Sets the preferred rendering mode of the Barcode.
|
|
81
|
-
*
|
|
82
|
-
* The supported values are:
|
|
83
|
-
* * `"canvas"`—Renders the component as a Canvas element.
|
|
84
|
-
* * `"svg"`—Renders the component as an inline SVG document.
|
|
85
|
-
*
|
|
86
|
-
* @default "svg"
|
|
87
|
-
*/
|
|
88
|
-
renderAs?: RenderMode;
|
|
89
|
-
/**
|
|
90
|
-
* The Barcode text label configuration.
|
|
91
|
-
*/
|
|
92
|
-
text?: BarcodeText;
|
|
93
|
-
/**
|
|
94
|
-
* The symbology (encoding) the Barcode will use.
|
|
95
|
-
*
|
|
96
|
-
* @default "Code39"
|
|
97
|
-
*/
|
|
98
|
-
type: BarcodeType;
|
|
99
|
-
/**
|
|
100
|
-
* The value of the Barcode.
|
|
101
|
-
*/
|
|
102
|
-
value: number | string;
|
|
103
|
-
/**
|
|
104
|
-
* The width of the Barcode in pixels.
|
|
105
|
-
*
|
|
106
|
-
* @default 300
|
|
107
|
-
*/
|
|
108
|
-
width?: number;
|
|
109
|
-
}
|
|
@@ -1,4 +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
|
-
*-------------------------------------------------------------------------------------------*/
|
|
@@ -1,75 +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
|
-
/**
|
|
6
|
-
* The dash line type.
|
|
7
|
-
*/
|
|
8
|
-
export declare type DashType = 'dash' | 'dashDot' | 'dot' | 'longDash' | 'longDashDot' | 'longDashDotDot' | 'solid';
|
|
9
|
-
/**
|
|
10
|
-
* The appearance settings for the border lines.
|
|
11
|
-
*/
|
|
12
|
-
export interface Border {
|
|
13
|
-
/**
|
|
14
|
-
* The color of the border line. Accepts a valid CSS color string, including hex and rgb.
|
|
15
|
-
*/
|
|
16
|
-
color?: string;
|
|
17
|
-
/**
|
|
18
|
-
* The dash type of the border line.
|
|
19
|
-
*/
|
|
20
|
-
dashType?: DashType;
|
|
21
|
-
/**
|
|
22
|
-
* The width of the border line in pixels.
|
|
23
|
-
*/
|
|
24
|
-
width?: number;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* The margin size for each side.
|
|
28
|
-
*/
|
|
29
|
-
export interface Margin {
|
|
30
|
-
/**
|
|
31
|
-
* The top margin in pixels.
|
|
32
|
-
*/
|
|
33
|
-
top?: number;
|
|
34
|
-
/**
|
|
35
|
-
* The right margin in pixels.
|
|
36
|
-
*/
|
|
37
|
-
right?: number;
|
|
38
|
-
/**
|
|
39
|
-
* The bottom margin in pixels.
|
|
40
|
-
*/
|
|
41
|
-
bottom?: number;
|
|
42
|
-
/**
|
|
43
|
-
* The left margin in pixels.
|
|
44
|
-
*/
|
|
45
|
-
left?: number;
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* The padding size for each side.
|
|
49
|
-
*/
|
|
50
|
-
export interface Padding {
|
|
51
|
-
/**
|
|
52
|
-
* The top padding in pixels.
|
|
53
|
-
*/
|
|
54
|
-
top?: number;
|
|
55
|
-
/**
|
|
56
|
-
* The right padding in pixels.
|
|
57
|
-
*/
|
|
58
|
-
right?: number;
|
|
59
|
-
/**
|
|
60
|
-
* The bottom padding in pixels.
|
|
61
|
-
*/
|
|
62
|
-
bottom?: number;
|
|
63
|
-
/**
|
|
64
|
-
* The left padding in pixels.
|
|
65
|
-
*/
|
|
66
|
-
left?: number;
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Sets the rendering mode of the component.
|
|
70
|
-
*
|
|
71
|
-
* The supported values are:
|
|
72
|
-
* * `"canvas"`—Renders the component as a Canvas element.
|
|
73
|
-
* * `"svg"`—Renders the component as an inline SVG document.
|
|
74
|
-
*/
|
|
75
|
-
export declare type RenderMode = 'svg' | 'canvas';
|
|
@@ -1,4 +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
|
-
*-------------------------------------------------------------------------------------------*/
|