@progress/kendo-angular-barcodes 19.1.2-develop.2 → 19.1.2-develop.4

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.
@@ -6,17 +6,18 @@ import { ValidatorFn } from '@angular/forms';
6
6
  import { geometry } from '@progress/kendo-drawing';
7
7
  import { BarcodeType } from './chart-types';
8
8
  /**
9
- * Creates a value validator for a particular Barcode type.
9
+ * Creates a validator for a specific Barcode type.
10
10
  *
11
- * @param {BarcodeType} type The type of the Barcode.
12
- * @param {Size} size The size of the barcode, excluding the text label, padding and border. Optional.
13
- * @returns {ValidatorFn} A validator function that returns an error map with the `barcode` property if the validation check fails, otherwise `null`.
11
+ * Use this function to validate a Barcode value for a given `BarcodeType`.
12
+ *
13
+ * @param type Specifies the type of the Barcode.
14
+ * @param size Specifies the size of the barcode, excluding the text label, padding, and border. This parameter is optional.
15
+ * @returns Returns a validator function. The function returns an error map with the `barcode` property if validation fails. Otherwise, it returns `null` if valid.
14
16
  *
15
17
  * @example
16
- * ```ts-no-run
18
+ * ```typescript
17
19
  * const control = new FormControl('1234', createBarcodeValidator('EAN8'));
18
20
  * console.log(control.errors);
19
- *
20
21
  * // {
21
22
  * // barcode: {
22
23
  * // message: 'The value of the "EAN13" encoding should be 12 symbols',
@@ -8,13 +8,15 @@ import { BaseComponent } from './base.component';
8
8
  import { BarcodeText, BarcodeType, Border, Padding, RenderMode } from './chart-types';
9
9
  import * as i0 from "@angular/core";
10
10
  /**
11
- * Represents the Kendo UI Barcode component for Angular.
11
+ * Represents the [Kendo UI Barcode component for Angular](slug:overview_barcode_barcodes).
12
+ *
13
+ * Use this component to display a barcode in your Angular application.
12
14
  *
13
15
  * @example
14
- * ```ts
16
+ * ```typescript
15
17
  * import { Component } from '@angular/core';
16
18
  *
17
- * _@Component({
19
+ * @Component({
18
20
  * selector: 'my-app',
19
21
  * template: `
20
22
  * <kendo-barcode type="EAN8" value="1234567">
@@ -30,280 +32,72 @@ export declare class BarcodeComponent extends BaseComponent {
30
32
  protected renderer: Renderer2;
31
33
  protected ngZone: NgZone;
32
34
  /**
33
- * The background color of the Barcode. Accepts a valid CSS color string, including hex and rgb.
35
+ * Sets the background color of the Barcode. Accepts any valid CSS color string, such as hex or rgb.
34
36
  *
35
37
  * @default "white"
36
- *
37
- * @example
38
- * ```ts-preview
39
- * import { Component } from '@angular/core';
40
- *
41
- * _@Component({
42
- * selector: 'my-app',
43
- * template: `
44
- * <kendo-barcode type="EAN8" value="1234567"
45
- * background="#fc0">
46
- * </kendo-barcode>
47
- * `
48
- * })
49
- * export class AppComponent {
50
- * }
51
- * ```
52
38
  */
53
39
  background?: string;
54
40
  /**
55
- * The border of the Barcode.
56
- *
57
- * @example
58
- * ```ts-preview
59
- * import { Component } from '@angular/core';
60
- * import { Border } from '@progress/kendo-angular-barcodes';
61
- *
62
- * _@Component({
63
- * selector: 'my-app',
64
- * template: `
65
- * <kendo-barcode type="EAN8" value="1234567"
66
- * [border]="barcodeBorder" [padding]="5">
67
- * </kendo-barcode>
68
- * `
69
- * })
70
- * export class AppComponent {
71
- * barcodeBorder: Border = {
72
- * color: '#fc0',
73
- * width: 2
74
- * };
75
- * }
76
- * ```
41
+ * Configures the border of the Barcode.
77
42
  */
78
43
  border?: Border;
79
44
  /**
80
- * If set to `true`, the Barcode will display the checksum digit next to the value in the text area.
45
+ * Shows the checksum digit next to the value in the text area when set to `true`.
81
46
  *
82
47
  * @default false
83
- *
84
- * @example
85
- * ```ts-preview
86
- * _@Component({
87
- * selector: 'my-app',
88
- * template: `
89
- * <kendo-barcode type="EAN8" value="1234567"
90
- * [checksum]="true">
91
- * </kendo-barcode>
92
- * `
93
- * })
94
- * export class AppComponent {
95
- * }
96
- * ```
97
48
  */
98
49
  checksum?: boolean;
99
50
  /**
100
- * The color of the Barcode. Accepts a valid CSS color string, including hex and rgb.
51
+ * Sets the color of the Barcode. Accepts any valid CSS color string, such as hex or rgb.
101
52
  *
102
53
  * @default "black"
103
- *
104
- * @example
105
- * ```ts-preview
106
- * _@Component({
107
- * selector: 'my-app',
108
- * template: `
109
- * <kendo-barcode type="EAN8" value="1234567"
110
- * color="#fc0">
111
- * </kendo-barcode>
112
- * `
113
- * })
114
- * export class AppComponent {
115
- * }
116
- * ```
117
54
  */
118
55
  color?: string;
119
56
  /**
120
- * The height of the Barcode in pixels.
121
- *
122
- * The Barcode dimensions can also be set through regular CSS styling.
123
- *
124
- * @example
125
- * ```ts-preview
126
- * _@Component({
127
- * selector: 'my-app',
128
- * template: `
129
- * <kendo-barcode type="EAN8" value="1234567"
130
- * [width]="200" [height]="100">
131
- * </kendo-barcode>
57
+ * Sets the height of the Barcode in pixels.
132
58
  *
133
- * <kendo-barcode type="EAN8" value="1234567"
134
- * [style.width.px]="200" [style.height.px]="100">
135
- * </kendo-barcode>
136
- * `
137
- * })
138
- * export class AppComponent {
139
- * }
140
- * ```
59
+ * You can also set the Barcode dimensions using CSS.
141
60
  */
142
61
  height?: number;
143
62
  /**
144
- * The padding of the Barcode. A numeric value sets all paddings.
63
+ * Sets the padding of the Barcode. Use a number to set all paddings, or a `Padding` object for the individual sides.
145
64
  *
146
65
  * @default 0
147
- *
148
- * @example
149
- * ```ts-preview
150
- * import { Component } from '@angular/core';
151
- * import { Padding } from '@progress/kendo-angular-barcodes';
152
- *
153
- * _@Component({
154
- * selector: 'my-app',
155
- * template: `
156
- * <kendo-barcode type="EAN8" value="1234567"
157
- * [padding]="5" background="#fc0">
158
- * </kendo-barcode>
159
- *
160
- * <kendo-barcode type="EAN8" value="1234567"
161
- * [padding]="barcodePadding" background="#cf0">
162
- * </kendo-barcode>
163
- * `
164
- * })
165
- * export class AppComponent {
166
- * barcodePadding: Padding = {
167
- * top: 20,
168
- * bottom: 10,
169
- * left: 5,
170
- * right: 5
171
- * };
172
- * }
173
- * ```
174
66
  */
175
67
  padding?: Padding | number;
176
68
  /**
177
- * Sets the preferred rendering mode of the Barcode.
69
+ * Sets the rendering mode of the Barcode.
178
70
  *
179
- * The supported values are:
180
- * * `"canvas"`&mdash;Renders the component as a Canvas element.
181
- * * `"svg"`&mdash;Renders the component as an inline SVG document.
71
+ * Use `"canvas"` to render as a Canvas element or `"svg"` to render as an inline SVG.
182
72
  *
183
73
  * @default "svg"
184
- *
185
- * @example
186
- * ```ts-preview
187
- * _@Component({
188
- * selector: 'my-app',
189
- * template: `
190
- * <kendo-barcode type="EAN8" value="1234567"
191
- * renderAs="canvas">
192
- * </kendo-barcode>
193
- * `
194
- * })
195
- * export class AppComponent {
196
- * }
197
- * ```
198
74
  */
199
75
  renderAs?: RenderMode;
200
76
  /**
201
- * The Barcode text label configuration.
202
- *
203
- * @example
204
- * ```ts-preview
205
- * import { Component } from '@angular/core';
206
- * import { BarcodeText } from '@progress/kendo-angular-barcodes';
207
- *
208
- * _@Component({
209
- * selector: 'my-app',
210
- * template: `
211
- * <kendo-barcode type="EAN8" value="1234567"
212
- * [text]="barcodeText">
213
- * </kendo-barcode>
214
- * `
215
- * })
216
- * export class AppComponent {
217
- * barcodeText: BarcodeText = {
218
- * color: '#fc0',
219
- * font: '20px monospace'
220
- * };
221
- * }
222
- * ```
77
+ * Configures the Barcode text label.
223
78
  */
224
79
  text?: BarcodeText;
225
80
  /**
226
- * The symbology (encoding) the Barcode will use.
81
+ * Sets the symbology (encoding) for the Barcode.
227
82
  *
228
83
  * @default "Code39"
229
- *
230
- * @example
231
- * ```ts-preview
232
- * import { Component } from '@angular/core';
233
- *
234
- * _@Component({
235
- * selector: 'my-app',
236
- * template: `
237
- * <kendo-barcode type="EAN13" value="123456789987">
238
- * </kendo-barcode>
239
- * `
240
- * })
241
- * export class AppComponent {
242
- * }
243
- * ```
244
84
  */
245
85
  type: BarcodeType;
246
86
  /**
247
- * The value of the Barcode.
248
- *
249
- * @example
250
- * ```ts-preview
251
- * import { Component } from '@angular/core';
252
- *
253
- * _@Component({
254
- * selector: 'my-app',
255
- * template: `
256
- * <kendo-barcode type="EAN13" value="123456789987">
257
- * </kendo-barcode>
258
- * `
259
- * })
260
- * export class AppComponent {
261
- * }
262
- * ```
87
+ * Sets the value of the Barcode.
263
88
  */
264
89
  value: number | string;
265
90
  /**
266
- * The width of the Barcode in pixels.
267
- *
268
- * The Barcode dimensions can also be set through regular CSS styling.
269
- *
270
- * @example
271
- * ```ts-preview
272
- * _@Component({
273
- * selector: 'my-app',
274
- * template: `
275
- * <kendo-barcode type="EAN8" value="1234567"
276
- * [width]="200" [height]="100">
277
- * </kendo-barcode>
91
+ * Sets the width of the Barcode in pixels.
278
92
  *
279
- * <kendo-barcode type="EAN8" value="1234567"
280
- * [style.width.px]="200" [style.height.px]="100">
281
- * </kendo-barcode>
282
- * `
283
- * })
284
- * export class AppComponent {
285
- * }
286
- * ```
93
+ * You can also set the Barcode dimensions using CSS.
287
94
  */
288
95
  width?: number;
289
96
  /**
290
- * Limits the automatic resizing of the Barcode. Sets the maximum number of times per second
291
- * that the component redraws its content when the size of its container changes.
292
- * Defaults to `10`. To disable the automatic resizing, set it to `0`.
97
+ * Limits how often the Barcode resizes automatically. Sets the maximum number of redraws per second when the container size changes.
98
+ * Set to `0` to disable automatic resizing.
293
99
  *
294
- * @example
295
- * ```ts
296
- * _@Component({
297
- * selector: 'my-app',
298
- * template: `
299
- * <kendo-barcode type="EAN8" [value]="1234567"
300
- * [resizeRateLimit]="2">
301
- * </kendo-barcode>
302
- * `
303
- * })
304
- * export class AppComponent {
305
- * }
306
- * ```
100
+ * @default 10
307
101
  */
308
102
  resizeRateLimit: number;
309
103
  protected get options(): BarcodeOptions;
@@ -5,34 +5,26 @@
5
5
  import * as i0 from "@angular/core";
6
6
  import * as i1 from "./barcode.component";
7
7
  /**
8
- * Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi'])
9
- * definition for the Barcode component.
8
+ * Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi']) definition for the Barcode component.
9
+ *
10
+ * Use this module to add Barcode support to your application.
10
11
  *
11
12
  * @example
12
13
  *
13
- * ```ts-no-run
14
- * // Import the Barcode module
14
+ * ```ts
15
+ * // Import the BarcodeModule.
15
16
  * import { BarcodeModule } from '@progress/kendo-angular-barcodes';
16
17
  *
17
- * // The browser platform with a compiler
18
- * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
19
- *
20
18
  * import { NgModule } from '@angular/core';
21
- *
22
- * // Import the app component
19
+ * import { BrowserModule } from '@angular/platform-browser';
23
20
  * import { AppComponent } from './app.component';
24
21
  *
25
- * // Define the app module
26
- * _@NgModule({
27
- * declarations: [AppComponent], // declare app component
28
- * imports: [BrowserModule, BarcodeModule], // import Barcode module
29
- * bootstrap: [AppComponent]
22
+ * @NgModule({
23
+ * declarations: [AppComponent],
24
+ * imports: [BrowserModule, BarcodeModule],
25
+ * bootstrap: [AppComponent]
30
26
  * })
31
27
  * export class AppModule {}
32
- *
33
- * // Compile and launch the module
34
- * platformBrowserDynamic().bootstrapModule(AppModule);
35
- *
36
28
  * ```
37
29
  */
38
30
  export declare class BarcodeModule {
@@ -6,34 +6,26 @@ import * as i0 from "@angular/core";
6
6
  import * as i1 from "./barcode.component";
7
7
  import * as i2 from "./qrcode.component";
8
8
  /**
9
- * Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi'])
10
- * definition for the Barcode and QR Code components.
9
+ * Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi']) definition for the Barcode and QR Code components.
10
+ *
11
+ * Use this module to add Barcode and QR Code features to your application.
11
12
  *
12
13
  * @example
13
14
  *
14
- * ```ts-no-run
15
- * // Import the Barcodes module
15
+ * ```ts
16
+ * // Import the Barcodes module.
16
17
  * import { BarcodesModule } from '@progress/kendo-angular-barcodes';
17
18
  *
18
- * // The browser platform with a compiler
19
- * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
20
- *
21
19
  * import { NgModule } from '@angular/core';
22
- *
23
- * // Import the app component
20
+ * import { BrowserModule } from '@angular/platform-browser';
24
21
  * import { AppComponent } from './app.component';
25
22
  *
26
- * // Define the app module
27
- * _@NgModule({
28
- * declarations: [AppComponent], // declare app component
29
- * imports: [BrowserModule, BarcodesModule], // import Barcodes module
30
- * bootstrap: [AppComponent]
23
+ * @NgModule({
24
+ * declarations: [AppComponent],
25
+ * imports: [BrowserModule, BarcodesModule],
26
+ * bootstrap: [AppComponent]
31
27
  * })
32
28
  * export class AppModule {}
33
- *
34
- * // Compile and launch the module
35
- * platformBrowserDynamic().bootstrapModule(AppModule);
36
- *
37
29
  * ```
38
30
  */
39
31
  export declare class BarcodesModule {
@@ -4,74 +4,74 @@
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import { Border, Margin, Padding, RenderMode } from './field-types';
6
6
  /**
7
- * Supported symbologies (encodings) for the Barcode component.
7
+ * Lists the supported symbologies (encodings) for the Barcode component.
8
8
  */
9
9
  export type BarcodeType = 'EAN8' | 'EAN13' | 'UPCE' | 'UPCA' | 'Code11' | 'Code39' | 'Code39Extended' | 'Code93' | 'Code93Extended' | 'Code128' | 'Code128A' | 'Code128B' | 'Code128C' | 'GS1-128' | 'MSImod10' | 'MSImod11' | 'MSImod1010' | 'MSImod1110' | 'POSTNET';
10
10
  /**
11
- * The Barcode text label configuration.
11
+ * Represents the Barcode text label.
12
12
  */
13
13
  export interface BarcodeText {
14
14
  /**
15
- * The color of the text. Any valid CSS color string will work here, including hex and rgb.
15
+ * Sets the color of the text. Accepts any valid CSS color string, including hex and rgb.
16
16
  *
17
17
  * @default "black"
18
18
  */
19
19
  color?: string;
20
20
  /**
21
- * The font of the text.
21
+ * Sets the font of the text.
22
22
  *
23
23
  * @default "16px Consolas, Monaco, Sans Mono, monospace, sans-serif"
24
24
  */
25
25
  font?: string;
26
26
  /**
27
- * The margin of the text. A numeric value sets all margins.
27
+ * Sets the margin of the text. A numeric value sets all margins.
28
28
  *
29
29
  * @default 0
30
30
  */
31
31
  margin?: Margin | number;
32
32
  /**
33
- * A flag indicating that the Barcode text label is visible.
33
+ * Shows or hides the Barcode text label.
34
34
  *
35
- * If set to `false`, the Barcode will not display the value as a text below the barcode lines.
35
+ * If you set this property to `false`, the Barcode does not display the value as text below the barcode lines.
36
36
  *
37
37
  * @default true
38
38
  */
39
39
  visible?: boolean;
40
40
  }
41
41
  /**
42
- * The Barcode configuration options.
42
+ * Represents the Barcode options.
43
43
  */
44
44
  export interface BarcodeOptions {
45
45
  /**
46
- * The background color of the Barcode. Accepts a valid CSS color string, including hex and rgb.
46
+ * Sets the background color of the Barcode. Accepts a valid CSS color string, including hex and rgb.
47
47
  *
48
48
  * @default "white"
49
49
  */
50
50
  background?: string;
51
51
  /**
52
- * The border of the Barcode.
52
+ * Sets the border of the Barcode.
53
53
  */
54
54
  border?: Border;
55
55
  /**
56
- * If set to `true`, the Barcode will display the checksum digit next to the value in the text area.
56
+ * Shows the checksum digit next to the value in the text area.
57
57
  *
58
58
  * @default true
59
59
  */
60
60
  checksum?: boolean;
61
61
  /**
62
- * The color of the Barcode. Accepts a valid CSS color string, including hex and rgb.
62
+ * Sets the color of the Barcode. Accepts a valid CSS color string, including hex and rgb.
63
63
  *
64
64
  * @default "black"
65
65
  */
66
66
  color?: string;
67
67
  /**
68
- * The height of the Barcode in pixels.
68
+ * Sets the height of the Barcode in pixels.
69
69
  *
70
70
  * @default 100
71
71
  */
72
72
  height?: number;
73
73
  /**
74
- * The padding of the Barcode. A numeric value sets all paddings.
74
+ * Sets the padding of the Barcode. A numeric value sets all paddings.
75
75
  *
76
76
  * @default 0
77
77
  */
@@ -79,29 +79,25 @@ export interface BarcodeOptions {
79
79
  /**
80
80
  * Sets the preferred rendering mode of the Barcode.
81
81
  *
82
- * The supported values are:
83
- * * `"canvas"`&mdash;Renders the component as a Canvas element.
84
- * * `"svg"`&mdash;Renders the component as an inline SVG document.
85
- *
86
82
  * @default "svg"
87
83
  */
88
84
  renderAs?: RenderMode;
89
85
  /**
90
- * The Barcode text label configuration.
86
+ * Configures the Barcode text label.
91
87
  */
92
88
  text?: BarcodeText;
93
89
  /**
94
- * The symbology (encoding) the Barcode will use.
90
+ * Sets the symbology (encoding) the Barcode uses.
95
91
  *
96
92
  * @default "Code39"
97
93
  */
98
94
  type: BarcodeType;
99
95
  /**
100
- * The value of the Barcode.
96
+ * Sets the value of the Barcode.
101
97
  */
102
98
  value: number | string;
103
99
  /**
104
- * The width of the Barcode in pixels.
100
+ * Sets the width of the Barcode in pixels.
105
101
  *
106
102
  * @default 300
107
103
  */
@@ -3,65 +3,65 @@
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  /**
6
- * The dash line type.
6
+ * Lists the dash line types.
7
7
  */
8
8
  export type DashType = 'dash' | 'dashDot' | 'dot' | 'longDash' | 'longDashDot' | 'longDashDotDot' | 'solid';
9
9
  /**
10
- * The appearance settings for the border lines.
10
+ * Represents the appearance settings for border lines.
11
11
  */
12
12
  export interface Border {
13
13
  /**
14
- * The color of the border line. Accepts a valid CSS color string, including hex and rgb.
14
+ * Sets the color of the border line. Accepts a valid CSS color string, including hex and rgb.
15
15
  */
16
16
  color?: string;
17
17
  /**
18
- * The dash type of the border line.
18
+ * Sets the dash type of the border line.
19
19
  */
20
20
  dashType?: DashType;
21
21
  /**
22
- * The width of the border line in pixels.
22
+ * Sets the width of the border line in pixels.
23
23
  */
24
24
  width?: number;
25
25
  }
26
26
  /**
27
- * The margin size for each side.
27
+ * Represents the margin options for each side.
28
28
  */
29
29
  export interface Margin {
30
30
  /**
31
- * The top margin in pixels.
31
+ * Sets the top margin in pixels.
32
32
  */
33
33
  top?: number;
34
34
  /**
35
- * The right margin in pixels.
35
+ * Sets the right margin in pixels.
36
36
  */
37
37
  right?: number;
38
38
  /**
39
- * The bottom margin in pixels.
39
+ * Sets the bottom margin in pixels.
40
40
  */
41
41
  bottom?: number;
42
42
  /**
43
- * The left margin in pixels.
43
+ * Sets the left margin in pixels.
44
44
  */
45
45
  left?: number;
46
46
  }
47
47
  /**
48
- * The padding size for each side.
48
+ * Represents the padding options for each side.
49
49
  */
50
50
  export interface Padding {
51
51
  /**
52
- * The top padding in pixels.
52
+ * Sets the top padding in pixels.
53
53
  */
54
54
  top?: number;
55
55
  /**
56
- * The right padding in pixels.
56
+ * Sets the right padding in pixels.
57
57
  */
58
58
  right?: number;
59
59
  /**
60
- * The bottom padding in pixels.
60
+ * Sets the bottom padding in pixels.
61
61
  */
62
62
  bottom?: number;
63
63
  /**
64
- * The left padding in pixels.
64
+ * Sets the left padding in pixels.
65
65
  */
66
66
  left?: number;
67
67
  }