@progress/kendo-react-charts 10.2.0-develop.2 → 10.2.0-develop.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BaseChart.js +1 -1
- package/BaseChart.mjs +11 -1
- package/Chart.js +1 -1
- package/Chart.mjs +3 -1
- package/DonutCenter.js +1 -1
- package/DonutCenter.mjs +16 -12
- package/Sparkline.js +1 -1
- package/Sparkline.mjs +3 -1
- package/StockChart.js +1 -1
- package/StockChart.mjs +3 -1
- package/components/base/CollectionConfigurationComponent.js +1 -1
- package/components/base/CollectionConfigurationComponent.mjs +14 -13
- package/components/base/ConfigurationComponent.js +1 -1
- package/components/base/ConfigurationComponent.mjs +12 -8
- package/dist/cdn/js/kendo-react-charts.js +1 -1
- package/index.d.mts +23 -17
- package/index.d.ts +23 -17
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +6 -6
- package/sankey/Sankey.js +1 -1
- package/sankey/Sankey.mjs +15 -15
- package/tooltip/Crosshair.js +1 -1
- package/tooltip/Crosshair.mjs +15 -11
- package/tooltip/Popup.js +1 -1
- package/tooltip/Popup.mjs +25 -21
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"),w=require("@progress/kendo-react-intl"),u=require("@progress/kendo-charts"),m=require("@progress/kendo-react-common"),g=require("./utils/index.js"),C=require("./events/chart-event-builder.js"),y=require("./events/dom-event.js"),S=require("./store/store.js"),b=require("./store/reducer.js"),D=require("./tooltip/Series.js"),E=require("./tooltip/CrosshairContainer.js"),k=require("./ChartContext.js"),P=require("./package-metadata.js"),T=require("./events/drilldown-event.js");function q(p){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(p){for(const e in p)if(e!=="default"){const s=Object.getOwnPropertyDescriptor(p,e);Object.defineProperty(t,e,s.get?s:{enumerable:!0,get:()=>p[e]})}}return t.default=p,Object.freeze(t)}const l=q(O),f=class f extends l.Component{constructor(t){super(t),this.chartInstance=null,this.surface=null,this._element=null,this.optionsStore={},this.optionsUnsubscriber=Function.prototype,this.themeStore={},this.themeUnsubscriber=Function.prototype,this.observersStore={},this.suppressTransitions=!1,this.showLicenseWatermark=!1,this.onRender=e=>{this.chartInstance!==null&&(this.surface=e.sender.surface,this.trigger("render",e))},this.onDrilldown=e=>{var i;const{series:s}=this.optionsStore.getState(),r=s.find(n=>n.name===e.series.name);if(r.drilldownSeriesFactory){const n="onDrilldown";if(this.props.hasOwnProperty(n)){const o={seriesName:r.name,drilldownValue:e.value},c=[...((i=this.props.drilldownState)==null?void 0:i.steps)||[],o],h=this.props.getTarget(),d={...e,currentState:this.props.drilldownState,nextState:{steps:c}},a=new T.DrilldownEvent(d,h);this.props[n].call(void 0,a)}}return!0},this.onLegendItemClick=e=>{if(this.chartInstance!==null)if(this.props.onLegendItemClick)this.trigger("legendItemClick",e);else{const{series:s}=this.optionsStore.getState();if(!s)return;let r={};const{seriesIndex:i,pointIndex:n}=e,o=s[i];if(n===void 0)r=Object.assign({},o,{visible:g.toggle(o.visible)});else{const c=o.pointVisibility=o.pointVisibility||[];c[n]=g.toggle(c[n]),r=Object.assign({},o)}this.optionsStore.dispatch({chartCollectionIdxKey:`series_${i}`,payload:r}),this.suppressTransitions=!0}},this.onWindowResize=()=>{this.chartInstance!==null&&this.chartInstance.resize()},this.onChartMouseLeave=e=>{const s=y.toDomEvent(this,e);this.triggerDomEvent("onMouseLeave",s)?e.preventDefault():this.chartInstance!==null&&this.chartInstance.hideElements()},this.onChildMouseLeave=e=>{const{syntheticEvent:s}=e;return this.chartInstance&&!g.hasParent(s.relatedTarget,this.element)&&this.chartInstance.hideElements(),!1},this.showLicenseWatermark=!m.validatePackage(P.packageMetadata,{component:"Chart"}),this.optionsStore=S.createStore(b.optionsReducer),this.observersStore=S.createStore(b.observersReducer),this.childrenObserver=new u.InstanceObserver(this,{onMouseLeave:"onChildMouseLeave"}),this.state={optionsStore:this.optionsStore,observersStore:this.observersStore,childrenObserver:this.childrenObserver,drilldownState:{steps:[]}},this.themeStore=S.createStore(b.themeReducer),this.chartObserver=new u.InstanceObserver(this,{render:"onRender",legendItemClick:"onLegendItemClick",drilldown:"onDrilldown"})}get element(){return this._element}static getDerivedStateFromProps(t,e){return{...e,drilldownState:t.drilldownState||[]}}componentDidMount(){if(this._element){let t={};try{t=u.chartTheme(this._element)}catch{}const e=u.deepExtend(u.chartBaseTheme(),t);this.themeStore.dispatch({type:"push",payload:e}),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=w.provideIntlService(this),n=this.chartInstance.chartService,o=i.locale!==n._intlService.locale,c=Object.entries(t).filter(h=>h[0]!=="dir"&&h[0]!=="children").some(h=>{const[d,a]=h;return!(r.hasOwnProperty(d)&&r[d]===a)});o&&(this.chartInstance.chartService._intlService=i,this.chartInstance.chartService.format._intlService=i,c||this.chartInstance.noTransitionsRedraw()),c&&this.refresh(),t.dir!==e&&this.chartInstance.setDirection(this.getDirection(e))}}render(){const{style:t={},className:e,wrapper:s,children:r}=this.props,i=Object.assign({},t,{position:"relative"}),n=l.createElement(s,{className:e,style:i,key:"chartElement"},l.createElement("div",{onMouseLeave:this.onChartMouseLeave,ref:o=>this._element=o,className:"k-chart-surface"},r),l.createElement(l.Fragment,null,this.showLicenseWatermark&&l.createElement(m.WatermarkOverlay,null)));return l.createElement(k.ChartContext.Provider,{value:this.state},l.createElement(D.SeriesTooltip,{key:"seriesTooltip"}),l.createElement(E.CrosshairTooltipContainer,{key:"crosshairTooltips"}),n)}getDirection(t){return(t!==void 0?t:m.canUseDOM&&window.getComputedStyle(this.element).direction||"ltr")==="rtl"}getChartOptions(){const{renderAs:t,pannable:e,zoomable:s,paneDefaults:r,panes:i,transitions:n,seriesColors:o,seriesDefaults:c,axisDefaults:h,deriveOptionsFromParent:d}=this.props;let a={};return t!==void 0&&(a.renderAs=t),e!==void 0&&(a.pannable=e),s!==void 0&&(a.zoomable=s),r!==void 0&&(a.paneDefaults=r),i!==void 0&&(a.panes=i),n!==void 0&&(a.transitions=n),o!==void 0&&(a.seriesColors=o),c!==void 0&&(a.seriesDefaults=c),h!==void 0&&(a.axisDefaults=h),a=Object.assign(a,this.optionsStore.getState()),d&&(a=d(a)),a}refresh(){if(this.chartInstance!==null){const t=this.themeStore.getState(),e=this.getChartOptions(),s=e.transitions;this.suppressTransitions&&(e.transitions=!1),this.props.onRefresh?this.props.onRefresh.call(void 0,e,t,this.chartInstance):this.chartInstance.setOptions(e,t),this.suppressTransitions&&(e.transitions=s,this.suppressTransitions=!1)}}instantiateCoreChart(){const{dir:t,chartConstructor:e}=this.props,s=this.getChartOptions();this.chartInstance=new e(this.element,s,this.themeStore.getState(),{rtl:this.getDirection(t),intlService:w.provideIntlService(this),observer:this.chartObserver,sender:this})}trigger(t,e){const s=this.props.getTarget(),r=C.create(t,e,s),i="on"+t.charAt(0).toUpperCase()+t.slice(1),n=this.observersStore.getState();let o=!1;for(let c=0;c<n.length;c++)n[c].trigger(t,e)&&(o=!0);return o===!1&&r&&this.props.hasOwnProperty(i)?(this.props[i].call(void 0,r),r.isDefaultPrevented&&r.isDefaultPrevented()):o}requiresHandlers(t){for(let e=0;e<t.length;e++){const s=t[e],r="on"+s.charAt(0).toUpperCase()+s.slice(1);if(this.props.hasOwnProperty(r))return!0}return!1}triggerDomEvent(t,e){const s=this.observersStore.getState();let r=!1;for(let i=0;i<s.length;i++)s[i].trigger(t,e)&&(r=!0);return r}};f.propTypes={dir:I.string,renderAs:I.oneOf(["svg","canvas"])},f.defaultProps={renderAs:"svg"};let v=f;w.registerForIntl(v);exports.BaseChart=v;
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("react"),I=require("prop-types"),w=require("@progress/kendo-react-intl"),u=require("@progress/kendo-charts"),m=require("@progress/kendo-react-common"),g=require("./utils/index.js"),C=require("./events/chart-event-builder.js"),y=require("./events/dom-event.js"),S=require("./store/store.js"),b=require("./store/reducer.js"),D=require("./tooltip/Series.js"),E=require("./tooltip/CrosshairContainer.js"),k=require("./ChartContext.js"),P=require("./package-metadata.js"),T=require("./events/drilldown-event.js");function q(p){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(p){for(const e in p)if(e!=="default"){const s=Object.getOwnPropertyDescriptor(p,e);Object.defineProperty(t,e,s.get?s:{enumerable:!0,get:()=>p[e]})}}return t.default=p,Object.freeze(t)}const l=q(O),f=class f extends l.Component{constructor(t){super(t),this.chartInstance=null,this.surface=null,this._element=null,this.optionsStore={},this.optionsUnsubscriber=Function.prototype,this.themeStore={},this.themeUnsubscriber=Function.prototype,this.observersStore={},this.suppressTransitions=!1,this.showLicenseWatermark=!1,this.onRender=e=>{this.chartInstance!==null&&(this.surface=e.sender.surface,this.trigger("render",e))},this.onDrilldown=e=>{var i;const{series:s}=this.optionsStore.getState(),r=s.find(n=>n.name===e.series.name);if(r.drilldownSeriesFactory){const n="onDrilldown";if(this.props.hasOwnProperty(n)){const o={seriesName:r.name,drilldownValue:e.value},c=[...((i=this.props.drilldownState)==null?void 0:i.steps)||[],o],h=this.props.getTarget(),d={...e,currentState:this.props.drilldownState,nextState:{steps:c}},a=new T.DrilldownEvent(d,h);this.props[n].call(void 0,a)}}return!0},this.onLegendItemClick=e=>{if(this.chartInstance!==null)if(this.props.onLegendItemClick)this.trigger("legendItemClick",e);else{const{series:s}=this.optionsStore.getState();if(!s)return;let r={};const{seriesIndex:i,pointIndex:n}=e,o=s[i];if(n===void 0)r=Object.assign({},o,{visible:g.toggle(o.visible)});else{const c=o.pointVisibility=o.pointVisibility||[];c[n]=g.toggle(c[n]),r=Object.assign({},o)}this.optionsStore.dispatch({chartCollectionIdxKey:`series_${i}`,payload:r}),this.suppressTransitions=!0}},this.onWindowResize=()=>{this.chartInstance!==null&&this.chartInstance.resize()},this.onChartMouseLeave=e=>{const s=y.toDomEvent(this,e);this.triggerDomEvent("onMouseLeave",s)?e.preventDefault():this.chartInstance!==null&&this.chartInstance.hideElements()},this.onChildMouseLeave=e=>{const{syntheticEvent:s}=e;return this.chartInstance&&!g.hasParent(s.relatedTarget,this.element)&&this.chartInstance.hideElements(),!1},this.showLicenseWatermark=!m.validatePackage(P.packageMetadata,{component:"Chart"}),this.optionsStore=S.createStore(b.optionsReducer),this.observersStore=S.createStore(b.observersReducer),this.childrenObserver=new u.InstanceObserver(this,{onMouseLeave:"onChildMouseLeave"}),this.state={optionsStore:this.optionsStore,observersStore:this.observersStore,childrenObserver:this.childrenObserver,drilldownState:{steps:[]}},this.themeStore=S.createStore(b.themeReducer),this.chartObserver=new u.InstanceObserver(this,{render:"onRender",legendItemClick:"onLegendItemClick",drilldown:"onDrilldown"})}get element(){return this._element}static getDerivedStateFromProps(t,e){return{...e,drilldownState:t.drilldownState||[]}}componentDidMount(){if(this._element){let t={};try{t=u.chartTheme(this._element)}catch{}const e=u.deepExtend(u.chartBaseTheme(),t);this.themeStore.dispatch({type:"push",payload:e}),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=w.provideIntlService(this),n=this.chartInstance.chartService,o=i.locale!==n._intlService.locale,c=Object.entries(t).filter(h=>h[0]!=="dir"&&h[0]!=="children").some(h=>{const[d,a]=h;return!(r.hasOwnProperty(d)&&r[d]===a)});o&&(this.chartInstance.chartService._intlService=i,this.chartInstance.chartService.format._intlService=i,c||this.chartInstance.noTransitionsRedraw()),c&&this.refresh(),t.dir!==e&&this.chartInstance.setDirection(this.getDirection(e))}}render(){const{style:t={},className:e,wrapper:s,children:r}=this.props,i=Object.assign({},t,{position:"relative"}),n=l.createElement(s,{className:e,style:i,key:"chartElement"},l.createElement("div",{onMouseLeave:this.onChartMouseLeave,ref:o=>{this._element=o},className:"k-chart-surface"},r),l.createElement(l.Fragment,null,this.showLicenseWatermark&&l.createElement(m.WatermarkOverlay,null)));return l.createElement(k.ChartContext.Provider,{value:this.state},l.createElement(D.SeriesTooltip,{key:"seriesTooltip"}),l.createElement(E.CrosshairTooltipContainer,{key:"crosshairTooltips"}),n)}getDirection(t){return(t!==void 0?t:m.canUseDOM&&window.getComputedStyle(this.element).direction||"ltr")==="rtl"}getChartOptions(){const{renderAs:t,pannable:e,zoomable:s,paneDefaults:r,panes:i,transitions:n,seriesColors:o,seriesDefaults:c,axisDefaults:h,deriveOptionsFromParent:d}=this.props;let a={};return t!==void 0&&(a.renderAs=t),e!==void 0&&(a.pannable=e),s!==void 0&&(a.zoomable=s),r!==void 0&&(a.paneDefaults=r),i!==void 0&&(a.panes=i),n!==void 0&&(a.transitions=n),o!==void 0&&(a.seriesColors=o),c!==void 0&&(a.seriesDefaults=c),h!==void 0&&(a.axisDefaults=h),a=Object.assign(a,this.optionsStore.getState()),d&&(a=d(a)),a}refresh(){if(this.chartInstance!==null){const t=this.themeStore.getState(),e=this.getChartOptions(),s=e.transitions;this.suppressTransitions&&(e.transitions=!1),this.props.onRefresh?this.props.onRefresh.call(void 0,e,t,this.chartInstance):this.chartInstance.setOptions(e,t),this.suppressTransitions&&(e.transitions=s,this.suppressTransitions=!1)}}instantiateCoreChart(){const{dir:t,chartConstructor:e}=this.props,s=this.getChartOptions();this.chartInstance=new e(this.element,s,this.themeStore.getState(),{rtl:this.getDirection(t),intlService:w.provideIntlService(this),observer:this.chartObserver,sender:this})}trigger(t,e){const s=this.props.getTarget(),r=C.create(t,e,s),i="on"+t.charAt(0).toUpperCase()+t.slice(1),n=this.observersStore.getState();let o=!1;for(let c=0;c<n.length;c++)n[c].trigger(t,e)&&(o=!0);return o===!1&&r&&this.props.hasOwnProperty(i)?(this.props[i].call(void 0,r),r.isDefaultPrevented&&r.isDefaultPrevented()):o}requiresHandlers(t){for(let e=0;e<t.length;e++){const s=t[e],r="on"+s.charAt(0).toUpperCase()+s.slice(1);if(this.props.hasOwnProperty(r))return!0}return!1}triggerDomEvent(t,e){const s=this.observersStore.getState();let r=!1;for(let i=0;i<s.length;i++)s[i].trigger(t,e)&&(r=!0);return r}};f.propTypes={dir:I.string,renderAs:I.oneOf(["svg","canvas"])},f.defaultProps={renderAs:"svg"};let v=f;w.registerForIntl(v);exports.BaseChart=v;
|
package/BaseChart.mjs
CHANGED
|
@@ -139,7 +139,17 @@ const d = class d extends l.Component {
|
|
|
139
139
|
style: i,
|
|
140
140
|
key: "chartElement"
|
|
141
141
|
},
|
|
142
|
-
/* @__PURE__ */ l.createElement(
|
|
142
|
+
/* @__PURE__ */ l.createElement(
|
|
143
|
+
"div",
|
|
144
|
+
{
|
|
145
|
+
onMouseLeave: this.onChartMouseLeave,
|
|
146
|
+
ref: (o) => {
|
|
147
|
+
this._element = o;
|
|
148
|
+
},
|
|
149
|
+
className: "k-chart-surface"
|
|
150
|
+
},
|
|
151
|
+
r
|
|
152
|
+
),
|
|
143
153
|
/* @__PURE__ */ l.createElement(l.Fragment, null, this.showLicenseWatermark && /* @__PURE__ */ l.createElement(D, null))
|
|
144
154
|
);
|
|
145
155
|
return /* @__PURE__ */ l.createElement(M.Provider, { value: this.state }, /* @__PURE__ */ l.createElement(R, { key: "seriesTooltip" }), /* @__PURE__ */ l.createElement(U, { key: "crosshairTooltips" }), n);
|
package/Chart.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 u=require("react"),o=require("./BaseChart.js"),l=require("./DonutCenter.js"),i=require("@progress/kendo-charts"),h=require("@progress/kendo-react-common");function C(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const a=C(u);class g extends a.Component{constructor(){super(...arguments),this._baseChart=null,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{donutCenterRender:r,children:t,className:n,...s}=this.props;return a.createElement(o.BaseChart,{...s,ref:c=>this._baseChart=c,chartConstructor:i.Chart,getTarget:this.getTarget,wrapper:"div",className:h.classNames("k-chart k-widget",n)},t,a.createElement(l.DonutCenter,{render:r}))}}exports.Chart=g;
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react"),o=require("./BaseChart.js"),l=require("./DonutCenter.js"),i=require("@progress/kendo-charts"),h=require("@progress/kendo-react-common");function C(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const a=C(u);class g extends a.Component{constructor(){super(...arguments),this._baseChart=null,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{donutCenterRender:r,children:t,className:n,...s}=this.props;return a.createElement(o.BaseChart,{...s,ref:c=>{this._baseChart=c},chartConstructor:i.Chart,getTarget:this.getTarget,wrapper:"div",className:h.classNames("k-chart k-widget",n)},t,a.createElement(l.DonutCenter,{render:r}))}}exports.Chart=g;
|
package/Chart.mjs
CHANGED
package/DonutCenter.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 y=require("react"),f=require("@progress/kendo-charts"),b=require("./ChartContext.js");function S(n){const
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("react"),f=require("@progress/kendo-charts"),b=require("./ChartContext.js");function S(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 c=S(y),a=class a extends c.Component{constructor(e){super(e),this.state={donutCenterStyles:null},this.chartObserver=new f.InstanceObserver(this,{render:"onRender"})}componentDidMount(){var e;(e=this.context)==null||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=c.createElement("div",{className:"k-chart-donut-center",style:t},c.createElement(e,null))),r}onRender(e){var u;const t=(u=this.context)==null?void 0:u.optionsStore.getState().series,r=Array.isArray(t)?t[0]:null,l=e.sender._plotArea.charts;if(!r||r.type!=="donut"||l[0].points.length===0)return;const s=l[0].points[0].sector,o=s.innerRadius,h=s.center.y-o,p=s.center.x-o,d=o*2;this.setState({donutCenterStyles:{height:d,left:p,top:h,width:d}})}};a.contextType=b.ChartContext;let i=a;exports.DonutCenter=i;
|
package/DonutCenter.mjs
CHANGED
|
@@ -9,39 +9,43 @@ import * as o from "react";
|
|
|
9
9
|
import { InstanceObserver as u } from "@progress/kendo-charts";
|
|
10
10
|
import { ChartContext as m } from "./ChartContext.mjs";
|
|
11
11
|
const c = class c extends o.Component {
|
|
12
|
-
constructor(
|
|
13
|
-
super(
|
|
12
|
+
constructor(t) {
|
|
13
|
+
super(t), this.state = {
|
|
14
14
|
donutCenterStyles: null
|
|
15
15
|
}, this.chartObserver = new u(this, {
|
|
16
16
|
render: "onRender"
|
|
17
|
-
})
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
componentDidMount() {
|
|
20
|
+
var t;
|
|
21
|
+
(t = this.context) == null || t.observersStore.dispatch({
|
|
18
22
|
type: "add",
|
|
19
23
|
payload: this.chartObserver
|
|
20
24
|
});
|
|
21
25
|
}
|
|
22
26
|
render() {
|
|
23
|
-
const { render:
|
|
27
|
+
const { render: t } = this.props, { donutCenterStyles: e } = this.state;
|
|
24
28
|
let r = null;
|
|
25
|
-
return
|
|
29
|
+
return t && e && (r = /* @__PURE__ */ o.createElement("div", { className: "k-chart-donut-center", style: e }, /* @__PURE__ */ o.createElement(t, null))), r;
|
|
26
30
|
}
|
|
27
|
-
onRender(
|
|
28
|
-
var
|
|
29
|
-
const
|
|
31
|
+
onRender(t) {
|
|
32
|
+
var d;
|
|
33
|
+
const e = (d = this.context) == null ? void 0 : d.optionsStore.getState().series, r = Array.isArray(e) ? e[0] : null, i = t.sender._plotArea.charts;
|
|
30
34
|
if (!r || r.type !== "donut" || i[0].points.length === 0)
|
|
31
35
|
return;
|
|
32
|
-
const s = i[0].points[0].sector, n = s.innerRadius,
|
|
36
|
+
const s = i[0].points[0].sector, n = s.innerRadius, l = s.center.y - n, p = s.center.x - n, a = n * 2;
|
|
33
37
|
this.setState({
|
|
34
38
|
donutCenterStyles: {
|
|
35
39
|
height: a,
|
|
36
40
|
left: p,
|
|
37
|
-
top:
|
|
41
|
+
top: l,
|
|
38
42
|
width: a
|
|
39
43
|
}
|
|
40
44
|
});
|
|
41
45
|
}
|
|
42
46
|
};
|
|
43
47
|
c.contextType = m;
|
|
44
|
-
let
|
|
48
|
+
let h = c;
|
|
45
49
|
export {
|
|
46
|
-
|
|
50
|
+
h as DonutCenter
|
|
47
51
|
};
|
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"),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;
|
package/Sparkline.mjs
CHANGED
package/StockChart.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 i=require("react"),o=require("./BaseChart.js"),l=require("@progress/kendo-charts"),u=require("@progress/kendo-react-common");function c(a){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const t in a)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(a,t);Object.defineProperty(e,t,r.get?r:{enumerable:!0,get:()=>a[t]})}}return e.default=a,Object.freeze(e)}const s=c(i),h={autoBindElements:!0,liveDrag:!1,partialRedraw:!0};class g extends s.Component{constructor(){super(...arguments),this._baseChart=null,this.deriveOptionsFromParent=e=>{const t=Object.assign({},e.navigator||{},h);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 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,className:t,...r}=this.props;return s.createElement(o.BaseChart,{...r,ref:n=>this._baseChart=n,chartConstructor:l.StockChart,getTarget:this.getTarget,wrapper:"div",deriveOptionsFromParent:this.deriveOptionsFromParent,onRefresh:this.onRefresh,className:u.classNames("k-stockchart k-widget",t)},e)}}exports.StockChart=g;
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react"),o=require("./BaseChart.js"),l=require("@progress/kendo-charts"),u=require("@progress/kendo-react-common");function c(a){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const t in a)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(a,t);Object.defineProperty(e,t,r.get?r:{enumerable:!0,get:()=>a[t]})}}return e.default=a,Object.freeze(e)}const s=c(i),h={autoBindElements:!0,liveDrag:!1,partialRedraw:!0};class g extends s.Component{constructor(){super(...arguments),this._baseChart=null,this.deriveOptionsFromParent=e=>{const t=Object.assign({},e.navigator||{},h);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 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,className:t,...r}=this.props;return s.createElement(o.BaseChart,{...r,ref:n=>{this._baseChart=n},chartConstructor:l.StockChart,getTarget:this.getTarget,wrapper:"div",deriveOptionsFromParent:this.deriveOptionsFromParent,onRefresh:this.onRefresh,className:u.classNames("k-stockchart k-widget",t)},e)}}exports.StockChart=g;
|
package/StockChart.mjs
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 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{
|
|
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;
|
|
@@ -5,26 +5,27 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import * as
|
|
8
|
+
import * as r from "react";
|
|
9
9
|
import { ChartContext as h } from "../../ChartContext.mjs";
|
|
10
|
-
const p = class p extends
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
const p = class p extends r.Component {
|
|
11
|
+
get optionsStore() {
|
|
12
|
+
var t;
|
|
13
|
+
return (t = this.context) == null ? void 0 : t.optionsStore;
|
|
13
14
|
}
|
|
14
|
-
renderChildren(
|
|
15
|
-
const { children: o } =
|
|
16
|
-
...
|
|
17
|
-
_chartCollectionIdxKey: `${c}_${
|
|
15
|
+
renderChildren(t, s) {
|
|
16
|
+
const { children: o } = t.props, { _chartKey: c, _parentStore: e } = this.props, n = {
|
|
17
|
+
...t.props,
|
|
18
|
+
_chartCollectionIdxKey: `${c}_${s}`,
|
|
18
19
|
_parentStore: e
|
|
19
20
|
};
|
|
20
|
-
return
|
|
21
|
+
return r.cloneElement(t, n, o);
|
|
21
22
|
}
|
|
22
23
|
render() {
|
|
23
|
-
const { _chartKey:
|
|
24
|
-
return (
|
|
25
|
-
chartKey:
|
|
24
|
+
const { _chartKey: t, _parentStore: s, children: o } = this.props;
|
|
25
|
+
return (s || this.optionsStore).dispatch({
|
|
26
|
+
chartKey: t,
|
|
26
27
|
payload: []
|
|
27
|
-
}),
|
|
28
|
+
}), r.Children.map(o, (e, n) => r.isValidElement(e) ? this.renderChildren(e, n) : e);
|
|
28
29
|
}
|
|
29
30
|
};
|
|
30
31
|
p.contextType = h;
|
|
@@ -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
|
|
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;
|
|
@@ -6,12 +6,16 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
import * as r from "react";
|
|
9
|
-
import { createStore as
|
|
10
|
-
import { optionsReducer as
|
|
9
|
+
import { createStore as c } from "../../store/store.mjs";
|
|
10
|
+
import { optionsReducer as p } from "../../store/reducer.mjs";
|
|
11
11
|
import { ChartContext as h } from "../../ChartContext.mjs";
|
|
12
12
|
const s = class s extends r.Component {
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
get optionsStore() {
|
|
14
|
+
var t;
|
|
15
|
+
return (t = this.context) == null ? void 0 : t.optionsStore;
|
|
16
|
+
}
|
|
17
|
+
constructor(t) {
|
|
18
|
+
super(t), this.childStore = c(p);
|
|
15
19
|
}
|
|
16
20
|
render() {
|
|
17
21
|
const { children: t } = this.props;
|
|
@@ -24,11 +28,11 @@ const s = class s extends r.Component {
|
|
|
24
28
|
this.dispatch();
|
|
25
29
|
}
|
|
26
30
|
dispatch() {
|
|
27
|
-
const { _chartKey: t, _chartCollectionIdxKey: e, _parentStore: o, children: a, ...
|
|
31
|
+
const { _chartKey: t, _chartCollectionIdxKey: e, _parentStore: o, children: a, ...i } = this.props;
|
|
28
32
|
(o || this.optionsStore).dispatch({
|
|
29
33
|
chartKey: t,
|
|
30
34
|
chartCollectionIdxKey: e,
|
|
31
|
-
payload: Object.assign({},
|
|
35
|
+
payload: Object.assign({}, i, this.childStore.getState())
|
|
32
36
|
});
|
|
33
37
|
}
|
|
34
38
|
renderChildren(t) {
|
|
@@ -40,7 +44,7 @@ const s = class s extends r.Component {
|
|
|
40
44
|
}
|
|
41
45
|
};
|
|
42
46
|
s.contextType = h;
|
|
43
|
-
let
|
|
47
|
+
let n = s;
|
|
44
48
|
export {
|
|
45
|
-
|
|
49
|
+
n as ConfigurationComponent
|
|
46
50
|
};
|
|
@@ -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}},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}},_=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}},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}},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}},A=class extends g{constructor(e,t){super(t)}},K=class extends C{constructor(e,t){super(t),this.axis=e.axis,this.from=e.from,this.to=e.to}},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}},V=class extends C{constructor(e,t){super(t),this.axisRanges=e.axisRanges,this.nativeEvent=e.originalEvent}};const H={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:k,noteHover:_,plotAreaClick:w,plotAreaHover:T,render:A,select:K,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 M(e,t){return new j(e,t)}const U=e=>{let t,r,s=[];const n=n=>{t=e(t,n),a.canUseDOM&&(window.clearTimeout(r),r=window.setTimeout((()=>s.forEach((e=>e()))),16.666666666666668))};return n({}),{getState:()=>t,dispatch:n,subscribe:e=>(s.push(e),()=>s=s.filter((t=>t!==e)))}},z=(e,t)=>t.chartCollectionIdxKey?W.collectionConfigurationItem(e,t):t.chartKey?W.configurationItem(e,t):{},q=(e,t)=>{if(!t.type)return{};switch(t.type){case"set":return W.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}},W={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 X=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 Y=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",{dangerouslySetInnerHTML:{__html:e.formattedValue}}))))))},$=p.createContext(null);$.displayName="ChartContext";const Z={horizontal:"fit",vertical:"fit"},G="k-chart-tooltip",J=class extends p.Component{constructor(e,t){super(e,t),this.context=null,this.element=null,this.onChartMouseLeave=e=>{const{syntheticEvent:t}=e;return!!u(t.relatedTarget,this.element)},this.onMouseLeave=e=>{const t=M(this,e);this.context.childrenObserver.trigger("onMouseLeave",t)&&e.preventDefault()},this.popupRef=e=>{this.element=e;const t=e&&e.closest(".k-animation-container");t&&(t.style.transition="initial")},this.chartObserver=new n.InstanceObserver(this,{onMouseLeave:"onChartMouseLeave"}),t.observersStore.dispatch({type:"add",payload:this.chartObserver})}render(){const{popupShown:e,popupAlign:t,popupOffset:r,popupStyles:s,popupContent:n,className:a}=this.props,o=[G,a].join(" ").trim();return p.createElement(i.Popup,{animate:!1,popupAlign:t,offset:r,show:e,collision:Z,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})}};J.contextType=$;let Q=J;const ee=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(Y,{...e});const s=e.point,n=this.findRenderFunctionByIndex(s.series.index);return null!==n?n(e):null!==r?r(e):p.createElement("span",{dangerouslySetInnerHTML:{__html:e.point.formattedValue}})}:Function.prototype,i=a.classNames({"k-chart-shared-tooltip":t,"k-chart-tooltip-inverse":!!r});return p.createElement(Q,{...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 X(t,e.format)))}}createTooltipContext(e){const{point:t,format:r}=e;return{point:new X(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}};ee.contextType=$;let te=ee;const re=e=>e.children;re.displayName="Container";const se=class extends p.Component{constructor(e,t){super(e,t),this.context=null,this.state={popupShown:!1},this.chartObserver=new n.InstanceObserver(this,{showTooltip:"onShowTooltip",hideTooltip:"onHideTooltip"}),t.observersStore.dispatch({type:"add",payload:this.chartObserver})}render(){const{popupContend:e,className:t,...r}=this.state,s=this.state.popupShown?()=>e:Function.prototype,n=a.classNames({"k-chart-crosshair-tooltip":!0,"k-chart-tooltip-inverse":!!t});return p.createElement(Q,{...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})}};se.contextType=$;let ne=se;const ae=["categoryAxis","valueAxis","xAxis","yAxis"];function ie(e){const t={};for(let r=0;r<ae.length;r++){const s=oe(e,ae[r]);for(let e=0;e<s.length;e++){const r=s[e];t[r.name+r.index]=r}}return t}function oe(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 le=class extends p.Component{constructor(){super(...arguments),this.context=null,this.state={tooltips:{}},this.storeUnsubscriber=Function.prototype,this.subscriber=()=>{var e;this.setState({tooltips:ie(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(ne,{...e[t],key:t})));return p.createElement(re,null,t)}componentWillUnmount(){this.storeUnsubscriber()}};le.contextType=$;let ce=le;const he={name:"@progress/kendo-react-charts",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:0,version:"10.2.0-develop.2",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"},pe=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=M(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(he,{component:"Chart"}),this.optionsStore=U(z),this.observersStore=U(B),this.childrenObserver=new n.InstanceObserver(this,{onMouseLeave:"onChildMouseLeave"}),this.state={optionsStore:this.optionsStore,observersStore:this.observersStore,childrenObserver:this.childrenObserver,drilldownState:{steps:[]}},this.themeStore=U(q),this.chartObserver=new n.InstanceObserver(this,{render:"onRender",legendItemClick:"onLegendItemClick",drilldown:"onDrilldown"})}get element(){return this._element}static getDerivedStateFromProps(e,t){return{...t,drilldownState:e.drilldownState||[]}}componentDidMount(){if(this._element){let e={};try{e=n.chartTheme(this._element)}catch{}const t=n.deepExtend(n.chartBaseTheme(),e);this.themeStore.dispatch({type:"push",payload:t}),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,null)));return p.createElement($.Provider,{value:this.state},p.createElement(te,{key:"seriesTooltip"}),p.createElement(ce,{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,deriveOptionsFromParent:c}=this.props;let h={};return void 0!==e&&(h.renderAs=e),void 0!==t&&(h.pannable=t),void 0!==r&&(h.zoomable=r),void 0!==s&&(h.paneDefaults=s),void 0!==n&&(h.panes=n),void 0!==a&&(h.transitions=a),void 0!==i&&(h.seriesColors=i),void 0!==o&&(h.seriesDefaults=o),void 0!==l&&(h.axisDefaults=l),h=Object.assign(h,this.optionsStore.getState()),c&&(h=c(h)),h}refresh(){if(null!==this.chartInstance){const e=this.themeStore.getState(),t=this.getChartOptions(),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(H[e])return new H[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}};pe.propTypes={dir:r.string,renderAs:r.oneOf(["svg","canvas"])},pe.defaultProps={renderAs:"svg"};let de=pe;s.registerForIntl(de);const ue=class extends p.Component{constructor(e,t){super(e,t),this.context=null,this.state={donutCenterStyles:null},this.chartObserver=new n.InstanceObserver(this,{render:"onRender"}),t.observersStore.dispatch({type:"add",payload:this.chartObserver})}render(){const{render:e}=this.props,{donutCenterStyles:t}=this.state;let r=null;return e&&t&&(r=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}})}};ue.contextType=$;let me=ue,ye=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(de,{...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(me,{render:e}))}},ge=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(de,{...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 ve={autoBindElements:!0,liveDrag:!1,partialRedraw:!0};let Ce=class extends p.Component{constructor(){super(...arguments),this._baseChart=null,this.deriveOptionsFromParent=e=>{const t=Object.assign({},e.navigator||{},ve);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(de,{...r,ref:e=>this._baseChart=e,chartConstructor:n.StockChart,getTarget:this.getTarget,wrapper:"div",deriveOptionsFromParent:this.deriveOptionsFromParent,onRefresh:this.onRefresh,className:a.classNames("k-stockchart k-widget",t)},e)}};const be=class extends p.Component{constructor(e,t){super(e,t),this.optionsStore=t.optionsStore}renderChildren(e,t){const{children:r}=e.props,{_chartKey:s,_parentStore:n}=this.props,a={...e.props,_chartCollectionIdxKey:`${s}_${t}`,_parentStore:n};return 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))}};be.contextType=$;let fe=be;const xe=class extends p.Component{constructor(e,t){super(e,t),this.optionsStore=t.optionsStore,this.childStore=U(z)}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)}};xe.contextType=$;let Ee=xe,Se=class{constructor(e){this.currentState=e.currentState,this.nextState=e.nextState}};const Ie=p.forwardRef(((e,t)=>{const r=p.useRef(null),s=p.useRef(null),n={valueField:ke.valueField,textField:ke.textField,iconField:ke.iconField,iconClassField:ke.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 Se({currentState:e.drilldownState,nextState:a});e[s].call(void 0,o)}}}))})),Ne={id:r.string,style:r.object,className:r.string,breadcrumbOrderedList:r.elementType,breadcrumbListItem:r.elementType,breadcrumbDelimiter:r.elementType,breadcrumbLink:r.elementType,dir:r.oneOf(["ltr","rtl"]),disabled:r.bool,valueField:r.string,textField:r.string,iconField:r.string,iconClassField:r.string,onItemSelect:r.func,ariaLabel:r.string,onDrilldownStateChange:r.func,drilldownState:r.shape({steps:r.array}),rootItem:r.object},ke={valueField:"id",textField:"text",iconField:"icon",iconClassField:"iconClass",data:[]};Ie.displayName="KendoReactChartBreadcrumb",Ie.propTypes=Ne;const _e="charts.nodata",we={[_e]:"No data available."},Te=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(_e,we[_e]):e.children))};Te.displayName="ChartNoDataOverlay";const Ae=e=>p.createElement(Ee,{...e,_chartKey:"title"});Ae.displayName="ChartAxisDefaultsTitle";const Ke=e=>p.createElement(Ee,{...e,_chartKey:"labels"});Ke.displayName="ChartAxisDefaultsLabels";const Oe=e=>p.createElement(Ee,{visible:!0,...e,_chartKey:"crosshair"});Oe.displayName="ChartAxisDefaultsCrosshair";const Le=e=>p.createElement(Ee,{visible:!0,...e,_chartKey:"tooltip"});Le.displayName="ChartAxisDefaultsCrosshairTooltip";const De=e=>p.createElement(Ee,{...e,_chartKey:"title"});De.displayName="ChartCategoryAxisTitle";const Re=e=>p.createElement(Ee,{...e,_chartKey:"title"});Re.displayName="ChartPaneDefaultsTitle";const Pe=e=>p.createElement(Ee,{...e,_chartKey:"item"});Pe.displayName="ChartLegendItem";const Fe=e=>p.createElement(Ee,{...e,_chartKey:"title"});Fe.displayName="ChartLegendTitle";const Ve=e=>p.createElement(Ee,{...e,_chartKey:"inactiveItems"});Ve.displayName="ChartLegendInactiveItems";const He=e=>p.createElement(Ee,{...e,_chartKey:"title"});He.displayName="ChartValueAxisTitle";const je=e=>p.createElement(Ee,{...e,_chartKey:"title"});je.displayName="ChartXAxisTitle";const Me=e=>p.createElement(Ee,{...e,_chartKey:"title"});Me.displayName="ChartYAxisTitle";const Ue=e=>p.createElement(Ee,{...e,_chartKey:"categoryAxis"});Ue.displayName="ChartNavigatorCategoryAxis";const ze=e=>p.createElement(Ee,{...e,_chartKey:"pane"});ze.displayName="ChartNavigatorPane";const qe=e=>p.createElement(Ee,{...e});qe.displayName="ChartNavigatorSeriesItem";const Be=e=>p.createElement(fe,{...e,_chartKey:"series"});Be.propTypes={children:function(e,t,r){return m(e,t,r,qe)}};const We=e=>p.createElement(Ee,{...e,_chartKey:"chartArea"});We.displayName="ChartArea";const Xe=e=>p.createElement(Ee,{...e});Xe.displayName="ChartCategoryAxisItem";const Ye=e=>p.createElement(fe,{...e,_chartKey:"categoryAxis"});Ye.propTypes={children:function(e,t,r){return m(e,t,r,Xe)}},Ye.displayName="ChartCategoryAxis";const $e=e=>p.createElement(Ee,{visible:!0,...e,_chartKey:"legend"});$e.displayName="ChartLegend";const Ze=e=>p.createElement(Ee,{visible:!0,position:"bottom",...e,_chartKey:"navigator"});Ze.displayName="ChartNavigator";const Ge=e=>p.createElement(Ee,{...e});Ge.displayName="ChartPane";const Je=e=>p.createElement(Ee,{...e,_chartKey:"paneDefaults"});Je.displayName="ChartPaneDefaults";const Qe=e=>p.createElement(fe,{...e,_chartKey:"panes"});Qe.propTypes={children:function(e,t,r){return m(e,t,r,Ge)}};const et=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($.Consumer,null,(s=>r(s)?p.createElement(t,{_chartCollectionIdxKey:e._chartCollectionIdxKey,drilldownValue:r(s).drilldownValue}):p.createElement(Ee,{...e})))};et.displayName="ChartSeriesItem";const tt=e=>p.createElement(fe,{...e,_chartKey:"series"});tt.propTypes={children:function(e,t,r){return m(e,t,r,et)}},tt.displayName="ChartSeries";const rt=e=>p.createElement(Ee,{...e,_chartKey:"subtitle"});rt.displayName="ChartSubtitle";const st=e=>p.createElement(Ee,{...e,_chartKey:"title"});st.displayName="ChartTitle";const nt=e=>p.createElement(Ee,{visible:!0,...e,_chartKey:"tooltip"});nt.displayName="ChartTooltip";const at=e=>p.createElement(Ee,{...e});at.displayName="ChartValueAxisItem";const it=e=>p.createElement(fe,{...e,_chartKey:"valueAxis"});it.propTypes={children:function(e,t,r){return m(e,t,r,at)}},it.displayName="ChartValueAxis";const ot=e=>p.createElement(Ee,{...e});ot.displayName="ChartXAxisItem";const lt=e=>p.createElement(fe,{...e,_chartKey:"xAxis"});lt.prototype={children:function(e,t,r){return m(e,t,r,ot)}},lt.displayName="ChartXAxis";const ct=e=>p.createElement(Ee,{...e});ct.displayName="ChartYAxisItem";const ht=e=>p.createElement(fe,{...e,_chartKey:"yAxis"});ht.propTypes={children:function(e,t,r){return m(e,t,r,ct)}},ht.displayName="ChartYAxis";const pt=r.exact({left:r.number,top:r.number}),dt={left:r.number,right:r.number},ut={...dt,top:r.number,bottom:r.number},mt=r.oneOfType([r.number,r.exact(ut)]),yt=mt,gt=r.exact({width:r.number,color:r.string,opacity:r.number,dashType:r.string}),vt={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:yt,margin:r.exact(dt),border:gt,offset:pt},Ct={color:r.string,opacity:r.number,offset:pt,padding:r.number,width:r.number,focusHighlight:r.exact({border:gt})},bt={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:gt})},ft=r.exact({text:r.string,...vt}),xt=r.exact({id:r.oneOfType([r.string,r.number]).isRequired,label:ft.isRequired,...Ct}),Et=r.exact({sourceId:r.oneOfType([r.string,r.number]).isRequired,targetId:r.oneOfType([r.string,r.number]).isRequired,value:r.number.isRequired,...bt}),St={data:r.exact({nodes:r.arrayOf(xt.isRequired).isRequired,links:r.arrayOf(Et.isRequired).isRequired}).isRequired,links:r.exact(bt),nodes:r.exact(Ct),labels:r.exact(vt),legend:r.exact({align:r.oneOf(["start","center","end"]),background:r.string,border:gt,height:r.number,labels:r.object,margin:mt,offsetX:r.number,offsetY:r.number,orientation:r.oneOf(["vertical","horizontal"]),padding:yt,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:gt,color:r.string,font:r.string,margin:mt,padding:yt,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},It="sankey.tooltipUnitFormat",Nt={[It]:"({0} units)"},kt=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},_t={display:"flex",alignItems:"center"},wt=e=>p.createElement("div",{style:{width:15,height:15,backgroundColor:e.color,display:"inline-flex",marginLeft:3}}),Tt=e=>p.createElement("span",{style:{margin:"0 3px"}},e.children),At=e=>s.useInternationalization().format(s.useLocalization().toLanguageString(It,Nt[It]),[e||0]),Kt=e=>{const{color:t,label:r}=e.dataItem;return p.createElement("div",{style:_t,className:"k-tooltip-content"},p.createElement(wt,{color:t}),p.createElement(Tt,null,r.text),p.createElement(Tt,null,At(e.nodeValue)))},Ot=e=>{const{source:t,target:r,value:s}=e.dataItem,n="rtl"===e.dir?l.arrowLeftIcon:l.arrowRightIcon;return p.createElement("div",{style:_t},p.createElement(wt,{color:t.color}),p.createElement(Tt,null,t.label.text),p.createElement(a.IconWrap,{icon:n,name:n.name}),p.createElement(wt,{color:r.color}),p.createElement(Tt,null,r.label.text),p.createElement(Tt,null,At(s)))},Lt=12,Dt={offset:Lt,visible:!0},Rt=["nodeEnter","nodeLeave","linkEnter","linkLeave","nodeClick","linkClick"],Pt=p.forwardRef(((e,t)=>{const r=!a.validatePackage(he,{component:"Sankey"}),s=p.useRef(null),i=p.useRef(null),o=a.useRtl(s,e.dir,[e.dir,s.current]),l=p.useRef(null),c=a.useDocument(s),{data:h,links:d,nodes:u,labels:m,title:y,legend:g,tooltip:v=Dt,disableAutoLayout:C,disableKeyboardNavigation:b}=e,f=p.useRef();f.current=e;const[x,E]=p.useState(null),S=p.useCallback((e=>{const{visible:t,appendTo:r=c().body,offset:s=Lt,nodeComponent:n=Kt,linkComponent:a=Ot}={...Dt,...v};if(t){const t={appendTo:r,event:e,offset:s,dir:o,Content:"node"===e.targetType?n:a};E(t)}}),[v,o,c]),I=p.useCallback((()=>{E(null)}),[]),N=p.useCallback(((e,t)=>{const r=f.current[e];if(r){const e={...t,nativeEvent:t.originalEvent,target:l.current};r.call(void 0,e)}}),[]);return p.useEffect((()=>{const e={data:h,links:d,nodes:u,labels:m,title:y,legend:g,disableAutoLayout:C,disableKeyboardNavigation:b,rtl:"rtl"===o,tooltip:{...Dt,...v}};if(i.current)i.current.setOptions(e);else if(a.canUseDOM&&s.current){const t=n.sankeyTheme(s.current);i.current=new n.Sankey(s.current,e,t),((e,t)=>{e&&(e.unbind(),Rt.forEach((r=>{t[r]&&e.bind(r,t[r])})))})(i.current,{nodeEnter:e=>{N("onNodeEnter",e)},nodeLeave:e=>{N("onNodeLeave",e)},linkEnter:e=>{N("onLinkEnter",e)},linkLeave:e=>{N("onLinkLeave",e)},nodeClick:e=>{N("onNodeClick",e)},linkClick:e=>{N("onLinkClick",e)}}),i.current.bind("tooltipShow",S),i.current.bind("tooltipHide",I)}return()=>{i.current&&(i.current.destroy(),i.current=null)}}),[h,d,u,m,y,g,C,b,o,v,I,S,N]),p.useImperativeHandle(l,(()=>({get element(){return s.current},exportVisual:e=>i.current.exportVisual(e),props:e})),[]),p.useImperativeHandle(t,(()=>l.current)),p.createElement(p.Fragment,null,p.createElement("div",{ref:s,className:e.className,style:e.style,dir:o}),x&&p.createElement(kt,{...x}),r&&p.createElement(a.WatermarkOverlay,null))}));Pt.propTypes=St,Pt.displayName="KendoReactSankey";const Ft=n.createSankeyData;e.AxisLabelClickEvent=v,e.Chart=ye,e.ChartArea=We,e.ChartAxisDefaults=e=>p.createElement(Ee,{...e,_chartKey:"axisDefaults"}),e.ChartAxisDefaultsCrosshair=Oe,e.ChartAxisDefaultsCrosshairTooltip=Le,e.ChartAxisDefaultsLabels=Ke,e.ChartAxisDefaultsTitle=Ae,e.ChartBreadcrumb=Ie,e.ChartCategoryAxis=Ye,e.ChartCategoryAxisCrosshair=e=>p.createElement(Ee,{visible:!0,...e,_chartKey:"crosshair"}),e.ChartCategoryAxisCrosshairTooltip=e=>p.createElement(Ee,{visible:!0,...e,_chartKey:"tooltip"}),e.ChartCategoryAxisItem=Xe,e.ChartCategoryAxisLabels=e=>p.createElement(Ee,{visible:!0,...e,_chartKey:"labels"}),e.ChartCategoryAxisNotes=e=>p.createElement(Ee,{...e,_chartKey:"notes"}),e.ChartCategoryAxisNotesIcon=e=>p.createElement(Ee,{...e,_chartKey:"icon"}),e.ChartCategoryAxisNotesLabel=e=>p.createElement(Ee,{...e,_chartKey:"label"}),e.ChartCategoryAxisRangeLabels=e=>p.createElement(Ee,{visible:!0,...e,_chartKey:"rangeLabels"}),e.ChartCategoryAxisTitle=De,e.ChartLegend=$e,e.ChartLegendInactiveItems=Ve,e.ChartLegendItem=Pe,e.ChartLegendTitle=Fe,e.ChartNavigator=Ze,e.ChartNavigatorCategoryAxis=Ue,e.ChartNavigatorHint=e=>p.createElement(Ee,{...e,_chartKey:"hint"}),e.ChartNavigatorPane=ze,e.ChartNavigatorSelect=e=>p.createElement(Ee,{...e,_chartKey:"select"}),e.ChartNavigatorSeries=Be,e.ChartNavigatorSeriesItem=qe,e.ChartNoDataOverlay=Te,e.ChartPane=Ge,e.ChartPaneDefaults=Je,e.ChartPaneDefaultsTitle=Re,e.ChartPanes=Qe,e.ChartPlotArea=e=>p.createElement(Ee,{...e,_chartKey:"plotArea"}),e.ChartSeries=tt,e.ChartSeriesDefaults=e=>p.createElement(Ee,{...e,_chartKey:"seriesDefaults"}),e.ChartSeriesErrorBars=e=>p.createElement(Ee,{...e,_chartKey:"errorBars"}),e.ChartSeriesExtremes=e=>p.createElement(Ee,{...e,_chartKey:"extremes"}),e.ChartSeriesHighlight=e=>p.createElement(Ee,{...e,_chartKey:"highlight"}),e.ChartSeriesItem=et,e.ChartSeriesItemOutliers=e=>p.createElement(Ee,{...e,_chartKey:"outliers"}),e.ChartSeriesItemTooltip=e=>p.createElement(Ee,{...e,_chartKey:"tooltip"}),e.ChartSeriesLabels=e=>p.createElement(Ee,{visible:!0,...e,_chartKey:"labels"}),e.ChartSeriesLabelsFrom=e=>p.createElement(Ee,{...e,_chartKey:"from"}),e.ChartSeriesLabelsTo=e=>p.createElement(Ee,{...e,_chartKey:"to"}),e.ChartSeriesMarkers=e=>p.createElement(Ee,{...e,_chartKey:"markers"}),e.ChartSeriesNotes=e=>p.createElement(Ee,{...e,_chartKey:"notes"}),e.ChartSeriesNotesIcon=e=>p.createElement(Ee,{...e,_chartKey:"icon"}),e.ChartSeriesNotesLabel=e=>p.createElement(Ee,{...e,_chartKey:"label"}),e.ChartSubtitle=rt,e.ChartTitle=st,e.ChartTooltip=nt,e.ChartValueAxis=it,e.ChartValueAxisCrosshair=e=>p.createElement(Ee,{visible:!0,...e,_chartKey:"crosshair"}),e.ChartValueAxisCrosshairTooltip=e=>p.createElement(Ee,{visible:!0,...e,_chartKey:"tooltip"}),e.ChartValueAxisItem=at,e.ChartValueAxisLabels=e=>p.createElement(Ee,{visible:!0,...e,_chartKey:"labels"}),e.ChartValueAxisNotes=e=>p.createElement(Ee,{...e,_chartKey:"notes"}),e.ChartValueAxisNotesIcon=e=>p.createElement(Ee,{...e,_chartKey:"icon"}),e.ChartValueAxisNotesLabel=e=>p.createElement(Ee,{...e,_chartKey:"label"}),e.ChartValueAxisTitle=He,e.ChartXAxis=lt,e.ChartXAxisCrosshair=e=>p.createElement(Ee,{visible:!0,...e,_chartKey:"crosshair"}),e.ChartXAxisCrosshairTooltip=e=>p.createElement(Ee,{visible:!0,...e,_chartKey:"tooltip"}),e.ChartXAxisItem=ot,e.ChartXAxisLabels=e=>p.createElement(Ee,{visible:!0,...e,_chartKey:"labels"}),e.ChartXAxisNotes=e=>p.createElement(Ee,{...e,_chartKey:"notes"}),e.ChartXAxisNotesIcon=e=>p.createElement(Ee,{...e,_chartKey:"icon"}),e.ChartXAxisNotesLabel=e=>p.createElement(Ee,{...e,_chartKey:"label"}),e.ChartXAxisTitle=je,e.ChartYAxis=ht,e.ChartYAxisCrosshair=e=>p.createElement(Ee,{visible:!0,...e,_chartKey:"crosshair"}),e.ChartYAxisCrosshairTooltip=e=>p.createElement(Ee,{visible:!0,...e,_chartKey:"tooltip"}),e.ChartYAxisItem=ct,e.ChartYAxisLabels=e=>p.createElement(Ee,{visible:!0,...e,_chartKey:"labels"}),e.ChartYAxisNotes=e=>p.createElement(Ee,{...e,_chartKey:"notes"}),e.ChartYAxisNotesIcon=e=>p.createElement(Ee,{...e,_chartKey:"icon"}),e.ChartYAxisNotesLabel=e=>p.createElement(Ee,{...e,_chartKey:"label"}),e.ChartYAxisTitle=Me,e.ChartZoomable=e=>p.createElement(Ee,{...e,_chartKey:"zoomable"}),e.CollectionConfigurationComponent=fe,e.ConfigurationComponent=Ee,e.CrosshairTooltip=ne,e.CrosshairTooltipContainer=ce,e.DonutCenter=me,e.DragEndEvent=f,e.DragEvent=b,e.DragStartEvent=x,e.DrilldownEvent=E,e.DrilldownStateChangeEvent=Se,e.LegendItemClickEvent=I,e.LegendItemHoverEvent=S,e.NavigatorFilterEvent=N,e.NoteClickEvent=k,e.NoteHoverEvent=_,e.PlotAreaClickEvent=w,e.PlotAreaHoverEvent=T,e.RenderEvent=A,e.Sankey=Pt,e.SelectEndEvent=O,e.SelectEvent=K,e.SelectStartEvent=L,e.SeriesClickEvent=D,e.SeriesHoverEvent=R,e.SeriesTooltip=te,e.SharedTooltipContent=Y,e.Sparkline=ge,e.StockChart=Ce,e.TooltipPoint=X,e.TooltipPopup=Q,e.ZoomEndEvent=F,e.ZoomEvent=P,e.ZoomStartEvent=V,e.createSankeyData=Ft,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)}}));
|
|
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}},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}},_=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}},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}},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}},A=class extends g{constructor(e,t){super(t)}},K=class extends C{constructor(e,t){super(t),this.axis=e.axis,this.from=e.from,this.to=e.to}},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}},V=class extends C{constructor(e,t){super(t),this.axisRanges=e.axisRanges,this.nativeEvent=e.originalEvent}};const H={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:k,noteHover:_,plotAreaClick:w,plotAreaHover:T,render:A,select:K,selectEnd:O,selectStart:L,seriesClick:D,seriesHover:R,zoom:P,zoomEnd:F,zoomStart:V};let M=class{constructor(e,t){this.sender=e,this.syntheticEvent=t}};function j(e,t){return new M(e,t)}const U=e=>{let t,r,s=[];const n=n=>{t=e(t,n),a.canUseDOM&&(window.clearTimeout(r),r=window.setTimeout((()=>s.forEach((e=>e()))),16.666666666666668))};return n({}),{getState:()=>t,dispatch:n,subscribe:e=>(s.push(e),()=>s=s.filter((t=>t!==e)))}},z=(e,t)=>t.chartCollectionIdxKey?W.collectionConfigurationItem(e,t):t.chartKey?W.configurationItem(e,t):{},q=(e,t)=>{if(!t.type)return{};switch(t.type){case"set":return W.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}},W={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 X=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 Y=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",{dangerouslySetInnerHTML:{__html:e.formattedValue}}))))))},$=p.createContext(null);$.displayName="ChartContext";const Z={horizontal:"fit",vertical:"fit"},G="k-chart-tooltip",J=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=j(this,e);this.context.childrenObserver.trigger("onMouseLeave",t)&&e.preventDefault()},this.popupRef=e=>{this.element=e;const t=e&&e.closest(".k-animation-container");t&&(t.style.transition="initial")},this.chartObserver=new n.InstanceObserver(this,{onMouseLeave:"onChartMouseLeave"})}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=[G,a].join(" ").trim();return p.createElement(i.Popup,{animate:!1,popupAlign:t,offset:r,show:e,collision:Z,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})}};J.contextType=$;let Q=J;const ee=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(Y,{...e});const s=e.point,n=this.findRenderFunctionByIndex(s.series.index);return null!==n?n(e):null!==r?r(e):p.createElement("span",{dangerouslySetInnerHTML:{__html:e.point.formattedValue}})}:Function.prototype,i=a.classNames({"k-chart-shared-tooltip":t,"k-chart-tooltip-inverse":!!r});return p.createElement(Q,{...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 X(t,e.format)))}}createTooltipContext(e){const{point:t,format:r}=e;return{point:new X(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}};ee.contextType=$;let te=ee;const re=e=>e.children;re.displayName="Container";const se=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({"k-chart-crosshair-tooltip":!0,"k-chart-tooltip-inverse":!!t});return p.createElement(Q,{...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})}};se.contextType=$;let ne=se;const ae=["categoryAxis","valueAxis","xAxis","yAxis"];function ie(e){const t={};for(let r=0;r<ae.length;r++){const s=oe(e,ae[r]);for(let e=0;e<s.length;e++){const r=s[e];t[r.name+r.index]=r}}return t}function oe(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 le=class extends p.Component{constructor(){super(...arguments),this.context=null,this.state={tooltips:{}},this.storeUnsubscriber=Function.prototype,this.subscriber=()=>{var e;this.setState({tooltips:ie(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(ne,{...e[t],key:t})));return p.createElement(re,null,t)}componentWillUnmount(){this.storeUnsubscriber()}};le.contextType=$;let ce=le;const he={name:"@progress/kendo-react-charts",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:0,version:"10.2.0-develop.4",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"},pe=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=j(this,e);this.triggerDomEvent("onMouseLeave",t)?e.preventDefault():null!==this.chartInstance&&this.chartInstance.hideElements()},this.onChildMouseLeave=e=>{const{syntheticEvent:t}=e;return this.chartInstance&&!u(t.relatedTarget,this.element)&&this.chartInstance.hideElements(),!1},this.showLicenseWatermark=!a.validatePackage(he,{component:"Chart"}),this.optionsStore=U(z),this.observersStore=U(B),this.childrenObserver=new n.InstanceObserver(this,{onMouseLeave:"onChildMouseLeave"}),this.state={optionsStore:this.optionsStore,observersStore:this.observersStore,childrenObserver:this.childrenObserver,drilldownState:{steps:[]}},this.themeStore=U(q),this.chartObserver=new n.InstanceObserver(this,{render:"onRender",legendItemClick:"onLegendItemClick",drilldown:"onDrilldown"})}get element(){return this._element}static getDerivedStateFromProps(e,t){return{...t,drilldownState:e.drilldownState||[]}}componentDidMount(){if(this._element){let e={};try{e=n.chartTheme(this._element)}catch{}const t=n.deepExtend(n.chartBaseTheme(),e);this.themeStore.dispatch({type:"push",payload:t}),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,null)));return p.createElement($.Provider,{value:this.state},p.createElement(te,{key:"seriesTooltip"}),p.createElement(ce,{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,deriveOptionsFromParent:c}=this.props;let h={};return void 0!==e&&(h.renderAs=e),void 0!==t&&(h.pannable=t),void 0!==r&&(h.zoomable=r),void 0!==s&&(h.paneDefaults=s),void 0!==n&&(h.panes=n),void 0!==a&&(h.transitions=a),void 0!==i&&(h.seriesColors=i),void 0!==o&&(h.seriesDefaults=o),void 0!==l&&(h.axisDefaults=l),h=Object.assign(h,this.optionsStore.getState()),c&&(h=c(h)),h}refresh(){if(null!==this.chartInstance){const e=this.themeStore.getState(),t=this.getChartOptions(),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(H[e])return new H[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}};pe.propTypes={dir:r.string,renderAs:r.oneOf(["svg","canvas"])},pe.defaultProps={renderAs:"svg"};let de=pe;s.registerForIntl(de);const ue=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}})}};ue.contextType=$;let me=ue,ye=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(de,{...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(me,{render:e}))}},ge=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(de,{...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 ve={autoBindElements:!0,liveDrag:!1,partialRedraw:!0};let Ce=class extends p.Component{constructor(){super(...arguments),this._baseChart=null,this.deriveOptionsFromParent=e=>{const t=Object.assign({},e.navigator||{},ve);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(de,{...r,ref:e=>{this._baseChart=e},chartConstructor:n.StockChart,getTarget:this.getTarget,wrapper:"div",deriveOptionsFromParent:this.deriveOptionsFromParent,onRefresh:this.onRefresh,className:a.classNames("k-stockchart k-widget",t)},e)}};const be=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))}};be.contextType=$;let fe=be;const xe=class extends p.Component{get optionsStore(){var e;return null==(e=this.context)?void 0:e.optionsStore}constructor(e){super(e),this.childStore=U(z)}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)}};xe.contextType=$;let Ee=xe,Se=class{constructor(e){this.currentState=e.currentState,this.nextState=e.nextState}};const Ie=p.forwardRef(((e,t)=>{const r=p.useRef(null),s=p.useRef(null),n={valueField:ke.valueField,textField:ke.textField,iconField:ke.iconField,iconClassField:ke.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 Se({currentState:e.drilldownState,nextState:a});e[s].call(void 0,o)}}}))})),Ne={id:r.string,style:r.object,className:r.string,breadcrumbOrderedList:r.elementType,breadcrumbListItem:r.elementType,breadcrumbDelimiter:r.elementType,breadcrumbLink:r.elementType,dir:r.oneOf(["ltr","rtl"]),disabled:r.bool,valueField:r.string,textField:r.string,iconField:r.string,iconClassField:r.string,onItemSelect:r.func,ariaLabel:r.string,onDrilldownStateChange:r.func,drilldownState:r.shape({steps:r.array}),rootItem:r.object},ke={valueField:"id",textField:"text",iconField:"icon",iconClassField:"iconClass",data:[]};Ie.displayName="KendoReactChartBreadcrumb",Ie.propTypes=Ne;const _e="charts.nodata",we={[_e]:"No data available."},Te=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(_e,we[_e]):e.children))};Te.displayName="ChartNoDataOverlay";const Ae=e=>p.createElement(Ee,{...e,_chartKey:"title"});Ae.displayName="ChartAxisDefaultsTitle";const Ke=e=>p.createElement(Ee,{...e,_chartKey:"labels"});Ke.displayName="ChartAxisDefaultsLabels";const Oe=e=>p.createElement(Ee,{visible:!0,...e,_chartKey:"crosshair"});Oe.displayName="ChartAxisDefaultsCrosshair";const Le=e=>p.createElement(Ee,{visible:!0,...e,_chartKey:"tooltip"});Le.displayName="ChartAxisDefaultsCrosshairTooltip";const De=e=>p.createElement(Ee,{...e,_chartKey:"title"});De.displayName="ChartCategoryAxisTitle";const Re=e=>p.createElement(Ee,{...e,_chartKey:"title"});Re.displayName="ChartPaneDefaultsTitle";const Pe=e=>p.createElement(Ee,{...e,_chartKey:"item"});Pe.displayName="ChartLegendItem";const Fe=e=>p.createElement(Ee,{...e,_chartKey:"title"});Fe.displayName="ChartLegendTitle";const Ve=e=>p.createElement(Ee,{...e,_chartKey:"inactiveItems"});Ve.displayName="ChartLegendInactiveItems";const He=e=>p.createElement(Ee,{...e,_chartKey:"title"});He.displayName="ChartValueAxisTitle";const Me=e=>p.createElement(Ee,{...e,_chartKey:"title"});Me.displayName="ChartXAxisTitle";const je=e=>p.createElement(Ee,{...e,_chartKey:"title"});je.displayName="ChartYAxisTitle";const Ue=e=>p.createElement(Ee,{...e,_chartKey:"categoryAxis"});Ue.displayName="ChartNavigatorCategoryAxis";const ze=e=>p.createElement(Ee,{...e,_chartKey:"pane"});ze.displayName="ChartNavigatorPane";const qe=e=>p.createElement(Ee,{...e});qe.displayName="ChartNavigatorSeriesItem";const Be=e=>p.createElement(fe,{...e,_chartKey:"series"});Be.propTypes={children:function(e,t,r){return m(e,t,r,qe)}};const We=e=>p.createElement(Ee,{...e,_chartKey:"chartArea"});We.displayName="ChartArea";const Xe=e=>p.createElement(Ee,{...e});Xe.displayName="ChartCategoryAxisItem";const Ye=e=>p.createElement(fe,{...e,_chartKey:"categoryAxis"});Ye.propTypes={children:function(e,t,r){return m(e,t,r,Xe)}},Ye.displayName="ChartCategoryAxis";const $e=e=>p.createElement(Ee,{visible:!0,...e,_chartKey:"legend"});$e.displayName="ChartLegend";const Ze=e=>p.createElement(Ee,{visible:!0,position:"bottom",...e,_chartKey:"navigator"});Ze.displayName="ChartNavigator";const Ge=e=>p.createElement(Ee,{...e});Ge.displayName="ChartPane";const Je=e=>p.createElement(Ee,{...e,_chartKey:"paneDefaults"});Je.displayName="ChartPaneDefaults";const Qe=e=>p.createElement(fe,{...e,_chartKey:"panes"});Qe.propTypes={children:function(e,t,r){return m(e,t,r,Ge)}};const et=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($.Consumer,null,(s=>r(s)?p.createElement(t,{_chartCollectionIdxKey:e._chartCollectionIdxKey,drilldownValue:r(s).drilldownValue}):p.createElement(Ee,{...e})))};et.displayName="ChartSeriesItem";const tt=e=>p.createElement(fe,{...e,_chartKey:"series"});tt.propTypes={children:function(e,t,r){return m(e,t,r,et)}},tt.displayName="ChartSeries";const rt=e=>p.createElement(Ee,{...e,_chartKey:"subtitle"});rt.displayName="ChartSubtitle";const st=e=>p.createElement(Ee,{...e,_chartKey:"title"});st.displayName="ChartTitle";const nt=e=>p.createElement(Ee,{visible:!0,...e,_chartKey:"tooltip"});nt.displayName="ChartTooltip";const at=e=>p.createElement(Ee,{...e});at.displayName="ChartValueAxisItem";const it=e=>p.createElement(fe,{...e,_chartKey:"valueAxis"});it.propTypes={children:function(e,t,r){return m(e,t,r,at)}},it.displayName="ChartValueAxis";const ot=e=>p.createElement(Ee,{...e});ot.displayName="ChartXAxisItem";const lt=e=>p.createElement(fe,{...e,_chartKey:"xAxis"});lt.prototype={children:function(e,t,r){return m(e,t,r,ot)}},lt.displayName="ChartXAxis";const ct=e=>p.createElement(Ee,{...e});ct.displayName="ChartYAxisItem";const ht=e=>p.createElement(fe,{...e,_chartKey:"yAxis"});ht.propTypes={children:function(e,t,r){return m(e,t,r,ct)}},ht.displayName="ChartYAxis";const pt=r.exact({left:r.number,top:r.number}),dt={left:r.number,right:r.number},ut={...dt,top:r.number,bottom:r.number},mt=r.oneOfType([r.number,r.exact(ut)]),yt=mt,gt=r.exact({width:r.number,color:r.string,opacity:r.number,dashType:r.string}),vt={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:yt,margin:r.exact(dt),border:gt,offset:pt},Ct={color:r.string,opacity:r.number,offset:pt,padding:r.number,width:r.number,focusHighlight:r.exact({border:gt})},bt={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:gt})},ft=r.exact({text:r.string,...vt}),xt=r.exact({id:r.oneOfType([r.string,r.number]).isRequired,label:ft.isRequired,...Ct}),Et=r.exact({sourceId:r.oneOfType([r.string,r.number]).isRequired,targetId:r.oneOfType([r.string,r.number]).isRequired,value:r.number.isRequired,...bt}),St={data:r.exact({nodes:r.arrayOf(xt.isRequired).isRequired,links:r.arrayOf(Et.isRequired).isRequired}).isRequired,links:r.exact(bt),nodes:r.exact(Ct),labels:r.exact(vt),legend:r.exact({align:r.oneOf(["start","center","end"]),background:r.string,border:gt,height:r.number,labels:r.object,margin:mt,offsetX:r.number,offsetY:r.number,orientation:r.oneOf(["vertical","horizontal"]),padding:yt,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:gt,color:r.string,font:r.string,margin:mt,padding:yt,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},It="sankey.tooltipUnitFormat",Nt={[It]:"({0} units)"},kt=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},_t={display:"flex",alignItems:"center"},wt=e=>p.createElement("div",{style:{width:15,height:15,backgroundColor:e.color,display:"inline-flex",marginLeft:3}}),Tt=e=>p.createElement("span",{style:{margin:"0 3px"}},e.children),At=e=>s.useInternationalization().format(s.useLocalization().toLanguageString(It,Nt[It]),[e||0]),Kt=e=>{const{color:t,label:r}=e.dataItem;return p.createElement("div",{style:_t,className:"k-tooltip-content"},p.createElement(wt,{color:t}),p.createElement(Tt,null,r.text),p.createElement(Tt,null,At(e.nodeValue)))},Ot=e=>{const{source:t,target:r,value:s}=e.dataItem,n="rtl"===e.dir?l.arrowLeftIcon:l.arrowRightIcon;return p.createElement("div",{style:_t},p.createElement(wt,{color:t.color}),p.createElement(Tt,null,t.label.text),p.createElement(a.IconWrap,{icon:n,name:n.name}),p.createElement(wt,{color:r.color}),p.createElement(Tt,null,r.label.text),p.createElement(Tt,null,At(s)))},Lt=12,Dt={offset:Lt,visible:!0},Rt=["nodeEnter","nodeLeave","linkEnter","linkLeave","nodeClick","linkClick"],Pt=p.forwardRef(((e,t)=>{const r=!a.validatePackage(he,{component:"Sankey"}),s=p.useRef(null),i=p.useRef(null),o=a.useRtl(s,e.dir,[e.dir,s.current]),l=p.useRef(null),c=a.useDocument(s),{data:h,links:d,nodes:u,labels:m,title:y,legend:g,tooltip:v=Dt,disableAutoLayout:C,disableKeyboardNavigation:b}=e,f=p.useRef(void 0);f.current=e;const[x,E]=p.useState(null),S=p.useCallback((e=>{const{visible:t,appendTo:r=c().body,offset:s=Lt,nodeComponent:n=Kt,linkComponent:a=Ot}={...Dt,...v};if(t){const t={appendTo:r,event:e,offset:s,dir:o,Content:"node"===e.targetType?n:a};E(t)}}),[v,o,c]),I=p.useCallback((()=>{E(null)}),[]),N=p.useCallback(((e,t)=>{const r=f.current[e];if(r){const e={...t,nativeEvent:t.originalEvent,target:l.current};r.call(void 0,e)}}),[]);return p.useEffect((()=>{const e={data:h,links:d,nodes:u,labels:m,title:y,legend:g,disableAutoLayout:C,disableKeyboardNavigation:b,rtl:"rtl"===o,tooltip:{...Dt,...v}};if(i.current)i.current.setOptions(e);else if(a.canUseDOM&&s.current){const t=n.sankeyTheme(s.current);i.current=new n.Sankey(s.current,e,t),((e,t)=>{e&&(e.unbind(),Rt.forEach((r=>{t[r]&&e.bind(r,t[r])})))})(i.current,{nodeEnter:e=>{N("onNodeEnter",e)},nodeLeave:e=>{N("onNodeLeave",e)},linkEnter:e=>{N("onLinkEnter",e)},linkLeave:e=>{N("onLinkLeave",e)},nodeClick:e=>{N("onNodeClick",e)},linkClick:e=>{N("onLinkClick",e)}}),i.current.bind("tooltipShow",S),i.current.bind("tooltipHide",I)}return()=>{i.current&&(i.current.destroy(),i.current=null)}}),[h,d,u,m,y,g,C,b,o,v,I,S,N]),p.useImperativeHandle(l,(()=>({get element(){return s.current},exportVisual:e=>i.current.exportVisual(e),props:e})),[]),p.useImperativeHandle(t,(()=>l.current)),p.createElement(p.Fragment,null,p.createElement("div",{ref:s,className:e.className,style:e.style,dir:o}),x&&p.createElement(kt,{...x}),r&&p.createElement(a.WatermarkOverlay,null))}));Pt.propTypes=St,Pt.displayName="KendoReactSankey";const Ft=n.createSankeyData;e.AxisLabelClickEvent=v,e.Chart=ye,e.ChartArea=We,e.ChartAxisDefaults=e=>p.createElement(Ee,{...e,_chartKey:"axisDefaults"}),e.ChartAxisDefaultsCrosshair=Oe,e.ChartAxisDefaultsCrosshairTooltip=Le,e.ChartAxisDefaultsLabels=Ke,e.ChartAxisDefaultsTitle=Ae,e.ChartBreadcrumb=Ie,e.ChartCategoryAxis=Ye,e.ChartCategoryAxisCrosshair=e=>p.createElement(Ee,{visible:!0,...e,_chartKey:"crosshair"}),e.ChartCategoryAxisCrosshairTooltip=e=>p.createElement(Ee,{visible:!0,...e,_chartKey:"tooltip"}),e.ChartCategoryAxisItem=Xe,e.ChartCategoryAxisLabels=e=>p.createElement(Ee,{visible:!0,...e,_chartKey:"labels"}),e.ChartCategoryAxisNotes=e=>p.createElement(Ee,{...e,_chartKey:"notes"}),e.ChartCategoryAxisNotesIcon=e=>p.createElement(Ee,{...e,_chartKey:"icon"}),e.ChartCategoryAxisNotesLabel=e=>p.createElement(Ee,{...e,_chartKey:"label"}),e.ChartCategoryAxisRangeLabels=e=>p.createElement(Ee,{visible:!0,...e,_chartKey:"rangeLabels"}),e.ChartCategoryAxisTitle=De,e.ChartLegend=$e,e.ChartLegendInactiveItems=Ve,e.ChartLegendItem=Pe,e.ChartLegendTitle=Fe,e.ChartNavigator=Ze,e.ChartNavigatorCategoryAxis=Ue,e.ChartNavigatorHint=e=>p.createElement(Ee,{...e,_chartKey:"hint"}),e.ChartNavigatorPane=ze,e.ChartNavigatorSelect=e=>p.createElement(Ee,{...e,_chartKey:"select"}),e.ChartNavigatorSeries=Be,e.ChartNavigatorSeriesItem=qe,e.ChartNoDataOverlay=Te,e.ChartPane=Ge,e.ChartPaneDefaults=Je,e.ChartPaneDefaultsTitle=Re,e.ChartPanes=Qe,e.ChartPlotArea=e=>p.createElement(Ee,{...e,_chartKey:"plotArea"}),e.ChartSeries=tt,e.ChartSeriesDefaults=e=>p.createElement(Ee,{...e,_chartKey:"seriesDefaults"}),e.ChartSeriesErrorBars=e=>p.createElement(Ee,{...e,_chartKey:"errorBars"}),e.ChartSeriesExtremes=e=>p.createElement(Ee,{...e,_chartKey:"extremes"}),e.ChartSeriesHighlight=e=>p.createElement(Ee,{...e,_chartKey:"highlight"}),e.ChartSeriesItem=et,e.ChartSeriesItemOutliers=e=>p.createElement(Ee,{...e,_chartKey:"outliers"}),e.ChartSeriesItemTooltip=e=>p.createElement(Ee,{...e,_chartKey:"tooltip"}),e.ChartSeriesLabels=e=>p.createElement(Ee,{visible:!0,...e,_chartKey:"labels"}),e.ChartSeriesLabelsFrom=e=>p.createElement(Ee,{...e,_chartKey:"from"}),e.ChartSeriesLabelsTo=e=>p.createElement(Ee,{...e,_chartKey:"to"}),e.ChartSeriesMarkers=e=>p.createElement(Ee,{...e,_chartKey:"markers"}),e.ChartSeriesNotes=e=>p.createElement(Ee,{...e,_chartKey:"notes"}),e.ChartSeriesNotesIcon=e=>p.createElement(Ee,{...e,_chartKey:"icon"}),e.ChartSeriesNotesLabel=e=>p.createElement(Ee,{...e,_chartKey:"label"}),e.ChartSubtitle=rt,e.ChartTitle=st,e.ChartTooltip=nt,e.ChartValueAxis=it,e.ChartValueAxisCrosshair=e=>p.createElement(Ee,{visible:!0,...e,_chartKey:"crosshair"}),e.ChartValueAxisCrosshairTooltip=e=>p.createElement(Ee,{visible:!0,...e,_chartKey:"tooltip"}),e.ChartValueAxisItem=at,e.ChartValueAxisLabels=e=>p.createElement(Ee,{visible:!0,...e,_chartKey:"labels"}),e.ChartValueAxisNotes=e=>p.createElement(Ee,{...e,_chartKey:"notes"}),e.ChartValueAxisNotesIcon=e=>p.createElement(Ee,{...e,_chartKey:"icon"}),e.ChartValueAxisNotesLabel=e=>p.createElement(Ee,{...e,_chartKey:"label"}),e.ChartValueAxisTitle=He,e.ChartXAxis=lt,e.ChartXAxisCrosshair=e=>p.createElement(Ee,{visible:!0,...e,_chartKey:"crosshair"}),e.ChartXAxisCrosshairTooltip=e=>p.createElement(Ee,{visible:!0,...e,_chartKey:"tooltip"}),e.ChartXAxisItem=ot,e.ChartXAxisLabels=e=>p.createElement(Ee,{visible:!0,...e,_chartKey:"labels"}),e.ChartXAxisNotes=e=>p.createElement(Ee,{...e,_chartKey:"notes"}),e.ChartXAxisNotesIcon=e=>p.createElement(Ee,{...e,_chartKey:"icon"}),e.ChartXAxisNotesLabel=e=>p.createElement(Ee,{...e,_chartKey:"label"}),e.ChartXAxisTitle=Me,e.ChartYAxis=ht,e.ChartYAxisCrosshair=e=>p.createElement(Ee,{visible:!0,...e,_chartKey:"crosshair"}),e.ChartYAxisCrosshairTooltip=e=>p.createElement(Ee,{visible:!0,...e,_chartKey:"tooltip"}),e.ChartYAxisItem=ct,e.ChartYAxisLabels=e=>p.createElement(Ee,{visible:!0,...e,_chartKey:"labels"}),e.ChartYAxisNotes=e=>p.createElement(Ee,{...e,_chartKey:"notes"}),e.ChartYAxisNotesIcon=e=>p.createElement(Ee,{...e,_chartKey:"icon"}),e.ChartYAxisNotesLabel=e=>p.createElement(Ee,{...e,_chartKey:"label"}),e.ChartYAxisTitle=je,e.ChartZoomable=e=>p.createElement(Ee,{...e,_chartKey:"zoomable"}),e.CollectionConfigurationComponent=fe,e.ConfigurationComponent=Ee,e.CrosshairTooltip=ne,e.CrosshairTooltipContainer=ce,e.DonutCenter=me,e.DragEndEvent=f,e.DragEvent=b,e.DragStartEvent=x,e.DrilldownEvent=E,e.DrilldownStateChangeEvent=Se,e.LegendItemClickEvent=I,e.LegendItemHoverEvent=S,e.NavigatorFilterEvent=N,e.NoteClickEvent=k,e.NoteHoverEvent=_,e.PlotAreaClickEvent=w,e.PlotAreaHoverEvent=T,e.RenderEvent=A,e.Sankey=Pt,e.SelectEndEvent=O,e.SelectEvent=K,e.SelectStartEvent=L,e.SeriesClickEvent=D,e.SeriesHoverEvent=R,e.SeriesTooltip=te,e.SharedTooltipContent=Y,e.Sparkline=ge,e.StockChart=Ce,e.TooltipPoint=X,e.TooltipPopup=Q,e.ZoomEndEvent=F,e.ZoomEvent=P,e.ZoomStartEvent=V,e.createSankeyData=Ft,e.exportVisual=(e,t={})=>{if(e&&null!==e.chartInstance)return e.chartInstance.exportVisual(t)},e.findAxisByName=(e,t)=>{if(e&&null!==e.chartInstance)return e.chartInstance.findAxisByName(t)},e.findPaneByIndex=(e,t)=>{if(e&&null!==e.chartInstance)return e.chartInstance.findPaneByIndex(t)},e.findPaneByName=(e,t)=>{if(e&&null!==e.chartInstance)return e.chartInstance.findPaneByName(t)}}));
|
package/index.d.mts
CHANGED
|
@@ -9,7 +9,7 @@ import { Align } from '@progress/kendo-react-popup';
|
|
|
9
9
|
import { BaseEvent as BaseEvent_2 } from '@progress/kendo-react-common';
|
|
10
10
|
import { BreadcrumbProps } from '@progress/kendo-react-layout';
|
|
11
11
|
import { ChartContextType } from '../../ChartContext';
|
|
12
|
-
import { ChartContextType as
|
|
12
|
+
import { ChartContextType as ChartContextType_3 } from './ChartContext';
|
|
13
13
|
import { ChartContextType as ChartContextType_4 } from '../ChartContext';
|
|
14
14
|
import { createSankeyData as createSankeyData_2 } from '@progress/kendo-charts';
|
|
15
15
|
import { CrosshatchPattern } from '@progress/kendo-charts';
|
|
@@ -24,7 +24,7 @@ import { geometry } from '@progress/kendo-drawing';
|
|
|
24
24
|
import { GridPattern } from '@progress/kendo-charts';
|
|
25
25
|
import { Group } from '@progress/kendo-drawing';
|
|
26
26
|
import { InstanceObserver } from '@progress/kendo-charts';
|
|
27
|
-
import { JSX
|
|
27
|
+
import { JSX } from 'react/jsx-runtime';
|
|
28
28
|
import { MultiPath } from '@progress/kendo-drawing';
|
|
29
29
|
import { Offset } from '@progress/kendo-react-popup';
|
|
30
30
|
import * as React_2 from 'react';
|
|
@@ -45,6 +45,8 @@ import { SankeyOptions } from '@progress/kendo-charts';
|
|
|
45
45
|
import { SankeyTooltip as SankeyTooltip_2 } from '@progress/kendo-charts';
|
|
46
46
|
import { SankeyTooltipEvent } from '@progress/kendo-charts';
|
|
47
47
|
import { SeriesPattern } from '@progress/kendo-charts';
|
|
48
|
+
import { Store as Store_2 } from '../../store/store';
|
|
49
|
+
import { Store as Store_3 } from './../../store/store';
|
|
48
50
|
import { Surface } from '@progress/kendo-drawing';
|
|
49
51
|
import { VerticalStripesPattern } from '@progress/kendo-charts';
|
|
50
52
|
|
|
@@ -1710,12 +1712,12 @@ export declare interface ChartCategoryAxisTitleProps extends CategoryAxisTitle {
|
|
|
1710
1712
|
/**
|
|
1711
1713
|
* @hidden
|
|
1712
1714
|
*/
|
|
1713
|
-
declare const ChartContext: React_2.Context<
|
|
1715
|
+
declare const ChartContext: React_2.Context<ChartContextType_2 | null>;
|
|
1714
1716
|
|
|
1715
1717
|
/**
|
|
1716
1718
|
* @hidden
|
|
1717
1719
|
*/
|
|
1718
|
-
declare interface
|
|
1720
|
+
declare interface ChartContextType_2 {
|
|
1719
1721
|
optionsStore: Store;
|
|
1720
1722
|
observersStore: Store;
|
|
1721
1723
|
childrenObserver: InstanceObserver;
|
|
@@ -2639,8 +2641,8 @@ export declare interface ChartZoomableProps extends Zoomable {
|
|
|
2639
2641
|
*/
|
|
2640
2642
|
export declare class CollectionConfigurationComponent extends React_2.Component<CollectionConfigurationProps> {
|
|
2641
2643
|
static contextType: React_2.Context<ChartContextType | null>;
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
+
context: React_2.ContextType<typeof ChartContext>;
|
|
2645
|
+
get optionsStore(): Store_2 | undefined;
|
|
2644
2646
|
renderChildren(child: any, index: number): React_2.DetailedReactHTMLElement<any, HTMLElement>;
|
|
2645
2647
|
render(): any;
|
|
2646
2648
|
}
|
|
@@ -2659,9 +2661,10 @@ declare interface CollectionConfigurationProps {
|
|
|
2659
2661
|
*/
|
|
2660
2662
|
export declare class ConfigurationComponent extends React_2.Component<ConfigurationComponentProps> {
|
|
2661
2663
|
static contextType: React_2.Context<ChartContextType | null>;
|
|
2662
|
-
|
|
2664
|
+
context: React_2.ContextType<typeof ChartContext>;
|
|
2663
2665
|
childStore: any;
|
|
2664
|
-
|
|
2666
|
+
get optionsStore(): Store_3 | undefined;
|
|
2667
|
+
constructor(props: any);
|
|
2665
2668
|
render(): any;
|
|
2666
2669
|
componentDidMount(): void;
|
|
2667
2670
|
componentDidUpdate(): void;
|
|
@@ -2692,8 +2695,9 @@ export declare class CrosshairTooltip extends React_2.Component<CrosshairTooltip
|
|
|
2692
2695
|
context: React_2.ContextType<typeof ChartContext>;
|
|
2693
2696
|
readonly state: CrosshairTooltipState;
|
|
2694
2697
|
chartObserver: InstanceObserver;
|
|
2695
|
-
constructor(props: any
|
|
2696
|
-
|
|
2698
|
+
constructor(props: any);
|
|
2699
|
+
componentDidMount(): void;
|
|
2700
|
+
render(): JSX.Element;
|
|
2697
2701
|
componentWillUnmount(): void;
|
|
2698
2702
|
onShowTooltip(e: any): void;
|
|
2699
2703
|
onHideTooltip(): void;
|
|
@@ -2708,7 +2712,7 @@ export declare class CrosshairTooltipContainer extends React_2.Component<{}, Cro
|
|
|
2708
2712
|
readonly state: CrosshairTooltipContainerState;
|
|
2709
2713
|
private storeUnsubscriber;
|
|
2710
2714
|
componentDidMount(): void;
|
|
2711
|
-
render():
|
|
2715
|
+
render(): JSX.Element;
|
|
2712
2716
|
componentWillUnmount(): void;
|
|
2713
2717
|
subscriber: () => void;
|
|
2714
2718
|
}
|
|
@@ -2835,11 +2839,12 @@ declare class DomEvent<T> {
|
|
|
2835
2839
|
* @hidden
|
|
2836
2840
|
*/
|
|
2837
2841
|
export declare class DonutCenter extends React_2.Component<DonutCenterProps, DonutCenterState> {
|
|
2838
|
-
static contextType: React_2.Context<
|
|
2842
|
+
static contextType: React_2.Context<ChartContextType_3 | null>;
|
|
2839
2843
|
context: React_2.ContextType<typeof ChartContext>;
|
|
2840
2844
|
readonly state: DonutCenterState;
|
|
2841
2845
|
chartObserver: InstanceObserver;
|
|
2842
|
-
constructor(props: DonutCenterProps
|
|
2846
|
+
constructor(props: DonutCenterProps);
|
|
2847
|
+
componentDidMount(): void;
|
|
2843
2848
|
render(): any;
|
|
2844
2849
|
onRender(event: any): void;
|
|
2845
2850
|
}
|
|
@@ -6615,7 +6620,7 @@ export declare class SeriesTooltip extends React_2.Component<{}, SeriesTooltipSt
|
|
|
6615
6620
|
readonly state: SeriesTooltipState;
|
|
6616
6621
|
chartObserver: InstanceObserver | null;
|
|
6617
6622
|
componentDidMount(): void;
|
|
6618
|
-
render():
|
|
6623
|
+
render(): JSX.Element;
|
|
6619
6624
|
componentWillUnmount(): void;
|
|
6620
6625
|
onShowTooltip(e: any): void;
|
|
6621
6626
|
onHideTooltip(): void;
|
|
@@ -6858,7 +6863,7 @@ export declare interface SeriesVisualArgs {
|
|
|
6858
6863
|
/**
|
|
6859
6864
|
* @hidden
|
|
6860
6865
|
*/
|
|
6861
|
-
export declare const SharedTooltipContent: (props: SharedTooltipProps) =>
|
|
6866
|
+
export declare const SharedTooltipContent: (props: SharedTooltipProps) => JSX.Element;
|
|
6862
6867
|
|
|
6863
6868
|
export declare interface SharedTooltipContext {
|
|
6864
6869
|
categoryText?: string;
|
|
@@ -7364,8 +7369,9 @@ export declare class TooltipPopup extends React_2.Component<TooltipPopupProps, {
|
|
|
7364
7369
|
context: React_2.ContextType<typeof ChartContext>;
|
|
7365
7370
|
chartObserver: InstanceObserver;
|
|
7366
7371
|
element: HTMLDivElement | null;
|
|
7367
|
-
constructor(props: TooltipPopupProps
|
|
7368
|
-
|
|
7372
|
+
constructor(props: TooltipPopupProps);
|
|
7373
|
+
componentDidMount(): void;
|
|
7374
|
+
render(): JSX.Element;
|
|
7369
7375
|
componentWillUnmount(): void;
|
|
7370
7376
|
onChartMouseLeave: (e: DomEvent<React_2.MouseEvent<HTMLDivElement>>) => boolean;
|
|
7371
7377
|
onMouseLeave: (e: React_2.MouseEvent<HTMLDivElement>) => void;
|
package/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { Align } from '@progress/kendo-react-popup';
|
|
|
9
9
|
import { BaseEvent as BaseEvent_2 } from '@progress/kendo-react-common';
|
|
10
10
|
import { BreadcrumbProps } from '@progress/kendo-react-layout';
|
|
11
11
|
import { ChartContextType } from '../../ChartContext';
|
|
12
|
-
import { ChartContextType as
|
|
12
|
+
import { ChartContextType as ChartContextType_3 } from './ChartContext';
|
|
13
13
|
import { ChartContextType as ChartContextType_4 } from '../ChartContext';
|
|
14
14
|
import { createSankeyData as createSankeyData_2 } from '@progress/kendo-charts';
|
|
15
15
|
import { CrosshatchPattern } from '@progress/kendo-charts';
|
|
@@ -24,7 +24,7 @@ import { geometry } from '@progress/kendo-drawing';
|
|
|
24
24
|
import { GridPattern } from '@progress/kendo-charts';
|
|
25
25
|
import { Group } from '@progress/kendo-drawing';
|
|
26
26
|
import { InstanceObserver } from '@progress/kendo-charts';
|
|
27
|
-
import { JSX
|
|
27
|
+
import { JSX } from 'react/jsx-runtime';
|
|
28
28
|
import { MultiPath } from '@progress/kendo-drawing';
|
|
29
29
|
import { Offset } from '@progress/kendo-react-popup';
|
|
30
30
|
import * as React_2 from 'react';
|
|
@@ -45,6 +45,8 @@ import { SankeyOptions } from '@progress/kendo-charts';
|
|
|
45
45
|
import { SankeyTooltip as SankeyTooltip_2 } from '@progress/kendo-charts';
|
|
46
46
|
import { SankeyTooltipEvent } from '@progress/kendo-charts';
|
|
47
47
|
import { SeriesPattern } from '@progress/kendo-charts';
|
|
48
|
+
import { Store as Store_2 } from '../../store/store';
|
|
49
|
+
import { Store as Store_3 } from './../../store/store';
|
|
48
50
|
import { Surface } from '@progress/kendo-drawing';
|
|
49
51
|
import { VerticalStripesPattern } from '@progress/kendo-charts';
|
|
50
52
|
|
|
@@ -1710,12 +1712,12 @@ export declare interface ChartCategoryAxisTitleProps extends CategoryAxisTitle {
|
|
|
1710
1712
|
/**
|
|
1711
1713
|
* @hidden
|
|
1712
1714
|
*/
|
|
1713
|
-
declare const ChartContext: React_2.Context<
|
|
1715
|
+
declare const ChartContext: React_2.Context<ChartContextType_2 | null>;
|
|
1714
1716
|
|
|
1715
1717
|
/**
|
|
1716
1718
|
* @hidden
|
|
1717
1719
|
*/
|
|
1718
|
-
declare interface
|
|
1720
|
+
declare interface ChartContextType_2 {
|
|
1719
1721
|
optionsStore: Store;
|
|
1720
1722
|
observersStore: Store;
|
|
1721
1723
|
childrenObserver: InstanceObserver;
|
|
@@ -2639,8 +2641,8 @@ export declare interface ChartZoomableProps extends Zoomable {
|
|
|
2639
2641
|
*/
|
|
2640
2642
|
export declare class CollectionConfigurationComponent extends React_2.Component<CollectionConfigurationProps> {
|
|
2641
2643
|
static contextType: React_2.Context<ChartContextType | null>;
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
+
context: React_2.ContextType<typeof ChartContext>;
|
|
2645
|
+
get optionsStore(): Store_2 | undefined;
|
|
2644
2646
|
renderChildren(child: any, index: number): React_2.DetailedReactHTMLElement<any, HTMLElement>;
|
|
2645
2647
|
render(): any;
|
|
2646
2648
|
}
|
|
@@ -2659,9 +2661,10 @@ declare interface CollectionConfigurationProps {
|
|
|
2659
2661
|
*/
|
|
2660
2662
|
export declare class ConfigurationComponent extends React_2.Component<ConfigurationComponentProps> {
|
|
2661
2663
|
static contextType: React_2.Context<ChartContextType | null>;
|
|
2662
|
-
|
|
2664
|
+
context: React_2.ContextType<typeof ChartContext>;
|
|
2663
2665
|
childStore: any;
|
|
2664
|
-
|
|
2666
|
+
get optionsStore(): Store_3 | undefined;
|
|
2667
|
+
constructor(props: any);
|
|
2665
2668
|
render(): any;
|
|
2666
2669
|
componentDidMount(): void;
|
|
2667
2670
|
componentDidUpdate(): void;
|
|
@@ -2692,8 +2695,9 @@ export declare class CrosshairTooltip extends React_2.Component<CrosshairTooltip
|
|
|
2692
2695
|
context: React_2.ContextType<typeof ChartContext>;
|
|
2693
2696
|
readonly state: CrosshairTooltipState;
|
|
2694
2697
|
chartObserver: InstanceObserver;
|
|
2695
|
-
constructor(props: any
|
|
2696
|
-
|
|
2698
|
+
constructor(props: any);
|
|
2699
|
+
componentDidMount(): void;
|
|
2700
|
+
render(): JSX.Element;
|
|
2697
2701
|
componentWillUnmount(): void;
|
|
2698
2702
|
onShowTooltip(e: any): void;
|
|
2699
2703
|
onHideTooltip(): void;
|
|
@@ -2708,7 +2712,7 @@ export declare class CrosshairTooltipContainer extends React_2.Component<{}, Cro
|
|
|
2708
2712
|
readonly state: CrosshairTooltipContainerState;
|
|
2709
2713
|
private storeUnsubscriber;
|
|
2710
2714
|
componentDidMount(): void;
|
|
2711
|
-
render():
|
|
2715
|
+
render(): JSX.Element;
|
|
2712
2716
|
componentWillUnmount(): void;
|
|
2713
2717
|
subscriber: () => void;
|
|
2714
2718
|
}
|
|
@@ -2835,11 +2839,12 @@ declare class DomEvent<T> {
|
|
|
2835
2839
|
* @hidden
|
|
2836
2840
|
*/
|
|
2837
2841
|
export declare class DonutCenter extends React_2.Component<DonutCenterProps, DonutCenterState> {
|
|
2838
|
-
static contextType: React_2.Context<
|
|
2842
|
+
static contextType: React_2.Context<ChartContextType_3 | null>;
|
|
2839
2843
|
context: React_2.ContextType<typeof ChartContext>;
|
|
2840
2844
|
readonly state: DonutCenterState;
|
|
2841
2845
|
chartObserver: InstanceObserver;
|
|
2842
|
-
constructor(props: DonutCenterProps
|
|
2846
|
+
constructor(props: DonutCenterProps);
|
|
2847
|
+
componentDidMount(): void;
|
|
2843
2848
|
render(): any;
|
|
2844
2849
|
onRender(event: any): void;
|
|
2845
2850
|
}
|
|
@@ -6615,7 +6620,7 @@ export declare class SeriesTooltip extends React_2.Component<{}, SeriesTooltipSt
|
|
|
6615
6620
|
readonly state: SeriesTooltipState;
|
|
6616
6621
|
chartObserver: InstanceObserver | null;
|
|
6617
6622
|
componentDidMount(): void;
|
|
6618
|
-
render():
|
|
6623
|
+
render(): JSX.Element;
|
|
6619
6624
|
componentWillUnmount(): void;
|
|
6620
6625
|
onShowTooltip(e: any): void;
|
|
6621
6626
|
onHideTooltip(): void;
|
|
@@ -6858,7 +6863,7 @@ export declare interface SeriesVisualArgs {
|
|
|
6858
6863
|
/**
|
|
6859
6864
|
* @hidden
|
|
6860
6865
|
*/
|
|
6861
|
-
export declare const SharedTooltipContent: (props: SharedTooltipProps) =>
|
|
6866
|
+
export declare const SharedTooltipContent: (props: SharedTooltipProps) => JSX.Element;
|
|
6862
6867
|
|
|
6863
6868
|
export declare interface SharedTooltipContext {
|
|
6864
6869
|
categoryText?: string;
|
|
@@ -7364,8 +7369,9 @@ export declare class TooltipPopup extends React_2.Component<TooltipPopupProps, {
|
|
|
7364
7369
|
context: React_2.ContextType<typeof ChartContext>;
|
|
7365
7370
|
chartObserver: InstanceObserver;
|
|
7366
7371
|
element: HTMLDivElement | null;
|
|
7367
|
-
constructor(props: TooltipPopupProps
|
|
7368
|
-
|
|
7372
|
+
constructor(props: TooltipPopupProps);
|
|
7373
|
+
componentDidMount(): void;
|
|
7374
|
+
render(): JSX.Element;
|
|
7369
7375
|
componentWillUnmount(): void;
|
|
7370
7376
|
onChartMouseLeave: (e: DomEvent<React_2.MouseEvent<HTMLDivElement>>) => boolean;
|
|
7371
7377
|
onMouseLeave: (e: React_2.MouseEvent<HTMLDivElement>) => void;
|
package/package-metadata.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 e={name:"@progress/kendo-react-charts",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-react-charts",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1744271305,version:"10.2.0-develop.4",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"};exports.packageMetadata=e;
|
package/package-metadata.mjs
CHANGED
|
@@ -10,8 +10,8 @@ const e = {
|
|
|
10
10
|
productName: "KendoReact",
|
|
11
11
|
productCode: "KENDOUIREACT",
|
|
12
12
|
productCodes: ["KENDOUIREACT"],
|
|
13
|
-
publishDate:
|
|
14
|
-
version: "10.2.0-develop.
|
|
13
|
+
publishDate: 1744271305,
|
|
14
|
+
version: "10.2.0-develop.4",
|
|
15
15
|
licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
16
16
|
};
|
|
17
17
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-charts",
|
|
3
|
-
"version": "10.2.0-develop.
|
|
3
|
+
"version": "10.2.0-develop.4",
|
|
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.21.2",
|
|
29
29
|
"@progress/kendo-licensing": "^1.5.1",
|
|
30
|
-
"@progress/kendo-react-common": "10.2.0-develop.
|
|
31
|
-
"@progress/kendo-react-intl": "10.2.0-develop.
|
|
32
|
-
"@progress/kendo-react-layout": "10.2.0-develop.
|
|
33
|
-
"@progress/kendo-react-popup": "10.2.0-develop.
|
|
30
|
+
"@progress/kendo-react-common": "10.2.0-develop.4",
|
|
31
|
+
"@progress/kendo-react-intl": "10.2.0-develop.4",
|
|
32
|
+
"@progress/kendo-react-layout": "10.2.0-develop.4",
|
|
33
|
+
"@progress/kendo-react-popup": "10.2.0-develop.4",
|
|
34
34
|
"@progress/kendo-svg-icons": "^4.0.0",
|
|
35
35
|
"react": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
|
|
36
36
|
"react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc"
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"package": {
|
|
80
80
|
"productName": "KendoReact",
|
|
81
81
|
"productCode": "KENDOUIREACT",
|
|
82
|
-
"publishDate":
|
|
82
|
+
"publishDate": 1744271305,
|
|
83
83
|
"licensingDocsUrl": "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
84
84
|
}
|
|
85
85
|
},
|
package/sankey/Sankey.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const W=require("react"),j=require("@progress/kendo-charts"),d=require("@progress/kendo-react-common"),_=require("../package-metadata.js"),I=require("./propTypes.js"),y=require("./SankeyTooltip.js");function K(e){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(c,r,o.get?o:{enumerable:!0,get:()=>e[r]})}}return c.default=e,Object.freeze(c)}const t=K(W),w=12,m={offset:w,visible:!0},V=["nodeEnter","nodeLeave","linkEnter","linkLeave","nodeClick","linkClick"],z=(e,c)=>{e&&(e.unbind(),V.forEach(r=>{c[r]&&e.bind(r,c[r])}))},b=t.forwardRef((e,c)=>{const r=!d.validatePackage(_.packageMetadata,{component:"Sankey"}),o=t.useRef(null),a=t.useRef(null),u=d.useRtl(o,e.dir,[e.dir,o.current]),p=t.useRef(null),g=d.useDocument(o),{data:v,links:C,nodes:E,labels:T,title:L,legend:R,tooltip:k=m,disableAutoLayout:S,disableKeyboardNavigation:O}=e,h=t.useRef();h.current=e;const[N,P]=t.useState(null),q=t.useCallback(l=>{const{visible:s,appendTo:n=g().body,offset:f=w,nodeComponent:M=y.NodeTooltipContent,linkComponent:x=y.LinkTooltipContent}={...m,...k};if(s){const H={appendTo:n,event:l,offset:f,dir:u,Content:l.targetType==="node"?M:x};P(H)}},[k,u,g]),D=t.useCallback(()=>{P(null)},[]),i=t.useCallback((l,s)=>{const n=h.current[l];if(n){const f={...s,nativeEvent:s.originalEvent,target:p.current};n.call(void 0,f)}},[]);return t.useEffect(()=>{const l={data:v,links:C,nodes:E,labels:T,title:L,legend:R,disableAutoLayout:S,disableKeyboardNavigation:O,rtl:u==="rtl",tooltip:{...m,...k}};if(a.current)a.current.setOptions(l);else if(d.canUseDOM&&o.current){const s=j.sankeyTheme(o.current);a.current=new j.Sankey(o.current,l,s),z(a.current,{nodeEnter:n=>{i("onNodeEnter",n)},nodeLeave:n=>{i("onNodeLeave",n)},linkEnter:n=>{i("onLinkEnter",n)},linkLeave:n=>{i("onLinkLeave",n)},nodeClick:n=>{i("onNodeClick",n)},linkClick:n=>{i("onLinkClick",n)}}),a.current.bind("tooltipShow",q),a.current.bind("tooltipHide",D)}return()=>{a.current&&(a.current.destroy(),a.current=null)}},[v,C,E,T,L,R,S,O,u,k,D,q,i]),t.useImperativeHandle(p,()=>({get element(){return o.current},exportVisual:l=>a.current.exportVisual(l),props:e}),[]),t.useImperativeHandle(c,()=>p.current),t.createElement(t.Fragment,null,t.createElement("div",{ref:o,className:e.className,style:e.style,dir:u}),N&&t.createElement(y.TooltipComponent,{...N}),r&&t.createElement(d.WatermarkOverlay,null))});b.propTypes=I.sankeyPropTypes;b.displayName="KendoReactSankey";exports.Sankey=b;
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const W=require("react"),j=require("@progress/kendo-charts"),d=require("@progress/kendo-react-common"),_=require("../package-metadata.js"),I=require("./propTypes.js"),y=require("./SankeyTooltip.js");function K(e){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(c,r,o.get?o:{enumerable:!0,get:()=>e[r]})}}return c.default=e,Object.freeze(c)}const t=K(W),w=12,m={offset:w,visible:!0},V=["nodeEnter","nodeLeave","linkEnter","linkLeave","nodeClick","linkClick"],z=(e,c)=>{e&&(e.unbind(),V.forEach(r=>{c[r]&&e.bind(r,c[r])}))},b=t.forwardRef((e,c)=>{const r=!d.validatePackage(_.packageMetadata,{component:"Sankey"}),o=t.useRef(null),a=t.useRef(null),u=d.useRtl(o,e.dir,[e.dir,o.current]),p=t.useRef(null),g=d.useDocument(o),{data:v,links:C,nodes:E,labels:T,title:L,legend:R,tooltip:k=m,disableAutoLayout:S,disableKeyboardNavigation:O}=e,h=t.useRef(void 0);h.current=e;const[N,P]=t.useState(null),q=t.useCallback(l=>{const{visible:s,appendTo:n=g().body,offset:f=w,nodeComponent:M=y.NodeTooltipContent,linkComponent:x=y.LinkTooltipContent}={...m,...k};if(s){const H={appendTo:n,event:l,offset:f,dir:u,Content:l.targetType==="node"?M:x};P(H)}},[k,u,g]),D=t.useCallback(()=>{P(null)},[]),i=t.useCallback((l,s)=>{const n=h.current[l];if(n){const f={...s,nativeEvent:s.originalEvent,target:p.current};n.call(void 0,f)}},[]);return t.useEffect(()=>{const l={data:v,links:C,nodes:E,labels:T,title:L,legend:R,disableAutoLayout:S,disableKeyboardNavigation:O,rtl:u==="rtl",tooltip:{...m,...k}};if(a.current)a.current.setOptions(l);else if(d.canUseDOM&&o.current){const s=j.sankeyTheme(o.current);a.current=new j.Sankey(o.current,l,s),z(a.current,{nodeEnter:n=>{i("onNodeEnter",n)},nodeLeave:n=>{i("onNodeLeave",n)},linkEnter:n=>{i("onLinkEnter",n)},linkLeave:n=>{i("onLinkLeave",n)},nodeClick:n=>{i("onNodeClick",n)},linkClick:n=>{i("onLinkClick",n)}}),a.current.bind("tooltipShow",q),a.current.bind("tooltipHide",D)}return()=>{a.current&&(a.current.destroy(),a.current=null)}},[v,C,E,T,L,R,S,O,u,k,D,q,i]),t.useImperativeHandle(p,()=>({get element(){return o.current},exportVisual:l=>a.current.exportVisual(l),props:e}),[]),t.useImperativeHandle(c,()=>p.current),t.createElement(t.Fragment,null,t.createElement("div",{ref:o,className:e.className,style:e.style,dir:u}),N&&t.createElement(y.TooltipComponent,{...N}),r&&t.createElement(d.WatermarkOverlay,null))});b.propTypes=I.sankeyPropTypes;b.displayName="KendoReactSankey";exports.Sankey=b;
|
package/sankey/Sankey.mjs
CHANGED
|
@@ -29,18 +29,18 @@ const P = 12, f = {
|
|
|
29
29
|
tooltip: d = f,
|
|
30
30
|
disableAutoLayout: T,
|
|
31
31
|
disableKeyboardNavigation: L
|
|
32
|
-
} = n, R = e.useRef();
|
|
32
|
+
} = n, R = e.useRef(void 0);
|
|
33
33
|
R.current = n;
|
|
34
34
|
const [h, N] = e.useState(null), S = e.useCallback(
|
|
35
35
|
(r) => {
|
|
36
36
|
const {
|
|
37
|
-
visible:
|
|
37
|
+
visible: a,
|
|
38
38
|
appendTo: t = m().body,
|
|
39
39
|
offset: p = P,
|
|
40
40
|
nodeComponent: x = j,
|
|
41
41
|
linkComponent: D = q
|
|
42
42
|
} = { ...f, ...d };
|
|
43
|
-
if (
|
|
43
|
+
if (a) {
|
|
44
44
|
const H = {
|
|
45
45
|
appendTo: t,
|
|
46
46
|
event: r,
|
|
@@ -54,12 +54,12 @@ const P = 12, f = {
|
|
|
54
54
|
[d, c, m]
|
|
55
55
|
), O = e.useCallback(() => {
|
|
56
56
|
N(null);
|
|
57
|
-
}, []),
|
|
57
|
+
}, []), i = e.useCallback((r, a) => {
|
|
58
58
|
const t = R.current[r];
|
|
59
59
|
if (t) {
|
|
60
60
|
const p = {
|
|
61
|
-
...
|
|
62
|
-
nativeEvent:
|
|
61
|
+
...a,
|
|
62
|
+
nativeEvent: a.originalEvent,
|
|
63
63
|
target: k.current
|
|
64
64
|
};
|
|
65
65
|
t.call(void 0, p);
|
|
@@ -81,25 +81,25 @@ const P = 12, f = {
|
|
|
81
81
|
if (o.current)
|
|
82
82
|
o.current.setOptions(r);
|
|
83
83
|
else if (A && l.current) {
|
|
84
|
-
const
|
|
85
|
-
o.current = new I(l.current, r,
|
|
84
|
+
const a = W(l.current);
|
|
85
|
+
o.current = new I(l.current, r, a), G(o.current, {
|
|
86
86
|
nodeEnter: (t) => {
|
|
87
|
-
|
|
87
|
+
i("onNodeEnter", t);
|
|
88
88
|
},
|
|
89
89
|
nodeLeave: (t) => {
|
|
90
|
-
|
|
90
|
+
i("onNodeLeave", t);
|
|
91
91
|
},
|
|
92
92
|
linkEnter: (t) => {
|
|
93
|
-
|
|
93
|
+
i("onLinkEnter", t);
|
|
94
94
|
},
|
|
95
95
|
linkLeave: (t) => {
|
|
96
|
-
|
|
96
|
+
i("onLinkLeave", t);
|
|
97
97
|
},
|
|
98
98
|
nodeClick: (t) => {
|
|
99
|
-
|
|
99
|
+
i("onNodeClick", t);
|
|
100
100
|
},
|
|
101
101
|
linkClick: (t) => {
|
|
102
|
-
|
|
102
|
+
i("onLinkClick", t);
|
|
103
103
|
}
|
|
104
104
|
}), o.current.bind("tooltipShow", S), o.current.bind("tooltipHide", O);
|
|
105
105
|
}
|
|
@@ -119,7 +119,7 @@ const P = 12, f = {
|
|
|
119
119
|
d,
|
|
120
120
|
O,
|
|
121
121
|
S,
|
|
122
|
-
|
|
122
|
+
i
|
|
123
123
|
]), e.useImperativeHandle(
|
|
124
124
|
k,
|
|
125
125
|
() => ({
|
package/tooltip/Crosshair.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 S=require("react"),m=require("@progress/kendo-react-common"),f=require("@progress/kendo-charts"),O=require("./Popup.js"),C=require("../ChartContext.js");function b(
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("react"),m=require("@progress/kendo-react-common"),f=require("@progress/kendo-charts"),O=require("./Popup.js"),C=require("../ChartContext.js");function b(n){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const e in n)if(e!=="default"){const o=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(t,e,o.get?o:{enumerable:!0,get:()=>n[e]})}}return t.default=n,Object.freeze(t)}const i=b(S),y="k-chart-crosshair-tooltip",T="k-chart-tooltip-inverse",a=class a extends i.Component{constructor(t){super(t),this.context=null,this.state={popupShown:!1},this.chartObserver=new f.InstanceObserver(this,{showTooltip:"onShowTooltip",hideTooltip:"onHideTooltip"})}componentDidMount(){var t;(t=this.context)==null||t.observersStore.dispatch({type:"add",payload:this.chartObserver})}render(){const{popupContend:t,className:e,...o}=this.state,s=this.state.popupShown?()=>t:Function.prototype,p=m.classNames({[y]:!0,[T]:!!e});return i.createElement(O.TooltipPopup,{...o,popupContent:s,className:p})}componentWillUnmount(){var t;(t=this.context)==null||t.observersStore.dispatch({type:"remove",payload:this.chartObserver})}onShowTooltip(t){const{anchor:e,style:o,className:s,crosshair:p,axisName:c,axisIndex:l,value:u}=t,{name:h,index:d}=this.props;p&&c===h&&l===d&&this.setState({popupShown:!0,popupAlign:e.align,popupOffset:e.point,popupContend:u,popupStyles:o,className:s})}onHideTooltip(){this.setState({popupShown:!1,popupStyles:{},className:void 0})}};a.contextType=C.ChartContext;let r=a;exports.CrosshairTooltip=r;
|
package/tooltip/Crosshair.mjs
CHANGED
|
@@ -10,22 +10,26 @@ import { classNames as u } from "@progress/kendo-react-common";
|
|
|
10
10
|
import { InstanceObserver as S } from "@progress/kendo-charts";
|
|
11
11
|
import { TooltipPopup as d } from "./Popup.mjs";
|
|
12
12
|
import { ChartContext as f } from "../ChartContext.mjs";
|
|
13
|
-
const
|
|
14
|
-
constructor(t
|
|
15
|
-
super(t
|
|
13
|
+
const x = "k-chart-crosshair-tooltip", v = "k-chart-tooltip-inverse", n = class n extends r.Component {
|
|
14
|
+
constructor(t) {
|
|
15
|
+
super(t), this.context = null, this.state = {
|
|
16
16
|
popupShown: !1
|
|
17
17
|
}, this.chartObserver = new S(this, {
|
|
18
18
|
showTooltip: "onShowTooltip",
|
|
19
19
|
hideTooltip: "onHideTooltip"
|
|
20
|
-
})
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
componentDidMount() {
|
|
23
|
+
var t;
|
|
24
|
+
(t = this.context) == null || t.observersStore.dispatch({
|
|
21
25
|
type: "add",
|
|
22
26
|
payload: this.chartObserver
|
|
23
27
|
});
|
|
24
28
|
}
|
|
25
29
|
render() {
|
|
26
30
|
const { popupContend: t, className: o, ...e } = this.state, p = this.state.popupShown ? () => t : Function.prototype, s = u({
|
|
27
|
-
[
|
|
28
|
-
[
|
|
31
|
+
[x]: !0,
|
|
32
|
+
[v]: !!o
|
|
29
33
|
});
|
|
30
34
|
return /* @__PURE__ */ r.createElement(d, { ...e, popupContent: p, className: s });
|
|
31
35
|
}
|
|
@@ -37,12 +41,12 @@ const v = "k-chart-crosshair-tooltip", C = "k-chart-tooltip-inverse", n = class
|
|
|
37
41
|
});
|
|
38
42
|
}
|
|
39
43
|
onShowTooltip(t) {
|
|
40
|
-
const { anchor: o, style: e, className: p, crosshair: s, axisName:
|
|
41
|
-
s &&
|
|
44
|
+
const { anchor: o, style: e, className: p, crosshair: s, axisName: a, axisIndex: c, value: h } = t, { name: l, index: m } = this.props;
|
|
45
|
+
s && a === l && c === m && this.setState({
|
|
42
46
|
popupShown: !0,
|
|
43
47
|
popupAlign: o.align,
|
|
44
48
|
popupOffset: o.point,
|
|
45
|
-
popupContend:
|
|
49
|
+
popupContend: h,
|
|
46
50
|
popupStyles: e,
|
|
47
51
|
className: p
|
|
48
52
|
});
|
|
@@ -56,7 +60,7 @@ const v = "k-chart-crosshair-tooltip", C = "k-chart-tooltip-inverse", n = class
|
|
|
56
60
|
}
|
|
57
61
|
};
|
|
58
62
|
n.contextType = f;
|
|
59
|
-
let
|
|
63
|
+
let i = n;
|
|
60
64
|
export {
|
|
61
|
-
|
|
65
|
+
i as CrosshairTooltip
|
|
62
66
|
};
|
package/tooltip/Popup.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 l=require("react"),h=require("@progress/kendo-charts"),f=require("../events/dom-event.js"),
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react"),h=require("@progress/kendo-charts"),f=require("../events/dom-event.js"),d=require("../utils/index.js"),m=require("@progress/kendo-react-popup"),v=require("../ChartContext.js");function O(n){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const e in n)if(e!=="default"){const t=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(o,e,t.get?t:{enumerable:!0,get:()=>n[e]})}}return o.default=n,Object.freeze(o)}const s=O(l),b={horizontal:"fit",vertical:"fit"},C="k-chart-tooltip",y="k-chart-tooltip-wrapper",a=class a extends s.Component{constructor(o){super(o),this.context=null,this.element=null,this.onChartMouseLeave=e=>{const{syntheticEvent:t}=e;return!!d.hasParent(t.relatedTarget,this.element)},this.onMouseLeave=e=>{const t=f.toDomEvent(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 h.InstanceObserver(this,{onMouseLeave:"onChartMouseLeave"})}componentDidMount(){var o;(o=this.context)==null||o.observersStore.dispatch({type:"add",payload:this.chartObserver})}render(){const{popupShown:o,popupAlign:e,popupOffset:t,popupStyles:i,popupContent:c,className:p}=this.props,u=[C,p].join(" ").trim();return s.createElement(m.Popup,{animate:!1,popupAlign:e,offset:t,show:o,collision:b,className:y},s.createElement("div",{className:u,style:i,onMouseLeave:this.onMouseLeave,ref:this.popupRef},c()))}componentWillUnmount(){this.context.observersStore.dispatch({type:"remove",payload:this.chartObserver})}};a.contextType=v.ChartContext;let r=a;exports.TooltipPopup=r;
|
package/tooltip/Popup.mjs
CHANGED
|
@@ -5,44 +5,48 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import * as
|
|
8
|
+
import * as s from "react";
|
|
9
9
|
import { InstanceObserver as h } from "@progress/kendo-charts";
|
|
10
10
|
import { toDomEvent as l } from "../events/dom-event.mjs";
|
|
11
11
|
import { hasParent as m } from "../utils/index.mjs";
|
|
12
12
|
import { Popup as u } from "@progress/kendo-react-popup";
|
|
13
13
|
import { ChartContext as f } from "../ChartContext.mjs";
|
|
14
|
-
const v = { horizontal: "fit", vertical: "fit" }, d = "k-chart-tooltip", C = "k-chart-tooltip-wrapper", n = class n extends
|
|
15
|
-
constructor(
|
|
16
|
-
super(
|
|
17
|
-
const { syntheticEvent:
|
|
18
|
-
return !!m(
|
|
19
|
-
}, this.onMouseLeave = (
|
|
20
|
-
const
|
|
21
|
-
this.context.childrenObserver.trigger("onMouseLeave",
|
|
22
|
-
}, this.popupRef = (
|
|
23
|
-
this.element =
|
|
24
|
-
const
|
|
25
|
-
|
|
14
|
+
const v = { horizontal: "fit", vertical: "fit" }, d = "k-chart-tooltip", C = "k-chart-tooltip-wrapper", n = class n extends s.Component {
|
|
15
|
+
constructor(o) {
|
|
16
|
+
super(o), this.context = null, this.element = null, this.onChartMouseLeave = (t) => {
|
|
17
|
+
const { syntheticEvent: e } = t;
|
|
18
|
+
return !!m(e.relatedTarget, this.element);
|
|
19
|
+
}, this.onMouseLeave = (t) => {
|
|
20
|
+
const e = l(this, t);
|
|
21
|
+
this.context.childrenObserver.trigger("onMouseLeave", e) && t.preventDefault();
|
|
22
|
+
}, this.popupRef = (t) => {
|
|
23
|
+
this.element = t;
|
|
24
|
+
const e = t && t.closest(".k-animation-container");
|
|
25
|
+
e && (e.style.transition = "initial");
|
|
26
26
|
}, this.chartObserver = new h(this, {
|
|
27
27
|
onMouseLeave: "onChartMouseLeave"
|
|
28
|
-
})
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
componentDidMount() {
|
|
31
|
+
var o;
|
|
32
|
+
(o = this.context) == null || o.observersStore.dispatch({
|
|
29
33
|
type: "add",
|
|
30
34
|
payload: this.chartObserver
|
|
31
35
|
});
|
|
32
36
|
}
|
|
33
37
|
render() {
|
|
34
|
-
const { popupShown:
|
|
35
|
-
return /* @__PURE__ */
|
|
38
|
+
const { popupShown: o, popupAlign: t, popupOffset: e, popupStyles: r, popupContent: i, className: p } = this.props, c = [d, p].join(" ").trim();
|
|
39
|
+
return /* @__PURE__ */ s.createElement(
|
|
36
40
|
u,
|
|
37
41
|
{
|
|
38
42
|
animate: !1,
|
|
39
|
-
popupAlign:
|
|
43
|
+
popupAlign: t,
|
|
40
44
|
offset: e,
|
|
41
|
-
show:
|
|
45
|
+
show: o,
|
|
42
46
|
collision: v,
|
|
43
47
|
className: C
|
|
44
48
|
},
|
|
45
|
-
/* @__PURE__ */
|
|
49
|
+
/* @__PURE__ */ s.createElement("div", { className: c, style: r, onMouseLeave: this.onMouseLeave, ref: this.popupRef }, i())
|
|
46
50
|
);
|
|
47
51
|
}
|
|
48
52
|
componentWillUnmount() {
|
|
@@ -53,7 +57,7 @@ const v = { horizontal: "fit", vertical: "fit" }, d = "k-chart-tooltip", C = "k-
|
|
|
53
57
|
}
|
|
54
58
|
};
|
|
55
59
|
n.contextType = f;
|
|
56
|
-
let
|
|
60
|
+
let a = n;
|
|
57
61
|
export {
|
|
58
|
-
|
|
62
|
+
a as TooltipPopup
|
|
59
63
|
};
|