@progress/kendo-react-barcodes 12.0.2-develop.1 → 12.0.2-develop.3
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/Barcode.mjs +7 -7
- package/QRCode.mjs +7 -7
- package/dist/cdn/js/kendo-react-barcodes.js +1 -1
- package/index.d.mts +85 -59
- package/index.d.ts +85 -59
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +4 -4
package/Barcode.mjs
CHANGED
|
@@ -32,13 +32,13 @@ class g extends r.Component {
|
|
|
32
32
|
return this._baseBarcode !== null ? this._baseBarcode.barcodeInstance : null;
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
35
|
-
*
|
|
35
|
+
* Gets the Drawing `Surface` of the Barcode.
|
|
36
36
|
*/
|
|
37
37
|
get surface() {
|
|
38
38
|
return this._baseBarcode !== null ? this._baseBarcode.surface : null;
|
|
39
39
|
}
|
|
40
40
|
/**
|
|
41
|
-
*
|
|
41
|
+
* Gets the DOM element of the Barcode.
|
|
42
42
|
*/
|
|
43
43
|
get element() {
|
|
44
44
|
return this._baseBarcode !== null ? this._baseBarcode.element : null;
|
|
@@ -64,19 +64,19 @@ class g extends r.Component {
|
|
|
64
64
|
);
|
|
65
65
|
}
|
|
66
66
|
/**
|
|
67
|
-
* Exports the component as an image. The export operation
|
|
67
|
+
* Exports the component as an image. The export operation runs asynchronously and returns a promise.
|
|
68
68
|
*
|
|
69
69
|
* @param {ImageExportOptions} options - The parameters for the exported image.
|
|
70
|
-
* @returns {Promise<string>} - A promise that
|
|
70
|
+
* @returns {Promise<string>} - A promise that resolves with a PNG image encoded as a Data URI.
|
|
71
71
|
*/
|
|
72
72
|
exportImage(e = {}) {
|
|
73
73
|
return n(this.exportVisual(), e);
|
|
74
74
|
}
|
|
75
75
|
/**
|
|
76
|
-
* Exports the component as an SVG document. The export operation
|
|
76
|
+
* Exports the component as an SVG document. The export operation runs asynchronously and returns a promise.
|
|
77
77
|
*
|
|
78
78
|
* @param options - The parameters for the exported file.
|
|
79
|
-
* @returns
|
|
79
|
+
* @returns A promise that resolves with an SVG document that is encoded as a Data URI.
|
|
80
80
|
*/
|
|
81
81
|
exportSVG(e = {}) {
|
|
82
82
|
return p(this.exportVisual(), e);
|
|
@@ -85,7 +85,7 @@ class g extends r.Component {
|
|
|
85
85
|
* Exports a Barcode component as a Drawing `Scene`.
|
|
86
86
|
*
|
|
87
87
|
* @param {any} options - The parameters for the export operation.
|
|
88
|
-
* @returns {Group}
|
|
88
|
+
* @returns {Group} A promise that returns the root `Group` of the scene.
|
|
89
89
|
*/
|
|
90
90
|
exportVisual(e) {
|
|
91
91
|
return this.barcodeInstance !== null ? this.barcodeInstance.exportVisual(e) : new c();
|
package/QRCode.mjs
CHANGED
|
@@ -33,13 +33,13 @@ class _ extends e.Component {
|
|
|
33
33
|
return this._baseBarcode !== null ? this._baseBarcode.barcodeInstance : null;
|
|
34
34
|
}
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
36
|
+
* Gets the Drawing `Surface` of the Barcode.
|
|
37
37
|
*/
|
|
38
38
|
get surface() {
|
|
39
39
|
return this._baseBarcode !== null ? this._baseBarcode.surface : null;
|
|
40
40
|
}
|
|
41
41
|
/**
|
|
42
|
-
*
|
|
42
|
+
* Gets the DOM element of the Barcode.
|
|
43
43
|
*/
|
|
44
44
|
get element() {
|
|
45
45
|
return this._baseBarcode !== null ? this._baseBarcode.element : null;
|
|
@@ -65,19 +65,19 @@ class _ extends e.Component {
|
|
|
65
65
|
);
|
|
66
66
|
}
|
|
67
67
|
/**
|
|
68
|
-
* Exports the component as an image. The export operation
|
|
68
|
+
* Exports the component as an image. The export operation runs asynchronously and returns a promise.
|
|
69
69
|
*
|
|
70
70
|
* @param {ImageExportOptions} options - The parameters for the exported image.
|
|
71
|
-
* @returns {Promise<string>} - A promise that
|
|
71
|
+
* @returns {Promise<string>} - A promise that resolves with a PNG image encoded as a Data URI.
|
|
72
72
|
*/
|
|
73
73
|
exportImage(r = {}) {
|
|
74
74
|
return i(this.exportVisual(), r);
|
|
75
75
|
}
|
|
76
76
|
/**
|
|
77
|
-
* Exports the component as an SVG document. The export operation
|
|
77
|
+
* Exports the component as an SVG document. The export operation runs asynchronously and returns a promise.
|
|
78
78
|
*
|
|
79
79
|
* @param options - The parameters for the exported file.
|
|
80
|
-
* @returns
|
|
80
|
+
* @returns A promise that resolves with an SVG document that is encoded as a Data URI.
|
|
81
81
|
*/
|
|
82
82
|
exportSVG(r = {}) {
|
|
83
83
|
return c(this.exportVisual(), r);
|
|
@@ -86,7 +86,7 @@ class _ extends e.Component {
|
|
|
86
86
|
* Exports a Barcode component as a Drawing `Scene`.
|
|
87
87
|
*
|
|
88
88
|
* @param {any} options - The parameters for the export operation.
|
|
89
|
-
* @returns {Group}
|
|
89
|
+
* @returns {Group} A promise that returns the root `Group` of the scene.
|
|
90
90
|
*/
|
|
91
91
|
exportVisual(r) {
|
|
92
92
|
return this.barcodeInstance !== null ? this.barcodeInstance.exportVisual(r) : new p();
|
|
@@ -12,4 +12,4 @@
|
|
|
12
12
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
13
13
|
*-------------------------------------------------------------------------------------------
|
|
14
14
|
*/
|
|
15
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("prop-types"),require("@progress/kendo-react-common"),require("@progress/kendo-charts"),require("@progress/kendo-drawing")):"function"==typeof define&&define.amd?define(["exports","react","prop-types","@progress/kendo-react-common","@progress/kendo-charts","@progress/kendo-drawing"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactBarcodes={},e.React,e.PropTypes,e.KendoReactCommon,e.KendoCharts,e.KendoDrawing)}(this,(function(e,t,r,s,n,o){"use strict";function a(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var i=a(t);const c=(e,t)=>{if(!t.type)return[];switch(t.type){case"add":return[...e,t.payload];case"remove":return e.filter((e=>e!==t.payload));default:return e}},d=e=>"object"==typeof e,l=(e,t)=>{if(Object.keys(e).length!==Object.keys(t).length)return!0;for(const r in e)if(e.hasOwnProperty(r)){const s=e[r],n=t[r];if(d(s)&&d(n)?l(s,n):s!==n)return!0}return!1},p=(e,t)=>{if(!e||!t||(e=[].concat(e),t=[].concat(t),e.length!==t.length))return!0;for(let r=0;r<e.length;r++)if(l(e[r],t[r]))return!0;return!1},h=i.createContext(null);h.displayName="BarcodeContext";const u=Object.freeze({name:"@progress/kendo-react-barcodes",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:0,version:"12.0.2-develop.
|
|
15
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("prop-types"),require("@progress/kendo-react-common"),require("@progress/kendo-charts"),require("@progress/kendo-drawing")):"function"==typeof define&&define.amd?define(["exports","react","prop-types","@progress/kendo-react-common","@progress/kendo-charts","@progress/kendo-drawing"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactBarcodes={},e.React,e.PropTypes,e.KendoReactCommon,e.KendoCharts,e.KendoDrawing)}(this,(function(e,t,r,s,n,o){"use strict";function a(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var i=a(t);const c=(e,t)=>{if(!t.type)return[];switch(t.type){case"add":return[...e,t.payload];case"remove":return e.filter((e=>e!==t.payload));default:return e}},d=e=>"object"==typeof e,l=(e,t)=>{if(Object.keys(e).length!==Object.keys(t).length)return!0;for(const r in e)if(e.hasOwnProperty(r)){const s=e[r],n=t[r];if(d(s)&&d(n)?l(s,n):s!==n)return!0}return!1},p=(e,t)=>{if(!e||!t||(e=[].concat(e),t=[].concat(t),e.length!==t.length))return!0;for(let r=0;r<e.length;r++)if(l(e[r],t[r]))return!0;return!1},h=i.createContext(null);h.displayName="BarcodeContext";const u=Object.freeze({name:"@progress/kendo-react-barcodes",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:0,version:"12.0.2-develop.3",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"}),g=class extends i.Component{constructor(e){super(e),this.barcodeInstance=null,this.surface=null,this._element=null,this.observersStore={},this.showLicenseWatermark=!1,this.onWindowResize=()=>{null!==this.barcodeInstance&&(this.barcodeInstance.redraw(),this.trigger("render",{sender:this}))},this.showLicenseWatermark=!s.validatePackage(u,{component:"Barcode"}),this.licenseMessage=s.getLicenseMessage(u),this.observersStore=(e=>{let t,r,n=[];const o=o=>{t=e(t,o),s.canUseDOM&&(window.clearTimeout(r),r=window.setTimeout((()=>n.forEach((e=>e()))),16.666666666666668))};return o({}),{getState:()=>t,dispatch:o,subscribe:e=>(n.push(e),()=>n=n.filter((t=>t!==e)))}})(c),this.contextValue={observersStore:this.observersStore}}get element(){return this._element}componentDidMount(){this.instantiateCoreBarcode(),window.addEventListener("resize",this.onWindowResize),this.trigger("render",{sender:this})}componentDidUpdate(e){const{children:t,deriveOptionsFromParent:r,getTarget:s,barcodeConstructor:n,className:o,renderAs:a,...i}=this.props,{children:c,deriveOptionsFromParent:d,getTarget:l,barcodeConstructor:h,className:u,renderAs:g,...b}=e;if(null!==this.barcodeInstance){const e=p(b,i);(a||"svg")!==(g||"svg")?(null!==this.barcodeInstance&&(this.barcodeInstance.destroy(),this.barcodeInstance=null),this.instantiateCoreBarcode()):e&&this.refresh(),this.trigger("render",{sender:this})}}componentWillUnmount(){null!==this.barcodeInstance&&(this.barcodeInstance.destroy(),this.barcodeInstance=null),window.removeEventListener("resize",this.onWindowResize)}render(){const{style:e={},className:t,children:r}=this.props;return i.createElement(h.Provider,{value:this.contextValue},i.createElement("div",{style:e,ref:e=>{this._element=e},className:t},r,this.showLicenseWatermark&&i.createElement(s.WatermarkOverlay,{message:this.licenseMessage})))}instantiateCoreBarcode(){const{barcodeConstructor:e}=this.props,t=this.getBarcodeOptions();this.barcodeInstance=new e(this.element,t,(e=>{if("production"!==process.env.NODE_ENV)throw e;console.warn(e)}))}refresh(){if(null!==this.barcodeInstance){const e=this.getBarcodeOptions();this.barcodeInstance.setOptions(e)}}getBarcodeOptions(){const{renderAs:e,deriveOptionsFromParent:t}=this.props;let r={renderAs:e};return t&&(r=t(r)),r}trigger(e,t){const r=this.observersStore.getState();for(let s=0;s<r.length;s++)r[s].trigger(e,t)}};g.propTypes={dir:r.string,renderAs:r.oneOf(["svg","canvas"])},g.defaultProps={renderAs:"svg"};let b=g;class m extends i.Component{constructor(){super(...arguments),this._baseBarcode=null,this.getTarget=()=>this,this.deriveOptionsFromParent=e=>Object.assign({},e,{background:this.props.background,border:this.props.border,checksum:this.props.checksum,color:this.props.color,height:this.props.height,padding:this.props.padding,text:this.props.text,type:this.props.type,value:this.props.value,width:this.props.width})}get barcodeInstance(){return null!==this._baseBarcode?this._baseBarcode.barcodeInstance:null}get surface(){return null!==this._baseBarcode?this._baseBarcode.surface:null}get element(){return null!==this._baseBarcode?this._baseBarcode.element:null}render(){const{children:e,className:t,...r}=this.props;return i.createElement(b,{...r,deriveOptionsFromParent:this.deriveOptionsFromParent,ref:e=>{this._baseBarcode=e},barcodeConstructor:n.Barcode,getTarget:this.getTarget,className:s.classNames("k-barcode",t)},e)}exportImage(e={}){return o.exportImage(this.exportVisual(),e)}exportSVG(e={}){return o.exportSVG(this.exportVisual(),e)}exportVisual(e){return null!==this.barcodeInstance?this.barcodeInstance.exportVisual(e):new o.Group}}class f extends i.Component{constructor(){super(...arguments),this._baseBarcode=null,this.getTarget=()=>this,this.deriveOptionsFromParent=e=>Object.assign({},e,{background:this.props.background||"#fff",border:this.props.border,color:this.props.color||"#000",encoding:this.props.encoding,errorCorrection:this.props.errorCorrection||"L",overlay:this.props.overlay||{},padding:this.props.padding,renderAs:this.props.renderAs,size:this.props.size,value:this.props.value})}get barcodeInstance(){return null!==this._baseBarcode?this._baseBarcode.barcodeInstance:null}get surface(){return null!==this._baseBarcode?this._baseBarcode.surface:null}get element(){return null!==this._baseBarcode?this._baseBarcode.element:null}render(){const{children:e,className:t,...r}=this.props;return i.createElement(b,{...r,deriveOptionsFromParent:this.deriveOptionsFromParent,ref:e=>{this._baseBarcode=e},barcodeConstructor:n.QRCode,getTarget:this.getTarget,className:s.classNames("k-qrcode",t)},e)}exportImage(e={}){return o.exportImage(this.exportVisual(),e)}exportSVG(e={}){return o.exportSVG(this.exportVisual(),e)}exportVisual(e){return null!==this.barcodeInstance?this.barcodeInstance.exportVisual(e):new o.Group}}e.Barcode=m,e.QRCode=f}));
|
package/index.d.mts
CHANGED
|
@@ -21,11 +21,11 @@ export declare class Barcode extends React_2.Component<BarcodeProps, {}> {
|
|
|
21
21
|
*/
|
|
22
22
|
get barcodeInstance(): any;
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
24
|
+
* Gets the Drawing `Surface` of the Barcode.
|
|
25
25
|
*/
|
|
26
26
|
get surface(): Surface | null;
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* Gets the DOM element of the Barcode.
|
|
29
29
|
*/
|
|
30
30
|
get element(): HTMLDivElement | null;
|
|
31
31
|
/**
|
|
@@ -33,24 +33,24 @@ export declare class Barcode extends React_2.Component<BarcodeProps, {}> {
|
|
|
33
33
|
*/
|
|
34
34
|
render(): any;
|
|
35
35
|
/**
|
|
36
|
-
* Exports the component as an image. The export operation
|
|
36
|
+
* Exports the component as an image. The export operation runs asynchronously and returns a promise.
|
|
37
37
|
*
|
|
38
38
|
* @param {ImageExportOptions} options - The parameters for the exported image.
|
|
39
|
-
* @returns {Promise<string>} - A promise that
|
|
39
|
+
* @returns {Promise<string>} - A promise that resolves with a PNG image encoded as a Data URI.
|
|
40
40
|
*/
|
|
41
41
|
exportImage(options?: ImageExportOptions): Promise<string>;
|
|
42
42
|
/**
|
|
43
|
-
* Exports the component as an SVG document. The export operation
|
|
43
|
+
* Exports the component as an SVG document. The export operation runs asynchronously and returns a promise.
|
|
44
44
|
*
|
|
45
45
|
* @param options - The parameters for the exported file.
|
|
46
|
-
* @returns
|
|
46
|
+
* @returns A promise that resolves with an SVG document that is encoded as a Data URI.
|
|
47
47
|
*/
|
|
48
48
|
exportSVG(options?: SVGExportOptions): Promise<string>;
|
|
49
49
|
/**
|
|
50
50
|
* Exports a Barcode component as a Drawing `Scene`.
|
|
51
51
|
*
|
|
52
52
|
* @param {any} options - The parameters for the export operation.
|
|
53
|
-
* @returns {Group}
|
|
53
|
+
* @returns {Group} A promise that returns the root `Group` of the scene.
|
|
54
54
|
*/
|
|
55
55
|
exportVisual(options?: any): Group;
|
|
56
56
|
private getTarget;
|
|
@@ -62,7 +62,7 @@ export declare class Barcode extends React_2.Component<BarcodeProps, {}> {
|
|
|
62
62
|
*/
|
|
63
63
|
export declare interface BarcodeProps extends BaseBarcodeProps {
|
|
64
64
|
/**
|
|
65
|
-
*
|
|
65
|
+
* Sets the background color of the Barcode. Accepts a valid CSS color string, including hex and rgb.
|
|
66
66
|
*
|
|
67
67
|
* @default "white"
|
|
68
68
|
* @example
|
|
@@ -70,14 +70,14 @@ export declare interface BarcodeProps extends BaseBarcodeProps {
|
|
|
70
70
|
*/
|
|
71
71
|
background?: string;
|
|
72
72
|
/**
|
|
73
|
-
*
|
|
73
|
+
* Sets the border of the Barcode. Accepts an object implementing the `Border` interface.
|
|
74
74
|
*
|
|
75
75
|
* @example
|
|
76
76
|
* <Barcode border={{ color: "black", width: 2 }} />
|
|
77
77
|
*/
|
|
78
78
|
border?: Border;
|
|
79
79
|
/**
|
|
80
|
-
*
|
|
80
|
+
* Shows or hides the checksum digit next to the value in the text area.
|
|
81
81
|
*
|
|
82
82
|
* @default false
|
|
83
83
|
* @example
|
|
@@ -85,7 +85,7 @@ export declare interface BarcodeProps extends BaseBarcodeProps {
|
|
|
85
85
|
*/
|
|
86
86
|
checksum?: boolean;
|
|
87
87
|
/**
|
|
88
|
-
*
|
|
88
|
+
* Sets the color of the Barcode. Accepts a valid CSS color string, including hex and rgb.
|
|
89
89
|
*
|
|
90
90
|
* @default "black"
|
|
91
91
|
* @example
|
|
@@ -93,15 +93,15 @@ export declare interface BarcodeProps extends BaseBarcodeProps {
|
|
|
93
93
|
*/
|
|
94
94
|
color?: string;
|
|
95
95
|
/**
|
|
96
|
-
*
|
|
97
|
-
*
|
|
96
|
+
* Sets the height of the Barcode in pixels.
|
|
97
|
+
* You can also set the Barcode dimensions through regular CSS styling.
|
|
98
98
|
*
|
|
99
99
|
* @example
|
|
100
100
|
* <Barcode height={100} />
|
|
101
101
|
*/
|
|
102
102
|
height?: number;
|
|
103
103
|
/**
|
|
104
|
-
*
|
|
104
|
+
* Sets the padding of the Barcode. Accepts a numeric value or an object implementing the `Padding` interface.
|
|
105
105
|
*
|
|
106
106
|
* @default 0
|
|
107
107
|
* @example
|
|
@@ -109,14 +109,14 @@ export declare interface BarcodeProps extends BaseBarcodeProps {
|
|
|
109
109
|
*/
|
|
110
110
|
padding?: Padding | number;
|
|
111
111
|
/**
|
|
112
|
-
*
|
|
112
|
+
* Sets the text label configuration of the Barcode. Accepts an object implementing the `BarcodeText` interface.
|
|
113
113
|
*
|
|
114
114
|
* @example
|
|
115
115
|
* <Barcode text={{ visible: true, position: "bottom", color: "black" }} />
|
|
116
116
|
*/
|
|
117
117
|
text?: BarcodeText;
|
|
118
118
|
/**
|
|
119
|
-
*
|
|
119
|
+
* Sets the symbology (encoding) that the Barcode will use. Accepts a value of type `BarcodeType` or a custom string.
|
|
120
120
|
*
|
|
121
121
|
* @default "Code39"
|
|
122
122
|
* @example
|
|
@@ -124,15 +124,15 @@ export declare interface BarcodeProps extends BaseBarcodeProps {
|
|
|
124
124
|
*/
|
|
125
125
|
type: BarcodeType | string;
|
|
126
126
|
/**
|
|
127
|
-
*
|
|
127
|
+
* Sets the value of the Barcode. Accepts a string or a number.
|
|
128
128
|
*
|
|
129
129
|
* @example
|
|
130
130
|
* <Barcode value="123456789" />
|
|
131
131
|
*/
|
|
132
132
|
value: number | string;
|
|
133
133
|
/**
|
|
134
|
-
*
|
|
135
|
-
*
|
|
134
|
+
* Sets the width of the Barcode in pixels.
|
|
135
|
+
* You can also set the Barcode dimensions through regular CSS styling.
|
|
136
136
|
*
|
|
137
137
|
* @example
|
|
138
138
|
* <Barcode width={200} />
|
|
@@ -145,27 +145,27 @@ export declare interface BarcodeProps extends BaseBarcodeProps {
|
|
|
145
145
|
*/
|
|
146
146
|
export declare interface BarcodeText {
|
|
147
147
|
/**
|
|
148
|
-
*
|
|
148
|
+
* Sets the color of the text. Any valid CSS color string will work here, including hex and rgb.
|
|
149
149
|
*
|
|
150
150
|
* @default "black"
|
|
151
151
|
*/
|
|
152
152
|
color?: string;
|
|
153
153
|
/**
|
|
154
|
-
*
|
|
154
|
+
* Sets the font of the text.
|
|
155
155
|
*
|
|
156
156
|
* @default "16px Consolas, Monaco, Sans Mono, monospace, sans-serif"
|
|
157
157
|
*/
|
|
158
158
|
font?: string;
|
|
159
159
|
/**
|
|
160
|
-
*
|
|
160
|
+
* Sets the margin of the text. A numeric value sets all margins.
|
|
161
161
|
*
|
|
162
162
|
* @default 0
|
|
163
163
|
*/
|
|
164
164
|
margin?: Margin | number;
|
|
165
165
|
/**
|
|
166
|
-
*
|
|
166
|
+
* Shows or hides the Barcode text label.
|
|
167
167
|
*
|
|
168
|
-
* If set to `false`, the Barcode will not display the value as
|
|
168
|
+
* If set to `false`, the Barcode will not display the value as text below the barcode lines.
|
|
169
169
|
*
|
|
170
170
|
* @default true
|
|
171
171
|
*/
|
|
@@ -186,7 +186,7 @@ declare interface BaseBarcodeProps {
|
|
|
186
186
|
*/
|
|
187
187
|
children?: React.ReactNode;
|
|
188
188
|
/**
|
|
189
|
-
*
|
|
189
|
+
* Sets the styles that the component applies.
|
|
190
190
|
*
|
|
191
191
|
* @example
|
|
192
192
|
* <Barcode style={{ backgroundColor: "lightgray" }} />
|
|
@@ -217,15 +217,21 @@ declare interface BaseBarcodeProps {
|
|
|
217
217
|
*/
|
|
218
218
|
export declare interface Border {
|
|
219
219
|
/**
|
|
220
|
-
*
|
|
220
|
+
* Sets the color of the border line. Accepts valid CSS color strings, including hex and rgb.
|
|
221
|
+
*
|
|
222
|
+
* @default "black"
|
|
221
223
|
*/
|
|
222
224
|
color?: string;
|
|
223
225
|
/**
|
|
224
|
-
*
|
|
226
|
+
* Sets the dash type of the border line.
|
|
227
|
+
*
|
|
228
|
+
* @default "solid"
|
|
225
229
|
*/
|
|
226
230
|
dashType?: DashType;
|
|
227
231
|
/**
|
|
228
|
-
*
|
|
232
|
+
* Sets the width of the border line in pixels.
|
|
233
|
+
*
|
|
234
|
+
* @default 0
|
|
229
235
|
*/
|
|
230
236
|
width?: number;
|
|
231
237
|
}
|
|
@@ -240,19 +246,27 @@ export declare type DashType = 'dash' | 'dashDot' | 'dot' | 'longDash' | 'longDa
|
|
|
240
246
|
*/
|
|
241
247
|
export declare interface Margin {
|
|
242
248
|
/**
|
|
243
|
-
*
|
|
249
|
+
* Sets the top margin in pixels.
|
|
250
|
+
*
|
|
251
|
+
* @default 0
|
|
244
252
|
*/
|
|
245
253
|
top?: number;
|
|
246
254
|
/**
|
|
247
|
-
*
|
|
255
|
+
* Sets the right margin in pixels.
|
|
256
|
+
*
|
|
257
|
+
* @default 0
|
|
248
258
|
*/
|
|
249
259
|
right?: number;
|
|
250
260
|
/**
|
|
251
|
-
*
|
|
261
|
+
* Sets the bottom margin in pixels.
|
|
262
|
+
*
|
|
263
|
+
* @default 0
|
|
252
264
|
*/
|
|
253
265
|
bottom?: number;
|
|
254
266
|
/**
|
|
255
|
-
*
|
|
267
|
+
* Sets the left margin in pixels.
|
|
268
|
+
*
|
|
269
|
+
* @default 0
|
|
256
270
|
*/
|
|
257
271
|
left?: number;
|
|
258
272
|
}
|
|
@@ -262,19 +276,27 @@ export declare interface Margin {
|
|
|
262
276
|
*/
|
|
263
277
|
export declare interface Padding {
|
|
264
278
|
/**
|
|
265
|
-
*
|
|
279
|
+
* Sets the top padding in pixels.
|
|
280
|
+
*
|
|
281
|
+
* @default 0
|
|
266
282
|
*/
|
|
267
283
|
top?: number;
|
|
268
284
|
/**
|
|
269
|
-
*
|
|
285
|
+
* Sets the right padding in pixels.
|
|
286
|
+
*
|
|
287
|
+
* @default 0
|
|
270
288
|
*/
|
|
271
289
|
right?: number;
|
|
272
290
|
/**
|
|
273
|
-
*
|
|
291
|
+
* Sets the bottom padding in pixels.
|
|
292
|
+
*
|
|
293
|
+
* @default 0
|
|
274
294
|
*/
|
|
275
295
|
bottom?: number;
|
|
276
296
|
/**
|
|
277
|
-
*
|
|
297
|
+
* Sets the left padding in pixels.
|
|
298
|
+
*
|
|
299
|
+
* @default 0
|
|
278
300
|
*/
|
|
279
301
|
left?: number;
|
|
280
302
|
}
|
|
@@ -289,11 +311,11 @@ export declare class QRCode extends React_2.Component<QRCodeProps, {}> {
|
|
|
289
311
|
*/
|
|
290
312
|
get barcodeInstance(): any;
|
|
291
313
|
/**
|
|
292
|
-
*
|
|
314
|
+
* Gets the Drawing `Surface` of the Barcode.
|
|
293
315
|
*/
|
|
294
316
|
get surface(): Surface | null;
|
|
295
317
|
/**
|
|
296
|
-
*
|
|
318
|
+
* Gets the DOM element of the Barcode.
|
|
297
319
|
*/
|
|
298
320
|
get element(): HTMLDivElement | null;
|
|
299
321
|
/**
|
|
@@ -301,24 +323,24 @@ export declare class QRCode extends React_2.Component<QRCodeProps, {}> {
|
|
|
301
323
|
*/
|
|
302
324
|
render(): any;
|
|
303
325
|
/**
|
|
304
|
-
* Exports the component as an image. The export operation
|
|
326
|
+
* Exports the component as an image. The export operation runs asynchronously and returns a promise.
|
|
305
327
|
*
|
|
306
328
|
* @param {ImageExportOptions} options - The parameters for the exported image.
|
|
307
|
-
* @returns {Promise<string>} - A promise that
|
|
329
|
+
* @returns {Promise<string>} - A promise that resolves with a PNG image encoded as a Data URI.
|
|
308
330
|
*/
|
|
309
331
|
exportImage(options?: ImageExportOptions): Promise<string>;
|
|
310
332
|
/**
|
|
311
|
-
* Exports the component as an SVG document. The export operation
|
|
333
|
+
* Exports the component as an SVG document. The export operation runs asynchronously and returns a promise.
|
|
312
334
|
*
|
|
313
335
|
* @param options - The parameters for the exported file.
|
|
314
|
-
* @returns
|
|
336
|
+
* @returns A promise that resolves with an SVG document that is encoded as a Data URI.
|
|
315
337
|
*/
|
|
316
338
|
exportSVG(options?: SVGExportOptions): Promise<string>;
|
|
317
339
|
/**
|
|
318
340
|
* Exports a Barcode component as a Drawing `Scene`.
|
|
319
341
|
*
|
|
320
342
|
* @param {any} options - The parameters for the export operation.
|
|
321
|
-
* @returns {Group}
|
|
343
|
+
* @returns {Group} A promise that returns the root `Group` of the scene.
|
|
322
344
|
*/
|
|
323
345
|
exportVisual(options?: any): Group;
|
|
324
346
|
private getTarget;
|
|
@@ -345,23 +367,27 @@ export declare type QRCodeErrorCorrection = 'L' | 'M' | 'Q' | 'H';
|
|
|
345
367
|
*/
|
|
346
368
|
export declare interface QRCodeOverlay {
|
|
347
369
|
/**
|
|
348
|
-
*
|
|
370
|
+
* Sets the overlay height in pixels.
|
|
371
|
+
*
|
|
372
|
+
* @default undefined
|
|
349
373
|
*/
|
|
350
374
|
height?: number;
|
|
351
375
|
/**
|
|
352
|
-
*
|
|
376
|
+
* Sets the source image for the overlay.
|
|
353
377
|
*
|
|
354
378
|
* Required only when `type` is set to `'image'`.
|
|
355
379
|
*/
|
|
356
380
|
imageUrl?: string;
|
|
357
381
|
/**
|
|
358
|
-
*
|
|
382
|
+
* Sets the overlay type.
|
|
359
383
|
*
|
|
360
|
-
* @default
|
|
384
|
+
* @default "image"
|
|
361
385
|
*/
|
|
362
386
|
type?: 'image' | 'swiss';
|
|
363
387
|
/**
|
|
364
|
-
*
|
|
388
|
+
* Sets the overlay width in pixels.
|
|
389
|
+
*
|
|
390
|
+
* @default undefined
|
|
365
391
|
*/
|
|
366
392
|
width?: number;
|
|
367
393
|
}
|
|
@@ -371,7 +397,7 @@ export declare interface QRCodeOverlay {
|
|
|
371
397
|
*/
|
|
372
398
|
export declare interface QRCodeProps extends BaseBarcodeProps {
|
|
373
399
|
/**
|
|
374
|
-
*
|
|
400
|
+
* Sets the background color of the QR Code. Accepts a valid CSS color string, including hex and rgb.
|
|
375
401
|
*
|
|
376
402
|
* @default "white"
|
|
377
403
|
* @example
|
|
@@ -379,14 +405,14 @@ export declare interface QRCodeProps extends BaseBarcodeProps {
|
|
|
379
405
|
*/
|
|
380
406
|
background?: string;
|
|
381
407
|
/**
|
|
382
|
-
*
|
|
408
|
+
* Sets the border of the QR Code. Accepts an object implementing the `Border` interface.
|
|
383
409
|
*
|
|
384
410
|
* @example
|
|
385
411
|
* <QRCode border={{ color: "black", width: 2 }} />
|
|
386
412
|
*/
|
|
387
413
|
border?: Border;
|
|
388
414
|
/**
|
|
389
|
-
*
|
|
415
|
+
* Sets the color of the QR Code. Accepts a valid CSS color string, including hex and rgb.
|
|
390
416
|
*
|
|
391
417
|
* @default "black"
|
|
392
418
|
* @example
|
|
@@ -394,9 +420,9 @@ export declare interface QRCodeProps extends BaseBarcodeProps {
|
|
|
394
420
|
*/
|
|
395
421
|
color?: string;
|
|
396
422
|
/**
|
|
397
|
-
*
|
|
423
|
+
* Sets the encoding mode used to encode the value.
|
|
398
424
|
*
|
|
399
|
-
* > **Important** The UTF-8 encoding is not included in the specifications and
|
|
425
|
+
* > **Important** The UTF-8 encoding is not included in the specifications and some readers do not support it.
|
|
400
426
|
*
|
|
401
427
|
* The possible values are:
|
|
402
428
|
* * `"ISO_8859_1"`—Supports all characters from the [ISO/IEC 8859-1](https://en.wikipedia.org/wiki/ISO/IEC_8859-1) character set.
|
|
@@ -408,7 +434,7 @@ export declare interface QRCodeProps extends BaseBarcodeProps {
|
|
|
408
434
|
*/
|
|
409
435
|
encoding?: QRCodeEncoding;
|
|
410
436
|
/**
|
|
411
|
-
*
|
|
437
|
+
* Sets the error correction level to use.
|
|
412
438
|
*
|
|
413
439
|
* The possible values are:
|
|
414
440
|
* * `"L"`—Approximately 7% of the codewords can be restored.
|
|
@@ -422,7 +448,7 @@ export declare interface QRCodeProps extends BaseBarcodeProps {
|
|
|
422
448
|
*/
|
|
423
449
|
errorCorrection?: QRCodeErrorCorrection;
|
|
424
450
|
/**
|
|
425
|
-
* An optional image overlay that
|
|
451
|
+
* An optional image overlay that displays over the QR Code.
|
|
426
452
|
*
|
|
427
453
|
* > **Note** Always test if the code reads correctly with the applied overlay.
|
|
428
454
|
* > 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"`.
|
|
@@ -432,7 +458,7 @@ export declare interface QRCodeProps extends BaseBarcodeProps {
|
|
|
432
458
|
*/
|
|
433
459
|
overlay?: QRCodeOverlay;
|
|
434
460
|
/**
|
|
435
|
-
*
|
|
461
|
+
* Sets the padding of the QR Code. A numeric value sets all paddings.
|
|
436
462
|
*
|
|
437
463
|
* @default 0
|
|
438
464
|
* @example
|
|
@@ -440,9 +466,9 @@ export declare interface QRCodeProps extends BaseBarcodeProps {
|
|
|
440
466
|
*/
|
|
441
467
|
padding?: number;
|
|
442
468
|
/**
|
|
443
|
-
*
|
|
469
|
+
* Determines the size of a QR Code. Numeric values represent pixels.
|
|
444
470
|
*
|
|
445
|
-
* If
|
|
471
|
+
* If you do not specify a size, the size will be determined from the element width and height.
|
|
446
472
|
* If the element has width or height of zero, a default value of 200 pixels will be used.
|
|
447
473
|
*
|
|
448
474
|
* @default "200px"
|
|
@@ -451,7 +477,7 @@ export declare interface QRCodeProps extends BaseBarcodeProps {
|
|
|
451
477
|
*/
|
|
452
478
|
size?: number | string;
|
|
453
479
|
/**
|
|
454
|
-
*
|
|
480
|
+
* Sets the value of the QR Code. Accepts a string or a number.
|
|
455
481
|
*
|
|
456
482
|
* @example
|
|
457
483
|
* <QRCode value="https://example.com" />
|
package/index.d.ts
CHANGED
|
@@ -21,11 +21,11 @@ export declare class Barcode extends React_2.Component<BarcodeProps, {}> {
|
|
|
21
21
|
*/
|
|
22
22
|
get barcodeInstance(): any;
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
24
|
+
* Gets the Drawing `Surface` of the Barcode.
|
|
25
25
|
*/
|
|
26
26
|
get surface(): Surface | null;
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* Gets the DOM element of the Barcode.
|
|
29
29
|
*/
|
|
30
30
|
get element(): HTMLDivElement | null;
|
|
31
31
|
/**
|
|
@@ -33,24 +33,24 @@ export declare class Barcode extends React_2.Component<BarcodeProps, {}> {
|
|
|
33
33
|
*/
|
|
34
34
|
render(): any;
|
|
35
35
|
/**
|
|
36
|
-
* Exports the component as an image. The export operation
|
|
36
|
+
* Exports the component as an image. The export operation runs asynchronously and returns a promise.
|
|
37
37
|
*
|
|
38
38
|
* @param {ImageExportOptions} options - The parameters for the exported image.
|
|
39
|
-
* @returns {Promise<string>} - A promise that
|
|
39
|
+
* @returns {Promise<string>} - A promise that resolves with a PNG image encoded as a Data URI.
|
|
40
40
|
*/
|
|
41
41
|
exportImage(options?: ImageExportOptions): Promise<string>;
|
|
42
42
|
/**
|
|
43
|
-
* Exports the component as an SVG document. The export operation
|
|
43
|
+
* Exports the component as an SVG document. The export operation runs asynchronously and returns a promise.
|
|
44
44
|
*
|
|
45
45
|
* @param options - The parameters for the exported file.
|
|
46
|
-
* @returns
|
|
46
|
+
* @returns A promise that resolves with an SVG document that is encoded as a Data URI.
|
|
47
47
|
*/
|
|
48
48
|
exportSVG(options?: SVGExportOptions): Promise<string>;
|
|
49
49
|
/**
|
|
50
50
|
* Exports a Barcode component as a Drawing `Scene`.
|
|
51
51
|
*
|
|
52
52
|
* @param {any} options - The parameters for the export operation.
|
|
53
|
-
* @returns {Group}
|
|
53
|
+
* @returns {Group} A promise that returns the root `Group` of the scene.
|
|
54
54
|
*/
|
|
55
55
|
exportVisual(options?: any): Group;
|
|
56
56
|
private getTarget;
|
|
@@ -62,7 +62,7 @@ export declare class Barcode extends React_2.Component<BarcodeProps, {}> {
|
|
|
62
62
|
*/
|
|
63
63
|
export declare interface BarcodeProps extends BaseBarcodeProps {
|
|
64
64
|
/**
|
|
65
|
-
*
|
|
65
|
+
* Sets the background color of the Barcode. Accepts a valid CSS color string, including hex and rgb.
|
|
66
66
|
*
|
|
67
67
|
* @default "white"
|
|
68
68
|
* @example
|
|
@@ -70,14 +70,14 @@ export declare interface BarcodeProps extends BaseBarcodeProps {
|
|
|
70
70
|
*/
|
|
71
71
|
background?: string;
|
|
72
72
|
/**
|
|
73
|
-
*
|
|
73
|
+
* Sets the border of the Barcode. Accepts an object implementing the `Border` interface.
|
|
74
74
|
*
|
|
75
75
|
* @example
|
|
76
76
|
* <Barcode border={{ color: "black", width: 2 }} />
|
|
77
77
|
*/
|
|
78
78
|
border?: Border;
|
|
79
79
|
/**
|
|
80
|
-
*
|
|
80
|
+
* Shows or hides the checksum digit next to the value in the text area.
|
|
81
81
|
*
|
|
82
82
|
* @default false
|
|
83
83
|
* @example
|
|
@@ -85,7 +85,7 @@ export declare interface BarcodeProps extends BaseBarcodeProps {
|
|
|
85
85
|
*/
|
|
86
86
|
checksum?: boolean;
|
|
87
87
|
/**
|
|
88
|
-
*
|
|
88
|
+
* Sets the color of the Barcode. Accepts a valid CSS color string, including hex and rgb.
|
|
89
89
|
*
|
|
90
90
|
* @default "black"
|
|
91
91
|
* @example
|
|
@@ -93,15 +93,15 @@ export declare interface BarcodeProps extends BaseBarcodeProps {
|
|
|
93
93
|
*/
|
|
94
94
|
color?: string;
|
|
95
95
|
/**
|
|
96
|
-
*
|
|
97
|
-
*
|
|
96
|
+
* Sets the height of the Barcode in pixels.
|
|
97
|
+
* You can also set the Barcode dimensions through regular CSS styling.
|
|
98
98
|
*
|
|
99
99
|
* @example
|
|
100
100
|
* <Barcode height={100} />
|
|
101
101
|
*/
|
|
102
102
|
height?: number;
|
|
103
103
|
/**
|
|
104
|
-
*
|
|
104
|
+
* Sets the padding of the Barcode. Accepts a numeric value or an object implementing the `Padding` interface.
|
|
105
105
|
*
|
|
106
106
|
* @default 0
|
|
107
107
|
* @example
|
|
@@ -109,14 +109,14 @@ export declare interface BarcodeProps extends BaseBarcodeProps {
|
|
|
109
109
|
*/
|
|
110
110
|
padding?: Padding | number;
|
|
111
111
|
/**
|
|
112
|
-
*
|
|
112
|
+
* Sets the text label configuration of the Barcode. Accepts an object implementing the `BarcodeText` interface.
|
|
113
113
|
*
|
|
114
114
|
* @example
|
|
115
115
|
* <Barcode text={{ visible: true, position: "bottom", color: "black" }} />
|
|
116
116
|
*/
|
|
117
117
|
text?: BarcodeText;
|
|
118
118
|
/**
|
|
119
|
-
*
|
|
119
|
+
* Sets the symbology (encoding) that the Barcode will use. Accepts a value of type `BarcodeType` or a custom string.
|
|
120
120
|
*
|
|
121
121
|
* @default "Code39"
|
|
122
122
|
* @example
|
|
@@ -124,15 +124,15 @@ export declare interface BarcodeProps extends BaseBarcodeProps {
|
|
|
124
124
|
*/
|
|
125
125
|
type: BarcodeType | string;
|
|
126
126
|
/**
|
|
127
|
-
*
|
|
127
|
+
* Sets the value of the Barcode. Accepts a string or a number.
|
|
128
128
|
*
|
|
129
129
|
* @example
|
|
130
130
|
* <Barcode value="123456789" />
|
|
131
131
|
*/
|
|
132
132
|
value: number | string;
|
|
133
133
|
/**
|
|
134
|
-
*
|
|
135
|
-
*
|
|
134
|
+
* Sets the width of the Barcode in pixels.
|
|
135
|
+
* You can also set the Barcode dimensions through regular CSS styling.
|
|
136
136
|
*
|
|
137
137
|
* @example
|
|
138
138
|
* <Barcode width={200} />
|
|
@@ -145,27 +145,27 @@ export declare interface BarcodeProps extends BaseBarcodeProps {
|
|
|
145
145
|
*/
|
|
146
146
|
export declare interface BarcodeText {
|
|
147
147
|
/**
|
|
148
|
-
*
|
|
148
|
+
* Sets the color of the text. Any valid CSS color string will work here, including hex and rgb.
|
|
149
149
|
*
|
|
150
150
|
* @default "black"
|
|
151
151
|
*/
|
|
152
152
|
color?: string;
|
|
153
153
|
/**
|
|
154
|
-
*
|
|
154
|
+
* Sets the font of the text.
|
|
155
155
|
*
|
|
156
156
|
* @default "16px Consolas, Monaco, Sans Mono, monospace, sans-serif"
|
|
157
157
|
*/
|
|
158
158
|
font?: string;
|
|
159
159
|
/**
|
|
160
|
-
*
|
|
160
|
+
* Sets the margin of the text. A numeric value sets all margins.
|
|
161
161
|
*
|
|
162
162
|
* @default 0
|
|
163
163
|
*/
|
|
164
164
|
margin?: Margin | number;
|
|
165
165
|
/**
|
|
166
|
-
*
|
|
166
|
+
* Shows or hides the Barcode text label.
|
|
167
167
|
*
|
|
168
|
-
* If set to `false`, the Barcode will not display the value as
|
|
168
|
+
* If set to `false`, the Barcode will not display the value as text below the barcode lines.
|
|
169
169
|
*
|
|
170
170
|
* @default true
|
|
171
171
|
*/
|
|
@@ -186,7 +186,7 @@ declare interface BaseBarcodeProps {
|
|
|
186
186
|
*/
|
|
187
187
|
children?: React.ReactNode;
|
|
188
188
|
/**
|
|
189
|
-
*
|
|
189
|
+
* Sets the styles that the component applies.
|
|
190
190
|
*
|
|
191
191
|
* @example
|
|
192
192
|
* <Barcode style={{ backgroundColor: "lightgray" }} />
|
|
@@ -217,15 +217,21 @@ declare interface BaseBarcodeProps {
|
|
|
217
217
|
*/
|
|
218
218
|
export declare interface Border {
|
|
219
219
|
/**
|
|
220
|
-
*
|
|
220
|
+
* Sets the color of the border line. Accepts valid CSS color strings, including hex and rgb.
|
|
221
|
+
*
|
|
222
|
+
* @default "black"
|
|
221
223
|
*/
|
|
222
224
|
color?: string;
|
|
223
225
|
/**
|
|
224
|
-
*
|
|
226
|
+
* Sets the dash type of the border line.
|
|
227
|
+
*
|
|
228
|
+
* @default "solid"
|
|
225
229
|
*/
|
|
226
230
|
dashType?: DashType;
|
|
227
231
|
/**
|
|
228
|
-
*
|
|
232
|
+
* Sets the width of the border line in pixels.
|
|
233
|
+
*
|
|
234
|
+
* @default 0
|
|
229
235
|
*/
|
|
230
236
|
width?: number;
|
|
231
237
|
}
|
|
@@ -240,19 +246,27 @@ export declare type DashType = 'dash' | 'dashDot' | 'dot' | 'longDash' | 'longDa
|
|
|
240
246
|
*/
|
|
241
247
|
export declare interface Margin {
|
|
242
248
|
/**
|
|
243
|
-
*
|
|
249
|
+
* Sets the top margin in pixels.
|
|
250
|
+
*
|
|
251
|
+
* @default 0
|
|
244
252
|
*/
|
|
245
253
|
top?: number;
|
|
246
254
|
/**
|
|
247
|
-
*
|
|
255
|
+
* Sets the right margin in pixels.
|
|
256
|
+
*
|
|
257
|
+
* @default 0
|
|
248
258
|
*/
|
|
249
259
|
right?: number;
|
|
250
260
|
/**
|
|
251
|
-
*
|
|
261
|
+
* Sets the bottom margin in pixels.
|
|
262
|
+
*
|
|
263
|
+
* @default 0
|
|
252
264
|
*/
|
|
253
265
|
bottom?: number;
|
|
254
266
|
/**
|
|
255
|
-
*
|
|
267
|
+
* Sets the left margin in pixels.
|
|
268
|
+
*
|
|
269
|
+
* @default 0
|
|
256
270
|
*/
|
|
257
271
|
left?: number;
|
|
258
272
|
}
|
|
@@ -262,19 +276,27 @@ export declare interface Margin {
|
|
|
262
276
|
*/
|
|
263
277
|
export declare interface Padding {
|
|
264
278
|
/**
|
|
265
|
-
*
|
|
279
|
+
* Sets the top padding in pixels.
|
|
280
|
+
*
|
|
281
|
+
* @default 0
|
|
266
282
|
*/
|
|
267
283
|
top?: number;
|
|
268
284
|
/**
|
|
269
|
-
*
|
|
285
|
+
* Sets the right padding in pixels.
|
|
286
|
+
*
|
|
287
|
+
* @default 0
|
|
270
288
|
*/
|
|
271
289
|
right?: number;
|
|
272
290
|
/**
|
|
273
|
-
*
|
|
291
|
+
* Sets the bottom padding in pixels.
|
|
292
|
+
*
|
|
293
|
+
* @default 0
|
|
274
294
|
*/
|
|
275
295
|
bottom?: number;
|
|
276
296
|
/**
|
|
277
|
-
*
|
|
297
|
+
* Sets the left padding in pixels.
|
|
298
|
+
*
|
|
299
|
+
* @default 0
|
|
278
300
|
*/
|
|
279
301
|
left?: number;
|
|
280
302
|
}
|
|
@@ -289,11 +311,11 @@ export declare class QRCode extends React_2.Component<QRCodeProps, {}> {
|
|
|
289
311
|
*/
|
|
290
312
|
get barcodeInstance(): any;
|
|
291
313
|
/**
|
|
292
|
-
*
|
|
314
|
+
* Gets the Drawing `Surface` of the Barcode.
|
|
293
315
|
*/
|
|
294
316
|
get surface(): Surface | null;
|
|
295
317
|
/**
|
|
296
|
-
*
|
|
318
|
+
* Gets the DOM element of the Barcode.
|
|
297
319
|
*/
|
|
298
320
|
get element(): HTMLDivElement | null;
|
|
299
321
|
/**
|
|
@@ -301,24 +323,24 @@ export declare class QRCode extends React_2.Component<QRCodeProps, {}> {
|
|
|
301
323
|
*/
|
|
302
324
|
render(): any;
|
|
303
325
|
/**
|
|
304
|
-
* Exports the component as an image. The export operation
|
|
326
|
+
* Exports the component as an image. The export operation runs asynchronously and returns a promise.
|
|
305
327
|
*
|
|
306
328
|
* @param {ImageExportOptions} options - The parameters for the exported image.
|
|
307
|
-
* @returns {Promise<string>} - A promise that
|
|
329
|
+
* @returns {Promise<string>} - A promise that resolves with a PNG image encoded as a Data URI.
|
|
308
330
|
*/
|
|
309
331
|
exportImage(options?: ImageExportOptions): Promise<string>;
|
|
310
332
|
/**
|
|
311
|
-
* Exports the component as an SVG document. The export operation
|
|
333
|
+
* Exports the component as an SVG document. The export operation runs asynchronously and returns a promise.
|
|
312
334
|
*
|
|
313
335
|
* @param options - The parameters for the exported file.
|
|
314
|
-
* @returns
|
|
336
|
+
* @returns A promise that resolves with an SVG document that is encoded as a Data URI.
|
|
315
337
|
*/
|
|
316
338
|
exportSVG(options?: SVGExportOptions): Promise<string>;
|
|
317
339
|
/**
|
|
318
340
|
* Exports a Barcode component as a Drawing `Scene`.
|
|
319
341
|
*
|
|
320
342
|
* @param {any} options - The parameters for the export operation.
|
|
321
|
-
* @returns {Group}
|
|
343
|
+
* @returns {Group} A promise that returns the root `Group` of the scene.
|
|
322
344
|
*/
|
|
323
345
|
exportVisual(options?: any): Group;
|
|
324
346
|
private getTarget;
|
|
@@ -345,23 +367,27 @@ export declare type QRCodeErrorCorrection = 'L' | 'M' | 'Q' | 'H';
|
|
|
345
367
|
*/
|
|
346
368
|
export declare interface QRCodeOverlay {
|
|
347
369
|
/**
|
|
348
|
-
*
|
|
370
|
+
* Sets the overlay height in pixels.
|
|
371
|
+
*
|
|
372
|
+
* @default undefined
|
|
349
373
|
*/
|
|
350
374
|
height?: number;
|
|
351
375
|
/**
|
|
352
|
-
*
|
|
376
|
+
* Sets the source image for the overlay.
|
|
353
377
|
*
|
|
354
378
|
* Required only when `type` is set to `'image'`.
|
|
355
379
|
*/
|
|
356
380
|
imageUrl?: string;
|
|
357
381
|
/**
|
|
358
|
-
*
|
|
382
|
+
* Sets the overlay type.
|
|
359
383
|
*
|
|
360
|
-
* @default
|
|
384
|
+
* @default "image"
|
|
361
385
|
*/
|
|
362
386
|
type?: 'image' | 'swiss';
|
|
363
387
|
/**
|
|
364
|
-
*
|
|
388
|
+
* Sets the overlay width in pixels.
|
|
389
|
+
*
|
|
390
|
+
* @default undefined
|
|
365
391
|
*/
|
|
366
392
|
width?: number;
|
|
367
393
|
}
|
|
@@ -371,7 +397,7 @@ export declare interface QRCodeOverlay {
|
|
|
371
397
|
*/
|
|
372
398
|
export declare interface QRCodeProps extends BaseBarcodeProps {
|
|
373
399
|
/**
|
|
374
|
-
*
|
|
400
|
+
* Sets the background color of the QR Code. Accepts a valid CSS color string, including hex and rgb.
|
|
375
401
|
*
|
|
376
402
|
* @default "white"
|
|
377
403
|
* @example
|
|
@@ -379,14 +405,14 @@ export declare interface QRCodeProps extends BaseBarcodeProps {
|
|
|
379
405
|
*/
|
|
380
406
|
background?: string;
|
|
381
407
|
/**
|
|
382
|
-
*
|
|
408
|
+
* Sets the border of the QR Code. Accepts an object implementing the `Border` interface.
|
|
383
409
|
*
|
|
384
410
|
* @example
|
|
385
411
|
* <QRCode border={{ color: "black", width: 2 }} />
|
|
386
412
|
*/
|
|
387
413
|
border?: Border;
|
|
388
414
|
/**
|
|
389
|
-
*
|
|
415
|
+
* Sets the color of the QR Code. Accepts a valid CSS color string, including hex and rgb.
|
|
390
416
|
*
|
|
391
417
|
* @default "black"
|
|
392
418
|
* @example
|
|
@@ -394,9 +420,9 @@ export declare interface QRCodeProps extends BaseBarcodeProps {
|
|
|
394
420
|
*/
|
|
395
421
|
color?: string;
|
|
396
422
|
/**
|
|
397
|
-
*
|
|
423
|
+
* Sets the encoding mode used to encode the value.
|
|
398
424
|
*
|
|
399
|
-
* > **Important** The UTF-8 encoding is not included in the specifications and
|
|
425
|
+
* > **Important** The UTF-8 encoding is not included in the specifications and some readers do not support it.
|
|
400
426
|
*
|
|
401
427
|
* The possible values are:
|
|
402
428
|
* * `"ISO_8859_1"`—Supports all characters from the [ISO/IEC 8859-1](https://en.wikipedia.org/wiki/ISO/IEC_8859-1) character set.
|
|
@@ -408,7 +434,7 @@ export declare interface QRCodeProps extends BaseBarcodeProps {
|
|
|
408
434
|
*/
|
|
409
435
|
encoding?: QRCodeEncoding;
|
|
410
436
|
/**
|
|
411
|
-
*
|
|
437
|
+
* Sets the error correction level to use.
|
|
412
438
|
*
|
|
413
439
|
* The possible values are:
|
|
414
440
|
* * `"L"`—Approximately 7% of the codewords can be restored.
|
|
@@ -422,7 +448,7 @@ export declare interface QRCodeProps extends BaseBarcodeProps {
|
|
|
422
448
|
*/
|
|
423
449
|
errorCorrection?: QRCodeErrorCorrection;
|
|
424
450
|
/**
|
|
425
|
-
* An optional image overlay that
|
|
451
|
+
* An optional image overlay that displays over the QR Code.
|
|
426
452
|
*
|
|
427
453
|
* > **Note** Always test if the code reads correctly with the applied overlay.
|
|
428
454
|
* > 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"`.
|
|
@@ -432,7 +458,7 @@ export declare interface QRCodeProps extends BaseBarcodeProps {
|
|
|
432
458
|
*/
|
|
433
459
|
overlay?: QRCodeOverlay;
|
|
434
460
|
/**
|
|
435
|
-
*
|
|
461
|
+
* Sets the padding of the QR Code. A numeric value sets all paddings.
|
|
436
462
|
*
|
|
437
463
|
* @default 0
|
|
438
464
|
* @example
|
|
@@ -440,9 +466,9 @@ export declare interface QRCodeProps extends BaseBarcodeProps {
|
|
|
440
466
|
*/
|
|
441
467
|
padding?: number;
|
|
442
468
|
/**
|
|
443
|
-
*
|
|
469
|
+
* Determines the size of a QR Code. Numeric values represent pixels.
|
|
444
470
|
*
|
|
445
|
-
* If
|
|
471
|
+
* If you do not specify a size, the size will be determined from the element width and height.
|
|
446
472
|
* If the element has width or height of zero, a default value of 200 pixels will be used.
|
|
447
473
|
*
|
|
448
474
|
* @default "200px"
|
|
@@ -451,7 +477,7 @@ export declare interface QRCodeProps extends BaseBarcodeProps {
|
|
|
451
477
|
*/
|
|
452
478
|
size?: number | string;
|
|
453
479
|
/**
|
|
454
|
-
*
|
|
480
|
+
* Sets the value of the QR Code. Accepts a string or a number.
|
|
455
481
|
*
|
|
456
482
|
* @example
|
|
457
483
|
* <QRCode value="https://example.com" />
|
package/package-metadata.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=Object.freeze({name:"@progress/kendo-react-barcodes",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=Object.freeze({name:"@progress/kendo-react-barcodes",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1757420009,version:"12.0.2-develop.3",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"});exports.packageMetadata=e;
|
package/package-metadata.mjs
CHANGED
|
@@ -10,8 +10,8 @@ const e = Object.freeze({
|
|
|
10
10
|
productName: "KendoReact",
|
|
11
11
|
productCode: "KENDOUIREACT",
|
|
12
12
|
productCodes: ["KENDOUIREACT"],
|
|
13
|
-
publishDate:
|
|
14
|
-
version: "12.0.2-develop.
|
|
13
|
+
publishDate: 1757420009,
|
|
14
|
+
version: "12.0.2-develop.3",
|
|
15
15
|
licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
16
16
|
});
|
|
17
17
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-barcodes",
|
|
3
|
-
"version": "12.0.2-develop.
|
|
3
|
+
"version": "12.0.2-develop.3",
|
|
4
4
|
"description": "React Barcodes provide a set of React components to build beautiful and customizable barcodes. KendoReact Barcodes package",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"@progress/kendo-charts": "2.8.0",
|
|
29
29
|
"@progress/kendo-drawing": "^1.21.2",
|
|
30
30
|
"@progress/kendo-licensing": "^1.7.0",
|
|
31
|
-
"@progress/kendo-react-common": "12.0.2-develop.
|
|
32
|
-
"@progress/kendo-react-intl": "12.0.2-develop.
|
|
31
|
+
"@progress/kendo-react-common": "12.0.2-develop.3",
|
|
32
|
+
"@progress/kendo-react-intl": "12.0.2-develop.3",
|
|
33
33
|
"react": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
|
|
34
34
|
"react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc"
|
|
35
35
|
},
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"package": {
|
|
57
57
|
"productName": "KendoReact",
|
|
58
58
|
"productCode": "KENDOUIREACT",
|
|
59
|
-
"publishDate":
|
|
59
|
+
"publishDate": 1757420009,
|
|
60
60
|
"licensingDocsUrl": "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
61
61
|
}
|
|
62
62
|
},
|