@progress/kendo-react-charts 9.2.0-develop.8 → 9.2.0-develop.9

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 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"),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;
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 i;const{series:s}=this.optionsStore.getState(),r=s.find(n=>n.name===e.series.name);if(r.drilldownSeriesFactory){const n="onDrilldown";if(this.props.hasOwnProperty(n)){const o={seriesName:r.name,drilldownValue:e.value},c=[...((i=this.props.drilldownState)==null?void 0:i.steps)||[],o],h=this.props.getTarget(),d={...e,currentState:this.props.drilldownState,nextState:{steps:c}},a=new q.DrilldownEvent(d,h);this.props[n].call(void 0,a)}}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:n}=e,o=s[i];if(n===void 0)r=Object.assign({},o,{visible:m.toggle(o.visible)});else{const c=o.pointVisibility=o.pointVisibility||[];c[n]=m.toggle(c[n]),r=Object.assign({},o)}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),n=this.chartInstance.chartService,o=i.locale!==n._intlService.locale,c=Object.entries(t).filter(h=>h[0]!=="dir"&&h[0]!=="children").some(h=>{const[d,a]=h;return!(r.hasOwnProperty(d)&&r[d]===a)});o&&(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"}),n=l.createElement(s,{className:e,style:i,key:"chartElement"},l.createElement("div",{onMouseLeave:this.onChartMouseLeave,ref:o=>this._element=o,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"}),n)}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:n,seriesColors:o,seriesDefaults:c,axisDefaults:h,deriveOptionsFromParent:d}=this.props;let a={};return t!==void 0&&(a.renderAs=t),e!==void 0&&(a.pannable=e),s!==void 0&&(a.zoomable=s),r!==void 0&&(a.paneDefaults=r),i!==void 0&&(a.panes=i),n!==void 0&&(a.transitions=n),o!==void 0&&(a.seriesColors=o),c!==void 0&&(a.seriesDefaults=c),h!==void 0&&(a.axisDefaults=h),a=Object.assign(a,this.optionsStore.getState()),d&&(a=d(a)),a}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),n=this.observersStore.getState();let o=!1;for(let c=0;c<n.length;c++)n[c].trigger(t,e)&&(o=!0);return o===!1&&r&&this.props.hasOwnProperty(i)?(this.props[i].call(void 0,r),r.isDefaultPrevented&&r.isDefaultPrevented()):o}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
@@ -7,7 +7,7 @@
7
7
  */
8
8
  "use client";
9
9
  import * as l from "react";
10
- import f from "prop-types";
10
+ import u from "prop-types";
11
11
  import { provideIntlService as v, registerForIntl as w } from "@progress/kendo-react-intl";
12
12
  import { InstanceObserver as g } from "@progress/kendo-charts";
13
13
  import { validatePackage as I, shouldShowValidationUI as D, WatermarkOverlay as O, canUseDOM as C } from "@progress/kendo-react-common";
@@ -27,18 +27,18 @@ const d = class d extends l.Component {
27
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) => {
28
28
  this.chartInstance !== null && (this.surface = e.sender.surface, this.trigger("render", e));
29
29
  }, this.onDrilldown = (e) => {
30
- var a;
30
+ var i;
31
31
  const { series: s } = this.optionsStore.getState(), r = s.find((n) => n.name === e.series.name);
32
- if (!r.drilldownSeriesFactory)
33
- return !0;
34
- const i = "onDrilldown";
35
- if (this.props.hasOwnProperty(i)) {
36
- const n = { seriesName: r.name, drilldownValue: e.value }, h = [...((a = this.props.drilldownState) == null ? void 0 : a.steps) || [], n], c = this.props.getTarget(), p = {
37
- ...e,
38
- currentState: this.props.drilldownState,
39
- nextState: { steps: h }
40
- }, o = new W(p, c);
41
- this.props[i].call(void 0, o);
32
+ if (r.drilldownSeriesFactory) {
33
+ const n = "onDrilldown";
34
+ if (this.props.hasOwnProperty(n)) {
35
+ const o = { seriesName: r.name, drilldownValue: e.value }, h = [...((i = this.props.drilldownState) == null ? void 0 : i.steps) || [], o], c = this.props.getTarget(), p = {
36
+ ...e,
37
+ currentState: this.props.drilldownState,
38
+ nextState: { steps: h }
39
+ }, a = new W(p, c);
40
+ this.props[n].call(void 0, a);
41
+ }
42
42
  }
43
43
  return !0;
44
44
  }, this.onLegendItemClick = (e) => {
@@ -50,12 +50,12 @@ const d = class d extends l.Component {
50
50
  if (!s)
51
51
  return;
52
52
  let r = {};
53
- const { seriesIndex: i, pointIndex: a } = e, n = s[i];
54
- if (a === void 0)
55
- r = Object.assign({}, n, { visible: S(n.visible) });
53
+ const { seriesIndex: i, pointIndex: n } = e, o = s[i];
54
+ if (n === void 0)
55
+ r = Object.assign({}, o, { visible: S(o.visible) });
56
56
  else {
57
- const h = n.pointVisibility = n.pointVisibility || [];
58
- h[a] = S(h[a]), r = Object.assign({}, n);
57
+ const h = o.pointVisibility = o.pointVisibility || [];
58
+ h[n] = S(h[n]), r = Object.assign({}, o);
59
59
  }
60
60
  this.optionsStore.dispatch({
61
61
  chartCollectionIdxKey: `series_${i}`,
@@ -116,28 +116,28 @@ const d = class d extends l.Component {
116
116
  componentDidUpdate(t) {
117
117
  const { dir: e, children: s, ...r } = this.props;
118
118
  if (this.chartInstance !== null) {
119
- const i = v(this), a = this.chartInstance.chartService, n = i.locale !== a._intlService.locale, h = Object.entries(t).filter((c) => c[0] !== "dir" && c[0] !== "children").some((c) => {
120
- const [p, o] = c;
121
- return !(r.hasOwnProperty(p) && r[p] === o);
119
+ const i = v(this), n = this.chartInstance.chartService, o = i.locale !== n._intlService.locale, h = Object.entries(t).filter((c) => c[0] !== "dir" && c[0] !== "children").some((c) => {
120
+ const [p, a] = c;
121
+ return !(r.hasOwnProperty(p) && r[p] === a);
122
122
  });
123
- n && (this.chartInstance.chartService._intlService = i, this.chartInstance.chartService.format._intlService = i, h || this.chartInstance.noTransitionsRedraw()), h && this.refresh(), t.dir !== e && this.chartInstance.setDirection(this.getDirection(e));
123
+ o && (this.chartInstance.chartService._intlService = i, this.chartInstance.chartService.format._intlService = i, h || this.chartInstance.noTransitionsRedraw()), h && this.refresh(), t.dir !== e && this.chartInstance.setDirection(this.getDirection(e));
124
124
  }
125
125
  }
126
126
  /**
127
127
  * @hidden
128
128
  */
129
129
  render() {
130
- const { style: t = {}, className: e, wrapper: s, children: r } = this.props, i = Object.assign({}, t, { position: "relative" }), a = l.createElement(
130
+ const { style: t = {}, className: e, wrapper: s, children: r } = this.props, i = Object.assign({}, t, { position: "relative" }), n = l.createElement(
131
131
  s,
132
132
  {
133
133
  className: e,
134
134
  style: i,
135
135
  key: "chartElement"
136
136
  },
137
- /* @__PURE__ */ l.createElement("div", { onMouseLeave: this.onChartMouseLeave, ref: (n) => this._element = n, className: "k-chart-surface" }, r),
137
+ /* @__PURE__ */ l.createElement("div", { onMouseLeave: this.onChartMouseLeave, ref: (o) => this._element = o, className: "k-chart-surface" }, r),
138
138
  /* @__PURE__ */ l.createElement(l.Fragment, null, this.showLicenseWatermark && /* @__PURE__ */ l.createElement(O, null))
139
139
  );
140
- return /* @__PURE__ */ l.createElement(M.Provider, { value: this.state }, /* @__PURE__ */ l.createElement(U, { key: "seriesTooltip" }), /* @__PURE__ */ l.createElement(R, { key: "crosshairTooltips" }), a);
140
+ return /* @__PURE__ */ l.createElement(M.Provider, { value: this.state }, /* @__PURE__ */ l.createElement(U, { key: "seriesTooltip" }), /* @__PURE__ */ l.createElement(R, { key: "crosshairTooltips" }), n);
141
141
  }
142
142
  /**
143
143
  * @hidden
@@ -155,14 +155,14 @@ const d = class d extends l.Component {
155
155
  zoomable: s,
156
156
  paneDefaults: r,
157
157
  panes: i,
158
- transitions: a,
159
- seriesColors: n,
158
+ transitions: n,
159
+ seriesColors: o,
160
160
  seriesDefaults: h,
161
161
  axisDefaults: c,
162
162
  deriveOptionsFromParent: p
163
163
  } = this.props;
164
- let o = {};
165
- 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), h !== void 0 && (o.seriesDefaults = h), c !== void 0 && (o.axisDefaults = c), o = Object.assign(o, this.optionsStore.getState()), p && (o = p(o)), o;
164
+ let a = {};
165
+ return t !== void 0 && (a.renderAs = t), e !== void 0 && (a.pannable = e), s !== void 0 && (a.zoomable = s), r !== void 0 && (a.paneDefaults = r), i !== void 0 && (a.panes = i), n !== void 0 && (a.transitions = n), o !== void 0 && (a.seriesColors = o), h !== void 0 && (a.seriesDefaults = h), c !== void 0 && (a.axisDefaults = c), a = Object.assign(a, this.optionsStore.getState()), p && (a = p(a)), a;
166
166
  }
167
167
  /**
168
168
  * @hidden
@@ -190,11 +190,11 @@ const d = class d extends l.Component {
190
190
  * @hidden
191
191
  */
192
192
  trigger(t, e) {
193
- const s = this.props.getTarget(), r = E(t, e, s), i = "on" + t.charAt(0).toUpperCase() + t.slice(1), a = this.observersStore.getState();
194
- let n = !1;
195
- for (let h = 0; h < a.length; h++)
196
- a[h].trigger(t, e) && (n = !0);
197
- return n === !1 && r && this.props.hasOwnProperty(i) ? (this.props[i].call(void 0, r), r.isDefaultPrevented && r.isDefaultPrevented()) : n;
193
+ const s = this.props.getTarget(), r = E(t, e, s), i = "on" + t.charAt(0).toUpperCase() + t.slice(1), n = this.observersStore.getState();
194
+ let o = !1;
195
+ for (let h = 0; h < n.length; h++)
196
+ n[h].trigger(t, e) && (o = !0);
197
+ return o === !1 && r && this.props.hasOwnProperty(i) ? (this.props[i].call(void 0, r), r.isDefaultPrevented && r.isDefaultPrevented()) : o;
198
198
  }
199
199
  /* Used by (event)InstanceObserver to check the wrapper for supported events */
200
200
  /**
@@ -221,13 +221,13 @@ const d = class d extends l.Component {
221
221
  }
222
222
  };
223
223
  d.propTypes = {
224
- dir: f.string,
225
- renderAs: f.oneOf(["svg", "canvas"])
224
+ dir: u.string,
225
+ renderAs: u.oneOf(["svg", "canvas"])
226
226
  }, d.defaultProps = {
227
227
  renderAs: "svg"
228
228
  };
229
- let u = d;
230
- w(u);
229
+ let f = d;
230
+ w(f);
231
231
  export {
232
- u as BaseChart
232
+ f as BaseChart
233
233
  };
@@ -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,r,s,a,n,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 a=e[t];if(a&&Array.isArray(a))for(const e of a)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}},C=class extends m{constructor(e,t){super(t),this.axisRanges=e.axisRanges,this.nativeEvent=e.originalEvent}},f=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}},N=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)}},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}},O=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}},K=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:C,dragStart:f,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:N,render:_,select:D,selectEnd:T,selectStart:A,seriesClick:O,seriesHover:K,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 z{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),a=H(t);return a!==r&&(e[s]=a),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 U=e=>{let t,r,s=[];const a=a=>{t=e(t,a),n.canUseDOM&&(window.clearTimeout(r),r=window.setTimeout((()=>s.forEach((e=>e()))),16.666666666666668))};return a({}),{getState:()=>t,dispatch:a,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,a]=t.chartCollectionIdxKey.split("_"),n=e[s].map(((e,s)=>parseInt(a,10)===s?(r=!0,t.payload):e));return!1===r&&n.splice(parseInt(a,10),0,t.payload),Object.assign(e,{[s]:n})},themeItem(e,t){let r={};const s=Object.assign(r,e),{field:a,value:n}=t.payload,o=a.split(".");let i=o.shift();for(;o.length>0;)r=r[i]=r[i]||{},i=o.shift();return r[i]=n,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:a,points:n}=e;return h.createElement("table",null,h.createElement("thead",null,h.createElement("tr",null,h.createElement("th",{colSpan:s},t))),h.createElement("tbody",null,n.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}})),a&&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 a.InstanceObserver(this,{onMouseLeave:"onChartMouseLeave"}),t.observersStore.dispatch({type:"add",payload:this.chartObserver})}render(){const{popupShown:e,popupAlign:t,popupOffset:r,popupStyles:s,popupContent:a,className:n}=this.props,i=[Q,n].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},a()))}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 a.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,a=this.state.popupShown?()=>{const r=this.findRenderFunction();if(t)return null!==r?r(e):h.createElement(Z,{...e});const s=e.point,a=this.findRenderFunctionByIndex(s.series.index);return null!==a?a(e):null!==r?r(e):h.createElement("span",{dangerouslySetInnerHTML:{__html:e.point.formattedValue}})}:Function.prototype,o=n.classNames({"k-chart-shared-tooltip":t,"k-chart-tooltip-inverse":!!r});return h.createElement(te,{...s,popupContent:a,className:o})}componentWillUnmount(){this.context.observersStore.dispatch({type:"remove",payload:this.chartObserver})}onShowTooltip(e){const{anchor:t,style:r,shared:s,className:a,crosshair:n}=e;let o;n||(o=s?this.createSharedTooltipContext(e):this.createTooltipContext(e),this.setState({popupShown:!0,popupAlign:t.align,popupOffset:t.point,popupContext:o,popupStyles:r,className:a,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,a=e.series.length>1;let n=1;return s&&n++,a&&n++,{categoryText:r,colorMarker:a,colspan:n,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 ae=e=>e.children;ae.displayName="Container";const ne=class extends h.Component{constructor(e,t){super(e,t),this.context=null,this.state={popupShown:!1},this.chartObserver=new a.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,a=n.classNames({"k-chart-crosshair-tooltip":!0,"k-chart-tooltip-inverse":!!t});return h.createElement(te,{...r,popupContent:s,className:a})}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:a,axisName:n,axisIndex:o,value:i}=e,{name:l,index:c}=this.props;a&&n===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})}};ne.contextType=G;let oe=ne;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 a=(s[e].crosshair||{}).tooltip;a&&a.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(ae,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 a="onDrilldown";if(this.props.hasOwnProperty(a)){const r={seriesName:s.name,drilldownValue:e.value},n=[...(null==(t=this.props.drilldownState)?void 0:t.steps)||[],r],o=this.props.getTarget(),i={...e,currentState:this.props.drilldownState,nextState:{steps:n}},l=new b(i,o);this.props[a].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:a}=e,n=t[s];if(void 0===a)r=Object.assign({},n,{visible:u(n.visible)});else{const e=n.pointVisibility=n.pointVisibility||[];e[a]=u(e[a]),r=Object.assign({},n)}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},n.validatePackage(pe),this.showLicenseWatermark=n.shouldShowValidationUI(pe),this.optionsStore=U(B),this.observersStore=U(W),this.childrenObserver=new a.InstanceObserver(this,{onMouseLeave:"onChildMouseLeave"}),this.state={optionsStore:this.optionsStore,observersStore:this.observersStore,childrenObserver:this.childrenObserver,drilldownState:{steps:[]}},this.themeStore=U($),this.chartObserver=new a.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 z(e);if(void 0===r)return void e.dispatch({type:"push",payload:a.chartBaseTheme()});const n=s.element=r.createElement("div");n.style.display="none",n.innerHTML=M,r.body.appendChild(n);try{e.dispatch({type:"push",payload:a.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,...a}=this.props;if(null!==this.chartInstance){const r=s.provideIntlService(this),n=this.chartInstance.chartService,o=r.locale!==n._intlService.locale,i=Object.entries(e).filter((e=>"dir"!==e[0]&&"children"!==e[0])).some((e=>{const[t,r]=e;return!(a.hasOwnProperty(t)&&a[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,a=Object.assign({},e,{position:"relative"}),o=h.createElement(r,{className:t,style:a,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(n.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:n.canUseDOM&&window.getComputedStyle(this.element).direction||"ltr")}getChartOptions(){const{renderAs:e,pannable:t,zoomable:r,paneDefaults:s,panes:a,transitions:n,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!==a&&(h.panes=a),void 0!==n&&(h.transitions=n),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),a=this.observersStore.getState();let n=!1;for(let r=0;r<a.length;r++)a[r].trigger(e,t)&&(n=!0);return!1===n&&r&&this.props.hasOwnProperty(s)?(this.props[s].call(void 0,r),r.isDefaultPrevented&&r.isDefaultPrevented()):n}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 a=0;a<r.length;a++)r[a].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 a.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,a=e.sender._plotArea.charts;if(!s||"donut"!==s.type||0===a[0].points.length)return;const n=a[0].points[0].sector,o=n.innerRadius,i=n.center.y-o,l=n.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:a.Chart,getTarget:this.getTarget,wrapper:"div",className:n.classNames("k-chart k-widget",r)},t,h.createElement(ye,{render:e}))}},Ce=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 a.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:a.Sparkline,getTarget:this.getTarget,wrapper:"span",deriveOptionsFromParent:this.deriveOptionsFromParent,className:n.classNames("k-sparkline k-widget",r)},e)}};const fe={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||{},fe);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:a.StockChart,getTarget:this.getTarget,wrapper:"div",deriveOptionsFromParent:this.deriveOptionsFromParent,onRefresh:this.onRefresh,className:n.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:a}=this.props,n={...e.props,_chartCollectionIdxKey:`${s}_${t}`,_parentStore:a};return h.cloneElement(e,n,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=U(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,...a}=this.props;(r||this.optionsStore).dispatch({chartKey:e,chartCollectionIdxKey:t,payload:Object.assign({},a,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),a={valueField:_e.valueField,textField:_e.textField,iconField:_e.iconField,iconClassField:_e.iconClassField,...e};h.useImperativeHandle(r,(()=>({element:s.current,props:a}))),h.useImperativeHandle(t,(()=>r.current));let o=[{id:"0",...e.rootItem||{text:"Home",icon:h.createElement(n.SvgIcon,{icon:l.homeIcon,style:{marginInlineEnd:"4px"}})}}];e.drilldownState&&(o=[...o,...e.drilldownState.steps.map(((e,t)=>({id:(t+1).toString(),text:e.drilldownValue})))]);const c={...a,data:o};return h.createElement("div",null,h.createElement(i.Breadcrumb,{...c,onItemSelect:t=>{var r;const s="onDrilldownStateChange";if(e.hasOwnProperty(s)){const a=o.findIndex((e=>e.id===t.id)),n={steps:((null==(r=e.drilldownState)?void 0:r.steps)||[]).slice(0,a)},i=new Ie({currentState:e.drilldownState,nextState:n});e[s].call(void 0,i)}}}))})),Ne={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},_e={valueField:"id",textField:"text",iconField:"icon",iconClassField:"iconClass",data:[]};we.displayName="KendoReactChartBreadcrumb",we.propTypes=Ne;const De="charts.nodata",Te={[De]:"No data available."},Ae=e=>{const t=s.useLocalization();return h.createElement("div",{className:n.classNames("k-chart-overlay",e.className),style:{display:"none",...e.style}},h.createElement("div",{className:"k-no-data"},void 0===e.children?t.toLanguageString(De,Te[De]):e.children))};Ae.displayName="ChartNoDataOverlay";const Oe=e=>h.createElement(ke,{...e,_chartKey:"title"});Oe.displayName="ChartAxisDefaultsTitle";const Ke=e=>h.createElement(ke,{...e,_chartKey:"labels"});Ke.displayName="ChartAxisDefaultsLabels";const Le=e=>h.createElement(ke,{visible:!0,...e,_chartKey:"crosshair"});Le.displayName="ChartAxisDefaultsCrosshair";const Re=e=>h.createElement(ke,{visible:!0,...e,_chartKey:"tooltip"});Re.displayName="ChartAxisDefaultsCrosshairTooltip";const Pe=e=>h.createElement(ke,{...e,_chartKey:"title"});Pe.displayName="ChartCategoryAxisTitle";const Fe=e=>h.createElement(ke,{...e,_chartKey:"title"});Fe.displayName="ChartPaneDefaultsTitle";const qe=e=>h.createElement(ke,{...e,_chartKey:"item"});qe.displayName="ChartLegendItem";const je=e=>h.createElement(ke,{...e,_chartKey:"title"});je.displayName="ChartLegendTitle";const Ve=e=>h.createElement(ke,{...e,_chartKey:"inactiveItems"});Ve.displayName="ChartLegendInactiveItems";const He=e=>h.createElement(ke,{...e,_chartKey:"title"});He.displayName="ChartValueAxisTitle";const Me=e=>h.createElement(ke,{...e,_chartKey:"title"});Me.displayName="ChartXAxisTitle";const ze=e=>h.createElement(ke,{...e,_chartKey:"title"});ze.displayName="ChartYAxisTitle";const Ue=e=>h.createElement(ke,{...e,_chartKey:"categoryAxis"});Ue.displayName="ChartNavigatorCategoryAxis";const Be=e=>h.createElement(ke,{...e,_chartKey:"pane"});Be.displayName="ChartNavigatorPane";const $e=e=>h.createElement(ke,{...e});$e.displayName="ChartNavigatorSeriesItem";const We=e=>h.createElement(Se,{...e,_chartKey:"series"});We.propTypes={children:function(e,t,r){return p(e,t,r,$e)}};const Xe=e=>h.createElement(ke,{...e,_chartKey:"chartArea"});Xe.displayName="ChartArea";const Ye=e=>h.createElement(ke,{...e});Ye.displayName="ChartCategoryAxisItem";const Ze=e=>h.createElement(Se,{...e,_chartKey:"categoryAxis"});Ze.propTypes={children:function(e,t,r){return p(e,t,r,Ye)}},Ze.displayName="ChartCategoryAxis";const Ge=e=>h.createElement(ke,{visible:!0,...e,_chartKey:"legend"});Ge.displayName="ChartLegend";const Je=e=>h.createElement(ke,{visible:!0,position:"bottom",...e,_chartKey:"navigator"});Je.displayName="ChartNavigator";const Qe=e=>h.createElement(ke,{...e});Qe.displayName="ChartPane";const et=e=>h.createElement(ke,{...e,_chartKey:"paneDefaults"});et.displayName="ChartPaneDefaults";const tt=e=>h.createElement(Se,{...e,_chartKey:"panes"});tt.propTypes={children:function(e,t,r){return p(e,t,r,Qe)}};const rt=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})))};rt.displayName="ChartSeriesItem";const st=e=>h.createElement(Se,{...e,_chartKey:"series"});st.propTypes={children:function(e,t,r){return p(e,t,r,rt)}},st.displayName="ChartSeries";const at=e=>h.createElement(ke,{...e,_chartKey:"subtitle"});at.displayName="ChartSubtitle";const nt=e=>h.createElement(ke,{...e,_chartKey:"title"});nt.displayName="ChartTitle";const ot=e=>h.createElement(ke,{visible:!0,...e,_chartKey:"tooltip"});ot.displayName="ChartTooltip";const it=e=>h.createElement(ke,{...e});it.displayName="ChartValueAxisItem";const lt=e=>h.createElement(Se,{...e,_chartKey:"valueAxis"});lt.propTypes={children:function(e,t,r){return p(e,t,r,it)}},lt.displayName="ChartValueAxis";const ct=e=>h.createElement(ke,{...e});ct.displayName="ChartXAxisItem";const ht=e=>h.createElement(Se,{...e,_chartKey:"xAxis"});ht.prototype={children:function(e,t,r){return p(e,t,r,ct)}},ht.displayName="ChartXAxis";const dt=e=>h.createElement(ke,{...e});dt.displayName="ChartYAxisItem";const pt=e=>h.createElement(Se,{...e,_chartKey:"yAxis"});pt.propTypes={children:function(e,t,r){return p(e,t,r,dt)}},pt.displayName="ChartYAxis";const ut=e=>`${e.fontWeight} ${e.fontSize} ${e.fontFamily}`,mt=e=>window.getComputedStyle(e).backgroundColor,vt=`\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 yt=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 a=r.pop();a&&(s[a]=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=ut(this.queryStyle("chart-title-font")),t=ut(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=mt(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),a=mt(t);return a!==r&&(e[s]=a),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 gt=(e,t)=>{const r={nodeColors:[]},s=new yt(r),a=s.element=e.createElement("div");a.style.display="none",a.innerHTML=vt,e.body.appendChild(a);try{s.setColors(),s.setFonts(),s.setNodeColors()}finally{e.body.removeChild(s.element),s.element=null,t(r)}},Ct=r.exact({left:r.number,top:r.number}),ft={left:r.number,right:r.number},bt={...ft,top:r.number,bottom:r.number},xt=r.oneOfType([r.number,r.exact(bt)]),St=xt,Et=r.exact({width:r.number,color:r.string,opacity:r.number,dashType:r.string}),kt={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:St,margin:r.exact(ft),border:Et,offset:Ct},It={color:r.string,opacity:r.number,offset:Ct,padding:r.number,width:r.number},wt={colorType:r.oneOf(["static","source","target"]),color:r.string,opacity:r.number,highlight:r.exact({opacity:r.number,inactiveOpacity:r.number})},Nt=r.exact({text:r.string,...kt}),_t=r.exact({id:r.oneOfType([r.string,r.number]).isRequired,label:Nt.isRequired,...It}),Dt=r.exact({sourceId:r.oneOfType([r.string,r.number]).isRequired,targetId:r.oneOfType([r.string,r.number]).isRequired,value:r.number.isRequired,...wt}),Tt={data:r.exact({nodes:r.arrayOf(_t.isRequired).isRequired,links:r.arrayOf(Dt.isRequired).isRequired}).isRequired,links:r.exact(wt),nodes:r.exact(It),labels:r.exact(kt),legend:r.exact({align:r.oneOf(["start","center","end"]),background:r.string,border:Et,height:r.number,labels:r.object,margin:xt,offsetX:r.number,offsetY:r.number,orientation:r.oneOf(["vertical","horizontal"]),padding:St,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:Et,color:r.string,font:r.string,margin:xt,padding:St,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},At="sankey.tooltipUnitFormat",Ot={[At]:"({0} units)"},Kt=e=>{const{Content:t,dir:r,offset:s,event:{tooltipData:a,dataItem:n,nodeValue:o}}=e,i=h.useRef(null);return h.useEffect((()=>{const e=i.current;if(!a||!e)return;const t=e.offsetWidth,r=e.offsetHeight,n={...a.popupOffset},o=a.popupAlign;n.left+="left"===o.horizontal?s:-1*s,"right"===o.horizontal&&(n.left-=t),"bottom"===o.vertical?n.top-=r+s:n.top+=s,e.style.left=`${n.left}px`,e.style.top=`${n.top}px`,e.style.visibility=""}),[a]),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:n,nodeValue:o})))},Lt={display:"flex",alignItems:"center"},Rt=e=>h.createElement("div",{style:{width:15,height:15,backgroundColor:e.color,display:"inline-flex",marginLeft:3}}),Pt=e=>h.createElement("span",{style:{margin:"0 3px"}},e.children),Ft=e=>s.useInternationalization().format(s.useLocalization().toLanguageString(At,Ot[At]),[e||0]),qt=e=>{const{color:t,label:r}=e.dataItem;return h.createElement("div",{style:Lt,className:"k-tooltip-content"},h.createElement(Rt,{color:t}),h.createElement(Pt,null,r.text),h.createElement(Pt,null,Ft(e.nodeValue)))},jt=e=>{const{source:t,target:r,value:s}=e.dataItem,a="rtl"===e.dir?l.arrowLeftIcon:l.arrowRightIcon;return h.createElement("div",{style:Lt},h.createElement(Rt,{color:t.color}),h.createElement(Pt,null,t.label.text),h.createElement(n.IconWrap,{icon:a,name:a.name}),h.createElement(Rt,{color:r.color}),h.createElement(Pt,null,r.label.text),h.createElement(Pt,null,Ft(s)))},Vt=12,Ht={offset:Vt,visible:!0},Mt=["nodeEnter","nodeLeave","linkEnter","linkLeave","nodeClick","linkClick"],zt=h.forwardRef(((e,t)=>{n.validatePackage(pe);const r=h.useRef(null),s=h.useRef(null),o=n.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=Ht,disableAutoLayout:y,disableKeyboardNavigation:g}=e,C=h.useRef();C.current=e;const[f,b]=h.useState(null),x=h.useCallback((e=>{const{visible:t,offset:r=Vt,nodeComponent:s=qt,linkComponent:a=jt}={...Ht,...v};if(t){const t={event:e,offset:r,dir:o,Content:"node"===e.targetType?s:a};b(t)}}),[v,o]),S=h.useCallback((()=>{b(null)}),[]),E=h.useCallback(((e,t)=>{const r=C.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:{...Ht,...v}};return s.current?s.current.setOptions(e):n.canUseDOM&&r.current&&gt(r.current.ownerDocument,(t=>{s.current=new a.Sankey(r.current,e,t),((e,t)=>{e&&(e.unbind(),Mt.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}),f&&h.createElement(Kt,{...f}))}));zt.propTypes=Tt,zt.displayName="KendoReactSankey";const Ut=a.createSankeyData;e.AxisLabelClickEvent=v,e.Chart=ge,e.ChartArea=Xe,e.ChartAxisDefaults=e=>h.createElement(ke,{...e,_chartKey:"axisDefaults"}),e.ChartAxisDefaultsCrosshair=Le,e.ChartAxisDefaultsCrosshairTooltip=Re,e.ChartAxisDefaultsLabels=Ke,e.ChartAxisDefaultsTitle=Oe,e.ChartBreadcrumb=we,e.ChartCategoryAxis=Ze,e.ChartCategoryAxisCrosshair=e=>h.createElement(ke,{visible:!0,...e,_chartKey:"crosshair"}),e.ChartCategoryAxisCrosshairTooltip=e=>h.createElement(ke,{visible:!0,...e,_chartKey:"tooltip"}),e.ChartCategoryAxisItem=Ye,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=Pe,e.ChartLegend=Ge,e.ChartLegendInactiveItems=Ve,e.ChartLegendItem=qe,e.ChartLegendTitle=je,e.ChartNavigator=Je,e.ChartNavigatorCategoryAxis=Ue,e.ChartNavigatorHint=e=>h.createElement(ke,{...e,_chartKey:"hint"}),e.ChartNavigatorPane=Be,e.ChartNavigatorSelect=e=>h.createElement(ke,{...e,_chartKey:"select"}),e.ChartNavigatorSeries=We,e.ChartNavigatorSeriesItem=$e,e.ChartNoDataOverlay=Ae,e.ChartPane=Qe,e.ChartPaneDefaults=et,e.ChartPaneDefaultsTitle=Fe,e.ChartPanes=tt,e.ChartPlotArea=e=>h.createElement(ke,{...e,_chartKey:"plotArea"}),e.ChartSeries=st,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=rt,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=at,e.ChartTitle=nt,e.ChartTooltip=ot,e.ChartValueAxis=lt,e.ChartValueAxisCrosshair=e=>h.createElement(ke,{visible:!0,...e,_chartKey:"crosshair"}),e.ChartValueAxisCrosshairTooltip=e=>h.createElement(ke,{visible:!0,...e,_chartKey:"tooltip"}),e.ChartValueAxisItem=it,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=He,e.ChartXAxis=ht,e.ChartXAxisCrosshair=e=>h.createElement(ke,{visible:!0,...e,_chartKey:"crosshair"}),e.ChartXAxisCrosshairTooltip=e=>h.createElement(ke,{visible:!0,...e,_chartKey:"tooltip"}),e.ChartXAxisItem=ct,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=Me,e.ChartYAxis=pt,e.ChartYAxisCrosshair=e=>h.createElement(ke,{visible:!0,...e,_chartKey:"crosshair"}),e.ChartYAxisCrosshairTooltip=e=>h.createElement(ke,{visible:!0,...e,_chartKey:"tooltip"}),e.ChartYAxisItem=dt,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=ze,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=C,e.DragEvent=g,e.DragStartEvent=f,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=N,e.RenderEvent=_,e.Sankey=zt,e.SelectEndEvent=T,e.SelectEvent=D,e.SelectStartEvent=A,e.SeriesClickEvent=O,e.SeriesHoverEvent=K,e.SeriesTooltip=se,e.SharedTooltipContent=Z,e.Sparkline=Ce,e.StockChart=be,e.TooltipPoint=Y,e.TooltipPopup=te,e.ZoomEndEvent=R,e.ZoomEvent=L,e.ZoomStartEvent=P,e.createSankeyData=Ut,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,a,n,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 a=e[t];if(a&&Array.isArray(a))for(const e of a)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}},C=class extends m{constructor(e,t){super(t),this.axisRanges=e.axisRanges,this.nativeEvent=e.originalEvent}},f=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}},N=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)}},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}},O=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}},K=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:C,dragStart:f,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:N,render:_,select:D,selectEnd:T,selectStart:A,seriesClick:O,seriesHover:K,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 z{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),a=H(t);return a!==r&&(e[s]=a),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 U=e=>{let t,r,s=[];const a=a=>{t=e(t,a),n.canUseDOM&&(window.clearTimeout(r),r=window.setTimeout((()=>s.forEach((e=>e()))),16.666666666666668))};return a({}),{getState:()=>t,dispatch:a,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,a]=t.chartCollectionIdxKey.split("_"),n=e[s].map(((e,s)=>parseInt(a,10)===s?(r=!0,t.payload):e));return!1===r&&n.splice(parseInt(a,10),0,t.payload),Object.assign(e,{[s]:n})},themeItem(e,t){let r={};const s=Object.assign(r,e),{field:a,value:n}=t.payload,o=a.split(".");let i=o.shift();for(;o.length>0;)r=r[i]=r[i]||{},i=o.shift();return r[i]=n,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:a,points:n}=e;return h.createElement("table",null,h.createElement("thead",null,h.createElement("tr",null,h.createElement("th",{colSpan:s},t))),h.createElement("tbody",null,n.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}})),a&&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 a.InstanceObserver(this,{onMouseLeave:"onChartMouseLeave"}),t.observersStore.dispatch({type:"add",payload:this.chartObserver})}render(){const{popupShown:e,popupAlign:t,popupOffset:r,popupStyles:s,popupContent:a,className:n}=this.props,i=[Q,n].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},a()))}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 a.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,a=this.state.popupShown?()=>{const r=this.findRenderFunction();if(t)return null!==r?r(e):h.createElement(Z,{...e});const s=e.point,a=this.findRenderFunctionByIndex(s.series.index);return null!==a?a(e):null!==r?r(e):h.createElement("span",{dangerouslySetInnerHTML:{__html:e.point.formattedValue}})}:Function.prototype,o=n.classNames({"k-chart-shared-tooltip":t,"k-chart-tooltip-inverse":!!r});return h.createElement(te,{...s,popupContent:a,className:o})}componentWillUnmount(){this.context.observersStore.dispatch({type:"remove",payload:this.chartObserver})}onShowTooltip(e){const{anchor:t,style:r,shared:s,className:a,crosshair:n}=e;let o;n||(o=s?this.createSharedTooltipContext(e):this.createTooltipContext(e),this.setState({popupShown:!0,popupAlign:t.align,popupOffset:t.point,popupContext:o,popupStyles:r,className:a,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,a=e.series.length>1;let n=1;return s&&n++,a&&n++,{categoryText:r,colorMarker:a,colspan:n,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 ae=e=>e.children;ae.displayName="Container";const ne=class extends h.Component{constructor(e,t){super(e,t),this.context=null,this.state={popupShown:!1},this.chartObserver=new a.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,a=n.classNames({"k-chart-crosshair-tooltip":!0,"k-chart-tooltip-inverse":!!t});return h.createElement(te,{...r,popupContent:s,className:a})}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:a,axisName:n,axisIndex:o,value:i}=e,{name:l,index:c}=this.props;a&&n===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})}};ne.contextType=G;let oe=ne;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 a=(s[e].crosshair||{}).tooltip;a&&a.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(ae,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){const r="onDrilldown";if(this.props.hasOwnProperty(r)){const a={seriesName:s.name,drilldownValue:e.value},n=[...(null==(t=this.props.drilldownState)?void 0:t.steps)||[],a],o=this.props.getTarget(),i={...e,currentState:this.props.drilldownState,nextState:{steps:n}},l=new b(i,o);this.props[r].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:a}=e,n=t[s];if(void 0===a)r=Object.assign({},n,{visible:u(n.visible)});else{const e=n.pointVisibility=n.pointVisibility||[];e[a]=u(e[a]),r=Object.assign({},n)}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},n.validatePackage(pe),this.showLicenseWatermark=n.shouldShowValidationUI(pe),this.optionsStore=U(B),this.observersStore=U(W),this.childrenObserver=new a.InstanceObserver(this,{onMouseLeave:"onChildMouseLeave"}),this.state={optionsStore:this.optionsStore,observersStore:this.observersStore,childrenObserver:this.childrenObserver,drilldownState:{steps:[]}},this.themeStore=U($),this.chartObserver=new a.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 z(e);if(void 0===r)return void e.dispatch({type:"push",payload:a.chartBaseTheme()});const n=s.element=r.createElement("div");n.style.display="none",n.innerHTML=M,r.body.appendChild(n);try{e.dispatch({type:"push",payload:a.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,...a}=this.props;if(null!==this.chartInstance){const r=s.provideIntlService(this),n=this.chartInstance.chartService,o=r.locale!==n._intlService.locale,i=Object.entries(e).filter((e=>"dir"!==e[0]&&"children"!==e[0])).some((e=>{const[t,r]=e;return!(a.hasOwnProperty(t)&&a[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,a=Object.assign({},e,{position:"relative"}),o=h.createElement(r,{className:t,style:a,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(n.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:n.canUseDOM&&window.getComputedStyle(this.element).direction||"ltr")}getChartOptions(){const{renderAs:e,pannable:t,zoomable:r,paneDefaults:s,panes:a,transitions:n,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!==a&&(h.panes=a),void 0!==n&&(h.transitions=n),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),a=this.observersStore.getState();let n=!1;for(let r=0;r<a.length;r++)a[r].trigger(e,t)&&(n=!0);return!1===n&&r&&this.props.hasOwnProperty(s)?(this.props[s].call(void 0,r),r.isDefaultPrevented&&r.isDefaultPrevented()):n}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 a=0;a<r.length;a++)r[a].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 a.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,a=e.sender._plotArea.charts;if(!s||"donut"!==s.type||0===a[0].points.length)return;const n=a[0].points[0].sector,o=n.innerRadius,i=n.center.y-o,l=n.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:a.Chart,getTarget:this.getTarget,wrapper:"div",className:n.classNames("k-chart k-widget",r)},t,h.createElement(ye,{render:e}))}},Ce=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 a.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:a.Sparkline,getTarget:this.getTarget,wrapper:"span",deriveOptionsFromParent:this.deriveOptionsFromParent,className:n.classNames("k-sparkline k-widget",r)},e)}};const fe={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||{},fe);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:a.StockChart,getTarget:this.getTarget,wrapper:"div",deriveOptionsFromParent:this.deriveOptionsFromParent,onRefresh:this.onRefresh,className:n.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:a}=this.props,n={...e.props,_chartCollectionIdxKey:`${s}_${t}`,_parentStore:a};return h.cloneElement(e,n,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=U(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,...a}=this.props;(r||this.optionsStore).dispatch({chartKey:e,chartCollectionIdxKey:t,payload:Object.assign({},a,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),a={valueField:_e.valueField,textField:_e.textField,iconField:_e.iconField,iconClassField:_e.iconClassField,...e};h.useImperativeHandle(r,(()=>({element:s.current,props:a}))),h.useImperativeHandle(t,(()=>r.current));let o=[{id:"0",...e.rootItem||{text:"Home",icon:h.createElement(n.SvgIcon,{icon:l.homeIcon,style:{marginInlineEnd:"4px"}})}}];e.drilldownState&&(o=[...o,...e.drilldownState.steps.map(((e,t)=>({id:(t+1).toString(),text:e.drilldownValue})))]);const c={...a,data:o};return h.createElement("div",null,h.createElement(i.Breadcrumb,{...c,onItemSelect:t=>{var r;const s="onDrilldownStateChange";if(e.hasOwnProperty(s)){const a=o.findIndex((e=>e.id===t.id)),n={steps:((null==(r=e.drilldownState)?void 0:r.steps)||[]).slice(0,a)},i=new Ie({currentState:e.drilldownState,nextState:n});e[s].call(void 0,i)}}}))})),Ne={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},_e={valueField:"id",textField:"text",iconField:"icon",iconClassField:"iconClass",data:[]};we.displayName="KendoReactChartBreadcrumb",we.propTypes=Ne;const De="charts.nodata",Te={[De]:"No data available."},Ae=e=>{const t=s.useLocalization();return h.createElement("div",{className:n.classNames("k-chart-overlay",e.className),style:{display:"none",...e.style}},h.createElement("div",{className:"k-no-data"},void 0===e.children?t.toLanguageString(De,Te[De]):e.children))};Ae.displayName="ChartNoDataOverlay";const Oe=e=>h.createElement(ke,{...e,_chartKey:"title"});Oe.displayName="ChartAxisDefaultsTitle";const Ke=e=>h.createElement(ke,{...e,_chartKey:"labels"});Ke.displayName="ChartAxisDefaultsLabels";const Le=e=>h.createElement(ke,{visible:!0,...e,_chartKey:"crosshair"});Le.displayName="ChartAxisDefaultsCrosshair";const Re=e=>h.createElement(ke,{visible:!0,...e,_chartKey:"tooltip"});Re.displayName="ChartAxisDefaultsCrosshairTooltip";const Pe=e=>h.createElement(ke,{...e,_chartKey:"title"});Pe.displayName="ChartCategoryAxisTitle";const Fe=e=>h.createElement(ke,{...e,_chartKey:"title"});Fe.displayName="ChartPaneDefaultsTitle";const qe=e=>h.createElement(ke,{...e,_chartKey:"item"});qe.displayName="ChartLegendItem";const je=e=>h.createElement(ke,{...e,_chartKey:"title"});je.displayName="ChartLegendTitle";const Ve=e=>h.createElement(ke,{...e,_chartKey:"inactiveItems"});Ve.displayName="ChartLegendInactiveItems";const He=e=>h.createElement(ke,{...e,_chartKey:"title"});He.displayName="ChartValueAxisTitle";const Me=e=>h.createElement(ke,{...e,_chartKey:"title"});Me.displayName="ChartXAxisTitle";const ze=e=>h.createElement(ke,{...e,_chartKey:"title"});ze.displayName="ChartYAxisTitle";const Ue=e=>h.createElement(ke,{...e,_chartKey:"categoryAxis"});Ue.displayName="ChartNavigatorCategoryAxis";const Be=e=>h.createElement(ke,{...e,_chartKey:"pane"});Be.displayName="ChartNavigatorPane";const $e=e=>h.createElement(ke,{...e});$e.displayName="ChartNavigatorSeriesItem";const We=e=>h.createElement(Se,{...e,_chartKey:"series"});We.propTypes={children:function(e,t,r){return p(e,t,r,$e)}};const Xe=e=>h.createElement(ke,{...e,_chartKey:"chartArea"});Xe.displayName="ChartArea";const Ye=e=>h.createElement(ke,{...e});Ye.displayName="ChartCategoryAxisItem";const Ze=e=>h.createElement(Se,{...e,_chartKey:"categoryAxis"});Ze.propTypes={children:function(e,t,r){return p(e,t,r,Ye)}},Ze.displayName="ChartCategoryAxis";const Ge=e=>h.createElement(ke,{visible:!0,...e,_chartKey:"legend"});Ge.displayName="ChartLegend";const Je=e=>h.createElement(ke,{visible:!0,position:"bottom",...e,_chartKey:"navigator"});Je.displayName="ChartNavigator";const Qe=e=>h.createElement(ke,{...e});Qe.displayName="ChartPane";const et=e=>h.createElement(ke,{...e,_chartKey:"paneDefaults"});et.displayName="ChartPaneDefaults";const tt=e=>h.createElement(Se,{...e,_chartKey:"panes"});tt.propTypes={children:function(e,t,r){return p(e,t,r,Qe)}};const rt=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})))};rt.displayName="ChartSeriesItem";const st=e=>h.createElement(Se,{...e,_chartKey:"series"});st.propTypes={children:function(e,t,r){return p(e,t,r,rt)}},st.displayName="ChartSeries";const at=e=>h.createElement(ke,{...e,_chartKey:"subtitle"});at.displayName="ChartSubtitle";const nt=e=>h.createElement(ke,{...e,_chartKey:"title"});nt.displayName="ChartTitle";const ot=e=>h.createElement(ke,{visible:!0,...e,_chartKey:"tooltip"});ot.displayName="ChartTooltip";const it=e=>h.createElement(ke,{...e});it.displayName="ChartValueAxisItem";const lt=e=>h.createElement(Se,{...e,_chartKey:"valueAxis"});lt.propTypes={children:function(e,t,r){return p(e,t,r,it)}},lt.displayName="ChartValueAxis";const ct=e=>h.createElement(ke,{...e});ct.displayName="ChartXAxisItem";const ht=e=>h.createElement(Se,{...e,_chartKey:"xAxis"});ht.prototype={children:function(e,t,r){return p(e,t,r,ct)}},ht.displayName="ChartXAxis";const dt=e=>h.createElement(ke,{...e});dt.displayName="ChartYAxisItem";const pt=e=>h.createElement(Se,{...e,_chartKey:"yAxis"});pt.propTypes={children:function(e,t,r){return p(e,t,r,dt)}},pt.displayName="ChartYAxis";const ut=e=>`${e.fontWeight} ${e.fontSize} ${e.fontFamily}`,mt=e=>window.getComputedStyle(e).backgroundColor,vt=`\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 yt=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 a=r.pop();a&&(s[a]=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=ut(this.queryStyle("chart-title-font")),t=ut(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=mt(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),a=mt(t);return a!==r&&(e[s]=a),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 gt=(e,t)=>{const r={nodeColors:[]},s=new yt(r),a=s.element=e.createElement("div");a.style.display="none",a.innerHTML=vt,e.body.appendChild(a);try{s.setColors(),s.setFonts(),s.setNodeColors()}finally{e.body.removeChild(s.element),s.element=null,t(r)}},Ct=r.exact({left:r.number,top:r.number}),ft={left:r.number,right:r.number},bt={...ft,top:r.number,bottom:r.number},xt=r.oneOfType([r.number,r.exact(bt)]),St=xt,Et=r.exact({width:r.number,color:r.string,opacity:r.number,dashType:r.string}),kt={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:St,margin:r.exact(ft),border:Et,offset:Ct},It={color:r.string,opacity:r.number,offset:Ct,padding:r.number,width:r.number},wt={colorType:r.oneOf(["static","source","target"]),color:r.string,opacity:r.number,highlight:r.exact({opacity:r.number,inactiveOpacity:r.number})},Nt=r.exact({text:r.string,...kt}),_t=r.exact({id:r.oneOfType([r.string,r.number]).isRequired,label:Nt.isRequired,...It}),Dt=r.exact({sourceId:r.oneOfType([r.string,r.number]).isRequired,targetId:r.oneOfType([r.string,r.number]).isRequired,value:r.number.isRequired,...wt}),Tt={data:r.exact({nodes:r.arrayOf(_t.isRequired).isRequired,links:r.arrayOf(Dt.isRequired).isRequired}).isRequired,links:r.exact(wt),nodes:r.exact(It),labels:r.exact(kt),legend:r.exact({align:r.oneOf(["start","center","end"]),background:r.string,border:Et,height:r.number,labels:r.object,margin:xt,offsetX:r.number,offsetY:r.number,orientation:r.oneOf(["vertical","horizontal"]),padding:St,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:Et,color:r.string,font:r.string,margin:xt,padding:St,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},At="sankey.tooltipUnitFormat",Ot={[At]:"({0} units)"},Kt=e=>{const{Content:t,dir:r,offset:s,event:{tooltipData:a,dataItem:n,nodeValue:o}}=e,i=h.useRef(null);return h.useEffect((()=>{const e=i.current;if(!a||!e)return;const t=e.offsetWidth,r=e.offsetHeight,n={...a.popupOffset},o=a.popupAlign;n.left+="left"===o.horizontal?s:-1*s,"right"===o.horizontal&&(n.left-=t),"bottom"===o.vertical?n.top-=r+s:n.top+=s,e.style.left=`${n.left}px`,e.style.top=`${n.top}px`,e.style.visibility=""}),[a]),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:n,nodeValue:o})))},Lt={display:"flex",alignItems:"center"},Rt=e=>h.createElement("div",{style:{width:15,height:15,backgroundColor:e.color,display:"inline-flex",marginLeft:3}}),Pt=e=>h.createElement("span",{style:{margin:"0 3px"}},e.children),Ft=e=>s.useInternationalization().format(s.useLocalization().toLanguageString(At,Ot[At]),[e||0]),qt=e=>{const{color:t,label:r}=e.dataItem;return h.createElement("div",{style:Lt,className:"k-tooltip-content"},h.createElement(Rt,{color:t}),h.createElement(Pt,null,r.text),h.createElement(Pt,null,Ft(e.nodeValue)))},jt=e=>{const{source:t,target:r,value:s}=e.dataItem,a="rtl"===e.dir?l.arrowLeftIcon:l.arrowRightIcon;return h.createElement("div",{style:Lt},h.createElement(Rt,{color:t.color}),h.createElement(Pt,null,t.label.text),h.createElement(n.IconWrap,{icon:a,name:a.name}),h.createElement(Rt,{color:r.color}),h.createElement(Pt,null,r.label.text),h.createElement(Pt,null,Ft(s)))},Vt=12,Ht={offset:Vt,visible:!0},Mt=["nodeEnter","nodeLeave","linkEnter","linkLeave","nodeClick","linkClick"],zt=h.forwardRef(((e,t)=>{n.validatePackage(pe);const r=h.useRef(null),s=h.useRef(null),o=n.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=Ht,disableAutoLayout:y,disableKeyboardNavigation:g}=e,C=h.useRef();C.current=e;const[f,b]=h.useState(null),x=h.useCallback((e=>{const{visible:t,offset:r=Vt,nodeComponent:s=qt,linkComponent:a=jt}={...Ht,...v};if(t){const t={event:e,offset:r,dir:o,Content:"node"===e.targetType?s:a};b(t)}}),[v,o]),S=h.useCallback((()=>{b(null)}),[]),E=h.useCallback(((e,t)=>{const r=C.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:{...Ht,...v}};return s.current?s.current.setOptions(e):n.canUseDOM&&r.current&&gt(r.current.ownerDocument,(t=>{s.current=new a.Sankey(r.current,e,t),((e,t)=>{e&&(e.unbind(),Mt.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}),f&&h.createElement(Kt,{...f}))}));zt.propTypes=Tt,zt.displayName="KendoReactSankey";const Ut=a.createSankeyData;e.AxisLabelClickEvent=v,e.Chart=ge,e.ChartArea=Xe,e.ChartAxisDefaults=e=>h.createElement(ke,{...e,_chartKey:"axisDefaults"}),e.ChartAxisDefaultsCrosshair=Le,e.ChartAxisDefaultsCrosshairTooltip=Re,e.ChartAxisDefaultsLabels=Ke,e.ChartAxisDefaultsTitle=Oe,e.ChartBreadcrumb=we,e.ChartCategoryAxis=Ze,e.ChartCategoryAxisCrosshair=e=>h.createElement(ke,{visible:!0,...e,_chartKey:"crosshair"}),e.ChartCategoryAxisCrosshairTooltip=e=>h.createElement(ke,{visible:!0,...e,_chartKey:"tooltip"}),e.ChartCategoryAxisItem=Ye,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=Pe,e.ChartLegend=Ge,e.ChartLegendInactiveItems=Ve,e.ChartLegendItem=qe,e.ChartLegendTitle=je,e.ChartNavigator=Je,e.ChartNavigatorCategoryAxis=Ue,e.ChartNavigatorHint=e=>h.createElement(ke,{...e,_chartKey:"hint"}),e.ChartNavigatorPane=Be,e.ChartNavigatorSelect=e=>h.createElement(ke,{...e,_chartKey:"select"}),e.ChartNavigatorSeries=We,e.ChartNavigatorSeriesItem=$e,e.ChartNoDataOverlay=Ae,e.ChartPane=Qe,e.ChartPaneDefaults=et,e.ChartPaneDefaultsTitle=Fe,e.ChartPanes=tt,e.ChartPlotArea=e=>h.createElement(ke,{...e,_chartKey:"plotArea"}),e.ChartSeries=st,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=rt,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=at,e.ChartTitle=nt,e.ChartTooltip=ot,e.ChartValueAxis=lt,e.ChartValueAxisCrosshair=e=>h.createElement(ke,{visible:!0,...e,_chartKey:"crosshair"}),e.ChartValueAxisCrosshairTooltip=e=>h.createElement(ke,{visible:!0,...e,_chartKey:"tooltip"}),e.ChartValueAxisItem=it,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=He,e.ChartXAxis=ht,e.ChartXAxisCrosshair=e=>h.createElement(ke,{visible:!0,...e,_chartKey:"crosshair"}),e.ChartXAxisCrosshairTooltip=e=>h.createElement(ke,{visible:!0,...e,_chartKey:"tooltip"}),e.ChartXAxisItem=ct,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=Me,e.ChartYAxis=pt,e.ChartYAxisCrosshair=e=>h.createElement(ke,{visible:!0,...e,_chartKey:"crosshair"}),e.ChartYAxisCrosshairTooltip=e=>h.createElement(ke,{visible:!0,...e,_chartKey:"tooltip"}),e.ChartYAxisItem=dt,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=ze,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=C,e.DragEvent=g,e.DragStartEvent=f,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=N,e.RenderEvent=_,e.Sankey=zt,e.SelectEndEvent=T,e.SelectEvent=D,e.SelectStartEvent=A,e.SeriesClickEvent=O,e.SeriesHoverEvent=K,e.SeriesTooltip=se,e.SharedTooltipContent=Z,e.Sparkline=Ce,e.StockChart=be,e.TooltipPoint=Y,e.TooltipPopup=te,e.ZoomEndEvent=R,e.ZoomEvent=L,e.ZoomStartEvent=P,e.createSankeyData=Ut,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
@@ -8,6 +8,9 @@
8
8
  import { Align } from '@progress/kendo-react-popup';
9
9
  import { BaseEvent as BaseEvent_2 } from '@progress/kendo-react-common';
10
10
  import { BreadcrumbProps } from '@progress/kendo-react-layout';
11
+ import { ChartContextType } from '../../ChartContext';
12
+ import { ChartContextType as ChartContextType_2 } from './ChartContext';
13
+ import { ChartContextType as ChartContextType_4 } from '../ChartContext';
11
14
  import { createSankeyData as createSankeyData_2 } from '@progress/kendo-charts';
12
15
  import { CrosshatchPattern } from '@progress/kendo-charts';
13
16
  import { DataModel } from '@progress/kendo-react-layout';
@@ -1705,12 +1708,12 @@ export declare interface ChartCategoryAxisTitleProps extends CategoryAxisTitle {
1705
1708
  /**
1706
1709
  * @hidden
1707
1710
  */
1708
- declare const ChartContext: React_2.Context<ChartContextType | null>;
1711
+ declare const ChartContext: React_2.Context<ChartContextType_3 | null>;
1709
1712
 
1710
1713
  /**
1711
1714
  * @hidden
1712
1715
  */
1713
- declare interface ChartContextType {
1716
+ declare interface ChartContextType_3 {
1714
1717
  optionsStore: Store;
1715
1718
  observersStore: Store;
1716
1719
  childrenObserver: InstanceObserver;
@@ -2683,7 +2686,7 @@ export declare const createSankeyData: typeof createSankeyData_2;
2683
2686
  * @hidden
2684
2687
  */
2685
2688
  export declare class CrosshairTooltip extends React_2.Component<CrosshairTooltipProps, CrosshairTooltipState> {
2686
- static contextType: React_2.Context<ChartContextType | null>;
2689
+ static contextType: React_2.Context<ChartContextType_4 | null>;
2687
2690
  context: React_2.ContextType<typeof ChartContext>;
2688
2691
  readonly state: CrosshairTooltipState;
2689
2692
  chartObserver: InstanceObserver;
@@ -2698,7 +2701,7 @@ export declare class CrosshairTooltip extends React_2.Component<CrosshairTooltip
2698
2701
  * @hidden
2699
2702
  */
2700
2703
  export declare class CrosshairTooltipContainer extends React_2.Component<{}, CrosshairTooltipContainerState> {
2701
- static contextType: React_2.Context<ChartContextType | null>;
2704
+ static contextType: React_2.Context<ChartContextType_4 | null>;
2702
2705
  context: React_2.ContextType<typeof ChartContext>;
2703
2706
  readonly state: CrosshairTooltipContainerState;
2704
2707
  private storeUnsubscriber;
@@ -2830,7 +2833,7 @@ declare class DomEvent<T> {
2830
2833
  * @hidden
2831
2834
  */
2832
2835
  export declare class DonutCenter extends React_2.Component<DonutCenterProps, DonutCenterState> {
2833
- static contextType: React_2.Context<ChartContextType | null>;
2836
+ static contextType: React_2.Context<ChartContextType_2 | null>;
2834
2837
  context: React_2.ContextType<typeof ChartContext>;
2835
2838
  readonly state: DonutCenterState;
2836
2839
  chartObserver: InstanceObserver;
@@ -6593,7 +6596,7 @@ export declare interface SeriesStack {
6593
6596
  * @hidden
6594
6597
  */
6595
6598
  export declare class SeriesTooltip extends React_2.Component<{}, SeriesTooltipState> {
6596
- static contextType: React_2.Context<ChartContextType | null>;
6599
+ static contextType: React_2.Context<ChartContextType_4 | null>;
6597
6600
  context: React_2.ContextType<typeof ChartContext>;
6598
6601
  readonly state: SeriesTooltipState;
6599
6602
  chartObserver: InstanceObserver | null;
@@ -7334,7 +7337,7 @@ export declare class TooltipPoint {
7334
7337
  * @hidden
7335
7338
  */
7336
7339
  export declare class TooltipPopup extends React_2.Component<TooltipPopupProps, {}> {
7337
- static contextType: React_2.Context<ChartContextType | null>;
7340
+ static contextType: React_2.Context<ChartContextType_4 | null>;
7338
7341
  context: React_2.ContextType<typeof ChartContext>;
7339
7342
  chartObserver: InstanceObserver;
7340
7343
  element: HTMLDivElement | null;
package/index.d.ts CHANGED
@@ -8,6 +8,9 @@
8
8
  import { Align } from '@progress/kendo-react-popup';
9
9
  import { BaseEvent as BaseEvent_2 } from '@progress/kendo-react-common';
10
10
  import { BreadcrumbProps } from '@progress/kendo-react-layout';
11
+ import { ChartContextType } from '../../ChartContext';
12
+ import { ChartContextType as ChartContextType_2 } from './ChartContext';
13
+ import { ChartContextType as ChartContextType_4 } from '../ChartContext';
11
14
  import { createSankeyData as createSankeyData_2 } from '@progress/kendo-charts';
12
15
  import { CrosshatchPattern } from '@progress/kendo-charts';
13
16
  import { DataModel } from '@progress/kendo-react-layout';
@@ -1705,12 +1708,12 @@ export declare interface ChartCategoryAxisTitleProps extends CategoryAxisTitle {
1705
1708
  /**
1706
1709
  * @hidden
1707
1710
  */
1708
- declare const ChartContext: React_2.Context<ChartContextType | null>;
1711
+ declare const ChartContext: React_2.Context<ChartContextType_3 | null>;
1709
1712
 
1710
1713
  /**
1711
1714
  * @hidden
1712
1715
  */
1713
- declare interface ChartContextType {
1716
+ declare interface ChartContextType_3 {
1714
1717
  optionsStore: Store;
1715
1718
  observersStore: Store;
1716
1719
  childrenObserver: InstanceObserver;
@@ -2683,7 +2686,7 @@ export declare const createSankeyData: typeof createSankeyData_2;
2683
2686
  * @hidden
2684
2687
  */
2685
2688
  export declare class CrosshairTooltip extends React_2.Component<CrosshairTooltipProps, CrosshairTooltipState> {
2686
- static contextType: React_2.Context<ChartContextType | null>;
2689
+ static contextType: React_2.Context<ChartContextType_4 | null>;
2687
2690
  context: React_2.ContextType<typeof ChartContext>;
2688
2691
  readonly state: CrosshairTooltipState;
2689
2692
  chartObserver: InstanceObserver;
@@ -2698,7 +2701,7 @@ export declare class CrosshairTooltip extends React_2.Component<CrosshairTooltip
2698
2701
  * @hidden
2699
2702
  */
2700
2703
  export declare class CrosshairTooltipContainer extends React_2.Component<{}, CrosshairTooltipContainerState> {
2701
- static contextType: React_2.Context<ChartContextType | null>;
2704
+ static contextType: React_2.Context<ChartContextType_4 | null>;
2702
2705
  context: React_2.ContextType<typeof ChartContext>;
2703
2706
  readonly state: CrosshairTooltipContainerState;
2704
2707
  private storeUnsubscriber;
@@ -2830,7 +2833,7 @@ declare class DomEvent<T> {
2830
2833
  * @hidden
2831
2834
  */
2832
2835
  export declare class DonutCenter extends React_2.Component<DonutCenterProps, DonutCenterState> {
2833
- static contextType: React_2.Context<ChartContextType | null>;
2836
+ static contextType: React_2.Context<ChartContextType_2 | null>;
2834
2837
  context: React_2.ContextType<typeof ChartContext>;
2835
2838
  readonly state: DonutCenterState;
2836
2839
  chartObserver: InstanceObserver;
@@ -6593,7 +6596,7 @@ export declare interface SeriesStack {
6593
6596
  * @hidden
6594
6597
  */
6595
6598
  export declare class SeriesTooltip extends React_2.Component<{}, SeriesTooltipState> {
6596
- static contextType: React_2.Context<ChartContextType | null>;
6599
+ static contextType: React_2.Context<ChartContextType_4 | null>;
6597
6600
  context: React_2.ContextType<typeof ChartContext>;
6598
6601
  readonly state: SeriesTooltipState;
6599
6602
  chartObserver: InstanceObserver | null;
@@ -7334,7 +7337,7 @@ export declare class TooltipPoint {
7334
7337
  * @hidden
7335
7338
  */
7336
7339
  export declare class TooltipPopup extends React_2.Component<TooltipPopupProps, {}> {
7337
- static contextType: React_2.Context<ChartContextType | null>;
7340
+ static contextType: React_2.Context<ChartContextType_4 | null>;
7338
7341
  context: React_2.ContextType<typeof ChartContext>;
7339
7342
  chartObserver: InstanceObserver;
7340
7343
  element: HTMLDivElement | null;
@@ -10,7 +10,7 @@ const e = {
10
10
  name: "@progress/kendo-react-charts",
11
11
  productName: "KendoReact",
12
12
  productCodes: ["KENDOUIREACT", "KENDOUICOMPLETE"],
13
- publishDate: 1736856063,
13
+ publishDate: 1737042397,
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": "9.2.0-develop.8",
3
+ "version": "9.2.0-develop.9",
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,10 +24,10 @@
24
24
  "peerDependencies": {
25
25
  "@progress/kendo-drawing": "^1.21.2",
26
26
  "@progress/kendo-licensing": "^1.3.4",
27
- "@progress/kendo-react-common": "9.2.0-develop.8",
28
- "@progress/kendo-react-intl": "9.2.0-develop.8",
29
- "@progress/kendo-react-layout": "9.2.0-develop.8",
30
- "@progress/kendo-react-popup": "9.2.0-develop.8",
27
+ "@progress/kendo-react-common": "9.2.0-develop.9",
28
+ "@progress/kendo-react-intl": "9.2.0-develop.9",
29
+ "@progress/kendo-react-layout": "9.2.0-develop.9",
30
+ "@progress/kendo-react-popup": "9.2.0-develop.9",
31
31
  "@progress/kendo-svg-icons": "^4.0.0",
32
32
  "react": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
33
33
  "react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc"