@progress/kendo-react-barcodes
Advanced tools
Comparing version 9.4.0-develop.4 to 9.4.0-develop.5
@@ -8,2 +8,9 @@ /** | ||
*/ | ||
!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,o,n){"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],o=t[r];if(d(s)&&d(o)?l(s,o):s!==o)return!0}return!1},p=i.createContext(null);p.displayName="BarcodeContext";const h={name:"@progress/kendo-react-barcodes",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:1737733464,version:"$VERSION",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"},u=class extends i.Component{constructor(e){super(e),this.barcodeInstance=null,this.surface=null,this._element=null,this.observersStore={},this.onWindowResize=()=>{null!==this.barcodeInstance&&(this.barcodeInstance.redraw(),this.trigger("render",{sender:this}))},s.validatePackage(h),this.observersStore=(e=>{let t,r,o=[];const n=n=>{t=e(t,n),s.canUseDOM&&(window.clearTimeout(r),r=window.setTimeout((()=>o.forEach((e=>e()))),16.666666666666668))};return n({}),{getState:()=>t,dispatch:n,subscribe:e=>(o.push(e),()=>o=o.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:o,className:n,renderAs:a,...i}=this.props,{children:c,deriveOptionsFromParent:d,getTarget:p,barcodeConstructor:h,className:u,renderAs:g,...b}=e;if(null!==this.barcodeInstance){const e=((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})(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(p.Provider,{value:this.contextValue},i.createElement("div",{style:e,ref:e=>this._element=e,className:t},r))}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)}};u.propTypes={dir:r.string,renderAs:r.oneOf(["svg","canvas"])},u.defaultProps={renderAs:"svg"};let g=u;class b 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(g,{...r,deriveOptionsFromParent:this.deriveOptionsFromParent,ref:e=>this._baseBarcode=e,barcodeConstructor:o.Barcode,getTarget:this.getTarget,className:s.classNames("k-barcode",t)},e)}exportImage(e={}){return n.exportImage(this.exportVisual(),e)}exportSVG(e={}){return n.exportSVG(this.exportVisual(),e)}exportVisual(e){return null!==this.barcodeInstance?this.barcodeInstance.exportVisual(e):new n.Group}}class m 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(g,{...r,deriveOptionsFromParent:this.deriveOptionsFromParent,ref:e=>this._baseBarcode=e,barcodeConstructor:o.QRCode,getTarget:this.getTarget,className:s.classNames("k-qrcode",t)},e)}exportImage(e={}){return n.exportImage(this.exportVisual(),e)}exportSVG(e={}){return n.exportSVG(this.exportVisual(),e)}exportVisual(e){return null!==this.barcodeInstance?this.barcodeInstance.exportVisual(e):new n.Group}}e.Barcode=b,e.QRCode=m})); | ||
/** | ||
* @license | ||
*------------------------------------------------------------------------------------------- | ||
* Copyright © 2025 Progress Software Corporation. All rights reserved. | ||
* Licensed under commercial license. See LICENSE.md in the package root for more information | ||
*------------------------------------------------------------------------------------------- | ||
*/ | ||
!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,o,n){"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],o=t[r];if(d(s)&&d(o)?l(s,o):s!==o)return!0}return!1},p=i.createContext(null);p.displayName="BarcodeContext";const h={name:"@progress/kendo-react-barcodes",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:0,version:"$VERSION",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"},u=class extends i.Component{constructor(e){super(e),this.barcodeInstance=null,this.surface=null,this._element=null,this.observersStore={},this.onWindowResize=()=>{null!==this.barcodeInstance&&(this.barcodeInstance.redraw(),this.trigger("render",{sender:this}))},s.validatePackage(h),this.observersStore=(e=>{let t,r,o=[];const n=n=>{t=e(t,n),s.canUseDOM&&(window.clearTimeout(r),r=window.setTimeout((()=>o.forEach((e=>e()))),16.666666666666668))};return n({}),{getState:()=>t,dispatch:n,subscribe:e=>(o.push(e),()=>o=o.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:o,className:n,renderAs:a,...i}=this.props,{children:c,deriveOptionsFromParent:d,getTarget:p,barcodeConstructor:h,className:u,renderAs:g,...b}=e;if(null!==this.barcodeInstance){const e=((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})(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(p.Provider,{value:this.contextValue},i.createElement("div",{style:e,ref:e=>this._element=e,className:t},r))}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)}};u.propTypes={dir:r.string,renderAs:r.oneOf(["svg","canvas"])},u.defaultProps={renderAs:"svg"};let g=u;class b 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(g,{...r,deriveOptionsFromParent:this.deriveOptionsFromParent,ref:e=>this._baseBarcode=e,barcodeConstructor:o.Barcode,getTarget:this.getTarget,className:s.classNames("k-barcode",t)},e)}exportImage(e={}){return n.exportImage(this.exportVisual(),e)}exportSVG(e={}){return n.exportSVG(this.exportVisual(),e)}exportVisual(e){return null!==this.barcodeInstance?this.barcodeInstance.exportVisual(e):new n.Group}}class m 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(g,{...r,deriveOptionsFromParent:this.deriveOptionsFromParent,ref:e=>this._baseBarcode=e,barcodeConstructor:o.QRCode,getTarget:this.getTarget,className:s.classNames("k-qrcode",t)},e)}exportImage(e={}){return n.exportImage(this.exportVisual(),e)}exportSVG(e={}){return n.exportSVG(this.exportVisual(),e)}exportVisual(e){return null!==this.barcodeInstance?this.barcodeInstance.exportVisual(e):new n.Group}}e.Barcode=b,e.QRCode=m})); |
@@ -8,2 +8,2 @@ /** | ||
*/ | ||
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-react-barcodes",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1737733464,version:"9.4.0-develop.4",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"};exports.packageMetadata=e; | ||
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-react-barcodes",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1737736481,version:"9.4.0-develop.5",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"};exports.packageMetadata=e; |
{ | ||
"name": "@progress/kendo-react-barcodes", | ||
"version": "9.4.0-develop.4", | ||
"version": "9.4.0-develop.5", | ||
"description": "React Barcodes provide a set of React components to build beautiful and customizable barcodes. KendoReact Barcodes package", | ||
@@ -28,7 +28,7 @@ "author": "Progress", | ||
"peerDependencies": { | ||
"@progress/kendo-charts": "2.6.2", | ||
"@progress/kendo-charts": "2.7.0", | ||
"@progress/kendo-drawing": "^1.21.2", | ||
"@progress/kendo-licensing": "^1.3.4", | ||
"@progress/kendo-react-common": "9.4.0-develop.4", | ||
"@progress/kendo-react-intl": "9.4.0-develop.4", | ||
"@progress/kendo-react-common": "9.4.0-develop.5", | ||
"@progress/kendo-react-intl": "9.4.0-develop.5", | ||
"react": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc", | ||
@@ -60,3 +60,3 @@ "react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" | ||
"productCode": "KENDOUIREACT", | ||
"publishDate": 1737733464, | ||
"publishDate": 1737736481, | ||
"licensingDocsUrl": "https://www.telerik.com/kendo-react-ui/components/my-license/" | ||
@@ -63,0 +63,0 @@ } |
Sorry, the diff of this file is not supported yet
80908
974