@progress/kendo-react-charts 16.4.0-develop.5 → 16.4.0-develop.6

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.d.ts CHANGED
@@ -26,9 +26,7 @@ export declare class BaseChart extends React.Component<BaseChartPrivateProps, {}
26
26
  /**
27
27
  * @hidden
28
28
  */
29
- static defaultProps: {
30
- renderAs: string;
31
- };
29
+ static defaultProps: {};
32
30
  /**
33
31
  * @hidden
34
32
  */
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 strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("react"),I=require("prop-types"),C=require("@progress/kendo-react-intl"),v=require("@progress/kendo-charts"),f=require("@progress/kendo-react-common"),S=require("./utils/index.js"),D=require("./events/chart-event-builder.js"),T=require("./events/dom-event.js"),b=require("./store/store.js"),w=require("./store/reducer.js"),E=require("./tooltip/Series.js"),k=require("./tooltip/CrosshairContainer.js"),P=require("./ChartContext.js"),y=require("./package-metadata.js"),M=require("./events/drilldown-event.js");function q(u){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(u){for(const e in u)if(e!=="default"){const s=Object.getOwnPropertyDescriptor(u,e);Object.defineProperty(t,e,s.get?s:{enumerable:!0,get:()=>u[e]})}}return t.default=u,Object.freeze(t)}const l=q(O),g=class g 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}},p=new M.DrilldownEvent(d,h);this.props[n].call(void 0,p)}}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:S.toggle(o.visible)});else{const c=o.pointVisibility=o.pointVisibility||[];c[n]=S.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=T.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&&!S.hasParent(s.relatedTarget,this.element)&&this.chartInstance.hideElements(),!1},this.showLicenseWatermark=!f.validatePackage(y.packageMetadata,{component:"Chart"}),this.licenseMessage=f.getLicenseMessage(y.packageMetadata),this.optionsStore=b.createStore(w.optionsReducer),this.observersStore=b.createStore(w.observersReducer),this.childrenObserver=new v.InstanceObserver(this,{onMouseLeave:"onChildMouseLeave"}),this.state={optionsStore:this.optionsStore,observersStore:this.observersStore,childrenObserver:this.childrenObserver,drilldownState:{steps:[]}},this.themeStore=b.createStore(w.themeReducer),this.chartObserver=new v.InstanceObserver(this,{render:"onRender",legendItemClick:"onLegendItemClick",drilldown:"onDrilldown",styleChanged:"onStyleChanged"})}get element(){return this._element}static getDerivedStateFromProps(t,e){return{...e,drilldownState:t.drilldownState||[]}}componentDidMount(){this._element&&(this.readTheme(),this.instantiateCoreChart()),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=C.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,p]=h;return!(r.hasOwnProperty(d)&&r[d]===p)});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(f.WatermarkOverlay,{message:this.licenseMessage})));return l.createElement(P.ChartContext.Provider,{value:this.state},l.createElement(E.SeriesTooltip,{key:"seriesTooltip"}),l.createElement(k.CrosshairTooltipContainer,{key:"crosshairTooltips"}),n)}getDirection(t){return(t!==void 0?t:f.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,observeStyles:d,deriveOptionsFromParent:p}=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.observeStyles=d!==void 0?d:!0,a=Object.assign(a,this.optionsStore.getState()),p&&(a=p(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:C.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}onStyleChanged(){this.suppressTransitions=!0,this.readTheme()}readTheme(){if(this._element){const t=v.chartTheme(this._element),e=v.deepExtend({},v.chartBaseTheme(),t);this.themeStore.dispatch({type:"push",payload:e})}}};g.propTypes={dir:I.string,renderAs:I.oneOf(["svg","canvas"])},g.defaultProps={renderAs:"svg"};let m=g;C.registerForIntl(m);exports.BaseChart=m;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const D=require("react"),y=require("prop-types"),C=require("@progress/kendo-react-intl"),l=require("@progress/kendo-charts"),v=require("@progress/kendo-react-common"),S=require("./utils/index.js"),T=require("./events/chart-event-builder.js"),E=require("./events/dom-event.js"),b=require("./store/store.js"),w=require("./store/reducer.js"),k=require("./tooltip/Series.js"),x=require("./tooltip/CrosshairContainer.js"),M=require("./ChartContext.js"),O=require("./package-metadata.js"),q=require("./events/drilldown-event.js");function L(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 h=L(D),g=class g extends h.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(a=>a.name===e.series.name);if(r.drilldownSeriesFactory){const a="onDrilldown";if(this.props.hasOwnProperty(a)){const n={seriesName:r.name,drilldownValue:e.value},o=[...((i=this.props.drilldownState)==null?void 0:i.steps)||[],n],d=this.props.getTarget(),u={...e,currentState:this.props.drilldownState,nextState:{steps:o}},f=new q.DrilldownEvent(u,d);this.props[a].call(void 0,f)}}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:S.toggle(n.visible)});else{const o=n.pointVisibility=n.pointVisibility||{};o[a]=S.toggle(o[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=E.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&&!S.hasParent(s.relatedTarget,this.element)&&this.chartInstance.hideElements(),!1},this.showLicenseWatermark=!v.validatePackage(O.packageMetadata,{component:"Chart"}),this.licenseMessage=v.getLicenseMessage(O.packageMetadata),this.optionsStore=b.createStore(w.optionsReducer),this.observersStore=b.createStore(w.observersReducer),this.childrenObserver=new l.InstanceObserver(this,{onMouseLeave:"onChildMouseLeave"}),this.state={optionsStore:this.optionsStore,observersStore:this.observersStore,childrenObserver:this.childrenObserver,drilldownState:{steps:[]}},this.themeStore=b.createStore(w.themeReducer),this.chartObserver=new l.InstanceObserver(this,{render:"onRender",legendItemClick:"onLegendItemClick",drilldown:"onDrilldown",styleChanged:"onStyleChanged"})}get element(){return this._element}static getDerivedStateFromProps(t,e){return{...e,drilldownState:t.drilldownState||[]}}componentDidMount(){this.props.options&&this.optionsStore.setBaseState(this.props.options),this._element&&(this.readTheme(),this.instantiateCoreChart()),this.optionsUnsubscriber=this.optionsStore.subscribe(()=>{this.refresh()}),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}=this.props;if(this.props.options!==t.options&&this.optionsStore.setBaseState(this.props.options,!0),this.chartInstance!==null){const s=C.provideIntlService(this),r=this.chartInstance.chartService,i=s.locale!==r._intlService.locale,n=[...new Set([...Object.keys(t),...Object.keys(this.props)])].filter(o=>o!=="dir"&&o!=="children"&&o!=="options").some(o=>this.props[o]!==t[o]);i&&(this.chartInstance.chartService._intlService=s,this.chartInstance.chartService.format._intlService=s,n||this.chartInstance.noTransitionsRedraw()),n&&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=h.createElement(s,{className:e,style:i,key:"chartElement"},h.createElement("div",{onMouseLeave:this.onChartMouseLeave,ref:n=>{this._element=n},className:"k-chart-surface"},r),h.createElement(h.Fragment,null,this.showLicenseWatermark&&h.createElement(v.WatermarkOverlay,{message:this.licenseMessage})));return h.createElement(M.ChartContext.Provider,{value:this.state},h.createElement(k.SeriesTooltip,{key:"seriesTooltip"}),h.createElement(x.CrosshairTooltipContainer,{key:"crosshairTooltips"}),a)}getDirection(t){return(t!==void 0?t:v.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:o,axisDefaults:d,observeStyles:u,deriveOptionsFromParent:f,options:I}=this.props;let c={renderAs:"svg",observeStyles:!0};return I&&l.deepExtend(c,I),c=Object.assign(c,this.optionsStore.getState()),t!==void 0&&(c.renderAs=t),e!==void 0&&(c.pannable=e),s!==void 0&&(c.zoomable=s),r!==void 0&&(c.paneDefaults=r),i!==void 0&&(c.panes=i),a!==void 0&&(c.transitions=a),n!==void 0&&(c.seriesColors=n),o!==void 0&&(c.seriesDefaults=o),d!==void 0&&(c.axisDefaults=d),u!==void 0&&(c.observeStyles=u),f&&(c=f(c)),c}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:C.provideIntlService(this),observer:this.chartObserver,sender:this})}trigger(t,e){const s=this.props.getTarget(),r=T.create(t,e,s),i="on"+t.charAt(0).toUpperCase()+t.slice(1),a=this.observersStore.getState();let n=!1;for(let o=0;o<a.length;o++)a[o].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}onStyleChanged(){this.suppressTransitions=!0,this.readTheme()}readTheme(){if(this._element){const t=l.chartTheme(this._element),e=l.deepExtend({},l.chartBaseTheme(),t);this.themeStore.dispatch({type:"push",payload:e})}}};g.propTypes={dir:y.string,renderAs:y.oneOf(["svg","canvas"])},g.defaultProps={};let m=g;C.registerForIntl(m);exports.BaseChart=m;
package/BaseChart.mjs CHANGED
@@ -5,37 +5,37 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import * as l from "react";
9
- import v from "prop-types";
10
- import { provideIntlService as g, registerForIntl as I } from "@progress/kendo-react-intl";
11
- import { InstanceObserver as S, chartTheme as y, deepExtend as C, chartBaseTheme as O } from "@progress/kendo-charts";
12
- import { validatePackage as D, getLicenseMessage as T, WatermarkOverlay as E, canUseDOM as P } from "@progress/kendo-react-common";
13
- import { toggle as b, hasParent as L } from "./utils/index.mjs";
14
- import { create as k } from "./events/chart-event-builder.mjs";
15
- import { toDomEvent as x } from "./events/dom-event.mjs";
8
+ import * as c from "react";
9
+ import g from "prop-types";
10
+ import { provideIntlService as S, registerForIntl as C } from "@progress/kendo-react-intl";
11
+ import { InstanceObserver as b, deepExtend as w, chartTheme as O, chartBaseTheme as D } from "@progress/kendo-charts";
12
+ import { validatePackage as T, getLicenseMessage as E, WatermarkOverlay as L, canUseDOM as x } from "@progress/kendo-react-common";
13
+ import { toggle as I, hasParent as k } from "./utils/index.mjs";
14
+ import { create as M } from "./events/chart-event-builder.mjs";
15
+ import { toDomEvent as P } from "./events/dom-event.mjs";
16
16
  import { createStore as f } from "./store/store.mjs";
17
- import { optionsReducer as M, observersReducer as R, themeReducer as U } from "./store/reducer.mjs";
18
- import { SeriesTooltip as W } from "./tooltip/Series.mjs";
19
- import { CrosshairTooltipContainer as F } from "./tooltip/CrosshairContainer.mjs";
17
+ import { optionsReducer as R, observersReducer as U, themeReducer as W } from "./store/reducer.mjs";
18
+ import { SeriesTooltip as F } from "./tooltip/Series.mjs";
19
+ import { CrosshairTooltipContainer as j } from "./tooltip/CrosshairContainer.mjs";
20
20
  import { ChartContext as z } from "./ChartContext.mjs";
21
- import { packageMetadata as w } from "./package-metadata.mjs";
21
+ import { packageMetadata as y } from "./package-metadata.mjs";
22
22
  import { DrilldownEvent as _ } from "./events/drilldown-event.mjs";
23
- const m = class m extends l.Component {
23
+ const m = class m extends c.Component {
24
24
  constructor(t) {
25
25
  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) => {
26
26
  this.chartInstance !== null && (this.surface = e.sender.surface, this.trigger("render", e));
27
27
  }, this.onDrilldown = (e) => {
28
- var i;
29
- const { series: s } = this.optionsStore.getState(), r = s.find((n) => n.name === e.series.name);
30
- if (r.drilldownSeriesFactory) {
31
- const n = "onDrilldown";
32
- if (this.props.hasOwnProperty(n)) {
33
- const o = { seriesName: r.name, drilldownValue: e.value }, h = [...((i = this.props.drilldownState) == null ? void 0 : i.steps) || [], o], c = this.props.getTarget(), p = {
28
+ var r;
29
+ const { series: s } = this.optionsStore.getState(), i = s.find((a) => a.name === e.series.name);
30
+ if (i.drilldownSeriesFactory) {
31
+ const a = "onDrilldown";
32
+ if (this.props.hasOwnProperty(a)) {
33
+ const n = { seriesName: i.name, drilldownValue: e.value }, o = [...((r = this.props.drilldownState) == null ? void 0 : r.steps) || [], n], l = this.props.getTarget(), p = {
34
34
  ...e,
35
35
  currentState: this.props.drilldownState,
36
- nextState: { steps: h }
37
- }, d = new _(p, c);
38
- this.props[n].call(void 0, d);
36
+ nextState: { steps: o }
37
+ }, d = new _(p, l);
38
+ this.props[a].call(void 0, d);
39
39
  }
40
40
  }
41
41
  return !0;
@@ -47,33 +47,33 @@ const m = class m extends l.Component {
47
47
  const { series: s } = this.optionsStore.getState();
48
48
  if (!s)
49
49
  return;
50
- let r = {};
51
- const { seriesIndex: i, pointIndex: n } = e, o = s[i];
52
- if (n === void 0)
53
- r = Object.assign({}, o, { visible: b(o.visible) });
50
+ let i = {};
51
+ const { seriesIndex: r, pointIndex: a } = e, n = s[r];
52
+ if (a === void 0)
53
+ i = Object.assign({}, n, { visible: I(n.visible) });
54
54
  else {
55
- const h = o.pointVisibility = o.pointVisibility || [];
56
- h[n] = b(h[n]), r = Object.assign({}, o);
55
+ const o = n.pointVisibility = n.pointVisibility || {};
56
+ o[a] = I(o[a]), i = Object.assign({}, n);
57
57
  }
58
58
  this.optionsStore.dispatch({
59
- chartCollectionIdxKey: `series_${i}`,
60
- payload: r
59
+ chartCollectionIdxKey: `series_${r}`,
60
+ payload: i
61
61
  }), this.suppressTransitions = !0;
62
62
  }
63
63
  }, this.onWindowResize = () => {
64
64
  this.chartInstance !== null && this.chartInstance.resize();
65
65
  }, this.onChartMouseLeave = (e) => {
66
- const s = x(this, e);
66
+ const s = P(this, e);
67
67
  this.triggerDomEvent("onMouseLeave", s) ? e.preventDefault() : this.chartInstance !== null && this.chartInstance.hideElements();
68
68
  }, this.onChildMouseLeave = (e) => {
69
69
  const { syntheticEvent: s } = e;
70
- return this.chartInstance && !L(s.relatedTarget, this.element) && this.chartInstance.hideElements(), !1;
71
- }, this.showLicenseWatermark = !D(w, { component: "Chart" }), this.licenseMessage = T(w), this.optionsStore = f(M), this.observersStore = f(R), this.childrenObserver = new S(this, { onMouseLeave: "onChildMouseLeave" }), this.state = {
70
+ return this.chartInstance && !k(s.relatedTarget, this.element) && this.chartInstance.hideElements(), !1;
71
+ }, this.showLicenseWatermark = !T(y, { component: "Chart" }), this.licenseMessage = E(y), this.optionsStore = f(R), this.observersStore = f(U), this.childrenObserver = new b(this, { onMouseLeave: "onChildMouseLeave" }), this.state = {
72
72
  optionsStore: this.optionsStore,
73
73
  observersStore: this.observersStore,
74
74
  childrenObserver: this.childrenObserver,
75
75
  drilldownState: { steps: [] }
76
- }, this.themeStore = f(U), this.chartObserver = new S(this, {
76
+ }, this.themeStore = f(W), this.chartObserver = new b(this, {
77
77
  render: "onRender",
78
78
  legendItemClick: "onLegendItemClick",
79
79
  drilldown: "onDrilldown",
@@ -99,7 +99,9 @@ const m = class m extends l.Component {
99
99
  * @hidden
100
100
  */
101
101
  componentDidMount() {
102
- this._element && (this.readTheme(), this.instantiateCoreChart()), this.optionsUnsubscriber = this.optionsStore.subscribe(this.refresh.bind(this)), this.themeUnsubscriber = this.themeStore.subscribe(this.refresh.bind(this)), window.addEventListener("resize", this.onWindowResize);
102
+ this.props.options && this.optionsStore.setBaseState(this.props.options), this._element && (this.readTheme(), this.instantiateCoreChart()), this.optionsUnsubscriber = this.optionsStore.subscribe(() => {
103
+ this.refresh();
104
+ }), this.themeUnsubscriber = this.themeStore.subscribe(this.refresh.bind(this)), window.addEventListener("resize", this.onWindowResize);
103
105
  }
104
106
  /**
105
107
  * @hidden
@@ -111,46 +113,43 @@ const m = class m extends l.Component {
111
113
  * @hidden
112
114
  */
113
115
  componentDidUpdate(t) {
114
- const { dir: e, children: s, ...r } = this.props;
115
- if (this.chartInstance !== null) {
116
- const i = g(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) => {
117
- const [p, d] = c;
118
- return !(r.hasOwnProperty(p) && r[p] === d);
119
- });
120
- 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));
116
+ const { dir: e } = this.props;
117
+ if (this.props.options !== t.options && this.optionsStore.setBaseState(this.props.options, !0), this.chartInstance !== null) {
118
+ const s = S(this), i = this.chartInstance.chartService, r = s.locale !== i._intlService.locale, n = [.../* @__PURE__ */ new Set([...Object.keys(t), ...Object.keys(this.props)])].filter((o) => o !== "dir" && o !== "children" && o !== "options").some((o) => this.props[o] !== t[o]);
119
+ r && (this.chartInstance.chartService._intlService = s, this.chartInstance.chartService.format._intlService = s, n || this.chartInstance.noTransitionsRedraw()), n && this.refresh(), t.dir !== e && this.chartInstance.setDirection(this.getDirection(e));
121
120
  }
122
121
  }
123
122
  /**
124
123
  * @hidden
125
124
  */
126
125
  render() {
127
- const { style: t = {}, className: e, wrapper: s, children: r } = this.props, i = Object.assign({}, t, { position: "relative" }), n = l.createElement(
126
+ const { style: t = {}, className: e, wrapper: s, children: i } = this.props, r = Object.assign({}, t, { position: "relative" }), a = c.createElement(
128
127
  s,
129
128
  {
130
129
  className: e,
131
- style: i,
130
+ style: r,
132
131
  key: "chartElement"
133
132
  },
134
- /* @__PURE__ */ l.createElement(
133
+ /* @__PURE__ */ c.createElement(
135
134
  "div",
136
135
  {
137
136
  onMouseLeave: this.onChartMouseLeave,
138
- ref: (o) => {
139
- this._element = o;
137
+ ref: (n) => {
138
+ this._element = n;
140
139
  },
141
140
  className: "k-chart-surface"
142
141
  },
143
- r
142
+ i
144
143
  ),
145
- /* @__PURE__ */ l.createElement(l.Fragment, null, this.showLicenseWatermark && /* @__PURE__ */ l.createElement(E, { message: this.licenseMessage }))
144
+ /* @__PURE__ */ c.createElement(c.Fragment, null, this.showLicenseWatermark && /* @__PURE__ */ c.createElement(L, { message: this.licenseMessage }))
146
145
  );
147
- return /* @__PURE__ */ l.createElement(z.Provider, { value: this.state }, /* @__PURE__ */ l.createElement(W, { key: "seriesTooltip" }), /* @__PURE__ */ l.createElement(F, { key: "crosshairTooltips" }), n);
146
+ return /* @__PURE__ */ c.createElement(z.Provider, { value: this.state }, /* @__PURE__ */ c.createElement(F, { key: "seriesTooltip" }), /* @__PURE__ */ c.createElement(j, { key: "crosshairTooltips" }), a);
148
147
  }
149
148
  /**
150
149
  * @hidden
151
150
  */
152
151
  getDirection(t) {
153
- return (t !== void 0 ? t : P && window.getComputedStyle(this.element).direction || "ltr") === "rtl";
152
+ return (t !== void 0 ? t : x && window.getComputedStyle(this.element).direction || "ltr") === "rtl";
154
153
  }
155
154
  /**
156
155
  * @hidden
@@ -160,17 +159,18 @@ const m = class m extends l.Component {
160
159
  renderAs: t,
161
160
  pannable: e,
162
161
  zoomable: s,
163
- paneDefaults: r,
164
- panes: i,
165
- transitions: n,
166
- seriesColors: o,
167
- seriesDefaults: h,
168
- axisDefaults: c,
162
+ paneDefaults: i,
163
+ panes: r,
164
+ transitions: a,
165
+ seriesColors: n,
166
+ seriesDefaults: o,
167
+ axisDefaults: l,
169
168
  observeStyles: p,
170
- deriveOptionsFromParent: d
169
+ deriveOptionsFromParent: d,
170
+ options: v
171
171
  } = this.props;
172
- let a = {};
173
- 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.observeStyles = p !== void 0 ? p : !0, a = Object.assign(a, this.optionsStore.getState()), d && (a = d(a)), a;
172
+ let h = { renderAs: "svg", observeStyles: !0 };
173
+ return v && w(h, v), h = Object.assign(h, this.optionsStore.getState()), t !== void 0 && (h.renderAs = t), e !== void 0 && (h.pannable = e), s !== void 0 && (h.zoomable = s), i !== void 0 && (h.paneDefaults = i), r !== void 0 && (h.panes = r), a !== void 0 && (h.transitions = a), n !== void 0 && (h.seriesColors = n), o !== void 0 && (h.seriesDefaults = o), l !== void 0 && (h.axisDefaults = l), p !== void 0 && (h.observeStyles = p), d && (h = d(h)), h;
174
174
  }
175
175
  /**
176
176
  * @hidden
@@ -188,7 +188,7 @@ const m = class m extends l.Component {
188
188
  const { dir: t, chartConstructor: e } = this.props, s = this.getChartOptions();
189
189
  this.chartInstance = new e(this.element, s, this.themeStore.getState(), {
190
190
  rtl: this.getDirection(t),
191
- intlService: g(this),
191
+ intlService: S(this),
192
192
  observer: this.chartObserver,
193
193
  sender: this
194
194
  });
@@ -198,11 +198,11 @@ const m = class m extends l.Component {
198
198
  * @hidden
199
199
  */
200
200
  trigger(t, e) {
201
- const s = this.props.getTarget(), r = k(t, e, s), i = "on" + t.charAt(0).toUpperCase() + t.slice(1), n = this.observersStore.getState();
202
- let o = !1;
203
- for (let h = 0; h < n.length; h++)
204
- n[h].trigger(t, e) && (o = !0);
205
- return o === !1 && r && this.props.hasOwnProperty(i) ? (this.props[i].call(void 0, r), r.isDefaultPrevented && r.isDefaultPrevented()) : o;
201
+ const s = this.props.getTarget(), i = M(t, e, s), r = "on" + t.charAt(0).toUpperCase() + t.slice(1), a = this.observersStore.getState();
202
+ let n = !1;
203
+ for (let o = 0; o < a.length; o++)
204
+ a[o].trigger(t, e) && (n = !0);
205
+ return n === !1 && i && this.props.hasOwnProperty(r) ? (this.props[r].call(void 0, i), i.isDefaultPrevented && i.isDefaultPrevented()) : n;
206
206
  }
207
207
  /* Used by (event)InstanceObserver to check the wrapper for supported events */
208
208
  /**
@@ -210,8 +210,8 @@ const m = class m extends l.Component {
210
210
  */
211
211
  requiresHandlers(t) {
212
212
  for (let e = 0; e < t.length; e++) {
213
- const s = t[e], r = "on" + s.charAt(0).toUpperCase() + s.slice(1);
214
- if (this.props.hasOwnProperty(r))
213
+ const s = t[e], i = "on" + s.charAt(0).toUpperCase() + s.slice(1);
214
+ if (this.props.hasOwnProperty(i))
215
215
  return !0;
216
216
  }
217
217
  return !1;
@@ -222,10 +222,10 @@ const m = class m extends l.Component {
222
222
  */
223
223
  triggerDomEvent(t, e) {
224
224
  const s = this.observersStore.getState();
225
- let r = !1;
226
- for (let i = 0; i < s.length; i++)
227
- s[i].trigger(t, e) && (r = !0);
228
- return r;
225
+ let i = !1;
226
+ for (let r = 0; r < s.length; r++)
227
+ s[r].trigger(t, e) && (i = !0);
228
+ return i;
229
229
  }
230
230
  /**
231
231
  * @hidden
@@ -238,19 +238,17 @@ const m = class m extends l.Component {
238
238
  */
239
239
  readTheme() {
240
240
  if (this._element) {
241
- const t = y(this._element), e = C({}, O(), t);
241
+ const t = O(this._element), e = w({}, D(), t);
242
242
  this.themeStore.dispatch({ type: "push", payload: e });
243
243
  }
244
244
  }
245
245
  };
246
246
  m.propTypes = {
247
- dir: v.string,
248
- renderAs: v.oneOf(["svg", "canvas"])
249
- }, m.defaultProps = {
250
- renderAs: "svg"
251
- };
247
+ dir: g.string,
248
+ renderAs: g.oneOf(["svg", "canvas"])
249
+ }, m.defaultProps = {};
252
250
  let u = m;
253
- I(u);
251
+ C(u);
254
252
  export {
255
253
  u as BaseChart
256
254
  };
@@ -9,6 +9,7 @@ import { AxisLabelClickEvent, DragEvent, DragStartEvent, DragEndEvent, Drilldown
9
9
  import { AxisDefaults, DragAction, Pane, PaneDefaults, SeriesDefaults, Zoomable } from './common/property-types';
10
10
  import { Charts } from './common/charts';
11
11
  import { ChartDrilldownState } from './common/api-types';
12
+ import { ChartOptions } from '@progress/kendo-charts';
12
13
  /**
13
14
  * @hidden
14
15
  */
@@ -16,7 +17,7 @@ export interface BaseChartPrivateProps extends BaseChartProps {
16
17
  /**
17
18
  * @hidden
18
19
  */
19
- deriveOptionsFromParent?: (options: any) => any;
20
+ deriveOptionsFromParent?: (options: ChartOptions) => ChartOptions;
20
21
  /**
21
22
  * @hidden
22
23
  */
@@ -38,6 +39,16 @@ export interface BaseChartPrivateProps extends BaseChartProps {
38
39
  * @hidden
39
40
  */
40
41
  export interface BaseChartProps {
42
+ /**
43
+ * Chart configuration options.
44
+ *
45
+ * This property allows configuring the chart declaratively through a single object,
46
+ * as an alternative (or in addition) to using the nested configuration components
47
+ * (e.g., `ChartSeries`, `ChartCategoryAxis`, `ChartLegend`, etc.). When both are used,
48
+ * the values set through the nested components take precedence and will override the
49
+ * matching options provided here.
50
+ */
51
+ options?: ChartOptions;
41
52
  /**
42
53
  * Represents the `dir` HTML attribute.
43
54
  */
package/Sparkline.d.ts CHANGED
@@ -83,7 +83,7 @@ export declare class Sparkline extends React.Component<SparklineProps, {}> {
83
83
  /**
84
84
  * @hidden
85
85
  */
86
- deriveOptionsFromParent: (options: any) => any;
86
+ deriveOptionsFromParent: (parentOptions: any) => any;
87
87
  /**
88
88
  * @hidden
89
89
  */
package/Sparkline.js CHANGED
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react"),l=require("./BaseChart.js"),a=require("@progress/kendo-charts"),u=require("@progress/kendo-react-common");function h(r){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>r[t]})}}return e.default=r,Object.freeze(e)}const i=h(c);class p extends i.Component{constructor(){super(...arguments),this._baseChart=null,this.deriveOptionsFromParent=e=>{const{type:t,data:n}=this.props,s=Object.assign({},e,{type:t,data:n});return a.Sparkline.normalizeOptions(s)},this.getTarget=()=>this}get chartInstance(){return this._baseChart!==null?this._baseChart.chartInstance:null}get surface(){return this._baseChart!==null?this._baseChart.surface:null}get element(){return this._baseChart!==null?this._baseChart.element:null}render(){const{children:e,type:t,className:n,...s}=this.props;return i.createElement(l.BaseChart,{...s,ref:o=>{this._baseChart=o},chartConstructor:a.Sparkline,getTarget:this.getTarget,wrapper:"span",deriveOptionsFromParent:this.deriveOptionsFromParent,className:u.classNames("k-sparkline k-widget",n)},e)}}exports.Sparkline=p;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react"),l=require("./BaseChart.js"),s=require("@progress/kendo-charts"),u=require("@progress/kendo-react-common");function h(n){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const e in n)if(e!=="default"){const r=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(t,e,r.get?r:{enumerable:!0,get:()=>n[e]})}}return t.default=n,Object.freeze(t)}const i=h(c);class p extends i.Component{constructor(){super(...arguments),this._baseChart=null,this.deriveOptionsFromParent=t=>{const{type:e,data:r}=this.props,a=Object.assign({},t);return e!==void 0&&(a.type=e),r!==void 0&&(a.data=r),s.Sparkline.normalizeOptions(a)},this.getTarget=()=>this}get chartInstance(){return this._baseChart!==null?this._baseChart.chartInstance:null}get surface(){return this._baseChart!==null?this._baseChart.surface:null}get element(){return this._baseChart!==null?this._baseChart.element:null}render(){const{children:t,type:e,className:r,...a}=this.props;return i.createElement(l.BaseChart,{...a,ref:o=>{this._baseChart=o},chartConstructor:s.Sparkline,getTarget:this.getTarget,wrapper:"span",deriveOptionsFromParent:this.deriveOptionsFromParent,className:u.classNames("k-sparkline k-widget",r)},t)}}exports.Sparkline=p;
package/Sparkline.mjs CHANGED
@@ -11,9 +11,9 @@ import { Sparkline as n } from "@progress/kendo-charts";
11
11
  import { classNames as h } from "@progress/kendo-react-common";
12
12
  class m extends a.Component {
13
13
  constructor() {
14
- super(...arguments), this._baseChart = null, this.deriveOptionsFromParent = (t) => {
15
- const { type: s, data: e } = this.props, r = Object.assign({}, t, { type: s, data: e });
16
- return n.normalizeOptions(r);
14
+ super(...arguments), this._baseChart = null, this.deriveOptionsFromParent = (r) => {
15
+ const { type: s, data: e } = this.props, t = Object.assign({}, r);
16
+ return s !== void 0 && (t.type = s), e !== void 0 && (t.data = e), n.normalizeOptions(t);
17
17
  }, this.getTarget = () => this;
18
18
  }
19
19
  /**
@@ -38,11 +38,11 @@ class m extends a.Component {
38
38
  * @hidden
39
39
  */
40
40
  render() {
41
- const { children: t, type: s, className: e, ...r } = this.props;
41
+ const { children: r, type: s, className: e, ...t } = this.props;
42
42
  return /* @__PURE__ */ a.createElement(
43
43
  o,
44
44
  {
45
- ...r,
45
+ ...t,
46
46
  ref: (i) => {
47
47
  this._baseChart = i;
48
48
  },
@@ -52,7 +52,7 @@ class m extends a.Component {
52
52
  deriveOptionsFromParent: this.deriveOptionsFromParent,
53
53
  className: h("k-sparkline k-widget", e)
54
54
  },
55
- t
55
+ r
56
56
  );
57
57
  }
58
58
  }
@@ -21,7 +21,9 @@ export interface CollectionConfigurationProps {
21
21
  export declare class CollectionConfigurationComponent extends React.Component<CollectionConfigurationProps> {
22
22
  static contextType: React.Context<import('../../ChartContext').ChartContextType | null>;
23
23
  context: React.ContextType<typeof ChartContext>;
24
- get optionsStore(): import('../../store/store').Store | undefined;
24
+ get optionsStore(): any;
25
25
  renderChildren(child: any, index: number): React.DetailedReactHTMLElement<any, HTMLElement>;
26
+ componentDidMount(): void;
27
+ componentWillUnmount(): void;
26
28
  render(): any;
27
29
  }
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react"),u=require("../../ChartContext.js");function d(n){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const t in n)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,r.get?r:{enumerable:!0,get:()=>n[t]})}}return e.default=n,Object.freeze(e)}const s=d(l),i=class i extends s.Component{get optionsStore(){var e;return(e=this.context)==null?void 0:e.optionsStore}renderChildren(e,t){const{children:r}=e.props,{_chartKey:p,_parentStore:o}=this.props,c={...e.props,_chartCollectionIdxKey:`${p}_${t}`,_parentStore:o};return s.cloneElement(e,c,r)}render(){const{_chartKey:e,_parentStore:t,children:r}=this.props;return(t||this.optionsStore).dispatch({chartKey:e,payload:[]}),s.Children.map(r,(o,c)=>s.isValidElement(o)?this.renderChildren(o,c):o)}};i.contextType=u.ChartContext;let a=i;exports.CollectionConfigurationComponent=a;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react"),h=require("../../ChartContext.js");function u(o){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const e in o)if(e!=="default"){const r=Object.getOwnPropertyDescriptor(o,e);Object.defineProperty(t,e,r.get?r:{enumerable:!0,get:()=>o[e]})}}return t.default=o,Object.freeze(t)}const s=u(l),p=class p extends s.Component{get optionsStore(){var t,e;return((t=this.props)==null?void 0:t._parentStore)||((e=this.context)==null?void 0:e.optionsStore)}renderChildren(t,e){const{children:r}=t.props,{_chartKey:n,_parentStore:c}=this.props,a={...t.props,_chartCollectionIdxKey:`${n}_${e}`,_parentStore:c};return s.cloneElement(t,a,r)}componentDidMount(){var t,e;(e=(t=this.optionsStore)==null?void 0:t.claimKey)==null||e.call(t,this.props._chartKey)}componentWillUnmount(){var t,e;(e=(t=this.optionsStore)==null?void 0:t.releaseKey)==null||e.call(t,this.props._chartKey)}render(){var r;const{_chartKey:t,children:e}=this.props;return(r=this.optionsStore)==null||r.dispatch({chartKey:t,payload:[]}),s.Children.map(e,(n,c)=>s.isValidElement(n)?this.renderChildren(n,c):n)}};p.contextType=h.ChartContext;let i=p;exports.CollectionConfigurationComponent=i;
@@ -5,31 +5,40 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import * as r from "react";
9
- import { ChartContext as h } from "../../ChartContext.mjs";
10
- const p = class p extends r.Component {
8
+ import * as s from "react";
9
+ import { ChartContext as c } from "../../ChartContext.mjs";
10
+ const p = class p extends s.Component {
11
11
  get optionsStore() {
12
- var t;
13
- return (t = this.context) == null ? void 0 : t.optionsStore;
12
+ var t, e;
13
+ return ((t = this.props) == null ? void 0 : t._parentStore) || ((e = this.context) == null ? void 0 : e.optionsStore);
14
14
  }
15
- renderChildren(t, s) {
16
- const { children: o } = t.props, { _chartKey: c, _parentStore: e } = this.props, n = {
15
+ renderChildren(t, e) {
16
+ const { children: o } = t.props, { _chartKey: r, _parentStore: n } = this.props, h = {
17
17
  ...t.props,
18
- _chartCollectionIdxKey: `${c}_${s}`,
19
- _parentStore: e
18
+ _chartCollectionIdxKey: `${r}_${e}`,
19
+ _parentStore: n
20
20
  };
21
- return r.cloneElement(t, n, o);
21
+ return s.cloneElement(t, h, o);
22
+ }
23
+ componentDidMount() {
24
+ var t, e;
25
+ (e = (t = this.optionsStore) == null ? void 0 : t.claimKey) == null || e.call(t, this.props._chartKey);
26
+ }
27
+ componentWillUnmount() {
28
+ var t, e;
29
+ (e = (t = this.optionsStore) == null ? void 0 : t.releaseKey) == null || e.call(t, this.props._chartKey);
22
30
  }
23
31
  render() {
24
- const { _chartKey: t, _parentStore: s, children: o } = this.props;
25
- return (s || this.optionsStore).dispatch({
32
+ var o;
33
+ const { _chartKey: t, children: e } = this.props;
34
+ return (o = this.optionsStore) == null || o.dispatch({
26
35
  chartKey: t,
27
36
  payload: []
28
- }), r.Children.map(o, (e, n) => r.isValidElement(e) ? this.renderChildren(e, n) : e);
37
+ }), s.Children.map(e, (r, n) => s.isValidElement(r) ? this.renderChildren(r, n) : r);
29
38
  }
30
39
  };
31
- p.contextType = h;
32
- let a = p;
40
+ p.contextType = c;
41
+ let i = p;
33
42
  export {
34
- a as CollectionConfigurationComponent
43
+ i as CollectionConfigurationComponent
35
44
  };
@@ -23,11 +23,13 @@ export declare class ConfigurationComponent extends React.Component<Configuratio
23
23
  static contextType: React.Context<import('../../ChartContext').ChartContextType | null>;
24
24
  context: React.ContextType<typeof ChartContext>;
25
25
  childStore: any;
26
- get optionsStore(): import('./../../store/store').Store | undefined;
26
+ private childStoreUnsubscribe;
27
+ get optionsStore(): any;
27
28
  constructor(props: any);
28
29
  render(): any;
29
30
  componentDidMount(): void;
30
31
  componentDidUpdate(): void;
32
+ componentWillUnmount(): void;
31
33
  private dispatch;
32
34
  private renderChildren;
33
35
  }
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react"),p=require("../../store/store.js"),d=require("../../store/reducer.js"),l=require("../../ChartContext.js");function u(o){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const e in o)if(e!=="default"){const r=Object.getOwnPropertyDescriptor(o,e);Object.defineProperty(t,e,r.get?r:{enumerable:!0,get:()=>o[e]})}}return t.default=o,Object.freeze(t)}const n=u(a),c=class c extends n.Component{get optionsStore(){var t;return(t=this.context)==null?void 0:t.optionsStore}constructor(t){super(t),this.childStore=p.createStore(d.optionsReducer)}render(){const{children:t}=this.props;return t!==void 0?n.Children.map(t,e=>n.isValidElement(e)?this.renderChildren(e):e):null}componentDidMount(){this.dispatch()}componentDidUpdate(){this.dispatch()}dispatch(){const{_chartKey:t,_chartCollectionIdxKey:e,_parentStore:r,children:h,...i}=this.props;(r||this.optionsStore).dispatch({chartKey:t,chartCollectionIdxKey:e,payload:Object.assign({},i,this.childStore.getState())})}renderChildren(t){const{children:e}=t.props,r={...t.props,_parentStore:this.childStore};return n.cloneElement(t,r,e)}};c.contextType=l.ChartContext;let s=c;exports.ConfigurationComponent=s;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react"),h=require("../../store/store.js"),d=require("../../store/reducer.js"),l=require("../../ChartContext.js");function u(i){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(i){for(const e in i)if(e!=="default"){const r=Object.getOwnPropertyDescriptor(i,e);Object.defineProperty(t,e,r.get?r:{enumerable:!0,get:()=>i[e]})}}return t.default=i,Object.freeze(t)}const n=u(a),c=class c extends n.Component{constructor(t){super(t),this.childStoreUnsubscribe=Function.prototype,this.childStore=h.createStore(d.optionsReducer)}get optionsStore(){var t,e;return((t=this.props)==null?void 0:t._parentStore)||((e=this.context)==null?void 0:e.optionsStore)}render(){const{children:t}=this.props;return t!==void 0?n.Children.map(t,e=>n.isValidElement(e)?this.renderChildren(e):e):null}componentDidMount(){var r,o;const{_chartKey:t,_chartCollectionIdxKey:e}=this.props;t!==void 0&&e===void 0&&((o=(r=this.optionsStore)==null?void 0:r.claimKey)==null||o.call(r,t)),this.childStoreUnsubscribe=this.childStore.subscribe(()=>this.dispatch()),this.dispatch()}componentDidUpdate(){this.dispatch()}componentWillUnmount(){var r,o;this.childStoreUnsubscribe();const{_chartKey:t,_chartCollectionIdxKey:e}=this.props;t!==void 0&&e===void 0&&((o=(r=this.optionsStore)==null?void 0:r.releaseKey)==null||o.call(r,t))}dispatch(){const{_chartKey:t,_chartCollectionIdxKey:e,_parentStore:r,children:o,...p}=this.props;this.optionsStore.dispatch({chartKey:t,chartCollectionIdxKey:e,payload:Object.assign({},p,this.childStore.getState())})}renderChildren(t){const{children:e}=t.props,r={...t.props,_parentStore:this.childStore};return n.cloneElement(t,r,e)}};c.contextType=l.ChartContext;let s=c;exports.ConfigurationComponent=s;
@@ -5,34 +5,42 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import * as r from "react";
9
- import { createStore as c } from "../../store/store.mjs";
8
+ import * as i from "react";
9
+ import { createStore as h } from "../../store/store.mjs";
10
10
  import { optionsReducer as p } from "../../store/reducer.mjs";
11
- import { ChartContext as h } from "../../ChartContext.mjs";
12
- const s = class s extends r.Component {
13
- get optionsStore() {
14
- var t;
15
- return (t = this.context) == null ? void 0 : t.optionsStore;
16
- }
11
+ import { ChartContext as d } from "../../ChartContext.mjs";
12
+ const s = class s extends i.Component {
17
13
  constructor(t) {
18
- super(t), this.childStore = c(p);
14
+ super(t), this.childStoreUnsubscribe = Function.prototype, this.childStore = h(p);
15
+ }
16
+ get optionsStore() {
17
+ var t, e;
18
+ return ((t = this.props) == null ? void 0 : t._parentStore) || ((e = this.context) == null ? void 0 : e.optionsStore);
19
19
  }
20
20
  render() {
21
21
  const { children: t } = this.props;
22
- return t !== void 0 ? r.Children.map(t, (e) => r.isValidElement(e) ? this.renderChildren(e) : e) : null;
22
+ return t !== void 0 ? i.Children.map(t, (e) => i.isValidElement(e) ? this.renderChildren(e) : e) : null;
23
23
  }
24
24
  componentDidMount() {
25
- this.dispatch();
25
+ var o, r;
26
+ const { _chartKey: t, _chartCollectionIdxKey: e } = this.props;
27
+ t !== void 0 && e === void 0 && ((r = (o = this.optionsStore) == null ? void 0 : o.claimKey) == null || r.call(o, t)), this.childStoreUnsubscribe = this.childStore.subscribe(() => this.dispatch()), this.dispatch();
26
28
  }
27
29
  componentDidUpdate() {
28
30
  this.dispatch();
29
31
  }
32
+ componentWillUnmount() {
33
+ var o, r;
34
+ this.childStoreUnsubscribe();
35
+ const { _chartKey: t, _chartCollectionIdxKey: e } = this.props;
36
+ t !== void 0 && e === void 0 && ((r = (o = this.optionsStore) == null ? void 0 : o.releaseKey) == null || r.call(o, t));
37
+ }
30
38
  dispatch() {
31
- const { _chartKey: t, _chartCollectionIdxKey: e, _parentStore: o, children: a, ...i } = this.props;
32
- (o || this.optionsStore).dispatch({
39
+ const { _chartKey: t, _chartCollectionIdxKey: e, _parentStore: o, children: r, ...c } = this.props;
40
+ this.optionsStore.dispatch({
33
41
  chartKey: t,
34
42
  chartCollectionIdxKey: e,
35
- payload: Object.assign({}, i, this.childStore.getState())
43
+ payload: Object.assign({}, c, this.childStore.getState())
36
44
  });
37
45
  }
38
46
  renderChildren(t) {
@@ -40,10 +48,10 @@ const s = class s extends r.Component {
40
48
  ...t.props,
41
49
  _parentStore: this.childStore
42
50
  };
43
- return r.cloneElement(t, o, e);
51
+ return i.cloneElement(t, o, e);
44
52
  }
45
53
  };
46
- s.contextType = h;
54
+ s.contextType = d;
47
55
  let n = s;
48
56
  export {
49
57
  n as ConfigurationComponent
@@ -12,4 +12,4 @@
12
12
  * Licensed under commercial license. See LICENSE.md in the package root for more information
13
13
  *-------------------------------------------------------------------------------------------
14
14
  */
15
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("prop-types"),require("@progress/kendo-react-intl"),require("@progress/kendo-charts"),require("@progress/kendo-react-common"),require("@progress/kendo-react-popup"),require("@progress/kendo-react-layout"),require("@progress/kendo-svg-icons"),require("react-dom")):"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","react-dom"],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,e.ReactDOM)}(this,function(e,t,r,s,n,a,i,o,l,c){"use strict";function h(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 p=h(t),d=h(c);function u(e,t){let r=e;for(;r&&r!==t;)r=r.parentNode;return!!r}function m(e,t,r,s){const n=e[t];if(n&&Array.isArray(n))for(const e of n)if(!e.type||e.type!==s)return new Error(`${r} children should be Array of type ${s.displayName}.`);return null}const y=e=>void 0!==e&&!e;let g=class{constructor(e){this.target=e}},v=class extends g{constructor(e,t){super(t),this.axis=e.axis,this.dataItem=e.dataItem,this.index=e.index,this.text=e.text,this.value=e.value}},C=class extends g{constructor(){super(...arguments),this.prevented=!1}preventDefault(){this.prevented=!0}isDefaultPrevented(){return this.prevented}},b=class extends C{constructor(e,t){super(t),this.axisRanges=e.axisRanges,this.nativeEvent=e.originalEvent}},f=class extends g{constructor(e,t){super(t),this.axisRanges=e.axisRanges,this.nativeEvent=e.originalEvent}},x=class extends C{constructor(e,t){super(t),this.axisRanges=e.axisRanges,this.nativeEvent=e.originalEvent}},E=class extends g{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}},S=class extends C{constructor(e,t){super(t),this.series=e.series,this.seriesIndex=e.seriesIndex,this.pointIndex=e.pointIndex,this.text=e.text}preventDefault(){super.preventDefault()}},I=class extends C{constructor(e,t){super(t),this.series=e.series,this.seriesIndex=e.seriesIndex,this.pointIndex=e.pointIndex,this.text=e.text}preventDefault(){super.preventDefault()}},N=class extends g{constructor(e,t){super(t),this.from=e.from,this.to=e.to}},_=class extends g{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}},k=class extends g{constructor(e,t){super(t),this.category=e.category,this.dataItem=e.dataItem,this.series=e.series,this.value=e.value,this.visual=e.visual}},T=class extends g{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}},w=class extends g{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}},K=class extends g{constructor(e,t){super(t)}},A=class extends C{constructor(e,t){super(t),this.axis=e.axis,this.from=e.from,this.to=e.to}},O=class extends g{constructor(e,t){super(t),this.axis=e.axis,this.from=e.from,this.to=e.to}},L=class extends C{constructor(e,t){super(t),this.axis=e.axis,this.from=e.from,this.to=e.to}},D=class extends g{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}},R=class extends C{constructor(e,t){super(t),this.category=e.category,this.categoryPoints=e.categoryPoints,this.dataItem=e.dataItem,this.nativeEvent=e.originalEvent,this.percentage=e.percentage,this.point=e.point,this.series=e.series,this.stackValue=e.stackValue,this.value=e.value}},P=class extends C{constructor(e,t){super(t),this.axisRanges=e.axisRanges,this.delta=e.delta,this.nativeEvent=e.originalEvent}},F=class extends g{constructor(e,t){super(t),this.axisRanges=e.axisRanges,this.nativeEvent=e.originalEvent}},M=class extends C{constructor(e,t){super(t),this.axisRanges=e.axisRanges,this.nativeEvent=e.originalEvent}};const V={axisLabelClick:v,drag:b,dragEnd:f,dragStart:x,drilldownEvent:E,legendItemHover:S,legendItemClick:I,legendItemLeave:class extends C{constructor(e,t){super(t),this.series=e.series,this.seriesIndex=e.seriesIndex,this.pointIndex=e.pointIndex,this.text=e.text}preventDefault(){super.preventDefault()}},navigatorFilter:N,noteClick:_,noteHover:k,plotAreaClick:T,plotAreaHover:w,render:K,select:A,selectEnd:O,selectStart:L,seriesClick:D,seriesHover:R,zoom:P,zoomEnd:F,zoomStart:M};let j=class{constructor(e,t){this.sender=e,this.syntheticEvent=t}};function H(e,t){return new j(e,t)}const U=1e3/60,z=e=>{let t,r,s=[];const n=n=>{t=e(t,n),a.canUseDOM&&(window.clearTimeout(r),r=window.setTimeout(()=>s.forEach(e=>e()),U))};return n({}),{getState:()=>t,dispatch:n,subscribe:e=>(s.push(e),()=>s=s.filter(t=>t!==e))}},q=(e,t)=>t.chartCollectionIdxKey?X.collectionConfigurationItem(e,t):t.chartKey?X.configurationItem(e,t):{},W=(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}},B=(e,t)=>{if(!t.type)return[];switch(t.type){case"add":return[...e,t.payload];case"remove":return e.filter(e=>e!==t.payload);default:return e}},X={configurationItem:(e,t)=>Object.assign(e,{[t.chartKey]:t.payload}),collectionConfigurationItem(e,t){let r=!1;const[s,n]=t.chartCollectionIdxKey.split("_"),a=e[s].map((e,s)=>parseInt(n,10)===s?(r=!0,t.payload):e);return!1===r&&a.splice(parseInt(n,10),0,t.payload),Object.assign(e,{[s]:a})},themeItem(e,t){let r={};const s=Object.assign(r,e),{field:n,value:a}=t.payload,i=n.split(".");let o=i.shift();for(;i.length>0;)r=r[o]=r[o]||{},o=i.shift();return r[o]=a,s}};let Y=class{constructor(e,t){this.value=e.value,this.category=e.category,this.categoryIndex=e.categoryIx,this.series=e.series,this.dataItem=e.dataItem,this.percentage=e.percentage,this.runningTotal=e.runningTotal,this.total=e.total,this.low=e.low,this.high=e.high,this.xLow=e.xLow,this.xHigh=e.xHigh,this.yLow=e.yLow,this.yHigh=e.yHigh,this.point=e,this.format=((e.options||{}).tooltip||{}).format||t}get formattedValue(){return this.format?this.point.formatValue(this.format):String(this.value)}};const $=e=>{const{categoryText:t,colorMarker:r,colspan:s,nameColumn:n,points:a}=e;return p.createElement("table",null,p.createElement("thead",null,p.createElement("tr",null,p.createElement("th",{colSpan:s},t))),p.createElement("tbody",null,a.map((e,t)=>p.createElement("tr",{key:t},r&&p.createElement("td",null,p.createElement("span",{className:"k-chart-shared-tooltip-marker",style:{backgroundColor:e.series.color}})),n&&p.createElement("td",null,e.series.name),p.createElement("td",null,e.formattedValue)))))},Z=p.createContext(null);Z.displayName="ChartContext";const G={horizontal:"fit",vertical:"fit"},J="k-chart-tooltip",Q=class extends p.Component{constructor(e){super(e),this.context=null,this.element=null,this.onChartMouseLeave=e=>{const{syntheticEvent:t}=e;return!!u(t.relatedTarget,this.element)},this.onMouseLeave=e=>{const t=H(this,e);this.context.childrenObserver.trigger("onMouseLeave",t)&&e.preventDefault()},this.popupRef=e=>{this.element=e;const t=e&&e.closest(".k-animation-container");t&&(t.style.transition="initial")},this.chartObserver=new n.InstanceObserver(this,{onMouseLeave:"onChartMouseLeave"})}componentDidMount(){var e;null==(e=this.context)||e.observersStore.dispatch({type:"add",payload:this.chartObserver})}render(){const{popupShown:e,popupAlign:t,popupOffset:r,popupStyles:s,popupContent:n,className:a}=this.props,o=[J,a].join(" ").trim();return p.createElement(i.Popup,{animate:!1,popupAlign:t,offset:r,show:e,collision:G,className:"k-chart-tooltip-wrapper"},p.createElement("div",{className:o,style:s,onMouseLeave:this.onMouseLeave,ref:this.popupRef},n()))}componentWillUnmount(){this.context.observersStore.dispatch({type:"remove",payload:this.chartObserver})}};Q.contextType=Z;let ee=Q;const te="k-chart-shared-tooltip",re="k-chart-tooltip-inverse",se=class extends p.Component{constructor(){super(...arguments),this.context=null,this.state={popupShown:!1},this.chartObserver=null}componentDidMount(){this.chartObserver=new n.InstanceObserver(this,{showTooltip:"onShowTooltip",hideTooltip:"onHideTooltip"}),this.context.observersStore.dispatch({type:"add",payload:this.chartObserver})}render(){const{popupContext:e,shared:t,className:r,...s}=this.state,n=this.state.popupShown?()=>{const r=this.findRenderFunction();if(t)return null!==r?r(e):p.createElement($,{...e});const s=e.point,n=this.findRenderFunctionByIndex(s.series.index);return null!==n?n(e):null!==r?r(e):p.createElement("span",null,e.point.formattedValue)}:Function.prototype,i=a.classNames({[te]:t,[re]:!!r});return p.createElement(ee,{...s,popupContent:n,className:i})}componentWillUnmount(){this.context.observersStore.dispatch({type:"remove",payload:this.chartObserver})}onShowTooltip(e){const{anchor:t,style:r,shared:s,className:n,crosshair:a}=e;let i;a||(i=s?this.createSharedTooltipContext(e):this.createTooltipContext(e),this.setState({popupShown:!0,popupAlign:t.align,popupOffset:t.point,popupContext:i,popupStyles:r,className:n,shared:s}))}onHideTooltip(){this.setState({popupShown:!1,popupStyles:{},className:void 0})}createSharedTooltipContext(e){const{points:t,categoryText:r}=e,s=t.filter(e=>void 0!==e.series.name).length>0,n=e.series.length>1;let a=1;return s&&a++,n&&a++,{categoryText:r,colorMarker:n,colspan:a,nameColumn:s,points:e.points.map(t=>new Y(t,e.format))}}createTooltipContext(e){const{point:t,format:r}=e;return{point:new Y(t,r)}}findRenderFunctionByIndex(e){const t=this.context.optionsStore.getState().series;return void 0!==t&&Array.isArray(t)&&void 0!==t[e]&&t[e].hasOwnProperty("tooltip")&&t[e].tooltip.hasOwnProperty("render")?t[e].tooltip.render:null}findRenderFunction(){const e=this.context.optionsStore.getState().tooltip;return void 0!==e&&e.hasOwnProperty("render")?e.render:null}};se.contextType=Z;let ne=se;const ae=e=>e.children;ae.displayName="Container";const ie="k-chart-crosshair-tooltip",oe="k-chart-tooltip-inverse",le=class extends p.Component{constructor(e){super(e),this.context=null,this.state={popupShown:!1},this.chartObserver=new n.InstanceObserver(this,{showTooltip:"onShowTooltip",hideTooltip:"onHideTooltip"})}componentDidMount(){var e;null==(e=this.context)||e.observersStore.dispatch({type:"add",payload:this.chartObserver})}render(){const{popupContend:e,className:t,...r}=this.state,s=this.state.popupShown?()=>e:Function.prototype,n=a.classNames({[ie]:!0,[oe]:!!t});return p.createElement(ee,{...r,popupContent:s,className:n})}componentWillUnmount(){var e;null==(e=this.context)||e.observersStore.dispatch({type:"remove",payload:this.chartObserver})}onShowTooltip(e){const{anchor:t,style:r,className:s,crosshair:n,axisName:a,axisIndex:i,value:o}=e,{name:l,index:c}=this.props;n&&a===l&&i===c&&this.setState({popupShown:!0,popupAlign:t.align,popupOffset:t.point,popupContend:o,popupStyles:r,className:s})}onHideTooltip(){this.setState({popupShown:!1,popupStyles:{},className:void 0})}};le.contextType=Z;let ce=le;const he=["categoryAxis","valueAxis","xAxis","yAxis"];function pe(e){const t={};for(let r=0;r<he.length;r++){const s=de(e,he[r]);for(let e=0;e<s.length;e++){const r=s[e];t[r.name+r.index]=r}}return t}function de(e,t){const r=[];if(e[t]){const s=[].concat(e[t]);for(let e=0;e<s.length;e++){const n=(s[e].crosshair||{}).tooltip;n&&n.visible&&r.push({index:e,name:t})}}return r}const ue=class extends p.Component{constructor(){super(...arguments),this.context=null,this.state={tooltips:{}},this.storeUnsubscriber=Function.prototype,this.subscriber=()=>{var e;this.setState({tooltips:pe(null==(e=this.context)?void 0:e.optionsStore.getState())})}}componentDidMount(){this.storeUnsubscriber=this.context.optionsStore.subscribe(this.subscriber)}render(){const{tooltips:e}=this.state,t=Object.keys(e).map(t=>p.createElement(ce,{...e[t],key:t}));return p.createElement(ae,null,t)}componentWillUnmount(){this.storeUnsubscriber()}};ue.contextType=Z;let me=ue;const ye=Object.freeze({name:"@progress/kendo-react-charts",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:0,version:"16.4.0-develop.5",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"}),ge=class extends p.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 n={seriesName:s.name,drilldownValue:e.value},a=[...(null==(t=this.props.drilldownState)?void 0:t.steps)||[],n],i=this.props.getTarget(),o={...e,currentState:this.props.drilldownState,nextState:{steps:a}},l=new E(o,i);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:n}=e,a=t[s];if(void 0===n)r=Object.assign({},a,{visible:y(a.visible)});else{const e=a.pointVisibility=a.pointVisibility||[];e[n]=y(e[n]),r=Object.assign({},a)}this.optionsStore.dispatch({chartCollectionIdxKey:`series_${s}`,payload:r}),this.suppressTransitions=!0}},this.onWindowResize=()=>{null!==this.chartInstance&&this.chartInstance.resize()},this.onChartMouseLeave=e=>{const t=H(this,e);this.triggerDomEvent("onMouseLeave",t)?e.preventDefault():null!==this.chartInstance&&this.chartInstance.hideElements()},this.onChildMouseLeave=e=>{const{syntheticEvent:t}=e;return this.chartInstance&&!u(t.relatedTarget,this.element)&&this.chartInstance.hideElements(),!1},this.showLicenseWatermark=!a.validatePackage(ye,{component:"Chart"}),this.licenseMessage=a.getLicenseMessage(ye),this.optionsStore=z(q),this.observersStore=z(B),this.childrenObserver=new n.InstanceObserver(this,{onMouseLeave:"onChildMouseLeave"}),this.state={optionsStore:this.optionsStore,observersStore:this.observersStore,childrenObserver:this.childrenObserver,drilldownState:{steps:[]}},this.themeStore=z(W),this.chartObserver=new n.InstanceObserver(this,{render:"onRender",legendItemClick:"onLegendItemClick",drilldown:"onDrilldown",styleChanged:"onStyleChanged"})}get element(){return this._element}static getDerivedStateFromProps(e,t){return{...t,drilldownState:e.drilldownState||[]}}componentDidMount(){this._element&&(this.readTheme(),this.instantiateCoreChart()),this.optionsUnsubscriber=this.optionsStore.subscribe(this.refresh.bind(this)),this.themeUnsubscriber=this.themeStore.subscribe(this.refresh.bind(this)),window.addEventListener("resize",this.onWindowResize)}componentWillUnmount(){this.optionsUnsubscriber(),this.themeUnsubscriber(),null!==this.chartInstance&&(this.chartInstance.destroy(),this.chartInstance=null),window.removeEventListener("resize",this.onWindowResize)}componentDidUpdate(e){const{dir:t,children:r,...n}=this.props;if(null!==this.chartInstance){const r=s.provideIntlService(this),a=this.chartInstance.chartService,i=r.locale!==a._intlService.locale,o=Object.entries(e).filter(e=>"dir"!==e[0]&&"children"!==e[0]).some(e=>{const[t,r]=e;return!(n.hasOwnProperty(t)&&n[t]===r)});i&&(this.chartInstance.chartService._intlService=r,this.chartInstance.chartService.format._intlService=r,o||this.chartInstance.noTransitionsRedraw()),o&&this.refresh(),e.dir!==t&&this.chartInstance.setDirection(this.getDirection(t))}}render(){const{style:e={},className:t,wrapper:r,children:s}=this.props,n=Object.assign({},e,{position:"relative"}),i=p.createElement(r,{className:t,style:n,key:"chartElement"},p.createElement("div",{onMouseLeave:this.onChartMouseLeave,ref:e=>{this._element=e},className:"k-chart-surface"},s),p.createElement(p.Fragment,null,this.showLicenseWatermark&&p.createElement(a.WatermarkOverlay,{message:this.licenseMessage})));return p.createElement(Z.Provider,{value:this.state},p.createElement(ne,{key:"seriesTooltip"}),p.createElement(me,{key:"crosshairTooltips"}),i)}getDirection(e){return"rtl"===(void 0!==e?e:a.canUseDOM&&window.getComputedStyle(this.element).direction||"ltr")}getChartOptions(){const{renderAs:e,pannable:t,zoomable:r,paneDefaults:s,panes:n,transitions:a,seriesColors:i,seriesDefaults:o,axisDefaults:l,observeStyles:c,deriveOptionsFromParent:h}=this.props;let p={};return void 0!==e&&(p.renderAs=e),void 0!==t&&(p.pannable=t),void 0!==r&&(p.zoomable=r),void 0!==s&&(p.paneDefaults=s),void 0!==n&&(p.panes=n),void 0!==a&&(p.transitions=a),void 0!==i&&(p.seriesColors=i),void 0!==o&&(p.seriesDefaults=o),void 0!==l&&(p.axisDefaults=l),p.observeStyles=void 0===c||c,p=Object.assign(p,this.optionsStore.getState()),h&&(p=h(p)),p}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(V[e])return new V[e](t,r)}(e,t,this.props.getTarget()),s="on"+e.charAt(0).toUpperCase()+e.slice(1),n=this.observersStore.getState();let a=!1;for(let r=0;r<n.length;r++)n[r].trigger(e,t)&&(a=!0);return!1===a&&r&&this.props.hasOwnProperty(s)?(this.props[s].call(void 0,r),r.isDefaultPrevented&&r.isDefaultPrevented()):a}requiresHandlers(e){for(let t=0;t<e.length;t++){const r=e[t],s="on"+r.charAt(0).toUpperCase()+r.slice(1);if(this.props.hasOwnProperty(s))return!0}return!1}triggerDomEvent(e,t){const r=this.observersStore.getState();let s=!1;for(let n=0;n<r.length;n++)r[n].trigger(e,t)&&(s=!0);return s}onStyleChanged(){this.suppressTransitions=!0,this.readTheme()}readTheme(){if(this._element){const e=n.chartTheme(this._element),t=n.deepExtend({},n.chartBaseTheme(),e);this.themeStore.dispatch({type:"push",payload:t})}}};ge.propTypes={dir:r.string,renderAs:r.oneOf(["svg","canvas"])},ge.defaultProps={renderAs:"svg"};let ve=ge;s.registerForIntl(ve);const Ce=class extends p.Component{constructor(e){super(e),this.state={donutCenterStyles:null},this.chartObserver=new n.InstanceObserver(this,{render:"onRender"})}componentDidMount(){var e;null==(e=this.context)||e.observersStore.dispatch({type:"add",payload:this.chartObserver})}render(){const{render:e}=this.props,{donutCenterStyles:t}=this.state;let r=null;return e&&t&&(r=p.createElement("div",{className:"k-chart-donut-center",style:t},p.createElement(e,null))),r}onRender(e){var t;const r=null==(t=this.context)?void 0:t.optionsStore.getState().series,s=Array.isArray(r)?r[0]:null,n=e.sender._plotArea.charts;if(!s||"donut"!==s.type||0===n[0].points.length)return;const a=n[0].points[0].sector,i=a.innerRadius,o=a.center.y-i,l=a.center.x-i,c=2*i;this.setState({donutCenterStyles:{height:c,left:l,top:o,width:c}})}};Ce.contextType=Z;let be=Ce,fe=class extends p.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 p.createElement(ve,{...s,ref:e=>{this._baseChart=e},chartConstructor:n.Chart,getTarget:this.getTarget,wrapper:"div",className:a.classNames("k-chart k-widget",r)},t,p.createElement(be,{render:e}))}};const xe=p.forwardRef((e,t)=>{const[r,s]=a.useMergedRef(t);return a.useWebMcpRegister("chart",r,e,e.webMcp),p.createElement(fe,{...e,ref:s})});xe.displayName="KendoReactChart";let Ee=class extends p.Component{constructor(){super(...arguments),this._baseChart=null,this.deriveOptionsFromParent=e=>{const{type:t,data:r}=this.props,s=Object.assign({},e,{type:t,data:r});return n.Sparkline.normalizeOptions(s)},this.getTarget=()=>this}get chartInstance(){return null!==this._baseChart?this._baseChart.chartInstance:null}get surface(){return null!==this._baseChart?this._baseChart.surface:null}get element(){return null!==this._baseChart?this._baseChart.element:null}render(){const{children:e,type:t,className:r,...s}=this.props;return p.createElement(ve,{...s,ref:e=>{this._baseChart=e},chartConstructor:n.Sparkline,getTarget:this.getTarget,wrapper:"span",deriveOptionsFromParent:this.deriveOptionsFromParent,className:a.classNames("k-sparkline k-widget",r)},e)}};const Se={autoBindElements:!0,liveDrag:!1,partialRedraw:!0};let Ie=class extends p.Component{constructor(){super(...arguments),this._baseChart=null,this.deriveOptionsFromParent=e=>{const t=Object.assign({},e.navigator||{},Se);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 p.createElement(ve,{...r,ref:e=>{this._baseChart=e},chartConstructor:n.StockChart,getTarget:this.getTarget,wrapper:"div",deriveOptionsFromParent:this.deriveOptionsFromParent,onRefresh:this.onRefresh,className:a.classNames("k-chart k-stockchart",t)},e)}};const Ne=class extends p.Component{get optionsStore(){var e;return null==(e=this.context)?void 0:e.optionsStore}renderChildren(e,t){const{children:r}=e.props,{_chartKey:s,_parentStore:n}=this.props,a={...e.props,_chartCollectionIdxKey:`${s}_${t}`,_parentStore:n};return p.cloneElement(e,a,r)}render(){const{_chartKey:e,_parentStore:t,children:r}=this.props;return(t||this.optionsStore).dispatch({chartKey:e,payload:[]}),p.Children.map(r,(e,t)=>p.isValidElement(e)?this.renderChildren(e,t):e)}};Ne.contextType=Z;let _e=Ne;const ke=class extends p.Component{get optionsStore(){var e;return null==(e=this.context)?void 0:e.optionsStore}constructor(e){super(e),this.childStore=z(q)}render(){const{children:e}=this.props;return void 0!==e?p.Children.map(e,e=>p.isValidElement(e)?this.renderChildren(e):e):null}componentDidMount(){this.dispatch()}componentDidUpdate(){this.dispatch()}dispatch(){const{_chartKey:e,_chartCollectionIdxKey:t,_parentStore:r,children:s,...n}=this.props;(r||this.optionsStore).dispatch({chartKey:e,chartCollectionIdxKey:t,payload:Object.assign({},n,this.childStore.getState())})}renderChildren(e){const{children:t}=e.props,r={...e.props,_parentStore:this.childStore};return p.cloneElement(e,r,t)}};ke.contextType=Z;let Te=ke,we=class{constructor(e){this.currentState=e.currentState,this.nextState=e.nextState}};const Ke=p.forwardRef((e,t)=>{const r=p.useRef(null),s=p.useRef(null),n={valueField:Oe.valueField,textField:Oe.textField,iconField:Oe.iconField,iconClassField:Oe.iconClassField,...e};p.useImperativeHandle(r,()=>({element:s.current,props:n})),p.useImperativeHandle(t,()=>r.current);let i=[{id:"0",...e.rootItem||{text:"Home",icon:p.createElement(a.SvgIcon,{icon:l.homeIcon,style:{marginInlineEnd:"4px"}})}}];e.drilldownState&&(i=[...i,...e.drilldownState.steps.map((e,t)=>({id:(t+1).toString(),text:e.drilldownValue}))]);const c={...n,data:i};return p.createElement("div",null,p.createElement(o.Breadcrumb,{...c,onItemSelect:t=>{var r;const s="onDrilldownStateChange";if(e.hasOwnProperty(s)){const n=i.findIndex(e=>e.id===t.id),a={steps:((null==(r=e.drilldownState)?void 0:r.steps)||[]).slice(0,n)},o=new we({currentState:e.drilldownState,nextState:a});e[s].call(void 0,o)}}}))}),Ae={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},Oe={valueField:"id",textField:"text",iconField:"icon",iconClassField:"iconClass"};Ke.displayName="KendoReactChartBreadcrumb",Ke.propTypes=Ae;const Le="charts.nodata",De={[Le]:"No data available."},Re=e=>{const t=s.useLocalization();return p.createElement("div",{className:a.classNames("k-chart-overlay",e.className),style:{display:"none",...e.style}},p.createElement("div",{className:"k-no-data"},void 0===e.children?t.toLanguageString(Le,De[Le]):e.children))};Re.displayName="ChartNoDataOverlay";const Pe=e=>p.createElement(Te,{...e,_chartKey:"chartArea"});Pe.displayName="ChartArea";const Fe=e=>p.createElement(Te,{visible:!0,...e,_chartKey:"crosshair"});Fe.displayName="ChartAxisDefaultsCrosshair";const Me=e=>p.createElement(Te,{visible:!0,...e,_chartKey:"tooltip"});Me.displayName="ChartAxisDefaultsCrosshairTooltip";const Ve=e=>p.createElement(Te,{...e,_chartKey:"labels"});Ve.displayName="ChartAxisDefaultsLabels";const je=e=>p.createElement(Te,{...e,_chartKey:"title"});je.displayName="ChartAxisDefaultsTitle";const He=e=>p.createElement(Te,{...e});He.displayName="ChartCategoryAxisItem";const Ue=e=>p.createElement(_e,{...e,_chartKey:"categoryAxis"});Ue.propTypes={children:function(e,t,r){return m(e,t,r,He)}},Ue.displayName="ChartCategoryAxis";const ze=e=>p.createElement(Te,{...e,_chartKey:"title"});ze.displayName="ChartCategoryAxisTitle";const qe=e=>p.createElement(Te,{visible:!0,...e,_chartKey:"legend"});qe.displayName="ChartLegend";const We=e=>p.createElement(Te,{...e,_chartKey:"inactiveItems"});We.displayName="ChartLegendInactiveItems";const Be=e=>p.createElement(Te,{...e,_chartKey:"item"});Be.displayName="ChartLegendItem";const Xe=e=>p.createElement(Te,{...e,_chartKey:"title"});Xe.displayName="ChartLegendTitle";const Ye=e=>p.createElement(Te,{visible:!0,position:"bottom",...e,_chartKey:"navigator"});Ye.displayName="ChartNavigator";const $e=e=>p.createElement(Te,{...e,_chartKey:"categoryAxis"});$e.displayName="ChartNavigatorCategoryAxis";const Ze=e=>p.createElement(Te,{...e,_chartKey:"pane"});Ze.displayName="ChartNavigatorPane";const Ge=e=>p.createElement(Te,{...e,_chartKey:"title"});Ge.displayName="ChartNavigatorPaneTitle";const Je=e=>p.createElement(Te,{...e});Je.displayName="ChartNavigatorSeriesItem";const Qe=e=>p.createElement(_e,{...e,_chartKey:"series"});Qe.propTypes={children:function(e,t,r){return m(e,t,r,Je)}};const et=e=>p.createElement(Te,{...e});et.displayName="ChartPane";const tt=e=>p.createElement(Te,{...e,_chartKey:"paneDefaults"});tt.displayName="ChartPaneDefaults";const rt=e=>p.createElement(Te,{...e,_chartKey:"title"});rt.displayName="ChartPaneDefaultsTitle";const st=e=>p.createElement(_e,{...e,_chartKey:"panes"});st.propTypes={children:function(e,t,r){return m(e,t,r,et)}};const nt=e=>{let t=e=>p.createElement(p.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 p.createElement(Z.Consumer,null,s=>r(s)?p.createElement(t,{_chartCollectionIdxKey:e._chartCollectionIdxKey,drilldownValue:r(s).drilldownValue}):p.createElement(Te,{...e}))};nt.displayName="ChartSeriesItem";const at=e=>p.createElement(_e,{...e,_chartKey:"series"});at.propTypes={children:function(e,t,r){return m(e,t,r,nt)}},at.displayName="ChartSeries";const it=e=>p.createElement(Te,{...e,_chartKey:"subtitle"});it.displayName="ChartSubtitle";const ot=e=>p.createElement(Te,{...e,_chartKey:"title"});ot.displayName="ChartTitle";const lt=e=>p.createElement(Te,{visible:!0,...e,_chartKey:"tooltip"});lt.displayName="ChartTooltip";const ct=e=>p.createElement(Te,{...e});ct.displayName="ChartValueAxisItem";const ht=e=>p.createElement(_e,{...e,_chartKey:"valueAxis"});ht.propTypes={children:function(e,t,r){return m(e,t,r,ct)}},ht.displayName="ChartValueAxis";const pt=e=>p.createElement(Te,{...e,_chartKey:"title"});pt.displayName="ChartValueAxisTitle";const dt=e=>p.createElement(Te,{...e});dt.displayName="ChartXAxisItem";const ut=e=>p.createElement(_e,{...e,_chartKey:"xAxis"});ut.prototype={children:function(e,t,r){return m(e,t,r,dt)}},ut.displayName="ChartXAxis";const mt=e=>p.createElement(Te,{...e,_chartKey:"title"});mt.displayName="ChartXAxisTitle";const yt=e=>p.createElement(Te,{...e});yt.displayName="ChartYAxisItem";const gt=e=>p.createElement(_e,{...e,_chartKey:"yAxis"});gt.propTypes={children:function(e,t,r){return m(e,t,r,yt)}},gt.displayName="ChartYAxis";const vt=e=>p.createElement(Te,{...e,_chartKey:"title"});vt.displayName="ChartYAxisTitle";const Ct=r.exact({left:r.number,top:r.number}),bt={left:r.number,right:r.number},ft={...bt,top:r.number,bottom:r.number},xt=r.oneOfType([r.number,r.exact(ft)]),Et=xt,St=r.exact({width:r.number,color:r.string,opacity:r.number,dashType:r.string}),It={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:Et,margin:r.exact(bt),border:St,offset:Ct},Nt={color:r.string,opacity:r.number,offset:Ct,padding:r.number,width:r.number,focusHighlight:r.exact({border:St})},_t={colorType:r.oneOf(["static","source","target"]),color:r.string,opacity:r.number,highlight:r.exact({opacity:r.number,inactiveOpacity:r.number}),focusHighlight:r.exact({border:St})},kt=r.exact({text:r.string,...It}),Tt=r.exact({id:r.oneOfType([r.string,r.number]).isRequired,label:kt.isRequired,...Nt}),wt=r.exact({sourceId:r.oneOfType([r.string,r.number]).isRequired,targetId:r.oneOfType([r.string,r.number]).isRequired,value:r.number.isRequired,..._t}),Kt={data:r.exact({nodes:r.arrayOf(Tt.isRequired).isRequired,links:r.arrayOf(wt.isRequired).isRequired}).isRequired,links:r.exact(_t),nodes:r.exact(Nt),labels:r.exact(It),legend:r.exact({align:r.oneOf(["start","center","end"]),background:r.string,border:St,height:r.number,labels:r.object,margin:xt,offsetX:r.number,offsetY:r.number,orientation:r.oneOf(["vertical","horizontal"]),padding:Et,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:St,color:r.string,font:r.string,margin:xt,padding:Et,position:r.oneOf(["top","bottom"]),text:r.string,visible:r.bool}),tooltip:r.exact({visible:r.bool,appendTo:r.any,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)"},Lt=e=>{const{appendTo:t,Content:r,dir:s,offset:n,event:{tooltipData:a,dataItem:i,nodeValue:o}}=e,l=p.useRef(null);p.useEffect(()=>{const e=l.current;if(!a||!e)return;const t=e.offsetWidth,r=e.offsetHeight,s={...a.popupOffset},i=a.popupAlign;s.left+="left"===i.horizontal?n:-1*n,"right"===i.horizontal&&(s.left-=t),"bottom"===i.vertical?s.top-=r+n:s.top+=n,e.style.left=`${s.left}px`,e.style.top=`${s.top}px`,e.style.visibility=""},[a,n]);const c=p.createElement("div",{ref:l,style:{visibility:"hidden"},dir:s,className:"k-tooltip k-sankey-tooltip k-chart-tooltip k-chart-shared-tooltip"},p.createElement("div",{className:"k-tooltip-content"},p.createElement(r,{dir:s,dataItem:i,nodeValue:o})));return t?d.createPortal(c,t):c},Dt={display:"flex",alignItems:"center"},Rt=e=>p.createElement("div",{style:{width:15,height:15,backgroundColor:e.color,display:"inline-flex",marginLeft:3}}),Pt=e=>p.createElement("span",{style:{margin:"0 3px"}},e.children),Ft=e=>s.useInternationalization().format(s.useLocalization().toLanguageString(At,Ot[At]),[e||0]),Mt=e=>{const{color:t,label:r}=e.dataItem;return p.createElement("div",{style:Dt,className:"k-tooltip-content"},p.createElement(Rt,{color:t}),p.createElement(Pt,null,r.text),p.createElement(Pt,null,Ft(e.nodeValue)))},Vt=e=>{const{source:t,target:r,value:s}=e.dataItem,n="rtl"===e.dir?l.arrowLeftIcon:l.arrowRightIcon;return p.createElement("div",{style:Dt},p.createElement(Rt,{color:t.color}),p.createElement(Pt,null,t.label.text),p.createElement(a.IconWrap,{icon:n,name:n.name}),p.createElement(Rt,{color:r.color}),p.createElement(Pt,null,r.label.text),p.createElement(Pt,null,Ft(s)))},jt=12,Ht={offset:jt,visible:!0},Ut=["nodeEnter","nodeLeave","linkEnter","linkLeave","nodeClick","linkClick"],zt=p.forwardRef((e,t)=>{const r=!a.validatePackage(ye,{component:"Sankey"}),s=a.getLicenseMessage(ye),i=p.useRef(null),o=p.useRef(null),l=a.useRtl(i,e.dir,[e.dir,i.current]),c=p.useRef(null),h=a.useDocument(i),{data:d,links:u,nodes:m,labels:y,title:g,legend:v,tooltip:C=Ht,disableAutoLayout:b,disableKeyboardNavigation:f}=e,x=p.useRef(void 0);x.current=e;const[E,S]=p.useState(null),I=p.useCallback(e=>{const{visible:t,appendTo:r=h().body,offset:s=jt,nodeComponent:n=Mt,linkComponent:a=Vt}={...Ht,...C};if(t){const t={appendTo:r,event:e,offset:s,dir:l,Content:"node"===e.targetType?n:a};S(t)}},[C,l,h]),N=p.useCallback(()=>{S(null)},[]),_=p.useCallback((e,t)=>{const r=x.current[e];if(r){const e={...t,nativeEvent:t.originalEvent,target:c.current};r.call(void 0,e)}},[]);return p.useEffect(()=>{const e={data:d,links:u,nodes:m,labels:y,title:g,legend:v,disableAutoLayout:b,disableKeyboardNavigation:f,rtl:"rtl"===l,tooltip:{...Ht,...C}};if(o.current)o.current.setOptions(e);else if(a.canUseDOM&&i.current){const t=n.sankeyTheme(i.current);o.current=new n.Sankey(i.current,e,t),((e,t)=>{e&&(e.unbind(),Ut.forEach(r=>{t[r]&&e.bind(r,t[r])}))})(o.current,{nodeEnter:e=>{_("onNodeEnter",e)},nodeLeave:e=>{_("onNodeLeave",e)},linkEnter:e=>{_("onLinkEnter",e)},linkLeave:e=>{_("onLinkLeave",e)},nodeClick:e=>{_("onNodeClick",e)},linkClick:e=>{_("onLinkClick",e)}}),o.current.bind("tooltipShow",I),o.current.bind("tooltipHide",N)}return()=>{o.current&&(o.current.destroy(),o.current=null)}},[d,u,m,y,g,v,b,f,l,C,N,I,_]),p.useImperativeHandle(c,()=>({get element(){return i.current},exportVisual:e=>o.current.exportVisual(e),props:e}),[]),p.useImperativeHandle(t,()=>c.current),p.createElement(p.Fragment,null,p.createElement("div",{ref:i,className:e.className,style:e.style,dir:l}),E&&p.createElement(Lt,{...E}),r&&p.createElement(a.WatermarkOverlay,{message:s}))});zt.propTypes=Kt,zt.displayName="KendoReactSankey";const qt=n.createSankeyData,Wt=xe;Object.defineProperty(e,"WeekStartDay",{enumerable:!0,get:function(){return n.WeekStartDay}}),e.AxisLabelClickEvent=v,e.Chart=Wt,e.ChartArea=Pe,e.ChartAxisDefaults=e=>p.createElement(Te,{...e,_chartKey:"axisDefaults"}),e.ChartAxisDefaultsCrosshair=Fe,e.ChartAxisDefaultsCrosshairTooltip=Me,e.ChartAxisDefaultsLabels=Ve,e.ChartAxisDefaultsTitle=je,e.ChartBreadcrumb=Ke,e.ChartCategoryAxis=Ue,e.ChartCategoryAxisCrosshair=e=>p.createElement(Te,{visible:!0,...e,_chartKey:"crosshair"}),e.ChartCategoryAxisCrosshairTooltip=e=>p.createElement(Te,{visible:!0,...e,_chartKey:"tooltip"}),e.ChartCategoryAxisItem=He,e.ChartCategoryAxisLabels=e=>p.createElement(Te,{visible:!0,...e,_chartKey:"labels"}),e.ChartCategoryAxisNotes=e=>p.createElement(Te,{...e,_chartKey:"notes"}),e.ChartCategoryAxisNotesIcon=e=>p.createElement(Te,{...e,_chartKey:"icon"}),e.ChartCategoryAxisNotesLabel=e=>p.createElement(Te,{...e,_chartKey:"label"}),e.ChartCategoryAxisRangeLabels=e=>p.createElement(Te,{visible:!0,...e,_chartKey:"rangeLabels"}),e.ChartCategoryAxisTitle=ze,e.ChartLegend=qe,e.ChartLegendInactiveItems=We,e.ChartLegendItem=Be,e.ChartLegendTitle=Xe,e.ChartNavigator=Ye,e.ChartNavigatorCategoryAxis=$e,e.ChartNavigatorHint=e=>p.createElement(Te,{...e,_chartKey:"hint"}),e.ChartNavigatorPane=Ze,e.ChartNavigatorPaneTitle=Ge,e.ChartNavigatorSelect=e=>p.createElement(Te,{...e,_chartKey:"select"}),e.ChartNavigatorSeries=Qe,e.ChartNavigatorSeriesErrorBars=e=>p.createElement(Te,{...e,_chartKey:"errorBars"}),e.ChartNavigatorSeriesExtremes=e=>p.createElement(Te,{...e,_chartKey:"extremes"}),e.ChartNavigatorSeriesHighlight=e=>p.createElement(Te,{...e,_chartKey:"highlight"}),e.ChartNavigatorSeriesItem=Je,e.ChartNavigatorSeriesItemOutliers=e=>p.createElement(Te,{...e,_chartKey:"outliers"}),e.ChartNavigatorSeriesItemTooltip=e=>p.createElement(Te,{...e,_chartKey:"tooltip"}),e.ChartNavigatorSeriesLabels=e=>p.createElement(Te,{visible:!0,...e,_chartKey:"labels"}),e.ChartNavigatorSeriesLabelsFrom=e=>p.createElement(Te,{...e,_chartKey:"from"}),e.ChartNavigatorSeriesLabelsTo=e=>p.createElement(Te,{...e,_chartKey:"to"}),e.ChartNavigatorSeriesMarkers=e=>p.createElement(Te,{...e,_chartKey:"markers"}),e.ChartNavigatorSeriesNotes=e=>p.createElement(Te,{...e,_chartKey:"notes"}),e.ChartNavigatorSeriesNotesIcon=e=>p.createElement(Te,{...e,_chartKey:"icon"}),e.ChartNavigatorSeriesNotesLabel=e=>p.createElement(Te,{...e,_chartKey:"label"}),e.ChartNoDataOverlay=Re,e.ChartPane=et,e.ChartPaneDefaults=tt,e.ChartPaneDefaultsTitle=rt,e.ChartPanes=st,e.ChartPlotArea=e=>p.createElement(Te,{...e,_chartKey:"plotArea"}),e.ChartSeries=at,e.ChartSeriesDefaults=e=>p.createElement(Te,{...e,_chartKey:"seriesDefaults"}),e.ChartSeriesErrorBars=e=>p.createElement(Te,{...e,_chartKey:"errorBars"}),e.ChartSeriesExtremes=e=>p.createElement(Te,{...e,_chartKey:"extremes"}),e.ChartSeriesHighlight=e=>p.createElement(Te,{...e,_chartKey:"highlight"}),e.ChartSeriesItem=nt,e.ChartSeriesItemOutliers=e=>p.createElement(Te,{...e,_chartKey:"outliers"}),e.ChartSeriesItemTooltip=e=>p.createElement(Te,{...e,_chartKey:"tooltip"}),e.ChartSeriesLabels=e=>p.createElement(Te,{visible:!0,...e,_chartKey:"labels"}),e.ChartSeriesLabelsFrom=e=>p.createElement(Te,{...e,_chartKey:"from"}),e.ChartSeriesLabelsTo=e=>p.createElement(Te,{...e,_chartKey:"to"}),e.ChartSeriesMarkers=e=>p.createElement(Te,{...e,_chartKey:"markers"}),e.ChartSeriesNotes=e=>p.createElement(Te,{...e,_chartKey:"notes"}),e.ChartSeriesNotesIcon=e=>p.createElement(Te,{...e,_chartKey:"icon"}),e.ChartSeriesNotesLabel=e=>p.createElement(Te,{...e,_chartKey:"label"}),e.ChartSubtitle=it,e.ChartTitle=ot,e.ChartTooltip=lt,e.ChartValueAxis=ht,e.ChartValueAxisCrosshair=e=>p.createElement(Te,{visible:!0,...e,_chartKey:"crosshair"}),e.ChartValueAxisCrosshairTooltip=e=>p.createElement(Te,{visible:!0,...e,_chartKey:"tooltip"}),e.ChartValueAxisItem=ct,e.ChartValueAxisLabels=e=>p.createElement(Te,{visible:!0,...e,_chartKey:"labels"}),e.ChartValueAxisNotes=e=>p.createElement(Te,{...e,_chartKey:"notes"}),e.ChartValueAxisNotesIcon=e=>p.createElement(Te,{...e,_chartKey:"icon"}),e.ChartValueAxisNotesLabel=e=>p.createElement(Te,{...e,_chartKey:"label"}),e.ChartValueAxisTitle=pt,e.ChartXAxis=ut,e.ChartXAxisCrosshair=e=>p.createElement(Te,{visible:!0,...e,_chartKey:"crosshair"}),e.ChartXAxisCrosshairTooltip=e=>p.createElement(Te,{visible:!0,...e,_chartKey:"tooltip"}),e.ChartXAxisItem=dt,e.ChartXAxisLabels=e=>p.createElement(Te,{visible:!0,...e,_chartKey:"labels"}),e.ChartXAxisNotes=e=>p.createElement(Te,{...e,_chartKey:"notes"}),e.ChartXAxisNotesIcon=e=>p.createElement(Te,{...e,_chartKey:"icon"}),e.ChartXAxisNotesLabel=e=>p.createElement(Te,{...e,_chartKey:"label"}),e.ChartXAxisTitle=mt,e.ChartYAxis=gt,e.ChartYAxisCrosshair=e=>p.createElement(Te,{visible:!0,...e,_chartKey:"crosshair"}),e.ChartYAxisCrosshairTooltip=e=>p.createElement(Te,{visible:!0,...e,_chartKey:"tooltip"}),e.ChartYAxisItem=yt,e.ChartYAxisLabels=e=>p.createElement(Te,{visible:!0,...e,_chartKey:"labels"}),e.ChartYAxisNotes=e=>p.createElement(Te,{...e,_chartKey:"notes"}),e.ChartYAxisNotesIcon=e=>p.createElement(Te,{...e,_chartKey:"icon"}),e.ChartYAxisNotesLabel=e=>p.createElement(Te,{...e,_chartKey:"label"}),e.ChartYAxisTitle=vt,e.ChartZoomable=e=>p.createElement(Te,{...e,_chartKey:"zoomable"}),e.CollectionConfigurationComponent=_e,e.ConfigurationComponent=Te,e.CrosshairTooltip=ce,e.CrosshairTooltipContainer=me,e.DonutCenter=be,e.DragEndEvent=f,e.DragEvent=b,e.DragStartEvent=x,e.DrilldownEvent=E,e.DrilldownStateChangeEvent=we,e.LegendItemClickEvent=I,e.LegendItemHoverEvent=S,e.NavigatorFilterEvent=N,e.NoteClickEvent=_,e.NoteHoverEvent=k,e.PlotAreaClickEvent=T,e.PlotAreaHoverEvent=w,e.RenderEvent=K,e.Sankey=zt,e.SelectEndEvent=O,e.SelectEvent=A,e.SelectStartEvent=L,e.SeriesClickEvent=D,e.SeriesHoverEvent=R,e.SeriesTooltip=ne,e.SharedTooltipContent=$,e.Sparkline=Ee,e.StockChart=Ie,e.TooltipPoint=Y,e.TooltipPopup=ee,e.ZoomEndEvent=F,e.ZoomEvent=P,e.ZoomStartEvent=M,e.createSankeyData=qt,e.exportVisual=(e,t={})=>{if(e&&null!==e.chartInstance)return e.chartInstance.exportVisual(t)},e.findAxisByName=(e,t)=>{if(e&&null!==e.chartInstance)return e.chartInstance.findAxisByName(t)},e.findPaneByIndex=(e,t)=>{if(e&&null!==e.chartInstance)return e.chartInstance.findPaneByIndex(t)},e.findPaneByName=(e,t)=>{if(e&&null!==e.chartInstance)return e.chartInstance.findPaneByName(t)},e.toDomEvent=H});
15
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("prop-types"),require("@progress/kendo-react-intl"),require("@progress/kendo-charts"),require("@progress/kendo-react-common"),require("@progress/kendo-react-popup"),require("@progress/kendo-react-layout"),require("@progress/kendo-svg-icons"),require("react-dom")):"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","react-dom"],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,e.ReactDOM)}(this,function(e,t,r,s,n,a,i,o,l,c){"use strict";function h(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 p=h(t),d=h(c);function u(e,t){let r=e;for(;r&&r!==t;)r=r.parentNode;return!!r}function m(e,t,r,s){const n=e[t];if(n&&Array.isArray(n))for(const e of n)if(!e.type||e.type!==s)return new Error(`${r} children should be Array of type ${s.displayName}.`);return null}const y=e=>void 0!==e&&!e;let v=class{constructor(e){this.target=e}},g=class extends v{constructor(e,t){super(t),this.axis=e.axis,this.dataItem=e.dataItem,this.index=e.index,this.text=e.text,this.value=e.value}},C=class extends v{constructor(){super(...arguments),this.prevented=!1}preventDefault(){this.prevented=!0}isDefaultPrevented(){return this.prevented}},b=class extends C{constructor(e,t){super(t),this.axisRanges=e.axisRanges,this.nativeEvent=e.originalEvent}},f=class extends v{constructor(e,t){super(t),this.axisRanges=e.axisRanges,this.nativeEvent=e.originalEvent}},x=class extends C{constructor(e,t){super(t),this.axisRanges=e.axisRanges,this.nativeEvent=e.originalEvent}},E=class extends v{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}},S=class extends C{constructor(e,t){super(t),this.series=e.series,this.seriesIndex=e.seriesIndex,this.pointIndex=e.pointIndex,this.text=e.text}preventDefault(){super.preventDefault()}},I=class extends C{constructor(e,t){super(t),this.series=e.series,this.seriesIndex=e.seriesIndex,this.pointIndex=e.pointIndex,this.text=e.text}preventDefault(){super.preventDefault()}},N=class extends v{constructor(e,t){super(t),this.from=e.from,this.to=e.to}},_=class extends v{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}},k=class extends v{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}},K=class extends v{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}},T=class extends v{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}},w=class extends v{constructor(e,t){super(t)}},A=class extends C{constructor(e,t){super(t),this.axis=e.axis,this.from=e.from,this.to=e.to}},O=class extends v{constructor(e,t){super(t),this.axis=e.axis,this.from=e.from,this.to=e.to}},L=class extends C{constructor(e,t){super(t),this.axis=e.axis,this.from=e.from,this.to=e.to}},D=class extends v{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}},R=class extends C{constructor(e,t){super(t),this.category=e.category,this.categoryPoints=e.categoryPoints,this.dataItem=e.dataItem,this.nativeEvent=e.originalEvent,this.percentage=e.percentage,this.point=e.point,this.series=e.series,this.stackValue=e.stackValue,this.value=e.value}},P=class extends C{constructor(e,t){super(t),this.axisRanges=e.axisRanges,this.delta=e.delta,this.nativeEvent=e.originalEvent}},F=class extends v{constructor(e,t){super(t),this.axisRanges=e.axisRanges,this.nativeEvent=e.originalEvent}},V=class extends C{constructor(e,t){super(t),this.axisRanges=e.axisRanges,this.nativeEvent=e.originalEvent}};const M={axisLabelClick:g,drag:b,dragEnd:f,dragStart:x,drilldownEvent:E,legendItemHover:S,legendItemClick:I,legendItemLeave:class extends C{constructor(e,t){super(t),this.series=e.series,this.seriesIndex=e.seriesIndex,this.pointIndex=e.pointIndex,this.text=e.text}preventDefault(){super.preventDefault()}},navigatorFilter:N,noteClick:_,noteHover:k,plotAreaClick:K,plotAreaHover:T,render:w,select:A,selectEnd:O,selectStart:L,seriesClick:D,seriesHover:R,zoom:P,zoomEnd:F,zoomStart:V};let j=class{constructor(e,t){this.sender=e,this.syntheticEvent=t}};function U(e,t){return new j(e,t)}const H=1e3/60,z=e=>Array.isArray(e)?e.map(e=>{if(null===e||"object"!=typeof e)return e;const t={...e};return null!==e.pointVisibility&&"object"==typeof e.pointVisibility&&(t.pointVisibility={...e.pointVisibility}),t}):e,q=e=>{let t,r,s,n=[];const i=new Map,o=new Set,l=new Set;let c=!1;const h=()=>{a.canUseDOM&&(window.clearTimeout(s),s=window.setTimeout(()=>n.forEach(e=>e()),H))},p=s=>{const{chartKey:n,chartCollectionIdxKey:a}=s,i=a?a.split("_")[0]:n;if(void 0!==a&&o.add(i),t){const n={...r};void 0!==i&&void 0===n[i]&&void 0!==t[i]&&(n[i]=t[i]),r=e(n,s)}else r=e(r,s);h()},d=()=>{c=!1;let e=!1;l.forEach(t=>{!i.has(t)&&r&&Object.prototype.hasOwnProperty.call(r,t)&&(delete r[t],e=!0)}),l.clear(),e&&h()};return p({}),{getState:()=>t?{...t,...r}:r,setBaseState:(e,s=!1)=>{t=(e=>{if(null===e||"object"!=typeof e)return e;const t={...e};return t.series=z(e.series),e.navigator&&"object"==typeof e.navigator&&(t.navigator={...e.navigator},t.navigator.series=z(e.navigator.series)),t})(e),s&&(r=Object.keys(r||{}).reduce((e,s)=>(i.has(s)?e[s]=r[s]:t&&void 0!==t[s]||o.has(s)&&(e[s]=[]),e),{})),h()},dispatch:p,subscribe:e=>(n.push(e),()=>n=n.filter(t=>t!==e)),claimKey:e=>{i.set(e,(i.get(e)||0)+1)},releaseKey:e=>{const t=(i.get(e)||0)-1;t>0?i.set(e,t):(i.delete(e),l.add(e),c||(c=!0,Promise.resolve().then(d)))}}},B=(e,t)=>t.chartCollectionIdxKey?Y.collectionConfigurationItem(e,t):t.chartKey?Y.configurationItem(e,t):{},W=(e,t)=>{if(!t.type)return{};switch(t.type){case"set":return Y.themeItem(e,t);case"push":return Object.assign(e,t.payload);default:return e}},X=(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}},Y={configurationItem:(e,t)=>Object.assign(e,{[t.chartKey]:t.payload}),collectionConfigurationItem(e,t){let r=!1;const[s,n]=t.chartCollectionIdxKey.split("_"),a=e[s].map((e,s)=>parseInt(n,10)===s?(r=!0,t.payload):e);return!1===r&&a.splice(parseInt(n,10),0,t.payload),Object.assign(e,{[s]:a})},themeItem(e,t){let r={};const s=Object.assign(r,e),{field:n,value:a}=t.payload,i=n.split(".");let o=i.shift();for(;i.length>0;)r=r[o]=r[o]||{},o=i.shift();return r[o]=a,s}};let $=class{constructor(e,t){this.value=e.value,this.category=e.category,this.categoryIndex=e.categoryIx,this.series=e.series,this.dataItem=e.dataItem,this.percentage=e.percentage,this.runningTotal=e.runningTotal,this.total=e.total,this.low=e.low,this.high=e.high,this.xLow=e.xLow,this.xHigh=e.xHigh,this.yLow=e.yLow,this.yHigh=e.yHigh,this.point=e,this.format=((e.options||{}).tooltip||{}).format||t}get formattedValue(){return this.format?this.point.formatValue(this.format):String(this.value)}};const Z=e=>{const{categoryText:t,colorMarker:r,colspan:s,nameColumn:n,points:a}=e;return p.createElement("table",null,p.createElement("thead",null,p.createElement("tr",null,p.createElement("th",{colSpan:s},t))),p.createElement("tbody",null,a.map((e,t)=>p.createElement("tr",{key:t},r&&p.createElement("td",null,p.createElement("span",{className:"k-chart-shared-tooltip-marker",style:{backgroundColor:e.series.color}})),n&&p.createElement("td",null,e.series.name),p.createElement("td",null,e.formattedValue)))))},G=p.createContext(null);G.displayName="ChartContext";const J={horizontal:"fit",vertical:"fit"},Q="k-chart-tooltip",ee=class extends p.Component{constructor(e){super(e),this.context=null,this.element=null,this.onChartMouseLeave=e=>{const{syntheticEvent:t}=e;return!!u(t.relatedTarget,this.element)},this.onMouseLeave=e=>{const t=U(this,e);this.context.childrenObserver.trigger("onMouseLeave",t)&&e.preventDefault()},this.popupRef=e=>{this.element=e;const t=e&&e.closest(".k-animation-container");t&&(t.style.transition="initial")},this.chartObserver=new n.InstanceObserver(this,{onMouseLeave:"onChartMouseLeave"})}componentDidMount(){var e;null==(e=this.context)||e.observersStore.dispatch({type:"add",payload:this.chartObserver})}render(){const{popupShown:e,popupAlign:t,popupOffset:r,popupStyles:s,popupContent:n,className:a}=this.props,o=[Q,a].join(" ").trim();return p.createElement(i.Popup,{animate:!1,popupAlign:t,offset:r,show:e,collision:J,className:"k-chart-tooltip-wrapper"},p.createElement("div",{className:o,style:s,onMouseLeave:this.onMouseLeave,ref:this.popupRef},n()))}componentWillUnmount(){this.context.observersStore.dispatch({type:"remove",payload:this.chartObserver})}};ee.contextType=G;let te=ee;const re="k-chart-shared-tooltip",se="k-chart-tooltip-inverse",ne=class extends p.Component{constructor(){super(...arguments),this.context=null,this.state={popupShown:!1},this.chartObserver=null}componentDidMount(){this.chartObserver=new n.InstanceObserver(this,{showTooltip:"onShowTooltip",hideTooltip:"onHideTooltip"}),this.context.observersStore.dispatch({type:"add",payload:this.chartObserver})}render(){const{popupContext:e,shared:t,className:r,...s}=this.state,n=this.state.popupShown?()=>{const r=this.findRenderFunction();if(t)return null!==r?r(e):p.createElement(Z,{...e});const s=e.point,n=this.findRenderFunctionByIndex(s.series.index);return null!==n?n(e):null!==r?r(e):p.createElement("span",null,e.point.formattedValue)}:Function.prototype,i=a.classNames({[re]:t,[se]:!!r});return p.createElement(te,{...s,popupContent:n,className:i})}componentWillUnmount(){this.context.observersStore.dispatch({type:"remove",payload:this.chartObserver})}onShowTooltip(e){const{anchor:t,style:r,shared:s,className:n,crosshair:a}=e;let i;a||(i=s?this.createSharedTooltipContext(e):this.createTooltipContext(e),this.setState({popupShown:!0,popupAlign:t.align,popupOffset:t.point,popupContext:i,popupStyles:r,className:n,shared:s}))}onHideTooltip(){this.setState({popupShown:!1,popupStyles:{},className:void 0})}createSharedTooltipContext(e){const{points:t,categoryText:r}=e,s=t.filter(e=>void 0!==e.series.name).length>0,n=e.series.length>1;let a=1;return s&&a++,n&&a++,{categoryText:r,colorMarker:n,colspan:a,nameColumn:s,points:e.points.map(t=>new $(t,e.format))}}createTooltipContext(e){const{point:t,format:r}=e;return{point:new $(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}};ne.contextType=G;let ae=ne;const ie=e=>e.children;ie.displayName="Container";const oe="k-chart-crosshair-tooltip",le="k-chart-tooltip-inverse",ce=class extends p.Component{constructor(e){super(e),this.context=null,this.state={popupShown:!1},this.chartObserver=new n.InstanceObserver(this,{showTooltip:"onShowTooltip",hideTooltip:"onHideTooltip"})}componentDidMount(){var e;null==(e=this.context)||e.observersStore.dispatch({type:"add",payload:this.chartObserver})}render(){const{popupContend:e,className:t,...r}=this.state,s=this.state.popupShown?()=>e:Function.prototype,n=a.classNames({[oe]:!0,[le]:!!t});return p.createElement(te,{...r,popupContent:s,className:n})}componentWillUnmount(){var e;null==(e=this.context)||e.observersStore.dispatch({type:"remove",payload:this.chartObserver})}onShowTooltip(e){const{anchor:t,style:r,className:s,crosshair:n,axisName:a,axisIndex:i,value:o}=e,{name:l,index:c}=this.props;n&&a===l&&i===c&&this.setState({popupShown:!0,popupAlign:t.align,popupOffset:t.point,popupContend:o,popupStyles:r,className:s})}onHideTooltip(){this.setState({popupShown:!1,popupStyles:{},className:void 0})}};ce.contextType=G;let he=ce;const pe=["categoryAxis","valueAxis","xAxis","yAxis"];function de(e){const t={};for(let r=0;r<pe.length;r++){const s=ue(e,pe[r]);for(let e=0;e<s.length;e++){const r=s[e];t[r.name+r.index]=r}}return t}function ue(e,t){const r=[];if(e[t]){const s=[].concat(e[t]);for(let e=0;e<s.length;e++){const n=(s[e].crosshair||{}).tooltip;n&&n.visible&&r.push({index:e,name:t})}}return r}const me=class extends p.Component{constructor(){super(...arguments),this.context=null,this.state={tooltips:{}},this.storeUnsubscriber=Function.prototype,this.subscriber=()=>{var e;this.setState({tooltips:de(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=>p.createElement(he,{...e[t],key:t}));return p.createElement(ie,null,t)}componentWillUnmount(){this.storeUnsubscriber()}};me.contextType=G;let ye=me;const ve=Object.freeze({name:"@progress/kendo-react-charts",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:0,version:"16.4.0-develop.6",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"}),ge=class extends p.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 n={seriesName:s.name,drilldownValue:e.value},a=[...(null==(t=this.props.drilldownState)?void 0:t.steps)||[],n],i=this.props.getTarget(),o={...e,currentState:this.props.drilldownState,nextState:{steps:a}},l=new E(o,i);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:n}=e,a=t[s];if(void 0===n)r=Object.assign({},a,{visible:y(a.visible)});else{const e=a.pointVisibility=a.pointVisibility||{};e[n]=y(e[n]),r=Object.assign({},a)}this.optionsStore.dispatch({chartCollectionIdxKey:`series_${s}`,payload:r}),this.suppressTransitions=!0}},this.onWindowResize=()=>{null!==this.chartInstance&&this.chartInstance.resize()},this.onChartMouseLeave=e=>{const t=U(this,e);this.triggerDomEvent("onMouseLeave",t)?e.preventDefault():null!==this.chartInstance&&this.chartInstance.hideElements()},this.onChildMouseLeave=e=>{const{syntheticEvent:t}=e;return this.chartInstance&&!u(t.relatedTarget,this.element)&&this.chartInstance.hideElements(),!1},this.showLicenseWatermark=!a.validatePackage(ve,{component:"Chart"}),this.licenseMessage=a.getLicenseMessage(ve),this.optionsStore=q(B),this.observersStore=q(X),this.childrenObserver=new n.InstanceObserver(this,{onMouseLeave:"onChildMouseLeave"}),this.state={optionsStore:this.optionsStore,observersStore:this.observersStore,childrenObserver:this.childrenObserver,drilldownState:{steps:[]}},this.themeStore=q(W),this.chartObserver=new n.InstanceObserver(this,{render:"onRender",legendItemClick:"onLegendItemClick",drilldown:"onDrilldown",styleChanged:"onStyleChanged"})}get element(){return this._element}static getDerivedStateFromProps(e,t){return{...t,drilldownState:e.drilldownState||[]}}componentDidMount(){this.props.options&&this.optionsStore.setBaseState(this.props.options),this._element&&(this.readTheme(),this.instantiateCoreChart()),this.optionsUnsubscriber=this.optionsStore.subscribe(()=>{this.refresh()}),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}=this.props;if(this.props.options!==e.options&&this.optionsStore.setBaseState(this.props.options,!0),null!==this.chartInstance){const r=s.provideIntlService(this),n=this.chartInstance.chartService,a=r.locale!==n._intlService.locale,i=[...new Set([...Object.keys(e),...Object.keys(this.props)])].filter(e=>"dir"!==e&&"children"!==e&&"options"!==e).some(t=>this.props[t]!==e[t]);a&&(this.chartInstance.chartService._intlService=r,this.chartInstance.chartService.format._intlService=r,i||this.chartInstance.noTransitionsRedraw()),i&&this.refresh(),e.dir!==t&&this.chartInstance.setDirection(this.getDirection(t))}}render(){const{style:e={},className:t,wrapper:r,children:s}=this.props,n=Object.assign({},e,{position:"relative"}),i=p.createElement(r,{className:t,style:n,key:"chartElement"},p.createElement("div",{onMouseLeave:this.onChartMouseLeave,ref:e=>{this._element=e},className:"k-chart-surface"},s),p.createElement(p.Fragment,null,this.showLicenseWatermark&&p.createElement(a.WatermarkOverlay,{message:this.licenseMessage})));return p.createElement(G.Provider,{value:this.state},p.createElement(ae,{key:"seriesTooltip"}),p.createElement(ye,{key:"crosshairTooltips"}),i)}getDirection(e){return"rtl"===(void 0!==e?e:a.canUseDOM&&window.getComputedStyle(this.element).direction||"ltr")}getChartOptions(){const{renderAs:e,pannable:t,zoomable:r,paneDefaults:s,panes:a,transitions:i,seriesColors:o,seriesDefaults:l,axisDefaults:c,observeStyles:h,deriveOptionsFromParent:p,options:d}=this.props;let u={renderAs:"svg",observeStyles:!0};return d&&n.deepExtend(u,d),u=Object.assign(u,this.optionsStore.getState()),void 0!==e&&(u.renderAs=e),void 0!==t&&(u.pannable=t),void 0!==r&&(u.zoomable=r),void 0!==s&&(u.paneDefaults=s),void 0!==a&&(u.panes=a),void 0!==i&&(u.transitions=i),void 0!==o&&(u.seriesColors=o),void 0!==l&&(u.seriesDefaults=l),void 0!==c&&(u.axisDefaults=c),void 0!==h&&(u.observeStyles=h),p&&(u=p(u)),u}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(M[e])return new M[e](t,r)}(e,t,this.props.getTarget()),s="on"+e.charAt(0).toUpperCase()+e.slice(1),n=this.observersStore.getState();let a=!1;for(let r=0;r<n.length;r++)n[r].trigger(e,t)&&(a=!0);return!1===a&&r&&this.props.hasOwnProperty(s)?(this.props[s].call(void 0,r),r.isDefaultPrevented&&r.isDefaultPrevented()):a}requiresHandlers(e){for(let t=0;t<e.length;t++){const r=e[t],s="on"+r.charAt(0).toUpperCase()+r.slice(1);if(this.props.hasOwnProperty(s))return!0}return!1}triggerDomEvent(e,t){const r=this.observersStore.getState();let s=!1;for(let n=0;n<r.length;n++)r[n].trigger(e,t)&&(s=!0);return s}onStyleChanged(){this.suppressTransitions=!0,this.readTheme()}readTheme(){if(this._element){const e=n.chartTheme(this._element),t=n.deepExtend({},n.chartBaseTheme(),e);this.themeStore.dispatch({type:"push",payload:t})}}};ge.propTypes={dir:r.string,renderAs:r.oneOf(["svg","canvas"])},ge.defaultProps={};let Ce=ge;s.registerForIntl(Ce);const be=class extends p.Component{constructor(e){super(e),this.state={donutCenterStyles:null},this.chartObserver=new n.InstanceObserver(this,{render:"onRender"})}componentDidMount(){var e;null==(e=this.context)||e.observersStore.dispatch({type:"add",payload:this.chartObserver})}render(){const{render:e}=this.props,{donutCenterStyles:t}=this.state;let r=null;return e&&t&&(r=p.createElement("div",{className:"k-chart-donut-center",style:t},p.createElement(e,null))),r}onRender(e){var t;const r=null==(t=this.context)?void 0:t.optionsStore.getState().series,s=Array.isArray(r)?r[0]:null,n=e.sender._plotArea.charts;if(!s||"donut"!==s.type||0===n[0].points.length)return;const a=n[0].points[0].sector,i=a.innerRadius,o=a.center.y-i,l=a.center.x-i,c=2*i;this.setState({donutCenterStyles:{height:c,left:l,top:o,width:c}})}};be.contextType=G;let fe=be,xe=class extends p.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 p.createElement(Ce,{...s,ref:e=>{this._baseChart=e},chartConstructor:n.Chart,getTarget:this.getTarget,wrapper:"div",className:a.classNames("k-chart k-widget",r)},t,p.createElement(fe,{render:e}))}};const Ee=p.forwardRef((e,t)=>{const[r,s]=a.useMergedRef(t);return a.useWebMcpRegister("chart",r,e,e.webMcp),p.createElement(xe,{...e,ref:s})});Ee.displayName="KendoReactChart";let Se=class extends p.Component{constructor(){super(...arguments),this._baseChart=null,this.deriveOptionsFromParent=e=>{const{type:t,data:r}=this.props,s=Object.assign({},e);return void 0!==t&&(s.type=t),void 0!==r&&(s.data=r),n.Sparkline.normalizeOptions(s)},this.getTarget=()=>this}get chartInstance(){return null!==this._baseChart?this._baseChart.chartInstance:null}get surface(){return null!==this._baseChart?this._baseChart.surface:null}get element(){return null!==this._baseChart?this._baseChart.element:null}render(){const{children:e,type:t,className:r,...s}=this.props;return p.createElement(Ce,{...s,ref:e=>{this._baseChart=e},chartConstructor:n.Sparkline,getTarget:this.getTarget,wrapper:"span",deriveOptionsFromParent:this.deriveOptionsFromParent,className:a.classNames("k-sparkline k-widget",r)},e)}};const Ie={autoBindElements:!0,liveDrag:!1,partialRedraw:!0};let Ne=class extends p.Component{constructor(){super(...arguments),this._baseChart=null,this.deriveOptionsFromParent=e=>{const t=Object.assign({},e.navigator||{},Ie);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 p.createElement(Ce,{...r,ref:e=>{this._baseChart=e},chartConstructor:n.StockChart,getTarget:this.getTarget,wrapper:"div",deriveOptionsFromParent:this.deriveOptionsFromParent,onRefresh:this.onRefresh,className:a.classNames("k-chart k-stockchart",t)},e)}};const _e=class extends p.Component{get optionsStore(){var e,t;return(null==(e=this.props)?void 0:e._parentStore)||(null==(t=this.context)?void 0:t.optionsStore)}renderChildren(e,t){const{children:r}=e.props,{_chartKey:s,_parentStore:n}=this.props,a={...e.props,_chartCollectionIdxKey:`${s}_${t}`,_parentStore:n};return p.cloneElement(e,a,r)}componentDidMount(){var e,t;null==(t=null==(e=this.optionsStore)?void 0:e.claimKey)||t.call(e,this.props._chartKey)}componentWillUnmount(){var e,t;null==(t=null==(e=this.optionsStore)?void 0:e.releaseKey)||t.call(e,this.props._chartKey)}render(){var e;const{_chartKey:t,children:r}=this.props;return null==(e=this.optionsStore)||e.dispatch({chartKey:t,payload:[]}),p.Children.map(r,(e,t)=>p.isValidElement(e)?this.renderChildren(e,t):e)}};_e.contextType=G;let ke=_e;const Ke=class extends p.Component{constructor(e){super(e),this.childStoreUnsubscribe=Function.prototype,this.childStore=q(B)}get optionsStore(){var e,t;return(null==(e=this.props)?void 0:e._parentStore)||(null==(t=this.context)?void 0:t.optionsStore)}render(){const{children:e}=this.props;return void 0!==e?p.Children.map(e,e=>p.isValidElement(e)?this.renderChildren(e):e):null}componentDidMount(){var e,t;const{_chartKey:r,_chartCollectionIdxKey:s}=this.props;void 0!==r&&void 0===s&&(null==(t=null==(e=this.optionsStore)?void 0:e.claimKey)||t.call(e,r)),this.childStoreUnsubscribe=this.childStore.subscribe(()=>this.dispatch()),this.dispatch()}componentDidUpdate(){this.dispatch()}componentWillUnmount(){var e,t;this.childStoreUnsubscribe();const{_chartKey:r,_chartCollectionIdxKey:s}=this.props;void 0!==r&&void 0===s&&(null==(t=null==(e=this.optionsStore)?void 0:e.releaseKey)||t.call(e,r))}dispatch(){const{_chartKey:e,_chartCollectionIdxKey:t,_parentStore:r,children:s,...n}=this.props;this.optionsStore.dispatch({chartKey:e,chartCollectionIdxKey:t,payload:Object.assign({},n,this.childStore.getState())})}renderChildren(e){const{children:t}=e.props,r={...e.props,_parentStore:this.childStore};return p.cloneElement(e,r,t)}};Ke.contextType=G;let Te=Ke,we=class{constructor(e){this.currentState=e.currentState,this.nextState=e.nextState}};const Ae=p.forwardRef((e,t)=>{const r=p.useRef(null),s=p.useRef(null),n={valueField:Le.valueField,textField:Le.textField,iconField:Le.iconField,iconClassField:Le.iconClassField,...e};p.useImperativeHandle(r,()=>({element:s.current,props:n})),p.useImperativeHandle(t,()=>r.current);let i=[{id:"0",...e.rootItem||{text:"Home",icon:p.createElement(a.SvgIcon,{icon:l.homeIcon,style:{marginInlineEnd:"4px"}})}}];e.drilldownState&&(i=[...i,...e.drilldownState.steps.map((e,t)=>({id:(t+1).toString(),text:e.drilldownValue}))]);const c={...n,data:i};return p.createElement("div",null,p.createElement(o.Breadcrumb,{...c,onItemSelect:t=>{var r;const s="onDrilldownStateChange";if(e.hasOwnProperty(s)){const n=i.findIndex(e=>e.id===t.id),a={steps:((null==(r=e.drilldownState)?void 0:r.steps)||[]).slice(0,n)},o=new we({currentState:e.drilldownState,nextState:a});e[s].call(void 0,o)}}}))}),Oe={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},Le={valueField:"id",textField:"text",iconField:"icon",iconClassField:"iconClass"};Ae.displayName="KendoReactChartBreadcrumb",Ae.propTypes=Oe;const De="charts.nodata",Re={[De]:"No data available."},Pe=e=>{const t=s.useLocalization();return p.createElement("div",{className:a.classNames("k-chart-overlay",e.className),style:{display:"none",...e.style}},p.createElement("div",{className:"k-no-data"},void 0===e.children?t.toLanguageString(De,Re[De]):e.children))};Pe.displayName="ChartNoDataOverlay";const Fe=e=>p.createElement(Te,{...e,_chartKey:"chartArea"});Fe.displayName="ChartArea";const Ve=e=>p.createElement(Te,{visible:!0,...e,_chartKey:"crosshair"});Ve.displayName="ChartAxisDefaultsCrosshair";const Me=e=>p.createElement(Te,{visible:!0,...e,_chartKey:"tooltip"});Me.displayName="ChartAxisDefaultsCrosshairTooltip";const je=e=>p.createElement(Te,{...e,_chartKey:"labels"});je.displayName="ChartAxisDefaultsLabels";const Ue=e=>p.createElement(Te,{...e,_chartKey:"title"});Ue.displayName="ChartAxisDefaultsTitle";const He=e=>p.createElement(Te,{...e});He.displayName="ChartCategoryAxisItem";const ze=e=>p.createElement(ke,{...e,_chartKey:"categoryAxis"});ze.propTypes={children:function(e,t,r){return m(e,t,r,He)}},ze.displayName="ChartCategoryAxis";const qe=e=>p.createElement(Te,{...e,_chartKey:"title"});qe.displayName="ChartCategoryAxisTitle";const Be=e=>p.createElement(Te,{visible:!0,...e,_chartKey:"legend"});Be.displayName="ChartLegend";const We=e=>p.createElement(Te,{...e,_chartKey:"inactiveItems"});We.displayName="ChartLegendInactiveItems";const Xe=e=>p.createElement(Te,{...e,_chartKey:"item"});Xe.displayName="ChartLegendItem";const Ye=e=>p.createElement(Te,{...e,_chartKey:"title"});Ye.displayName="ChartLegendTitle";const $e=e=>p.createElement(Te,{visible:!0,position:"bottom",...e,_chartKey:"navigator"});$e.displayName="ChartNavigator";const Ze=e=>p.createElement(Te,{...e,_chartKey:"categoryAxis"});Ze.displayName="ChartNavigatorCategoryAxis";const Ge=e=>p.createElement(Te,{...e,_chartKey:"pane"});Ge.displayName="ChartNavigatorPane";const Je=e=>p.createElement(Te,{...e,_chartKey:"title"});Je.displayName="ChartNavigatorPaneTitle";const Qe=e=>p.createElement(Te,{...e});Qe.displayName="ChartNavigatorSeriesItem";const et=e=>p.createElement(ke,{...e,_chartKey:"series"});et.propTypes={children:function(e,t,r){return m(e,t,r,Qe)}};const tt=e=>p.createElement(Te,{...e});tt.displayName="ChartPane";const rt=e=>p.createElement(Te,{...e,_chartKey:"paneDefaults"});rt.displayName="ChartPaneDefaults";const st=e=>p.createElement(Te,{...e,_chartKey:"title"});st.displayName="ChartPaneDefaultsTitle";const nt=e=>p.createElement(ke,{...e,_chartKey:"panes"});nt.propTypes={children:function(e,t,r){return m(e,t,r,tt)}};const at=e=>{let t=e=>p.createElement(p.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 p.createElement(G.Consumer,null,s=>r(s)?p.createElement(t,{_chartCollectionIdxKey:e._chartCollectionIdxKey,drilldownValue:r(s).drilldownValue}):p.createElement(Te,{...e}))};at.displayName="ChartSeriesItem";const it=e=>p.createElement(ke,{...e,_chartKey:"series"});it.propTypes={children:function(e,t,r){return m(e,t,r,at)}},it.displayName="ChartSeries";const ot=e=>p.createElement(Te,{...e,_chartKey:"subtitle"});ot.displayName="ChartSubtitle";const lt=e=>p.createElement(Te,{...e,_chartKey:"title"});lt.displayName="ChartTitle";const ct=e=>p.createElement(Te,{visible:!0,...e,_chartKey:"tooltip"});ct.displayName="ChartTooltip";const ht=e=>p.createElement(Te,{...e});ht.displayName="ChartValueAxisItem";const pt=e=>p.createElement(ke,{...e,_chartKey:"valueAxis"});pt.propTypes={children:function(e,t,r){return m(e,t,r,ht)}},pt.displayName="ChartValueAxis";const dt=e=>p.createElement(Te,{...e,_chartKey:"title"});dt.displayName="ChartValueAxisTitle";const ut=e=>p.createElement(Te,{...e});ut.displayName="ChartXAxisItem";const mt=e=>p.createElement(ke,{...e,_chartKey:"xAxis"});mt.prototype={children:function(e,t,r){return m(e,t,r,ut)}},mt.displayName="ChartXAxis";const yt=e=>p.createElement(Te,{...e,_chartKey:"title"});yt.displayName="ChartXAxisTitle";const vt=e=>p.createElement(Te,{...e});vt.displayName="ChartYAxisItem";const gt=e=>p.createElement(ke,{...e,_chartKey:"yAxis"});gt.propTypes={children:function(e,t,r){return m(e,t,r,vt)}},gt.displayName="ChartYAxis";const Ct=e=>p.createElement(Te,{...e,_chartKey:"title"});Ct.displayName="ChartYAxisTitle";const bt=r.exact({left:r.number,top:r.number}),ft={left:r.number,right:r.number},xt={...ft,top:r.number,bottom:r.number},Et=r.oneOfType([r.number,r.exact(xt)]),St=Et,It=r.exact({width:r.number,color:r.string,opacity:r.number,dashType:r.string}),Nt={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:It,offset:bt},_t={color:r.string,opacity:r.number,offset:bt,padding:r.number,width:r.number,focusHighlight:r.exact({border:It})},kt={colorType:r.oneOf(["static","source","target"]),color:r.string,opacity:r.number,highlight:r.exact({opacity:r.number,inactiveOpacity:r.number}),focusHighlight:r.exact({border:It})},Kt=r.exact({text:r.string,...Nt}),Tt=r.exact({id:r.oneOfType([r.string,r.number]).isRequired,label:Kt.isRequired,..._t}),wt=r.exact({sourceId:r.oneOfType([r.string,r.number]).isRequired,targetId:r.oneOfType([r.string,r.number]).isRequired,value:r.number.isRequired,...kt}),At={data:r.exact({nodes:r.arrayOf(Tt.isRequired).isRequired,links:r.arrayOf(wt.isRequired).isRequired}).isRequired,links:r.exact(kt),nodes:r.exact(_t),labels:r.exact(Nt),legend:r.exact({align:r.oneOf(["start","center","end"]),background:r.string,border:It,height:r.number,labels:r.object,margin:Et,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:It,color:r.string,font:r.string,margin:Et,padding:St,position:r.oneOf(["top","bottom"]),text:r.string,visible:r.bool}),tooltip:r.exact({visible:r.bool,appendTo:r.any,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},Ot="sankey.tooltipUnitFormat",Lt={[Ot]:"({0} units)"},Dt=e=>{const{appendTo:t,Content:r,dir:s,offset:n,event:{tooltipData:a,dataItem:i,nodeValue:o}}=e,l=p.useRef(null);p.useEffect(()=>{const e=l.current;if(!a||!e)return;const t=e.offsetWidth,r=e.offsetHeight,s={...a.popupOffset},i=a.popupAlign;s.left+="left"===i.horizontal?n:-1*n,"right"===i.horizontal&&(s.left-=t),"bottom"===i.vertical?s.top-=r+n:s.top+=n,e.style.left=`${s.left}px`,e.style.top=`${s.top}px`,e.style.visibility=""},[a,n]);const c=p.createElement("div",{ref:l,style:{visibility:"hidden"},dir:s,className:"k-tooltip k-sankey-tooltip k-chart-tooltip k-chart-shared-tooltip"},p.createElement("div",{className:"k-tooltip-content"},p.createElement(r,{dir:s,dataItem:i,nodeValue:o})));return t?d.createPortal(c,t):c},Rt={display:"flex",alignItems:"center"},Pt=e=>p.createElement("div",{style:{width:15,height:15,backgroundColor:e.color,display:"inline-flex",marginLeft:3}}),Ft=e=>p.createElement("span",{style:{margin:"0 3px"}},e.children),Vt=e=>s.useInternationalization().format(s.useLocalization().toLanguageString(Ot,Lt[Ot]),[e||0]),Mt=e=>{const{color:t,label:r}=e.dataItem;return p.createElement("div",{style:Rt,className:"k-tooltip-content"},p.createElement(Pt,{color:t}),p.createElement(Ft,null,r.text),p.createElement(Ft,null,Vt(e.nodeValue)))},jt=e=>{const{source:t,target:r,value:s}=e.dataItem,n="rtl"===e.dir?l.arrowLeftIcon:l.arrowRightIcon;return p.createElement("div",{style:Rt},p.createElement(Pt,{color:t.color}),p.createElement(Ft,null,t.label.text),p.createElement(a.IconWrap,{icon:n,name:n.name}),p.createElement(Pt,{color:r.color}),p.createElement(Ft,null,r.label.text),p.createElement(Ft,null,Vt(s)))},Ut=12,Ht={offset:Ut,visible:!0},zt=["nodeEnter","nodeLeave","linkEnter","linkLeave","nodeClick","linkClick"],qt=p.forwardRef((e,t)=>{const r=!a.validatePackage(ve,{component:"Sankey"}),s=a.getLicenseMessage(ve),i=p.useRef(null),o=p.useRef(null),l=a.useRtl(i,e.dir,[e.dir,i.current]),c=p.useRef(null),h=a.useDocument(i),{data:d,links:u,nodes:m,labels:y,title:v,legend:g,tooltip:C=Ht,disableAutoLayout:b,disableKeyboardNavigation:f}=e,x=p.useRef(void 0);x.current=e;const[E,S]=p.useState(null),I=p.useCallback(e=>{const{visible:t,appendTo:r=h().body,offset:s=Ut,nodeComponent:n=Mt,linkComponent:a=jt}={...Ht,...C};if(t){const t={appendTo:r,event:e,offset:s,dir:l,Content:"node"===e.targetType?n:a};S(t)}},[C,l,h]),N=p.useCallback(()=>{S(null)},[]),_=p.useCallback((e,t)=>{const r=x.current[e];if(r){const e={...t,nativeEvent:t.originalEvent,target:c.current};r.call(void 0,e)}},[]);return p.useEffect(()=>{const e={data:d,links:u,nodes:m,labels:y,title:v,legend:g,disableAutoLayout:b,disableKeyboardNavigation:f,rtl:"rtl"===l,tooltip:{...Ht,...C}};if(o.current)o.current.setOptions(e);else if(a.canUseDOM&&i.current){const t=n.sankeyTheme(i.current);o.current=new n.Sankey(i.current,e,t),((e,t)=>{e&&(e.unbind(),zt.forEach(r=>{t[r]&&e.bind(r,t[r])}))})(o.current,{nodeEnter:e=>{_("onNodeEnter",e)},nodeLeave:e=>{_("onNodeLeave",e)},linkEnter:e=>{_("onLinkEnter",e)},linkLeave:e=>{_("onLinkLeave",e)},nodeClick:e=>{_("onNodeClick",e)},linkClick:e=>{_("onLinkClick",e)}}),o.current.bind("tooltipShow",I),o.current.bind("tooltipHide",N)}return()=>{o.current&&(o.current.destroy(),o.current=null)}},[d,u,m,y,v,g,b,f,l,C,N,I,_]),p.useImperativeHandle(c,()=>({get element(){return i.current},exportVisual:e=>o.current.exportVisual(e),props:e}),[]),p.useImperativeHandle(t,()=>c.current),p.createElement(p.Fragment,null,p.createElement("div",{ref:i,className:e.className,style:e.style,dir:l}),E&&p.createElement(Dt,{...E}),r&&p.createElement(a.WatermarkOverlay,{message:s}))});qt.propTypes=At,qt.displayName="KendoReactSankey";const Bt=n.createSankeyData,Wt=Ee;Object.defineProperty(e,"WeekStartDay",{enumerable:!0,get:function(){return n.WeekStartDay}}),e.AxisLabelClickEvent=g,e.Chart=Wt,e.ChartArea=Fe,e.ChartAxisDefaults=e=>p.createElement(Te,{...e,_chartKey:"axisDefaults"}),e.ChartAxisDefaultsCrosshair=Ve,e.ChartAxisDefaultsCrosshairTooltip=Me,e.ChartAxisDefaultsLabels=je,e.ChartAxisDefaultsTitle=Ue,e.ChartBreadcrumb=Ae,e.ChartCategoryAxis=ze,e.ChartCategoryAxisCrosshair=e=>p.createElement(Te,{visible:!0,...e,_chartKey:"crosshair"}),e.ChartCategoryAxisCrosshairTooltip=e=>p.createElement(Te,{visible:!0,...e,_chartKey:"tooltip"}),e.ChartCategoryAxisItem=He,e.ChartCategoryAxisLabels=e=>p.createElement(Te,{visible:!0,...e,_chartKey:"labels"}),e.ChartCategoryAxisNotes=e=>p.createElement(Te,{...e,_chartKey:"notes"}),e.ChartCategoryAxisNotesIcon=e=>p.createElement(Te,{...e,_chartKey:"icon"}),e.ChartCategoryAxisNotesLabel=e=>p.createElement(Te,{...e,_chartKey:"label"}),e.ChartCategoryAxisRangeLabels=e=>p.createElement(Te,{visible:!0,...e,_chartKey:"rangeLabels"}),e.ChartCategoryAxisTitle=qe,e.ChartLegend=Be,e.ChartLegendInactiveItems=We,e.ChartLegendItem=Xe,e.ChartLegendTitle=Ye,e.ChartNavigator=$e,e.ChartNavigatorCategoryAxis=Ze,e.ChartNavigatorHint=e=>p.createElement(Te,{...e,_chartKey:"hint"}),e.ChartNavigatorPane=Ge,e.ChartNavigatorPaneTitle=Je,e.ChartNavigatorSelect=e=>p.createElement(Te,{...e,_chartKey:"select"}),e.ChartNavigatorSeries=et,e.ChartNavigatorSeriesErrorBars=e=>p.createElement(Te,{...e,_chartKey:"errorBars"}),e.ChartNavigatorSeriesExtremes=e=>p.createElement(Te,{...e,_chartKey:"extremes"}),e.ChartNavigatorSeriesHighlight=e=>p.createElement(Te,{...e,_chartKey:"highlight"}),e.ChartNavigatorSeriesItem=Qe,e.ChartNavigatorSeriesItemOutliers=e=>p.createElement(Te,{...e,_chartKey:"outliers"}),e.ChartNavigatorSeriesItemTooltip=e=>p.createElement(Te,{...e,_chartKey:"tooltip"}),e.ChartNavigatorSeriesLabels=e=>p.createElement(Te,{visible:!0,...e,_chartKey:"labels"}),e.ChartNavigatorSeriesLabelsFrom=e=>p.createElement(Te,{...e,_chartKey:"from"}),e.ChartNavigatorSeriesLabelsTo=e=>p.createElement(Te,{...e,_chartKey:"to"}),e.ChartNavigatorSeriesMarkers=e=>p.createElement(Te,{...e,_chartKey:"markers"}),e.ChartNavigatorSeriesNotes=e=>p.createElement(Te,{...e,_chartKey:"notes"}),e.ChartNavigatorSeriesNotesIcon=e=>p.createElement(Te,{...e,_chartKey:"icon"}),e.ChartNavigatorSeriesNotesLabel=e=>p.createElement(Te,{...e,_chartKey:"label"}),e.ChartNoDataOverlay=Pe,e.ChartPane=tt,e.ChartPaneDefaults=rt,e.ChartPaneDefaultsTitle=st,e.ChartPanes=nt,e.ChartPlotArea=e=>p.createElement(Te,{...e,_chartKey:"plotArea"}),e.ChartSeries=it,e.ChartSeriesDefaults=e=>p.createElement(Te,{...e,_chartKey:"seriesDefaults"}),e.ChartSeriesErrorBars=e=>p.createElement(Te,{...e,_chartKey:"errorBars"}),e.ChartSeriesExtremes=e=>p.createElement(Te,{...e,_chartKey:"extremes"}),e.ChartSeriesHighlight=e=>p.createElement(Te,{...e,_chartKey:"highlight"}),e.ChartSeriesItem=at,e.ChartSeriesItemOutliers=e=>p.createElement(Te,{...e,_chartKey:"outliers"}),e.ChartSeriesItemTooltip=e=>p.createElement(Te,{...e,_chartKey:"tooltip"}),e.ChartSeriesLabels=e=>p.createElement(Te,{visible:!0,...e,_chartKey:"labels"}),e.ChartSeriesLabelsFrom=e=>p.createElement(Te,{...e,_chartKey:"from"}),e.ChartSeriesLabelsTo=e=>p.createElement(Te,{...e,_chartKey:"to"}),e.ChartSeriesMarkers=e=>p.createElement(Te,{...e,_chartKey:"markers"}),e.ChartSeriesNotes=e=>p.createElement(Te,{...e,_chartKey:"notes"}),e.ChartSeriesNotesIcon=e=>p.createElement(Te,{...e,_chartKey:"icon"}),e.ChartSeriesNotesLabel=e=>p.createElement(Te,{...e,_chartKey:"label"}),e.ChartSubtitle=ot,e.ChartTitle=lt,e.ChartTooltip=ct,e.ChartValueAxis=pt,e.ChartValueAxisCrosshair=e=>p.createElement(Te,{visible:!0,...e,_chartKey:"crosshair"}),e.ChartValueAxisCrosshairTooltip=e=>p.createElement(Te,{visible:!0,...e,_chartKey:"tooltip"}),e.ChartValueAxisItem=ht,e.ChartValueAxisLabels=e=>p.createElement(Te,{visible:!0,...e,_chartKey:"labels"}),e.ChartValueAxisNotes=e=>p.createElement(Te,{...e,_chartKey:"notes"}),e.ChartValueAxisNotesIcon=e=>p.createElement(Te,{...e,_chartKey:"icon"}),e.ChartValueAxisNotesLabel=e=>p.createElement(Te,{...e,_chartKey:"label"}),e.ChartValueAxisTitle=dt,e.ChartXAxis=mt,e.ChartXAxisCrosshair=e=>p.createElement(Te,{visible:!0,...e,_chartKey:"crosshair"}),e.ChartXAxisCrosshairTooltip=e=>p.createElement(Te,{visible:!0,...e,_chartKey:"tooltip"}),e.ChartXAxisItem=ut,e.ChartXAxisLabels=e=>p.createElement(Te,{visible:!0,...e,_chartKey:"labels"}),e.ChartXAxisNotes=e=>p.createElement(Te,{...e,_chartKey:"notes"}),e.ChartXAxisNotesIcon=e=>p.createElement(Te,{...e,_chartKey:"icon"}),e.ChartXAxisNotesLabel=e=>p.createElement(Te,{...e,_chartKey:"label"}),e.ChartXAxisTitle=yt,e.ChartYAxis=gt,e.ChartYAxisCrosshair=e=>p.createElement(Te,{visible:!0,...e,_chartKey:"crosshair"}),e.ChartYAxisCrosshairTooltip=e=>p.createElement(Te,{visible:!0,...e,_chartKey:"tooltip"}),e.ChartYAxisItem=vt,e.ChartYAxisLabels=e=>p.createElement(Te,{visible:!0,...e,_chartKey:"labels"}),e.ChartYAxisNotes=e=>p.createElement(Te,{...e,_chartKey:"notes"}),e.ChartYAxisNotesIcon=e=>p.createElement(Te,{...e,_chartKey:"icon"}),e.ChartYAxisNotesLabel=e=>p.createElement(Te,{...e,_chartKey:"label"}),e.ChartYAxisTitle=Ct,e.ChartZoomable=e=>p.createElement(Te,{...e,_chartKey:"zoomable"}),e.CollectionConfigurationComponent=ke,e.ConfigurationComponent=Te,e.CrosshairTooltip=he,e.CrosshairTooltipContainer=ye,e.DonutCenter=fe,e.DragEndEvent=f,e.DragEvent=b,e.DragStartEvent=x,e.DrilldownEvent=E,e.DrilldownStateChangeEvent=we,e.LegendItemClickEvent=I,e.LegendItemHoverEvent=S,e.NavigatorFilterEvent=N,e.NoteClickEvent=_,e.NoteHoverEvent=k,e.PlotAreaClickEvent=K,e.PlotAreaHoverEvent=T,e.RenderEvent=w,e.Sankey=qt,e.SelectEndEvent=O,e.SelectEvent=A,e.SelectStartEvent=L,e.SeriesClickEvent=D,e.SeriesHoverEvent=R,e.SeriesTooltip=ae,e.SharedTooltipContent=Z,e.Sparkline=Se,e.StockChart=Ne,e.TooltipPoint=$,e.TooltipPopup=te,e.ZoomEndEvent=F,e.ZoomEvent=P,e.ZoomStartEvent=V,e.createSankeyData=Bt,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)},e.toDomEvent=U});
package/index.d.mts CHANGED
@@ -32,5 +32,5 @@ export * from './common/events';
32
32
  export * from './common/charts';
33
33
  export * from './methods//index.js';
34
34
  export * from './sankey/index.js';
35
- export type { AxisLabelContentArgs, AxisLabelVisualArgs, AxisNoteContentArgs, AxisNoteVisualArgs, BaseUnit, Border, CategoryBaseUnit, CrosshatchPattern, DashType, DiagonalStripesPattern, DotsPattern, FocusHighlight, FocusHighlightBorder, GridLines, GridPattern, LegendLabelsContentArgs, LineStyle, Margin, NavigatorHintContentArgs, Padding, SeriesLabels, SeriesLabelsAlignment, SeriesLabelsContentArgs, SeriesNoteContentArgs, SeriesPattern, SeriesStack, Tooltip, ValueAxisTitle, VerticalStripesPattern } from '@progress/kendo-charts';
35
+ export type { AxisLabelContentArgs, AxisLabelVisualArgs, AxisNoteContentArgs, AxisNoteVisualArgs, BaseUnit, Border, CategoryBaseUnit, ChartOptions, CrosshatchPattern, DashType, DiagonalStripesPattern, DotsPattern, FocusHighlight, FocusHighlightBorder, GridLines, GridPattern, LegendLabelsContentArgs, LineStyle, Margin, NavigatorHintContentArgs, Padding, SeriesLabels, SeriesLabelsAlignment, SeriesLabelsContentArgs, SeriesNoteContentArgs, SeriesPattern, SeriesStack, Tooltip, ValueAxisTitle, VerticalStripesPattern } from '@progress/kendo-charts';
36
36
  export { Chart, ChartProps, Sparkline, SparklineProps, StockChart, StockChartProps, CollectionConfigurationComponent, ConfigurationComponent, DonutCenter, TooltipPoint, SeriesTooltip, CrosshairTooltip, CrosshairTooltipProps, TooltipPopup, TooltipPopupProps, SharedTooltipContent, CrosshairTooltipContainer, ChartBreadcrumb, ChartBreadcrumbProps, ChartNoDataOverlay, ChartNoDataOverlayProps };
package/index.d.ts CHANGED
@@ -32,5 +32,5 @@ export * from './common/events';
32
32
  export * from './common/charts';
33
33
  export * from './methods//index.js';
34
34
  export * from './sankey/index.js';
35
- export type { AxisLabelContentArgs, AxisLabelVisualArgs, AxisNoteContentArgs, AxisNoteVisualArgs, BaseUnit, Border, CategoryBaseUnit, CrosshatchPattern, DashType, DiagonalStripesPattern, DotsPattern, FocusHighlight, FocusHighlightBorder, GridLines, GridPattern, LegendLabelsContentArgs, LineStyle, Margin, NavigatorHintContentArgs, Padding, SeriesLabels, SeriesLabelsAlignment, SeriesLabelsContentArgs, SeriesNoteContentArgs, SeriesPattern, SeriesStack, Tooltip, ValueAxisTitle, VerticalStripesPattern } from '@progress/kendo-charts';
35
+ export type { AxisLabelContentArgs, AxisLabelVisualArgs, AxisNoteContentArgs, AxisNoteVisualArgs, BaseUnit, Border, CategoryBaseUnit, ChartOptions, CrosshatchPattern, DashType, DiagonalStripesPattern, DotsPattern, FocusHighlight, FocusHighlightBorder, GridLines, GridPattern, LegendLabelsContentArgs, LineStyle, Margin, NavigatorHintContentArgs, Padding, SeriesLabels, SeriesLabelsAlignment, SeriesLabelsContentArgs, SeriesNoteContentArgs, SeriesPattern, SeriesStack, Tooltip, ValueAxisTitle, VerticalStripesPattern } from '@progress/kendo-charts';
36
36
  export { Chart, ChartProps, Sparkline, SparklineProps, StockChart, StockChartProps, CollectionConfigurationComponent, ConfigurationComponent, DonutCenter, TooltipPoint, SeriesTooltip, CrosshairTooltip, CrosshairTooltipProps, TooltipPopup, TooltipPopupProps, SharedTooltipContent, CrosshairTooltipContainer, ChartBreadcrumb, ChartBreadcrumbProps, ChartNoDataOverlay, ChartNoDataOverlayProps };
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=Object.freeze({name:"@progress/kendo-react-charts",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1793878085,version:"16.4.0-develop.5",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"});exports.packageMetadata=e;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=Object.freeze({name:"@progress/kendo-react-charts",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1793890078,version:"16.4.0-develop.6",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"});exports.packageMetadata=e;
@@ -7,7 +7,7 @@ export const packageMetadata = Object.freeze({
7
7
  productName: 'KendoReact',
8
8
  productCode: 'KENDOUIREACT',
9
9
  productCodes: ['KENDOUIREACT'],
10
- publishDate: 1793878085,
11
- version: '16.4.0-develop.5',
10
+ publishDate: 1793890078,
11
+ version: '16.4.0-develop.6',
12
12
  licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/components/my-license/'
13
13
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-react-charts",
3
- "version": "16.4.0-develop.5",
3
+ "version": "16.4.0-develop.6",
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",
@@ -27,10 +27,10 @@
27
27
  "peerDependencies": {
28
28
  "@progress/kendo-drawing": "^1.25.5",
29
29
  "@progress/kendo-licensing": "^1.13.0",
30
- "@progress/kendo-react-common": "16.4.0-develop.5",
31
- "@progress/kendo-react-intl": "16.4.0-develop.5",
32
- "@progress/kendo-react-layout": "16.4.0-develop.5",
33
- "@progress/kendo-react-popup": "16.4.0-develop.5",
30
+ "@progress/kendo-react-common": "16.4.0-develop.6",
31
+ "@progress/kendo-react-intl": "16.4.0-develop.6",
32
+ "@progress/kendo-react-layout": "16.4.0-develop.6",
33
+ "@progress/kendo-react-popup": "16.4.0-develop.6",
34
34
  "@progress/kendo-svg-icons": "^4.9.0 || ^5.0.0",
35
35
  "react": "^18.0.0 || ^19.0.0",
36
36
  "react-dom": "^18.0.0 || ^19.0.0"
@@ -79,7 +79,7 @@
79
79
  "package": {
80
80
  "productName": "KendoReact",
81
81
  "productCode": "KENDOUIREACT",
82
- "publishDate": 1793878085,
82
+ "publishDate": 1793890078,
83
83
  "licensingDocsUrl": "https://www.telerik.com/kendo-react-ui/components/my-license/"
84
84
  }
85
85
  },
package/store/store.d.ts CHANGED
@@ -23,8 +23,11 @@ export interface StoreAction {
23
23
  */
24
24
  export interface Store {
25
25
  getState(): any;
26
+ setBaseState(newState?: any, overwrite?: boolean): void;
26
27
  dispatch(action: StoreAction | object): void;
27
28
  subscribe(f: Function): Function;
29
+ claimKey(key: string): void;
30
+ releaseKey(key: string): void;
28
31
  }
29
32
  /**
30
33
  * @hidden
package/store/store.js CHANGED
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("@progress/kendo-react-common"),n=1e3/60,l=i=>{let o,c,e=[];const a=()=>o,s=t=>{o=i(o,t),T.canUseDOM&&(window.clearTimeout(c),c=window.setTimeout(()=>e.forEach(r=>r()),n))},u=t=>(e.push(t),()=>e=e.filter(r=>r!==t));return s({}),{getState:a,dispatch:s,subscribe:u}};exports.THROTTLE_MS=n;exports.createStore=l;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const K=require("@progress/kendo-react-common"),v=1e3/60,p=n=>Array.isArray(n)?n.map(e=>{if(e===null||typeof e!="object")return e;const o={...e};return e.pointVisibility!==null&&typeof e.pointVisibility=="object"&&(o.pointVisibility={...e.pointVisibility}),o}):n,M=n=>{if(n===null||typeof n!="object")return n;const e={...n};return e.series=p(n.series),n.navigator&&typeof n.navigator=="object"&&(e.navigator={...n.navigator},e.navigator.series=p(n.navigator.series)),e},R=n=>{let e,o,b,l=[];const s=new Map,g=new Set,a=new Set;let f=!1;const S=()=>e?{...e,...o}:o,d=()=>{K.canUseDOM&&(window.clearTimeout(b),b=window.setTimeout(()=>l.forEach(t=>t()),v))},h=t=>{const{chartKey:r,chartCollectionIdxKey:c}=t,i=c?c.split("_")[0]:r;if(c!==void 0&&g.add(i),e){const u={...o};i!==void 0&&u[i]===void 0&&e[i]!==void 0&&(u[i]=e[i]),o=n(u,t)}else o=n(o,t);d()},y=t=>(l.push(t),()=>l=l.filter(r=>r!==t)),w=t=>{s.set(t,(s.get(t)||0)+1)},O=()=>{f=!1;let t=!1;a.forEach(r=>{!s.has(r)&&o&&Object.prototype.hasOwnProperty.call(o,r)&&(delete o[r],t=!0)}),a.clear(),t&&d()},T=t=>{const r=(s.get(t)||0)-1;if(r>0){s.set(t,r);return}s.delete(t),a.add(t),f||(f=!0,Promise.resolve().then(O))},j=(t,r=!1)=>{e=M(t),r&&(o=Object.keys(o||{}).reduce((c,i)=>(s.has(i)?c[i]=o[i]:e&&e[i]!==void 0||g.has(i)&&(c[i]=[]),c),{})),d()};return h({}),{getState:S,setBaseState:j,dispatch:h,subscribe:y,claimKey:w,releaseKey:T}};exports.THROTTLE_MS=v;exports.createStore=R;
package/store/store.mjs CHANGED
@@ -5,15 +5,52 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { canUseDOM as u } from "@progress/kendo-react-common";
9
- const l = 1e3 / 60, T = (i) => {
10
- let o, s, t = [];
11
- const n = () => o, c = (e) => {
12
- o = i(o, e), u && (window.clearTimeout(s), s = window.setTimeout(() => t.forEach((r) => r()), l));
13
- }, a = (e) => (t.push(e), () => t = t.filter((r) => r !== e));
14
- return c({}), { getState: n, dispatch: c, subscribe: a };
8
+ import { canUseDOM as K } from "@progress/kendo-react-common";
9
+ const T = 1e3 / 60, g = (n) => Array.isArray(n) ? n.map((e) => {
10
+ if (e === null || typeof e != "object")
11
+ return e;
12
+ const i = { ...e };
13
+ return e.pointVisibility !== null && typeof e.pointVisibility == "object" && (i.pointVisibility = { ...e.pointVisibility }), i;
14
+ }) : n, V = (n) => {
15
+ if (n === null || typeof n != "object")
16
+ return n;
17
+ const e = { ...n };
18
+ return e.series = g(n.series), n.navigator && typeof n.navigator == "object" && (e.navigator = { ...n.navigator }, e.navigator.series = g(n.navigator.series)), e;
19
+ }, E = (n) => {
20
+ let e, i, h, l = [];
21
+ const r = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Set();
22
+ let f = !1;
23
+ const v = () => e ? { ...e, ...i } : i, d = () => {
24
+ K && (window.clearTimeout(h), h = window.setTimeout(() => l.forEach((t) => t()), T));
25
+ }, b = (t) => {
26
+ const { chartKey: s, chartCollectionIdxKey: c } = t, o = c ? c.split("_")[0] : s;
27
+ if (c !== void 0 && p.add(o), e) {
28
+ const u = { ...i };
29
+ o !== void 0 && u[o] === void 0 && e[o] !== void 0 && (u[o] = e[o]), i = n(u, t);
30
+ } else
31
+ i = n(i, t);
32
+ d();
33
+ }, w = (t) => (l.push(t), () => l = l.filter((s) => s !== t)), y = (t) => {
34
+ r.set(t, (r.get(t) || 0) + 1);
35
+ }, S = () => {
36
+ f = !1;
37
+ let t = !1;
38
+ a.forEach((s) => {
39
+ !r.has(s) && i && Object.prototype.hasOwnProperty.call(i, s) && (delete i[s], t = !0);
40
+ }), a.clear(), t && d();
41
+ }, O = (t) => {
42
+ const s = (r.get(t) || 0) - 1;
43
+ if (s > 0) {
44
+ r.set(t, s);
45
+ return;
46
+ }
47
+ r.delete(t), a.add(t), f || (f = !0, Promise.resolve().then(S));
48
+ }, j = (t, s = !1) => {
49
+ e = V(t), s && (i = Object.keys(i || {}).reduce((c, o) => (r.has(o) ? c[o] = i[o] : e && e[o] !== void 0 || p.has(o) && (c[o] = []), c), {})), d();
50
+ };
51
+ return b({}), { getState: v, setBaseState: j, dispatch: b, subscribe: w, claimKey: y, releaseKey: O };
15
52
  };
16
53
  export {
17
- l as THROTTLE_MS,
18
- T as createStore
54
+ T as THROTTLE_MS,
55
+ E as createStore
19
56
  };