@progress/kendo-react-barcodes 11.4.0-develop.6 → 11.4.0-develop.7
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/BaseBarcode.js +1 -1
- package/BaseBarcode.mjs +23 -23
- package/dist/cdn/js/kendo-react-barcodes.js +1 -1
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +5 -5
package/BaseBarcode.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
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react"),d=require("prop-types"),v=require("./store/store.js"),f=require("./store/reducer.js"),O=require("./utils/common.js"),w=require("./BarcodeContext.js"),a=require("@progress/kendo-react-common"),l=require("./package-metadata.js");function C(n){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const r in n)if(r!=="default"){const t=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(e,r,t.get?t:{enumerable:!0,get:()=>n[r]})}}return e.default=n,Object.freeze(e)}const o=C(b),i=class i extends o.Component{constructor(e){super(e),this.barcodeInstance=null,this.surface=null,this._element=null,this.observersStore={},this.showLicenseWatermark=!1,this.onWindowResize=()=>{this.barcodeInstance!==null&&(this.barcodeInstance.redraw(),this.trigger("render",{sender:this}))},this.showLicenseWatermark=!a.validatePackage(l.packageMetadata,{component:"Barcode"}),this.licenseMessage=a.getLicenseMessage(l.packageMetadata),this.observersStore=v.createStore(f.observersReducer),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:r,deriveOptionsFromParent:t,getTarget:s,barcodeConstructor:I,className:y,renderAs:h,...p}=this.props,{children:P,deriveOptionsFromParent:S,getTarget:k,barcodeConstructor:M,className:q,renderAs:u,...g}=e;if(this.barcodeInstance!==null){const m=O.isOptionsChanged(g,p);(h||"svg")!==(u||"svg")?(this.barcodeInstance!==null&&(this.barcodeInstance.destroy(),this.barcodeInstance=null),this.instantiateCoreBarcode()):m&&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:r,children:t}=this.props;return o.createElement(w.BarcodeContext.Provider,{value:this.contextValue},o.createElement("div",{style:e,ref:s=>{this._element=s},className:r},t,this.showLicenseWatermark&&o.createElement(a.WatermarkOverlay,{message:this.licenseMessage})))}instantiateCoreBarcode(){const{barcodeConstructor:e}=this.props,r=this.getBarcodeOptions();this.barcodeInstance=new e(this.element,r,t=>{if(process.env.NODE_ENV!=="production")throw t;console.warn(t)})}refresh(){if(this.barcodeInstance!==null){const e=this.getBarcodeOptions();this.barcodeInstance.setOptions(e)}}getBarcodeOptions(){const{renderAs:e,deriveOptionsFromParent:r}=this.props;let t={renderAs:e};return r&&(t=r(t)),t}trigger(e,r){const t=this.observersStore.getState();for(let s=0;s<t.length;s++)t[s].trigger(e,r)}};i.propTypes={dir:d.string,renderAs:d.oneOf(["svg","canvas"])},i.defaultProps={renderAs:"svg"};let c=i;exports.BaseBarcode=c;
|
package/BaseBarcode.mjs
CHANGED
|
@@ -7,17 +7,17 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import * as n from "react";
|
|
9
9
|
import i from "prop-types";
|
|
10
|
-
import { createStore as
|
|
10
|
+
import { createStore as g } from "./store/store.mjs";
|
|
11
11
|
import { observersReducer as v } from "./store/reducer.mjs";
|
|
12
|
-
import { isOptionsChanged as
|
|
13
|
-
import { BarcodeContext as
|
|
14
|
-
import { validatePackage as
|
|
15
|
-
import { packageMetadata as
|
|
12
|
+
import { isOptionsChanged as u } from "./utils/common.mjs";
|
|
13
|
+
import { BarcodeContext as b } from "./BarcodeContext.mjs";
|
|
14
|
+
import { validatePackage as f, getLicenseMessage as O, WatermarkOverlay as w } from "@progress/kendo-react-common";
|
|
15
|
+
import { packageMetadata as a } from "./package-metadata.mjs";
|
|
16
16
|
const o = class o extends n.Component {
|
|
17
17
|
constructor(e) {
|
|
18
18
|
super(e), this.barcodeInstance = null, this.surface = null, this._element = null, this.observersStore = {}, this.showLicenseWatermark = !1, this.onWindowResize = () => {
|
|
19
19
|
this.barcodeInstance !== null && (this.barcodeInstance.redraw(), this.trigger("render", { sender: this }));
|
|
20
|
-
}, this.showLicenseWatermark = !
|
|
20
|
+
}, this.showLicenseWatermark = !f(a, { component: "Barcode" }), this.licenseMessage = O(a), this.observersStore = g(v), this.contextValue = {
|
|
21
21
|
observersStore: this.observersStore
|
|
22
22
|
};
|
|
23
23
|
}
|
|
@@ -41,22 +41,22 @@ const o = class o extends n.Component {
|
|
|
41
41
|
children: r,
|
|
42
42
|
deriveOptionsFromParent: t,
|
|
43
43
|
getTarget: s,
|
|
44
|
-
barcodeConstructor:
|
|
45
|
-
className:
|
|
46
|
-
renderAs:
|
|
47
|
-
...
|
|
44
|
+
barcodeConstructor: C,
|
|
45
|
+
className: I,
|
|
46
|
+
renderAs: d,
|
|
47
|
+
...h
|
|
48
48
|
} = this.props, {
|
|
49
|
-
children:
|
|
50
|
-
deriveOptionsFromParent:
|
|
51
|
-
getTarget:
|
|
52
|
-
barcodeConstructor:
|
|
53
|
-
className:
|
|
54
|
-
renderAs:
|
|
55
|
-
...
|
|
49
|
+
children: P,
|
|
50
|
+
deriveOptionsFromParent: W,
|
|
51
|
+
getTarget: E,
|
|
52
|
+
barcodeConstructor: S,
|
|
53
|
+
className: k,
|
|
54
|
+
renderAs: l,
|
|
55
|
+
...p
|
|
56
56
|
} = e;
|
|
57
57
|
if (this.barcodeInstance !== null) {
|
|
58
|
-
const
|
|
59
|
-
(
|
|
58
|
+
const m = u(p, h);
|
|
59
|
+
(d || "svg") !== (l || "svg") ? (this.barcodeInstance !== null && (this.barcodeInstance.destroy(), this.barcodeInstance = null), this.instantiateCoreBarcode()) : m && this.refresh(), this.trigger("render", { sender: this });
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
/**
|
|
@@ -70,7 +70,7 @@ const o = class o extends n.Component {
|
|
|
70
70
|
*/
|
|
71
71
|
render() {
|
|
72
72
|
const { style: e = {}, className: r, children: t } = this.props;
|
|
73
|
-
return /* @__PURE__ */ n.createElement(
|
|
73
|
+
return /* @__PURE__ */ n.createElement(b.Provider, { value: this.contextValue }, /* @__PURE__ */ n.createElement(
|
|
74
74
|
"div",
|
|
75
75
|
{
|
|
76
76
|
style: e,
|
|
@@ -80,7 +80,7 @@ const o = class o extends n.Component {
|
|
|
80
80
|
className: r
|
|
81
81
|
},
|
|
82
82
|
t,
|
|
83
|
-
this.showLicenseWatermark && /* @__PURE__ */ n.createElement(
|
|
83
|
+
this.showLicenseWatermark && /* @__PURE__ */ n.createElement(w, { message: this.licenseMessage })
|
|
84
84
|
));
|
|
85
85
|
}
|
|
86
86
|
/**
|
|
@@ -126,7 +126,7 @@ o.propTypes = {
|
|
|
126
126
|
}, o.defaultProps = {
|
|
127
127
|
renderAs: "svg"
|
|
128
128
|
};
|
|
129
|
-
let
|
|
129
|
+
let c = o;
|
|
130
130
|
export {
|
|
131
|
-
|
|
131
|
+
c as BaseBarcode
|
|
132
132
|
};
|
|
@@ -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:"11.4.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:"11.4.0-develop.7",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/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: 1754569544,version:"11.4.0-develop.7",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: "11.4.0-develop.
|
|
13
|
+
publishDate: 1754569544,
|
|
14
|
+
version: "11.4.0-develop.7",
|
|
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": "11.4.0-develop.
|
|
3
|
+
"version": "11.4.0-develop.7",
|
|
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",
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"@progress/kendo-charts": "2.8.0",
|
|
29
29
|
"@progress/kendo-drawing": "^1.21.2",
|
|
30
|
-
"@progress/kendo-licensing": "^1.
|
|
31
|
-
"@progress/kendo-react-common": "11.4.0-develop.
|
|
32
|
-
"@progress/kendo-react-intl": "11.4.0-develop.
|
|
30
|
+
"@progress/kendo-licensing": "^1.7.0",
|
|
31
|
+
"@progress/kendo-react-common": "11.4.0-develop.7",
|
|
32
|
+
"@progress/kendo-react-intl": "11.4.0-develop.7",
|
|
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": 1754569544,
|
|
60
60
|
"licensingDocsUrl": "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
61
61
|
}
|
|
62
62
|
},
|