@progress/kendo-react-progressbars 14.3.0-develop.9 → 14.3.1-develop.1

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/common/utils.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 u=require("./constants.js"),s=e=>{const t=e.toString().split(".");return t.length===1?`${t[0]}`:`${t[0]}.${t[1].substr(0,u.LABEL_DECIMALS)}`},o=(e,t,n)=>{const r=Math.abs((t-e)/100);return Math.abs((n-e)/r)},l=(e,t,n,r)=>{const c=Math.max(n,.01),a=100/c*100;e.current&&t.current&&(e.current.style.width=r?"100%":`${c}%`,t.current.style.width=r?"100%":`${a}%`,e.current.style.height=r?`${c}%`:"100%",t.current.style.height=r?`${a}%`:"100%")},h=(e,t,n)=>Math.max((n-e)/(t-e),u.MIN_RATIO);exports.calculatePercentage=o;exports.calculateRatio=h;exports.truncateNumber=s;exports.updateProgress=l;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./constants.js"),s=e=>{const t=e.toString().split(".");return t.length===1?`${t[0]}`:`${t[0]}.${t[1].substr(0,u.LABEL_DECIMALS)}`},o=(e,t,n)=>{const r=Math.abs((t-e)/100);return Math.min(Math.max((n-e)/r,0),100)},l=(e,t,n,r)=>{const c=Math.max(n,.01),a=100/c*100;e.current&&t.current&&(e.current.style.width=r?"100%":`${c}%`,t.current.style.width=r?"100%":`${a}%`,e.current.style.height=r?`${c}%`:"100%",t.current.style.height=r?`${a}%`:"100%")},h=(e,t,n)=>Math.max((n-e)/(t-e),u.MIN_RATIO);exports.calculatePercentage=o;exports.calculateRatio=h;exports.truncateNumber=s;exports.updateProgress=l;
package/common/utils.mjs CHANGED
@@ -5,20 +5,20 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { LABEL_DECIMALS as a, MIN_RATIO as o } from "./constants.mjs";
9
- const h = (e) => {
8
+ import { LABEL_DECIMALS as u, MIN_RATIO as o } from "./constants.mjs";
9
+ const s = (e) => {
10
10
  const t = e.toString().split(".");
11
- return t.length === 1 ? `${t[0]}` : `${t[0]}.${t[1].substr(0, a)}`;
12
- }, l = (e, t, n) => {
13
- const r = Math.abs((t - e) / 100);
14
- return Math.abs((n - e) / r);
15
- }, $ = (e, t, n, r) => {
16
- const c = Math.max(n, 0.01), u = 100 / c * 100;
17
- e.current && t.current && (e.current.style.width = r ? "100%" : `${c}%`, t.current.style.width = r ? "100%" : `${u}%`, e.current.style.height = r ? `${c}%` : "100%", t.current.style.height = r ? `${u}%` : "100%");
18
- }, g = (e, t, n) => Math.max((n - e) / (t - e), o);
11
+ return t.length === 1 ? `${t[0]}` : `${t[0]}.${t[1].substr(0, u)}`;
12
+ }, l = (e, t, r) => {
13
+ const n = Math.abs((t - e) / 100);
14
+ return Math.min(Math.max((r - e) / n, 0), 100);
15
+ }, M = (e, t, r, n) => {
16
+ const c = Math.max(r, 0.01), a = 100 / c * 100;
17
+ e.current && t.current && (e.current.style.width = n ? "100%" : `${c}%`, t.current.style.width = n ? "100%" : `${a}%`, e.current.style.height = n ? `${c}%` : "100%", t.current.style.height = n ? `${a}%` : "100%");
18
+ }, $ = (e, t, r) => Math.max((r - e) / (t - e), o);
19
19
  export {
20
20
  l as calculatePercentage,
21
- g as calculateRatio,
22
- h as truncateNumber,
23
- $ as updateProgress
21
+ $ as calculateRatio,
22
+ s as truncateNumber,
23
+ M as updateProgress
24
24
  };
@@ -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,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("react"),require("prop-types"),require("@progress/kendo-react-common"),require("@progress/kendo-react-animation")):"function"==typeof define&&define.amd?define(["exports","react","prop-types","@progress/kendo-react-common","@progress/kendo-react-animation"],r):r((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactProgressbars={},e.React,e.PropTypes,e.KendoReactCommon,e.KendoReactAnimation)}(this,function(e,r,a,s,t){"use strict";function n(e){var r=Object.create(null);return e&&Object.keys(e).forEach(function(a){if("default"!==a){var s=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(r,a,s.get?s:{enumerable:!0,get:function(){return e[a]}})}}),r.default=e,Object.freeze(r)}var l=n(r);const o=(e,r,a)=>{const s=Math.abs((r-e)/100);return Math.abs((a-e)/s)},i=(e,r,a,s)=>{const t=Math.max(a,.01),n=100/t*100;e.current&&r.current&&(e.current.style.width=s?"100%":`${t}%`,r.current.style.width=s?"100%":`${n}%`,e.current.style.height=s?`${t}%`:"100%",r.current.style.height=s?`${n}%`:"100%")},c=(e,r,a)=>Math.max((a-e)/(r-e),1e-5),u=Object.freeze({name:"@progress/kendo-react-progressbars",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:0,version:"14.3.0-develop.9",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"}),m=l.forwardRef((e,r)=>{const a=!s.validatePackage(u,{component:"ChunkProgressBar"}),t=s.getLicenseMessage(u),{chunkCount:n=d.chunkCount,className:o,disabled:i=d.disabled,orientation:m,min:b=d.min,max:p=d.max,reverse:g=d.reverse,style:k,tabIndex:v,emptyStyle:f,emptyClassName:y,progressStyle:h,progressClassName:N}=e,C=l.useRef(null),E=l.useCallback(()=>{C.current&&C.current.focus()},[]);l.useImperativeHandle(r,()=>({element:C.current,focus:E}));const x=e.value||d.value,R=null===e.value,I=s.useRtl(C,e.dir),S="vertical"===m,w={className:s.classNames("k-progressbar k-chunk-progressbar",{"k-progressbar-horizontal":!S,"k-progressbar-vertical":S,"k-progressbar-reverse":g,"k-progressbar-indeterminate":R,"k-disabled":i},o),ref:C,dir:I,tabIndex:s.getTabIndex(v,i),role:"progressbar","aria-label":e.ariaLabel,"aria-valuemin":b,"aria-valuemax":p,"aria-valuenow":R?void 0:x,"aria-disabled":i,style:k},O=({count:e})=>{const r=[],a=100/e+"%",t=c(b,p,x),n=Math.floor(t*e),o=Array(e).fill(!1);for(let e=0;e<n;e++)o[e]=!0;for(let t=0;t<e;++t){const n=o[t],i=n?N:y,c={width:S?void 0:a,height:S?a:void 0,...n?h:f};r.push(l.createElement("li",{key:t,className:s.classNames("k-progressbar-chunk",{"k-first":0===t,"k-last":t===e-1,"k-selected":n},i),style:c}))}return l.createElement(l.Fragment,null,r)};return l.createElement(l.Fragment,null,l.createElement("div",{...w},l.createElement("ul",{className:"k-progressbar-chunks k-reset"},l.createElement(O,{count:n}))),a&&l.createElement(s.WatermarkOverlay,{message:t}))});m.propTypes={chunkCount:a.number,ariaLabel:a.string,disabled:a.bool,reverse:a.bool,max:a.number,min:a.number,value:a.number,tabIndex:a.number,emptyStyle:a.object,emptyClassName:a.string,progressStyle:a.object,progressClassName:a.string};const d={chunkCount:5,min:0,max:100,value:0,disabled:!1,reverse:!1};m.displayName="KendoChunkProgressBar";const b=l.forwardRef((e,r)=>{const{animation:a=p.animation,disabled:n=p.disabled,reverse:c=p.reverse,orientation:u,labelVisible:m=p.labelVisible,labelPlacement:d,max:b=p.max,min:g=p.min,tabIndex:k,className:v,style:f,emptyStyle:y,emptyClassName:h,progressStyle:N,progressClassName:C}=e,E=l.useRef(null),x=l.useRef(null),R=l.useRef(null),I=l.useCallback(()=>{E.current&&E.current.focus()},[]);l.useImperativeHandle(r,()=>({element:E.current,progressStatusElement:x.current,progressStatusWrapElement:R.current,focus:I}));const S=e.value||p.value,w=(e=>{const r=l.useRef(void 0);return l.useEffect(()=>{r.current=e}),r.current})(S),O=null===e.value,P=s.useRtl(E,e.dir),j="vertical"===u,T=(e=>{const r=e.toString().split(".");return 1===r.length?`${r[0]}`:`${r[0]}.${r[1].substr(0,3)}`})(S),K={value:S},$=m?e.label?l.createElement("span",{className:"k-progress-status"},l.createElement(e.label,{...K})):l.createElement("span",{className:"k-progress-status"},T):void 0,M={className:s.classNames("k-progressbar",{"k-progressbar-horizontal":!j,"k-progressbar-vertical":j,"k-progressbar-reverse":c,"k-progressbar-indeterminate":O,"k-disabled":n},v),ref:E,dir:P,tabIndex:s.getTabIndex(k,n),role:"progressbar","aria-label":e.ariaLabel,"aria-valuemin":g,"aria-valuemax":b,"aria-valuenow":O?void 0:S,"aria-disabled":n,style:f},A=s.classNames("k-progress-status-wrap",{"k-progress-start":"start"===d,"k-progress-center":"center"===d,"k-progress-end":"end"===d||void 0===d}),B="boolean"!=typeof a&&void 0!==a?a.duration:a?400:0,D=l.useCallback(()=>{const e=o(g,b,w);i(x,R,e,j)},[j,b,g,w]),L=l.useCallback(e=>{const r=o(g,b,w+(S-w)*e);i(x,R,r,j)},[g,b,w,S,j]),V=l.useCallback(()=>{const e=o(g,b,S);i(x,R,e,j)},[j,b,g,S]);return t.useAnimation({duration:B,onStart:D,onUpdate:L,onEnd:V},[S,B]),l.createElement("div",{...M},l.createElement("span",{className:A+(h?" "+h:""),style:y},$),l.createElement("div",{className:"k-progressbar-value k-selected",style:N,ref:x},l.createElement("span",{className:A+(C?" "+C:""),ref:R},$)))});b.propTypes={animation:a.any,ariaLabel:a.string,disabled:a.bool,reverse:a.bool,label:a.any,labelVisible:a.bool,labelPlacement:a.oneOf(["start","center","end"]),max:a.number,min:a.number,value:a.number,tabIndex:a.number,emptyStyle:a.object,emptyClassName:a.string,progressStyle:a.object,progressClassName:a.string};const p={animation:!1,min:0,max:100,value:0,disabled:!1,reverse:!1,labelVisible:!0};b.displayName="KendoProgressBar",e.ChunkProgressBar=m,e.ProgressBar=b});
15
+ !function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("react"),require("prop-types"),require("@progress/kendo-react-common"),require("@progress/kendo-react-animation")):"function"==typeof define&&define.amd?define(["exports","react","prop-types","@progress/kendo-react-common","@progress/kendo-react-animation"],r):r((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactProgressbars={},e.React,e.PropTypes,e.KendoReactCommon,e.KendoReactAnimation)}(this,function(e,r,a,s,t){"use strict";function n(e){var r=Object.create(null);return e&&Object.keys(e).forEach(function(a){if("default"!==a){var s=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(r,a,s.get?s:{enumerable:!0,get:function(){return e[a]}})}}),r.default=e,Object.freeze(r)}var l=n(r);const o=(e,r,a)=>{const s=Math.abs((r-e)/100);return Math.min(Math.max((a-e)/s,0),100)},i=(e,r,a,s)=>{const t=Math.max(a,.01),n=100/t*100;e.current&&r.current&&(e.current.style.width=s?"100%":`${t}%`,r.current.style.width=s?"100%":`${n}%`,e.current.style.height=s?`${t}%`:"100%",r.current.style.height=s?`${n}%`:"100%")},c=(e,r,a)=>Math.max((a-e)/(r-e),1e-5),u=Object.freeze({name:"@progress/kendo-react-progressbars",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:0,version:"14.3.1-develop.1",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"}),m=l.forwardRef((e,r)=>{const a=!s.validatePackage(u,{component:"ChunkProgressBar"}),t=s.getLicenseMessage(u),{chunkCount:n=d.chunkCount,className:o,disabled:i=d.disabled,orientation:m,min:b=d.min,max:p=d.max,reverse:g=d.reverse,style:k,tabIndex:v,emptyStyle:f,emptyClassName:y,progressStyle:h,progressClassName:N}=e,C=l.useRef(null),x=l.useCallback(()=>{C.current&&C.current.focus()},[]);l.useImperativeHandle(r,()=>({element:C.current,focus:x}));const E=e.value||d.value,R=null===e.value,I=s.useRtl(C,e.dir),S="vertical"===m,w={className:s.classNames("k-progressbar k-chunk-progressbar",{"k-progressbar-horizontal":!S,"k-progressbar-vertical":S,"k-progressbar-reverse":g,"k-progressbar-indeterminate":R,"k-disabled":i},o),ref:C,dir:I,tabIndex:s.getTabIndex(v,i),role:"progressbar","aria-label":e.ariaLabel,"aria-valuemin":b,"aria-valuemax":p,"aria-valuenow":R?void 0:E,"aria-disabled":i,style:k},O=({count:e})=>{const r=[],a=100/e+"%",t=c(b,p,E),n=Math.floor(t*e),o=Array(e).fill(!1);for(let e=0;e<n;e++)o[e]=!0;for(let t=0;t<e;++t){const n=o[t],i=n?N:y,c={width:S?void 0:a,height:S?a:void 0,...n?h:f};r.push(l.createElement("li",{key:t,className:s.classNames("k-progressbar-chunk",{"k-first":0===t,"k-last":t===e-1,"k-selected":n},i),style:c}))}return l.createElement(l.Fragment,null,r)};return l.createElement(l.Fragment,null,l.createElement("div",{...w},l.createElement("ul",{className:"k-progressbar-chunks k-reset"},l.createElement(O,{count:n}))),a&&l.createElement(s.WatermarkOverlay,{message:t}))});m.propTypes={chunkCount:a.number,ariaLabel:a.string,disabled:a.bool,reverse:a.bool,max:a.number,min:a.number,value:a.number,tabIndex:a.number,emptyStyle:a.object,emptyClassName:a.string,progressStyle:a.object,progressClassName:a.string};const d={chunkCount:5,min:0,max:100,value:0,disabled:!1,reverse:!1};m.displayName="KendoChunkProgressBar";const b=l.forwardRef((e,r)=>{const{animation:a=p.animation,disabled:n=p.disabled,reverse:c=p.reverse,orientation:u,labelVisible:m=p.labelVisible,labelPlacement:d,max:b=p.max,min:g=p.min,tabIndex:k,className:v,style:f,emptyStyle:y,emptyClassName:h,progressStyle:N,progressClassName:C}=e,x=l.useRef(null),E=l.useRef(null),R=l.useRef(null),I=l.useCallback(()=>{x.current&&x.current.focus()},[]);l.useImperativeHandle(r,()=>({element:x.current,progressStatusElement:E.current,progressStatusWrapElement:R.current,focus:I}));const S=e.value||p.value,w=(e=>{const r=l.useRef(void 0);return l.useEffect(()=>{r.current=e}),r.current})(S),O=null===e.value,P=s.useRtl(x,e.dir),j="vertical"===u,T=(e=>{const r=e.toString().split(".");return 1===r.length?`${r[0]}`:`${r[0]}.${r[1].substr(0,3)}`})(S),K={value:S},$=m?e.label?l.createElement("span",{className:"k-progress-status"},l.createElement(e.label,{...K})):l.createElement("span",{className:"k-progress-status"},T):void 0,M={className:s.classNames("k-progressbar",{"k-progressbar-horizontal":!j,"k-progressbar-vertical":j,"k-progressbar-reverse":c,"k-progressbar-indeterminate":O,"k-disabled":n},v),ref:x,dir:P,tabIndex:s.getTabIndex(k,n),role:"progressbar","aria-label":e.ariaLabel,"aria-valuemin":g,"aria-valuemax":b,"aria-valuenow":O?void 0:S,"aria-disabled":n,style:f},A=s.classNames("k-progress-status-wrap",{"k-progress-start":"start"===d,"k-progress-center":"center"===d,"k-progress-end":"end"===d||void 0===d}),B="boolean"!=typeof a&&void 0!==a?a.duration:a?400:0,D=l.useCallback(()=>{const e=o(g,b,w);i(E,R,e,j)},[j,b,g,w]),L=l.useCallback(e=>{const r=o(g,b,w+(S-w)*e);i(E,R,r,j)},[g,b,w,S,j]),V=l.useCallback(()=>{const e=o(g,b,S);i(E,R,e,j)},[j,b,g,S]);return t.useAnimation({duration:B,onStart:D,onUpdate:L,onEnd:V},[S,B]),l.createElement("div",{...M},l.createElement("span",{className:A+(h?" "+h:""),style:y},$),l.createElement("div",{className:"k-progressbar-value k-selected",style:N,ref:E},l.createElement("span",{className:A+(C?" "+C:""),ref:R},$)))});b.propTypes={animation:a.any,ariaLabel:a.string,disabled:a.bool,reverse:a.bool,label:a.any,labelVisible:a.bool,labelPlacement:a.oneOf(["start","center","end"]),max:a.number,min:a.number,value:a.number,tabIndex:a.number,emptyStyle:a.object,emptyClassName:a.string,progressStyle:a.object,progressClassName:a.string};const p={animation:!1,min:0,max:100,value:0,disabled:!1,reverse:!1,labelVisible:!0};b.displayName="KendoProgressBar",e.ChunkProgressBar=m,e.ProgressBar=b});
@@ -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-progressbars",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1774539422,version:"14.3.0-develop.9",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"});exports.packageMetadata=e;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=Object.freeze({name:"@progress/kendo-react-progressbars",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1775199902,version:"14.3.1-develop.1",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"});exports.packageMetadata=e;
@@ -7,7 +7,7 @@ export const packageMetadata = Object.freeze({
7
7
  productName: 'KendoReact',
8
8
  productCode: 'KENDOUIREACT',
9
9
  productCodes: ['KENDOUIREACT'],
10
- publishDate: 1774539422,
11
- version: '14.3.0-develop.9',
10
+ publishDate: 1775199902,
11
+ version: '14.3.1-develop.1',
12
12
  licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/components/my-license/'
13
13
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-react-progressbars",
3
- "version": "14.3.0-develop.9",
3
+ "version": "14.3.1-develop.1",
4
4
  "description": "React ProgressBars offer a customizable interface for users to track and display the progress of a task. KendoReact ProgressBars package",
5
5
  "author": "Progress",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -26,8 +26,8 @@
26
26
  "sideEffects": false,
27
27
  "peerDependencies": {
28
28
  "@progress/kendo-licensing": "^1.7.2",
29
- "@progress/kendo-react-animation": "14.3.0-develop.9",
30
- "@progress/kendo-react-common": "14.3.0-develop.9",
29
+ "@progress/kendo-react-animation": "14.3.1-develop.1",
30
+ "@progress/kendo-react-common": "14.3.1-develop.1",
31
31
  "react": "^18.0.0 || ^19.0.0",
32
32
  "react-dom": "^18.0.0 || ^19.0.0"
33
33
  },
@@ -56,7 +56,7 @@
56
56
  "package": {
57
57
  "productName": "KendoReact",
58
58
  "productCode": "KENDOUIREACT",
59
- "publishDate": 1774539422,
59
+ "publishDate": 1775199902,
60
60
  "licensingDocsUrl": "https://www.telerik.com/kendo-react-ui/components/my-license/"
61
61
  }
62
62
  },