@progress/kendo-react-gauges 14.4.1-develop.9 → 14.4.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/ArcGauge.d.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { ArcGaugeProps } from './ArcGaugeProps.js';
8
+ import { ArcGaugeProps } from './ArcGaugeProps';
9
9
  import { Surface, Group } from '@progress/kendo-drawing';
10
10
  import * as React from 'react';
11
11
  export declare class ArcGauge extends React.Component<ArcGaugeProps, {}> {
@@ -5,8 +5,8 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { BaseGaugeProps } from './BaseGaugeProps.js';
9
- import { ArcScale, ColorRange } from './types.js';
8
+ import { BaseGaugeProps } from './BaseGaugeProps';
9
+ import { ArcScale, ColorRange } from './types';
10
10
  /**
11
11
  * Represents the props of the [KendoReact ArcGauge component](https://www.telerik.com/kendo-react-ui/components/gauges/arcgauge).
12
12
  */
package/BaseGauge.d.ts CHANGED
@@ -7,7 +7,7 @@
7
7
  */
8
8
  import { default as PropTypes } from 'prop-types';
9
9
  import { Surface } from '@progress/kendo-drawing';
10
- import { BaseGaugePrivateProps } from './BaseGaugeProps.js';
10
+ import { BaseGaugePrivateProps } from './BaseGaugeProps';
11
11
  import { GaugeContextType } from './GaugeContext.js';
12
12
  import * as React from 'react';
13
13
  /**
@@ -5,7 +5,7 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { Gauges } from './common/gauges.js';
8
+ import { Gauges } from './common/gauges';
9
9
  /**
10
10
  * @hidden
11
11
  */
@@ -5,7 +5,7 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { CircularGaugeProps } from './CircularGaugeProps.js';
8
+ import { CircularGaugeProps } from './CircularGaugeProps';
9
9
  import { ArcGauge } from './ArcGauge.js';
10
10
  import * as React from 'react';
11
11
  export declare class CircularGauge extends ArcGauge implements React.Component<CircularGaugeProps, {}> {
@@ -5,9 +5,9 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { ArcGaugeProps } from './ArcGaugeProps.js';
9
- import { CircularScale } from './types/circular-scale.interface.js';
10
- import { ColorRange } from './types/color-range.interface.js';
8
+ import { ArcGaugeProps } from './ArcGaugeProps';
9
+ import { CircularScale } from './types/circular-scale.interface';
10
+ import { ColorRange } from './types/color-range.interface';
11
11
  /**
12
12
  * Represents the props of the [KendoReact CircularGauge component](https://www.telerik.com/kendo-react-ui/components/gauges/circulargauge).
13
13
  */
package/LinearGauge.d.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { LinearGaugeProps } from './LinearGaugeProps.js';
8
+ import { LinearGaugeProps } from './LinearGaugeProps';
9
9
  import { Surface, Group } from '@progress/kendo-drawing';
10
10
  import * as React from 'react';
11
11
  export declare class LinearGauge extends React.Component<LinearGaugeProps, {}> {
@@ -5,8 +5,8 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { BaseGaugeProps } from './BaseGaugeProps.js';
9
- import { LinearPointer, LinearScale } from './types.js';
8
+ import { BaseGaugeProps } from './BaseGaugeProps';
9
+ import { LinearPointer, LinearScale } from './types';
10
10
  /**
11
11
  * Represents the props of the [KendoReact LinearGauge component](https://www.telerik.com/kendo-react-ui/components/gauges/lineargauge).
12
12
  */
package/RadialGauge.d.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { RadialGaugeProps } from './RadialGaugeProps.js';
8
+ import { RadialGaugeProps } from './RadialGaugeProps';
9
9
  import { Surface, Group } from '@progress/kendo-drawing';
10
10
  import * as React from 'react';
11
11
  export declare class RadialGauge extends React.Component<RadialGaugeProps, {}> {
@@ -5,8 +5,8 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { BaseGaugeProps } from './BaseGaugeProps.js';
9
- import { RadialPointer, RadialScale } from './types.js';
8
+ import { BaseGaugeProps } from './BaseGaugeProps';
9
+ import { RadialPointer, RadialScale } from './types';
10
10
  /**
11
11
  * Represents the props of the [KendoReact RadialGauge component](https://www.telerik.com/kendo-react-ui/components/gauges/radialgauge).
12
12
  */
@@ -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-intl"),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-intl","@progress/kendo-react-common","@progress/kendo-charts","@progress/kendo-drawing"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactGauges={},e.React,e.PropTypes,e.KendoReactIntl,e.KendoReactCommon,e.KendoCharts,e.KendoDrawing)}(this,function(e,t,s,r,n,a,i){"use strict";function o(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(s){if("default"!==s){var r=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,r.get?r:{enumerable:!0,get:function(){return e[s]}})}}),t.default=e,Object.freeze(t)}var l=o(t);const c=1e3/60,u=e=>{let t,s,r=[];const a=a=>{t=e(t,a),n.canUseDOM&&(window.clearTimeout(s),s=window.setTimeout(()=>r.forEach(e=>e()),c))};return a({}),{getState:()=>t,dispatch:a,subscribe:e=>(r.push(e),()=>r=r.filter(t=>t!==e))}},g=(e,t)=>{if(!t.type)return{};switch(t.type){case"set":return p.themeItem(e,t);case"push":return{...e,...t.payload};default:return e}},h=(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}},p={configurationItem:(e,t)=>({...e,[t.gaugeKey]:t.payload}),collectionConfigurationItem(e,t){let s=!1;const[r,n]=t.gaugeCollectionIdxKey.split("_"),a=e[r].map((e,r)=>parseInt(n,10)===r?(s=!0,t.payload):e);return!1===s&&a.splice(parseInt(n,10),0,t.payload),{...e,[r]:a}},themeItem(e,t){let s={};const r={...s,...e},{field:n,value:a}=t.payload,i=n.split(".");let o=i.shift();for(;i.length>0;)s=s[o]=s[o]||{},o=i.shift();return s[o]=a,r}},d=e=>"object"==typeof e,m=(e,t)=>{if(Object.keys(e).length!==Object.keys(t).length)return!0;for(const s in e)if("value"!==s&&e.hasOwnProperty(s)){const r=e[s],n=t[s];if(d(r)&&d(n)?m(r,n):r!==n)return!0}return!1},f=l.createContext(null);f.displayName="GaugeContext";const y=Object.freeze({name:"@progress/kendo-react-gauges",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:0,version:"14.4.1-develop.9",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"}),b=class extends l.Component{constructor(e){super(e),this.gaugeInstance=null,this.surface=null,this._element=null,this.themeStore={},this.themeUnsubscriber=Function.prototype,this.observersStore={},this.showLicenseWatermark=!1,this.onWindowResize=()=>{null!==this.gaugeInstance&&(this.gaugeInstance.resize(),this.trigger("render",{sender:this}))},this.showLicenseWatermark=!n.validatePackage(y,{component:"Gauge"}),this.licenseMessage=n.getLicenseMessage(y),this.themeStore=u(g),this.observersStore=u(h),this.contextValue={observersStore:this.observersStore}}get element(){return this._element}componentDidMount(){this.element&&(this.themeStore.dispatch({type:"push",payload:a.gaugeTheme(this.element)}),this.instantiateCoreGauge()),this.themeUnsubscriber=this.themeStore.subscribe(this.refresh.bind(this)),window.addEventListener("resize",this.onWindowResize),this.trigger("render",{sender:this})}componentDidUpdate(e){const{dir:t,children:s,deriveOptionsFromParent:n,getTarget:a,gaugeConstructor:i,className:o,renderAs:l,...c}=this.props,{dir:u,children:g,deriveOptionsFromParent:h,getTarget:p,gaugeConstructor:d,className:f,renderAs:y,...b}=e;if(null!==this.gaugeInstance){const s=r.provideIntlService(this),n=this.gaugeInstance.contextService,a=s.locale!==n._intlService.locale,i=((e,t)=>{if(!e||!t||(e=[].concat(e),t=[].concat(t),e.length!==t.length))return!0;for(let s=0;s<e.length;s++)if(m(e[s],t[s]))return!0;return!1})(b,c),o=c;a&&(this.gaugeInstance.contextService._intlService=s,this.gaugeInstance.contextService.format._intlService=s,i||this.gaugeInstance.noTransitionsRedraw()),i||(l||"svg")!==(y||"svg")?this.refresh():Object.keys(c).indexOf("pointer")>-1?Array.isArray(o.pointer)?this.refreshAllValues(o.pointer.map(e=>e.value)):this.refreshValue((o.pointer||{}).value):this.refreshValue(o.value),e.dir!==t&&this.gaugeInstance.setDirection(this.getDirection(t)),this.trigger("render",{sender:this})}}componentWillUnmount(){this.themeUnsubscriber();const e=this.gaugeInstance&&this.gaugeInstance.surfaceElement;e&&e.parentNode&&e.parentNode.removeChild(e),null!==this.gaugeInstance&&(this.gaugeInstance.destroy(),this.gaugeInstance=null),window.removeEventListener("resize",this.onWindowResize)}render(){const{style:e={},className:t,children:s}=this.props,r={...e,position:"relative"};return l.createElement(f.Provider,{value:this.contextValue},l.createElement("div",{style:r,ref:e=>{this._element=e},className:t},s,this.showLicenseWatermark&&l.createElement(n.WatermarkOverlay,{message:this.licenseMessage})))}instantiateCoreGauge(){const{dir:e,gaugeConstructor:t}=this.props,s=this.getGaugeOptions();this.gaugeInstance=new t(this.element,s,this.themeStore.getState(),{rtl:this.getDirection(e),intlService:r.provideIntlService(this),sender:this})}refresh(){if(null!==this.gaugeInstance){const e=this.themeStore.getState(),t=this.getGaugeOptions();this.gaugeInstance.setOptions(t,e)}}refreshValue(e){this.gaugeInstance.value(e)}refreshAllValues(e){this.gaugeInstance.allValues(e)}getDirection(e){return"rtl"===(void 0!==e?e:n.canUseDOM&&window.getComputedStyle(this.element).direction||"ltr")}getGaugeOptions(){const{renderAs:e,transitions:t,deriveOptionsFromParent:s}=this.props;let r={renderAs:e,transitions:t};return s&&(r=s(r)),r}trigger(e,t){const s=this.observersStore.getState();for(let r=0;r<s.length;r++)s[r].trigger(e,t)}};b.propTypes={dir:s.string,renderAs:s.oneOf(["svg","canvas"])},b.defaultProps={renderAs:"svg"};let v=b;r.registerForIntl(v);const I=class extends l.Component{constructor(e){super(e),this.state={arcCenterStyles:null,arcCenterValue:{value:0,color:""}},this._element=null,this.gaugeObserver=new a.InstanceObserver(this,{render:"onRender"})}componentDidMount(){var e;null==(e=this.context)||e.observersStore.dispatch({type:"add",payload:this.gaugeObserver})}render(){const{render:e}=this.props,{arcCenterStyles:t,arcCenterValue:s}=this.state,r=t||{zIndex:-1};let n=null;return e&&(n=l.createElement("div",{className:"k-arcgauge-label",ref:e=>{this._element=e},style:r},e(s.value,s.color))),n}onRender(e){if(!this._element)return;const t=e.sender.gaugeInstance,s=this._element.offsetWidth,r=this._element.offsetHeight,n=t.centerLabelPosition(s,r);this.setState({arcCenterStyles:{left:n.left,top:n.top},arcCenterValue:{value:t.value(),color:t.currentColor()}})}};I.contextType=f;let G=I;const O=(e,t)=>{if(!(e=>"string"==typeof e&&(e.startsWith("--")||e.startsWith("var(")&&e.endsWith(")")))(e))return e;const s=t||document.documentElement,r=getComputedStyle(s);let n;if(e.startsWith("var(")&&e.endsWith(")")){n=e.slice(4,-1).trim();const t=n.indexOf(",");t>-1&&(n=n.substring(0,t).trim())}else{if(!e.startsWith("--"))return e;n=e}return r.getPropertyValue(n).trim()||e},k=(e,t)=>Array.isArray(e)?e.map(e=>((e,t)=>{if(!e||"object"!=typeof e)return e;const s={...e};return"string"==typeof e.color&&(s.color=O(e.color,t)),s})(e,t)):e,T=(e,t)=>{if(!e||"object"!=typeof e)return e;const s={...e};return"string"==typeof e.color&&(s.color=O(e.color,t)),s},C=(e,t)=>{if(!e||"object"!=typeof e)return e;const s={...e};return"string"==typeof e.color&&(s.color=O(e.color,t)),Array.isArray(e.colors)&&(s.colors=k(e.colors,t)),e.pointer&&(s.pointer=((e,t)=>e&&(Array.isArray(e)?e.map(e=>T(e,t)):T(e,t)))(e.pointer,t)),e.scale&&"object"==typeof e.scale&&(s.scale={...e.scale},Array.isArray(e.scale.ranges)&&(s.scale.ranges=k(e.scale.ranges,t)),e.scale.labels&&"object"==typeof e.scale.labels&&(s.scale.labels={...e.scale.labels},"string"==typeof e.scale.labels.color&&(s.scale.labels.color=O(e.scale.labels.color,t))),e.scale.majorTicks&&"object"==typeof e.scale.majorTicks&&(s.scale.majorTicks={...e.scale.majorTicks},"string"==typeof e.scale.majorTicks.color&&(s.scale.majorTicks.color=O(e.scale.majorTicks.color,t))),e.scale.minorTicks&&"object"==typeof e.scale.minorTicks&&(s.scale.minorTicks={...e.scale.minorTicks},"string"==typeof e.scale.minorTicks.color&&(s.scale.minorTicks.color=O(e.scale.minorTicks.color,t)))),s};class _ extends l.Component{constructor(){super(...arguments),this._baseGauge=null,this.gaugeType=a.ArcGauge,this.getTarget=()=>this,this.deriveOptionsFromParent=e=>{const{value:t,color:s,colors:r,opacity:n,scale:a}=this.props,i={...e,value:t,color:s,colors:r,opacity:n,scale:a};return this.element?C(i,this.element):i}}get gaugeInstance(){return this._baseGauge?this._baseGauge.gaugeInstance:null}get surface(){return this._baseGauge?this._baseGauge.surface:null}get element(){return this._baseGauge?this._baseGauge.element:null}render(){const{children:e,arcCenterRender:t,centerRender:s,className:r,...a}=this.props;return l.createElement(v,{...a,deriveOptionsFromParent:this.deriveOptionsFromParent,ref:e=>{this._baseGauge=e},gaugeConstructor:this.gaugeType,getTarget:this.getTarget,className:n.classNames("k-gauge k-arcgauge",r)},e,l.createElement(G,{render:s||t}))}exportVisual(e){return null!==this.gaugeInstance&&this.element?i.drawDOM(this.element,e):Promise.resolve(new i.Group)}}let w=class extends l.Component{constructor(){super(...arguments),this._baseGauge=null,this.getTarget=()=>this,this.deriveOptionsFromParent=e=>{const{pointer:t,scale:s}=this.props,r={...e,pointer:t,scale:s};return this.element?C(r,this.element):r}}get gaugeInstance(){return null!==this._baseGauge?this._baseGauge.gaugeInstance:null}get surface(){return null!==this._baseGauge?this._baseGauge.surface:null}get element(){return null!==this._baseGauge?this._baseGauge.element:null}render(){const{children:e,className:t,...s}=this.props;return l.createElement(v,{...s,deriveOptionsFromParent:this.deriveOptionsFromParent,ref:e=>{this._baseGauge=e},gaugeConstructor:a.LinearGauge,getTarget:this.getTarget,className:n.classNames("k-gauge",t)},e)}exportVisual(e){return null!==this.gaugeInstance?Promise.resolve(this.gaugeInstance.exportVisual(e)):Promise.resolve(new i.Group)}};class S extends l.Component{constructor(){super(...arguments),this._baseGauge=null,this.getTarget=()=>this,this.deriveOptionsFromParent=e=>{const{pointer:t,scale:s}=this.props,r={...e,pointer:t,scale:s};return this.element?C(r,this.element):r}}get gaugeInstance(){return null!==this._baseGauge?this._baseGauge.gaugeInstance:null}get surface(){return null!==this._baseGauge?this._baseGauge.surface:null}get element(){return null!==this._baseGauge?this._baseGauge.element:null}render(){const{children:e,className:t,...s}=this.props;return l.createElement(v,{...s,deriveOptionsFromParent:this.deriveOptionsFromParent,ref:e=>{this._baseGauge=e},gaugeConstructor:a.RadialGauge,getTarget:this.getTarget,className:n.classNames("k-gauge",t)},e)}exportVisual(e){return null!==this.gaugeInstance?Promise.resolve(this.gaugeInstance.exportVisual(e)):Promise.resolve(new i.Group)}}e.ArcGauge=_,e.CircularGauge=class extends _{constructor(){super(...arguments),this.gaugeType=a.CircularGauge}},e.LinearGauge=w,e.RadialGauge=S});
15
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("prop-types"),require("@progress/kendo-react-intl"),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-intl","@progress/kendo-react-common","@progress/kendo-charts","@progress/kendo-drawing"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactGauges={},e.React,e.PropTypes,e.KendoReactIntl,e.KendoReactCommon,e.KendoCharts,e.KendoDrawing)}(this,function(e,t,s,r,n,a,i){"use strict";function o(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(s){if("default"!==s){var r=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,r.get?r:{enumerable:!0,get:function(){return e[s]}})}}),t.default=e,Object.freeze(t)}var l=o(t);const c=1e3/60,u=e=>{let t,s,r=[];const a=a=>{t=e(t,a),n.canUseDOM&&(window.clearTimeout(s),s=window.setTimeout(()=>r.forEach(e=>e()),c))};return a({}),{getState:()=>t,dispatch:a,subscribe:e=>(r.push(e),()=>r=r.filter(t=>t!==e))}},g=(e,t)=>{if(!t.type)return{};switch(t.type){case"set":return p.themeItem(e,t);case"push":return{...e,...t.payload};default:return e}},h=(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}},p={configurationItem:(e,t)=>({...e,[t.gaugeKey]:t.payload}),collectionConfigurationItem(e,t){let s=!1;const[r,n]=t.gaugeCollectionIdxKey.split("_"),a=e[r].map((e,r)=>parseInt(n,10)===r?(s=!0,t.payload):e);return!1===s&&a.splice(parseInt(n,10),0,t.payload),{...e,[r]:a}},themeItem(e,t){let s={};const r={...s,...e},{field:n,value:a}=t.payload,i=n.split(".");let o=i.shift();for(;i.length>0;)s=s[o]=s[o]||{},o=i.shift();return s[o]=a,r}},d=e=>"object"==typeof e,m=(e,t)=>{if(Object.keys(e).length!==Object.keys(t).length)return!0;for(const s in e)if("value"!==s&&e.hasOwnProperty(s)){const r=e[s],n=t[s];if(d(r)&&d(n)?m(r,n):r!==n)return!0}return!1},f=l.createContext(null);f.displayName="GaugeContext";const y=Object.freeze({name:"@progress/kendo-react-gauges",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:0,version:"14.4.1",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"}),b=class extends l.Component{constructor(e){super(e),this.gaugeInstance=null,this.surface=null,this._element=null,this.themeStore={},this.themeUnsubscriber=Function.prototype,this.observersStore={},this.showLicenseWatermark=!1,this.onWindowResize=()=>{null!==this.gaugeInstance&&(this.gaugeInstance.resize(),this.trigger("render",{sender:this}))},this.showLicenseWatermark=!n.validatePackage(y,{component:"Gauge"}),this.licenseMessage=n.getLicenseMessage(y),this.themeStore=u(g),this.observersStore=u(h),this.contextValue={observersStore:this.observersStore}}get element(){return this._element}componentDidMount(){this.element&&(this.themeStore.dispatch({type:"push",payload:a.gaugeTheme(this.element)}),this.instantiateCoreGauge()),this.themeUnsubscriber=this.themeStore.subscribe(this.refresh.bind(this)),window.addEventListener("resize",this.onWindowResize),this.trigger("render",{sender:this})}componentDidUpdate(e){const{dir:t,children:s,deriveOptionsFromParent:n,getTarget:a,gaugeConstructor:i,className:o,renderAs:l,...c}=this.props,{dir:u,children:g,deriveOptionsFromParent:h,getTarget:p,gaugeConstructor:d,className:f,renderAs:y,...b}=e;if(null!==this.gaugeInstance){const s=r.provideIntlService(this),n=this.gaugeInstance.contextService,a=s.locale!==n._intlService.locale,i=((e,t)=>{if(!e||!t||(e=[].concat(e),t=[].concat(t),e.length!==t.length))return!0;for(let s=0;s<e.length;s++)if(m(e[s],t[s]))return!0;return!1})(b,c),o=c;a&&(this.gaugeInstance.contextService._intlService=s,this.gaugeInstance.contextService.format._intlService=s,i||this.gaugeInstance.noTransitionsRedraw()),i||(l||"svg")!==(y||"svg")?this.refresh():Object.keys(c).indexOf("pointer")>-1?Array.isArray(o.pointer)?this.refreshAllValues(o.pointer.map(e=>e.value)):this.refreshValue((o.pointer||{}).value):this.refreshValue(o.value),e.dir!==t&&this.gaugeInstance.setDirection(this.getDirection(t)),this.trigger("render",{sender:this})}}componentWillUnmount(){this.themeUnsubscriber();const e=this.gaugeInstance&&this.gaugeInstance.surfaceElement;e&&e.parentNode&&e.parentNode.removeChild(e),null!==this.gaugeInstance&&(this.gaugeInstance.destroy(),this.gaugeInstance=null),window.removeEventListener("resize",this.onWindowResize)}render(){const{style:e={},className:t,children:s}=this.props,r={...e,position:"relative"};return l.createElement(f.Provider,{value:this.contextValue},l.createElement("div",{style:r,ref:e=>{this._element=e},className:t},s,this.showLicenseWatermark&&l.createElement(n.WatermarkOverlay,{message:this.licenseMessage})))}instantiateCoreGauge(){const{dir:e,gaugeConstructor:t}=this.props,s=this.getGaugeOptions();this.gaugeInstance=new t(this.element,s,this.themeStore.getState(),{rtl:this.getDirection(e),intlService:r.provideIntlService(this),sender:this})}refresh(){if(null!==this.gaugeInstance){const e=this.themeStore.getState(),t=this.getGaugeOptions();this.gaugeInstance.setOptions(t,e)}}refreshValue(e){this.gaugeInstance.value(e)}refreshAllValues(e){this.gaugeInstance.allValues(e)}getDirection(e){return"rtl"===(void 0!==e?e:n.canUseDOM&&window.getComputedStyle(this.element).direction||"ltr")}getGaugeOptions(){const{renderAs:e,transitions:t,deriveOptionsFromParent:s}=this.props;let r={renderAs:e,transitions:t};return s&&(r=s(r)),r}trigger(e,t){const s=this.observersStore.getState();for(let r=0;r<s.length;r++)s[r].trigger(e,t)}};b.propTypes={dir:s.string,renderAs:s.oneOf(["svg","canvas"])},b.defaultProps={renderAs:"svg"};let v=b;r.registerForIntl(v);const I=class extends l.Component{constructor(e){super(e),this.state={arcCenterStyles:null,arcCenterValue:{value:0,color:""}},this._element=null,this.gaugeObserver=new a.InstanceObserver(this,{render:"onRender"})}componentDidMount(){var e;null==(e=this.context)||e.observersStore.dispatch({type:"add",payload:this.gaugeObserver})}render(){const{render:e}=this.props,{arcCenterStyles:t,arcCenterValue:s}=this.state,r=t||{zIndex:-1};let n=null;return e&&(n=l.createElement("div",{className:"k-arcgauge-label",ref:e=>{this._element=e},style:r},e(s.value,s.color))),n}onRender(e){if(!this._element)return;const t=e.sender.gaugeInstance,s=this._element.offsetWidth,r=this._element.offsetHeight,n=t.centerLabelPosition(s,r);this.setState({arcCenterStyles:{left:n.left,top:n.top},arcCenterValue:{value:t.value(),color:t.currentColor()}})}};I.contextType=f;let G=I;const O=(e,t)=>{if(!(e=>"string"==typeof e&&(e.startsWith("--")||e.startsWith("var(")&&e.endsWith(")")))(e))return e;const s=t||document.documentElement,r=getComputedStyle(s);let n;if(e.startsWith("var(")&&e.endsWith(")")){n=e.slice(4,-1).trim();const t=n.indexOf(",");t>-1&&(n=n.substring(0,t).trim())}else{if(!e.startsWith("--"))return e;n=e}return r.getPropertyValue(n).trim()||e},k=(e,t)=>Array.isArray(e)?e.map(e=>((e,t)=>{if(!e||"object"!=typeof e)return e;const s={...e};return"string"==typeof e.color&&(s.color=O(e.color,t)),s})(e,t)):e,T=(e,t)=>{if(!e||"object"!=typeof e)return e;const s={...e};return"string"==typeof e.color&&(s.color=O(e.color,t)),s},C=(e,t)=>{if(!e||"object"!=typeof e)return e;const s={...e};return"string"==typeof e.color&&(s.color=O(e.color,t)),Array.isArray(e.colors)&&(s.colors=k(e.colors,t)),e.pointer&&(s.pointer=((e,t)=>e&&(Array.isArray(e)?e.map(e=>T(e,t)):T(e,t)))(e.pointer,t)),e.scale&&"object"==typeof e.scale&&(s.scale={...e.scale},Array.isArray(e.scale.ranges)&&(s.scale.ranges=k(e.scale.ranges,t)),e.scale.labels&&"object"==typeof e.scale.labels&&(s.scale.labels={...e.scale.labels},"string"==typeof e.scale.labels.color&&(s.scale.labels.color=O(e.scale.labels.color,t))),e.scale.majorTicks&&"object"==typeof e.scale.majorTicks&&(s.scale.majorTicks={...e.scale.majorTicks},"string"==typeof e.scale.majorTicks.color&&(s.scale.majorTicks.color=O(e.scale.majorTicks.color,t))),e.scale.minorTicks&&"object"==typeof e.scale.minorTicks&&(s.scale.minorTicks={...e.scale.minorTicks},"string"==typeof e.scale.minorTicks.color&&(s.scale.minorTicks.color=O(e.scale.minorTicks.color,t)))),s};class _ extends l.Component{constructor(){super(...arguments),this._baseGauge=null,this.gaugeType=a.ArcGauge,this.getTarget=()=>this,this.deriveOptionsFromParent=e=>{const{value:t,color:s,colors:r,opacity:n,scale:a}=this.props,i={...e,value:t,color:s,colors:r,opacity:n,scale:a};return this.element?C(i,this.element):i}}get gaugeInstance(){return this._baseGauge?this._baseGauge.gaugeInstance:null}get surface(){return this._baseGauge?this._baseGauge.surface:null}get element(){return this._baseGauge?this._baseGauge.element:null}render(){const{children:e,arcCenterRender:t,centerRender:s,className:r,...a}=this.props;return l.createElement(v,{...a,deriveOptionsFromParent:this.deriveOptionsFromParent,ref:e=>{this._baseGauge=e},gaugeConstructor:this.gaugeType,getTarget:this.getTarget,className:n.classNames("k-gauge k-arcgauge",r)},e,l.createElement(G,{render:s||t}))}exportVisual(e){return null!==this.gaugeInstance&&this.element?i.drawDOM(this.element,e):Promise.resolve(new i.Group)}}let w=class extends l.Component{constructor(){super(...arguments),this._baseGauge=null,this.getTarget=()=>this,this.deriveOptionsFromParent=e=>{const{pointer:t,scale:s}=this.props,r={...e,pointer:t,scale:s};return this.element?C(r,this.element):r}}get gaugeInstance(){return null!==this._baseGauge?this._baseGauge.gaugeInstance:null}get surface(){return null!==this._baseGauge?this._baseGauge.surface:null}get element(){return null!==this._baseGauge?this._baseGauge.element:null}render(){const{children:e,className:t,...s}=this.props;return l.createElement(v,{...s,deriveOptionsFromParent:this.deriveOptionsFromParent,ref:e=>{this._baseGauge=e},gaugeConstructor:a.LinearGauge,getTarget:this.getTarget,className:n.classNames("k-gauge",t)},e)}exportVisual(e){return null!==this.gaugeInstance?Promise.resolve(this.gaugeInstance.exportVisual(e)):Promise.resolve(new i.Group)}};class S extends l.Component{constructor(){super(...arguments),this._baseGauge=null,this.getTarget=()=>this,this.deriveOptionsFromParent=e=>{const{pointer:t,scale:s}=this.props,r={...e,pointer:t,scale:s};return this.element?C(r,this.element):r}}get gaugeInstance(){return null!==this._baseGauge?this._baseGauge.gaugeInstance:null}get surface(){return null!==this._baseGauge?this._baseGauge.surface:null}get element(){return null!==this._baseGauge?this._baseGauge.element:null}render(){const{children:e,className:t,...s}=this.props;return l.createElement(v,{...s,deriveOptionsFromParent:this.deriveOptionsFromParent,ref:e=>{this._baseGauge=e},gaugeConstructor:a.RadialGauge,getTarget:this.getTarget,className:n.classNames("k-gauge",t)},e)}exportVisual(e){return null!==this.gaugeInstance?Promise.resolve(this.gaugeInstance.exportVisual(e)):Promise.resolve(new i.Group)}}e.ArcGauge=_,e.CircularGauge=class extends _{constructor(){super(...arguments),this.gaugeType=a.CircularGauge}},e.LinearGauge=w,e.RadialGauge=S});
package/index.d.mts CHANGED
@@ -6,13 +6,13 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  import { ArcGauge } from './ArcGauge.js';
9
- import { ArcGaugeProps } from './ArcGaugeProps.js';
9
+ import { ArcGaugeProps } from './ArcGaugeProps';
10
10
  import { CircularGauge } from './CircularGauge.js';
11
- import { CircularGaugeProps } from './CircularGaugeProps.js';
11
+ import { CircularGaugeProps } from './CircularGaugeProps';
12
12
  import { LinearGauge } from './LinearGauge.js';
13
- import { LinearGaugeProps } from './LinearGaugeProps.js';
13
+ import { LinearGaugeProps } from './LinearGaugeProps';
14
14
  import { RadialGauge } from './RadialGauge.js';
15
- import { RadialGaugeProps } from './RadialGaugeProps.js';
16
- export * from './common/gauges.js';
17
- export * from './types.js';
15
+ import { RadialGaugeProps } from './RadialGaugeProps';
16
+ export * from './common/gauges';
17
+ export * from './types';
18
18
  export { ArcGauge, ArcGaugeProps, CircularGauge, CircularGaugeProps, LinearGauge, LinearGaugeProps, RadialGauge, RadialGaugeProps };
package/index.d.ts CHANGED
@@ -6,13 +6,13 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  import { ArcGauge } from './ArcGauge.js';
9
- import { ArcGaugeProps } from './ArcGaugeProps.js';
9
+ import { ArcGaugeProps } from './ArcGaugeProps';
10
10
  import { CircularGauge } from './CircularGauge.js';
11
- import { CircularGaugeProps } from './CircularGaugeProps.js';
11
+ import { CircularGaugeProps } from './CircularGaugeProps';
12
12
  import { LinearGauge } from './LinearGauge.js';
13
- import { LinearGaugeProps } from './LinearGaugeProps.js';
13
+ import { LinearGaugeProps } from './LinearGaugeProps';
14
14
  import { RadialGauge } from './RadialGauge.js';
15
- import { RadialGaugeProps } from './RadialGaugeProps.js';
16
- export * from './common/gauges.js';
17
- export * from './types.js';
15
+ import { RadialGaugeProps } from './RadialGaugeProps';
16
+ export * from './common/gauges';
17
+ export * from './types';
18
18
  export { ArcGauge, ArcGaugeProps, CircularGauge, CircularGaugeProps, LinearGauge, LinearGaugeProps, RadialGauge, RadialGaugeProps };
@@ -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-gauges",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1776955049,version:"14.4.1-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-gauges",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1777886426,version:"14.4.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: 1776955049,
11
- version: '14.4.1-develop.9',
10
+ publishDate: 1777886426,
11
+ version: '14.4.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-gauges",
3
- "version": "14.4.1-develop.9",
3
+ "version": "14.4.1",
4
4
  "description": "React Gauges provide a set of React components for building beautiful and customizable gauges. KendoReact Gauges package",
5
5
  "author": "Progress",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -27,13 +27,13 @@
27
27
  "peerDependencies": {
28
28
  "@progress/kendo-drawing": "^1.21.2",
29
29
  "@progress/kendo-licensing": "^1.7.2",
30
- "@progress/kendo-react-common": "14.4.1-develop.9",
31
- "@progress/kendo-react-intl": "14.4.1-develop.9",
30
+ "@progress/kendo-react-common": "14.4.1",
31
+ "@progress/kendo-react-intl": "14.4.1",
32
32
  "react": "^18.0.0 || ^19.0.0",
33
33
  "react-dom": "^18.0.0 || ^19.0.0"
34
34
  },
35
35
  "dependencies": {
36
- "@progress/kendo-charts": "2.9.0",
36
+ "@progress/kendo-charts": "2.12.0",
37
37
  "prop-types": "^15.6.0"
38
38
  },
39
39
  "keywords": [
@@ -59,7 +59,7 @@
59
59
  "package": {
60
60
  "productName": "KendoReact",
61
61
  "productCode": "KENDOUIREACT",
62
- "publishDate": 1776955049,
62
+ "publishDate": 1777886426,
63
63
  "licensingDocsUrl": "https://www.telerik.com/kendo-react-ui/components/my-license/"
64
64
  }
65
65
  },
@@ -5,9 +5,9 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { RadialLabels } from './radial-labels.interface.js';
9
- import { Scale } from './scale.interface.js';
10
- import { LineCap } from './line-cap.js';
8
+ import { RadialLabels } from './radial-labels.interface';
9
+ import { Scale } from './scale.interface';
10
+ import { LineCap } from './line-cap';
11
11
  /**
12
12
  * The scale options of the Gauge.
13
13
  */
@@ -5,7 +5,7 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { DashType } from './dash-type.interface.js';
8
+ import { DashType } from './dash-type.interface';
9
9
  /**
10
10
  * The appearance settings for the border lines.
11
11
  */
@@ -5,7 +5,7 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { ArcScale } from './arc-scale.interface.js';
8
+ import { ArcScale } from './arc-scale.interface';
9
9
  /**
10
10
  * The scale options of the Gauge.
11
11
  */
@@ -5,8 +5,8 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { Border } from './border.interface.js';
9
- import { Margin } from './margin.interface.js';
8
+ import { Border } from './border.interface';
9
+ import { Margin } from './margin.interface';
10
10
  /**
11
11
  * The configuration options for the Gauge area. Represents the entire visible area of the Gauge.
12
12
  */
@@ -5,9 +5,9 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { Border } from './border.interface.js';
9
- import { Margin } from './margin.interface.js';
10
- import { Padding } from './padding.interface.js';
8
+ import { Border } from './border.interface';
9
+ import { Margin } from './margin.interface';
10
+ import { Padding } from './padding.interface';
11
11
  /**
12
12
  * The configuration of the scale labels.
13
13
  */
@@ -5,7 +5,7 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { DashType } from './dash-type.interface.js';
8
+ import { DashType } from './dash-type.interface';
9
9
  /**
10
10
  * The scale line options.
11
11
  */
@@ -5,9 +5,9 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { Border } from './border.interface.js';
9
- import { Margin } from './margin.interface.js';
10
- import { LinearPointerShape } from './linear-pointer-shape.js';
8
+ import { Border } from './border.interface';
9
+ import { Margin } from './margin.interface';
10
+ import { LinearPointerShape } from './linear-pointer-shape';
11
11
  /**
12
12
  * The configuration options for the LinearGauge pointer.
13
13
  */
@@ -5,9 +5,9 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { Scale } from './scale.interface.js';
9
- import { Line } from './line.interface.js';
10
- import { Range } from './range.interface.js';
8
+ import { Scale } from './scale.interface';
9
+ import { Line } from './line.interface';
10
+ import { Range } from './range.interface';
11
11
  /**
12
12
  * The scale options of the Gauge.
13
13
  */
@@ -5,8 +5,8 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { Labels } from './labels.interface.js';
9
- import { RadialLabelPosition } from './radial-label-position.js';
8
+ import { Labels } from './labels.interface';
9
+ import { RadialLabelPosition } from './radial-label-position';
10
10
  export interface RadialLabels extends Labels {
11
11
  /**
12
12
  * The position of the labels.
@@ -5,7 +5,7 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { Cap } from './cap.interface.js';
8
+ import { Cap } from './cap.interface';
9
9
  /**
10
10
  * The configuration options for the RadialGauge pointer.
11
11
  */
@@ -5,9 +5,9 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { RadialLabels } from './radial-labels.interface.js';
9
- import { Scale } from './scale.interface.js';
10
- import { Range } from './range.interface.js';
8
+ import { RadialLabels } from './radial-labels.interface';
9
+ import { Scale } from './scale.interface';
10
+ import { Range } from './range.interface';
11
11
  /**
12
12
  * The scale options of the Gauge.
13
13
  */
@@ -5,8 +5,8 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { Labels } from './labels.interface.js';
9
- import { Ticks } from './ticks.interface.js';
8
+ import { Labels } from './labels.interface';
9
+ import { Ticks } from './ticks.interface';
10
10
  /**
11
11
  * The scale options of the Gauge.
12
12
  */
package/types.d.ts CHANGED
@@ -5,24 +5,24 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- export type { ArcScale } from './types/arc-scale.interface.js';
9
- export type { ColorRange } from './types/color-range.interface.js';
10
- export type { Scale } from './types/scale.interface.js';
11
- export type { LineCap } from './types/line-cap.js';
12
- export type { RadialLabelPosition } from './types/radial-label-position.js';
13
- export type { RadialLabels } from './types/radial-labels.interface.js';
14
- export type { Labels } from './types/labels.interface.js';
15
- export type { Margin } from './types/margin.interface.js';
16
- export type { Padding } from './types/padding.interface.js';
17
- export type { Border } from './types/border.interface.js';
18
- export type { Ticks } from './types/ticks.interface.js';
19
- export type { DashType } from './types/dash-type.interface.js';
20
- export type { Cap } from './types/cap.interface.js';
21
- export type { GaugeArea } from './types/gauge-area.interface.js';
22
- export type { Line } from './types/line.interface.js';
23
- export type { LinearPointer } from './types/linear-pointer.interface.js';
24
- export type { LinearPointerShape } from './types/linear-pointer-shape.js';
25
- export type { LinearScale } from './types/linear-scale.interface.js';
26
- export type { RadialPointer } from './types/radial-pointer.interface.js';
27
- export type { RadialScale } from './types/radial-scale.interface.js';
28
- export type { Range } from './types/range.interface.js';
8
+ export type { ArcScale } from './types/arc-scale.interface';
9
+ export type { ColorRange } from './types/color-range.interface';
10
+ export type { Scale } from './types/scale.interface';
11
+ export type { LineCap } from './types/line-cap';
12
+ export type { RadialLabelPosition } from './types/radial-label-position';
13
+ export type { RadialLabels } from './types/radial-labels.interface';
14
+ export type { Labels } from './types/labels.interface';
15
+ export type { Margin } from './types/margin.interface';
16
+ export type { Padding } from './types/padding.interface';
17
+ export type { Border } from './types/border.interface';
18
+ export type { Ticks } from './types/ticks.interface';
19
+ export type { DashType } from './types/dash-type.interface';
20
+ export type { Cap } from './types/cap.interface';
21
+ export type { GaugeArea } from './types/gauge-area.interface';
22
+ export type { Line } from './types/line.interface';
23
+ export type { LinearPointer } from './types/linear-pointer.interface';
24
+ export type { LinearPointerShape } from './types/linear-pointer-shape';
25
+ export type { LinearScale } from './types/linear-scale.interface';
26
+ export type { RadialPointer } from './types/radial-pointer.interface';
27
+ export type { RadialScale } from './types/radial-scale.interface';
28
+ export type { Range } from './types/range.interface';