@progress/kendo-react-barcodes 10.2.0-develop.6 → 10.2.0-develop.8
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/dist/cdn/js/kendo-react-barcodes.js +1 -1
- package/index.d.mts +63 -10
- package/index.d.ts +63 -10
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +4 -4
|
@@ -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={name:"@progress/kendo-react-barcodes",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:0,version:"10.2.0-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={name:"@progress/kendo-react-barcodes",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:0,version:"10.2.0-develop.8",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.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,null)))}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
|
@@ -65,54 +65,77 @@ export declare interface BarcodeProps extends BaseBarcodeProps {
|
|
|
65
65
|
* The background color of the Barcode. Accepts a valid CSS color string, including hex and rgb.
|
|
66
66
|
*
|
|
67
67
|
* @default "white"
|
|
68
|
+
* @example
|
|
69
|
+
* <Barcode background="#ffffff" />
|
|
68
70
|
*/
|
|
69
71
|
background?: string;
|
|
70
72
|
/**
|
|
71
|
-
* The border of the Barcode.
|
|
73
|
+
* The border of the Barcode. Accepts an object implementing the `Border` interface.
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* <Barcode border={{ color: "black", width: 2 }} />
|
|
72
77
|
*/
|
|
73
78
|
border?: Border;
|
|
74
79
|
/**
|
|
75
80
|
* If set to `true`, the Barcode will display the checksum digit next to the value in the text area.
|
|
76
81
|
*
|
|
77
82
|
* @default false
|
|
83
|
+
* @example
|
|
84
|
+
* <Barcode checksum={true} />
|
|
78
85
|
*/
|
|
79
86
|
checksum?: boolean;
|
|
80
87
|
/**
|
|
81
88
|
* The color of the Barcode. Accepts a valid CSS color string, including hex and rgb.
|
|
82
89
|
*
|
|
83
90
|
* @default "black"
|
|
91
|
+
* @example
|
|
92
|
+
* <Barcode color="#000000" />
|
|
84
93
|
*/
|
|
85
94
|
color?: string;
|
|
86
95
|
/**
|
|
87
96
|
* The height of the Barcode in pixels.
|
|
88
|
-
*
|
|
89
97
|
* The Barcode dimensions can also be set through regular CSS styling.
|
|
98
|
+
*
|
|
99
|
+
* @example
|
|
100
|
+
* <Barcode height={100} />
|
|
90
101
|
*/
|
|
91
102
|
height?: number;
|
|
92
103
|
/**
|
|
93
|
-
* The padding of the Barcode.
|
|
104
|
+
* The padding of the Barcode. Accepts a numeric value or an object implementing the `Padding` interface.
|
|
94
105
|
*
|
|
95
106
|
* @default 0
|
|
107
|
+
* @example
|
|
108
|
+
* <Barcode padding={{ top: 10, bottom: 10, left: 5, right: 5 }} />
|
|
96
109
|
*/
|
|
97
110
|
padding?: Padding | number;
|
|
98
111
|
/**
|
|
99
|
-
* The Barcode text label configuration.
|
|
112
|
+
* The Barcode text label configuration. Accepts an object implementing the `BarcodeText` interface.
|
|
113
|
+
*
|
|
114
|
+
* @example
|
|
115
|
+
* <Barcode text={{ visible: true, position: "bottom", color: "black" }} />
|
|
100
116
|
*/
|
|
101
117
|
text?: BarcodeText;
|
|
102
118
|
/**
|
|
103
|
-
* The symbology (encoding) the Barcode will use.
|
|
119
|
+
* The symbology (encoding) the Barcode will use. Accepts a value of type `BarcodeType` or a custom string.
|
|
104
120
|
*
|
|
105
121
|
* @default "Code39"
|
|
122
|
+
* @example
|
|
123
|
+
* <Barcode type="Code128" />
|
|
106
124
|
*/
|
|
107
125
|
type: BarcodeType | string;
|
|
108
126
|
/**
|
|
109
|
-
* The value of the Barcode.
|
|
127
|
+
* The value of the Barcode. Accepts a string or a number.
|
|
128
|
+
*
|
|
129
|
+
* @example
|
|
130
|
+
* <Barcode value="123456789" />
|
|
110
131
|
*/
|
|
111
132
|
value: number | string;
|
|
112
133
|
/**
|
|
113
134
|
* The width of the Barcode in pixels.
|
|
114
|
-
*
|
|
115
135
|
* The Barcode dimensions can also be set through regular CSS styling.
|
|
136
|
+
*
|
|
137
|
+
* @example
|
|
138
|
+
* <Barcode width={200} />
|
|
116
139
|
*/
|
|
117
140
|
width?: number;
|
|
118
141
|
}
|
|
@@ -164,10 +187,16 @@ declare interface BaseBarcodeProps {
|
|
|
164
187
|
children?: React.ReactNode;
|
|
165
188
|
/**
|
|
166
189
|
* The styles that are applied to the component.
|
|
190
|
+
*
|
|
191
|
+
* @example
|
|
192
|
+
* <Barcode style={{ backgroundColor: "lightgray" }} />
|
|
167
193
|
*/
|
|
168
194
|
style?: React.CSSProperties;
|
|
169
195
|
/**
|
|
170
196
|
* Sets additional CSS classes to the component.
|
|
197
|
+
*
|
|
198
|
+
* @example
|
|
199
|
+
* <Barcode className="custom-barcode-class" />
|
|
171
200
|
*/
|
|
172
201
|
className?: string;
|
|
173
202
|
/**
|
|
@@ -176,6 +205,9 @@ declare interface BaseBarcodeProps {
|
|
|
176
205
|
* The supported values are:
|
|
177
206
|
* - `"svg"`—If available, renders the component as an inline `svg` element.
|
|
178
207
|
* - `"canvas"`—If available, renders the component as a `canvas` element.
|
|
208
|
+
*
|
|
209
|
+
* @example
|
|
210
|
+
* <Barcode renderAs="svg" />
|
|
179
211
|
*/
|
|
180
212
|
renderAs?: RenderMode;
|
|
181
213
|
}
|
|
@@ -342,16 +374,23 @@ export declare interface QRCodeProps extends BaseBarcodeProps {
|
|
|
342
374
|
* The background color of the QR Code. Accepts a valid CSS color string, including hex and rgb.
|
|
343
375
|
*
|
|
344
376
|
* @default "white"
|
|
377
|
+
* @example
|
|
378
|
+
* <QRCode background="#ffffff" />
|
|
345
379
|
*/
|
|
346
380
|
background?: string;
|
|
347
381
|
/**
|
|
348
|
-
* The border of the QR Code.
|
|
382
|
+
* The border of the QR Code. Accepts an object implementing the `Border` interface.
|
|
383
|
+
*
|
|
384
|
+
* @example
|
|
385
|
+
* <QRCode border={{ color: "black", width: 2 }} />
|
|
349
386
|
*/
|
|
350
387
|
border?: Border;
|
|
351
388
|
/**
|
|
352
389
|
* The color of the QR Code. Accepts a valid CSS color string, including hex and rgb.
|
|
353
390
|
*
|
|
354
391
|
* @default "black"
|
|
392
|
+
* @example
|
|
393
|
+
* <QRCode color="#000000" />
|
|
355
394
|
*/
|
|
356
395
|
color?: string;
|
|
357
396
|
/**
|
|
@@ -364,6 +403,8 @@ export declare interface QRCodeProps extends BaseBarcodeProps {
|
|
|
364
403
|
* * `"UTF_8"`—Supports all [Unicode](https://en.wikipedia.org/wiki/List_of_Unicode_characters) characters.
|
|
365
404
|
*
|
|
366
405
|
* @default "ISO_8859_1"
|
|
406
|
+
* @example
|
|
407
|
+
* <QRCode encoding="UTF_8" />
|
|
367
408
|
*/
|
|
368
409
|
encoding?: QRCodeEncoding;
|
|
369
410
|
/**
|
|
@@ -376,19 +417,26 @@ export declare interface QRCodeProps extends BaseBarcodeProps {
|
|
|
376
417
|
* * `"H"`—Approximately 30% of the codewords can be restored.
|
|
377
418
|
*
|
|
378
419
|
* @default "L"
|
|
420
|
+
* @example
|
|
421
|
+
* <QRCode errorCorrection="H" />
|
|
379
422
|
*/
|
|
380
423
|
errorCorrection?: QRCodeErrorCorrection;
|
|
381
424
|
/**
|
|
382
|
-
* An optional image overlay that will placed over the QR Code.
|
|
425
|
+
* An optional image overlay that will be placed over the QR Code.
|
|
383
426
|
*
|
|
384
427
|
* > **Note** Always test if the code reads correctly with the applied overlay.
|
|
385
428
|
* > 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"`.
|
|
429
|
+
*
|
|
430
|
+
* @example
|
|
431
|
+
* <QRCode overlay={{ imageUrl: "https://example.com/logo.png", size: 50 }} />
|
|
386
432
|
*/
|
|
387
433
|
overlay?: QRCodeOverlay;
|
|
388
434
|
/**
|
|
389
435
|
* The padding of the QR Code. A numeric value sets all paddings.
|
|
390
436
|
*
|
|
391
437
|
* @default 0
|
|
438
|
+
* @example
|
|
439
|
+
* <QRCode padding={10} />
|
|
392
440
|
*/
|
|
393
441
|
padding?: number;
|
|
394
442
|
/**
|
|
@@ -398,10 +446,15 @@ export declare interface QRCodeProps extends BaseBarcodeProps {
|
|
|
398
446
|
* If the element has width or height of zero, a default value of 200 pixels will be used.
|
|
399
447
|
*
|
|
400
448
|
* @default "200px"
|
|
449
|
+
* @example
|
|
450
|
+
* <QRCode size={300} />
|
|
401
451
|
*/
|
|
402
452
|
size?: number | string;
|
|
403
453
|
/**
|
|
404
|
-
* The value of the QR Code.
|
|
454
|
+
* The value of the QR Code. Accepts a string or a number.
|
|
455
|
+
*
|
|
456
|
+
* @example
|
|
457
|
+
* <QRCode value="https://example.com" />
|
|
405
458
|
*/
|
|
406
459
|
value: number | string;
|
|
407
460
|
}
|
package/index.d.ts
CHANGED
|
@@ -65,54 +65,77 @@ export declare interface BarcodeProps extends BaseBarcodeProps {
|
|
|
65
65
|
* The background color of the Barcode. Accepts a valid CSS color string, including hex and rgb.
|
|
66
66
|
*
|
|
67
67
|
* @default "white"
|
|
68
|
+
* @example
|
|
69
|
+
* <Barcode background="#ffffff" />
|
|
68
70
|
*/
|
|
69
71
|
background?: string;
|
|
70
72
|
/**
|
|
71
|
-
* The border of the Barcode.
|
|
73
|
+
* The border of the Barcode. Accepts an object implementing the `Border` interface.
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* <Barcode border={{ color: "black", width: 2 }} />
|
|
72
77
|
*/
|
|
73
78
|
border?: Border;
|
|
74
79
|
/**
|
|
75
80
|
* If set to `true`, the Barcode will display the checksum digit next to the value in the text area.
|
|
76
81
|
*
|
|
77
82
|
* @default false
|
|
83
|
+
* @example
|
|
84
|
+
* <Barcode checksum={true} />
|
|
78
85
|
*/
|
|
79
86
|
checksum?: boolean;
|
|
80
87
|
/**
|
|
81
88
|
* The color of the Barcode. Accepts a valid CSS color string, including hex and rgb.
|
|
82
89
|
*
|
|
83
90
|
* @default "black"
|
|
91
|
+
* @example
|
|
92
|
+
* <Barcode color="#000000" />
|
|
84
93
|
*/
|
|
85
94
|
color?: string;
|
|
86
95
|
/**
|
|
87
96
|
* The height of the Barcode in pixels.
|
|
88
|
-
*
|
|
89
97
|
* The Barcode dimensions can also be set through regular CSS styling.
|
|
98
|
+
*
|
|
99
|
+
* @example
|
|
100
|
+
* <Barcode height={100} />
|
|
90
101
|
*/
|
|
91
102
|
height?: number;
|
|
92
103
|
/**
|
|
93
|
-
* The padding of the Barcode.
|
|
104
|
+
* The padding of the Barcode. Accepts a numeric value or an object implementing the `Padding` interface.
|
|
94
105
|
*
|
|
95
106
|
* @default 0
|
|
107
|
+
* @example
|
|
108
|
+
* <Barcode padding={{ top: 10, bottom: 10, left: 5, right: 5 }} />
|
|
96
109
|
*/
|
|
97
110
|
padding?: Padding | number;
|
|
98
111
|
/**
|
|
99
|
-
* The Barcode text label configuration.
|
|
112
|
+
* The Barcode text label configuration. Accepts an object implementing the `BarcodeText` interface.
|
|
113
|
+
*
|
|
114
|
+
* @example
|
|
115
|
+
* <Barcode text={{ visible: true, position: "bottom", color: "black" }} />
|
|
100
116
|
*/
|
|
101
117
|
text?: BarcodeText;
|
|
102
118
|
/**
|
|
103
|
-
* The symbology (encoding) the Barcode will use.
|
|
119
|
+
* The symbology (encoding) the Barcode will use. Accepts a value of type `BarcodeType` or a custom string.
|
|
104
120
|
*
|
|
105
121
|
* @default "Code39"
|
|
122
|
+
* @example
|
|
123
|
+
* <Barcode type="Code128" />
|
|
106
124
|
*/
|
|
107
125
|
type: BarcodeType | string;
|
|
108
126
|
/**
|
|
109
|
-
* The value of the Barcode.
|
|
127
|
+
* The value of the Barcode. Accepts a string or a number.
|
|
128
|
+
*
|
|
129
|
+
* @example
|
|
130
|
+
* <Barcode value="123456789" />
|
|
110
131
|
*/
|
|
111
132
|
value: number | string;
|
|
112
133
|
/**
|
|
113
134
|
* The width of the Barcode in pixels.
|
|
114
|
-
*
|
|
115
135
|
* The Barcode dimensions can also be set through regular CSS styling.
|
|
136
|
+
*
|
|
137
|
+
* @example
|
|
138
|
+
* <Barcode width={200} />
|
|
116
139
|
*/
|
|
117
140
|
width?: number;
|
|
118
141
|
}
|
|
@@ -164,10 +187,16 @@ declare interface BaseBarcodeProps {
|
|
|
164
187
|
children?: React.ReactNode;
|
|
165
188
|
/**
|
|
166
189
|
* The styles that are applied to the component.
|
|
190
|
+
*
|
|
191
|
+
* @example
|
|
192
|
+
* <Barcode style={{ backgroundColor: "lightgray" }} />
|
|
167
193
|
*/
|
|
168
194
|
style?: React.CSSProperties;
|
|
169
195
|
/**
|
|
170
196
|
* Sets additional CSS classes to the component.
|
|
197
|
+
*
|
|
198
|
+
* @example
|
|
199
|
+
* <Barcode className="custom-barcode-class" />
|
|
171
200
|
*/
|
|
172
201
|
className?: string;
|
|
173
202
|
/**
|
|
@@ -176,6 +205,9 @@ declare interface BaseBarcodeProps {
|
|
|
176
205
|
* The supported values are:
|
|
177
206
|
* - `"svg"`—If available, renders the component as an inline `svg` element.
|
|
178
207
|
* - `"canvas"`—If available, renders the component as a `canvas` element.
|
|
208
|
+
*
|
|
209
|
+
* @example
|
|
210
|
+
* <Barcode renderAs="svg" />
|
|
179
211
|
*/
|
|
180
212
|
renderAs?: RenderMode;
|
|
181
213
|
}
|
|
@@ -342,16 +374,23 @@ export declare interface QRCodeProps extends BaseBarcodeProps {
|
|
|
342
374
|
* The background color of the QR Code. Accepts a valid CSS color string, including hex and rgb.
|
|
343
375
|
*
|
|
344
376
|
* @default "white"
|
|
377
|
+
* @example
|
|
378
|
+
* <QRCode background="#ffffff" />
|
|
345
379
|
*/
|
|
346
380
|
background?: string;
|
|
347
381
|
/**
|
|
348
|
-
* The border of the QR Code.
|
|
382
|
+
* The border of the QR Code. Accepts an object implementing the `Border` interface.
|
|
383
|
+
*
|
|
384
|
+
* @example
|
|
385
|
+
* <QRCode border={{ color: "black", width: 2 }} />
|
|
349
386
|
*/
|
|
350
387
|
border?: Border;
|
|
351
388
|
/**
|
|
352
389
|
* The color of the QR Code. Accepts a valid CSS color string, including hex and rgb.
|
|
353
390
|
*
|
|
354
391
|
* @default "black"
|
|
392
|
+
* @example
|
|
393
|
+
* <QRCode color="#000000" />
|
|
355
394
|
*/
|
|
356
395
|
color?: string;
|
|
357
396
|
/**
|
|
@@ -364,6 +403,8 @@ export declare interface QRCodeProps extends BaseBarcodeProps {
|
|
|
364
403
|
* * `"UTF_8"`—Supports all [Unicode](https://en.wikipedia.org/wiki/List_of_Unicode_characters) characters.
|
|
365
404
|
*
|
|
366
405
|
* @default "ISO_8859_1"
|
|
406
|
+
* @example
|
|
407
|
+
* <QRCode encoding="UTF_8" />
|
|
367
408
|
*/
|
|
368
409
|
encoding?: QRCodeEncoding;
|
|
369
410
|
/**
|
|
@@ -376,19 +417,26 @@ export declare interface QRCodeProps extends BaseBarcodeProps {
|
|
|
376
417
|
* * `"H"`—Approximately 30% of the codewords can be restored.
|
|
377
418
|
*
|
|
378
419
|
* @default "L"
|
|
420
|
+
* @example
|
|
421
|
+
* <QRCode errorCorrection="H" />
|
|
379
422
|
*/
|
|
380
423
|
errorCorrection?: QRCodeErrorCorrection;
|
|
381
424
|
/**
|
|
382
|
-
* An optional image overlay that will placed over the QR Code.
|
|
425
|
+
* An optional image overlay that will be placed over the QR Code.
|
|
383
426
|
*
|
|
384
427
|
* > **Note** Always test if the code reads correctly with the applied overlay.
|
|
385
428
|
* > 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"`.
|
|
429
|
+
*
|
|
430
|
+
* @example
|
|
431
|
+
* <QRCode overlay={{ imageUrl: "https://example.com/logo.png", size: 50 }} />
|
|
386
432
|
*/
|
|
387
433
|
overlay?: QRCodeOverlay;
|
|
388
434
|
/**
|
|
389
435
|
* The padding of the QR Code. A numeric value sets all paddings.
|
|
390
436
|
*
|
|
391
437
|
* @default 0
|
|
438
|
+
* @example
|
|
439
|
+
* <QRCode padding={10} />
|
|
392
440
|
*/
|
|
393
441
|
padding?: number;
|
|
394
442
|
/**
|
|
@@ -398,10 +446,15 @@ export declare interface QRCodeProps extends BaseBarcodeProps {
|
|
|
398
446
|
* If the element has width or height of zero, a default value of 200 pixels will be used.
|
|
399
447
|
*
|
|
400
448
|
* @default "200px"
|
|
449
|
+
* @example
|
|
450
|
+
* <QRCode size={300} />
|
|
401
451
|
*/
|
|
402
452
|
size?: number | string;
|
|
403
453
|
/**
|
|
404
|
-
* The value of the QR Code.
|
|
454
|
+
* The value of the QR Code. Accepts a string or a number.
|
|
455
|
+
*
|
|
456
|
+
* @example
|
|
457
|
+
* <QRCode value="https://example.com" />
|
|
405
458
|
*/
|
|
406
459
|
value: number | string;
|
|
407
460
|
}
|
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={name:"@progress/kendo-react-barcodes",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-react-barcodes",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1744799818,version:"10.2.0-develop.8",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 = {
|
|
|
10
10
|
productName: "KendoReact",
|
|
11
11
|
productCode: "KENDOUIREACT",
|
|
12
12
|
productCodes: ["KENDOUIREACT"],
|
|
13
|
-
publishDate:
|
|
14
|
-
version: "10.2.0-develop.
|
|
13
|
+
publishDate: 1744799818,
|
|
14
|
+
version: "10.2.0-develop.8",
|
|
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": "10.2.0-develop.
|
|
3
|
+
"version": "10.2.0-develop.8",
|
|
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.7.1",
|
|
29
29
|
"@progress/kendo-drawing": "^1.21.2",
|
|
30
30
|
"@progress/kendo-licensing": "^1.5.1",
|
|
31
|
-
"@progress/kendo-react-common": "10.2.0-develop.
|
|
32
|
-
"@progress/kendo-react-intl": "10.2.0-develop.
|
|
31
|
+
"@progress/kendo-react-common": "10.2.0-develop.8",
|
|
32
|
+
"@progress/kendo-react-intl": "10.2.0-develop.8",
|
|
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": 1744799818,
|
|
60
60
|
"licensingDocsUrl": "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
61
61
|
}
|
|
62
62
|
},
|