@progress/kendo-react-charts 8.1.0-develop.2 → 8.1.0-develop.20
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/BaseChart.js +1 -1
- package/BaseChart.mjs +21 -23
- package/dist/cdn/js/kendo-react-charts.js +1 -1
- package/index.d.mts +24 -2
- package/index.d.ts +24 -2
- package/package-metadata.mjs +1 -1
- package/package.json +6 -7
- package/sankey/Sankey.js +1 -1
- package/sankey/Sankey.mjs +56 -52
- package/sankey/SankeyTooltip.js +1 -1
- package/sankey/SankeyTooltip.mjs +23 -22
- package/sankey/propTypes.js +1 -1
- package/sankey/propTypes.mjs +6 -4
- package/events/dom-events-builder.js +0 -8
- package/events/dom-events-builder.mjs +0 -33
- package/events/dom-events.js +0 -8
- package/events/dom-events.mjs +0 -128
package/BaseChart.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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("react"),
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("react"),w=require("prop-types"),b=require("@progress/kendo-react-intl"),I=require("@progress/kendo-charts"),u=require("@progress/kendo-react-common"),m=require("./utils/index.js"),D=require("./events/chart-event-builder.js"),y=require("./events/dom-event.js"),k=require("./theming/theme-service.js"),g=require("./store/store.js"),S=require("./store/reducer.js"),E=require("./tooltip/Series.js"),P=require("./tooltip/CrosshairContainer.js"),T=require("./ChartContext.js"),O=require("./package-metadata.js"),q=require("./events/drilldown-event.js");function x(p){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(p){for(const e in p)if(e!=="default"){const s=Object.getOwnPropertyDescriptor(p,e);Object.defineProperty(t,e,s.get?s:{enumerable:!0,get:()=>p[e]})}}return t.default=p,Object.freeze(t)}const l=x(C),f=class f extends l.Component{constructor(t){super(t),this.chartInstance=null,this.surface=null,this._element=null,this.optionsStore={},this.optionsUnsubscriber=Function.prototype,this.themeStore={},this.themeUnsubscriber=Function.prototype,this.observersStore={},this.suppressTransitions=!1,this.showLicenseWatermark=!1,this.onRender=e=>{this.chartInstance!==null&&(this.surface=e.sender.surface,this.trigger("render",e))},this.onDrilldown=e=>{var a;const{series:s}=this.optionsStore.getState(),r=s.find(n=>n.name===e.series.name);if(!r.drilldownSeriesFactory)return!0;const i="onDrilldown";if(this.props.hasOwnProperty(i)){const n={seriesName:r.name,drilldownValue:e.value},c=[...((a=this.props.drilldownState)==null?void 0:a.steps)||[],n],h=this.props.getTarget(),d={...e,currentState:this.props.drilldownState,nextState:{steps:c}},o=new q.DrilldownEvent(d,h);this.props[i].call(void 0,o)}return!0},this.onLegendItemClick=e=>{if(this.chartInstance!==null)if(this.props.onLegendItemClick)this.trigger("legendItemClick",e);else{const{series:s}=this.optionsStore.getState();if(!s)return;let r={};const{seriesIndex:i,pointIndex:a}=e,n=s[i];if(a===void 0)r=Object.assign({},n,{visible:m.toggle(n.visible)});else{const c=n.pointVisibility=n.pointVisibility||[];c[a]=m.toggle(c[a]),r=Object.assign({},n)}this.optionsStore.dispatch({chartCollectionIdxKey:`series_${i}`,payload:r}),this.suppressTransitions=!0}},this.onWindowResize=()=>{this.chartInstance!==null&&this.chartInstance.resize()},this.onChartMouseLeave=e=>{const s=y.toDomEvent(this,e);this.triggerDomEvent("onMouseLeave",s)?e.preventDefault():this.chartInstance!==null&&this.chartInstance.hideElements()},this.onChildMouseLeave=e=>{const{syntheticEvent:s}=e;return this.chartInstance&&!m.hasParent(s.relatedTarget,this.element)&&this.chartInstance.hideElements(),!1},u.validatePackage(O.packageMetadata),this.showLicenseWatermark=u.shouldShowValidationUI(O.packageMetadata),this.optionsStore=g.createStore(S.optionsReducer),this.observersStore=g.createStore(S.observersReducer),this.childrenObserver=new I.InstanceObserver(this,{onMouseLeave:"onChildMouseLeave"}),this.state={optionsStore:this.optionsStore,observersStore:this.observersStore,childrenObserver:this.childrenObserver,drilldownState:{steps:[]}},this.themeStore=g.createStore(S.themeReducer),this.chartObserver=new I.InstanceObserver(this,{render:"onRender",legendItemClick:"onLegendItemClick",drilldown:"onDrilldown"})}get element(){return this._element}static getDerivedStateFromProps(t,e){return{...e,drilldownState:t.drilldownState||[]}}componentDidMount(){var e;const t=((e=this._element)==null?void 0:e.ownerDocument)||document;k.loadTheme(this.themeStore,this.instantiateCoreChart.bind(this),t),this.optionsUnsubscriber=this.optionsStore.subscribe(this.refresh.bind(this)),this.themeUnsubscriber=this.themeStore.subscribe(this.refresh.bind(this)),window.addEventListener("resize",this.onWindowResize)}componentWillUnmount(){this.optionsUnsubscriber(),this.themeUnsubscriber(),this.chartInstance!==null&&(this.chartInstance.destroy(),this.chartInstance=null),window.removeEventListener("resize",this.onWindowResize)}componentDidUpdate(t){const{dir:e,children:s,...r}=this.props;if(this.chartInstance!==null){const i=b.provideIntlService(this),a=this.chartInstance.chartService,n=i.locale!==a._intlService.locale,c=Object.entries(t).filter(h=>h[0]!=="dir"&&h[0]!=="children").some(h=>{const[d,o]=h;return!(r.hasOwnProperty(d)&&r[d]===o)});n&&(this.chartInstance.chartService._intlService=i,this.chartInstance.chartService.format._intlService=i,c||this.chartInstance.noTransitionsRedraw()),c&&this.refresh(),t.dir!==e&&this.chartInstance.setDirection(this.getDirection(e))}}render(){const{style:t={},className:e,wrapper:s,children:r}=this.props,i=Object.assign({},t,{position:"relative"}),a=l.createElement(s,{className:e,style:i,key:"chartElement"},l.createElement("div",{onMouseLeave:this.onChartMouseLeave,ref:n=>this._element=n,className:"k-chart-surface"},r),l.createElement(l.Fragment,null,this.showLicenseWatermark&&l.createElement(u.WatermarkOverlay,null)));return l.createElement(T.ChartContext.Provider,{value:this.state},l.createElement(E.SeriesTooltip,{key:"seriesTooltip"}),l.createElement(P.CrosshairTooltipContainer,{key:"crosshairTooltips"}),a)}getDirection(t){return(t!==void 0?t:u.canUseDOM&&window.getComputedStyle(this.element).direction||"ltr")==="rtl"}getChartOptions(){const{renderAs:t,pannable:e,zoomable:s,paneDefaults:r,panes:i,transitions:a,seriesColors:n,seriesDefaults:c,axisDefaults:h,deriveOptionsFromParent:d}=this.props;let o={};return t!==void 0&&(o.renderAs=t),e!==void 0&&(o.pannable=e),s!==void 0&&(o.zoomable=s),r!==void 0&&(o.paneDefaults=r),i!==void 0&&(o.panes=i),a!==void 0&&(o.transitions=a),n!==void 0&&(o.seriesColors=n),c!==void 0&&(o.seriesDefaults=c),h!==void 0&&(o.axisDefaults=h),o=Object.assign(o,this.optionsStore.getState()),d&&(o=d(o)),o}refresh(){if(this.chartInstance!==null){const t=this.themeStore.getState(),e=this.getChartOptions(),s=e.transitions;this.suppressTransitions&&(e.transitions=!1),this.props.onRefresh?this.props.onRefresh.call(void 0,e,t,this.chartInstance):this.chartInstance.setOptions(e,t),this.suppressTransitions&&(e.transitions=s,this.suppressTransitions=!1)}}instantiateCoreChart(){const{dir:t,chartConstructor:e}=this.props,s=this.getChartOptions();this.chartInstance=new e(this.element,s,this.themeStore.getState(),{rtl:this.getDirection(t),intlService:b.provideIntlService(this),observer:this.chartObserver,sender:this})}trigger(t,e){const s=this.props.getTarget(),r=D.create(t,e,s),i="on"+t.charAt(0).toUpperCase()+t.slice(1),a=this.observersStore.getState();let n=!1;for(let c=0;c<a.length;c++)a[c].trigger(t,e)&&(n=!0);return n===!1&&r&&this.props.hasOwnProperty(i)?(this.props[i].call(void 0,r),r.isDefaultPrevented&&r.isDefaultPrevented()):n}requiresHandlers(t){for(let e=0;e<t.length;e++){const s=t[e],r="on"+s.charAt(0).toUpperCase()+s.slice(1);if(this.props.hasOwnProperty(r))return!0}return!1}triggerDomEvent(t,e){const s=this.observersStore.getState();let r=!1;for(let i=0;i<s.length;i++)s[i].trigger(t,e)&&(r=!0);return r}};f.propTypes={dir:w.string,renderAs:w.oneOf(["svg","canvas"])},f.defaultProps={renderAs:"svg"};let v=f;b.registerForIntl(v);exports.BaseChart=v;
|
package/BaseChart.mjs
CHANGED
|
@@ -9,20 +9,19 @@
|
|
|
9
9
|
import * as l from "react";
|
|
10
10
|
import f from "prop-types";
|
|
11
11
|
import { provideIntlService as v, registerForIntl as w } from "@progress/kendo-react-intl";
|
|
12
|
-
import { InstanceObserver as g
|
|
13
|
-
import { validatePackage as
|
|
14
|
-
import { toggle as S, hasParent as
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import { loadTheme as L } from "./theming/theme-service.mjs";
|
|
12
|
+
import { InstanceObserver as g } from "@progress/kendo-charts";
|
|
13
|
+
import { validatePackage as I, shouldShowValidationUI as D, WatermarkOverlay as O, canUseDOM as C } from "@progress/kendo-react-common";
|
|
14
|
+
import { toggle as S, hasParent as y } from "./utils/index.mjs";
|
|
15
|
+
import { create as E } from "./events/chart-event-builder.mjs";
|
|
16
|
+
import { toDomEvent as P } from "./events/dom-event.mjs";
|
|
17
|
+
import { loadTheme as T } from "./theming/theme-service.mjs";
|
|
19
18
|
import { createStore as m } from "./store/store.mjs";
|
|
20
|
-
import { optionsReducer as
|
|
21
|
-
import { SeriesTooltip as
|
|
22
|
-
import { CrosshairTooltipContainer as
|
|
23
|
-
import { ChartContext as
|
|
19
|
+
import { optionsReducer as k, observersReducer as L, themeReducer as x } from "./store/reducer.mjs";
|
|
20
|
+
import { SeriesTooltip as U } from "./tooltip/Series.mjs";
|
|
21
|
+
import { CrosshairTooltipContainer as R } from "./tooltip/CrosshairContainer.mjs";
|
|
22
|
+
import { ChartContext as M } from "./ChartContext.mjs";
|
|
24
23
|
import { packageMetadata as b } from "./package-metadata.mjs";
|
|
25
|
-
import { DrilldownEvent as
|
|
24
|
+
import { DrilldownEvent as W } from "./events/drilldown-event.mjs";
|
|
26
25
|
const d = class d extends l.Component {
|
|
27
26
|
constructor(t) {
|
|
28
27
|
super(t), this.chartInstance = null, this.surface = null, this._element = null, this.optionsStore = {}, this.optionsUnsubscriber = Function.prototype, this.themeStore = {}, this.themeUnsubscriber = Function.prototype, this.observersStore = {}, this.suppressTransitions = !1, this.showLicenseWatermark = !1, this.onRender = (e) => {
|
|
@@ -38,7 +37,7 @@ const d = class d extends l.Component {
|
|
|
38
37
|
...e,
|
|
39
38
|
currentState: this.props.drilldownState,
|
|
40
39
|
nextState: { steps: h }
|
|
41
|
-
}, o = new
|
|
40
|
+
}, o = new W(p, c);
|
|
42
41
|
this.props[i].call(void 0, o);
|
|
43
42
|
}
|
|
44
43
|
return !0;
|
|
@@ -66,17 +65,17 @@ const d = class d extends l.Component {
|
|
|
66
65
|
}, this.onWindowResize = () => {
|
|
67
66
|
this.chartInstance !== null && this.chartInstance.resize();
|
|
68
67
|
}, this.onChartMouseLeave = (e) => {
|
|
69
|
-
const s =
|
|
68
|
+
const s = P(this, e);
|
|
70
69
|
this.triggerDomEvent("onMouseLeave", s) ? e.preventDefault() : this.chartInstance !== null && this.chartInstance.hideElements();
|
|
71
70
|
}, this.onChildMouseLeave = (e) => {
|
|
72
71
|
const { syntheticEvent: s } = e;
|
|
73
|
-
return this.chartInstance && !
|
|
74
|
-
},
|
|
72
|
+
return this.chartInstance && !y(s.relatedTarget, this.element) && this.chartInstance.hideElements(), !1;
|
|
73
|
+
}, I(b), this.showLicenseWatermark = D(b), this.optionsStore = m(k), this.observersStore = m(L), this.childrenObserver = new g(this, { onMouseLeave: "onChildMouseLeave" }), this.state = {
|
|
75
74
|
optionsStore: this.optionsStore,
|
|
76
75
|
observersStore: this.observersStore,
|
|
77
76
|
childrenObserver: this.childrenObserver,
|
|
78
77
|
drilldownState: { steps: [] }
|
|
79
|
-
}, this.themeStore = m(
|
|
78
|
+
}, this.themeStore = m(x), this.chartObserver = new g(this, {
|
|
80
79
|
render: "onRender",
|
|
81
80
|
legendItemClick: "onLegendItemClick",
|
|
82
81
|
drilldown: "onDrilldown"
|
|
@@ -103,7 +102,7 @@ const d = class d extends l.Component {
|
|
|
103
102
|
componentDidMount() {
|
|
104
103
|
var e;
|
|
105
104
|
const t = ((e = this._element) == null ? void 0 : e.ownerDocument) || document;
|
|
106
|
-
|
|
105
|
+
T(this.themeStore, this.instantiateCoreChart.bind(this), t), this.optionsUnsubscriber = this.optionsStore.subscribe(this.refresh.bind(this)), this.themeUnsubscriber = this.themeStore.subscribe(this.refresh.bind(this)), window.addEventListener("resize", this.onWindowResize);
|
|
107
106
|
}
|
|
108
107
|
/**
|
|
109
108
|
* @hidden
|
|
@@ -144,15 +143,15 @@ const d = class d extends l.Component {
|
|
|
144
143
|
},
|
|
145
144
|
r
|
|
146
145
|
),
|
|
147
|
-
/* @__PURE__ */ l.createElement(l.Fragment, null, this.showLicenseWatermark && /* @__PURE__ */ l.createElement(
|
|
146
|
+
/* @__PURE__ */ l.createElement(l.Fragment, null, this.showLicenseWatermark && /* @__PURE__ */ l.createElement(O, null))
|
|
148
147
|
);
|
|
149
|
-
return /* @__PURE__ */ l.createElement(
|
|
148
|
+
return /* @__PURE__ */ l.createElement(M.Provider, { value: this.state }, /* @__PURE__ */ l.createElement(U, { key: "seriesTooltip" }), /* @__PURE__ */ l.createElement(R, { key: "crosshairTooltips" }), a);
|
|
150
149
|
}
|
|
151
150
|
/**
|
|
152
151
|
* @hidden
|
|
153
152
|
*/
|
|
154
153
|
getDirection(t) {
|
|
155
|
-
return (t !== void 0 ? t :
|
|
154
|
+
return (t !== void 0 ? t : C && window.getComputedStyle(this.element).direction || "ltr") === "rtl";
|
|
156
155
|
}
|
|
157
156
|
/**
|
|
158
157
|
* @hidden
|
|
@@ -204,7 +203,7 @@ const d = class d extends l.Component {
|
|
|
204
203
|
* @hidden
|
|
205
204
|
*/
|
|
206
205
|
trigger(t, e) {
|
|
207
|
-
const s = this.props.getTarget(), r =
|
|
206
|
+
const s = this.props.getTarget(), r = E(t, e, s), i = "on" + t.charAt(0).toUpperCase() + t.slice(1), a = this.observersStore.getState();
|
|
208
207
|
let n = !1;
|
|
209
208
|
for (let h = 0; h < a.length; h++)
|
|
210
209
|
a[h].trigger(t, e) && (n = !0);
|
|
@@ -242,7 +241,6 @@ d.propTypes = {
|
|
|
242
241
|
};
|
|
243
242
|
let u = d;
|
|
244
243
|
w(u);
|
|
245
|
-
I.register(P);
|
|
246
244
|
export {
|
|
247
245
|
u as BaseChart
|
|
248
246
|
};
|
|
@@ -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
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("prop-types"),require("@progress/kendo-react-intl"),require("@progress/kendo-charts"),require("@progress/kendo-react-common"),require("@progress/kendo-react-popup"),require("@progress/kendo-react-layout"),require("@progress/kendo-svg-icons")):"function"==typeof define&&define.amd?define(["exports","react","prop-types","@progress/kendo-react-intl","@progress/kendo-charts","@progress/kendo-react-common","@progress/kendo-react-popup","@progress/kendo-react-layout","@progress/kendo-svg-icons"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactCharts={},e.React,e.PropTypes,e.KendoReactIntl,e.KendoCharts,e.KendoReactCommon,e.KendoReactPopup,e.KendoReactLayout,e.KendoSvgIcons)}(this,(function(e,t,s,r,n,a,i,o,l){"use strict";function c(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 h=c(t);function d(e,t){let s=e;for(;s&&s!==t;)s=s.parentNode;return!!s}function p(e,t,s,r){const n=e[t];if(n&&Array.isArray(n))for(let e of n)if(!e.type||e.type!==r)return new Error(`${s} children should be Array of type ${r.displayName}.`);return null}const u=e=>void 0!==e&&!e,m=e=>({x:{location:e.pageX},y:{location:e.pageY}});function v(e,t){for(let s=0;s<e.length;s++)if(t[e[s]])return!0;return!1}const y=[{end:"panend",move:"panmove",start:"panstart"},{gesturechange:"pinchmove",gestureend:"pinchend",gesturestart:"pinchstart"},{press:"press"},{tap:"tap"}];let g=class{constructor(e,t){this.hammerInstance=e,this.eventHandlers={},this.tap=this.tap.bind(this),this.press=this.press.bind(this),this.panstart=this.panstart.bind(this),this.panmove=this.panmove.bind(this),this.panend=this.panend.bind(this),this.pinchstart=this.pinchstart.bind(this),this.pinchmove=this.pinchmove.bind(this),this.pinchend=this.pinchend.bind(this),t&&this.bind(t)}tap(e){this.trigger("tap",e)}press(e){this.trigger("press",e)}panstart(e){delete this.previous,this.previous=this.trigger("start",e)}panmove(e){this.previous=this.trigger("move",e)}panend(e){this.trigger("end",e),delete this.previous}pinchstart(e){this.trigger("gesturestart",e)}pinchmove(e){this.trigger("gesturechange",e)}pinchend(e){this.trigger("gestureend",e)}trigger(e,t){const s=((e,t)=>{const s=e.pointers,r=s[0],n=r.pageX,a=r.pageY;let i=0;if(s.length>1){const e=s[0],t=s[1];i=Math.sqrt(Math.pow(e.pageX-t.pageX,2)+Math.pow(e.pageY-t.pageY,2))}return{distance:i,event:e.srcEvent,preventDefault:function(){e.preventDefault()},target:e.target,touches:s.map(m),type:e.type,x:{delta:t?n-t.x.location:0,initialDelta:e.deltaX,location:n,startLocation:n-e.deltaX},y:{delta:t?a-t.y.location:0,initialDelta:e.deltaY,location:a,startLocation:a-e.deltaY}}})(t,this.previous);return this.eventHandlers[e]&&this.eventHandlers[e](s),s}bind(e={}){this.unbind(),this.eventHandlers=e;for(let t=0;t<y.length;t++){const s=y[t],r=Object.keys(s);if(v(r,e))for(let e=0;e<r.length;e++){const t=s[r[e]];this.hammerInstance.on(t,this[t])}}}unbind(){this.hammerInstance&&this.hammerInstance.off(),this.eventHandlers={}}destroy(){this.hammerInstance&&(this.hammerInstance.destroy(),delete this.hammerInstance),delete this.eventHandlers}toggleDrag(e){this.toggle("pan",e)}toggleZoom(e){this.toggle("pinch",e)}toggle(e,t){this.hammerInstance&&this.hammerInstance.get(e).set({enable:t})}};let f=class{constructor(e){this.target=e}},b=class extends f{constructor(e,t){super(t),this.axis=e.axis,this.dataItem=e.dataItem,this.index=e.index,this.text=e.text,this.value=e.value}},C=class extends f{constructor(){super(...arguments),this.prevented=!1}preventDefault(){this.prevented=!0}isDefaultPrevented(){return this.prevented}},x=class extends C{constructor(e,t){super(t),this.axisRanges=e.axisRanges,this.nativeEvent=e.originalEvent}},S=class extends f{constructor(e,t){super(t),this.axisRanges=e.axisRanges,this.nativeEvent=e.originalEvent}},E=class extends C{constructor(e,t){super(t),this.axisRanges=e.axisRanges,this.nativeEvent=e.originalEvent}},k=class extends f{constructor(e,t){super(t),this.value=e.value,this.point=e.point,this.series=e.series,this.currentState=e.currentState,this.nextState=e.nextState}},I=class extends C{constructor(e,t){super(t),this.series=e.series,this.seriesIndex=e.seriesIndex,this.pointIndex=e.pointIndex,this.text=e.text}preventDefault(){super.preventDefault()}},w=class extends C{constructor(e,t){super(t),this.series=e.series,this.seriesIndex=e.seriesIndex,this.pointIndex=e.pointIndex,this.text=e.text}preventDefault(){super.preventDefault()}},_=class extends f{constructor(e,t){super(t),this.from=e.from,this.to=e.to}},D=class extends f{constructor(e,t){super(t),this.category=e.category,this.dataItem=e.dataItem,this.series=e.series,this.value=e.value,this.visual=e.visual}},N=class extends f{constructor(e,t){super(t),this.category=e.category,this.dataItem=e.dataItem,this.series=e.series,this.value=e.value,this.visual=e.visual}},T=class extends f{constructor(e,t){super(t),this.category=e.category,this.nativeEvent=e.originalEvent,this.value=e.value,this.x=e.x,this.y=e.y}},A=class extends f{constructor(e,t){super(t),this.category=e.category,this.nativeEvent=e.originalEvent,this.value=e.value,this.x=e.x,this.y=e.y}},O=class extends f{constructor(e,t){super(t)}},K=class extends C{constructor(e,t){super(t),this.axis=e.axis,this.from=e.from,this.to=e.to}},L=class extends f{constructor(e,t){super(t),this.axis=e.axis,this.from=e.from,this.to=e.to}},R=class extends C{constructor(e,t){super(t),this.axis=e.axis,this.from=e.from,this.to=e.to}},P=class extends f{constructor(e,t){super(t),this.category=e.category,this.dataItem=e.dataItem,this.nativeEvent=e.originalEvent,this.percentage=e.percentage,this.point=e.point,this.series=e.series,this.stackValue=e.stackValue,this.value=e.value}},F=class extends C{constructor(e,t){super(t),this.category=e.category,this.categoryPoints=e.categoryPoints,this.dataItem=e.dataItem,this.nativeEvent=e.originalEvent,this.percentage=e.percentage,this.point=e.point,this.series=e.series,this.stackValue=e.stackValue,this.value=e.value}},q=class extends C{constructor(e,t){super(t),this.axisRanges=e.axisRanges,this.delta=e.delta,this.nativeEvent=e.originalEvent}},j=class extends f{constructor(e,t){super(t),this.axisRanges=e.axisRanges,this.nativeEvent=e.originalEvent}},H=class extends C{constructor(e,t){super(t),this.axisRanges=e.axisRanges,this.nativeEvent=e.originalEvent}};const V={axisLabelClick:b,drag:x,dragEnd:S,dragStart:E,drilldownEvent:k,legendItemHover:I,legendItemClick:w,legendItemLeave:class extends C{constructor(e,t){super(t),this.series=e.series,this.seriesIndex=e.seriesIndex,this.pointIndex=e.pointIndex,this.text=e.text}preventDefault(){super.preventDefault()}},navigatorFilter:_,noteClick:D,noteHover:N,plotAreaClick:T,plotAreaHover:A,render:O,select:K,selectEnd:L,selectStart:R,seriesClick:P,seriesHover:F,zoom:q,zoomEnd:j,zoomStart:H};let M=class{constructor(e,t){this.sender=e,this.syntheticEvent=t}};function z(e,t){return new M(e,t)}const U=e=>`${e.fontWeight} ${e.fontSize} ${e.fontFamily}`,B=e=>window.getComputedStyle(e).backgroundColor,$=`\n <div class="k-var--primary"></div>\n <div class="k-var--base"></div>\n <div class="k-var--background"></div>\n\n <div class="k-var--normal-background"></div>\n <div class="k-var--normal-text-color"></div>\n <div class="k-var--hover-background"></div>\n <div class="k-var--hover-text-color"></div>\n <div class="k-var--selected-background"></div>\n <div class="k-var--selected-text-color"></div>\n <div class="k-var--chart-error-bars-background"></div>\n <div class="k-var--chart-notes-background"></div>\n <div class="k-var--chart-notes-border"></div>\n <div class="k-var--chart-notes-lines"></div>\n <div class="k-var--chart-crosshair-background"></div>\n\n <div class="k-var--chart-inactive"></div>\n <div class="k-var--chart-major-lines"></div>\n <div class="k-var--chart-minor-lines"></div>\n <div class="k-var--chart-area-opacity"></div>\n <div class="k-var--chart-area-inactive-opacity"></div>\n <div class="k-var--chart-line-inactive-opacity"></div>\n\n <div class="k-widget k-chart">\n <div class="k-var--chart-font"></div>\n <div class="k-var--chart-title-font"></div>\n <div class="k-var--chart-pane-title-font"></div>\n <div class="k-var--chart-label-font"></div>\n </div>\n\n <div class="k-var--series-unset"></div>\n <div class="k-var--series">\n ${(()=>{let e='\n <div class="k-var--series-a"></div>\n <div class="k-var--series-b"></div>\n <div class="k-var--series-c"></div>\n <div class="k-var--series-d"></div>\n <div class="k-var--series-e"></div>\n <div class="k-var--series-f"></div>\n';for(let t=0;t<30;t++)e+=`\n <div class="k-var--series-${t+1}"></div>`;return e})()}\n </div>\n`;class X{constructor(e){this.store=e}setStyle(e,t){this.store.dispatch({type:"set",payload:{field:e,value:t}})}setColors(){this.mapColor("axisDefaults.crosshair.color","chart-crosshair-background"),this.mapColor("axisDefaults.labels.color","normal-text-color"),this.mapColor("axisDefaults.line.color","chart-major-lines"),this.mapColor("axisDefaults.majorGridLines.color","chart-major-lines"),this.mapColor("axisDefaults.minorGridLines.color","chart-minor-lines"),this.mapColor("axisDefaults.notes.icon.background","chart-notes-background"),this.mapColor("axisDefaults.notes.icon.border.color","chart-notes-border"),this.mapColor("axisDefaults.notes.line.color","chart-notes-lines"),this.mapColor("axisDefaults.title.color","normal-text-color"),this.mapColor("chartArea.background","background"),this.mapColor("legend.inactiveItems.labels.color","chart-inactive"),this.mapColor("legend.inactiveItems.markers.color","chart-inactive"),this.mapColor("legend.labels.color","normal-text-color"),this.mapColor("seriesDefaults.boxPlot.downColor","chart-major-lines"),this.mapColor("seriesDefaults.boxPlot.mean.color","base"),this.mapColor("seriesDefaults.boxPlot.median.color","base"),this.mapColor("seriesDefaults.boxPlot.whiskers.color","primary"),this.mapColor("seriesDefaults.bullet.target.color","normal-text-color"),this.mapColor("seriesDefaults.candlestick.downColor","normal-text-color"),this.mapColor("seriesDefaults.candlestick.line.color","normal-text-color"),this.mapColor("seriesDefaults.errorBars.color","chart-error-bars-background"),this.mapColor("seriesDefaults.horizontalWaterfall.line.color","chart-major-lines"),this.mapColor("seriesDefaults.icon.border.color","chart-major-lines"),this.mapColor("seriesDefaults.labels.background","background"),this.mapColor("seriesDefaults.labels.color","normal-text-color"),this.mapColor("seriesDefaults.notes.icon.background","chart-notes-background"),this.mapColor("seriesDefaults.notes.icon.border.color","chart-notes-border"),this.mapColor("seriesDefaults.notes.line.color","chart-notes-lines"),this.mapColor("seriesDefaults.verticalBoxPlot.downColor","chart-major-lines"),this.mapColor("seriesDefaults.verticalBoxPlot.mean.color","base"),this.mapColor("seriesDefaults.verticalBoxPlot.median.color","base"),this.mapColor("seriesDefaults.verticalBoxPlot.whiskers.color","primary"),this.mapColor("seriesDefaults.verticalBullet.target.color","normal-text-color"),this.mapColor("seriesDefaults.waterfall.line.color","chart-major-lines"),this.mapColor("title.color","normal-text-color"),this.mapColor("subtitle.color","normal-text-color");const e=parseFloat(this.queryStyle("chart-area-opacity").opacity);isNaN(e)||(this.setStyle("seriesDefaults.area.opacity",e),this.setStyle("seriesDefaults.radarArea.opacity",e),this.setStyle("seriesDefaults.verticalArea.opacity",e),this.setStyle("seriesDefaults.labels.opacity",e)),this.setInactiveOpacity(["area","verticalArea"],"chart-area-inactive-opacity"),this.setInactiveOpacity(["line","verticalLine"],"chart-line-inactive-opacity")}setFonts(){const e=U(this.queryStyle("chart-font")),t=U(this.queryStyle("chart-title-font")),s=U(this.queryStyle("chart-pane-title-font")),r=U(this.queryStyle("chart-label-font"));this.setStyle("axisDefaults.labels.font",r),this.setStyle("axisDefaults.notes.label.font",e),this.setStyle("axisDefaults.title.font",e),this.setStyle("legend.labels.font",e),this.setStyle("seriesDefaults.labels.font",r),this.setStyle("seriesDefaults.notes.label.font",e),this.setStyle("title.font",t),this.setStyle("subtitle.font",s),this.setStyle("paneDefaults.title.font",s)}setSeriesColors(){const e=this.element,t=[].slice.call(e.querySelectorAll(".k-var--series div")),s=B(e.querySelector(".k-var--series-unset")),r=t.reduce(((e,t)=>{const r=(e=>{const t=e.match(/series-([a-z])$/);if(null!==t)return(e=>e.toLowerCase().charCodeAt(0)-97)(t[1]);const s=e.split("--series-")[1];return parseInt(s,10)-1})(t.className),n=B(t);return n!==s&&(e[r]=n),e}),[]);this.setStyle("seriesColors",r)}mapColor(e,t){this.setStyle(e,this.queryStyle(t).backgroundColor)}queryStyle(e){const t=this.element;return window.getComputedStyle(t.querySelector(`.k-var--${e}`))}setInactiveOpacity(e,t){const s=parseFloat(this.queryStyle(t).opacity);!isNaN(s)&&s<1&&e.forEach((e=>this.setStyle(`seriesDefaults.${e}.highlight.inactiveOpacity`,s)))}}const Y=e=>{let t,s,r=[];const n=n=>{t=e(t,n),a.canUseDOM&&(window.clearTimeout(s),s=window.setTimeout((()=>r.forEach((e=>e()))),16.666666666666668))};return n({}),{getState:()=>t,dispatch:n,subscribe:e=>(r.push(e),()=>r=r.filter((t=>t!==e)))}},W=(e,t)=>t.chartCollectionIdxKey?J.collectionConfigurationItem(e,t):t.chartKey?J.configurationItem(e,t):{},Z=(e,t)=>{if(!t.type)return{};switch(t.type){case"set":return J.themeItem(e,t);case"push":return Object.assign(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}},J={configurationItem:(e,t)=>Object.assign(e,{[t.chartKey]:t.payload}),collectionConfigurationItem(e,t){let s=!1;const[r,n]=t.chartCollectionIdxKey.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),Object.assign(e,{[r]:a})},themeItem(e,t){let s={},r=Object.assign(s,e);const{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}};let Q=class{constructor(e,t){this.value=e.value,this.category=e.category,this.categoryIndex=e.categoryIx,this.series=e.series,this.dataItem=e.dataItem,this.percentage=e.percentage,this.runningTotal=e.runningTotal,this.total=e.total,this.low=e.low,this.high=e.high,this.xLow=e.xLow,this.xHigh=e.xHigh,this.yLow=e.yLow,this.yHigh=e.yHigh,this.point=e,this.format=((e.options||{}).tooltip||{}).format||t}get formattedValue(){return this.format?this.point.formatValue(this.format):String(this.value)}};const ee=e=>{const{categoryText:t,colorMarker:s,colspan:r,nameColumn:n,points:a}=e;return h.createElement("table",null,h.createElement("thead",null,h.createElement("tr",null,h.createElement("th",{colSpan:r},t))),h.createElement("tbody",null,a.map(((e,t)=>h.createElement("tr",{key:t},s&&h.createElement("td",null,h.createElement("span",{className:"k-chart-shared-tooltip-marker",style:{backgroundColor:e.series.color}})),n&&h.createElement("td",null,e.series.name),h.createElement("td",{dangerouslySetInnerHTML:{__html:e.formattedValue}}))))))},te=h.createContext(null);te.displayName="ChartContext";const se={horizontal:"fit",vertical:"fit"},re="k-chart-tooltip",ne=class extends h.Component{constructor(e,t){super(e,t),this.context=null,this.element=null,this.onChartMouseLeave=e=>{const{syntheticEvent:t}=e;return!!d(t.relatedTarget,this.element)},this.onMouseLeave=e=>{const t=z(this,e);this.context.childrenObserver.trigger("onMouseLeave",t)&&e.preventDefault()},this.popupRef=e=>{this.element=e;const t=e&&e.closest(".k-animation-container");t&&(t.style.transition="initial")},this.chartObserver=new n.InstanceObserver(this,{onMouseLeave:"onChartMouseLeave"}),t.observersStore.dispatch({type:"add",payload:this.chartObserver})}render(){const{popupShown:e,popupAlign:t,popupOffset:s,popupStyles:r,popupContent:n,className:a}=this.props,o=[re,a].join(" ").trim();return h.createElement(i.Popup,{animate:!1,popupAlign:t,offset:s,show:e,collision:se,className:"k-chart-tooltip-wrapper"},h.createElement("div",{className:o,style:r,onMouseLeave:this.onMouseLeave,ref:this.popupRef},n()))}componentWillUnmount(){this.context.observersStore.dispatch({type:"remove",payload:this.chartObserver})}};ne.contextType=te;let ae=ne;const ie=class extends h.Component{constructor(){super(...arguments),this.context=null,this.state={popupShown:!1},this.chartObserver=null}componentDidMount(){this.chartObserver=new n.InstanceObserver(this,{showTooltip:"onShowTooltip",hideTooltip:"onHideTooltip"}),this.context.observersStore.dispatch({type:"add",payload:this.chartObserver})}render(){const{popupContext:e,shared:t,className:s,...r}=this.state,n=this.state.popupShown?()=>{const s=this.findRenderFunction();if(t)return null!==s?s(e):h.createElement(ee,{...e});{const t=e.point,r=this.findRenderFunctionByIndex(t.series.index);return null!==r?r(e):null!==s?s(e):h.createElement("span",{dangerouslySetInnerHTML:{__html:e.point.formattedValue}})}}:Function.prototype,i=a.classNames({"k-chart-shared-tooltip":t,"k-chart-tooltip-inverse":!!s});return h.createElement(ae,{...r,popupContent:n,className:i})}componentWillUnmount(){this.context.observersStore.dispatch({type:"remove",payload:this.chartObserver})}onShowTooltip(e){const{anchor:t,style:s,shared:r,className:n,crosshair:a}=e;let i;a||(i=r?this.createSharedTooltipContext(e):this.createTooltipContext(e),this.setState({popupShown:!0,popupAlign:t.align,popupOffset:t.point,popupContext:i,popupStyles:s,className:n,shared:r}))}onHideTooltip(){this.setState({popupShown:!1,popupStyles:{},className:void 0})}createSharedTooltipContext(e){const{points:t,categoryText:s}=e,r=t.filter((e=>void 0!==e.series.name)).length>0,n=e.series.length>1;let a=1;return r&&a++,n&&a++,{categoryText:s,colorMarker:n,colspan:a,nameColumn:r,points:e.points.map((t=>new Q(t,e.format)))}}createTooltipContext(e){const{point:t,format:s}=e;return{point:new Q(t,s)}}findRenderFunctionByIndex(e){const t=this.context.optionsStore.getState().series;return void 0!==t&&Array.isArray(t)&&void 0!==t[e]&&t[e].hasOwnProperty("tooltip")&&t[e].tooltip.hasOwnProperty("render")?t[e].tooltip.render:null}findRenderFunction(){const e=this.context.optionsStore.getState().tooltip;return void 0!==e&&e.hasOwnProperty("render")?e.render:null}};ie.contextType=te;let oe=ie;const le=e=>e.children;le.displayName="Container";const ce=class extends h.Component{constructor(e,t){super(e,t),this.context=null,this.state={popupShown:!1},this.chartObserver=new n.InstanceObserver(this,{showTooltip:"onShowTooltip",hideTooltip:"onHideTooltip"}),t.observersStore.dispatch({type:"add",payload:this.chartObserver})}render(){const{popupContend:e,className:t,...s}=this.state,r=this.state.popupShown?()=>e:Function.prototype,n=a.classNames({"k-chart-crosshair-tooltip":!0,"k-chart-tooltip-inverse":!!t});return h.createElement(ae,{...s,popupContent:r,className:n})}componentWillUnmount(){var e;null==(e=this.context)||e.observersStore.dispatch({type:"remove",payload:this.chartObserver})}onShowTooltip(e){const{anchor:t,style:s,className:r,crosshair:n,axisName:a,axisIndex:i,value:o}=e,{name:l,index:c}=this.props;n&&a===l&&i===c&&this.setState({popupShown:!0,popupAlign:t.align,popupOffset:t.point,popupContend:o,popupStyles:s,className:r})}onHideTooltip(){this.setState({popupShown:!1,popupStyles:{},className:void 0})}};ce.contextType=te;let he=ce;const de=["categoryAxis","valueAxis","xAxis","yAxis"];function pe(e){const t={};for(let s=0;s<de.length;s++){const r=ue(e,de[s]);for(let e=0;e<r.length;e++){const s=r[e];t[s.name+s.index]=s}}return t}function ue(e,t){const s=[];if(e[t]){const r=[].concat(e[t]);for(let e=0;e<r.length;e++){const n=(r[e].crosshair||{}).tooltip;n&&n.visible&&s.push({index:e,name:t})}}return s}const me=class extends h.Component{constructor(){super(...arguments),this.context=null,this.state={tooltips:{}},this.storeUnsubscriber=Function.prototype,this.subscriber=()=>{var e;this.setState({tooltips:pe(null==(e=this.context)?void 0:e.optionsStore.getState())})}}componentDidMount(){this.storeUnsubscriber=this.context.optionsStore.subscribe(this.subscriber)}render(){const{tooltips:e}=this.state,t=Object.keys(e).map((t=>h.createElement(he,{...e[t],key:t})));return h.createElement(le,null,t)}componentWillUnmount(){this.storeUnsubscriber()}};me.contextType=te;let ve=me;const ye={name:"@progress/kendo-react-charts",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:0,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"},ge=class extends h.Component{constructor(e){super(e),this.chartInstance=null,this.surface=null,this._element=null,this.optionsStore={},this.optionsUnsubscriber=Function.prototype,this.themeStore={},this.themeUnsubscriber=Function.prototype,this.observersStore={},this.suppressTransitions=!1,this.showLicenseWatermark=!1,this.onRender=e=>{null!==this.chartInstance&&(this.surface=e.sender.surface,this.trigger("render",e))},this.onDrilldown=e=>{var t;const{series:s}=this.optionsStore.getState(),r=s.find((t=>t.name===e.series.name));if(!r.drilldownSeriesFactory)return!0;const n="onDrilldown";if(this.props.hasOwnProperty(n)){const s={seriesName:r.name,drilldownValue:e.value},a=[...(null==(t=this.props.drilldownState)?void 0:t.steps)||[],s],i=this.props.getTarget(),o={...e,currentState:this.props.drilldownState,nextState:{steps:a}},l=new k(o,i);this.props[n].call(void 0,l)}return!0},this.onLegendItemClick=e=>{if(null!==this.chartInstance)if(this.props.onLegendItemClick)this.trigger("legendItemClick",e);else{const{series:t}=this.optionsStore.getState();if(!t)return;let s={};const{seriesIndex:r,pointIndex:n}=e,a=t[r];if(void 0===n)s=Object.assign({},a,{visible:u(a.visible)});else{const e=a.pointVisibility=a.pointVisibility||[];e[n]=u(e[n]),s=Object.assign({},a)}this.optionsStore.dispatch({chartCollectionIdxKey:`series_${r}`,payload:s}),this.suppressTransitions=!0}},this.onWindowResize=()=>{null!==this.chartInstance&&this.chartInstance.resize()},this.onChartMouseLeave=e=>{const t=z(this,e);this.triggerDomEvent("onMouseLeave",t)?e.preventDefault():null!==this.chartInstance&&this.chartInstance.hideElements()},this.onChildMouseLeave=e=>{const{syntheticEvent:t}=e;return this.chartInstance&&!d(t.relatedTarget,this.element)&&this.chartInstance.hideElements(),!1},a.validatePackage(ye),this.showLicenseWatermark=a.shouldShowValidationUI(ye),this.optionsStore=Y(W),this.observersStore=Y(G),this.childrenObserver=new n.InstanceObserver(this,{onMouseLeave:"onChildMouseLeave"}),this.state={optionsStore:this.optionsStore,observersStore:this.observersStore,childrenObserver:this.childrenObserver,drilldownState:{steps:[]}},this.themeStore=Y(Z),this.chartObserver=new n.InstanceObserver(this,{render:"onRender",legendItemClick:"onLegendItemClick",drilldown:"onDrilldown"})}get element(){return this._element}static getDerivedStateFromProps(e,t){return{...t,drilldownState:e.drilldownState||[]}}componentDidMount(){var e;const t=(null==(e=this._element)?void 0:e.ownerDocument)||document;((e,t,s)=>{const r=new X(e);if(void 0===s)return void e.dispatch({type:"push",payload:n.chartBaseTheme()});const a=r.element=s.createElement("div");a.style.display="none",a.innerHTML=$,s.body.appendChild(a);try{e.dispatch({type:"push",payload:n.chartBaseTheme()}),r.setColors(),r.setFonts(),r.setSeriesColors()}finally{s.body.removeChild(r.element),delete r.element,t()}})(this.themeStore,this.instantiateCoreChart.bind(this),t),this.optionsUnsubscriber=this.optionsStore.subscribe(this.refresh.bind(this)),this.themeUnsubscriber=this.themeStore.subscribe(this.refresh.bind(this)),window.addEventListener("resize",this.onWindowResize)}componentWillUnmount(){this.optionsUnsubscriber(),this.themeUnsubscriber(),null!==this.chartInstance&&(this.chartInstance.destroy(),this.chartInstance=null),window.removeEventListener("resize",this.onWindowResize)}componentDidUpdate(e){const{dir:t,children:s,...n}=this.props;if(null!==this.chartInstance){const s=r.provideIntlService(this),a=this.chartInstance.chartService,i=s.locale!==a._intlService.locale,o=Object.entries(e).filter((e=>"dir"!==e[0]&&"children"!==e[0])).some((e=>{const[t,s]=e;return!(n.hasOwnProperty(t)&&n[t]===s)}));i&&(this.chartInstance.chartService._intlService=s,this.chartInstance.chartService.format._intlService=s,o||this.chartInstance.noTransitionsRedraw()),o&&this.refresh(),e.dir!==t&&this.chartInstance.setDirection(this.getDirection(t))}}render(){const{style:e={},className:t,wrapper:s,children:r}=this.props,n=Object.assign({},e,{position:"relative"}),i=h.createElement(s,{className:t,style:n,key:"chartElement"},h.createElement("div",{onMouseLeave:this.onChartMouseLeave,ref:e=>this._element=e,className:"k-chart-surface"},r),h.createElement(h.Fragment,null,this.showLicenseWatermark&&h.createElement(a.WatermarkOverlay,null)));return h.createElement(te.Provider,{value:this.state},h.createElement(oe,{key:"seriesTooltip"}),h.createElement(ve,{key:"crosshairTooltips"}),i)}getDirection(e){return"rtl"===(void 0!==e?e:a.canUseDOM&&window.getComputedStyle(this.element).direction||"ltr")}getChartOptions(){const{renderAs:e,pannable:t,zoomable:s,paneDefaults:r,panes:n,transitions:a,seriesColors:i,seriesDefaults:o,axisDefaults:l,deriveOptionsFromParent:c}=this.props;let h={};return void 0!==e&&(h.renderAs=e),void 0!==t&&(h.pannable=t),void 0!==s&&(h.zoomable=s),void 0!==r&&(h.paneDefaults=r),void 0!==n&&(h.panes=n),void 0!==a&&(h.transitions=a),void 0!==i&&(h.seriesColors=i),void 0!==o&&(h.seriesDefaults=o),void 0!==l&&(h.axisDefaults=l),h=Object.assign(h,this.optionsStore.getState()),c&&(h=c(h)),h}refresh(){if(null!==this.chartInstance){const e=this.themeStore.getState(),t=this.getChartOptions(),s=t.transitions;this.suppressTransitions&&(t.transitions=!1),this.props.onRefresh?this.props.onRefresh.call(void 0,t,e,this.chartInstance):this.chartInstance.setOptions(t,e),this.suppressTransitions&&(t.transitions=s,this.suppressTransitions=!1)}}instantiateCoreChart(){const{dir:e,chartConstructor:t}=this.props,s=this.getChartOptions();this.chartInstance=new t(this.element,s,this.themeStore.getState(),{rtl:this.getDirection(e),intlService:r.provideIntlService(this),observer:this.chartObserver,sender:this})}trigger(e,t){const s=function(e,t,s){if(V[e])return new V[e](t,s)}(e,t,this.props.getTarget()),r="on"+e.charAt(0).toUpperCase()+e.slice(1),n=this.observersStore.getState();let a=!1;for(let s=0;s<n.length;s++)n[s].trigger(e,t)&&(a=!0);return!1===a&&s&&this.props.hasOwnProperty(r)?(this.props[r].call(void 0,s),s.isDefaultPrevented&&s.isDefaultPrevented()):a}requiresHandlers(e){for(let t=0;t<e.length;t++){const s=e[t],r="on"+s.charAt(0).toUpperCase()+s.slice(1);if(this.props.hasOwnProperty(r))return!0}return!1}triggerDomEvent(e,t){const s=this.observersStore.getState();let r=!1;for(let n=0;n<s.length;n++)s[n].trigger(e,t)&&(r=!0);return r}};ge.propTypes={dir:s.string,renderAs:s.oneOf(["svg","canvas"])},ge.defaultProps={renderAs:"svg"};let fe=ge;r.registerForIntl(fe),n.DomEventsBuilder.register(class{static create(e,t){if("undefined"!=typeof window){const s=window.Hammer;if(!s)return void("production"!==process.env.NODE_ENV&&console.warn("Hammerjs is not loaded.Solution: http://www.telerik.com/kendo-react-ui/components/charts/troubleshooting/#toc-installation"));const r=new s(e,{recognizers:[[s.Tap],[s.Pan],[s.Pinch],[s.Press,{time:0}]]});return new g(r,t)}}});const be=class extends h.Component{constructor(e,t){super(e,t),this.context=null,this.state={donutCenterStyles:null},this.chartObserver=new n.InstanceObserver(this,{render:"onRender"}),t.observersStore.dispatch({type:"add",payload:this.chartObserver})}render(){const{render:e}=this.props,{donutCenterStyles:t}=this.state;let s=null;return e&&t&&(s=h.createElement("div",{className:"k-chart-donut-center",style:t},h.createElement(e,null))),s}onRender(e){var t;const s=null==(t=this.context)?void 0:t.optionsStore.getState().series,r=Array.isArray(s)?s[0]:null,n=e.sender._plotArea.charts;if(!r||"donut"!==r.type||0===n[0].points.length)return;const a=n[0].points[0].sector,i=a.innerRadius,o=a.center.y-i,l=a.center.x-i,c=2*i;this.setState({donutCenterStyles:{height:c,left:l,top:o,width:c}})}};be.contextType=te;let Ce=be,xe=class extends h.Component{constructor(){super(...arguments),this._baseChart=null,this.getTarget=()=>this}get chartInstance(){return null!==this._baseChart?this._baseChart.chartInstance:null}get surface(){return null!==this._baseChart?this._baseChart.surface:null}get element(){return null!==this._baseChart?this._baseChart.element:null}render(){const{donutCenterRender:e,children:t,className:s,...r}=this.props;return h.createElement(fe,{...r,ref:e=>this._baseChart=e,chartConstructor:n.Chart,getTarget:this.getTarget,wrapper:"div",className:a.classNames("k-chart k-widget",s)},t,h.createElement(Ce,{render:e}))}},Se=class extends h.Component{constructor(){super(...arguments),this._baseChart=null,this.deriveOptionsFromParent=e=>{const{type:t,data:s}=this.props,r=Object.assign({},e,{type:t,data:s});return n.Sparkline.normalizeOptions(r)},this.getTarget=()=>this}get chartInstance(){return null!==this._baseChart?this._baseChart.chartInstance:null}get surface(){return null!==this._baseChart?this._baseChart.surface:null}get element(){return null!==this._baseChart?this._baseChart.element:null}render(){const{children:e,type:t,className:s,...r}=this.props;return h.createElement(fe,{...r,ref:e=>this._baseChart=e,chartConstructor:n.Sparkline,getTarget:this.getTarget,wrapper:"span",deriveOptionsFromParent:this.deriveOptionsFromParent,className:a.classNames("k-sparkline k-widget",s)},e)}};const Ee={autoBindElements:!0,liveDrag:!1,partialRedraw:!0};let ke=class extends h.Component{constructor(){super(...arguments),this._baseChart=null,this.deriveOptionsFromParent=e=>{const t=Object.assign({},e.navigator||{},Ee);return Object.assign({},e,{navigator:t})},this.onRefresh=(e,t,s)=>{this.props.partialRedraw?(s.applyOptions(e),s.bindCategories(),s.navigator.redrawSlaves()):s.setOptions(e,t)},this.getTarget=()=>this}get chartInstance(){return null!==this._baseChart?this._baseChart.chartInstance:null}get surface(){return null!==this._baseChart?this._baseChart.surface:null}get element(){return null!==this._baseChart?this._baseChart.element:null}render(){const{children:e,className:t,...s}=this.props;return h.createElement(fe,{...s,ref:e=>this._baseChart=e,chartConstructor:n.StockChart,getTarget:this.getTarget,wrapper:"div",deriveOptionsFromParent:this.deriveOptionsFromParent,onRefresh:this.onRefresh,className:a.classNames("k-stockchart k-widget",t)},e)}};const Ie=class extends h.Component{constructor(e,t){super(e,t),this.optionsStore=t.optionsStore}renderChildren(e,t){const{children:s}=e.props,{_chartKey:r,_parentStore:n}=this.props,a={...e.props,_chartCollectionIdxKey:`${r}_${t}`,_parentStore:n};return h.cloneElement(e,a,s)}render(){const{_chartKey:e,_parentStore:t,children:s}=this.props;return(t||this.optionsStore).dispatch({chartKey:e,payload:[]}),h.Children.map(s,((e,t)=>h.isValidElement(e)?this.renderChildren(e,t):e))}};Ie.contextType=te;let we=Ie;const _e=class extends h.Component{constructor(e,t){super(e,t),this.optionsStore=t.optionsStore,this.childStore=Y(W)}render(){const{children:e}=this.props;return void 0!==e?h.Children.map(e,(e=>h.isValidElement(e)?this.renderChildren(e):e)):null}componentDidMount(){this.dispatch()}componentDidUpdate(){this.dispatch()}dispatch(){const{_chartKey:e,_chartCollectionIdxKey:t,_parentStore:s,children:r,...n}=this.props;(s||this.optionsStore).dispatch({chartKey:e,chartCollectionIdxKey:t,payload:Object.assign({},n,this.childStore.getState())})}renderChildren(e){const{children:t}=e.props,s={...e.props,_parentStore:this.childStore};return h.cloneElement(e,s,t)}};_e.contextType=te;let De=_e,Ne=class{constructor(e){this.currentState=e.currentState,this.nextState=e.nextState}};const Te=h.forwardRef(((e,t)=>{const s=h.useRef(null),r=h.useRef(null);h.useImperativeHandle(s,(()=>({element:r.current,props:e}))),h.useImperativeHandle(t,(()=>s.current));let n=[{id:"0",...e.rootItem||{text:"Home",icon:h.createElement(a.SvgIcon,{icon:l.homeIcon,style:{marginInlineEnd:"4px"}})}}];e.drilldownState&&(n=[...n,...e.drilldownState.steps.map(((e,t)=>({id:(t+1).toString(),text:e.drilldownValue})))]);const i={...e,data:n};return h.createElement("div",null,h.createElement(o.Breadcrumb,{...i,onItemSelect:t=>{var s;const r="onDrilldownStateChange";if(e.hasOwnProperty(r)){const a=n.findIndex((e=>e.id===t.id)),i={steps:((null==(s=e.drilldownState)?void 0:s.steps)||[]).slice(0,a)},o=new Ne({currentState:e.drilldownState,nextState:i});e[r].call(void 0,o)}}}))})),Ae={id:s.string,style:s.object,className:s.string,breadcrumbOrderedList:s.elementType,breadcrumbListItem:s.elementType,breadcrumbDelimiter:s.elementType,breadcrumbLink:s.elementType,dir:s.oneOf(["ltr","rtl"]),disabled:s.bool,valueField:s.string,textField:s.string,iconField:s.string,iconClassField:s.string,onItemSelect:s.func,ariaLabel:s.string,onDrilldownStateChange:s.func,drilldownState:s.shape({steps:s.array}),rootItem:s.object};Te.displayName="KendoReactChartBreadcrumb",Te.propTypes=Ae,Te.defaultProps={valueField:"id",textField:"text",iconField:"icon",iconClassField:"iconClass",data:[]};const Oe=e=>h.createElement(De,{...e,_chartKey:"title"});Oe.displayName="ChartAxisDefaultsTitle";const Ke=e=>h.createElement(De,{...e,_chartKey:"labels"});Ke.displayName="ChartAxisDefaultsLabels";const Le=e=>h.createElement(De,{visible:!0,...e,_chartKey:"crosshair"});Le.displayName="ChartAxisDefaultsCrosshair";const Re=e=>h.createElement(De,{visible:!0,...e,_chartKey:"tooltip"});Re.displayName="ChartAxisDefaultsCrosshairTooltip";const Pe=e=>h.createElement(De,{...e,_chartKey:"title"});Pe.displayName="ChartCategoryAxisTitle";const Fe=e=>h.createElement(De,{...e,_chartKey:"title"});Fe.displayName="ChartPaneDefaultsTitle";const qe=e=>h.createElement(De,{...e,_chartKey:"item"});qe.displayName="ChartLegendItem";const je=e=>h.createElement(De,{...e,_chartKey:"title"});je.displayName="ChartLegendTitle";const He=e=>h.createElement(De,{...e,_chartKey:"inactiveItems"});He.displayName="ChartLegendInactiveItems";const Ve=e=>h.createElement(De,{...e,_chartKey:"title"});Ve.displayName="ChartValueAxisTitle";const Me=e=>h.createElement(De,{...e,_chartKey:"title"});Me.displayName="ChartXAxisTitle";const ze=e=>h.createElement(De,{...e,_chartKey:"title"});ze.displayName="ChartYAxisTitle";const Ue=e=>h.createElement(De,{...e,_chartKey:"categoryAxis"});Ue.displayName="ChartNavigatorCategoryAxis";const Be=e=>h.createElement(De,{...e,_chartKey:"pane"});Be.displayName="ChartNavigatorPane";const $e=e=>h.createElement(De,{...e});$e.displayName="ChartNavigatorSeriesItem";const Xe=e=>h.createElement(we,{...e,_chartKey:"series"});Xe.propTypes={children:function(e,t,s){return p(e,t,s,$e)}};const Ye=e=>h.createElement(De,{...e});Ye.displayName="ChartCategoryAxisItem";const We=e=>h.createElement(we,{...e,_chartKey:"categoryAxis"});We.propTypes={children:function(e,t,s){return p(e,t,s,Ye)}};const Ze=e=>h.createElement(De,{...e});Ze.displayName="ChartPane";const Ge=e=>h.createElement(De,{...e,_chartKey:"paneDefaults"});Ge.displayName="ChartPaneDefaults";const Je=e=>h.createElement(we,{...e,_chartKey:"panes"});Je.propTypes={children:function(e,t,s){return p(e,t,s,Ze)}};const Qe=e=>{let t=e=>h.createElement(h.Fragment,null);e.drilldownSeriesFactory&&(t=e.drilldownSeriesFactory);const s=t=>{var s,r;return t&&(null==(r=null==(s=t.drilldownState)?void 0:s.steps)?void 0:r.find((({seriesName:t})=>t===e.name)))};return h.createElement(te.Consumer,null,(r=>s(r)?h.createElement(t,{_chartCollectionIdxKey:e._chartCollectionIdxKey,drilldownValue:s(r).drilldownValue}):h.createElement(De,{...e})))};Qe.displayName="ChartSeriesItem";const et=e=>h.createElement(we,{...e,_chartKey:"series"});et.propTypes={children:function(e,t,s){return p(e,t,s,Qe)}};const tt=e=>h.createElement(De,{...e});tt.displayName="ChartValueAxisItem";const st=e=>h.createElement(we,{...e,_chartKey:"valueAxis"});st.propTypes={children:function(e,t,s){return p(e,t,s,tt)}};const rt=e=>h.createElement(De,{...e});rt.displayName="ChartXAxisItem";const nt=e=>h.createElement(we,{...e,_chartKey:"xAxis"});nt.prototype={children:function(e,t,s){return p(e,t,s,rt)}};const at=e=>h.createElement(De,{...e});at.displayName="ChartYAxisItem";const it=e=>h.createElement(we,{...e,_chartKey:"yAxis"});it.propTypes={children:function(e,t,s){return p(e,t,s,at)}};const ot=e=>`${e.fontWeight} ${e.fontSize} ${e.fontFamily}`,lt=e=>window.getComputedStyle(e).backgroundColor,ct=`\n <div class="k-var--background"></div>\n <div class="k-var--normal-text-color"></div>\n <div class="k-var--kendo-color-subtle"></div>\n\n <div class="k-widget k-chart">\n <div class="k-var--chart-font"></div>\n <div class="k-var--chart-title-font"></div>\n </div>\n <div class="k-var--series-unset"></div>\n <div class="k-var--series">\n ${(()=>{let e='\n <div class="k-var--series-a"></div>\n <div class="k-var--series-b"></div>\n <div class="k-var--series-c"></div>\n <div class="k-var--series-d"></div>\n <div class="k-var--series-e"></div>\n <div class="k-var--series-f"></div>\n';for(let t=0;t<30;t++)e+=`\n <div class="k-var--series-${t+1}"></div>`;return e})()}\n </div>\n`;class ht{constructor(e){this.store=e}setStyle(e,t){const s=e.split(".");let r=this.store;s.forEach(((e,t,s)=>{t<s.length-1&&(r=r[e]=r[e]||{})}));const n=s.pop();n&&(r[n]=t)}setColors(){this.mapColor("labels.color","normal-text-color"),this.mapColor("labels.stroke.color","background");this.element.querySelector(".k-var--kendo-color-subtle").style.color="var(--kendo-color-subtle)",this.mapColor("links.color","kendo-color-subtle","color"),this.mapColor("legend.labels.color","normal-text-color"),this.mapColor("title.color","normal-text-color")}setFonts(){const e=ot(this.queryStyle("chart-title-font")),t=ot(this.queryStyle("chart-font"));this.setStyle("title.font",e),this.setStyle("labels.font",t),this.setStyle("legend.labels.font",t)}setNodeColors(){const e=this.element;if(!e)return;const t=[].slice.call(e.querySelectorAll(".k-var--series div")),s=lt(e.querySelector(".k-var--series-unset")),r=t.reduce(((e,t)=>{const r=(e=>{const t=e.match(/series-([a-z])$/);if(null!==t)return(e=>e.toLowerCase().charCodeAt(0)-97)(t[1]);const s=e.split("--series-")[1];return parseInt(s,10)-1})(t.className),n=lt(t);return n!==s&&(e[r]=n),e}),[]);this.setStyle("nodeColors",r)}mapColor(e,t,s="backgroundColor"){this.setStyle(e,this.queryStyle(t)[s])}queryStyle(e){const t=this.element;return window.getComputedStyle(t.querySelector(`.k-var--${e}`))}}const dt=(e,t)=>{const s={nodeColors:[]},r=new ht(s),n=r.element=e.createElement("div");n.style.display="none",n.innerHTML=ct,e.body.appendChild(n);try{r.setColors(),r.setFonts(),r.setNodeColors()}finally{e.body.removeChild(r.element),r.element=null,t(s)}},pt=s.exact({left:s.number,top:s.number}),ut={left:s.number,right:s.number},mt={...ut,top:s.number,bottom:s.number},vt=s.oneOfType([s.number,s.exact(mt)]),yt=vt,gt=s.exact({width:s.number,color:s.string,opacity:s.number,dashType:s.string}),ft={visible:s.bool,font:s.string,color:s.string,opacity:s.number,align:s.oneOf(["left","right","center"]),position:s.oneOf(["inside","before","after"]),padding:yt,margin:s.exact(ut),border:gt,offset:pt},bt={color:s.string,opacity:s.number,offset:pt,padding:s.number,width:s.number},Ct={colorType:s.oneOf(["static","source","target"]),color:s.string,opacity:s.number,highlight:s.exact({opacity:s.number,inactiveOpacity:s.number})},xt=s.exact({text:s.string,...ft}),St=s.exact({id:s.oneOfType([s.string,s.number]).isRequired,label:xt.isRequired,...bt}),Et=s.exact({sourceId:s.oneOfType([s.string,s.number]).isRequired,targetId:s.oneOfType([s.string,s.number]).isRequired,value:s.number.isRequired,...Ct}),kt={data:s.exact({nodes:s.arrayOf(St.isRequired).isRequired,links:s.arrayOf(Et.isRequired).isRequired}).isRequired,links:s.exact(Ct),nodes:s.exact(bt),labels:s.exact(ft),legend:s.exact({align:s.oneOf(["start","center","end"]),background:s.string,border:gt,height:s.number,labels:s.object,margin:vt,offsetX:s.number,offsetY:s.number,orientation:s.oneOf(["vertical","horizontal"]),padding:yt,position:s.oneOf(["top","bottom","left","right","custom"]),reverse:s.bool,visible:s.bool,width:s.number,item:s.object,title:s.object}),title:s.exact({align:s.oneOf(["center","left","right"]),background:s.string,border:gt,color:s.string,font:s.string,margin:vt,padding:yt,position:s.oneOf(["top","bottom"]),text:s.string,visible:s.bool}),tooltip:s.exact({visible:s.bool,offset:s.number,followPointer:s.bool,delay:s.number,linkComponent:s.any,nodeComponent:s.any}),className:s.string,style:s.object,disableAutoLayout:s.bool,onNodeEnter:s.func,onNodeLeave:s.func,onLinkEnter:s.func,onLinkLeave:s.func,onNodeClick:s.func,onLinkClick:s.func},It="sankey.tooltipUnitFormat",wt={[It]:"({0} units)"},_t=e=>{const{Content:t,offset:s,event:{tooltipData:r,dataItem:n,nodeValue:a}}=e,i=h.useRef(null);return h.useEffect((()=>{const e=i.current;if(!r||!e)return;const t=e.offsetWidth,n=e.offsetHeight,a={...r.popupOffset},o=r.popupAlign;a.left+="left"===o.horizontal?s:-1*s,"right"===o.horizontal&&(a.left-=t),"bottom"===o.vertical?a.top-=n+s:a.top+=s,e.style.left=`${a.left}px`,e.style.top=`${a.top}px`,e.style.visibility=""}),[r]),h.createElement("div",{ref:i,style:{visibility:"hidden"},className:"k-tooltip k-sankey-tooltip k-chart-tooltip k-chart-shared-tooltip"},h.createElement("div",{className:"k-tooltip-content"},h.createElement(t,{dataItem:n,nodeValue:a})))},Dt={display:"flex",alignItems:"center"},Nt=e=>h.createElement("div",{style:{width:15,height:15,backgroundColor:e.color,display:"inline-flex",marginLeft:3}}),Tt=e=>h.createElement("span",{style:{margin:"0 3px"}},e.children),At=e=>r.useInternationalization().format(r.useLocalization().toLanguageString(It,wt[It]),[e||0]),Ot=e=>{const{color:t,label:s}=e.dataItem;return h.createElement("div",{style:Dt,className:"k-tooltip-content"},h.createElement(Nt,{color:t}),h.createElement(Tt,null,s.text),h.createElement(Tt,null,At(e.nodeValue)))},Kt=e=>{const{source:t,target:s,value:r}=e.dataItem;return h.createElement("div",{style:Dt},h.createElement(Nt,{color:t.color}),h.createElement(Tt,null,t.label.text),h.createElement(a.IconWrap,{icon:l.arrowRightIcon,name:"arrow-right"}),h.createElement(Nt,{color:s.color}),h.createElement(Tt,null,s.label.text),h.createElement(Tt,null,At(r)))},Lt=12,Rt={offset:Lt,visible:!0},Pt=["nodeEnter","nodeLeave","linkEnter","linkLeave","nodeClick","linkClick"],Ft=h.forwardRef(((e,t)=>{a.validatePackage(ye);const s=h.useRef(null),r=h.useRef(null),i=h.useRef(null),{data:o,links:l,nodes:c,labels:d,title:p,legend:u,tooltip:m=Rt,disableAutoLayout:v}=e,y=h.useRef();y.current=e;const[g,f]=h.useState(null),b=h.useCallback((e=>{const{visible:t,offset:s=Lt,nodeComponent:r=Ot,linkComponent:n=Kt}={...Rt,...m};if(t){const t={event:e,offset:s,Content:"node"===e.targetType?r:n};f(t)}}),[m]),C=h.useCallback((()=>{f(null)}),[]),x=h.useCallback(((e,t)=>{const s=y.current[e];if(s){const e={...t,nativeEvent:t.originalEvent,target:i.current};s.call(void 0,e)}}),[]);return h.useEffect((()=>{const e={data:o,links:l,nodes:c,labels:d,title:p,legend:u,disableAutoLayout:v,tooltip:{...Rt,...m}};return r.current?r.current.setOptions(e):a.canUseDOM&&s.current&&dt(s.current.ownerDocument,(t=>{r.current=new n.Sankey(s.current,e,t),((e,t)=>{e&&(e.unbind(),Pt.forEach((s=>{t[s]&&e.bind(s,t[s])})))})(r.current,{nodeEnter:e=>{x("onNodeEnter",e)},nodeLeave:e=>{x("onNodeLeave",e)},linkEnter:e=>{x("onLinkEnter",e)},linkLeave:e=>{x("onLinkLeave",e)},nodeClick:e=>{x("onNodeClick",e)},linkClick:e=>{x("onLinkClick",e)}}),r.current.bind("tooltipShow",b),r.current.bind("tooltipHide",C)})),()=>{r.current&&(r.current.destroy(),r.current=null)}}),[o,l,c,d,p,u,v,m,C,b,x]),h.useImperativeHandle(i,(()=>({get element(){return s.current},exportVisual:e=>r.current.exportVisual(e),props:e})),[]),h.useImperativeHandle(t,(()=>i.current)),h.createElement(h.Fragment,null,h.createElement("div",{ref:s,className:e.className,style:e.style}),g&&h.createElement(_t,{...g}))}));Ft.propTypes=kt,Ft.displayName="KendoReactSankey";const qt=n.createSankeyData;e.AxisLabelClickEvent=b,e.Chart=xe,e.ChartArea=e=>h.createElement(De,{...e,_chartKey:"chartArea"}),e.ChartAxisDefaults=e=>h.createElement(De,{...e,_chartKey:"axisDefaults"}),e.ChartAxisDefaultsCrosshair=Le,e.ChartAxisDefaultsCrosshairTooltip=Re,e.ChartAxisDefaultsLabels=Ke,e.ChartAxisDefaultsTitle=Oe,e.ChartBreadcrumb=Te,e.ChartCategoryAxis=We,e.ChartCategoryAxisCrosshair=e=>h.createElement(De,{visible:!0,...e,_chartKey:"crosshair"}),e.ChartCategoryAxisCrosshairTooltip=e=>h.createElement(De,{visible:!0,...e,_chartKey:"tooltip"}),e.ChartCategoryAxisItem=Ye,e.ChartCategoryAxisLabels=e=>h.createElement(De,{visible:!0,...e,_chartKey:"labels"}),e.ChartCategoryAxisNotes=e=>h.createElement(De,{...e,_chartKey:"notes"}),e.ChartCategoryAxisNotesIcon=e=>h.createElement(De,{...e,_chartKey:"icon"}),e.ChartCategoryAxisNotesLabel=e=>h.createElement(De,{...e,_chartKey:"label"}),e.ChartCategoryAxisRangeLabels=e=>h.createElement(De,{visible:!0,...e,_chartKey:"rangeLabels"}),e.ChartCategoryAxisTitle=Pe,e.ChartLegend=e=>h.createElement(De,{visible:!0,...e,_chartKey:"legend"}),e.ChartLegendInactiveItems=He,e.ChartLegendItem=qe,e.ChartLegendTitle=je,e.ChartNavigator=e=>h.createElement(De,{visible:!0,position:"bottom",...e,_chartKey:"navigator"}),e.ChartNavigatorCategoryAxis=Ue,e.ChartNavigatorHint=e=>h.createElement(De,{...e,_chartKey:"hint"}),e.ChartNavigatorPane=Be,e.ChartNavigatorSelect=e=>h.createElement(De,{...e,_chartKey:"select"}),e.ChartNavigatorSeries=Xe,e.ChartNavigatorSeriesItem=$e,e.ChartPane=Ze,e.ChartPaneDefaults=Ge,e.ChartPaneDefaultsTitle=Fe,e.ChartPanes=Je,e.ChartPlotArea=e=>h.createElement(De,{...e,_chartKey:"plotArea"}),e.ChartSeries=et,e.ChartSeriesDefaults=e=>h.createElement(De,{...e,_chartKey:"seriesDefaults"}),e.ChartSeriesErrorBars=e=>h.createElement(De,{...e,_chartKey:"errorBars"}),e.ChartSeriesExtremes=e=>h.createElement(De,{...e,_chartKey:"extremes"}),e.ChartSeriesHighlight=e=>h.createElement(De,{...e,_chartKey:"highlight"}),e.ChartSeriesItem=Qe,e.ChartSeriesItemOutliers=e=>h.createElement(De,{...e,_chartKey:"outliers"}),e.ChartSeriesItemTooltip=e=>h.createElement(De,{...e,_chartKey:"tooltip"}),e.ChartSeriesLabels=e=>h.createElement(De,{visible:!0,...e,_chartKey:"labels"}),e.ChartSeriesLabelsFrom=e=>h.createElement(De,{...e,_chartKey:"from"}),e.ChartSeriesLabelsTo=e=>h.createElement(De,{...e,_chartKey:"to"}),e.ChartSeriesMarkers=e=>h.createElement(De,{...e,_chartKey:"markers"}),e.ChartSeriesNotes=e=>h.createElement(De,{...e,_chartKey:"notes"}),e.ChartSeriesNotesIcon=e=>h.createElement(De,{...e,_chartKey:"icon"}),e.ChartSeriesNotesLabel=e=>h.createElement(De,{...e,_chartKey:"label"}),e.ChartSubtitle=e=>h.createElement(De,{...e,_chartKey:"subtitle"}),e.ChartTitle=e=>h.createElement(De,{...e,_chartKey:"title"}),e.ChartTooltip=e=>h.createElement(De,{visible:!0,...e,_chartKey:"tooltip"}),e.ChartValueAxis=st,e.ChartValueAxisCrosshair=e=>h.createElement(De,{visible:!0,...e,_chartKey:"crosshair"}),e.ChartValueAxisCrosshairTooltip=e=>h.createElement(De,{visible:!0,...e,_chartKey:"tooltip"}),e.ChartValueAxisItem=tt,e.ChartValueAxisLabels=e=>h.createElement(De,{visible:!0,...e,_chartKey:"labels"}),e.ChartValueAxisNotes=e=>h.createElement(De,{...e,_chartKey:"notes"}),e.ChartValueAxisNotesIcon=e=>h.createElement(De,{...e,_chartKey:"icon"}),e.ChartValueAxisNotesLabel=e=>h.createElement(De,{...e,_chartKey:"label"}),e.ChartValueAxisTitle=Ve,e.ChartXAxis=nt,e.ChartXAxisCrosshair=e=>h.createElement(De,{visible:!0,...e,_chartKey:"crosshair"}),e.ChartXAxisCrosshairTooltip=e=>h.createElement(De,{visible:!0,...e,_chartKey:"tooltip"}),e.ChartXAxisItem=rt,e.ChartXAxisLabels=e=>h.createElement(De,{visible:!0,...e,_chartKey:"labels"}),e.ChartXAxisNotes=e=>h.createElement(De,{...e,_chartKey:"notes"}),e.ChartXAxisNotesIcon=e=>h.createElement(De,{...e,_chartKey:"icon"}),e.ChartXAxisNotesLabel=e=>h.createElement(De,{...e,_chartKey:"label"}),e.ChartXAxisTitle=Me,e.ChartYAxis=it,e.ChartYAxisCrosshair=e=>h.createElement(De,{visible:!0,...e,_chartKey:"crosshair"}),e.ChartYAxisCrosshairTooltip=e=>h.createElement(De,{visible:!0,...e,_chartKey:"tooltip"}),e.ChartYAxisItem=at,e.ChartYAxisLabels=e=>h.createElement(De,{visible:!0,...e,_chartKey:"labels"}),e.ChartYAxisNotes=e=>h.createElement(De,{...e,_chartKey:"notes"}),e.ChartYAxisNotesIcon=e=>h.createElement(De,{...e,_chartKey:"icon"}),e.ChartYAxisNotesLabel=e=>h.createElement(De,{...e,_chartKey:"label"}),e.ChartYAxisTitle=ze,e.ChartZoomable=e=>h.createElement(De,{...e,_chartKey:"zoomable"}),e.CollectionConfigurationComponent=we,e.ConfigurationComponent=De,e.CrosshairTooltip=he,e.CrosshairTooltipContainer=ve,e.DonutCenter=Ce,e.DragEndEvent=S,e.DragEvent=x,e.DragStartEvent=E,e.DrilldownEvent=k,e.DrilldownStateChangeEvent=Ne,e.LegendItemClickEvent=w,e.LegendItemHoverEvent=I,e.NavigatorFilterEvent=_,e.NoteClickEvent=D,e.NoteHoverEvent=N,e.PlotAreaClickEvent=T,e.PlotAreaHoverEvent=A,e.RenderEvent=O,e.Sankey=Ft,e.SelectEndEvent=L,e.SelectEvent=K,e.SelectStartEvent=R,e.SeriesClickEvent=P,e.SeriesHoverEvent=F,e.SeriesTooltip=oe,e.SharedTooltipContent=ee,e.Sparkline=Se,e.StockChart=ke,e.TooltipPoint=Q,e.TooltipPopup=ae,e.ZoomEndEvent=j,e.ZoomEvent=q,e.ZoomStartEvent=H,e.createSankeyData=qt,e.exportVisual=(e,t={})=>{if(e&&null!==e.chartInstance)return e.chartInstance.exportVisual(t)},e.findAxisByName=(e,t)=>{if(e&&null!==e.chartInstance)return e.chartInstance.findAxisByName(t)},e.findPaneByIndex=(e,t)=>{if(e&&null!==e.chartInstance)return e.chartInstance.findPaneByIndex(t)},e.findPaneByName=(e,t)=>{if(e&&null!==e.chartInstance)return e.chartInstance.findPaneByName(t)}}));
|
|
8
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("prop-types"),require("@progress/kendo-react-intl"),require("@progress/kendo-charts"),require("@progress/kendo-react-common"),require("@progress/kendo-react-popup"),require("@progress/kendo-react-layout"),require("@progress/kendo-svg-icons")):"function"==typeof define&&define.amd?define(["exports","react","prop-types","@progress/kendo-react-intl","@progress/kendo-charts","@progress/kendo-react-common","@progress/kendo-react-popup","@progress/kendo-react-layout","@progress/kendo-svg-icons"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactCharts={},e.React,e.PropTypes,e.KendoReactIntl,e.KendoCharts,e.KendoReactCommon,e.KendoReactPopup,e.KendoReactLayout,e.KendoSvgIcons)}(this,(function(e,t,r,s,n,a,o,i,l){"use strict";function c(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var h=c(t);function d(e,t){let r=e;for(;r&&r!==t;)r=r.parentNode;return!!r}function p(e,t,r,s){const n=e[t];if(n&&Array.isArray(n))for(let e of n)if(!e.type||e.type!==s)return new Error(`${r} children should be Array of type ${s.displayName}.`);return null}const u=e=>void 0!==e&&!e;let m=class{constructor(e){this.target=e}},v=class extends m{constructor(e,t){super(t),this.axis=e.axis,this.dataItem=e.dataItem,this.index=e.index,this.text=e.text,this.value=e.value}},y=class extends m{constructor(){super(...arguments),this.prevented=!1}preventDefault(){this.prevented=!0}isDefaultPrevented(){return this.prevented}},g=class extends y{constructor(e,t){super(t),this.axisRanges=e.axisRanges,this.nativeEvent=e.originalEvent}},f=class extends m{constructor(e,t){super(t),this.axisRanges=e.axisRanges,this.nativeEvent=e.originalEvent}},C=class extends y{constructor(e,t){super(t),this.axisRanges=e.axisRanges,this.nativeEvent=e.originalEvent}},b=class extends m{constructor(e,t){super(t),this.value=e.value,this.point=e.point,this.series=e.series,this.currentState=e.currentState,this.nextState=e.nextState}},x=class extends y{constructor(e,t){super(t),this.series=e.series,this.seriesIndex=e.seriesIndex,this.pointIndex=e.pointIndex,this.text=e.text}preventDefault(){super.preventDefault()}},S=class extends y{constructor(e,t){super(t),this.series=e.series,this.seriesIndex=e.seriesIndex,this.pointIndex=e.pointIndex,this.text=e.text}preventDefault(){super.preventDefault()}},E=class extends m{constructor(e,t){super(t),this.from=e.from,this.to=e.to}},k=class extends m{constructor(e,t){super(t),this.category=e.category,this.dataItem=e.dataItem,this.series=e.series,this.value=e.value,this.visual=e.visual}},I=class extends m{constructor(e,t){super(t),this.category=e.category,this.dataItem=e.dataItem,this.series=e.series,this.value=e.value,this.visual=e.visual}},w=class extends m{constructor(e,t){super(t),this.category=e.category,this.nativeEvent=e.originalEvent,this.value=e.value,this.x=e.x,this.y=e.y}},_=class extends m{constructor(e,t){super(t),this.category=e.category,this.nativeEvent=e.originalEvent,this.value=e.value,this.x=e.x,this.y=e.y}},N=class extends m{constructor(e,t){super(t)}},D=class extends y{constructor(e,t){super(t),this.axis=e.axis,this.from=e.from,this.to=e.to}},T=class extends m{constructor(e,t){super(t),this.axis=e.axis,this.from=e.from,this.to=e.to}},A=class extends y{constructor(e,t){super(t),this.axis=e.axis,this.from=e.from,this.to=e.to}},K=class extends m{constructor(e,t){super(t),this.category=e.category,this.dataItem=e.dataItem,this.nativeEvent=e.originalEvent,this.percentage=e.percentage,this.point=e.point,this.series=e.series,this.stackValue=e.stackValue,this.value=e.value}},O=class extends y{constructor(e,t){super(t),this.category=e.category,this.categoryPoints=e.categoryPoints,this.dataItem=e.dataItem,this.nativeEvent=e.originalEvent,this.percentage=e.percentage,this.point=e.point,this.series=e.series,this.stackValue=e.stackValue,this.value=e.value}},L=class extends y{constructor(e,t){super(t),this.axisRanges=e.axisRanges,this.delta=e.delta,this.nativeEvent=e.originalEvent}},R=class extends m{constructor(e,t){super(t),this.axisRanges=e.axisRanges,this.nativeEvent=e.originalEvent}},P=class extends y{constructor(e,t){super(t),this.axisRanges=e.axisRanges,this.nativeEvent=e.originalEvent}};const F={axisLabelClick:v,drag:g,dragEnd:f,dragStart:C,drilldownEvent:b,legendItemHover:x,legendItemClick:S,legendItemLeave:class extends y{constructor(e,t){super(t),this.series=e.series,this.seriesIndex=e.seriesIndex,this.pointIndex=e.pointIndex,this.text=e.text}preventDefault(){super.preventDefault()}},navigatorFilter:E,noteClick:k,noteHover:I,plotAreaClick:w,plotAreaHover:_,render:N,select:D,selectEnd:T,selectStart:A,seriesClick:K,seriesHover:O,zoom:L,zoomEnd:R,zoomStart:P};let q=class{constructor(e,t){this.sender=e,this.syntheticEvent=t}};function j(e,t){return new q(e,t)}const V=e=>`${e.fontWeight} ${e.fontSize} ${e.fontFamily}`,H=e=>window.getComputedStyle(e).backgroundColor,M=`\n <div class="k-var--primary"></div>\n <div class="k-var--base"></div>\n <div class="k-var--background"></div>\n\n <div class="k-var--normal-background"></div>\n <div class="k-var--normal-text-color"></div>\n <div class="k-var--hover-background"></div>\n <div class="k-var--hover-text-color"></div>\n <div class="k-var--selected-background"></div>\n <div class="k-var--selected-text-color"></div>\n <div class="k-var--chart-error-bars-background"></div>\n <div class="k-var--chart-notes-background"></div>\n <div class="k-var--chart-notes-border"></div>\n <div class="k-var--chart-notes-lines"></div>\n <div class="k-var--chart-crosshair-background"></div>\n\n <div class="k-var--chart-inactive"></div>\n <div class="k-var--chart-major-lines"></div>\n <div class="k-var--chart-minor-lines"></div>\n <div class="k-var--chart-area-opacity"></div>\n <div class="k-var--chart-area-inactive-opacity"></div>\n <div class="k-var--chart-line-inactive-opacity"></div>\n\n <div class="k-widget k-chart">\n <div class="k-var--chart-font"></div>\n <div class="k-var--chart-title-font"></div>\n <div class="k-var--chart-pane-title-font"></div>\n <div class="k-var--chart-label-font"></div>\n </div>\n\n <div class="k-var--series-unset"></div>\n <div class="k-var--series">\n ${(()=>{let e='\n <div class="k-var--series-a"></div>\n <div class="k-var--series-b"></div>\n <div class="k-var--series-c"></div>\n <div class="k-var--series-d"></div>\n <div class="k-var--series-e"></div>\n <div class="k-var--series-f"></div>\n';for(let t=0;t<30;t++)e+=`\n <div class="k-var--series-${t+1}"></div>`;return e})()}\n </div>\n`;class U{constructor(e){this.store=e}setStyle(e,t){this.store.dispatch({type:"set",payload:{field:e,value:t}})}setColors(){this.mapColor("axisDefaults.crosshair.color","chart-crosshair-background"),this.mapColor("axisDefaults.labels.color","normal-text-color"),this.mapColor("axisDefaults.line.color","chart-major-lines"),this.mapColor("axisDefaults.majorGridLines.color","chart-major-lines"),this.mapColor("axisDefaults.minorGridLines.color","chart-minor-lines"),this.mapColor("axisDefaults.notes.icon.background","chart-notes-background"),this.mapColor("axisDefaults.notes.icon.border.color","chart-notes-border"),this.mapColor("axisDefaults.notes.line.color","chart-notes-lines"),this.mapColor("axisDefaults.title.color","normal-text-color"),this.mapColor("chartArea.background","background"),this.mapColor("legend.inactiveItems.labels.color","chart-inactive"),this.mapColor("legend.inactiveItems.markers.color","chart-inactive"),this.mapColor("legend.labels.color","normal-text-color"),this.mapColor("seriesDefaults.boxPlot.downColor","chart-major-lines"),this.mapColor("seriesDefaults.boxPlot.mean.color","base"),this.mapColor("seriesDefaults.boxPlot.median.color","base"),this.mapColor("seriesDefaults.boxPlot.whiskers.color","primary"),this.mapColor("seriesDefaults.bullet.target.color","normal-text-color"),this.mapColor("seriesDefaults.candlestick.downColor","normal-text-color"),this.mapColor("seriesDefaults.candlestick.line.color","normal-text-color"),this.mapColor("seriesDefaults.errorBars.color","chart-error-bars-background"),this.mapColor("seriesDefaults.horizontalWaterfall.line.color","chart-major-lines"),this.mapColor("seriesDefaults.icon.border.color","chart-major-lines"),this.mapColor("seriesDefaults.labels.background","background"),this.mapColor("seriesDefaults.labels.color","normal-text-color"),this.mapColor("seriesDefaults.notes.icon.background","chart-notes-background"),this.mapColor("seriesDefaults.notes.icon.border.color","chart-notes-border"),this.mapColor("seriesDefaults.notes.line.color","chart-notes-lines"),this.mapColor("seriesDefaults.verticalBoxPlot.downColor","chart-major-lines"),this.mapColor("seriesDefaults.verticalBoxPlot.mean.color","base"),this.mapColor("seriesDefaults.verticalBoxPlot.median.color","base"),this.mapColor("seriesDefaults.verticalBoxPlot.whiskers.color","primary"),this.mapColor("seriesDefaults.verticalBullet.target.color","normal-text-color"),this.mapColor("seriesDefaults.waterfall.line.color","chart-major-lines"),this.mapColor("title.color","normal-text-color"),this.mapColor("subtitle.color","normal-text-color");const e=parseFloat(this.queryStyle("chart-area-opacity").opacity);isNaN(e)||(this.setStyle("seriesDefaults.area.opacity",e),this.setStyle("seriesDefaults.radarArea.opacity",e),this.setStyle("seriesDefaults.verticalArea.opacity",e),this.setStyle("seriesDefaults.labels.opacity",e)),this.setInactiveOpacity(["area","verticalArea"],"chart-area-inactive-opacity"),this.setInactiveOpacity(["line","verticalLine"],"chart-line-inactive-opacity")}setFonts(){const e=V(this.queryStyle("chart-font")),t=V(this.queryStyle("chart-title-font")),r=V(this.queryStyle("chart-pane-title-font")),s=V(this.queryStyle("chart-label-font"));this.setStyle("axisDefaults.labels.font",s),this.setStyle("axisDefaults.notes.label.font",e),this.setStyle("axisDefaults.title.font",e),this.setStyle("legend.labels.font",e),this.setStyle("seriesDefaults.labels.font",s),this.setStyle("seriesDefaults.notes.label.font",e),this.setStyle("title.font",t),this.setStyle("subtitle.font",r),this.setStyle("paneDefaults.title.font",r)}setSeriesColors(){const e=this.element,t=[].slice.call(e.querySelectorAll(".k-var--series div")),r=H(e.querySelector(".k-var--series-unset")),s=t.reduce(((e,t)=>{const s=(e=>{const t=e.match(/series-([a-z])$/);if(null!==t)return(e=>e.toLowerCase().charCodeAt(0)-97)(t[1]);const r=e.split("--series-")[1];return parseInt(r,10)-1})(t.className),n=H(t);return n!==r&&(e[s]=n),e}),[]);this.setStyle("seriesColors",s)}mapColor(e,t){this.setStyle(e,this.queryStyle(t).backgroundColor)}queryStyle(e){const t=this.element;return window.getComputedStyle(t.querySelector(`.k-var--${e}`))}setInactiveOpacity(e,t){const r=parseFloat(this.queryStyle(t).opacity);!isNaN(r)&&r<1&&e.forEach((e=>this.setStyle(`seriesDefaults.${e}.highlight.inactiveOpacity`,r)))}}const z=e=>{let t,r,s=[];const n=n=>{t=e(t,n),a.canUseDOM&&(window.clearTimeout(r),r=window.setTimeout((()=>s.forEach((e=>e()))),16.666666666666668))};return n({}),{getState:()=>t,dispatch:n,subscribe:e=>(s.push(e),()=>s=s.filter((t=>t!==e)))}},B=(e,t)=>t.chartCollectionIdxKey?X.collectionConfigurationItem(e,t):t.chartKey?X.configurationItem(e,t):{},$=(e,t)=>{if(!t.type)return{};switch(t.type){case"set":return X.themeItem(e,t);case"push":return Object.assign(e,t.payload);default:return e}},W=(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}},X={configurationItem:(e,t)=>Object.assign(e,{[t.chartKey]:t.payload}),collectionConfigurationItem(e,t){let r=!1;const[s,n]=t.chartCollectionIdxKey.split("_"),a=e[s].map(((e,s)=>parseInt(n,10)===s?(r=!0,t.payload):e));return!1===r&&a.splice(parseInt(n,10),0,t.payload),Object.assign(e,{[s]:a})},themeItem(e,t){let r={},s=Object.assign(r,e);const{field:n,value:a}=t.payload,o=n.split(".");let i=o.shift();for(;o.length>0;)r=r[i]=r[i]||{},i=o.shift();return r[i]=a,s}};let Y=class{constructor(e,t){this.value=e.value,this.category=e.category,this.categoryIndex=e.categoryIx,this.series=e.series,this.dataItem=e.dataItem,this.percentage=e.percentage,this.runningTotal=e.runningTotal,this.total=e.total,this.low=e.low,this.high=e.high,this.xLow=e.xLow,this.xHigh=e.xHigh,this.yLow=e.yLow,this.yHigh=e.yHigh,this.point=e,this.format=((e.options||{}).tooltip||{}).format||t}get formattedValue(){return this.format?this.point.formatValue(this.format):String(this.value)}};const Z=e=>{const{categoryText:t,colorMarker:r,colspan:s,nameColumn:n,points:a}=e;return h.createElement("table",null,h.createElement("thead",null,h.createElement("tr",null,h.createElement("th",{colSpan:s},t))),h.createElement("tbody",null,a.map(((e,t)=>h.createElement("tr",{key:t},r&&h.createElement("td",null,h.createElement("span",{className:"k-chart-shared-tooltip-marker",style:{backgroundColor:e.series.color}})),n&&h.createElement("td",null,e.series.name),h.createElement("td",{dangerouslySetInnerHTML:{__html:e.formattedValue}}))))))},G=h.createContext(null);G.displayName="ChartContext";const J={horizontal:"fit",vertical:"fit"},Q="k-chart-tooltip",ee=class extends h.Component{constructor(e,t){super(e,t),this.context=null,this.element=null,this.onChartMouseLeave=e=>{const{syntheticEvent:t}=e;return!!d(t.relatedTarget,this.element)},this.onMouseLeave=e=>{const t=j(this,e);this.context.childrenObserver.trigger("onMouseLeave",t)&&e.preventDefault()},this.popupRef=e=>{this.element=e;const t=e&&e.closest(".k-animation-container");t&&(t.style.transition="initial")},this.chartObserver=new n.InstanceObserver(this,{onMouseLeave:"onChartMouseLeave"}),t.observersStore.dispatch({type:"add",payload:this.chartObserver})}render(){const{popupShown:e,popupAlign:t,popupOffset:r,popupStyles:s,popupContent:n,className:a}=this.props,i=[Q,a].join(" ").trim();return h.createElement(o.Popup,{animate:!1,popupAlign:t,offset:r,show:e,collision:J,className:"k-chart-tooltip-wrapper"},h.createElement("div",{className:i,style:s,onMouseLeave:this.onMouseLeave,ref:this.popupRef},n()))}componentWillUnmount(){this.context.observersStore.dispatch({type:"remove",payload:this.chartObserver})}};ee.contextType=G;let te=ee;const re=class extends h.Component{constructor(){super(...arguments),this.context=null,this.state={popupShown:!1},this.chartObserver=null}componentDidMount(){this.chartObserver=new n.InstanceObserver(this,{showTooltip:"onShowTooltip",hideTooltip:"onHideTooltip"}),this.context.observersStore.dispatch({type:"add",payload:this.chartObserver})}render(){const{popupContext:e,shared:t,className:r,...s}=this.state,n=this.state.popupShown?()=>{const r=this.findRenderFunction();if(t)return null!==r?r(e):h.createElement(Z,{...e});{const t=e.point,s=this.findRenderFunctionByIndex(t.series.index);return null!==s?s(e):null!==r?r(e):h.createElement("span",{dangerouslySetInnerHTML:{__html:e.point.formattedValue}})}}:Function.prototype,o=a.classNames({"k-chart-shared-tooltip":t,"k-chart-tooltip-inverse":!!r});return h.createElement(te,{...s,popupContent:n,className:o})}componentWillUnmount(){this.context.observersStore.dispatch({type:"remove",payload:this.chartObserver})}onShowTooltip(e){const{anchor:t,style:r,shared:s,className:n,crosshair:a}=e;let o;a||(o=s?this.createSharedTooltipContext(e):this.createTooltipContext(e),this.setState({popupShown:!0,popupAlign:t.align,popupOffset:t.point,popupContext:o,popupStyles:r,className:n,shared:s}))}onHideTooltip(){this.setState({popupShown:!1,popupStyles:{},className:void 0})}createSharedTooltipContext(e){const{points:t,categoryText:r}=e,s=t.filter((e=>void 0!==e.series.name)).length>0,n=e.series.length>1;let a=1;return s&&a++,n&&a++,{categoryText:r,colorMarker:n,colspan:a,nameColumn:s,points:e.points.map((t=>new Y(t,e.format)))}}createTooltipContext(e){const{point:t,format:r}=e;return{point:new Y(t,r)}}findRenderFunctionByIndex(e){const t=this.context.optionsStore.getState().series;return void 0!==t&&Array.isArray(t)&&void 0!==t[e]&&t[e].hasOwnProperty("tooltip")&&t[e].tooltip.hasOwnProperty("render")?t[e].tooltip.render:null}findRenderFunction(){const e=this.context.optionsStore.getState().tooltip;return void 0!==e&&e.hasOwnProperty("render")?e.render:null}};re.contextType=G;let se=re;const ne=e=>e.children;ne.displayName="Container";const ae=class extends h.Component{constructor(e,t){super(e,t),this.context=null,this.state={popupShown:!1},this.chartObserver=new n.InstanceObserver(this,{showTooltip:"onShowTooltip",hideTooltip:"onHideTooltip"}),t.observersStore.dispatch({type:"add",payload:this.chartObserver})}render(){const{popupContend:e,className:t,...r}=this.state,s=this.state.popupShown?()=>e:Function.prototype,n=a.classNames({"k-chart-crosshair-tooltip":!0,"k-chart-tooltip-inverse":!!t});return h.createElement(te,{...r,popupContent:s,className:n})}componentWillUnmount(){var e;null==(e=this.context)||e.observersStore.dispatch({type:"remove",payload:this.chartObserver})}onShowTooltip(e){const{anchor:t,style:r,className:s,crosshair:n,axisName:a,axisIndex:o,value:i}=e,{name:l,index:c}=this.props;n&&a===l&&o===c&&this.setState({popupShown:!0,popupAlign:t.align,popupOffset:t.point,popupContend:i,popupStyles:r,className:s})}onHideTooltip(){this.setState({popupShown:!1,popupStyles:{},className:void 0})}};ae.contextType=G;let oe=ae;const ie=["categoryAxis","valueAxis","xAxis","yAxis"];function le(e){const t={};for(let r=0;r<ie.length;r++){const s=ce(e,ie[r]);for(let e=0;e<s.length;e++){const r=s[e];t[r.name+r.index]=r}}return t}function ce(e,t){const r=[];if(e[t]){const s=[].concat(e[t]);for(let e=0;e<s.length;e++){const n=(s[e].crosshair||{}).tooltip;n&&n.visible&&r.push({index:e,name:t})}}return r}const he=class extends h.Component{constructor(){super(...arguments),this.context=null,this.state={tooltips:{}},this.storeUnsubscriber=Function.prototype,this.subscriber=()=>{var e;this.setState({tooltips:le(null==(e=this.context)?void 0:e.optionsStore.getState())})}}componentDidMount(){this.storeUnsubscriber=this.context.optionsStore.subscribe(this.subscriber)}render(){const{tooltips:e}=this.state,t=Object.keys(e).map((t=>h.createElement(oe,{...e[t],key:t})));return h.createElement(ne,null,t)}componentWillUnmount(){this.storeUnsubscriber()}};he.contextType=G;let de=he;const pe={name:"@progress/kendo-react-charts",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:0,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"},ue=class extends h.Component{constructor(e){super(e),this.chartInstance=null,this.surface=null,this._element=null,this.optionsStore={},this.optionsUnsubscriber=Function.prototype,this.themeStore={},this.themeUnsubscriber=Function.prototype,this.observersStore={},this.suppressTransitions=!1,this.showLicenseWatermark=!1,this.onRender=e=>{null!==this.chartInstance&&(this.surface=e.sender.surface,this.trigger("render",e))},this.onDrilldown=e=>{var t;const{series:r}=this.optionsStore.getState(),s=r.find((t=>t.name===e.series.name));if(!s.drilldownSeriesFactory)return!0;const n="onDrilldown";if(this.props.hasOwnProperty(n)){const r={seriesName:s.name,drilldownValue:e.value},a=[...(null==(t=this.props.drilldownState)?void 0:t.steps)||[],r],o=this.props.getTarget(),i={...e,currentState:this.props.drilldownState,nextState:{steps:a}},l=new b(i,o);this.props[n].call(void 0,l)}return!0},this.onLegendItemClick=e=>{if(null!==this.chartInstance)if(this.props.onLegendItemClick)this.trigger("legendItemClick",e);else{const{series:t}=this.optionsStore.getState();if(!t)return;let r={};const{seriesIndex:s,pointIndex:n}=e,a=t[s];if(void 0===n)r=Object.assign({},a,{visible:u(a.visible)});else{const e=a.pointVisibility=a.pointVisibility||[];e[n]=u(e[n]),r=Object.assign({},a)}this.optionsStore.dispatch({chartCollectionIdxKey:`series_${s}`,payload:r}),this.suppressTransitions=!0}},this.onWindowResize=()=>{null!==this.chartInstance&&this.chartInstance.resize()},this.onChartMouseLeave=e=>{const t=j(this,e);this.triggerDomEvent("onMouseLeave",t)?e.preventDefault():null!==this.chartInstance&&this.chartInstance.hideElements()},this.onChildMouseLeave=e=>{const{syntheticEvent:t}=e;return this.chartInstance&&!d(t.relatedTarget,this.element)&&this.chartInstance.hideElements(),!1},a.validatePackage(pe),this.showLicenseWatermark=a.shouldShowValidationUI(pe),this.optionsStore=z(B),this.observersStore=z(W),this.childrenObserver=new n.InstanceObserver(this,{onMouseLeave:"onChildMouseLeave"}),this.state={optionsStore:this.optionsStore,observersStore:this.observersStore,childrenObserver:this.childrenObserver,drilldownState:{steps:[]}},this.themeStore=z($),this.chartObserver=new n.InstanceObserver(this,{render:"onRender",legendItemClick:"onLegendItemClick",drilldown:"onDrilldown"})}get element(){return this._element}static getDerivedStateFromProps(e,t){return{...t,drilldownState:e.drilldownState||[]}}componentDidMount(){var e;const t=(null==(e=this._element)?void 0:e.ownerDocument)||document;((e,t,r)=>{const s=new U(e);if(void 0===r)return void e.dispatch({type:"push",payload:n.chartBaseTheme()});const a=s.element=r.createElement("div");a.style.display="none",a.innerHTML=M,r.body.appendChild(a);try{e.dispatch({type:"push",payload:n.chartBaseTheme()}),s.setColors(),s.setFonts(),s.setSeriesColors()}finally{r.body.removeChild(s.element),delete s.element,t()}})(this.themeStore,this.instantiateCoreChart.bind(this),t),this.optionsUnsubscriber=this.optionsStore.subscribe(this.refresh.bind(this)),this.themeUnsubscriber=this.themeStore.subscribe(this.refresh.bind(this)),window.addEventListener("resize",this.onWindowResize)}componentWillUnmount(){this.optionsUnsubscriber(),this.themeUnsubscriber(),null!==this.chartInstance&&(this.chartInstance.destroy(),this.chartInstance=null),window.removeEventListener("resize",this.onWindowResize)}componentDidUpdate(e){const{dir:t,children:r,...n}=this.props;if(null!==this.chartInstance){const r=s.provideIntlService(this),a=this.chartInstance.chartService,o=r.locale!==a._intlService.locale,i=Object.entries(e).filter((e=>"dir"!==e[0]&&"children"!==e[0])).some((e=>{const[t,r]=e;return!(n.hasOwnProperty(t)&&n[t]===r)}));o&&(this.chartInstance.chartService._intlService=r,this.chartInstance.chartService.format._intlService=r,i||this.chartInstance.noTransitionsRedraw()),i&&this.refresh(),e.dir!==t&&this.chartInstance.setDirection(this.getDirection(t))}}render(){const{style:e={},className:t,wrapper:r,children:s}=this.props,n=Object.assign({},e,{position:"relative"}),o=h.createElement(r,{className:t,style:n,key:"chartElement"},h.createElement("div",{onMouseLeave:this.onChartMouseLeave,ref:e=>this._element=e,className:"k-chart-surface"},s),h.createElement(h.Fragment,null,this.showLicenseWatermark&&h.createElement(a.WatermarkOverlay,null)));return h.createElement(G.Provider,{value:this.state},h.createElement(se,{key:"seriesTooltip"}),h.createElement(de,{key:"crosshairTooltips"}),o)}getDirection(e){return"rtl"===(void 0!==e?e:a.canUseDOM&&window.getComputedStyle(this.element).direction||"ltr")}getChartOptions(){const{renderAs:e,pannable:t,zoomable:r,paneDefaults:s,panes:n,transitions:a,seriesColors:o,seriesDefaults:i,axisDefaults:l,deriveOptionsFromParent:c}=this.props;let h={};return void 0!==e&&(h.renderAs=e),void 0!==t&&(h.pannable=t),void 0!==r&&(h.zoomable=r),void 0!==s&&(h.paneDefaults=s),void 0!==n&&(h.panes=n),void 0!==a&&(h.transitions=a),void 0!==o&&(h.seriesColors=o),void 0!==i&&(h.seriesDefaults=i),void 0!==l&&(h.axisDefaults=l),h=Object.assign(h,this.optionsStore.getState()),c&&(h=c(h)),h}refresh(){if(null!==this.chartInstance){const e=this.themeStore.getState(),t=this.getChartOptions(),r=t.transitions;this.suppressTransitions&&(t.transitions=!1),this.props.onRefresh?this.props.onRefresh.call(void 0,t,e,this.chartInstance):this.chartInstance.setOptions(t,e),this.suppressTransitions&&(t.transitions=r,this.suppressTransitions=!1)}}instantiateCoreChart(){const{dir:e,chartConstructor:t}=this.props,r=this.getChartOptions();this.chartInstance=new t(this.element,r,this.themeStore.getState(),{rtl:this.getDirection(e),intlService:s.provideIntlService(this),observer:this.chartObserver,sender:this})}trigger(e,t){const r=function(e,t,r){if(F[e])return new F[e](t,r)}(e,t,this.props.getTarget()),s="on"+e.charAt(0).toUpperCase()+e.slice(1),n=this.observersStore.getState();let a=!1;for(let r=0;r<n.length;r++)n[r].trigger(e,t)&&(a=!0);return!1===a&&r&&this.props.hasOwnProperty(s)?(this.props[s].call(void 0,r),r.isDefaultPrevented&&r.isDefaultPrevented()):a}requiresHandlers(e){for(let t=0;t<e.length;t++){const r=e[t],s="on"+r.charAt(0).toUpperCase()+r.slice(1);if(this.props.hasOwnProperty(s))return!0}return!1}triggerDomEvent(e,t){const r=this.observersStore.getState();let s=!1;for(let n=0;n<r.length;n++)r[n].trigger(e,t)&&(s=!0);return s}};ue.propTypes={dir:r.string,renderAs:r.oneOf(["svg","canvas"])},ue.defaultProps={renderAs:"svg"};let me=ue;s.registerForIntl(me);const ve=class extends h.Component{constructor(e,t){super(e,t),this.context=null,this.state={donutCenterStyles:null},this.chartObserver=new n.InstanceObserver(this,{render:"onRender"}),t.observersStore.dispatch({type:"add",payload:this.chartObserver})}render(){const{render:e}=this.props,{donutCenterStyles:t}=this.state;let r=null;return e&&t&&(r=h.createElement("div",{className:"k-chart-donut-center",style:t},h.createElement(e,null))),r}onRender(e){var t;const r=null==(t=this.context)?void 0:t.optionsStore.getState().series,s=Array.isArray(r)?r[0]:null,n=e.sender._plotArea.charts;if(!s||"donut"!==s.type||0===n[0].points.length)return;const a=n[0].points[0].sector,o=a.innerRadius,i=a.center.y-o,l=a.center.x-o,c=2*o;this.setState({donutCenterStyles:{height:c,left:l,top:i,width:c}})}};ve.contextType=G;let ye=ve,ge=class extends h.Component{constructor(){super(...arguments),this._baseChart=null,this.getTarget=()=>this}get chartInstance(){return null!==this._baseChart?this._baseChart.chartInstance:null}get surface(){return null!==this._baseChart?this._baseChart.surface:null}get element(){return null!==this._baseChart?this._baseChart.element:null}render(){const{donutCenterRender:e,children:t,className:r,...s}=this.props;return h.createElement(me,{...s,ref:e=>this._baseChart=e,chartConstructor:n.Chart,getTarget:this.getTarget,wrapper:"div",className:a.classNames("k-chart k-widget",r)},t,h.createElement(ye,{render:e}))}},fe=class extends h.Component{constructor(){super(...arguments),this._baseChart=null,this.deriveOptionsFromParent=e=>{const{type:t,data:r}=this.props,s=Object.assign({},e,{type:t,data:r});return n.Sparkline.normalizeOptions(s)},this.getTarget=()=>this}get chartInstance(){return null!==this._baseChart?this._baseChart.chartInstance:null}get surface(){return null!==this._baseChart?this._baseChart.surface:null}get element(){return null!==this._baseChart?this._baseChart.element:null}render(){const{children:e,type:t,className:r,...s}=this.props;return h.createElement(me,{...s,ref:e=>this._baseChart=e,chartConstructor:n.Sparkline,getTarget:this.getTarget,wrapper:"span",deriveOptionsFromParent:this.deriveOptionsFromParent,className:a.classNames("k-sparkline k-widget",r)},e)}};const Ce={autoBindElements:!0,liveDrag:!1,partialRedraw:!0};let be=class extends h.Component{constructor(){super(...arguments),this._baseChart=null,this.deriveOptionsFromParent=e=>{const t=Object.assign({},e.navigator||{},Ce);return Object.assign({},e,{navigator:t})},this.onRefresh=(e,t,r)=>{this.props.partialRedraw?(r.applyOptions(e),r.bindCategories(),r.navigator.redrawSlaves()):r.setOptions(e,t)},this.getTarget=()=>this}get chartInstance(){return null!==this._baseChart?this._baseChart.chartInstance:null}get surface(){return null!==this._baseChart?this._baseChart.surface:null}get element(){return null!==this._baseChart?this._baseChart.element:null}render(){const{children:e,className:t,...r}=this.props;return h.createElement(me,{...r,ref:e=>this._baseChart=e,chartConstructor:n.StockChart,getTarget:this.getTarget,wrapper:"div",deriveOptionsFromParent:this.deriveOptionsFromParent,onRefresh:this.onRefresh,className:a.classNames("k-stockchart k-widget",t)},e)}};const xe=class extends h.Component{constructor(e,t){super(e,t),this.optionsStore=t.optionsStore}renderChildren(e,t){const{children:r}=e.props,{_chartKey:s,_parentStore:n}=this.props,a={...e.props,_chartCollectionIdxKey:`${s}_${t}`,_parentStore:n};return h.cloneElement(e,a,r)}render(){const{_chartKey:e,_parentStore:t,children:r}=this.props;return(t||this.optionsStore).dispatch({chartKey:e,payload:[]}),h.Children.map(r,((e,t)=>h.isValidElement(e)?this.renderChildren(e,t):e))}};xe.contextType=G;let Se=xe;const Ee=class extends h.Component{constructor(e,t){super(e,t),this.optionsStore=t.optionsStore,this.childStore=z(B)}render(){const{children:e}=this.props;return void 0!==e?h.Children.map(e,(e=>h.isValidElement(e)?this.renderChildren(e):e)):null}componentDidMount(){this.dispatch()}componentDidUpdate(){this.dispatch()}dispatch(){const{_chartKey:e,_chartCollectionIdxKey:t,_parentStore:r,children:s,...n}=this.props;(r||this.optionsStore).dispatch({chartKey:e,chartCollectionIdxKey:t,payload:Object.assign({},n,this.childStore.getState())})}renderChildren(e){const{children:t}=e.props,r={...e.props,_parentStore:this.childStore};return h.cloneElement(e,r,t)}};Ee.contextType=G;let ke=Ee,Ie=class{constructor(e){this.currentState=e.currentState,this.nextState=e.nextState}};const we=h.forwardRef(((e,t)=>{const r=h.useRef(null),s=h.useRef(null);h.useImperativeHandle(r,(()=>({element:s.current,props:e}))),h.useImperativeHandle(t,(()=>r.current));let n=[{id:"0",...e.rootItem||{text:"Home",icon:h.createElement(a.SvgIcon,{icon:l.homeIcon,style:{marginInlineEnd:"4px"}})}}];e.drilldownState&&(n=[...n,...e.drilldownState.steps.map(((e,t)=>({id:(t+1).toString(),text:e.drilldownValue})))]);const o={...e,data:n};return h.createElement("div",null,h.createElement(i.Breadcrumb,{...o,onItemSelect:t=>{var r;const s="onDrilldownStateChange";if(e.hasOwnProperty(s)){const a=n.findIndex((e=>e.id===t.id)),o={steps:((null==(r=e.drilldownState)?void 0:r.steps)||[]).slice(0,a)},i=new Ie({currentState:e.drilldownState,nextState:o});e[s].call(void 0,i)}}}))})),_e={id:r.string,style:r.object,className:r.string,breadcrumbOrderedList:r.elementType,breadcrumbListItem:r.elementType,breadcrumbDelimiter:r.elementType,breadcrumbLink:r.elementType,dir:r.oneOf(["ltr","rtl"]),disabled:r.bool,valueField:r.string,textField:r.string,iconField:r.string,iconClassField:r.string,onItemSelect:r.func,ariaLabel:r.string,onDrilldownStateChange:r.func,drilldownState:r.shape({steps:r.array}),rootItem:r.object};we.displayName="KendoReactChartBreadcrumb",we.propTypes=_e,we.defaultProps={valueField:"id",textField:"text",iconField:"icon",iconClassField:"iconClass",data:[]};const Ne=e=>h.createElement(ke,{...e,_chartKey:"title"});Ne.displayName="ChartAxisDefaultsTitle";const De=e=>h.createElement(ke,{...e,_chartKey:"labels"});De.displayName="ChartAxisDefaultsLabels";const Te=e=>h.createElement(ke,{visible:!0,...e,_chartKey:"crosshair"});Te.displayName="ChartAxisDefaultsCrosshair";const Ae=e=>h.createElement(ke,{visible:!0,...e,_chartKey:"tooltip"});Ae.displayName="ChartAxisDefaultsCrosshairTooltip";const Ke=e=>h.createElement(ke,{...e,_chartKey:"title"});Ke.displayName="ChartCategoryAxisTitle";const Oe=e=>h.createElement(ke,{...e,_chartKey:"title"});Oe.displayName="ChartPaneDefaultsTitle";const Le=e=>h.createElement(ke,{...e,_chartKey:"item"});Le.displayName="ChartLegendItem";const Re=e=>h.createElement(ke,{...e,_chartKey:"title"});Re.displayName="ChartLegendTitle";const Pe=e=>h.createElement(ke,{...e,_chartKey:"inactiveItems"});Pe.displayName="ChartLegendInactiveItems";const Fe=e=>h.createElement(ke,{...e,_chartKey:"title"});Fe.displayName="ChartValueAxisTitle";const qe=e=>h.createElement(ke,{...e,_chartKey:"title"});qe.displayName="ChartXAxisTitle";const je=e=>h.createElement(ke,{...e,_chartKey:"title"});je.displayName="ChartYAxisTitle";const Ve=e=>h.createElement(ke,{...e,_chartKey:"categoryAxis"});Ve.displayName="ChartNavigatorCategoryAxis";const He=e=>h.createElement(ke,{...e,_chartKey:"pane"});He.displayName="ChartNavigatorPane";const Me=e=>h.createElement(ke,{...e});Me.displayName="ChartNavigatorSeriesItem";const Ue=e=>h.createElement(Se,{...e,_chartKey:"series"});Ue.propTypes={children:function(e,t,r){return p(e,t,r,Me)}};const ze=e=>h.createElement(ke,{...e});ze.displayName="ChartCategoryAxisItem";const Be=e=>h.createElement(Se,{...e,_chartKey:"categoryAxis"});Be.propTypes={children:function(e,t,r){return p(e,t,r,ze)}};const $e=e=>h.createElement(ke,{...e});$e.displayName="ChartPane";const We=e=>h.createElement(ke,{...e,_chartKey:"paneDefaults"});We.displayName="ChartPaneDefaults";const Xe=e=>h.createElement(Se,{...e,_chartKey:"panes"});Xe.propTypes={children:function(e,t,r){return p(e,t,r,$e)}};const Ye=e=>{let t=e=>h.createElement(h.Fragment,null);e.drilldownSeriesFactory&&(t=e.drilldownSeriesFactory);const r=t=>{var r,s;return t&&(null==(s=null==(r=t.drilldownState)?void 0:r.steps)?void 0:s.find((({seriesName:t})=>t===e.name)))};return h.createElement(G.Consumer,null,(s=>r(s)?h.createElement(t,{_chartCollectionIdxKey:e._chartCollectionIdxKey,drilldownValue:r(s).drilldownValue}):h.createElement(ke,{...e})))};Ye.displayName="ChartSeriesItem";const Ze=e=>h.createElement(Se,{...e,_chartKey:"series"});Ze.propTypes={children:function(e,t,r){return p(e,t,r,Ye)}};const Ge=e=>h.createElement(ke,{...e});Ge.displayName="ChartValueAxisItem";const Je=e=>h.createElement(Se,{...e,_chartKey:"valueAxis"});Je.propTypes={children:function(e,t,r){return p(e,t,r,Ge)}};const Qe=e=>h.createElement(ke,{...e});Qe.displayName="ChartXAxisItem";const et=e=>h.createElement(Se,{...e,_chartKey:"xAxis"});et.prototype={children:function(e,t,r){return p(e,t,r,Qe)}};const tt=e=>h.createElement(ke,{...e});tt.displayName="ChartYAxisItem";const rt=e=>h.createElement(Se,{...e,_chartKey:"yAxis"});rt.propTypes={children:function(e,t,r){return p(e,t,r,tt)}};const st=e=>`${e.fontWeight} ${e.fontSize} ${e.fontFamily}`,nt=e=>window.getComputedStyle(e).backgroundColor,at=`\n <div class="k-var--background"></div>\n <div class="k-var--normal-text-color"></div>\n <div class="k-var--kendo-color-subtle"></div>\n\n <div class="k-widget k-chart">\n <div class="k-var--chart-font"></div>\n <div class="k-var--chart-title-font"></div>\n </div>\n <div class="k-var--series-unset"></div>\n <div class="k-var--series">\n ${(()=>{let e='\n <div class="k-var--series-a"></div>\n <div class="k-var--series-b"></div>\n <div class="k-var--series-c"></div>\n <div class="k-var--series-d"></div>\n <div class="k-var--series-e"></div>\n <div class="k-var--series-f"></div>\n';for(let t=0;t<30;t++)e+=`\n <div class="k-var--series-${t+1}"></div>`;return e})()}\n </div>\n`;let ot=class{constructor(e){this.store=e}setStyle(e,t){const r=e.split(".");let s=this.store;r.forEach(((e,t,r)=>{t<r.length-1&&(s=s[e]=s[e]||{})}));const n=r.pop();n&&(s[n]=t)}setColors(){this.mapColor("labels.color","normal-text-color"),this.mapColor("labels.stroke.color","background");this.element.querySelector(".k-var--kendo-color-subtle").style.color="var(--kendo-color-subtle)",this.mapColor("links.color","kendo-color-subtle","color"),this.mapColor("legend.labels.color","normal-text-color"),this.mapColor("title.color","normal-text-color")}setFonts(){const e=st(this.queryStyle("chart-title-font")),t=st(this.queryStyle("chart-font"));this.setStyle("title.font",e),this.setStyle("labels.font",t),this.setStyle("legend.labels.font",t)}setNodeColors(){const e=this.element;if(!e)return;const t=[].slice.call(e.querySelectorAll(".k-var--series div")),r=nt(e.querySelector(".k-var--series-unset")),s=t.reduce(((e,t)=>{const s=(e=>{const t=e.match(/series-([a-z])$/);if(null!==t)return(e=>e.toLowerCase().charCodeAt(0)-97)(t[1]);const r=e.split("--series-")[1];return parseInt(r,10)-1})(t.className),n=nt(t);return n!==r&&(e[s]=n),e}),[]);this.setStyle("nodeColors",s)}mapColor(e,t,r="backgroundColor"){this.setStyle(e,this.queryStyle(t)[r])}queryStyle(e){const t=this.element;return window.getComputedStyle(t.querySelector(`.k-var--${e}`))}};const it=(e,t)=>{const r={nodeColors:[]},s=new ot(r),n=s.element=e.createElement("div");n.style.display="none",n.innerHTML=at,e.body.appendChild(n);try{s.setColors(),s.setFonts(),s.setNodeColors()}finally{e.body.removeChild(s.element),s.element=null,t(r)}},lt=r.exact({left:r.number,top:r.number}),ct={left:r.number,right:r.number},ht={...ct,top:r.number,bottom:r.number},dt=r.oneOfType([r.number,r.exact(ht)]),pt=dt,ut=r.exact({width:r.number,color:r.string,opacity:r.number,dashType:r.string}),mt={visible:r.bool,font:r.string,color:r.string,opacity:r.number,align:r.oneOf(["left","right","center"]),position:r.oneOf(["inside","before","after"]),padding:pt,margin:r.exact(ct),border:ut,offset:lt},vt={color:r.string,opacity:r.number,offset:lt,padding:r.number,width:r.number},yt={colorType:r.oneOf(["static","source","target"]),color:r.string,opacity:r.number,highlight:r.exact({opacity:r.number,inactiveOpacity:r.number})},gt=r.exact({text:r.string,...mt}),ft=r.exact({id:r.oneOfType([r.string,r.number]).isRequired,label:gt.isRequired,...vt}),Ct=r.exact({sourceId:r.oneOfType([r.string,r.number]).isRequired,targetId:r.oneOfType([r.string,r.number]).isRequired,value:r.number.isRequired,...yt}),bt={data:r.exact({nodes:r.arrayOf(ft.isRequired).isRequired,links:r.arrayOf(Ct.isRequired).isRequired}).isRequired,links:r.exact(yt),nodes:r.exact(vt),labels:r.exact(mt),legend:r.exact({align:r.oneOf(["start","center","end"]),background:r.string,border:ut,height:r.number,labels:r.object,margin:dt,offsetX:r.number,offsetY:r.number,orientation:r.oneOf(["vertical","horizontal"]),padding:pt,position:r.oneOf(["top","bottom","left","right","custom"]),reverse:r.bool,visible:r.bool,width:r.number,item:r.object,title:r.object}),title:r.exact({align:r.oneOf(["center","left","right"]),background:r.string,border:ut,color:r.string,font:r.string,margin:dt,padding:pt,position:r.oneOf(["top","bottom"]),text:r.string,visible:r.bool}),tooltip:r.exact({visible:r.bool,offset:r.number,followPointer:r.bool,delay:r.number,linkComponent:r.any,nodeComponent:r.any}),className:r.string,style:r.object,dir:r.string,disableAutoLayout:r.bool,disableKeyboardNavigation:r.bool,onNodeEnter:r.func,onNodeLeave:r.func,onLinkEnter:r.func,onLinkLeave:r.func,onNodeClick:r.func,onLinkClick:r.func},xt="sankey.tooltipUnitFormat",St={[xt]:"({0} units)"},Et=e=>{const{Content:t,dir:r,offset:s,event:{tooltipData:n,dataItem:a,nodeValue:o}}=e,i=h.useRef(null);return h.useEffect((()=>{const e=i.current;if(!n||!e)return;const t=e.offsetWidth,r=e.offsetHeight,a={...n.popupOffset},o=n.popupAlign;a.left+="left"===o.horizontal?s:-1*s,"right"===o.horizontal&&(a.left-=t),"bottom"===o.vertical?a.top-=r+s:a.top+=s,e.style.left=`${a.left}px`,e.style.top=`${a.top}px`,e.style.visibility=""}),[n]),h.createElement("div",{ref:i,style:{visibility:"hidden"},dir:r,className:"k-tooltip k-sankey-tooltip k-chart-tooltip k-chart-shared-tooltip"},h.createElement("div",{className:"k-tooltip-content"},h.createElement(t,{dir:r,dataItem:a,nodeValue:o})))},kt={display:"flex",alignItems:"center"},It=e=>h.createElement("div",{style:{width:15,height:15,backgroundColor:e.color,display:"inline-flex",marginLeft:3}}),wt=e=>h.createElement("span",{style:{margin:"0 3px"}},e.children),_t=e=>s.useInternationalization().format(s.useLocalization().toLanguageString(xt,St[xt]),[e||0]),Nt=e=>{const{color:t,label:r}=e.dataItem;return h.createElement("div",{style:kt,className:"k-tooltip-content"},h.createElement(It,{color:t}),h.createElement(wt,null,r.text),h.createElement(wt,null,_t(e.nodeValue)))},Dt=e=>{const{source:t,target:r,value:s}=e.dataItem,n="rtl"===e.dir?l.arrowLeftIcon:l.arrowRightIcon;return h.createElement("div",{style:kt},h.createElement(It,{color:t.color}),h.createElement(wt,null,t.label.text),h.createElement(a.IconWrap,{icon:n,name:n.name}),h.createElement(It,{color:r.color}),h.createElement(wt,null,r.label.text),h.createElement(wt,null,_t(s)))},Tt=12,At={offset:Tt,visible:!0},Kt=["nodeEnter","nodeLeave","linkEnter","linkLeave","nodeClick","linkClick"],Ot=h.forwardRef(((e,t)=>{a.validatePackage(pe);const r=h.useRef(null),s=h.useRef(null),o=a.useRtl(r,e.dir,[e.dir,r.current]),i=h.useRef(null),{data:l,links:c,nodes:d,labels:p,title:u,legend:m,tooltip:v=At,disableAutoLayout:y,disableKeyboardNavigation:g}=e,f=h.useRef();f.current=e;const[C,b]=h.useState(null),x=h.useCallback((e=>{const{visible:t,offset:r=Tt,nodeComponent:s=Nt,linkComponent:n=Dt}={...At,...v};if(t){const t={event:e,offset:r,dir:o,Content:"node"===e.targetType?s:n};b(t)}}),[v,o]),S=h.useCallback((()=>{b(null)}),[]),E=h.useCallback(((e,t)=>{const r=f.current[e];if(r){const e={...t,nativeEvent:t.originalEvent,target:i.current};r.call(void 0,e)}}),[]);return h.useEffect((()=>{const e={data:l,links:c,nodes:d,labels:p,title:u,legend:m,disableAutoLayout:y,disableKeyboardNavigation:g,rtl:"rtl"===o,tooltip:{...At,...v}};return s.current?s.current.setOptions(e):a.canUseDOM&&r.current&&it(r.current.ownerDocument,(t=>{s.current=new n.Sankey(r.current,e,t),((e,t)=>{e&&(e.unbind(),Kt.forEach((r=>{t[r]&&e.bind(r,t[r])})))})(s.current,{nodeEnter:e=>{E("onNodeEnter",e)},nodeLeave:e=>{E("onNodeLeave",e)},linkEnter:e=>{E("onLinkEnter",e)},linkLeave:e=>{E("onLinkLeave",e)},nodeClick:e=>{E("onNodeClick",e)},linkClick:e=>{E("onLinkClick",e)}}),s.current.bind("tooltipShow",x),s.current.bind("tooltipHide",S)})),()=>{s.current&&(s.current.destroy(),s.current=null)}}),[l,c,d,p,u,m,y,g,o,v,S,x,E]),h.useImperativeHandle(i,(()=>({get element(){return r.current},exportVisual:e=>s.current.exportVisual(e),props:e})),[]),h.useImperativeHandle(t,(()=>i.current)),h.createElement(h.Fragment,null,h.createElement("div",{ref:r,className:e.className,style:e.style,dir:o}),C&&h.createElement(Et,{...C}))}));Ot.propTypes=bt,Ot.displayName="KendoReactSankey";const Lt=n.createSankeyData;e.AxisLabelClickEvent=v,e.Chart=ge,e.ChartArea=e=>h.createElement(ke,{...e,_chartKey:"chartArea"}),e.ChartAxisDefaults=e=>h.createElement(ke,{...e,_chartKey:"axisDefaults"}),e.ChartAxisDefaultsCrosshair=Te,e.ChartAxisDefaultsCrosshairTooltip=Ae,e.ChartAxisDefaultsLabels=De,e.ChartAxisDefaultsTitle=Ne,e.ChartBreadcrumb=we,e.ChartCategoryAxis=Be,e.ChartCategoryAxisCrosshair=e=>h.createElement(ke,{visible:!0,...e,_chartKey:"crosshair"}),e.ChartCategoryAxisCrosshairTooltip=e=>h.createElement(ke,{visible:!0,...e,_chartKey:"tooltip"}),e.ChartCategoryAxisItem=ze,e.ChartCategoryAxisLabels=e=>h.createElement(ke,{visible:!0,...e,_chartKey:"labels"}),e.ChartCategoryAxisNotes=e=>h.createElement(ke,{...e,_chartKey:"notes"}),e.ChartCategoryAxisNotesIcon=e=>h.createElement(ke,{...e,_chartKey:"icon"}),e.ChartCategoryAxisNotesLabel=e=>h.createElement(ke,{...e,_chartKey:"label"}),e.ChartCategoryAxisRangeLabels=e=>h.createElement(ke,{visible:!0,...e,_chartKey:"rangeLabels"}),e.ChartCategoryAxisTitle=Ke,e.ChartLegend=e=>h.createElement(ke,{visible:!0,...e,_chartKey:"legend"}),e.ChartLegendInactiveItems=Pe,e.ChartLegendItem=Le,e.ChartLegendTitle=Re,e.ChartNavigator=e=>h.createElement(ke,{visible:!0,position:"bottom",...e,_chartKey:"navigator"}),e.ChartNavigatorCategoryAxis=Ve,e.ChartNavigatorHint=e=>h.createElement(ke,{...e,_chartKey:"hint"}),e.ChartNavigatorPane=He,e.ChartNavigatorSelect=e=>h.createElement(ke,{...e,_chartKey:"select"}),e.ChartNavigatorSeries=Ue,e.ChartNavigatorSeriesItem=Me,e.ChartPane=$e,e.ChartPaneDefaults=We,e.ChartPaneDefaultsTitle=Oe,e.ChartPanes=Xe,e.ChartPlotArea=e=>h.createElement(ke,{...e,_chartKey:"plotArea"}),e.ChartSeries=Ze,e.ChartSeriesDefaults=e=>h.createElement(ke,{...e,_chartKey:"seriesDefaults"}),e.ChartSeriesErrorBars=e=>h.createElement(ke,{...e,_chartKey:"errorBars"}),e.ChartSeriesExtremes=e=>h.createElement(ke,{...e,_chartKey:"extremes"}),e.ChartSeriesHighlight=e=>h.createElement(ke,{...e,_chartKey:"highlight"}),e.ChartSeriesItem=Ye,e.ChartSeriesItemOutliers=e=>h.createElement(ke,{...e,_chartKey:"outliers"}),e.ChartSeriesItemTooltip=e=>h.createElement(ke,{...e,_chartKey:"tooltip"}),e.ChartSeriesLabels=e=>h.createElement(ke,{visible:!0,...e,_chartKey:"labels"}),e.ChartSeriesLabelsFrom=e=>h.createElement(ke,{...e,_chartKey:"from"}),e.ChartSeriesLabelsTo=e=>h.createElement(ke,{...e,_chartKey:"to"}),e.ChartSeriesMarkers=e=>h.createElement(ke,{...e,_chartKey:"markers"}),e.ChartSeriesNotes=e=>h.createElement(ke,{...e,_chartKey:"notes"}),e.ChartSeriesNotesIcon=e=>h.createElement(ke,{...e,_chartKey:"icon"}),e.ChartSeriesNotesLabel=e=>h.createElement(ke,{...e,_chartKey:"label"}),e.ChartSubtitle=e=>h.createElement(ke,{...e,_chartKey:"subtitle"}),e.ChartTitle=e=>h.createElement(ke,{...e,_chartKey:"title"}),e.ChartTooltip=e=>h.createElement(ke,{visible:!0,...e,_chartKey:"tooltip"}),e.ChartValueAxis=Je,e.ChartValueAxisCrosshair=e=>h.createElement(ke,{visible:!0,...e,_chartKey:"crosshair"}),e.ChartValueAxisCrosshairTooltip=e=>h.createElement(ke,{visible:!0,...e,_chartKey:"tooltip"}),e.ChartValueAxisItem=Ge,e.ChartValueAxisLabels=e=>h.createElement(ke,{visible:!0,...e,_chartKey:"labels"}),e.ChartValueAxisNotes=e=>h.createElement(ke,{...e,_chartKey:"notes"}),e.ChartValueAxisNotesIcon=e=>h.createElement(ke,{...e,_chartKey:"icon"}),e.ChartValueAxisNotesLabel=e=>h.createElement(ke,{...e,_chartKey:"label"}),e.ChartValueAxisTitle=Fe,e.ChartXAxis=et,e.ChartXAxisCrosshair=e=>h.createElement(ke,{visible:!0,...e,_chartKey:"crosshair"}),e.ChartXAxisCrosshairTooltip=e=>h.createElement(ke,{visible:!0,...e,_chartKey:"tooltip"}),e.ChartXAxisItem=Qe,e.ChartXAxisLabels=e=>h.createElement(ke,{visible:!0,...e,_chartKey:"labels"}),e.ChartXAxisNotes=e=>h.createElement(ke,{...e,_chartKey:"notes"}),e.ChartXAxisNotesIcon=e=>h.createElement(ke,{...e,_chartKey:"icon"}),e.ChartXAxisNotesLabel=e=>h.createElement(ke,{...e,_chartKey:"label"}),e.ChartXAxisTitle=qe,e.ChartYAxis=rt,e.ChartYAxisCrosshair=e=>h.createElement(ke,{visible:!0,...e,_chartKey:"crosshair"}),e.ChartYAxisCrosshairTooltip=e=>h.createElement(ke,{visible:!0,...e,_chartKey:"tooltip"}),e.ChartYAxisItem=tt,e.ChartYAxisLabels=e=>h.createElement(ke,{visible:!0,...e,_chartKey:"labels"}),e.ChartYAxisNotes=e=>h.createElement(ke,{...e,_chartKey:"notes"}),e.ChartYAxisNotesIcon=e=>h.createElement(ke,{...e,_chartKey:"icon"}),e.ChartYAxisNotesLabel=e=>h.createElement(ke,{...e,_chartKey:"label"}),e.ChartYAxisTitle=je,e.ChartZoomable=e=>h.createElement(ke,{...e,_chartKey:"zoomable"}),e.CollectionConfigurationComponent=Se,e.ConfigurationComponent=ke,e.CrosshairTooltip=oe,e.CrosshairTooltipContainer=de,e.DonutCenter=ye,e.DragEndEvent=f,e.DragEvent=g,e.DragStartEvent=C,e.DrilldownEvent=b,e.DrilldownStateChangeEvent=Ie,e.LegendItemClickEvent=S,e.LegendItemHoverEvent=x,e.NavigatorFilterEvent=E,e.NoteClickEvent=k,e.NoteHoverEvent=I,e.PlotAreaClickEvent=w,e.PlotAreaHoverEvent=_,e.RenderEvent=N,e.Sankey=Ot,e.SelectEndEvent=T,e.SelectEvent=D,e.SelectStartEvent=A,e.SeriesClickEvent=K,e.SeriesHoverEvent=O,e.SeriesTooltip=se,e.SharedTooltipContent=Z,e.Sparkline=fe,e.StockChart=be,e.TooltipPoint=Y,e.TooltipPopup=te,e.ZoomEndEvent=R,e.ZoomEvent=L,e.ZoomStartEvent=P,e.createSankeyData=Lt,e.exportVisual=(e,t={})=>{if(e&&null!==e.chartInstance)return e.chartInstance.exportVisual(t)},e.findAxisByName=(e,t)=>{if(e&&null!==e.chartInstance)return e.chartInstance.findAxisByName(t)},e.findPaneByIndex=(e,t)=>{if(e&&null!==e.chartInstance)return e.chartInstance.findPaneByIndex(t)},e.findPaneByName=(e,t)=>{if(e&&null!==e.chartInstance)return e.chartInstance.findPaneByName(t)}}));
|
package/index.d.mts
CHANGED
|
@@ -2367,7 +2367,7 @@ export declare const ChartTooltip: React_2.FunctionComponent<ChartTooltipProps>;
|
|
|
2367
2367
|
* Represents the props of the KendoReact ChartTooltip component ([see example]({% slug tooltips_chart_charts %})).
|
|
2368
2368
|
*/
|
|
2369
2369
|
export declare interface ChartTooltipProps extends Tooltip {
|
|
2370
|
-
render?: (props: TooltipContext | SharedTooltipContext) => React_2.ReactNode;
|
|
2370
|
+
render?: ((props: TooltipContext) => React_2.ReactNode) | ((props: SharedTooltipContext) => React_2.ReactNode);
|
|
2371
2371
|
}
|
|
2372
2372
|
|
|
2373
2373
|
export declare const ChartValueAxis: React_2.FunctionComponent<ChartValueAxisProps>;
|
|
@@ -4654,6 +4654,10 @@ export declare interface SankeyProps {
|
|
|
4654
4654
|
* Sets additional CSS classes to the Sankey component.
|
|
4655
4655
|
*/
|
|
4656
4656
|
className?: string;
|
|
4657
|
+
/**
|
|
4658
|
+
* Represents the `dir` attribute of the Sankey component.
|
|
4659
|
+
*/
|
|
4660
|
+
dir?: string;
|
|
4657
4661
|
/**
|
|
4658
4662
|
* The data of the Sankey component containing the `links` and `nodes` props.
|
|
4659
4663
|
*/
|
|
@@ -4689,6 +4693,10 @@ export declare interface SankeyProps {
|
|
|
4689
4693
|
* If set to `true`, the Sankey component will not perform automatic layout.
|
|
4690
4694
|
*/
|
|
4691
4695
|
disableAutoLayout?: boolean;
|
|
4696
|
+
/**
|
|
4697
|
+
* If set to `true`, the Sankey keyboard navigation will be disabled.
|
|
4698
|
+
*/
|
|
4699
|
+
disableKeyboardNavigation?: boolean;
|
|
4692
4700
|
/**
|
|
4693
4701
|
* Fires when the mouse pointer enters a node. Similar to the `mouseenter` event.
|
|
4694
4702
|
*/
|
|
@@ -4763,6 +4771,10 @@ export declare interface SankeyTooltipProps {
|
|
|
4763
4771
|
* The distance between the tooltip and the mouse pointer in pixels.
|
|
4764
4772
|
*/
|
|
4765
4773
|
offset: number;
|
|
4774
|
+
/**
|
|
4775
|
+
* The `dir` attribute of the Sankey tooltip.
|
|
4776
|
+
*/
|
|
4777
|
+
dir?: string;
|
|
4766
4778
|
}
|
|
4767
4779
|
|
|
4768
4780
|
/**
|
|
@@ -5770,7 +5782,9 @@ export declare interface SeriesErrorBars {
|
|
|
5770
5782
|
* - An array that holds the low and high difference from the point value.
|
|
5771
5783
|
* - A function that returns the `errorBars` point value.
|
|
5772
5784
|
*/
|
|
5773
|
-
value?: string
|
|
5785
|
+
value?: string | number | any[] | ((data: {
|
|
5786
|
+
value: number;
|
|
5787
|
+
}) => string | number | any[]);
|
|
5774
5788
|
/**
|
|
5775
5789
|
* A function that for creating custom visuals for the error bars.
|
|
5776
5790
|
*
|
|
@@ -7098,6 +7112,10 @@ export declare interface Title {
|
|
|
7098
7112
|
* The text of the chart title. You can also set the text directly for a title with default options. You can split the text into multiple lines by using the line feed characters ("\n").
|
|
7099
7113
|
*/
|
|
7100
7114
|
text?: string;
|
|
7115
|
+
/**
|
|
7116
|
+
* The accessible description of the Chart. The description is announced by screen readers when the Chart is focused.("\n").
|
|
7117
|
+
*/
|
|
7118
|
+
description?: string;
|
|
7101
7119
|
/**
|
|
7102
7120
|
* If set to `true`, the Chart displays the title. By default, the title is displayed.
|
|
7103
7121
|
*/
|
|
@@ -7191,6 +7209,10 @@ export declare interface TooltipContentProps {
|
|
|
7191
7209
|
* The value is available only when the hovered element is a node.
|
|
7192
7210
|
*/
|
|
7193
7211
|
nodeValue?: number;
|
|
7212
|
+
/**
|
|
7213
|
+
* The `dir` attribute of the Sankey tooltip content component.
|
|
7214
|
+
*/
|
|
7215
|
+
dir?: string;
|
|
7194
7216
|
}
|
|
7195
7217
|
|
|
7196
7218
|
export declare interface TooltipContext {
|
package/index.d.ts
CHANGED
|
@@ -2367,7 +2367,7 @@ export declare const ChartTooltip: React_2.FunctionComponent<ChartTooltipProps>;
|
|
|
2367
2367
|
* Represents the props of the KendoReact ChartTooltip component ([see example]({% slug tooltips_chart_charts %})).
|
|
2368
2368
|
*/
|
|
2369
2369
|
export declare interface ChartTooltipProps extends Tooltip {
|
|
2370
|
-
render?: (props: TooltipContext | SharedTooltipContext) => React_2.ReactNode;
|
|
2370
|
+
render?: ((props: TooltipContext) => React_2.ReactNode) | ((props: SharedTooltipContext) => React_2.ReactNode);
|
|
2371
2371
|
}
|
|
2372
2372
|
|
|
2373
2373
|
export declare const ChartValueAxis: React_2.FunctionComponent<ChartValueAxisProps>;
|
|
@@ -4654,6 +4654,10 @@ export declare interface SankeyProps {
|
|
|
4654
4654
|
* Sets additional CSS classes to the Sankey component.
|
|
4655
4655
|
*/
|
|
4656
4656
|
className?: string;
|
|
4657
|
+
/**
|
|
4658
|
+
* Represents the `dir` attribute of the Sankey component.
|
|
4659
|
+
*/
|
|
4660
|
+
dir?: string;
|
|
4657
4661
|
/**
|
|
4658
4662
|
* The data of the Sankey component containing the `links` and `nodes` props.
|
|
4659
4663
|
*/
|
|
@@ -4689,6 +4693,10 @@ export declare interface SankeyProps {
|
|
|
4689
4693
|
* If set to `true`, the Sankey component will not perform automatic layout.
|
|
4690
4694
|
*/
|
|
4691
4695
|
disableAutoLayout?: boolean;
|
|
4696
|
+
/**
|
|
4697
|
+
* If set to `true`, the Sankey keyboard navigation will be disabled.
|
|
4698
|
+
*/
|
|
4699
|
+
disableKeyboardNavigation?: boolean;
|
|
4692
4700
|
/**
|
|
4693
4701
|
* Fires when the mouse pointer enters a node. Similar to the `mouseenter` event.
|
|
4694
4702
|
*/
|
|
@@ -4763,6 +4771,10 @@ export declare interface SankeyTooltipProps {
|
|
|
4763
4771
|
* The distance between the tooltip and the mouse pointer in pixels.
|
|
4764
4772
|
*/
|
|
4765
4773
|
offset: number;
|
|
4774
|
+
/**
|
|
4775
|
+
* The `dir` attribute of the Sankey tooltip.
|
|
4776
|
+
*/
|
|
4777
|
+
dir?: string;
|
|
4766
4778
|
}
|
|
4767
4779
|
|
|
4768
4780
|
/**
|
|
@@ -5770,7 +5782,9 @@ export declare interface SeriesErrorBars {
|
|
|
5770
5782
|
* - An array that holds the low and high difference from the point value.
|
|
5771
5783
|
* - A function that returns the `errorBars` point value.
|
|
5772
5784
|
*/
|
|
5773
|
-
value?: string
|
|
5785
|
+
value?: string | number | any[] | ((data: {
|
|
5786
|
+
value: number;
|
|
5787
|
+
}) => string | number | any[]);
|
|
5774
5788
|
/**
|
|
5775
5789
|
* A function that for creating custom visuals for the error bars.
|
|
5776
5790
|
*
|
|
@@ -7098,6 +7112,10 @@ export declare interface Title {
|
|
|
7098
7112
|
* The text of the chart title. You can also set the text directly for a title with default options. You can split the text into multiple lines by using the line feed characters ("\n").
|
|
7099
7113
|
*/
|
|
7100
7114
|
text?: string;
|
|
7115
|
+
/**
|
|
7116
|
+
* The accessible description of the Chart. The description is announced by screen readers when the Chart is focused.("\n").
|
|
7117
|
+
*/
|
|
7118
|
+
description?: string;
|
|
7101
7119
|
/**
|
|
7102
7120
|
* If set to `true`, the Chart displays the title. By default, the title is displayed.
|
|
7103
7121
|
*/
|
|
@@ -7191,6 +7209,10 @@ export declare interface TooltipContentProps {
|
|
|
7191
7209
|
* The value is available only when the hovered element is a node.
|
|
7192
7210
|
*/
|
|
7193
7211
|
nodeValue?: number;
|
|
7212
|
+
/**
|
|
7213
|
+
* The `dir` attribute of the Sankey tooltip content component.
|
|
7214
|
+
*/
|
|
7215
|
+
dir?: string;
|
|
7194
7216
|
}
|
|
7195
7217
|
|
|
7196
7218
|
export declare interface TooltipContext {
|
package/package-metadata.mjs
CHANGED
|
@@ -10,7 +10,7 @@ const e = {
|
|
|
10
10
|
name: "@progress/kendo-react-charts",
|
|
11
11
|
productName: "KendoReact",
|
|
12
12
|
productCodes: ["KENDOUIREACT", "KENDOUICOMPLETE"],
|
|
13
|
-
publishDate:
|
|
13
|
+
publishDate: 1718872114,
|
|
14
14
|
version: "",
|
|
15
15
|
licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
16
16
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-charts",
|
|
3
|
-
"version": "8.1.0-develop.
|
|
3
|
+
"version": "8.1.0-develop.20",
|
|
4
4
|
"description": "React Chart renders a wide range of high-quality data visualizations. KendoReact Charts package",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -24,17 +24,16 @@
|
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"@progress/kendo-drawing": "^1.20.1",
|
|
26
26
|
"@progress/kendo-licensing": "^1.3.4",
|
|
27
|
-
"@progress/kendo-react-common": "8.1.0-develop.
|
|
28
|
-
"@progress/kendo-react-intl": "8.1.0-develop.
|
|
29
|
-
"@progress/kendo-react-layout": "8.1.0-develop.
|
|
30
|
-
"@progress/kendo-react-popup": "8.1.0-develop.
|
|
27
|
+
"@progress/kendo-react-common": "8.1.0-develop.20",
|
|
28
|
+
"@progress/kendo-react-intl": "8.1.0-develop.20",
|
|
29
|
+
"@progress/kendo-react-layout": "8.1.0-develop.20",
|
|
30
|
+
"@progress/kendo-react-popup": "8.1.0-develop.20",
|
|
31
31
|
"@progress/kendo-svg-icons": "^3.0.0",
|
|
32
|
-
"hammerjs": "^2.0.0",
|
|
33
32
|
"react": "^16.8.2 || ^17.0.0 || ^18.0.0",
|
|
34
33
|
"react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0"
|
|
35
34
|
},
|
|
36
35
|
"dependencies": {
|
|
37
|
-
"@progress/kendo-charts": "2.
|
|
36
|
+
"@progress/kendo-charts": "2.4.0",
|
|
38
37
|
"prop-types": "^15.6.0"
|
|
39
38
|
},
|
|
40
39
|
"keywords": [
|
package/sankey/Sankey.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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const D=require("react"),M=require("@progress/kendo-charts"),x=require("./theme-service.js"),k=require("@progress/kendo-react-common"),H=require("../package-metadata.js"),_=require("./propTypes.js"),p=require("./SankeyTooltip.js");function I(e){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(i,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return i.default=e,Object.freeze(i)}const o=I(D),q=12,y={offset:q,visible:!0},K=["nodeEnter","nodeLeave","linkEnter","linkLeave","nodeClick","linkClick"],V=(e,i)=>{e&&(e.unbind(),K.forEach(t=>{i[t]&&e.bind(t,i[t])}))},b=o.forwardRef((e,i)=>{k.validatePackage(H.packageMetadata);const t=o.useRef(null),r=o.useRef(null),s=k.useRtl(t,e.dir,[e.dir,t.current]),d=o.useRef(null),{data:m,links:g,nodes:v,labels:C,title:E,legend:T,tooltip:u=y,disableAutoLayout:R,disableKeyboardNavigation:S}=e,L=o.useRef();L.current=e;const[O,h]=o.useState(null),N=o.useCallback(l=>{const{visible:c,offset:n=q,nodeComponent:f=p.NodeTooltipContent,linkComponent:j=p.LinkTooltipContent}={...y,...u};if(c){const w={event:l,offset:n,dir:s,Content:l.targetType==="node"?f:j};h(w)}},[u,s]),P=o.useCallback(()=>{h(null)},[]),a=o.useCallback((l,c)=>{const n=L.current[l];if(n){const f={...c,nativeEvent:c.originalEvent,target:d.current};n.call(void 0,f)}},[]);return o.useEffect(()=>{const l={data:m,links:g,nodes:v,labels:C,title:E,legend:T,disableAutoLayout:R,disableKeyboardNavigation:S,rtl:s==="rtl",tooltip:{...y,...u}};return r.current?r.current.setOptions(l):k.canUseDOM&&t.current&&x.loadTheme(t.current.ownerDocument,c=>{r.current=new M.Sankey(t.current,l,c),V(r.current,{nodeEnter:n=>{a("onNodeEnter",n)},nodeLeave:n=>{a("onNodeLeave",n)},linkEnter:n=>{a("onLinkEnter",n)},linkLeave:n=>{a("onLinkLeave",n)},nodeClick:n=>{a("onNodeClick",n)},linkClick:n=>{a("onLinkClick",n)}}),r.current.bind("tooltipShow",N),r.current.bind("tooltipHide",P)}),()=>{r.current&&(r.current.destroy(),r.current=null)}},[m,g,v,C,E,T,R,S,s,u,P,N,a]),o.useImperativeHandle(d,()=>({get element(){return t.current},exportVisual:l=>r.current.exportVisual(l),props:e}),[]),o.useImperativeHandle(i,()=>d.current),o.createElement(o.Fragment,null,o.createElement("div",{ref:t,className:e.className,style:e.style,dir:s}),O&&o.createElement(p.TooltipComponent,{...O}))});b.propTypes=_.sankeyPropTypes;b.displayName="KendoReactSankey";exports.Sankey=b;
|
package/sankey/Sankey.mjs
CHANGED
|
@@ -7,64 +7,67 @@
|
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
9
|
import * as t from "react";
|
|
10
|
-
import { Sankey as
|
|
11
|
-
import { loadTheme as
|
|
12
|
-
import { validatePackage as
|
|
13
|
-
import { packageMetadata as
|
|
14
|
-
import { sankeyPropTypes as
|
|
15
|
-
import { TooltipComponent as
|
|
16
|
-
const
|
|
17
|
-
offset:
|
|
10
|
+
import { Sankey as O } from "@progress/kendo-charts";
|
|
11
|
+
import { loadTheme as D } from "./theme-service.mjs";
|
|
12
|
+
import { validatePackage as H, useRtl as I, canUseDOM as K } from "@progress/kendo-react-common";
|
|
13
|
+
import { packageMetadata as M } from "../package-metadata.mjs";
|
|
14
|
+
import { sankeyPropTypes as V } from "./propTypes.mjs";
|
|
15
|
+
import { TooltipComponent as A, NodeTooltipContent as F, LinkTooltipContent as U } from "./SankeyTooltip.mjs";
|
|
16
|
+
const S = 12, p = {
|
|
17
|
+
offset: S,
|
|
18
18
|
visible: !0
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
}, W = ["nodeEnter", "nodeLeave", "linkEnter", "linkLeave", "nodeClick", "linkClick"], $ = (n, c) => {
|
|
20
|
+
n && (n.unbind(), W.forEach((o) => {
|
|
21
|
+
c[o] && n.bind(o, c[o]);
|
|
22
22
|
}));
|
|
23
|
-
},
|
|
24
|
-
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
const [
|
|
23
|
+
}, P = t.forwardRef((n, c) => {
|
|
24
|
+
H(M);
|
|
25
|
+
const o = t.useRef(null), r = t.useRef(null), s = I(o, n.dir, [n.dir, o.current]), d = t.useRef(null), { data: k, links: m, nodes: y, labels: v, title: E, legend: C, tooltip: u = p, disableAutoLayout: b, disableKeyboardNavigation: g } = n, T = t.useRef();
|
|
26
|
+
T.current = n;
|
|
27
|
+
const [L, R] = t.useState(null), N = t.useCallback((l) => {
|
|
28
28
|
const {
|
|
29
29
|
visible: a,
|
|
30
|
-
offset: e =
|
|
31
|
-
nodeComponent:
|
|
32
|
-
linkComponent:
|
|
33
|
-
} = { ...p, ...
|
|
30
|
+
offset: e = S,
|
|
31
|
+
nodeComponent: f = F,
|
|
32
|
+
linkComponent: w = U
|
|
33
|
+
} = { ...p, ...u };
|
|
34
34
|
if (a) {
|
|
35
|
-
const
|
|
35
|
+
const x = {
|
|
36
36
|
event: l,
|
|
37
37
|
offset: e,
|
|
38
|
-
|
|
38
|
+
dir: s,
|
|
39
|
+
Content: l.targetType === "node" ? f : w
|
|
39
40
|
};
|
|
40
|
-
|
|
41
|
+
R(x);
|
|
41
42
|
}
|
|
42
|
-
}, [
|
|
43
|
-
|
|
43
|
+
}, [u, s]), h = t.useCallback(() => {
|
|
44
|
+
R(null);
|
|
44
45
|
}, []), i = t.useCallback((l, a) => {
|
|
45
|
-
const e =
|
|
46
|
+
const e = T.current[l];
|
|
46
47
|
if (e) {
|
|
47
|
-
const
|
|
48
|
+
const f = {
|
|
48
49
|
...a,
|
|
49
50
|
nativeEvent: a.originalEvent,
|
|
50
|
-
target:
|
|
51
|
+
target: d.current
|
|
51
52
|
};
|
|
52
|
-
e.call(void 0,
|
|
53
|
+
e.call(void 0, f);
|
|
53
54
|
}
|
|
54
55
|
}, []);
|
|
55
56
|
return t.useEffect(() => {
|
|
56
57
|
const l = {
|
|
57
|
-
data:
|
|
58
|
-
links:
|
|
59
|
-
nodes:
|
|
60
|
-
labels:
|
|
58
|
+
data: k,
|
|
59
|
+
links: m,
|
|
60
|
+
nodes: y,
|
|
61
|
+
labels: v,
|
|
61
62
|
title: E,
|
|
62
|
-
legend:
|
|
63
|
-
disableAutoLayout:
|
|
64
|
-
|
|
63
|
+
legend: C,
|
|
64
|
+
disableAutoLayout: b,
|
|
65
|
+
disableKeyboardNavigation: g,
|
|
66
|
+
rtl: s === "rtl",
|
|
67
|
+
tooltip: { ...p, ...u }
|
|
65
68
|
};
|
|
66
|
-
return
|
|
67
|
-
|
|
69
|
+
return r.current ? r.current.setOptions(l) : K && o.current && D(o.current.ownerDocument, (a) => {
|
|
70
|
+
r.current = new O(o.current, l, a), $(r.current, {
|
|
68
71
|
nodeEnter: (e) => {
|
|
69
72
|
i("onNodeEnter", e);
|
|
70
73
|
},
|
|
@@ -83,27 +86,28 @@ const h = 12, p = {
|
|
|
83
86
|
linkClick: (e) => {
|
|
84
87
|
i("onLinkClick", e);
|
|
85
88
|
}
|
|
86
|
-
}),
|
|
89
|
+
}), r.current.bind("tooltipShow", N), r.current.bind("tooltipHide", h);
|
|
87
90
|
}), () => {
|
|
88
|
-
|
|
91
|
+
r.current && (r.current.destroy(), r.current = null);
|
|
89
92
|
};
|
|
90
|
-
}, [
|
|
93
|
+
}, [k, m, y, v, E, C, b, g, s, u, h, N, i]), t.useImperativeHandle(d, () => ({
|
|
91
94
|
get element() {
|
|
92
|
-
return
|
|
95
|
+
return o.current;
|
|
93
96
|
},
|
|
94
|
-
exportVisual: (l) =>
|
|
95
|
-
props:
|
|
96
|
-
}), []), t.useImperativeHandle(
|
|
97
|
+
exportVisual: (l) => r.current.exportVisual(l),
|
|
98
|
+
props: n
|
|
99
|
+
}), []), t.useImperativeHandle(c, () => d.current), /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(
|
|
97
100
|
"div",
|
|
98
101
|
{
|
|
99
|
-
ref:
|
|
100
|
-
className:
|
|
101
|
-
style:
|
|
102
|
+
ref: o,
|
|
103
|
+
className: n.className,
|
|
104
|
+
style: n.style,
|
|
105
|
+
dir: s
|
|
102
106
|
}
|
|
103
|
-
),
|
|
107
|
+
), L && /* @__PURE__ */ t.createElement(A, { ...L }));
|
|
104
108
|
});
|
|
105
|
-
|
|
106
|
-
|
|
109
|
+
P.propTypes = V;
|
|
110
|
+
P.displayName = "KendoReactSankey";
|
|
107
111
|
export {
|
|
108
|
-
|
|
112
|
+
P as Sankey
|
|
109
113
|
};
|
package/sankey/SankeyTooltip.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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("react"),x=require("@progress/kendo-react-common"),d=require("@progress/kendo-svg-icons"),g=require("@progress/kendo-react-intl"),u=require("./messages.js");function I(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const o in t)if(o!=="default"){const l=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(n,o,l.get?l:{enumerable:!0,get:()=>t[o]})}}return n.default=t,Object.freeze(n)}const e=I(v),T=t=>{const{Content:n,dir:o,offset:l,event:{tooltipData:r,dataItem:b,nodeValue:k}}=t,m=e.useRef(null);return e.useEffect(()=>{const i=m.current;if(!r||!i)return;const f={width:i.offsetWidth,height:i.offsetHeight},a={...r.popupOffset},s=r.popupAlign;a.left+=s.horizontal==="left"?l:-1*l,s.horizontal==="right"&&(a.left-=f.width),s.vertical==="bottom"?a.top-=f.height+l:a.top+=l,i.style.left=`${a.left}px`,i.style.top=`${a.top}px`,i.style.visibility=""},[r]),e.createElement("div",{ref:m,style:{visibility:"hidden"},dir:o,className:"k-tooltip k-sankey-tooltip k-chart-tooltip k-chart-shared-tooltip"},e.createElement("div",{className:"k-tooltip-content"},e.createElement(n,{dir:o,dataItem:b,nodeValue:k})))},h=3,C=`0 ${h}px`,y={display:"flex",alignItems:"center"},p=t=>e.createElement("div",{style:{width:15,height:15,backgroundColor:t.color,display:"inline-flex",marginLeft:h}}),c=t=>e.createElement("span",{style:{margin:C}},t.children),E=t=>g.useInternationalization().format(g.useLocalization().toLanguageString(u.tooltipUnitFormat,u.messages[u.tooltipUnitFormat]),[t||0]),O=t=>{const{color:n,label:o}=t.dataItem;return e.createElement("div",{style:y,className:"k-tooltip-content"},e.createElement(p,{color:n}),e.createElement(c,null,o.text),e.createElement(c,null,E(t.nodeValue)))},S=t=>{const{source:n,target:o,value:l}=t.dataItem,r=t.dir==="rtl"?d.arrowLeftIcon:d.arrowRightIcon;return e.createElement("div",{style:y},e.createElement(p,{color:n.color}),e.createElement(c,null,n.label.text),e.createElement(x.IconWrap,{icon:r,name:r.name}),e.createElement(p,{color:o.color}),e.createElement(c,null,o.label.text),e.createElement(c,null,E(l)))};exports.LinkTooltipContent=S;exports.NodeTooltipContent=O;exports.TooltipComponent=T;
|
package/sankey/SankeyTooltip.mjs
CHANGED
|
@@ -7,28 +7,29 @@
|
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
9
|
import * as t from "react";
|
|
10
|
-
import { IconWrap as
|
|
11
|
-
import { arrowRightIcon as
|
|
12
|
-
import { useInternationalization as
|
|
13
|
-
import { tooltipUnitFormat as
|
|
14
|
-
const
|
|
15
|
-
const { Content: l,
|
|
10
|
+
import { IconWrap as x } from "@progress/kendo-react-common";
|
|
11
|
+
import { arrowLeftIcon as v, arrowRightIcon as k } from "@progress/kendo-svg-icons";
|
|
12
|
+
import { useInternationalization as I, useLocalization as b } from "@progress/kendo-react-intl";
|
|
13
|
+
import { tooltipUnitFormat as u, messages as w } from "./messages.mjs";
|
|
14
|
+
const R = (e) => {
|
|
15
|
+
const { Content: l, dir: o, offset: i, event: { tooltipData: n, dataItem: E, nodeValue: y } } = e, p = t.useRef(null);
|
|
16
16
|
return t.useEffect(() => {
|
|
17
|
-
const
|
|
18
|
-
if (!n || !
|
|
17
|
+
const r = p.current;
|
|
18
|
+
if (!n || !r)
|
|
19
19
|
return;
|
|
20
|
-
const
|
|
21
|
-
|
|
20
|
+
const f = { width: r.offsetWidth, height: r.offsetHeight }, a = { ...n.popupOffset }, s = n.popupAlign;
|
|
21
|
+
a.left += s.horizontal === "left" ? i : -1 * i, s.horizontal === "right" && (a.left -= f.width), s.vertical === "bottom" ? a.top -= f.height + i : a.top += i, r.style.left = `${a.left}px`, r.style.top = `${a.top}px`, r.style.visibility = "";
|
|
22
22
|
}, [n]), /* @__PURE__ */ t.createElement(
|
|
23
23
|
"div",
|
|
24
24
|
{
|
|
25
|
-
ref:
|
|
25
|
+
ref: p,
|
|
26
26
|
style: { visibility: "hidden" },
|
|
27
|
+
dir: o,
|
|
27
28
|
className: "k-tooltip k-sankey-tooltip k-chart-tooltip k-chart-shared-tooltip"
|
|
28
29
|
},
|
|
29
|
-
/* @__PURE__ */ t.createElement("div", { className: "k-tooltip-content" }, /* @__PURE__ */ t.createElement(l, { dataItem:
|
|
30
|
+
/* @__PURE__ */ t.createElement("div", { className: "k-tooltip-content" }, /* @__PURE__ */ t.createElement(l, { dir: o, dataItem: E, nodeValue: y }))
|
|
30
31
|
);
|
|
31
|
-
},
|
|
32
|
+
}, d = 3, z = `0 ${d}px`, h = { display: "flex", alignItems: "center" }, m = (e) => /* @__PURE__ */ t.createElement(
|
|
32
33
|
"div",
|
|
33
34
|
{
|
|
34
35
|
style: {
|
|
@@ -36,18 +37,18 @@ const L = (e) => {
|
|
|
36
37
|
height: 15,
|
|
37
38
|
backgroundColor: e.color,
|
|
38
39
|
display: "inline-flex",
|
|
39
|
-
marginLeft:
|
|
40
|
+
marginLeft: d
|
|
40
41
|
}
|
|
41
42
|
}
|
|
42
|
-
),
|
|
43
|
+
), c = (e) => /* @__PURE__ */ t.createElement("span", { style: { margin: z } }, e.children), g = (e) => I().format(b().toLanguageString(u, w[u]), [e || 0]), S = (e) => {
|
|
43
44
|
const { color: l, label: o } = e.dataItem;
|
|
44
|
-
return /* @__PURE__ */ t.createElement("div", { style:
|
|
45
|
-
},
|
|
46
|
-
const { source: l, target: o, value:
|
|
47
|
-
return /* @__PURE__ */ t.createElement("div", { style:
|
|
45
|
+
return /* @__PURE__ */ t.createElement("div", { style: h, className: "k-tooltip-content" }, /* @__PURE__ */ t.createElement(m, { color: l }), /* @__PURE__ */ t.createElement(c, null, o.text), /* @__PURE__ */ t.createElement(c, null, g(e.nodeValue)));
|
|
46
|
+
}, $ = (e) => {
|
|
47
|
+
const { source: l, target: o, value: i } = e.dataItem, n = e.dir === "rtl" ? v : k;
|
|
48
|
+
return /* @__PURE__ */ t.createElement("div", { style: h }, /* @__PURE__ */ t.createElement(m, { color: l.color }), /* @__PURE__ */ t.createElement(c, null, l.label.text), /* @__PURE__ */ t.createElement(x, { icon: n, name: n.name }), /* @__PURE__ */ t.createElement(m, { color: o.color }), /* @__PURE__ */ t.createElement(c, null, o.label.text), /* @__PURE__ */ t.createElement(c, null, g(i)));
|
|
48
49
|
};
|
|
49
50
|
export {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
$ as LinkTooltipContent,
|
|
52
|
+
S as NodeTooltipContent,
|
|
53
|
+
R as TooltipComponent
|
|
53
54
|
};
|
package/sankey/propTypes.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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("prop-types"),r=e.exact({left:e.number,top:e.number}),i={left:e.number,right:e.number},l={...i,top:e.number,bottom:e.number},o=e.oneOfType([e.number,e.exact(l)]),t=o,n=e.exact({width:e.number,color:e.string,opacity:e.number,dashType:e.string}),s={visible:e.bool,font:e.string,color:e.string,opacity:e.number,align:e.oneOf(["left","right","center"]),position:e.oneOf(["inside","before","after"]),padding:t,margin:e.exact(i),border:n,offset:r},a={color:e.string,opacity:e.number,offset:r,padding:e.number,width:e.number},c={colorType:e.oneOf(["static","source","target"]),color:e.string,opacity:e.number,highlight:e.exact({opacity:e.number,inactiveOpacity:e.number})},
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("prop-types"),r=e.exact({left:e.number,top:e.number}),i={left:e.number,right:e.number},l={...i,top:e.number,bottom:e.number},o=e.oneOfType([e.number,e.exact(l)]),t=o,n=e.exact({width:e.number,color:e.string,opacity:e.number,dashType:e.string}),s={visible:e.bool,font:e.string,color:e.string,opacity:e.number,align:e.oneOf(["left","right","center"]),position:e.oneOf(["inside","before","after"]),padding:t,margin:e.exact(i),border:n,offset:r},a={color:e.string,opacity:e.number,offset:r,padding:e.number,width:e.number},c={colorType:e.oneOf(["static","source","target"]),color:e.string,opacity:e.number,highlight:e.exact({opacity:e.number,inactiveOpacity:e.number})},b=e.exact({text:e.string,...s}),p=e.exact({id:e.oneOfType([e.string,e.number]).isRequired,label:b.isRequired,...a}),u=e.exact({sourceId:e.oneOfType([e.string,e.number]).isRequired,targetId:e.oneOfType([e.string,e.number]).isRequired,value:e.number.isRequired,...c}),d={data:e.exact({nodes:e.arrayOf(p.isRequired).isRequired,links:e.arrayOf(u.isRequired).isRequired}).isRequired,links:e.exact(c),nodes:e.exact(a),labels:e.exact(s),legend:e.exact({align:e.oneOf(["start","center","end"]),background:e.string,border:n,height:e.number,labels:e.object,margin:o,offsetX:e.number,offsetY:e.number,orientation:e.oneOf(["vertical","horizontal"]),padding:t,position:e.oneOf(["top","bottom","left","right","custom"]),reverse:e.bool,visible:e.bool,width:e.number,item:e.object,title:e.object}),title:e.exact({align:e.oneOf(["center","left","right"]),background:e.string,border:n,color:e.string,font:e.string,margin:o,padding:t,position:e.oneOf(["top","bottom"]),text:e.string,visible:e.bool}),tooltip:e.exact({visible:e.bool,offset:e.number,followPointer:e.bool,delay:e.number,linkComponent:e.any,nodeComponent:e.any}),className:e.string,style:e.object,dir:e.string,disableAutoLayout:e.bool,disableKeyboardNavigation:e.bool,onNodeEnter:e.func,onNodeLeave:e.func,onLinkEnter:e.func,onLinkLeave:e.func,onNodeClick:e.func,onLinkClick:e.func};exports.sankeyPropTypes=d;
|
package/sankey/propTypes.mjs
CHANGED
|
@@ -50,12 +50,12 @@ const r = e.exact({
|
|
|
50
50
|
opacity: e.number,
|
|
51
51
|
inactiveOpacity: e.number
|
|
52
52
|
})
|
|
53
|
-
},
|
|
53
|
+
}, b = e.exact({
|
|
54
54
|
text: e.string,
|
|
55
55
|
...s
|
|
56
|
-
}),
|
|
56
|
+
}), p = e.exact({
|
|
57
57
|
id: e.oneOfType([e.string, e.number]).isRequired,
|
|
58
|
-
label:
|
|
58
|
+
label: b.isRequired,
|
|
59
59
|
...a
|
|
60
60
|
}), u = e.exact({
|
|
61
61
|
sourceId: e.oneOfType([e.string, e.number]).isRequired,
|
|
@@ -64,7 +64,7 @@ const r = e.exact({
|
|
|
64
64
|
...c
|
|
65
65
|
}), f = {
|
|
66
66
|
data: e.exact({
|
|
67
|
-
nodes: e.arrayOf(
|
|
67
|
+
nodes: e.arrayOf(p.isRequired).isRequired,
|
|
68
68
|
links: e.arrayOf(u.isRequired).isRequired
|
|
69
69
|
}).isRequired,
|
|
70
70
|
links: e.exact(c),
|
|
@@ -110,7 +110,9 @@ const r = e.exact({
|
|
|
110
110
|
}),
|
|
111
111
|
className: e.string,
|
|
112
112
|
style: e.object,
|
|
113
|
+
dir: e.string,
|
|
113
114
|
disableAutoLayout: e.bool,
|
|
115
|
+
disableKeyboardNavigation: e.bool,
|
|
114
116
|
onNodeEnter: e.func,
|
|
115
117
|
onNodeLeave: e.func,
|
|
116
118
|
onLinkEnter: e.func,
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
-
*-------------------------------------------------------------------------------------------
|
|
7
|
-
*/
|
|
8
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./dom-events.js"),r="Hammerjs is not loaded.Solution: http://www.telerik.com/kendo-react-ui/components/charts/troubleshooting/#toc-installation";class i{static create(t,n){if(typeof window!="undefined"){const e=window.Hammer;if(!e){process.env.NODE_ENV!=="production"&&console.warn(r);return}const o=new e(t,{recognizers:[[e.Tap],[e.Pan],[e.Pinch],[e.Press,{time:0}]]});return new s.DomEvents(o,n)}}}exports.DomEventsBuilder=i;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
-
*-------------------------------------------------------------------------------------------
|
|
7
|
-
*/
|
|
8
|
-
"use client";
|
|
9
|
-
import { DomEvents as r } from "./dom-events.mjs";
|
|
10
|
-
const s = "Hammerjs is not loaded.Solution: http://www.telerik.com/kendo-react-ui/components/charts/troubleshooting/#toc-installation";
|
|
11
|
-
class a {
|
|
12
|
-
static create(n, o) {
|
|
13
|
-
if (typeof window != "undefined") {
|
|
14
|
-
const e = window.Hammer;
|
|
15
|
-
if (!e) {
|
|
16
|
-
process.env.NODE_ENV !== "production" && console.warn(s);
|
|
17
|
-
return;
|
|
18
|
-
}
|
|
19
|
-
const t = new e(n, {
|
|
20
|
-
recognizers: [
|
|
21
|
-
[e.Tap],
|
|
22
|
-
[e.Pan],
|
|
23
|
-
[e.Pinch],
|
|
24
|
-
[e.Press, { time: 0 }]
|
|
25
|
-
]
|
|
26
|
-
});
|
|
27
|
-
return new r(t, o);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
export {
|
|
32
|
-
a as DomEventsBuilder
|
|
33
|
-
};
|
package/events/dom-events.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
-
*-------------------------------------------------------------------------------------------
|
|
7
|
-
*/
|
|
8
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=n=>({x:{location:n.pageX},y:{location:n.pageY}}),g=(n,t)=>{const e=n.pointers,s=e[0],i=s.pageX,a=s.pageY;let r=0;if(e.length>1){const h=e[0],o=e[1];r=Math.sqrt(Math.pow(h.pageX-o.pageX,2)+Math.pow(h.pageY-o.pageY,2))}return{distance:r,event:n.srcEvent,preventDefault:function(){n.preventDefault()},target:n.target,touches:e.map(p),type:n.type,x:{delta:t?i-t.x.location:0,initialDelta:n.deltaX,location:i,startLocation:i-n.deltaX},y:{delta:t?a-t.y.location:0,initialDelta:n.deltaY,location:a,startLocation:a-n.deltaY}}};function d(n,t){for(let e=0;e<n.length;e++)if(t[n[e]])return!0;return!1}const c=[{end:"panend",move:"panmove",start:"panstart"},{gesturechange:"pinchmove",gestureend:"pinchend",gesturestart:"pinchstart"},{press:"press"},{tap:"tap"}];class l{constructor(t,e){this.hammerInstance=t,this.eventHandlers={},this.tap=this.tap.bind(this),this.press=this.press.bind(this),this.panstart=this.panstart.bind(this),this.panmove=this.panmove.bind(this),this.panend=this.panend.bind(this),this.pinchstart=this.pinchstart.bind(this),this.pinchmove=this.pinchmove.bind(this),this.pinchend=this.pinchend.bind(this),e&&this.bind(e)}tap(t){this.trigger("tap",t)}press(t){this.trigger("press",t)}panstart(t){delete this.previous,this.previous=this.trigger("start",t)}panmove(t){this.previous=this.trigger("move",t)}panend(t){this.trigger("end",t),delete this.previous}pinchstart(t){this.trigger("gesturestart",t)}pinchmove(t){this.trigger("gesturechange",t)}pinchend(t){this.trigger("gestureend",t)}trigger(t,e){const s=g(e,this.previous);return this.eventHandlers[t]&&this.eventHandlers[t](s),s}bind(t={}){this.unbind(),this.eventHandlers=t;for(let e=0;e<c.length;e++){const s=c[e],i=Object.keys(s);if(d(i,t))for(let a=0;a<i.length;a++){const r=s[i[a]];this.hammerInstance.on(r,this[r])}}}unbind(){this.hammerInstance&&this.hammerInstance.off(),this.eventHandlers={}}destroy(){this.hammerInstance&&(this.hammerInstance.destroy(),delete this.hammerInstance),delete this.eventHandlers}toggleDrag(t){this.toggle("pan",t)}toggleZoom(t){this.toggle("pinch",t)}toggle(t,e){this.hammerInstance&&this.hammerInstance.get(t).set({enable:e})}}exports.DomEvents=l;
|
package/events/dom-events.mjs
DELETED
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
-
*-------------------------------------------------------------------------------------------
|
|
7
|
-
*/
|
|
8
|
-
"use client";
|
|
9
|
-
const c = (n) => ({
|
|
10
|
-
x: {
|
|
11
|
-
location: n.pageX
|
|
12
|
-
},
|
|
13
|
-
y: {
|
|
14
|
-
location: n.pageY
|
|
15
|
-
}
|
|
16
|
-
}), g = (n, t) => {
|
|
17
|
-
const e = n.pointers, s = e[0], i = s.pageX, a = s.pageY;
|
|
18
|
-
let r = 0;
|
|
19
|
-
if (e.length > 1) {
|
|
20
|
-
const h = e[0], o = e[1];
|
|
21
|
-
r = Math.sqrt(Math.pow(h.pageX - o.pageX, 2) + Math.pow(h.pageY - o.pageY, 2));
|
|
22
|
-
}
|
|
23
|
-
return {
|
|
24
|
-
distance: r,
|
|
25
|
-
event: n.srcEvent,
|
|
26
|
-
preventDefault: function() {
|
|
27
|
-
n.preventDefault();
|
|
28
|
-
},
|
|
29
|
-
target: n.target,
|
|
30
|
-
touches: e.map(c),
|
|
31
|
-
type: n.type,
|
|
32
|
-
x: {
|
|
33
|
-
delta: t ? i - t.x.location : 0,
|
|
34
|
-
initialDelta: n.deltaX,
|
|
35
|
-
location: i,
|
|
36
|
-
startLocation: i - n.deltaX
|
|
37
|
-
},
|
|
38
|
-
y: {
|
|
39
|
-
delta: t ? a - t.y.location : 0,
|
|
40
|
-
initialDelta: n.deltaY,
|
|
41
|
-
location: a,
|
|
42
|
-
startLocation: a - n.deltaY
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
function d(n, t) {
|
|
47
|
-
for (let e = 0; e < n.length; e++)
|
|
48
|
-
if (t[n[e]])
|
|
49
|
-
return !0;
|
|
50
|
-
return !1;
|
|
51
|
-
}
|
|
52
|
-
const p = [{
|
|
53
|
-
end: "panend",
|
|
54
|
-
move: "panmove",
|
|
55
|
-
start: "panstart"
|
|
56
|
-
}, {
|
|
57
|
-
gesturechange: "pinchmove",
|
|
58
|
-
gestureend: "pinchend",
|
|
59
|
-
gesturestart: "pinchstart"
|
|
60
|
-
}, {
|
|
61
|
-
press: "press"
|
|
62
|
-
}, {
|
|
63
|
-
tap: "tap"
|
|
64
|
-
}];
|
|
65
|
-
class l {
|
|
66
|
-
constructor(t, e) {
|
|
67
|
-
this.hammerInstance = t, this.eventHandlers = {}, this.tap = this.tap.bind(this), this.press = this.press.bind(this), this.panstart = this.panstart.bind(this), this.panmove = this.panmove.bind(this), this.panend = this.panend.bind(this), this.pinchstart = this.pinchstart.bind(this), this.pinchmove = this.pinchmove.bind(this), this.pinchend = this.pinchend.bind(this), e && this.bind(e);
|
|
68
|
-
}
|
|
69
|
-
tap(t) {
|
|
70
|
-
this.trigger("tap", t);
|
|
71
|
-
}
|
|
72
|
-
press(t) {
|
|
73
|
-
this.trigger("press", t);
|
|
74
|
-
}
|
|
75
|
-
panstart(t) {
|
|
76
|
-
delete this.previous, this.previous = this.trigger("start", t);
|
|
77
|
-
}
|
|
78
|
-
panmove(t) {
|
|
79
|
-
this.previous = this.trigger("move", t);
|
|
80
|
-
}
|
|
81
|
-
panend(t) {
|
|
82
|
-
this.trigger("end", t), delete this.previous;
|
|
83
|
-
}
|
|
84
|
-
pinchstart(t) {
|
|
85
|
-
this.trigger("gesturestart", t);
|
|
86
|
-
}
|
|
87
|
-
pinchmove(t) {
|
|
88
|
-
this.trigger("gesturechange", t);
|
|
89
|
-
}
|
|
90
|
-
pinchend(t) {
|
|
91
|
-
this.trigger("gestureend", t);
|
|
92
|
-
}
|
|
93
|
-
trigger(t, e) {
|
|
94
|
-
const s = g(e, this.previous);
|
|
95
|
-
return this.eventHandlers[t] && this.eventHandlers[t](s), s;
|
|
96
|
-
}
|
|
97
|
-
bind(t = {}) {
|
|
98
|
-
this.unbind(), this.eventHandlers = t;
|
|
99
|
-
for (let e = 0; e < p.length; e++) {
|
|
100
|
-
const s = p[e], i = Object.keys(s);
|
|
101
|
-
if (d(i, t))
|
|
102
|
-
for (let a = 0; a < i.length; a++) {
|
|
103
|
-
const r = s[i[a]];
|
|
104
|
-
this.hammerInstance.on(r, this[r]);
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
unbind() {
|
|
109
|
-
this.hammerInstance && this.hammerInstance.off(), this.eventHandlers = {};
|
|
110
|
-
}
|
|
111
|
-
destroy() {
|
|
112
|
-
this.hammerInstance && (this.hammerInstance.destroy(), delete this.hammerInstance), delete this.eventHandlers;
|
|
113
|
-
}
|
|
114
|
-
toggleDrag(t) {
|
|
115
|
-
this.toggle("pan", t);
|
|
116
|
-
}
|
|
117
|
-
toggleZoom(t) {
|
|
118
|
-
this.toggle("pinch", t);
|
|
119
|
-
}
|
|
120
|
-
toggle(t, e) {
|
|
121
|
-
this.hammerInstance && this.hammerInstance.get(t).set({
|
|
122
|
-
enable: e
|
|
123
|
-
});
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
export {
|
|
127
|
-
l as DomEvents
|
|
128
|
-
};
|