@progress/kendo-react-barcodes 7.2.4-develop.3 → 7.3.0-develop.1

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 (45) hide show
  1. package/Barcode.js +8 -0
  2. package/Barcode.mjs +95 -0
  3. package/BarcodeContext.js +8 -0
  4. package/BarcodeContext.mjs +14 -0
  5. package/BaseBarcode.js +8 -0
  6. package/BaseBarcode.mjs +137 -0
  7. package/QRCode.js +8 -0
  8. package/QRCode.mjs +96 -0
  9. package/dist/cdn/js/kendo-react-barcodes.js +8 -5
  10. package/index.d.mts +418 -5
  11. package/index.d.ts +418 -10
  12. package/index.js +8 -5
  13. package/index.mjs +11 -333
  14. package/package-metadata.js +8 -0
  15. package/package-metadata.mjs +19 -0
  16. package/package.json +3 -3
  17. package/store/reducer.js +8 -0
  18. package/store/reducer.mjs +24 -0
  19. package/store/store.js +8 -0
  20. package/store/store.mjs +20 -0
  21. package/utils/common.js +8 -0
  22. package/utils/common.mjs +29 -0
  23. package/Barcode.d.ts +0 -53
  24. package/BarcodeContext.d.ts +0 -16
  25. package/BarcodeProps.d.ts +0 -65
  26. package/BaseBarcode.d.ts +0 -79
  27. package/BaseBarcodeProps.d.ts +0 -48
  28. package/QRCode.d.ts +0 -53
  29. package/QRCodeProps.d.ts +0 -77
  30. package/common/barcodes.d.ts +0 -8
  31. package/package-metadata.d.ts +0 -9
  32. package/store/reducer.d.ts +0 -14
  33. package/store/store.d.ts +0 -29
  34. package/types/barcode-text.d.ts +0 -36
  35. package/types/barcode-type.d.ts +0 -8
  36. package/types/border.interface.d.ts +0 -22
  37. package/types/dash-type.interface.d.ts +0 -8
  38. package/types/margin.interface.d.ts +0 -25
  39. package/types/padding.interface.d.ts +0 -25
  40. package/types/qrcode-encoding.d.ts +0 -8
  41. package/types/qrcode-error-correction.d.ts +0 -13
  42. package/types/qrcode-overlay.d.ts +0 -29
  43. package/types/render-mode.d.ts +0 -12
  44. package/types.d.ts +0 -14
  45. package/utils/common.d.ts +0 -8
package/BaseBarcode.d.ts DELETED
@@ -1,79 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the package root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import * as React from 'react';
6
- import PropTypes from 'prop-types';
7
- import { Surface } from '@progress/kendo-drawing';
8
- import { BaseBarcodePrivateProps } from './BaseBarcodeProps';
9
- import { BarcodeContextType } from './BarcodeContext';
10
- /**
11
- * @hidden
12
- */
13
- export declare class BaseBarcode extends React.Component<BaseBarcodePrivateProps, {}> {
14
- /**
15
- * @hidden
16
- */
17
- static propTypes: {
18
- dir: PropTypes.Requireable<string>;
19
- renderAs: PropTypes.Requireable<string>;
20
- };
21
- /**
22
- * @hidden
23
- */
24
- static defaultProps: {
25
- renderAs: string;
26
- };
27
- /**
28
- * @hidden
29
- */
30
- barcodeInstance: any | null;
31
- /**
32
- * @hidden
33
- */
34
- surface: Surface | null;
35
- /**
36
- * @hidden
37
- */
38
- get element(): HTMLDivElement;
39
- protected _element: HTMLDivElement | null;
40
- protected contextValue: BarcodeContextType;
41
- protected observersStore: any;
42
- constructor(props: BaseBarcodePrivateProps);
43
- /**
44
- * @hidden
45
- */
46
- componentDidMount(): void;
47
- /**
48
- * @hidden
49
- */
50
- componentDidUpdate(prevProps: any): void;
51
- /**
52
- * @hidden
53
- */
54
- componentWillUnmount(): void;
55
- /**
56
- * @hidden
57
- */
58
- render(): any;
59
- /**
60
- * @hidden
61
- */
62
- instantiateCoreBarcode(): void;
63
- /**
64
- * @hidden
65
- */
66
- refresh(): void;
67
- /**
68
- * @hidden
69
- */
70
- getBarcodeOptions(): any;
71
- /**
72
- * @hidden
73
- */
74
- trigger(name: string, e: any): void;
75
- /**
76
- * @hidden
77
- */
78
- onWindowResize: () => void;
79
- }
@@ -1,48 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the package root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { Barcodes } from './common/barcodes';
6
- import { RenderMode } from './types';
7
- /**
8
- * @hidden
9
- */
10
- export interface BaseBarcodePrivateProps extends BaseBarcodeProps {
11
- /**
12
- * @hidden
13
- */
14
- deriveOptionsFromParent?: (options: any) => any;
15
- /**
16
- * @hidden
17
- */
18
- barcodeConstructor: any;
19
- /**
20
- * @hidden
21
- */
22
- getTarget: () => Barcodes;
23
- }
24
- /**
25
- * @hidden
26
- */
27
- export interface BaseBarcodeProps {
28
- /**
29
- * @hidden
30
- */
31
- children?: React.ReactNode;
32
- /**
33
- * The styles that are applied to the component.
34
- */
35
- style?: React.CSSProperties;
36
- /**
37
- * Sets additional CSS classes to the component.
38
- */
39
- className?: string;
40
- /**
41
- * Sets the preferred rendering engine.
42
- *
43
- * The supported values are:
44
- * - `"svg"`&mdash;If available, renders the component as an inline `svg` element.
45
- * - `"canvas"`&mdash;If available, renders the component as a `canvas` element.
46
- */
47
- renderAs?: RenderMode;
48
- }
package/QRCode.d.ts DELETED
@@ -1,53 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the package root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import * as React from 'react';
6
- import { QRCodeProps } from './QRCodeProps';
7
- import { Surface } from '@progress/kendo-drawing';
8
- import { Group, ImageExportOptions, SVGExportOptions } from '@progress/kendo-drawing';
9
- /**
10
- * Represents the KendoReact QRCode component.
11
- */
12
- export declare class QRCode extends React.Component<QRCodeProps, {}> {
13
- private _baseBarcode;
14
- /**
15
- * @hidden
16
- */
17
- get barcodeInstance(): any;
18
- /**
19
- * The Drawing `Surface` of the Barcode.
20
- */
21
- get surface(): Surface | null;
22
- /**
23
- * The DOM element of the Barcode.
24
- */
25
- get element(): HTMLDivElement | null;
26
- /**
27
- * @hidden
28
- */
29
- render(): any;
30
- /**
31
- * Exports the component as an image. The export operation is asynchronous and returns a promise.
32
- *
33
- * @param {ImageExportOptions} options - The parameters for the exported image.
34
- * @returns {Promise<string>} - A promise that will be resolved with a PNG image encoded as a Data URI.
35
- */
36
- exportImage(options?: ImageExportOptions): Promise<string>;
37
- /**
38
- * Exports the component as an SVG document. The export operation is asynchronous and returns a promise.
39
- *
40
- * @param options - The parameters for the exported file.
41
- * @returns - A promise that will be resolved with an SVG document that is encoded as a Data URI.
42
- */
43
- exportSVG(options?: SVGExportOptions): Promise<string>;
44
- /**
45
- * Exports a Barcode component as a Drawing `Scene`.
46
- *
47
- * @param {any} options - The parameters for the export operation.
48
- * @returns {Group} - A promise that returns the root `Group` of the scene.
49
- */
50
- exportVisual(options?: any): Group;
51
- private getTarget;
52
- private deriveOptionsFromParent;
53
- }
package/QRCodeProps.d.ts DELETED
@@ -1,77 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the package root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { BaseBarcodeProps } from './BaseBarcodeProps';
6
- import { Border, QRCodeEncoding, QRCodeErrorCorrection, QRCodeOverlay } from './types';
7
- /**
8
- * Represents the props of the [KendoReact QRCode component]({% slug overview_qrcode_barcodes %}).
9
- */
10
- export interface QRCodeProps extends BaseBarcodeProps {
11
- /**
12
- * The background color of the QR Code. Accepts a valid CSS color string, including hex and rgb.
13
- *
14
- * @default "white"
15
- */
16
- background?: string;
17
- /**
18
- * The border of the QR Code.
19
- */
20
- border?: Border;
21
- /**
22
- * The color of the QR Code. Accepts a valid CSS color string, including hex and rgb.
23
- *
24
- * @default "black"
25
- */
26
- color?: string;
27
- /**
28
- * The encoding mode used to encode the value.
29
- *
30
- * > **Important** The UTF-8 encoding is not included in the specifications and is not supported by all readers.
31
- *
32
- * The possible values are:
33
- * * `"ISO_8859_1"`&mdash;Supports all characters from the [ISO/IEC 8859-1](https://en.wikipedia.org/wiki/ISO/IEC_8859-1) character set.
34
- * * `"UTF_8"`&mdash;Supports all [Unicode](https://en.wikipedia.org/wiki/List_of_Unicode_characters) characters.
35
- *
36
- * @default "ISO_8859_1"
37
- */
38
- encoding?: QRCodeEncoding;
39
- /**
40
- * The error correction level to use.
41
- *
42
- * The possible values are:
43
- * * `"L"`&mdash;Approximately 7% of the codewords can be restored.
44
- * * `"M"`&mdash;Approximately 15% of the codewords can be restored.
45
- * * `"Q"`&mdash;Approximately 25% of the codewords can be restored.
46
- * * `"H"`&mdash;Approximately 30% of the codewords can be restored.
47
- *
48
- * @default "L"
49
- */
50
- errorCorrection?: QRCodeErrorCorrection;
51
- /**
52
- * An optional image overlay that will placed over the QR Code.
53
- *
54
- * > **Note** Always test if the code reads correctly with the applied overlay.
55
- * > Depending on the length of the value and the size of the overlay, you might need to raise the `errorCorrection` level to `"M"` or `"H"`.
56
- */
57
- overlay?: QRCodeOverlay;
58
- /**
59
- * The padding of the QR Code. A numeric value sets all paddings.
60
- *
61
- * @default 0
62
- */
63
- padding?: number;
64
- /**
65
- * Specifies the size of a QR Code. Numeric values are treated as pixels.
66
- *
67
- * If no size is specified, the size will be determined from the element width and height.
68
- * If the element has width or height of zero, a default value of 200 pixels will be used.
69
- *
70
- * @default "200px"
71
- */
72
- size?: number | string;
73
- /**
74
- * The value of the QR Code.
75
- */
76
- value: number | string;
77
- }
@@ -1,8 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the package root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { Barcode } from './../Barcode';
6
- import { QRCode } from './../QRCode';
7
- type Barcodes = Barcode | QRCode;
8
- export { Barcodes };
@@ -1,9 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the package root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { PackageMetadata } from '@progress/kendo-licensing';
6
- /**
7
- * @hidden
8
- */
9
- export declare const packageMetadata: PackageMetadata;
@@ -1,14 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the package root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { StoreAction } from './store';
6
- /**
7
- * @hidden
8
- */
9
- declare const optionsReducer: (currentState: any, action: StoreAction) => object;
10
- /**
11
- * @hidden
12
- */
13
- declare const observersReducer: (currentState: any, action: StoreAction) => any;
14
- export { optionsReducer, observersReducer };
package/store/store.d.ts DELETED
@@ -1,29 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the package root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- /**
6
- * @hidden
7
- */
8
- export declare const THROTTLE_MS: number;
9
- /**
10
- * @hidden
11
- */
12
- export interface StoreAction {
13
- barcodeKey?: string;
14
- type?: string;
15
- payload: any;
16
- }
17
- /**
18
- * @hidden
19
- */
20
- export interface Store {
21
- getState(): any;
22
- dispatch(action: StoreAction | object): void;
23
- subscribe(f: Function): Function;
24
- }
25
- /**
26
- * @hidden
27
- */
28
- declare const createStore: (reducer: any) => Store;
29
- export default createStore;
@@ -1,36 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the package root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { Margin } from './margin.interface';
6
- /**
7
- * The Barcode text label configuration.
8
- */
9
- export interface BarcodeText {
10
- /**
11
- * The color of the text. Any valid CSS color string will work here, including hex and rgb.
12
- *
13
- * @default "black"
14
- */
15
- color?: string;
16
- /**
17
- * The font of the text.
18
- *
19
- * @default "16px Consolas, Monaco, Sans Mono, monospace, sans-serif"
20
- */
21
- font?: string;
22
- /**
23
- * The margin of the text. A numeric value sets all margins.
24
- *
25
- * @default 0
26
- */
27
- margin?: Margin | number;
28
- /**
29
- * A flag indicating that the Barcode text label is visible.
30
- *
31
- * If set to `false`, the Barcode will not display the value as a text below the barcode lines.
32
- *
33
- * @default true
34
- */
35
- visible?: boolean;
36
- }
@@ -1,8 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the package root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- /**
6
- * Supported symbologies (encodings) for the Barcode component.
7
- */
8
- export type BarcodeType = 'EAN8' | 'EAN13' | 'UPCE' | 'UPCA' | 'Code11' | 'Code39' | 'Code39Extended' | 'Code93' | 'Code93Extended' | 'Code128' | 'Code128A' | 'Code128B' | 'Code128C' | 'GS1-128' | 'MSImod10' | 'MSImod11' | 'MSImod1010' | 'MSImod1110' | 'POSTNET';
@@ -1,22 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the package root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { DashType } from './dash-type.interface';
6
- /**
7
- * The appearance settings for the border lines.
8
- */
9
- export interface Border {
10
- /**
11
- * The color of the border line. Accepts valid CSS color strings, including hex and rgb.
12
- */
13
- color?: string;
14
- /**
15
- * The dash type of the border line.
16
- */
17
- dashType?: DashType;
18
- /**
19
- * The width of the border line in pixels.
20
- */
21
- width?: number;
22
- }
@@ -1,8 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the package root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- /**
6
- * The dash line type.
7
- */
8
- export type DashType = 'dash' | 'dashDot' | 'dot' | 'longDash' | 'longDashDot' | 'longDashDotDot' | 'solid';
@@ -1,25 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the package root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- /**
6
- * The margin size for each side.
7
- */
8
- export interface Margin {
9
- /**
10
- * The top margin in pixels.
11
- */
12
- top?: number;
13
- /**
14
- * The right margin in pixels.
15
- */
16
- right?: number;
17
- /**
18
- * The bottom margin in pixels.
19
- */
20
- bottom?: number;
21
- /**
22
- * The left margin in pixels.
23
- */
24
- left?: number;
25
- }
@@ -1,25 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the package root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- /**
6
- * The padding size for each side.
7
- */
8
- export interface Padding {
9
- /**
10
- * The top padding in pixels.
11
- */
12
- top?: number;
13
- /**
14
- * The right padding in pixels.
15
- */
16
- right?: number;
17
- /**
18
- * The bottom padding in pixels.
19
- */
20
- bottom?: number;
21
- /**
22
- * The left padding in pixels.
23
- */
24
- left?: number;
25
- }
@@ -1,8 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the package root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- /**
6
- * The QR Code encoding modes.
7
- */
8
- export type QRCodeEncoding = 'ISO_8859_1' | 'UTF_8';
@@ -1,13 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the package root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- /**
6
- * The QR Code error correction levels.
7
- *
8
- * * `"L"`&mdash;Approximately 7% of the codewords can be restored.
9
- * * `"M"`&mdash;Approximately 15% of the codewords can be restored.
10
- * * `"Q"`&mdash;Approximately 25% of the codewords can be restored.
11
- * * `"H"`&mdash;Approximately 30% of the codewords can be restored.
12
- */
13
- export type QRCodeErrorCorrection = 'L' | 'M' | 'Q' | 'H';
@@ -1,29 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the package root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- /**
6
- * The image overlay configuration of the QR Code.
7
- */
8
- export interface QRCodeOverlay {
9
- /**
10
- * The overlay height in pixels.
11
- */
12
- height?: number;
13
- /**
14
- * The source image for the overlay.
15
- *
16
- * Required only when `type` is set to `'image'`.
17
- */
18
- imageUrl?: string;
19
- /**
20
- * The overlay type.
21
- *
22
- * @default 'image'
23
- */
24
- type?: 'image' | 'swiss';
25
- /**
26
- * The overlay width in pixels.
27
- */
28
- width?: number;
29
- }
@@ -1,12 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the package root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- /**
6
- * Sets the rendering mode of the component.
7
- *
8
- * The supported values are:
9
- * * `"canvas"`&mdash;Renders the component as a Canvas element.
10
- * * `"svg"`&mdash;Renders the component as an inline SVG document.
11
- */
12
- export type RenderMode = 'svg' | 'canvas';
package/types.d.ts DELETED
@@ -1,14 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the package root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- export type { Margin } from './types/margin.interface';
6
- export type { Padding } from './types/padding.interface';
7
- export type { Border } from './types/border.interface';
8
- export type { DashType } from './types/dash-type.interface';
9
- export type { BarcodeText } from './types/barcode-text';
10
- export type { BarcodeType } from './types/barcode-type';
11
- export type { QRCodeEncoding } from './types/qrcode-encoding';
12
- export type { QRCodeErrorCorrection } from './types/qrcode-error-correction';
13
- export type { QRCodeOverlay } from './types/qrcode-overlay';
14
- export type { RenderMode } from './types/render-mode';
package/utils/common.d.ts DELETED
@@ -1,8 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the package root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- /**
6
- * @hidden
7
- */
8
- export declare const isOptionsChanged: (original: any, current: any) => boolean;