@progress/kendo-react-gauges 13.3.0-develop.9 → 13.4.0-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.
Files changed (47) hide show
  1. package/ArcCenter.d.ts +58 -0
  2. package/ArcGauge.d.ts +39 -0
  3. package/ArcGaugeProps.d.ts +46 -0
  4. package/BaseGauge.d.ts +98 -0
  5. package/BaseGaugeProps.d.ts +58 -0
  6. package/CircularGauge.d.ts +13 -0
  7. package/CircularGaugeProps.d.ts +24 -0
  8. package/GaugeContext.d.ts +19 -0
  9. package/LinearGauge.d.ts +38 -0
  10. package/LinearGaugeProps.d.ts +32 -0
  11. package/RadialGauge.d.ts +38 -0
  12. package/RadialGaugeProps.d.ts +32 -0
  13. package/common/gauges.d.ts +12 -0
  14. package/dist/cdn/js/kendo-react-gauges.js +1 -1
  15. package/index.d.mts +11 -685
  16. package/index.d.ts +11 -685
  17. package/package-metadata.d.ts +12 -0
  18. package/package-metadata.js +1 -1
  19. package/package-metadata.mjs +10 -16
  20. package/package.json +4 -4
  21. package/store/reducer.d.ts +21 -0
  22. package/store/store.d.ts +32 -0
  23. package/types/arc-scale.interface.d.ts +35 -0
  24. package/types/border.interface.d.ts +25 -0
  25. package/types/cap.interface.d.ts +20 -0
  26. package/types/circular-scale.interface.d.ts +17 -0
  27. package/types/color-range.interface.d.ts +28 -0
  28. package/types/dash-type.interface.d.ts +11 -0
  29. package/types/gauge-area.interface.d.ts +34 -0
  30. package/types/labels.interface.d.ts +54 -0
  31. package/types/line-cap.d.ts +11 -0
  32. package/types/line.interface.d.ts +29 -0
  33. package/types/linear-pointer-shape.d.ts +11 -0
  34. package/types/linear-pointer.interface.d.ts +43 -0
  35. package/types/linear-scale.interface.d.ts +33 -0
  36. package/types/margin.interface.d.ts +28 -0
  37. package/types/padding.interface.d.ts +28 -0
  38. package/types/radial-label-position.d.ts +11 -0
  39. package/types/radial-labels.interface.d.ts +15 -0
  40. package/types/radial-pointer.interface.d.ts +29 -0
  41. package/types/radial-scale.interface.d.ts +35 -0
  42. package/types/range.interface.d.ts +28 -0
  43. package/types/scale.interface.d.ts +54 -0
  44. package/types/ticks.interface.d.ts +28 -0
  45. package/types.d.ts +28 -0
  46. package/utils/common.d.ts +8 -0
  47. package/utils/css-variables.d.ts +72 -0
package/ArcCenter.d.ts ADDED
@@ -0,0 +1,58 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ import { InstanceObserver } from '@progress/kendo-charts';
9
+ import { GaugeContext } from './GaugeContext.js';
10
+ import * as React from 'react';
11
+ export interface ArcCenterStyle {
12
+ /**
13
+ * The horizontal position of the arc center in pixels.
14
+ */
15
+ left: number;
16
+ /**
17
+ * The vertical position of the arc center in pixels.
18
+ */
19
+ top: number;
20
+ }
21
+ export interface ArcCenterValue {
22
+ /**
23
+ * The numeric value displayed in the arc center.
24
+ */
25
+ value: number;
26
+ /**
27
+ * The color of the text value. Accepts valid CSS color strings, including hex and rgb.
28
+ */
29
+ color: string;
30
+ }
31
+ /**
32
+ * @hidden
33
+ */
34
+ export interface ArcCenterState {
35
+ arcCenterStyles: ArcCenterStyle | null;
36
+ arcCenterValue: ArcCenterValue;
37
+ }
38
+ /**
39
+ * @hidden
40
+ */
41
+ export interface ArcCenterProps {
42
+ render?: (value: number, color: string) => React.ReactNode;
43
+ }
44
+ /**
45
+ * @hidden
46
+ */
47
+ declare class ArcCenter extends React.Component<ArcCenterProps, ArcCenterState> {
48
+ static contextType: React.Context<import('./GaugeContext').GaugeContextType | null>;
49
+ context: React.ContextType<typeof GaugeContext>;
50
+ readonly state: ArcCenterState;
51
+ gaugeObserver: InstanceObserver;
52
+ protected _element: HTMLDivElement | null;
53
+ constructor(props: ArcCenterProps);
54
+ componentDidMount(): void;
55
+ render(): any;
56
+ onRender(e: any): void;
57
+ }
58
+ export { ArcCenter };
package/ArcGauge.d.ts ADDED
@@ -0,0 +1,39 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ import { ArcGaugeProps } from './ArcGaugeProps.js';
9
+ import { Surface, Group } from '@progress/kendo-drawing';
10
+ import * as React from 'react';
11
+ export declare class ArcGauge extends React.Component<ArcGaugeProps, {}> {
12
+ private _baseGauge;
13
+ protected gaugeType: any;
14
+ /**
15
+ * @hidden
16
+ */
17
+ get gaugeInstance(): any;
18
+ /**
19
+ * The Drawing `Surface` of the Gauge.
20
+ */
21
+ get surface(): Surface | null;
22
+ /**
23
+ * The DOM element of the Gauge.
24
+ */
25
+ get element(): HTMLDivElement | null;
26
+ /**
27
+ * @hidden
28
+ */
29
+ render(): any;
30
+ /**
31
+ * Exports a Gauge component as a Drawing `Scene`.
32
+ *
33
+ * @param {any} options - The parameters for the export operation.
34
+ * @returns {Promise<Group>} - A promise that returns the root `Group` of the scene.
35
+ */
36
+ exportVisual(options?: any): Promise<Group>;
37
+ private getTarget;
38
+ private deriveOptionsFromParent;
39
+ }
@@ -0,0 +1,46 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ import { BaseGaugeProps } from './BaseGaugeProps.js';
9
+ import { ArcScale, ColorRange } from './types.js';
10
+ /**
11
+ * Represents the props of the [KendoReact ArcGauge component](https://www.telerik.com/kendo-react-ui/components/gauges/arcgauge).
12
+ */
13
+ export interface ArcGaugeProps extends BaseGaugeProps {
14
+ /**
15
+ * The value of the Gauge.
16
+ */
17
+ value: number;
18
+ /**
19
+ * The color of the value pointer. Accepts a valid CSS color string, including hex and rgb.
20
+ */
21
+ color?: string;
22
+ /**
23
+ * The color ranges of the value pointer
24
+ * ([see example](https://www.telerik.com/kendo-react-ui/components/gauges/arcgauge/color-ranges)).
25
+ */
26
+ colors?: ColorRange[];
27
+ /**
28
+ * The opacity of the value pointer.
29
+ */
30
+ opacity?: number;
31
+ /**
32
+ * The scale options of the ArcGauge.
33
+ */
34
+ scale?: ArcScale;
35
+ /**
36
+ * @hidden
37
+ *
38
+ * Alias for backwards compatbility.
39
+ */
40
+ arcCenterRender?: (value: number, color: string) => React.ReactElement<any>;
41
+ /**
42
+ *
43
+ * A function that renders the center template of the Gauge.
44
+ */
45
+ centerRender?: (value: number, color: string) => React.ReactElement<any>;
46
+ }
package/BaseGauge.d.ts ADDED
@@ -0,0 +1,98 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ import { default as PropTypes } from 'prop-types';
9
+ import { Surface } from '@progress/kendo-drawing';
10
+ import { BaseGaugePrivateProps } from './BaseGaugeProps.js';
11
+ import { GaugeContextType } from './GaugeContext.js';
12
+ import * as React from 'react';
13
+ /**
14
+ * @hidden
15
+ */
16
+ export declare class BaseGauge extends React.Component<BaseGaugePrivateProps, {}> {
17
+ /**
18
+ * @hidden
19
+ */
20
+ static propTypes: {
21
+ dir: PropTypes.Requireable<string>;
22
+ renderAs: PropTypes.Requireable<string>;
23
+ };
24
+ /**
25
+ * @hidden
26
+ */
27
+ static defaultProps: {
28
+ renderAs: string;
29
+ };
30
+ /**
31
+ * @hidden
32
+ */
33
+ gaugeInstance: any | null;
34
+ /**
35
+ * @hidden
36
+ */
37
+ surface: Surface | null;
38
+ /**
39
+ * @hidden
40
+ */
41
+ get element(): HTMLDivElement;
42
+ protected _element: HTMLDivElement | null;
43
+ protected themeStore: any;
44
+ protected themeUnsubscriber: Function;
45
+ protected contextValue: GaugeContextType;
46
+ protected observersStore: any;
47
+ private readonly showLicenseWatermark;
48
+ private readonly licenseMessage?;
49
+ constructor(props: BaseGaugePrivateProps);
50
+ /**
51
+ * @hidden
52
+ */
53
+ componentDidMount(): void;
54
+ /**
55
+ * @hidden
56
+ */
57
+ componentDidUpdate(prevProps: any): void;
58
+ /**
59
+ * @hidden
60
+ */
61
+ componentWillUnmount(): void;
62
+ /**
63
+ * @hidden
64
+ */
65
+ render(): any;
66
+ /**
67
+ * @hidden
68
+ */
69
+ instantiateCoreGauge(): void;
70
+ /**
71
+ * @hidden
72
+ */
73
+ refresh(): void;
74
+ /**
75
+ * @hidden
76
+ */
77
+ refreshValue(value: number): void;
78
+ /**
79
+ * @hidden
80
+ */
81
+ refreshAllValues(values: Array<number>): void;
82
+ /**
83
+ * @hidden
84
+ */
85
+ getDirection(dir?: string): boolean;
86
+ /**
87
+ * @hidden
88
+ */
89
+ getGaugeOptions(): any;
90
+ /**
91
+ * @hidden
92
+ */
93
+ trigger(name: string, e: any): void;
94
+ /**
95
+ * @hidden
96
+ */
97
+ onWindowResize: () => void;
98
+ }
@@ -0,0 +1,58 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ import { Gauges } from './common/gauges.js';
9
+ /**
10
+ * @hidden
11
+ */
12
+ export interface BaseGaugePrivateProps extends BaseGaugeProps {
13
+ /**
14
+ * @hidden
15
+ */
16
+ deriveOptionsFromParent?: (options: any) => any;
17
+ /**
18
+ * @hidden
19
+ */
20
+ gaugeConstructor: any;
21
+ /**
22
+ * @hidden
23
+ */
24
+ getTarget: () => Gauges;
25
+ }
26
+ /**
27
+ * @hidden
28
+ */
29
+ export interface BaseGaugeProps {
30
+ /**
31
+ * Determines the children nodes.
32
+ */
33
+ children?: React.ReactNode;
34
+ /**
35
+ * Represents the `dir` HTML attribute.
36
+ */
37
+ dir?: string;
38
+ /**
39
+ * The styles that are applied to the component.
40
+ */
41
+ style?: React.CSSProperties;
42
+ /**
43
+ * Sets additional CSS classes to the component.
44
+ */
45
+ className?: string;
46
+ /**
47
+ * Sets the preferred rendering engine. If not supported by the browser, the Gauge switches to the first available mode.
48
+ *
49
+ * The supported values are:
50
+ * - `"svg"`&mdash;If available, renders the component as an inline `.svg` file.
51
+ * - `"canvas"`&mdash;If available, renders the component as a `canvas` element.
52
+ */
53
+ renderAs?: 'svg' | 'canvas';
54
+ /**
55
+ * If set to `true`, the Gauge plays animations when it displays the series. By default, animations are enabled.
56
+ */
57
+ transitions?: boolean;
58
+ }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ import { CircularGaugeProps } from './CircularGaugeProps.js';
9
+ import { ArcGauge } from './ArcGauge.js';
10
+ import * as React from 'react';
11
+ export declare class CircularGauge extends ArcGauge implements React.Component<CircularGaugeProps, {}> {
12
+ protected gaugeType: any;
13
+ }
@@ -0,0 +1,24 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
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';
11
+ /**
12
+ * Represents the props of the [KendoReact CircularGauge component](https://www.telerik.com/kendo-react-ui/components/gauges/circulargauge).
13
+ */
14
+ export interface CircularGaugeProps extends ArcGaugeProps {
15
+ /**
16
+ * The color ranges of the value pointer
17
+ * ([see example](https://www.telerik.com/kendo-react-ui/components/gauges/circulargauge/color-ranges)).
18
+ */
19
+ colors?: ColorRange[];
20
+ /**
21
+ * The scale options of the CircularGauge.
22
+ */
23
+ scale?: CircularScale;
24
+ }
@@ -0,0 +1,19 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ import { Store } from './store/store.js';
9
+ import * as React from 'react';
10
+ /**
11
+ * @hidden
12
+ */
13
+ export interface GaugeContextType {
14
+ observersStore: Store;
15
+ }
16
+ /**
17
+ * @hidden
18
+ */
19
+ export declare const GaugeContext: React.Context<GaugeContextType | null>;
@@ -0,0 +1,38 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ import { LinearGaugeProps } from './LinearGaugeProps.js';
9
+ import { Surface, Group } from '@progress/kendo-drawing';
10
+ import * as React from 'react';
11
+ export declare class LinearGauge extends React.Component<LinearGaugeProps, {}> {
12
+ private _baseGauge;
13
+ /**
14
+ * @hidden
15
+ */
16
+ get gaugeInstance(): any;
17
+ /**
18
+ * The Drawing `Surface` of the Gauge.
19
+ */
20
+ get surface(): Surface | null;
21
+ /**
22
+ * The DOM element of the Gauge.
23
+ */
24
+ get element(): HTMLDivElement | null;
25
+ /**
26
+ * @hidden
27
+ */
28
+ render(): any;
29
+ /**
30
+ * Exports a Gauge component as a Drawing `Scene`.
31
+ *
32
+ * @param {any} options - The parameters for the export operation.
33
+ * @returns {Promise<Group>} - A promise that returns the root `Group` of the scene.
34
+ */
35
+ exportVisual(options?: any): Promise<Group>;
36
+ private getTarget;
37
+ private deriveOptionsFromParent;
38
+ }
@@ -0,0 +1,32 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ import { BaseGaugeProps } from './BaseGaugeProps.js';
9
+ import { LinearPointer, LinearScale } from './types.js';
10
+ /**
11
+ * Represents the props of the [KendoReact LinearGauge component](https://www.telerik.com/kendo-react-ui/components/gauges/lineargauge).
12
+ */
13
+ export interface LinearGaugeProps extends BaseGaugeProps {
14
+ /**
15
+ * The configuration of the pointers ([see example](https://www.telerik.com/kendo-react-ui/components/gauges/lineargauge/multiple-pointers)).
16
+ *
17
+ * Example:
18
+ * ```jsx
19
+ * <LinearGauge pointer={{ value: 75 }} />
20
+ * ```
21
+ */
22
+ pointer: LinearPointer | LinearPointer[];
23
+ /**
24
+ * The configuration of the scale.
25
+ *
26
+ * Example:
27
+ * ```jsx
28
+ * <LinearGauge scale={{ min: 0, max: 100 }} />
29
+ * ```
30
+ */
31
+ scale?: LinearScale;
32
+ }
@@ -0,0 +1,38 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ import { RadialGaugeProps } from './RadialGaugeProps.js';
9
+ import { Surface, Group } from '@progress/kendo-drawing';
10
+ import * as React from 'react';
11
+ export declare class RadialGauge extends React.Component<RadialGaugeProps, {}> {
12
+ private _baseGauge;
13
+ /**
14
+ * @hidden
15
+ */
16
+ get gaugeInstance(): any;
17
+ /**
18
+ * The Drawing `Surface` of the Gauge.
19
+ */
20
+ get surface(): Surface | null;
21
+ /**
22
+ * The DOM element of the Gauge.
23
+ */
24
+ get element(): HTMLDivElement | null;
25
+ /**
26
+ * @hidden
27
+ */
28
+ render(): any;
29
+ /**
30
+ * Exports a Gauge component as a Drawing `Scene`.
31
+ *
32
+ * @param {any} options - The parameters for the export operation.
33
+ * @returns {Promise<Group>} - A promise that returns the root `Group` of the scene.
34
+ */
35
+ exportVisual(options?: any): Promise<Group>;
36
+ private getTarget;
37
+ private deriveOptionsFromParent;
38
+ }
@@ -0,0 +1,32 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ import { BaseGaugeProps } from './BaseGaugeProps.js';
9
+ import { RadialPointer, RadialScale } from './types.js';
10
+ /**
11
+ * Represents the props of the [KendoReact RadialGauge component](https://www.telerik.com/kendo-react-ui/components/gauges/radialgauge).
12
+ */
13
+ export interface RadialGaugeProps extends BaseGaugeProps {
14
+ /**
15
+ * The configuration of the pointers ([see example](https://www.telerik.com/kendo-react-ui/components/gauges/radialgauge/multiple-pointers)).
16
+ *
17
+ * Example:
18
+ * ```jsx
19
+ * <RadialGauge pointer={{ value: 50 }} />
20
+ * ```
21
+ */
22
+ pointer: RadialPointer | RadialPointer[];
23
+ /**
24
+ * The configuration of the scale.
25
+ *
26
+ * Example:
27
+ * ```jsx
28
+ * <RadialGauge scale={{ startAngle: -90, endAngle: 180 }} />
29
+ * ```
30
+ */
31
+ scale?: RadialScale;
32
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ import { ArcGauge } from './../ArcGauge.js';
9
+ import { LinearGauge } from './../LinearGauge.js';
10
+ import { RadialGauge } from './../RadialGauge.js';
11
+ type Gauges = ArcGauge | LinearGauge | RadialGauge;
12
+ export { Gauges };
@@ -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=e=>{let t,s,r=[];const a=a=>{t=e(t,a),n.canUseDOM&&(window.clearTimeout(s),s=window.setTimeout((()=>r.forEach((e=>e()))),16.666666666666668))};return a({}),{getState:()=>t,dispatch:a,subscribe:e=>(r.push(e),()=>r=r.filter((t=>t!==e)))}},u=(e,t)=>{if(!t.type)return{};switch(t.type){case"set":return h.themeItem(e,t);case"push":return{...e,...t.payload};default:return e}},g=(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}},h={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}},p=e=>"object"==typeof e,d=(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(p(r)&&p(n)?d(r,n):r!==n)return!0}return!1},m=l.createContext(null);m.displayName="GaugeContext";const f=Object.freeze({name:"@progress/kendo-react-gauges",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:0,version:"13.3.0-develop.9",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"}),y=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(f,{component:"Gauge"}),this.licenseMessage=n.getLicenseMessage(f),this.themeStore=c(u),this.observersStore=c(g),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:m,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(d(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(m.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)}};y.propTypes={dir:s.string,renderAs:s.oneOf(["svg","canvas"])},y.defaultProps={renderAs:"svg"};let b=y;r.registerForIntl(b);const v=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()}})}};v.contextType=m;let I=v;const G=(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},O=(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=G(e.color,t)),s})(e,t))):e,k=(e,t)=>{if(!e||"object"!=typeof e)return e;const s={...e};return"string"==typeof e.color&&(s.color=G(e.color,t)),s},T=(e,t)=>{if(!e||"object"!=typeof e)return e;const s={...e};return"string"==typeof e.color&&(s.color=G(e.color,t)),Array.isArray(e.colors)&&(s.colors=O(e.colors,t)),e.pointer&&(s.pointer=((e,t)=>e&&(Array.isArray(e)?e.map((e=>k(e,t))):k(e,t)))(e.pointer,t)),e.scale&&"object"==typeof e.scale&&(s.scale={...e.scale},Array.isArray(e.scale.ranges)&&(s.scale.ranges=O(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=G(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=G(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=G(e.scale.minorTicks.color,t)))),s};class C 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?T(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(b,{...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(I,{render:s||t}))}exportVisual(e){return null!==this.gaugeInstance&&this.element?i.drawDOM(this.element,e):Promise.resolve(new i.Group)}}let _=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?T(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(b,{...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 w 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?T(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(b,{...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=C,e.CircularGauge=class extends C{constructor(){super(...arguments),this.gaugeType=a.CircularGauge}},e.LinearGauge=_,e.RadialGauge=w}));
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:"13.4.0-develop.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});