@progress/kendo-react-barcodes 7.0.3-develop.9 → 7.1.0-develop.2

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.
@@ -2,4 +2,4 @@
2
2
  * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the package root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
- (function(o,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("react"),require("prop-types"),require("@progress/kendo-react-common"),require("@progress/kendo-charts"),require("@progress/kendo-drawing")):typeof define=="function"&&define.amd?define(["exports","react","prop-types","@progress/kendo-react-common","@progress/kendo-charts","@progress/kendo-drawing"],d):(o=typeof globalThis<"u"?globalThis:o||self,d(o.KendoReactBarcodes={},o.React,o.PropTypes,o.KendoReactCommon,o.KendoCharts,o.KendoDrawing))})(this,function(o,d,f,u,b,a){"use strict";"use client";function B(r){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const s=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,s.get?s:{enumerable:!0,get:()=>r[t]})}}return e.default=r,Object.freeze(e)}const i=B(d),x=1e3/60,C=r=>{let e,t,s=[];const n=()=>e,h=c=>{e=r(e,c),u.canUseDOM&&(window.clearTimeout(t),t=window.setTimeout(()=>s.forEach(p=>p()),x))},O=c=>(s.push(c),()=>s=s.filter(p=>p!==c));return h({}),{getState:n,dispatch:h,subscribe:O}},I=(r,e)=>{if(e.type)switch(e.type){case"add":return[...r,e.payload];case"remove":return r.filter(t=>t!==e.payload);default:return r}else return[]},g=r=>typeof r=="object",m=(r,e)=>{if(Object.keys(r).length!==Object.keys(e).length)return!0;for(let t in r)if(r.hasOwnProperty(t)){const s=r[t],n=e[t];if(g(s)&&g(n)?m(s,n):s!==n)return!0}return!1},_=(r,e)=>{if(!r||!e||(r=[].concat(r),e=[].concat(e),r.length!==e.length))return!0;for(let t=0;t<r.length;t++)if(m(r[t],e[t]))return!0;return!1},v=i.createContext(null);v.displayName="BarcodeContext";const y={name:"@progress/kendo-react-barcodes",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:0,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"};class l extends i.Component{constructor(e){super(e),this.barcodeInstance=null,this.surface=null,this._element=null,this.observersStore={},this.onWindowResize=()=>{this.barcodeInstance!==null&&(this.barcodeInstance.redraw(),this.trigger("render",{sender:this}))},u.validatePackage(y),this.observersStore=C(I),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:s,getTarget:n,barcodeConstructor:h,className:O,renderAs:c,...p}=this.props,{children:A,deriveOptionsFromParent:F,getTarget:j,barcodeConstructor:D,className:U,renderAs:R,...S}=e;if(this.barcodeInstance!==null){const V=_(S,p);(c||"svg")!==(R||"svg")?(this.barcodeInstance!==null&&(this.barcodeInstance.destroy(),this.barcodeInstance=null),this.instantiateCoreBarcode()):V&&this.refresh(),this.trigger("render",{sender:this})}}componentWillUnmount(){this.barcodeInstance!==null&&(this.barcodeInstance.destroy(),this.barcodeInstance=null),window.removeEventListener("resize",this.onWindowResize)}render(){const{style:e={},className:t,children:s}=this.props;return i.createElement(v.Provider,{value:this.contextValue},i.createElement("div",{style:e,ref:n=>this._element=n,className:t},s))}instantiateCoreBarcode(){const{barcodeConstructor:e}=this.props,t=this.getBarcodeOptions();this.barcodeInstance=new e(this.element,t,s=>{if(process.env.NODE_ENV!=="production")throw s;console.warn(s)})}refresh(){if(this.barcodeInstance!==null){const e=this.getBarcodeOptions();this.barcodeInstance.setOptions(e)}}getBarcodeOptions(){const{renderAs:e,deriveOptionsFromParent:t}=this.props;let s={renderAs:e};return t&&(s=t(s)),s}trigger(e,t){const s=this.observersStore.getState();for(let n=0;n<s.length;n++)s[n].trigger(e,t)}}l.propTypes={dir:f.string,renderAs:f.oneOf(["svg","canvas"])},l.defaultProps={renderAs:"svg"};class T 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 this._baseBarcode!==null?this._baseBarcode.barcodeInstance:null}get surface(){return this._baseBarcode!==null?this._baseBarcode.surface:null}get element(){return this._baseBarcode!==null?this._baseBarcode.element:null}render(){const{children:e,className:t,...s}=this.props;return i.createElement(l,{...s,deriveOptionsFromParent:this.deriveOptionsFromParent,ref:n=>this._baseBarcode=n,barcodeConstructor:b.Barcode,getTarget:this.getTarget,className:u.classNames("k-barcode",t)},e)}exportImage(e={}){return a.exportImage(this.exportVisual(),e)}exportSVG(e={}){return a.exportSVG(this.exportVisual(),e)}exportVisual(e){return this.barcodeInstance!==null?this.barcodeInstance.exportVisual(e):new a.Group}}const w="#000",E="#fff",P="L";class N extends i.Component{constructor(){super(...arguments),this._baseBarcode=null,this.getTarget=()=>this,this.deriveOptionsFromParent=e=>Object.assign({},e,{background:this.props.background||E,border:this.props.border,color:this.props.color||w,encoding:this.props.encoding,errorCorrection:this.props.errorCorrection||P,overlay:this.props.overlay||{},padding:this.props.padding,renderAs:this.props.renderAs,size:this.props.size,value:this.props.value})}get barcodeInstance(){return this._baseBarcode!==null?this._baseBarcode.barcodeInstance:null}get surface(){return this._baseBarcode!==null?this._baseBarcode.surface:null}get element(){return this._baseBarcode!==null?this._baseBarcode.element:null}render(){const{children:e,className:t,...s}=this.props;return i.createElement(l,{...s,deriveOptionsFromParent:this.deriveOptionsFromParent,ref:n=>this._baseBarcode=n,barcodeConstructor:b.QRCode,getTarget:this.getTarget,className:u.classNames("k-qrcode",t)},e)}exportImage(e={}){return a.exportImage(this.exportVisual(),e)}exportSVG(e={}){return a.exportSVG(this.exportVisual(),e)}exportVisual(e){return this.barcodeInstance!==null?this.barcodeInstance.exportVisual(e):new a.Group}}o.Barcode=T,o.QRCode=N,Object.defineProperty(o,Symbol.toStringTag,{value:"Module"})});
5
+ (function(o,d){typeof exports=="object"&&typeof module!="undefined"?d(exports,require("react"),require("prop-types"),require("@progress/kendo-react-common"),require("@progress/kendo-charts"),require("@progress/kendo-drawing")):typeof define=="function"&&define.amd?define(["exports","react","prop-types","@progress/kendo-react-common","@progress/kendo-charts","@progress/kendo-drawing"],d):(o=typeof globalThis!="undefined"?globalThis:o||self,d(o.KendoReactBarcodes={},o.React,o.PropTypes,o.KendoReactCommon,o.KendoCharts,o.KendoDrawing))})(this,function(o,d,f,u,b,a){"use strict";"use client";function B(r){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const s=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,s.get?s:{enumerable:!0,get:()=>r[t]})}}return e.default=r,Object.freeze(e)}const i=B(d),x=1e3/60,C=r=>{let e,t,s=[];const n=()=>e,h=c=>{e=r(e,c),u.canUseDOM&&(window.clearTimeout(t),t=window.setTimeout(()=>s.forEach(p=>p()),x))},O=c=>(s.push(c),()=>s=s.filter(p=>p!==c));return h({}),{getState:n,dispatch:h,subscribe:O}},I=(r,e)=>{if(e.type)switch(e.type){case"add":return[...r,e.payload];case"remove":return r.filter(t=>t!==e.payload);default:return r}else return[]},g=r=>typeof r=="object",m=(r,e)=>{if(Object.keys(r).length!==Object.keys(e).length)return!0;for(let t in r)if(r.hasOwnProperty(t)){const s=r[t],n=e[t];if(g(s)&&g(n)?m(s,n):s!==n)return!0}return!1},_=(r,e)=>{if(!r||!e||(r=[].concat(r),e=[].concat(e),r.length!==e.length))return!0;for(let t=0;t<r.length;t++)if(m(r[t],e[t]))return!0;return!1},v=i.createContext(null);v.displayName="BarcodeContext";const y={name:"@progress/kendo-react-barcodes",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:0,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"};class l extends i.Component{constructor(e){super(e),this.barcodeInstance=null,this.surface=null,this._element=null,this.observersStore={},this.onWindowResize=()=>{this.barcodeInstance!==null&&(this.barcodeInstance.redraw(),this.trigger("render",{sender:this}))},u.validatePackage(y),this.observersStore=C(I),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:s,getTarget:n,barcodeConstructor:h,className:O,renderAs:c,...p}=this.props,{children:A,deriveOptionsFromParent:F,getTarget:j,barcodeConstructor:D,className:U,renderAs:R,...S}=e;if(this.barcodeInstance!==null){const V=_(S,p);(c||"svg")!==(R||"svg")?(this.barcodeInstance!==null&&(this.barcodeInstance.destroy(),this.barcodeInstance=null),this.instantiateCoreBarcode()):V&&this.refresh(),this.trigger("render",{sender:this})}}componentWillUnmount(){this.barcodeInstance!==null&&(this.barcodeInstance.destroy(),this.barcodeInstance=null),window.removeEventListener("resize",this.onWindowResize)}render(){const{style:e={},className:t,children:s}=this.props;return i.createElement(v.Provider,{value:this.contextValue},i.createElement("div",{style:e,ref:n=>this._element=n,className:t},s))}instantiateCoreBarcode(){const{barcodeConstructor:e}=this.props,t=this.getBarcodeOptions();this.barcodeInstance=new e(this.element,t,s=>{if(process.env.NODE_ENV!=="production")throw s;console.warn(s)})}refresh(){if(this.barcodeInstance!==null){const e=this.getBarcodeOptions();this.barcodeInstance.setOptions(e)}}getBarcodeOptions(){const{renderAs:e,deriveOptionsFromParent:t}=this.props;let s={renderAs:e};return t&&(s=t(s)),s}trigger(e,t){const s=this.observersStore.getState();for(let n=0;n<s.length;n++)s[n].trigger(e,t)}}l.propTypes={dir:f.string,renderAs:f.oneOf(["svg","canvas"])},l.defaultProps={renderAs:"svg"};class T 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 this._baseBarcode!==null?this._baseBarcode.barcodeInstance:null}get surface(){return this._baseBarcode!==null?this._baseBarcode.surface:null}get element(){return this._baseBarcode!==null?this._baseBarcode.element:null}render(){const{children:e,className:t,...s}=this.props;return i.createElement(l,{...s,deriveOptionsFromParent:this.deriveOptionsFromParent,ref:n=>this._baseBarcode=n,barcodeConstructor:b.Barcode,getTarget:this.getTarget,className:u.classNames("k-barcode",t)},e)}exportImage(e={}){return a.exportImage(this.exportVisual(),e)}exportSVG(e={}){return a.exportSVG(this.exportVisual(),e)}exportVisual(e){return this.barcodeInstance!==null?this.barcodeInstance.exportVisual(e):new a.Group}}const w="#000",E="#fff",P="L";class N extends i.Component{constructor(){super(...arguments),this._baseBarcode=null,this.getTarget=()=>this,this.deriveOptionsFromParent=e=>Object.assign({},e,{background:this.props.background||E,border:this.props.border,color:this.props.color||w,encoding:this.props.encoding,errorCorrection:this.props.errorCorrection||P,overlay:this.props.overlay||{},padding:this.props.padding,renderAs:this.props.renderAs,size:this.props.size,value:this.props.value})}get barcodeInstance(){return this._baseBarcode!==null?this._baseBarcode.barcodeInstance:null}get surface(){return this._baseBarcode!==null?this._baseBarcode.surface:null}get element(){return this._baseBarcode!==null?this._baseBarcode.element:null}render(){const{children:e,className:t,...s}=this.props;return i.createElement(l,{...s,deriveOptionsFromParent:this.deriveOptionsFromParent,ref:n=>this._baseBarcode=n,barcodeConstructor:b.QRCode,getTarget:this.getTarget,className:u.classNames("k-qrcode",t)},e)}exportImage(e={}){return a.exportImage(this.exportVisual(),e)}exportSVG(e={}){return a.exportSVG(this.exportVisual(),e)}exportVisual(e){return this.barcodeInstance!==null?this.barcodeInstance.exportVisual(e):new a.Group}}o.Barcode=T,o.QRCode=N,Object.defineProperty(o,Symbol.toStringTag,{value:"Module"})});
package/index.mjs CHANGED
@@ -49,7 +49,7 @@ const N = {
49
49
  name: "@progress/kendo-react-barcodes",
50
50
  productName: "KendoReact",
51
51
  productCodes: ["KENDOUIREACT", "KENDOUICOMPLETE"],
52
- publishDate: 1704454246,
52
+ publishDate: 1705399026,
53
53
  version: "",
54
54
  licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
55
55
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-react-barcodes",
3
- "version": "7.0.3-develop.9",
3
+ "version": "7.1.0-develop.2",
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",
@@ -22,11 +22,11 @@
22
22
  },
23
23
  "sideEffects": false,
24
24
  "peerDependencies": {
25
- "@progress/kendo-charts": "1.32.1",
25
+ "@progress/kendo-charts": "2.0.0",
26
26
  "@progress/kendo-drawing": "^1.19.0",
27
27
  "@progress/kendo-licensing": "^1.3.4",
28
- "@progress/kendo-react-common": "7.0.3-develop.9",
29
- "@progress/kendo-react-intl": "7.0.3-develop.9",
28
+ "@progress/kendo-react-common": "7.1.0-develop.2",
29
+ "@progress/kendo-react-intl": "7.1.0-develop.2",
30
30
  "hammerjs": "^2.0.0",
31
31
  "react": "^16.8.2 || ^17.0.0 || ^18.0.0",
32
32
  "react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0"