@progress/kendo-react-charts 7.5.0-develop.10 → 7.5.0-develop.12

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.
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("prop-types"),require("@progress/kendo-react-intl"),require("@progress/kendo-charts"),require("@progress/kendo-react-common"),require("@progress/kendo-react-popup"),require("@progress/kendo-react-layout"),require("@progress/kendo-svg-icons")):"function"==typeof define&&define.amd?define(["exports","react","prop-types","@progress/kendo-react-intl","@progress/kendo-charts","@progress/kendo-react-common","@progress/kendo-react-popup","@progress/kendo-react-layout","@progress/kendo-svg-icons"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactCharts={},e.React,e.PropTypes,e.KendoReactIntl,e.KendoCharts,e.KendoReactCommon,e.KendoReactPopup,e.KendoReactLayout,e.KendoSvgIcons)}(this,(function(e,t,s,r,n,a,i,o,l){"use strict";function c(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(s){if("default"!==s){var r=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,r.get?r:{enumerable:!0,get:function(){return e[s]}})}})),t.default=e,Object.freeze(t)}var h=c(t);function d(e,t){let s=e;for(;s&&s!==t;)s=s.parentNode;return!!s}function p(e,t,s,r){const n=e[t];if(n&&Array.isArray(n))for(let e of n)if(!e.type||e.type!==r)return new Error(`${s} children should be Array of type ${r.displayName}.`);return null}const u=e=>void 0!==e&&!e,m=e=>({x:{location:e.pageX},y:{location:e.pageY}});function v(e,t){for(let s=0;s<e.length;s++)if(t[e[s]])return!0;return!1}const y=[{end:"panend",move:"panmove",start:"panstart"},{gesturechange:"pinchmove",gestureend:"pinchend",gesturestart:"pinchstart"},{press:"press"},{tap:"tap"}];let g=class{constructor(e,t){this.hammerInstance=e,this.eventHandlers={},this.tap=this.tap.bind(this),this.press=this.press.bind(this),this.panstart=this.panstart.bind(this),this.panmove=this.panmove.bind(this),this.panend=this.panend.bind(this),this.pinchstart=this.pinchstart.bind(this),this.pinchmove=this.pinchmove.bind(this),this.pinchend=this.pinchend.bind(this),t&&this.bind(t)}tap(e){this.trigger("tap",e)}press(e){this.trigger("press",e)}panstart(e){delete this.previous,this.previous=this.trigger("start",e)}panmove(e){this.previous=this.trigger("move",e)}panend(e){this.trigger("end",e),delete this.previous}pinchstart(e){this.trigger("gesturestart",e)}pinchmove(e){this.trigger("gesturechange",e)}pinchend(e){this.trigger("gestureend",e)}trigger(e,t){const s=((e,t)=>{const s=e.pointers,r=s[0],n=r.pageX,a=r.pageY;let i=0;if(s.length>1){const e=s[0],t=s[1];i=Math.sqrt(Math.pow(e.pageX-t.pageX,2)+Math.pow(e.pageY-t.pageY,2))}return{distance:i,event:e.srcEvent,preventDefault:function(){e.preventDefault()},target:e.target,touches:s.map(m),type:e.type,x:{delta:t?n-t.x.location:0,initialDelta:e.deltaX,location:n,startLocation:n-e.deltaX},y:{delta:t?a-t.y.location:0,initialDelta:e.deltaY,location:a,startLocation:a-e.deltaY}}})(t,this.previous);return this.eventHandlers[e]&&this.eventHandlers[e](s),s}bind(e={}){this.unbind(),this.eventHandlers=e;for(let t=0;t<y.length;t++){const s=y[t],r=Object.keys(s);if(v(r,e))for(let e=0;e<r.length;e++){const t=s[r[e]];this.hammerInstance.on(t,this[t])}}}unbind(){this.hammerInstance&&this.hammerInstance.off(),this.eventHandlers={}}destroy(){this.hammerInstance&&(this.hammerInstance.destroy(),delete this.hammerInstance),delete this.eventHandlers}toggleDrag(e){this.toggle("pan",e)}toggleZoom(e){this.toggle("pinch",e)}toggle(e,t){this.hammerInstance&&this.hammerInstance.get(e).set({enable:t})}};let f=class{constructor(e){this.target=e}},b=class extends f{constructor(e,t){super(t),this.axis=e.axis,this.dataItem=e.dataItem,this.index=e.index,this.text=e.text,this.value=e.value}},C=class extends f{constructor(){super(...arguments),this.prevented=!1}preventDefault(){this.prevented=!0}isDefaultPrevented(){return this.prevented}},x=class extends C{constructor(e,t){super(t),this.axisRanges=e.axisRanges,this.nativeEvent=e.originalEvent}},S=class extends f{constructor(e,t){super(t),this.axisRanges=e.axisRanges,this.nativeEvent=e.originalEvent}},E=class extends C{constructor(e,t){super(t),this.axisRanges=e.axisRanges,this.nativeEvent=e.originalEvent}},k=class extends f{constructor(e,t){super(t),this.value=e.value,this.point=e.point,this.series=e.series,this.currentState=e.currentState,this.nextState=e.nextState}},I=class extends C{constructor(e,t){super(t),this.series=e.series,this.seriesIndex=e.seriesIndex,this.pointIndex=e.pointIndex,this.text=e.text}preventDefault(){super.preventDefault()}},w=class extends C{constructor(e,t){super(t),this.series=e.series,this.seriesIndex=e.seriesIndex,this.pointIndex=e.pointIndex,this.text=e.text}preventDefault(){super.preventDefault()}},_=class extends f{constructor(e,t){super(t),this.from=e.from,this.to=e.to}},D=class extends f{constructor(e,t){super(t),this.category=e.category,this.dataItem=e.dataItem,this.series=e.series,this.value=e.value,this.visual=e.visual}},N=class extends f{constructor(e,t){super(t),this.category=e.category,this.dataItem=e.dataItem,this.series=e.series,this.value=e.value,this.visual=e.visual}},T=class extends f{constructor(e,t){super(t),this.category=e.category,this.nativeEvent=e.originalEvent,this.value=e.value,this.x=e.x,this.y=e.y}},A=class extends f{constructor(e,t){super(t),this.category=e.category,this.nativeEvent=e.originalEvent,this.value=e.value,this.x=e.x,this.y=e.y}},O=class extends f{constructor(e,t){super(t)}},K=class extends C{constructor(e,t){super(t),this.axis=e.axis,this.from=e.from,this.to=e.to}},L=class extends f{constructor(e,t){super(t),this.axis=e.axis,this.from=e.from,this.to=e.to}},R=class extends C{constructor(e,t){super(t),this.axis=e.axis,this.from=e.from,this.to=e.to}},P=class extends f{constructor(e,t){super(t),this.category=e.category,this.dataItem=e.dataItem,this.nativeEvent=e.originalEvent,this.percentage=e.percentage,this.point=e.point,this.series=e.series,this.stackValue=e.stackValue,this.value=e.value}},F=class extends C{constructor(e,t){super(t),this.category=e.category,this.categoryPoints=e.categoryPoints,this.dataItem=e.dataItem,this.nativeEvent=e.originalEvent,this.percentage=e.percentage,this.point=e.point,this.series=e.series,this.stackValue=e.stackValue,this.value=e.value}},j=class extends C{constructor(e,t){super(t),this.axisRanges=e.axisRanges,this.delta=e.delta,this.nativeEvent=e.originalEvent}},q=class extends f{constructor(e,t){super(t),this.axisRanges=e.axisRanges,this.nativeEvent=e.originalEvent}},H=class extends C{constructor(e,t){super(t),this.axisRanges=e.axisRanges,this.nativeEvent=e.originalEvent}};const V={axisLabelClick:b,drag:x,dragEnd:S,dragStart:E,drilldownEvent:k,legendItemHover:I,legendItemClick:w,legendItemLeave:class extends C{constructor(e,t){super(t),this.series=e.series,this.seriesIndex=e.seriesIndex,this.pointIndex=e.pointIndex,this.text=e.text}preventDefault(){super.preventDefault()}},navigatorFilter:_,noteClick:D,noteHover:N,plotAreaClick:T,plotAreaHover:A,render:O,select:K,selectEnd:L,selectStart:R,seriesClick:P,seriesHover:F,zoom:j,zoomEnd:q,zoomStart:H};let M=class{constructor(e,t){this.sender=e,this.syntheticEvent=t}};function z(e,t){return new M(e,t)}const U=e=>`${e.fontWeight} ${e.fontSize} ${e.fontFamily}`,B=e=>window.getComputedStyle(e).backgroundColor,$=`\n <div class="k-var--primary"></div>\n <div class="k-var--base"></div>\n <div class="k-var--background"></div>\n\n <div class="k-var--normal-background"></div>\n <div class="k-var--normal-text-color"></div>\n <div class="k-var--hover-background"></div>\n <div class="k-var--hover-text-color"></div>\n <div class="k-var--selected-background"></div>\n <div class="k-var--selected-text-color"></div>\n <div class="k-var--chart-error-bars-background"></div>\n <div class="k-var--chart-notes-background"></div>\n <div class="k-var--chart-notes-border"></div>\n <div class="k-var--chart-notes-lines"></div>\n <div class="k-var--chart-crosshair-background"></div>\n\n <div class="k-var--chart-inactive"></div>\n <div class="k-var--chart-major-lines"></div>\n <div class="k-var--chart-minor-lines"></div>\n <div class="k-var--chart-area-opacity"></div>\n <div class="k-var--chart-area-inactive-opacity"></div>\n <div class="k-var--chart-line-inactive-opacity"></div>\n\n <div class="k-widget k-chart">\n <div class="k-var--chart-font"></div>\n <div class="k-var--chart-title-font"></div>\n <div class="k-var--chart-pane-title-font"></div>\n <div class="k-var--chart-label-font"></div>\n </div>\n\n <div class="k-var--series-unset"></div>\n <div class="k-var--series">\n ${(()=>{let e='\n <div class="k-var--series-a"></div>\n <div class="k-var--series-b"></div>\n <div class="k-var--series-c"></div>\n <div class="k-var--series-d"></div>\n <div class="k-var--series-e"></div>\n <div class="k-var--series-f"></div>\n';for(let t=0;t<30;t++)e+=`\n <div class="k-var--series-${t+1}"></div>`;return e})()}\n </div>\n`;class X{constructor(e){this.store=e}setStyle(e,t){this.store.dispatch({type:"set",payload:{field:e,value:t}})}setColors(){this.mapColor("axisDefaults.crosshair.color","chart-crosshair-background"),this.mapColor("axisDefaults.labels.color","normal-text-color"),this.mapColor("axisDefaults.line.color","chart-major-lines"),this.mapColor("axisDefaults.majorGridLines.color","chart-major-lines"),this.mapColor("axisDefaults.minorGridLines.color","chart-minor-lines"),this.mapColor("axisDefaults.notes.icon.background","chart-notes-background"),this.mapColor("axisDefaults.notes.icon.border.color","chart-notes-border"),this.mapColor("axisDefaults.notes.line.color","chart-notes-lines"),this.mapColor("axisDefaults.title.color","normal-text-color"),this.mapColor("chartArea.background","background"),this.mapColor("legend.inactiveItems.labels.color","chart-inactive"),this.mapColor("legend.inactiveItems.markers.color","chart-inactive"),this.mapColor("legend.labels.color","normal-text-color"),this.mapColor("seriesDefaults.boxPlot.downColor","chart-major-lines"),this.mapColor("seriesDefaults.boxPlot.mean.color","base"),this.mapColor("seriesDefaults.boxPlot.median.color","base"),this.mapColor("seriesDefaults.boxPlot.whiskers.color","primary"),this.mapColor("seriesDefaults.bullet.target.color","normal-text-color"),this.mapColor("seriesDefaults.candlestick.downColor","normal-text-color"),this.mapColor("seriesDefaults.candlestick.line.color","normal-text-color"),this.mapColor("seriesDefaults.errorBars.color","chart-error-bars-background"),this.mapColor("seriesDefaults.horizontalWaterfall.line.color","chart-major-lines"),this.mapColor("seriesDefaults.icon.border.color","chart-major-lines"),this.mapColor("seriesDefaults.labels.background","background"),this.mapColor("seriesDefaults.labels.color","normal-text-color"),this.mapColor("seriesDefaults.notes.icon.background","chart-notes-background"),this.mapColor("seriesDefaults.notes.icon.border.color","chart-notes-border"),this.mapColor("seriesDefaults.notes.line.color","chart-notes-lines"),this.mapColor("seriesDefaults.verticalBoxPlot.downColor","chart-major-lines"),this.mapColor("seriesDefaults.verticalBoxPlot.mean.color","base"),this.mapColor("seriesDefaults.verticalBoxPlot.median.color","base"),this.mapColor("seriesDefaults.verticalBoxPlot.whiskers.color","primary"),this.mapColor("seriesDefaults.verticalBullet.target.color","normal-text-color"),this.mapColor("seriesDefaults.waterfall.line.color","chart-major-lines"),this.mapColor("title.color","normal-text-color"),this.mapColor("subtitle.color","normal-text-color");const e=parseFloat(this.queryStyle("chart-area-opacity").opacity);isNaN(e)||(this.setStyle("seriesDefaults.area.opacity",e),this.setStyle("seriesDefaults.radarArea.opacity",e),this.setStyle("seriesDefaults.verticalArea.opacity",e),this.setStyle("seriesDefaults.labels.opacity",e)),this.setInactiveOpacity(["area","verticalArea"],"chart-area-inactive-opacity"),this.setInactiveOpacity(["line","verticalLine"],"chart-line-inactive-opacity")}setFonts(){const e=U(this.queryStyle("chart-font")),t=U(this.queryStyle("chart-title-font")),s=U(this.queryStyle("chart-pane-title-font")),r=U(this.queryStyle("chart-label-font"));this.setStyle("axisDefaults.labels.font",r),this.setStyle("axisDefaults.notes.label.font",e),this.setStyle("axisDefaults.title.font",e),this.setStyle("legend.labels.font",e),this.setStyle("seriesDefaults.labels.font",r),this.setStyle("seriesDefaults.notes.label.font",e),this.setStyle("title.font",t),this.setStyle("subtitle.font",s),this.setStyle("paneDefaults.title.font",s)}setSeriesColors(){const e=this.element,t=[].slice.call(e.querySelectorAll(".k-var--series div")),s=B(e.querySelector(".k-var--series-unset")),r=t.reduce(((e,t)=>{const r=(e=>{const t=e.match(/series-([a-z])$/);if(null!==t)return(e=>e.toLowerCase().charCodeAt(0)-97)(t[1]);const s=e.split("--series-")[1];return parseInt(s,10)-1})(t.className),n=B(t);return n!==s&&(e[r]=n),e}),[]);this.setStyle("seriesColors",r)}mapColor(e,t){this.setStyle(e,this.queryStyle(t).backgroundColor)}queryStyle(e){const t=this.element;return window.getComputedStyle(t.querySelector(`.k-var--${e}`))}setInactiveOpacity(e,t){const s=parseFloat(this.queryStyle(t).opacity);!isNaN(s)&&s<1&&e.forEach((e=>this.setStyle(`seriesDefaults.${e}.highlight.inactiveOpacity`,s)))}}const Y=e=>{let t,s,r=[];const n=n=>{t=e(t,n),a.canUseDOM&&(window.clearTimeout(s),s=window.setTimeout((()=>r.forEach((e=>e()))),16.666666666666668))};return n({}),{getState:()=>t,dispatch:n,subscribe:e=>(r.push(e),()=>r=r.filter((t=>t!==e)))}},W=(e,t)=>t.chartCollectionIdxKey?J.collectionConfigurationItem(e,t):t.chartKey?J.configurationItem(e,t):{},Z=(e,t)=>{if(!t.type)return{};switch(t.type){case"set":return J.themeItem(e,t);case"push":return Object.assign(e,t.payload);default:return e}},G=(e,t)=>{if(!t.type)return[];switch(t.type){case"add":return[...e,t.payload];case"remove":return e.filter((e=>e!==t.payload));default:return e}},J={configurationItem:(e,t)=>Object.assign(e,{[t.chartKey]:t.payload}),collectionConfigurationItem(e,t){let s=!1;const[r,n]=t.chartCollectionIdxKey.split("_"),a=e[r].map(((e,r)=>parseInt(n,10)===r?(s=!0,t.payload):e));return!1===s&&a.splice(parseInt(n,10),0,t.payload),Object.assign(e,{[r]:a})},themeItem(e,t){let s={},r=Object.assign(s,e);const{field:n,value:a}=t.payload,i=n.split(".");let o=i.shift();for(;i.length>0;)s=s[o]=s[o]||{},o=i.shift();return s[o]=a,r}};let Q=class{constructor(e,t){this.value=e.value,this.category=e.category,this.categoryIndex=e.categoryIx,this.series=e.series,this.dataItem=e.dataItem,this.percentage=e.percentage,this.runningTotal=e.runningTotal,this.total=e.total,this.low=e.low,this.high=e.high,this.xLow=e.xLow,this.xHigh=e.xHigh,this.yLow=e.yLow,this.yHigh=e.yHigh,this.point=e,this.format=((e.options||{}).tooltip||{}).format||t}get formattedValue(){return this.format?this.point.formatValue(this.format):String(this.value)}};const ee=e=>{const{categoryText:t,colorMarker:s,colspan:r,nameColumn:n,points:a}=e;return h.createElement("table",null,h.createElement("thead",null,h.createElement("tr",null,h.createElement("th",{colSpan:r},t))),h.createElement("tbody",null,a.map(((e,t)=>h.createElement("tr",{key:t},s&&h.createElement("td",null,h.createElement("span",{className:"k-chart-shared-tooltip-marker",style:{backgroundColor:e.series.color}})),n&&h.createElement("td",null,e.series.name),h.createElement("td",{dangerouslySetInnerHTML:{__html:e.formattedValue}}))))))},te=h.createContext(null);te.displayName="ChartContext";const se={horizontal:"fit",vertical:"fit"},re="k-chart-tooltip",ne=class extends h.Component{constructor(e,t){super(e,t),this.context=null,this.element=null,this.onChartMouseLeave=e=>{const{syntheticEvent:t}=e;return!!d(t.relatedTarget,this.element)},this.onMouseLeave=e=>{const t=z(this,e);this.context.childrenObserver.trigger("onMouseLeave",t)&&e.preventDefault()},this.popupRef=e=>{this.element=e;const t=e&&e.closest(".k-animation-container");t&&(t.style.transition="initial")},this.chartObserver=new n.InstanceObserver(this,{onMouseLeave:"onChartMouseLeave"}),t.observersStore.dispatch({type:"add",payload:this.chartObserver})}render(){const{popupShown:e,popupAlign:t,popupOffset:s,popupStyles:r,popupContent:n,className:a}=this.props,o=[re,a].join(" ").trim();return h.createElement(i.Popup,{animate:!1,popupAlign:t,offset:s,show:e,collision:se,className:"k-chart-tooltip-wrapper"},h.createElement("div",{className:o,style:r,onMouseLeave:this.onMouseLeave,ref:this.popupRef},n()))}componentWillUnmount(){this.context.observersStore.dispatch({type:"remove",payload:this.chartObserver})}};ne.contextType=te;let ae=ne;const ie=class extends h.Component{constructor(){super(...arguments),this.context=null,this.state={popupShown:!1},this.chartObserver=null}componentDidMount(){this.chartObserver=new n.InstanceObserver(this,{showTooltip:"onShowTooltip",hideTooltip:"onHideTooltip"}),this.context.observersStore.dispatch({type:"add",payload:this.chartObserver})}render(){const{popupContext:e,shared:t,className:s,...r}=this.state,n=this.state.popupShown?()=>{const s=this.findRenderFunction();if(t)return null!==s?s(e):h.createElement(ee,{...e});{const t=e.point,r=this.findRenderFunctionByIndex(t.series.index);return null!==r?r(e):null!==s?s(e):h.createElement("span",{dangerouslySetInnerHTML:{__html:e.point.formattedValue}})}}:Function.prototype,i=a.classNames({"k-chart-shared-tooltip":t,"k-chart-tooltip-inverse":!!s});return h.createElement(ae,{...r,popupContent:n,className:i})}componentWillUnmount(){this.context.observersStore.dispatch({type:"remove",payload:this.chartObserver})}onShowTooltip(e){const{anchor:t,style:s,shared:r,className:n,crosshair:a}=e;let i;a||(i=r?this.createSharedTooltipContext(e):this.createTooltipContext(e),this.setState({popupShown:!0,popupAlign:t.align,popupOffset:t.point,popupContext:i,popupStyles:s,className:n,shared:r}))}onHideTooltip(){this.setState({popupShown:!1,popupStyles:{},className:void 0})}createSharedTooltipContext(e){const{points:t,categoryText:s}=e,r=t.filter((e=>void 0!==e.series.name)).length>0,n=e.series.length>1;let a=1;return r&&a++,n&&a++,{categoryText:s,colorMarker:n,colspan:a,nameColumn:r,points:e.points.map((t=>new Q(t,e.format)))}}createTooltipContext(e){const{point:t,format:s}=e;return{point:new Q(t,s)}}findRenderFunctionByIndex(e){const t=this.context.optionsStore.getState().series;return void 0!==t&&Array.isArray(t)&&void 0!==t[e]&&t[e].hasOwnProperty("tooltip")&&t[e].tooltip.hasOwnProperty("render")?t[e].tooltip.render:null}findRenderFunction(){const e=this.context.optionsStore.getState().tooltip;return void 0!==e&&e.hasOwnProperty("render")?e.render:null}};ie.contextType=te;let oe=ie;const le=e=>e.children;le.displayName="Container";const ce=class extends h.Component{constructor(e,t){super(e,t),this.context=null,this.state={popupShown:!1},this.chartObserver=new n.InstanceObserver(this,{showTooltip:"onShowTooltip",hideTooltip:"onHideTooltip"}),t.observersStore.dispatch({type:"add",payload:this.chartObserver})}render(){const{popupContend:e,className:t,...s}=this.state,r=this.state.popupShown?()=>e:Function.prototype,n=a.classNames({"k-chart-crosshair-tooltip":!0,"k-chart-tooltip-inverse":!!t});return h.createElement(ae,{...s,popupContent:r,className:n})}componentWillUnmount(){var e;null==(e=this.context)||e.observersStore.dispatch({type:"remove",payload:this.chartObserver})}onShowTooltip(e){const{anchor:t,style:s,className:r,crosshair:n,axisName:a,axisIndex:i,value:o}=e,{name:l,index:c}=this.props;n&&a===l&&i===c&&this.setState({popupShown:!0,popupAlign:t.align,popupOffset:t.point,popupContend:o,popupStyles:s,className:r})}onHideTooltip(){this.setState({popupShown:!1,popupStyles:{},className:void 0})}};ce.contextType=te;let he=ce;const de=["categoryAxis","valueAxis","xAxis","yAxis"];function pe(e){const t={};for(let s=0;s<de.length;s++){const r=ue(e,de[s]);for(let e=0;e<r.length;e++){const s=r[e];t[s.name+s.index]=s}}return t}function ue(e,t){const s=[];if(e[t]){const r=[].concat(e[t]);for(let e=0;e<r.length;e++){const n=(r[e].crosshair||{}).tooltip;n&&n.visible&&s.push({index:e,name:t})}}return s}const me=class extends h.Component{constructor(){super(...arguments),this.context=null,this.state={tooltips:{}},this.storeUnsubscriber=Function.prototype,this.subscriber=()=>{var e;this.setState({tooltips:pe(null==(e=this.context)?void 0:e.optionsStore.getState())})}}componentDidMount(){this.storeUnsubscriber=this.context.optionsStore.subscribe(this.subscriber)}render(){const{tooltips:e}=this.state,t=Object.keys(e).map((t=>h.createElement(he,{...e[t],key:t})));return h.createElement(le,null,t)}componentWillUnmount(){this.storeUnsubscriber()}};me.contextType=te;let ve=me;const ye={name:"@progress/kendo-react-charts",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:0,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"},ge=class extends h.Component{constructor(e){super(e),this.chartInstance=null,this.surface=null,this._element=null,this.optionsStore={},this.optionsUnsubscriber=Function.prototype,this.themeStore={},this.themeUnsubscriber=Function.prototype,this.observersStore={},this.suppressTransitions=!1,this.showLicenseWatermark=!1,this.onRender=e=>{null!==this.chartInstance&&(this.surface=e.sender.surface,this.trigger("render",e))},this.onDrilldown=e=>{var t;const{series:s}=this.optionsStore.getState(),r=s.find((t=>t.name===e.series.name));if(!r.drilldownSeriesFactory)return!0;const n="onDrilldown";if(this.props.hasOwnProperty(n)){const s={seriesName:r.name,drilldownValue:e.value},a=[...(null==(t=this.props.drilldownState)?void 0:t.steps)||[],s],i=this.props.getTarget(),o={...e,currentState:this.props.drilldownState,nextState:{steps:a}},l=new k(o,i);this.props[n].call(void 0,l)}return!0},this.onLegendItemClick=e=>{if(null!==this.chartInstance)if(this.props.onLegendItemClick)this.trigger("legendItemClick",e);else{const{series:t}=this.optionsStore.getState();if(!t)return;let s={};const{seriesIndex:r,pointIndex:n}=e,a=t[r];if(void 0===n)s=Object.assign({},a,{visible:u(a.visible)});else{const e=a.pointVisibility=a.pointVisibility||[];e[n]=u(e[n]),s=Object.assign({},a)}this.optionsStore.dispatch({chartCollectionIdxKey:`series_${r}`,payload:s}),this.suppressTransitions=!0}},this.onWindowResize=()=>{null!==this.chartInstance&&this.chartInstance.resize()},this.onChartMouseLeave=e=>{const t=z(this,e);this.triggerDomEvent("onMouseLeave",t)?e.preventDefault():null!==this.chartInstance&&this.chartInstance.hideElements()},this.onChildMouseLeave=e=>{const{syntheticEvent:t}=e;return this.chartInstance&&!d(t.relatedTarget,this.element)&&this.chartInstance.hideElements(),!1},a.validatePackage(ye),this.showLicenseWatermark=a.shouldShowValidationUI(ye),this.optionsStore=Y(W),this.observersStore=Y(G),this.childrenObserver=new n.InstanceObserver(this,{onMouseLeave:"onChildMouseLeave"}),this.state={optionsStore:this.optionsStore,observersStore:this.observersStore,childrenObserver:this.childrenObserver,drilldownState:{steps:[]}},this.themeStore=Y(Z),this.chartObserver=new n.InstanceObserver(this,{render:"onRender",legendItemClick:"onLegendItemClick",drilldown:"onDrilldown"})}get element(){return this._element}static getDerivedStateFromProps(e,t){return{...t,drilldownState:e.drilldownState||[]}}componentDidMount(){var e;const t=(null==(e=this._element)?void 0:e.ownerDocument)||document;((e,t,s)=>{const r=new X(e);if(void 0===s)return void e.dispatch({type:"push",payload:n.chartBaseTheme()});const a=r.element=s.createElement("div");a.style.display="none",a.innerHTML=$,s.body.appendChild(a);try{e.dispatch({type:"push",payload:n.chartBaseTheme()}),r.setColors(),r.setFonts(),r.setSeriesColors()}finally{s.body.removeChild(r.element),delete r.element,t()}})(this.themeStore,this.instantiateCoreChart.bind(this),t),this.optionsUnsubscriber=this.optionsStore.subscribe(this.refresh.bind(this)),this.themeUnsubscriber=this.themeStore.subscribe(this.refresh.bind(this)),window.addEventListener("resize",this.onWindowResize)}componentWillUnmount(){this.optionsUnsubscriber(),this.themeUnsubscriber(),null!==this.chartInstance&&(this.chartInstance.destroy(),this.chartInstance=null),window.removeEventListener("resize",this.onWindowResize)}componentDidUpdate(e){const{dir:t,children:s,...n}=this.props;if(null!==this.chartInstance){const s=r.provideIntlService(this),a=this.chartInstance.chartService,i=s.locale!==a._intlService.locale,o=Object.entries(e).filter((e=>"dir"!==e[0]&&"children"!==e[0])).some((e=>{const[t,s]=e;return!(n.hasOwnProperty(t)&&n[t]===s)}));i&&(this.chartInstance.chartService._intlService=s,this.chartInstance.chartService.format._intlService=s,o||this.chartInstance.noTransitionsRedraw()),o&&this.refresh(),e.dir!==t&&this.chartInstance.setDirection(this.getDirection(t))}}render(){const{style:e={},className:t,wrapper:s,children:r}=this.props,n=Object.assign({},e,{position:"relative"}),i=h.createElement(s,{className:t,style:n,key:"chartElement"},h.createElement("div",{onMouseLeave:this.onChartMouseLeave,ref:e=>this._element=e,className:"k-chart-surface"},r),h.createElement(h.Fragment,null,this.showLicenseWatermark&&h.createElement(a.WatermarkOverlay,null)));return h.createElement(te.Provider,{value:this.state},h.createElement(oe,{key:"seriesTooltip"}),h.createElement(ve,{key:"crosshairTooltips"}),i)}getDirection(e){return"rtl"===(void 0!==e?e:a.canUseDOM&&window.getComputedStyle(this.element).direction||"ltr")}getChartOptions(){const{renderAs:e,pannable:t,zoomable:s,paneDefaults:r,panes:n,transitions:a,seriesColors:i,seriesDefaults:o,axisDefaults:l,deriveOptionsFromParent:c}=this.props;let h={};return void 0!==e&&(h.renderAs=e),void 0!==t&&(h.pannable=t),void 0!==s&&(h.zoomable=s),void 0!==r&&(h.paneDefaults=r),void 0!==n&&(h.panes=n),void 0!==a&&(h.transitions=a),void 0!==i&&(h.seriesColors=i),void 0!==o&&(h.seriesDefaults=o),void 0!==l&&(h.axisDefaults=l),h=Object.assign(h,this.optionsStore.getState()),c&&(h=c(h)),h}refresh(){if(null!==this.chartInstance){const e=this.themeStore.getState(),t=this.getChartOptions(),s=t.transitions;this.suppressTransitions&&(t.transitions=!1),this.props.onRefresh?this.props.onRefresh.call(void 0,t,e,this.chartInstance):this.chartInstance.setOptions(t,e),this.suppressTransitions&&(t.transitions=s,this.suppressTransitions=!1)}}instantiateCoreChart(){const{dir:e,chartConstructor:t}=this.props,s=this.getChartOptions();this.chartInstance=new t(this.element,s,this.themeStore.getState(),{rtl:this.getDirection(e),intlService:r.provideIntlService(this),observer:this.chartObserver,sender:this})}trigger(e,t){const s=function(e,t,s){if(V[e])return new V[e](t,s)}(e,t,this.props.getTarget()),r="on"+e.charAt(0).toUpperCase()+e.slice(1),n=this.observersStore.getState();let a=!1;for(let s=0;s<n.length;s++)n[s].trigger(e,t)&&(a=!0);return!1===a&&s&&this.props.hasOwnProperty(r)?(this.props[r].call(void 0,s),s.isDefaultPrevented&&s.isDefaultPrevented()):a}requiresHandlers(e){for(let t=0;t<e.length;t++){const s=e[t],r="on"+s.charAt(0).toUpperCase()+s.slice(1);if(this.props.hasOwnProperty(r))return!0}return!1}triggerDomEvent(e,t){const s=this.observersStore.getState();let r=!1;for(let n=0;n<s.length;n++)s[n].trigger(e,t)&&(r=!0);return r}};ge.propTypes={dir:s.string,renderAs:s.oneOf(["svg","canvas"])},ge.defaultProps={renderAs:"svg"};let fe=ge;r.registerForIntl(fe),n.DomEventsBuilder.register(class{static create(e,t){if("undefined"!=typeof window){const s=window.Hammer;if(!s)return void("production"!==process.env.NODE_ENV&&console.warn("Hammerjs is not loaded.Solution: http://www.telerik.com/kendo-react-ui/components/charts/troubleshooting/#toc-installation"));const r=new s(e,{recognizers:[[s.Tap],[s.Pan],[s.Pinch],[s.Press,{time:0}]]});return new g(r,t)}}});const be=class extends h.Component{constructor(e,t){super(e,t),this.context=null,this.state={donutCenterStyles:null},this.chartObserver=new n.InstanceObserver(this,{render:"onRender"}),t.observersStore.dispatch({type:"add",payload:this.chartObserver})}render(){const{render:e}=this.props,{donutCenterStyles:t}=this.state;let s=null;return e&&t&&(s=h.createElement("div",{className:"k-chart-donut-center",style:t},h.createElement(e,null))),s}onRender(e){var t;const s=null==(t=this.context)?void 0:t.optionsStore.getState().series,r=Array.isArray(s)?s[0]:null,n=e.sender._plotArea.charts;if(!r||"donut"!==r.type||0===n[0].points.length)return;const a=n[0].points[0].sector,i=a.innerRadius,o=a.center.y-i,l=a.center.x-i,c=2*i;this.setState({donutCenterStyles:{height:c,left:l,top:o,width:c}})}};be.contextType=te;let Ce=be,xe=class extends h.Component{constructor(){super(...arguments),this._baseChart=null,this.getTarget=()=>this}get chartInstance(){return null!==this._baseChart?this._baseChart.chartInstance:null}get surface(){return null!==this._baseChart?this._baseChart.surface:null}get element(){return null!==this._baseChart?this._baseChart.element:null}render(){const{donutCenterRender:e,children:t,className:s,...r}=this.props;return h.createElement(fe,{...r,ref:e=>this._baseChart=e,chartConstructor:n.Chart,getTarget:this.getTarget,wrapper:"div",className:a.classNames("k-chart k-widget",s)},t,h.createElement(Ce,{render:e}))}},Se=class extends h.Component{constructor(){super(...arguments),this._baseChart=null,this.deriveOptionsFromParent=e=>{const{type:t,data:s}=this.props,r=Object.assign({},e,{type:t,data:s});return n.Sparkline.normalizeOptions(r)},this.getTarget=()=>this}get chartInstance(){return null!==this._baseChart?this._baseChart.chartInstance:null}get surface(){return null!==this._baseChart?this._baseChart.surface:null}get element(){return null!==this._baseChart?this._baseChart.element:null}render(){const{children:e,type:t,className:s,...r}=this.props;return h.createElement(fe,{...r,ref:e=>this._baseChart=e,chartConstructor:n.Sparkline,getTarget:this.getTarget,wrapper:"span",deriveOptionsFromParent:this.deriveOptionsFromParent,className:a.classNames("k-sparkline k-widget",s)},e)}};const Ee={autoBindElements:!0,liveDrag:!1,partialRedraw:!0};let ke=class extends h.Component{constructor(){super(...arguments),this._baseChart=null,this.deriveOptionsFromParent=e=>{const t=Object.assign({},e.navigator||{},Ee);return Object.assign({},e,{navigator:t})},this.onRefresh=(e,t,s)=>{this.props.partialRedraw?(s.applyOptions(e),s.bindCategories(),s.navigator.redrawSlaves()):s.setOptions(e,t)},this.getTarget=()=>this}get chartInstance(){return null!==this._baseChart?this._baseChart.chartInstance:null}get surface(){return null!==this._baseChart?this._baseChart.surface:null}get element(){return null!==this._baseChart?this._baseChart.element:null}render(){const{children:e,className:t,...s}=this.props;return h.createElement(fe,{...s,ref:e=>this._baseChart=e,chartConstructor:n.StockChart,getTarget:this.getTarget,wrapper:"div",deriveOptionsFromParent:this.deriveOptionsFromParent,onRefresh:this.onRefresh,className:a.classNames("k-stockchart k-widget",t)},e)}};const Ie=class extends h.Component{constructor(e,t){super(e,t),this.optionsStore=t.optionsStore}renderChildren(e,t){const{children:s}=e.props,{_chartKey:r,_parentStore:n}=this.props,a={...e.props,_chartCollectionIdxKey:`${r}_${t}`,_parentStore:n};return h.cloneElement(e,a,s)}render(){const{_chartKey:e,_parentStore:t,children:s}=this.props;return(t||this.optionsStore).dispatch({chartKey:e,payload:[]}),h.Children.map(s,((e,t)=>h.isValidElement(e)?this.renderChildren(e,t):e))}};Ie.contextType=te;let we=Ie;const _e=class extends h.Component{constructor(e,t){super(e,t),this.optionsStore=t.optionsStore,this.childStore=Y(W)}render(){const{children:e}=this.props;return void 0!==e?h.Children.map(e,(e=>h.isValidElement(e)?this.renderChildren(e):e)):null}componentDidMount(){this.dispatch()}componentDidUpdate(){this.dispatch()}dispatch(){const{_chartKey:e,_chartCollectionIdxKey:t,_parentStore:s,children:r,...n}=this.props;(s||this.optionsStore).dispatch({chartKey:e,chartCollectionIdxKey:t,payload:Object.assign({},n,this.childStore.getState())})}renderChildren(e){const{children:t}=e.props,s={...e.props,_parentStore:this.childStore};return h.cloneElement(e,s,t)}};_e.contextType=te;let De=_e,Ne=class{constructor(e){this.currentState=e.currentState,this.nextState=e.nextState}};const Te=h.forwardRef(((e,t)=>{const s=h.useRef(null),r=h.useRef(null);h.useImperativeHandle(s,(()=>({element:r.current,props:e}))),h.useImperativeHandle(t,(()=>s.current));let n=[{id:"0",...e.rootItem||{text:"Home",icon:h.createElement(a.SvgIcon,{icon:l.homeIcon,style:{marginInlineEnd:"4px"}})}}];e.drilldownState&&(n=[...n,...e.drilldownState.steps.map(((e,t)=>({id:(t+1).toString(),text:e.drilldownValue})))]);const i={...e,data:n};return h.createElement("div",null,h.createElement(o.Breadcrumb,{...i,onItemSelect:t=>{var s;const r="onDrilldownStateChange";if(e.hasOwnProperty(r)){const a=n.findIndex((e=>e.id===t.id)),i={steps:((null==(s=e.drilldownState)?void 0:s.steps)||[]).slice(0,a)},o=new Ne({currentState:e.drilldownState,nextState:i});e[r].call(void 0,o)}}}))})),Ae={id:s.string,style:s.object,className:s.string,breadcrumbOrderedList:s.elementType,breadcrumbListItem:s.elementType,breadcrumbDelimiter:s.elementType,breadcrumbLink:s.elementType,dir:s.oneOf(["ltr","rtl"]),disabled:s.bool,valueField:s.string,textField:s.string,iconField:s.string,iconClassField:s.string,onItemSelect:s.func,ariaLabel:s.string,onDrilldownStateChange:s.func,drilldownState:s.shape({steps:s.array}),rootItem:s.object};Te.displayName="KendoReactChartBreadcrumb",Te.propTypes=Ae,Te.defaultProps={valueField:"id",textField:"text",iconField:"icon",iconClassField:"iconClass",data:[]};const Oe=e=>h.createElement(De,{...e,_chartKey:"title"});Oe.displayName="ChartAxisDefaultsTitle";const Ke=e=>h.createElement(De,{...e,_chartKey:"labels"});Ke.displayName="ChartAxisDefaultsLabels";const Le=e=>h.createElement(De,{visible:!0,...e,_chartKey:"crosshair"});Le.displayName="ChartAxisDefaultsCrosshair";const Re=e=>h.createElement(De,{visible:!0,...e,_chartKey:"tooltip"});Re.displayName="ChartAxisDefaultsCrosshairTooltip";const Pe=e=>h.createElement(De,{...e,_chartKey:"title"});Pe.displayName="ChartCategoryAxisTitle";const Fe=e=>h.createElement(De,{...e,_chartKey:"title"});Fe.displayName="ChartPaneDefaultsTitle";const je=e=>h.createElement(De,{...e,_chartKey:"item"});je.displayName="ChartLegendItem";const qe=e=>h.createElement(De,{...e,_chartKey:"title"});qe.displayName="ChartLegendTitle";const He=e=>h.createElement(De,{...e,_chartKey:"inactiveItems"});He.displayName="ChartLegendInactiveItems";const Ve=e=>h.createElement(De,{...e,_chartKey:"title"});Ve.displayName="ChartValueAxisTitle";const Me=e=>h.createElement(De,{...e,_chartKey:"title"});Me.displayName="ChartXAxisTitle";const ze=e=>h.createElement(De,{...e,_chartKey:"title"});ze.displayName="ChartYAxisTitle";const Ue=e=>h.createElement(De,{...e,_chartKey:"categoryAxis"});Ue.displayName="ChartNavigatorCategoryAxis";const Be=e=>h.createElement(De,{...e,_chartKey:"pane"});Be.displayName="ChartNavigatorPane";const $e=e=>h.createElement(De,{...e});$e.displayName="ChartNavigatorSeriesItem";const Xe=e=>h.createElement(we,{...e,_chartKey:"series"});Xe.propTypes={children:function(e,t,s){return p(e,t,s,$e)}};const Ye=e=>h.createElement(De,{...e});Ye.displayName="ChartCategoryAxisItem";const We=e=>h.createElement(we,{...e,_chartKey:"categoryAxis"});We.propTypes={children:function(e,t,s){return p(e,t,s,Ye)}};const Ze=e=>h.createElement(De,{...e});Ze.displayName="ChartPane";const Ge=e=>h.createElement(De,{...e,_chartKey:"paneDefaults"});Ge.displayName="ChartPaneDefaults";const Je=e=>h.createElement(we,{...e,_chartKey:"panes"});Je.propTypes={children:function(e,t,s){return p(e,t,s,Ze)}};const Qe=e=>{let t=e=>h.createElement(h.Fragment,null);e.drilldownSeriesFactory&&(t=e.drilldownSeriesFactory);const s=t=>{var s,r;return t&&(null==(r=null==(s=t.drilldownState)?void 0:s.steps)?void 0:r.find((({seriesName:t})=>t===e.name)))};return h.createElement(te.Consumer,null,(r=>s(r)?h.createElement(t,{_chartCollectionIdxKey:e._chartCollectionIdxKey,drilldownValue:s(r).drilldownValue}):h.createElement(De,{...e})))};Qe.displayName="ChartSeriesItem";const et=e=>h.createElement(we,{...e,_chartKey:"series"});et.propTypes={children:function(e,t,s){return p(e,t,s,Qe)}};const tt=e=>h.createElement(De,{...e});tt.displayName="ChartValueAxisItem";const st=e=>h.createElement(we,{...e,_chartKey:"valueAxis"});st.propTypes={children:function(e,t,s){return p(e,t,s,tt)}};const rt=e=>h.createElement(De,{...e});rt.displayName="ChartXAxisItem";const nt=e=>h.createElement(we,{...e,_chartKey:"xAxis"});nt.prototype={children:function(e,t,s){return p(e,t,s,rt)}};const at=e=>h.createElement(De,{...e});at.displayName="ChartYAxisItem";const it=e=>h.createElement(we,{...e,_chartKey:"yAxis"});it.propTypes={children:function(e,t,s){return p(e,t,s,at)}};const ot=e=>`${e.fontWeight} ${e.fontSize} ${e.fontFamily}`,lt=e=>window.getComputedStyle(e).backgroundColor,ct=`\n <div class="k-var--background"></div>\n <div class="k-var--normal-text-color"></div>\n <div class="k-var--chart-major-lines"></div>\n\n <div class="k-widget k-chart">\n <div class="k-var--chart-font"></div>\n <div class="k-var--chart-title-font"></div>\n </div>\n <div class="k-var--series-unset"></div>\n <div class="k-var--series">\n ${(()=>{let e='\n <div class="k-var--series-a"></div>\n <div class="k-var--series-b"></div>\n <div class="k-var--series-c"></div>\n <div class="k-var--series-d"></div>\n <div class="k-var--series-e"></div>\n <div class="k-var--series-f"></div>\n';for(let t=0;t<30;t++)e+=`\n <div class="k-var--series-${t+1}"></div>`;return e})()}\n </div>\n`;class ht{constructor(e){this.store=e}setStyle(e,t){const s=e.split(".");let r=this.store;s.forEach(((e,t,s)=>{t<s.length-1&&(r=r[e]=r[e]||{})}));const n=s.pop();n&&(r[n]=t)}setColors(){this.mapColor("labels.color","normal-text-color"),this.mapColor("labels.stroke.color","background"),this.mapColor("links.color","chart-major-lines"),this.mapColor("legend.labels.color","normal-text-color"),this.mapColor("title.color","normal-text-color")}setFonts(){const e=ot(this.queryStyle("chart-title-font")),t=ot(this.queryStyle("chart-font"));this.setStyle("title.font",e),this.setStyle("labels.font",t),this.setStyle("legend.labels.font",t)}setNodeColors(){const e=this.element;if(!e)return;const t=[].slice.call(e.querySelectorAll(".k-var--series div")),s=lt(e.querySelector(".k-var--series-unset")),r=t.reduce(((e,t)=>{const r=(e=>{const t=e.match(/series-([a-z])$/);if(null!==t)return(e=>e.toLowerCase().charCodeAt(0)-97)(t[1]);const s=e.split("--series-")[1];return parseInt(s,10)-1})(t.className),n=lt(t);return n!==s&&(e[r]=n),e}),[]);this.setStyle("nodeColors",r)}mapColor(e,t){this.setStyle(e,this.queryStyle(t).backgroundColor)}queryStyle(e){const t=this.element;return window.getComputedStyle(t.querySelector(`.k-var--${e}`))}}const dt=(e,t)=>{const s={nodeColors:[]},r=new ht(s),n=r.element=e.createElement("div");n.style.display="none",n.innerHTML=ct,e.body.appendChild(n);try{r.setColors(),r.setFonts(),r.setNodeColors()}finally{e.body.removeChild(r.element),r.element=null,t(s)}},pt=s.exact({left:s.number,top:s.number}),ut={left:s.number,right:s.number},mt={...ut,top:s.number,bottom:s.number},vt=s.oneOfType([s.number,s.exact(mt)]),yt=vt,gt=s.exact({width:s.number,color:s.string,opacity:s.number,dashType:s.string}),ft={visible:s.bool,font:s.string,color:s.string,opacity:s.number,align:s.oneOf(["left","right","center"]),position:s.oneOf(["inside","before","after"]),padding:yt,margin:s.exact(ut),border:gt,offset:pt},bt={color:s.string,opacity:s.number,offset:pt,padding:s.number,width:s.number},Ct={colorType:s.oneOf(["static","source","target"]),color:s.string,opacity:s.number,highlight:s.exact({opacity:s.number,inactiveOpacity:s.number})},xt=s.exact({text:s.string,...ft}),St=s.exact({id:s.oneOfType([s.string,s.number]).isRequired,label:xt.isRequired,...bt}),Et=s.exact({sourceId:s.oneOfType([s.string,s.number]).isRequired,targetId:s.oneOfType([s.string,s.number]).isRequired,value:s.number.isRequired,...Ct}),kt={data:s.exact({nodes:s.arrayOf(St.isRequired).isRequired,links:s.arrayOf(Et.isRequired).isRequired}).isRequired,links:s.exact(Ct),nodes:s.exact(bt),labels:s.exact(ft),legend:s.exact({align:s.oneOf(["start","center","end"]),background:s.string,border:gt,height:s.number,labels:s.object,margin:vt,offsetX:s.number,offsetY:s.number,orientation:s.oneOf(["vertical","horizontal"]),padding:yt,position:s.oneOf(["top","bottom","left","right","custom"]),reverse:s.bool,visible:s.bool,width:s.number,item:s.object,title:s.object}),title:s.exact({align:s.oneOf(["center","left","right"]),background:s.string,border:gt,color:s.string,font:s.string,margin:vt,padding:yt,position:s.oneOf(["top","bottom"]),text:s.string,visible:s.bool}),tooltip:s.exact({visible:s.bool,offset:s.number,followPointer:s.bool,delay:s.number,linkComponent:s.any,nodeComponent:s.any}),className:s.string,style:s.object,disableAutoLayout:s.bool,onNodeEnter:s.func,onNodeLeave:s.func,onLinkEnter:s.func,onLinkLeave:s.func,onNodeClick:s.func,onLinkClick:s.func},It="sankey.tooltipUnitFormat",wt={[It]:"({0} units)"},_t=e=>{const{Content:t,offset:s,event:{tooltipData:r,dataItem:n,nodeValue:a}}=e,i=h.useRef(null);return h.useEffect((()=>{const e=i.current;if(!r||!e)return;const t=e.offsetWidth,n=e.offsetHeight,a={...r.popupOffset},o=r.popupAlign;a.left+="left"===o.horizontal?s:-1*s,"right"===o.horizontal&&(a.left-=t),"bottom"===o.vertical?a.top-=n+s:a.top+=s,e.style.left=`${a.left}px`,e.style.top=`${a.top}px`,e.style.visibility=""}),[r]),h.createElement("div",{ref:i,style:{visibility:"hidden"},className:"k-tooltip k-sankey-tooltip k-chart-tooltip k-chart-shared-tooltip"},h.createElement("div",{className:"k-tooltip-content"},h.createElement(t,{dataItem:n,nodeValue:a})))},Dt={display:"flex",alignItems:"center"},Nt=e=>h.createElement("div",{style:{width:15,height:15,backgroundColor:e.color,display:"inline-flex",marginLeft:3}}),Tt=e=>h.createElement("span",{style:{margin:"0 3px"}},e.children),At=e=>r.useInternationalization().format(r.useLocalization().toLanguageString(It,wt[It]),[e||0]),Ot=e=>{const{color:t,label:s}=e.dataItem;return h.createElement("div",{style:Dt,className:"k-tooltip-content"},h.createElement(Nt,{color:t}),h.createElement(Tt,null,s.text),h.createElement(Tt,null,At(e.nodeValue)))},Kt=e=>{const{source:t,target:s,value:r}=e.dataItem;return h.createElement("div",{style:Dt},h.createElement(Nt,{color:t.color}),h.createElement(Tt,null,t.label.text),h.createElement(a.IconWrap,{icon:l.arrowRightIcon,name:"arrow-right"}),h.createElement(Nt,{color:s.color}),h.createElement(Tt,null,s.label.text),h.createElement(Tt,null,At(r)))},Lt=12,Rt=["nodeEnter","nodeLeave","linkEnter","linkLeave","nodeClick","linkClick"],Pt=h.forwardRef(((e,t)=>{a.validatePackage(ye);const s=h.useRef(null),r=h.useRef(null),i=h.useRef(null),{data:o,links:l,nodes:c,labels:d,title:p,legend:u,tooltip:m,disableAutoLayout:v}=e,[y,g]=h.useState(null),{followPointer:f,delay:b,offset:C=Lt}=m||{},x=h.useRef();x.current=m;const S=h.useCallback((e=>{const{visible:t=!0,nodeComponent:s=Ot,linkComponent:r=Kt}=x.current||{};if(t){const t={event:e,offset:C,Content:"node"===e.targetType?s:r};g(t)}}),[C]),E=h.useCallback((()=>{g(null)}),[]);h.useEffect((()=>{const e={data:o,links:l,nodes:c,labels:d,title:p,legend:u,disableAutoLayout:v,tooltip:{delay:b,followPointer:f}};return r.current?r.current.setOptions(e):a.canUseDOM&&s.current&&dt(s.current.ownerDocument,(t=>{r.current=new n.Sankey(s.current,e,t)})),()=>{r.current&&(r.current.destroy(),r.current=null)}}),[o,l,c,d,p,u,v,f,b]),h.useImperativeHandle(i,(()=>({get element(){return s.current},exportVisual:e=>r.current.exportVisual(e),props:e})),[]),h.useImperativeHandle(t,(()=>i.current));const k=h.useCallback((e=>e&&(t=>{Object.defineProperty(t,"target",{get:()=>i.current}),t.nativeEvent=t.originalEvent||null,e.call(void 0,t)})),[]);return h.useEffect((()=>{const t=r.current;((e,t)=>{e&&(e.unbind(),Rt.forEach((s=>{t[s]&&e.bind(s,t[s])})))})(t,{nodeEnter:k(e.onNodeEnter),nodeLeave:k(e.onNodeLeave),linkEnter:k(e.onLinkEnter),linkLeave:k(e.onLinkLeave),nodeClick:k(e.onNodeClick),linkClick:k(e.onLinkClick)}),t&&(t.bind("tooltipShow",S),t.bind("tooltipHide",E))}),[e.onNodeEnter,e.onNodeLeave,e.onLinkEnter,e.onLinkLeave]),h.createElement(h.Fragment,null,h.createElement("div",{ref:s,className:e.className,style:e.style}),y&&h.createElement(_t,{...y}))}));Pt.propTypes=kt,Pt.displayName="KendoReactSankey";const Ft=n.createSankeyData;e.AxisLabelClickEvent=b,e.Chart=xe,e.ChartArea=e=>h.createElement(De,{...e,_chartKey:"chartArea"}),e.ChartAxisDefaults=e=>h.createElement(De,{...e,_chartKey:"axisDefaults"}),e.ChartAxisDefaultsCrosshair=Le,e.ChartAxisDefaultsCrosshairTooltip=Re,e.ChartAxisDefaultsLabels=Ke,e.ChartAxisDefaultsTitle=Oe,e.ChartBreadcrumb=Te,e.ChartCategoryAxis=We,e.ChartCategoryAxisCrosshair=e=>h.createElement(De,{visible:!0,...e,_chartKey:"crosshair"}),e.ChartCategoryAxisCrosshairTooltip=e=>h.createElement(De,{visible:!0,...e,_chartKey:"tooltip"}),e.ChartCategoryAxisItem=Ye,e.ChartCategoryAxisLabels=e=>h.createElement(De,{visible:!0,...e,_chartKey:"labels"}),e.ChartCategoryAxisNotes=e=>h.createElement(De,{...e,_chartKey:"notes"}),e.ChartCategoryAxisNotesIcon=e=>h.createElement(De,{...e,_chartKey:"icon"}),e.ChartCategoryAxisNotesLabel=e=>h.createElement(De,{...e,_chartKey:"label"}),e.ChartCategoryAxisRangeLabels=e=>h.createElement(De,{visible:!0,...e,_chartKey:"rangeLabels"}),e.ChartCategoryAxisTitle=Pe,e.ChartLegend=e=>h.createElement(De,{visible:!0,...e,_chartKey:"legend"}),e.ChartLegendInactiveItems=He,e.ChartLegendItem=je,e.ChartLegendTitle=qe,e.ChartNavigator=e=>h.createElement(De,{visible:!0,position:"bottom",...e,_chartKey:"navigator"}),e.ChartNavigatorCategoryAxis=Ue,e.ChartNavigatorHint=e=>h.createElement(De,{...e,_chartKey:"hint"}),e.ChartNavigatorPane=Be,e.ChartNavigatorSelect=e=>h.createElement(De,{...e,_chartKey:"select"}),e.ChartNavigatorSeries=Xe,e.ChartNavigatorSeriesItem=$e,e.ChartPane=Ze,e.ChartPaneDefaults=Ge,e.ChartPaneDefaultsTitle=Fe,e.ChartPanes=Je,e.ChartPlotArea=e=>h.createElement(De,{...e,_chartKey:"plotArea"}),e.ChartSeries=et,e.ChartSeriesDefaults=e=>h.createElement(De,{...e,_chartKey:"seriesDefaults"}),e.ChartSeriesErrorBars=e=>h.createElement(De,{...e,_chartKey:"errorBars"}),e.ChartSeriesExtremes=e=>h.createElement(De,{...e,_chartKey:"extremes"}),e.ChartSeriesHighlight=e=>h.createElement(De,{...e,_chartKey:"highlight"}),e.ChartSeriesItem=Qe,e.ChartSeriesItemOutliers=e=>h.createElement(De,{...e,_chartKey:"outliers"}),e.ChartSeriesItemTooltip=e=>h.createElement(De,{...e,_chartKey:"tooltip"}),e.ChartSeriesLabels=e=>h.createElement(De,{visible:!0,...e,_chartKey:"labels"}),e.ChartSeriesLabelsFrom=e=>h.createElement(De,{...e,_chartKey:"from"}),e.ChartSeriesLabelsTo=e=>h.createElement(De,{...e,_chartKey:"to"}),e.ChartSeriesMarkers=e=>h.createElement(De,{...e,_chartKey:"markers"}),e.ChartSeriesNotes=e=>h.createElement(De,{...e,_chartKey:"notes"}),e.ChartSeriesNotesIcon=e=>h.createElement(De,{...e,_chartKey:"icon"}),e.ChartSeriesNotesLabel=e=>h.createElement(De,{...e,_chartKey:"label"}),e.ChartSubtitle=e=>h.createElement(De,{...e,_chartKey:"subtitle"}),e.ChartTitle=e=>h.createElement(De,{...e,_chartKey:"title"}),e.ChartTooltip=e=>h.createElement(De,{visible:!0,...e,_chartKey:"tooltip"}),e.ChartValueAxis=st,e.ChartValueAxisCrosshair=e=>h.createElement(De,{visible:!0,...e,_chartKey:"crosshair"}),e.ChartValueAxisCrosshairTooltip=e=>h.createElement(De,{visible:!0,...e,_chartKey:"tooltip"}),e.ChartValueAxisItem=tt,e.ChartValueAxisLabels=e=>h.createElement(De,{visible:!0,...e,_chartKey:"labels"}),e.ChartValueAxisNotes=e=>h.createElement(De,{...e,_chartKey:"notes"}),e.ChartValueAxisNotesIcon=e=>h.createElement(De,{...e,_chartKey:"icon"}),e.ChartValueAxisNotesLabel=e=>h.createElement(De,{...e,_chartKey:"label"}),e.ChartValueAxisTitle=Ve,e.ChartXAxis=nt,e.ChartXAxisCrosshair=e=>h.createElement(De,{visible:!0,...e,_chartKey:"crosshair"}),e.ChartXAxisCrosshairTooltip=e=>h.createElement(De,{visible:!0,...e,_chartKey:"tooltip"}),e.ChartXAxisItem=rt,e.ChartXAxisLabels=e=>h.createElement(De,{visible:!0,...e,_chartKey:"labels"}),e.ChartXAxisNotes=e=>h.createElement(De,{...e,_chartKey:"notes"}),e.ChartXAxisNotesIcon=e=>h.createElement(De,{...e,_chartKey:"icon"}),e.ChartXAxisNotesLabel=e=>h.createElement(De,{...e,_chartKey:"label"}),e.ChartXAxisTitle=Me,e.ChartYAxis=it,e.ChartYAxisCrosshair=e=>h.createElement(De,{visible:!0,...e,_chartKey:"crosshair"}),e.ChartYAxisCrosshairTooltip=e=>h.createElement(De,{visible:!0,...e,_chartKey:"tooltip"}),e.ChartYAxisItem=at,e.ChartYAxisLabels=e=>h.createElement(De,{visible:!0,...e,_chartKey:"labels"}),e.ChartYAxisNotes=e=>h.createElement(De,{...e,_chartKey:"notes"}),e.ChartYAxisNotesIcon=e=>h.createElement(De,{...e,_chartKey:"icon"}),e.ChartYAxisNotesLabel=e=>h.createElement(De,{...e,_chartKey:"label"}),e.ChartYAxisTitle=ze,e.ChartZoomable=e=>h.createElement(De,{...e,_chartKey:"zoomable"}),e.CollectionConfigurationComponent=we,e.ConfigurationComponent=De,e.CrosshairTooltip=he,e.CrosshairTooltipContainer=ve,e.DonutCenter=Ce,e.DragEndEvent=S,e.DragEvent=x,e.DragStartEvent=E,e.DrilldownEvent=k,e.DrilldownStateChangeEvent=Ne,e.LegendItemClickEvent=w,e.LegendItemHoverEvent=I,e.NavigatorFilterEvent=_,e.NoteClickEvent=D,e.NoteHoverEvent=N,e.PlotAreaClickEvent=T,e.PlotAreaHoverEvent=A,e.RenderEvent=O,e.Sankey=Pt,e.SelectEndEvent=L,e.SelectEvent=K,e.SelectStartEvent=R,e.SeriesClickEvent=P,e.SeriesHoverEvent=F,e.SeriesTooltip=oe,e.SharedTooltipContent=ee,e.Sparkline=Se,e.StockChart=ke,e.TooltipPoint=Q,e.TooltipPopup=ae,e.ZoomEndEvent=q,e.ZoomEvent=j,e.ZoomStartEvent=H,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)}}));
8
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("prop-types"),require("@progress/kendo-react-intl"),require("@progress/kendo-charts"),require("@progress/kendo-react-common"),require("@progress/kendo-react-popup"),require("@progress/kendo-react-layout"),require("@progress/kendo-svg-icons")):"function"==typeof define&&define.amd?define(["exports","react","prop-types","@progress/kendo-react-intl","@progress/kendo-charts","@progress/kendo-react-common","@progress/kendo-react-popup","@progress/kendo-react-layout","@progress/kendo-svg-icons"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactCharts={},e.React,e.PropTypes,e.KendoReactIntl,e.KendoCharts,e.KendoReactCommon,e.KendoReactPopup,e.KendoReactLayout,e.KendoSvgIcons)}(this,(function(e,t,s,r,n,a,i,o,l){"use strict";function c(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(s){if("default"!==s){var r=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,r.get?r:{enumerable:!0,get:function(){return e[s]}})}})),t.default=e,Object.freeze(t)}var h=c(t);function d(e,t){let s=e;for(;s&&s!==t;)s=s.parentNode;return!!s}function p(e,t,s,r){const n=e[t];if(n&&Array.isArray(n))for(let e of n)if(!e.type||e.type!==r)return new Error(`${s} children should be Array of type ${r.displayName}.`);return null}const u=e=>void 0!==e&&!e,m=e=>({x:{location:e.pageX},y:{location:e.pageY}});function v(e,t){for(let s=0;s<e.length;s++)if(t[e[s]])return!0;return!1}const y=[{end:"panend",move:"panmove",start:"panstart"},{gesturechange:"pinchmove",gestureend:"pinchend",gesturestart:"pinchstart"},{press:"press"},{tap:"tap"}];let g=class{constructor(e,t){this.hammerInstance=e,this.eventHandlers={},this.tap=this.tap.bind(this),this.press=this.press.bind(this),this.panstart=this.panstart.bind(this),this.panmove=this.panmove.bind(this),this.panend=this.panend.bind(this),this.pinchstart=this.pinchstart.bind(this),this.pinchmove=this.pinchmove.bind(this),this.pinchend=this.pinchend.bind(this),t&&this.bind(t)}tap(e){this.trigger("tap",e)}press(e){this.trigger("press",e)}panstart(e){delete this.previous,this.previous=this.trigger("start",e)}panmove(e){this.previous=this.trigger("move",e)}panend(e){this.trigger("end",e),delete this.previous}pinchstart(e){this.trigger("gesturestart",e)}pinchmove(e){this.trigger("gesturechange",e)}pinchend(e){this.trigger("gestureend",e)}trigger(e,t){const s=((e,t)=>{const s=e.pointers,r=s[0],n=r.pageX,a=r.pageY;let i=0;if(s.length>1){const e=s[0],t=s[1];i=Math.sqrt(Math.pow(e.pageX-t.pageX,2)+Math.pow(e.pageY-t.pageY,2))}return{distance:i,event:e.srcEvent,preventDefault:function(){e.preventDefault()},target:e.target,touches:s.map(m),type:e.type,x:{delta:t?n-t.x.location:0,initialDelta:e.deltaX,location:n,startLocation:n-e.deltaX},y:{delta:t?a-t.y.location:0,initialDelta:e.deltaY,location:a,startLocation:a-e.deltaY}}})(t,this.previous);return this.eventHandlers[e]&&this.eventHandlers[e](s),s}bind(e={}){this.unbind(),this.eventHandlers=e;for(let t=0;t<y.length;t++){const s=y[t],r=Object.keys(s);if(v(r,e))for(let e=0;e<r.length;e++){const t=s[r[e]];this.hammerInstance.on(t,this[t])}}}unbind(){this.hammerInstance&&this.hammerInstance.off(),this.eventHandlers={}}destroy(){this.hammerInstance&&(this.hammerInstance.destroy(),delete this.hammerInstance),delete this.eventHandlers}toggleDrag(e){this.toggle("pan",e)}toggleZoom(e){this.toggle("pinch",e)}toggle(e,t){this.hammerInstance&&this.hammerInstance.get(e).set({enable:t})}};let f=class{constructor(e){this.target=e}},b=class extends f{constructor(e,t){super(t),this.axis=e.axis,this.dataItem=e.dataItem,this.index=e.index,this.text=e.text,this.value=e.value}},C=class extends f{constructor(){super(...arguments),this.prevented=!1}preventDefault(){this.prevented=!0}isDefaultPrevented(){return this.prevented}},x=class extends C{constructor(e,t){super(t),this.axisRanges=e.axisRanges,this.nativeEvent=e.originalEvent}},S=class extends f{constructor(e,t){super(t),this.axisRanges=e.axisRanges,this.nativeEvent=e.originalEvent}},E=class extends C{constructor(e,t){super(t),this.axisRanges=e.axisRanges,this.nativeEvent=e.originalEvent}},k=class extends f{constructor(e,t){super(t),this.value=e.value,this.point=e.point,this.series=e.series,this.currentState=e.currentState,this.nextState=e.nextState}},I=class extends C{constructor(e,t){super(t),this.series=e.series,this.seriesIndex=e.seriesIndex,this.pointIndex=e.pointIndex,this.text=e.text}preventDefault(){super.preventDefault()}},w=class extends C{constructor(e,t){super(t),this.series=e.series,this.seriesIndex=e.seriesIndex,this.pointIndex=e.pointIndex,this.text=e.text}preventDefault(){super.preventDefault()}},_=class extends f{constructor(e,t){super(t),this.from=e.from,this.to=e.to}},D=class extends f{constructor(e,t){super(t),this.category=e.category,this.dataItem=e.dataItem,this.series=e.series,this.value=e.value,this.visual=e.visual}},N=class extends f{constructor(e,t){super(t),this.category=e.category,this.dataItem=e.dataItem,this.series=e.series,this.value=e.value,this.visual=e.visual}},T=class extends f{constructor(e,t){super(t),this.category=e.category,this.nativeEvent=e.originalEvent,this.value=e.value,this.x=e.x,this.y=e.y}},A=class extends f{constructor(e,t){super(t),this.category=e.category,this.nativeEvent=e.originalEvent,this.value=e.value,this.x=e.x,this.y=e.y}},O=class extends f{constructor(e,t){super(t)}},K=class extends C{constructor(e,t){super(t),this.axis=e.axis,this.from=e.from,this.to=e.to}},L=class extends f{constructor(e,t){super(t),this.axis=e.axis,this.from=e.from,this.to=e.to}},R=class extends C{constructor(e,t){super(t),this.axis=e.axis,this.from=e.from,this.to=e.to}},P=class extends f{constructor(e,t){super(t),this.category=e.category,this.dataItem=e.dataItem,this.nativeEvent=e.originalEvent,this.percentage=e.percentage,this.point=e.point,this.series=e.series,this.stackValue=e.stackValue,this.value=e.value}},F=class extends C{constructor(e,t){super(t),this.category=e.category,this.categoryPoints=e.categoryPoints,this.dataItem=e.dataItem,this.nativeEvent=e.originalEvent,this.percentage=e.percentage,this.point=e.point,this.series=e.series,this.stackValue=e.stackValue,this.value=e.value}},j=class extends C{constructor(e,t){super(t),this.axisRanges=e.axisRanges,this.delta=e.delta,this.nativeEvent=e.originalEvent}},q=class extends f{constructor(e,t){super(t),this.axisRanges=e.axisRanges,this.nativeEvent=e.originalEvent}},H=class extends C{constructor(e,t){super(t),this.axisRanges=e.axisRanges,this.nativeEvent=e.originalEvent}};const V={axisLabelClick:b,drag:x,dragEnd:S,dragStart:E,drilldownEvent:k,legendItemHover:I,legendItemClick:w,legendItemLeave:class extends C{constructor(e,t){super(t),this.series=e.series,this.seriesIndex=e.seriesIndex,this.pointIndex=e.pointIndex,this.text=e.text}preventDefault(){super.preventDefault()}},navigatorFilter:_,noteClick:D,noteHover:N,plotAreaClick:T,plotAreaHover:A,render:O,select:K,selectEnd:L,selectStart:R,seriesClick:P,seriesHover:F,zoom:j,zoomEnd:q,zoomStart:H};let M=class{constructor(e,t){this.sender=e,this.syntheticEvent=t}};function z(e,t){return new M(e,t)}const U=e=>`${e.fontWeight} ${e.fontSize} ${e.fontFamily}`,B=e=>window.getComputedStyle(e).backgroundColor,$=`\n <div class="k-var--primary"></div>\n <div class="k-var--base"></div>\n <div class="k-var--background"></div>\n\n <div class="k-var--normal-background"></div>\n <div class="k-var--normal-text-color"></div>\n <div class="k-var--hover-background"></div>\n <div class="k-var--hover-text-color"></div>\n <div class="k-var--selected-background"></div>\n <div class="k-var--selected-text-color"></div>\n <div class="k-var--chart-error-bars-background"></div>\n <div class="k-var--chart-notes-background"></div>\n <div class="k-var--chart-notes-border"></div>\n <div class="k-var--chart-notes-lines"></div>\n <div class="k-var--chart-crosshair-background"></div>\n\n <div class="k-var--chart-inactive"></div>\n <div class="k-var--chart-major-lines"></div>\n <div class="k-var--chart-minor-lines"></div>\n <div class="k-var--chart-area-opacity"></div>\n <div class="k-var--chart-area-inactive-opacity"></div>\n <div class="k-var--chart-line-inactive-opacity"></div>\n\n <div class="k-widget k-chart">\n <div class="k-var--chart-font"></div>\n <div class="k-var--chart-title-font"></div>\n <div class="k-var--chart-pane-title-font"></div>\n <div class="k-var--chart-label-font"></div>\n </div>\n\n <div class="k-var--series-unset"></div>\n <div class="k-var--series">\n ${(()=>{let e='\n <div class="k-var--series-a"></div>\n <div class="k-var--series-b"></div>\n <div class="k-var--series-c"></div>\n <div class="k-var--series-d"></div>\n <div class="k-var--series-e"></div>\n <div class="k-var--series-f"></div>\n';for(let t=0;t<30;t++)e+=`\n <div class="k-var--series-${t+1}"></div>`;return e})()}\n </div>\n`;class X{constructor(e){this.store=e}setStyle(e,t){this.store.dispatch({type:"set",payload:{field:e,value:t}})}setColors(){this.mapColor("axisDefaults.crosshair.color","chart-crosshair-background"),this.mapColor("axisDefaults.labels.color","normal-text-color"),this.mapColor("axisDefaults.line.color","chart-major-lines"),this.mapColor("axisDefaults.majorGridLines.color","chart-major-lines"),this.mapColor("axisDefaults.minorGridLines.color","chart-minor-lines"),this.mapColor("axisDefaults.notes.icon.background","chart-notes-background"),this.mapColor("axisDefaults.notes.icon.border.color","chart-notes-border"),this.mapColor("axisDefaults.notes.line.color","chart-notes-lines"),this.mapColor("axisDefaults.title.color","normal-text-color"),this.mapColor("chartArea.background","background"),this.mapColor("legend.inactiveItems.labels.color","chart-inactive"),this.mapColor("legend.inactiveItems.markers.color","chart-inactive"),this.mapColor("legend.labels.color","normal-text-color"),this.mapColor("seriesDefaults.boxPlot.downColor","chart-major-lines"),this.mapColor("seriesDefaults.boxPlot.mean.color","base"),this.mapColor("seriesDefaults.boxPlot.median.color","base"),this.mapColor("seriesDefaults.boxPlot.whiskers.color","primary"),this.mapColor("seriesDefaults.bullet.target.color","normal-text-color"),this.mapColor("seriesDefaults.candlestick.downColor","normal-text-color"),this.mapColor("seriesDefaults.candlestick.line.color","normal-text-color"),this.mapColor("seriesDefaults.errorBars.color","chart-error-bars-background"),this.mapColor("seriesDefaults.horizontalWaterfall.line.color","chart-major-lines"),this.mapColor("seriesDefaults.icon.border.color","chart-major-lines"),this.mapColor("seriesDefaults.labels.background","background"),this.mapColor("seriesDefaults.labels.color","normal-text-color"),this.mapColor("seriesDefaults.notes.icon.background","chart-notes-background"),this.mapColor("seriesDefaults.notes.icon.border.color","chart-notes-border"),this.mapColor("seriesDefaults.notes.line.color","chart-notes-lines"),this.mapColor("seriesDefaults.verticalBoxPlot.downColor","chart-major-lines"),this.mapColor("seriesDefaults.verticalBoxPlot.mean.color","base"),this.mapColor("seriesDefaults.verticalBoxPlot.median.color","base"),this.mapColor("seriesDefaults.verticalBoxPlot.whiskers.color","primary"),this.mapColor("seriesDefaults.verticalBullet.target.color","normal-text-color"),this.mapColor("seriesDefaults.waterfall.line.color","chart-major-lines"),this.mapColor("title.color","normal-text-color"),this.mapColor("subtitle.color","normal-text-color");const e=parseFloat(this.queryStyle("chart-area-opacity").opacity);isNaN(e)||(this.setStyle("seriesDefaults.area.opacity",e),this.setStyle("seriesDefaults.radarArea.opacity",e),this.setStyle("seriesDefaults.verticalArea.opacity",e),this.setStyle("seriesDefaults.labels.opacity",e)),this.setInactiveOpacity(["area","verticalArea"],"chart-area-inactive-opacity"),this.setInactiveOpacity(["line","verticalLine"],"chart-line-inactive-opacity")}setFonts(){const e=U(this.queryStyle("chart-font")),t=U(this.queryStyle("chart-title-font")),s=U(this.queryStyle("chart-pane-title-font")),r=U(this.queryStyle("chart-label-font"));this.setStyle("axisDefaults.labels.font",r),this.setStyle("axisDefaults.notes.label.font",e),this.setStyle("axisDefaults.title.font",e),this.setStyle("legend.labels.font",e),this.setStyle("seriesDefaults.labels.font",r),this.setStyle("seriesDefaults.notes.label.font",e),this.setStyle("title.font",t),this.setStyle("subtitle.font",s),this.setStyle("paneDefaults.title.font",s)}setSeriesColors(){const e=this.element,t=[].slice.call(e.querySelectorAll(".k-var--series div")),s=B(e.querySelector(".k-var--series-unset")),r=t.reduce(((e,t)=>{const r=(e=>{const t=e.match(/series-([a-z])$/);if(null!==t)return(e=>e.toLowerCase().charCodeAt(0)-97)(t[1]);const s=e.split("--series-")[1];return parseInt(s,10)-1})(t.className),n=B(t);return n!==s&&(e[r]=n),e}),[]);this.setStyle("seriesColors",r)}mapColor(e,t){this.setStyle(e,this.queryStyle(t).backgroundColor)}queryStyle(e){const t=this.element;return window.getComputedStyle(t.querySelector(`.k-var--${e}`))}setInactiveOpacity(e,t){const s=parseFloat(this.queryStyle(t).opacity);!isNaN(s)&&s<1&&e.forEach((e=>this.setStyle(`seriesDefaults.${e}.highlight.inactiveOpacity`,s)))}}const Y=e=>{let t,s,r=[];const n=n=>{t=e(t,n),a.canUseDOM&&(window.clearTimeout(s),s=window.setTimeout((()=>r.forEach((e=>e()))),16.666666666666668))};return n({}),{getState:()=>t,dispatch:n,subscribe:e=>(r.push(e),()=>r=r.filter((t=>t!==e)))}},W=(e,t)=>t.chartCollectionIdxKey?J.collectionConfigurationItem(e,t):t.chartKey?J.configurationItem(e,t):{},Z=(e,t)=>{if(!t.type)return{};switch(t.type){case"set":return J.themeItem(e,t);case"push":return Object.assign(e,t.payload);default:return e}},G=(e,t)=>{if(!t.type)return[];switch(t.type){case"add":return[...e,t.payload];case"remove":return e.filter((e=>e!==t.payload));default:return e}},J={configurationItem:(e,t)=>Object.assign(e,{[t.chartKey]:t.payload}),collectionConfigurationItem(e,t){let s=!1;const[r,n]=t.chartCollectionIdxKey.split("_"),a=e[r].map(((e,r)=>parseInt(n,10)===r?(s=!0,t.payload):e));return!1===s&&a.splice(parseInt(n,10),0,t.payload),Object.assign(e,{[r]:a})},themeItem(e,t){let s={},r=Object.assign(s,e);const{field:n,value:a}=t.payload,i=n.split(".");let o=i.shift();for(;i.length>0;)s=s[o]=s[o]||{},o=i.shift();return s[o]=a,r}};let Q=class{constructor(e,t){this.value=e.value,this.category=e.category,this.categoryIndex=e.categoryIx,this.series=e.series,this.dataItem=e.dataItem,this.percentage=e.percentage,this.runningTotal=e.runningTotal,this.total=e.total,this.low=e.low,this.high=e.high,this.xLow=e.xLow,this.xHigh=e.xHigh,this.yLow=e.yLow,this.yHigh=e.yHigh,this.point=e,this.format=((e.options||{}).tooltip||{}).format||t}get formattedValue(){return this.format?this.point.formatValue(this.format):String(this.value)}};const ee=e=>{const{categoryText:t,colorMarker:s,colspan:r,nameColumn:n,points:a}=e;return h.createElement("table",null,h.createElement("thead",null,h.createElement("tr",null,h.createElement("th",{colSpan:r},t))),h.createElement("tbody",null,a.map(((e,t)=>h.createElement("tr",{key:t},s&&h.createElement("td",null,h.createElement("span",{className:"k-chart-shared-tooltip-marker",style:{backgroundColor:e.series.color}})),n&&h.createElement("td",null,e.series.name),h.createElement("td",{dangerouslySetInnerHTML:{__html:e.formattedValue}}))))))},te=h.createContext(null);te.displayName="ChartContext";const se={horizontal:"fit",vertical:"fit"},re="k-chart-tooltip",ne=class extends h.Component{constructor(e,t){super(e,t),this.context=null,this.element=null,this.onChartMouseLeave=e=>{const{syntheticEvent:t}=e;return!!d(t.relatedTarget,this.element)},this.onMouseLeave=e=>{const t=z(this,e);this.context.childrenObserver.trigger("onMouseLeave",t)&&e.preventDefault()},this.popupRef=e=>{this.element=e;const t=e&&e.closest(".k-animation-container");t&&(t.style.transition="initial")},this.chartObserver=new n.InstanceObserver(this,{onMouseLeave:"onChartMouseLeave"}),t.observersStore.dispatch({type:"add",payload:this.chartObserver})}render(){const{popupShown:e,popupAlign:t,popupOffset:s,popupStyles:r,popupContent:n,className:a}=this.props,o=[re,a].join(" ").trim();return h.createElement(i.Popup,{animate:!1,popupAlign:t,offset:s,show:e,collision:se,className:"k-chart-tooltip-wrapper"},h.createElement("div",{className:o,style:r,onMouseLeave:this.onMouseLeave,ref:this.popupRef},n()))}componentWillUnmount(){this.context.observersStore.dispatch({type:"remove",payload:this.chartObserver})}};ne.contextType=te;let ae=ne;const ie=class extends h.Component{constructor(){super(...arguments),this.context=null,this.state={popupShown:!1},this.chartObserver=null}componentDidMount(){this.chartObserver=new n.InstanceObserver(this,{showTooltip:"onShowTooltip",hideTooltip:"onHideTooltip"}),this.context.observersStore.dispatch({type:"add",payload:this.chartObserver})}render(){const{popupContext:e,shared:t,className:s,...r}=this.state,n=this.state.popupShown?()=>{const s=this.findRenderFunction();if(t)return null!==s?s(e):h.createElement(ee,{...e});{const t=e.point,r=this.findRenderFunctionByIndex(t.series.index);return null!==r?r(e):null!==s?s(e):h.createElement("span",{dangerouslySetInnerHTML:{__html:e.point.formattedValue}})}}:Function.prototype,i=a.classNames({"k-chart-shared-tooltip":t,"k-chart-tooltip-inverse":!!s});return h.createElement(ae,{...r,popupContent:n,className:i})}componentWillUnmount(){this.context.observersStore.dispatch({type:"remove",payload:this.chartObserver})}onShowTooltip(e){const{anchor:t,style:s,shared:r,className:n,crosshair:a}=e;let i;a||(i=r?this.createSharedTooltipContext(e):this.createTooltipContext(e),this.setState({popupShown:!0,popupAlign:t.align,popupOffset:t.point,popupContext:i,popupStyles:s,className:n,shared:r}))}onHideTooltip(){this.setState({popupShown:!1,popupStyles:{},className:void 0})}createSharedTooltipContext(e){const{points:t,categoryText:s}=e,r=t.filter((e=>void 0!==e.series.name)).length>0,n=e.series.length>1;let a=1;return r&&a++,n&&a++,{categoryText:s,colorMarker:n,colspan:a,nameColumn:r,points:e.points.map((t=>new Q(t,e.format)))}}createTooltipContext(e){const{point:t,format:s}=e;return{point:new Q(t,s)}}findRenderFunctionByIndex(e){const t=this.context.optionsStore.getState().series;return void 0!==t&&Array.isArray(t)&&void 0!==t[e]&&t[e].hasOwnProperty("tooltip")&&t[e].tooltip.hasOwnProperty("render")?t[e].tooltip.render:null}findRenderFunction(){const e=this.context.optionsStore.getState().tooltip;return void 0!==e&&e.hasOwnProperty("render")?e.render:null}};ie.contextType=te;let oe=ie;const le=e=>e.children;le.displayName="Container";const ce=class extends h.Component{constructor(e,t){super(e,t),this.context=null,this.state={popupShown:!1},this.chartObserver=new n.InstanceObserver(this,{showTooltip:"onShowTooltip",hideTooltip:"onHideTooltip"}),t.observersStore.dispatch({type:"add",payload:this.chartObserver})}render(){const{popupContend:e,className:t,...s}=this.state,r=this.state.popupShown?()=>e:Function.prototype,n=a.classNames({"k-chart-crosshair-tooltip":!0,"k-chart-tooltip-inverse":!!t});return h.createElement(ae,{...s,popupContent:r,className:n})}componentWillUnmount(){var e;null==(e=this.context)||e.observersStore.dispatch({type:"remove",payload:this.chartObserver})}onShowTooltip(e){const{anchor:t,style:s,className:r,crosshair:n,axisName:a,axisIndex:i,value:o}=e,{name:l,index:c}=this.props;n&&a===l&&i===c&&this.setState({popupShown:!0,popupAlign:t.align,popupOffset:t.point,popupContend:o,popupStyles:s,className:r})}onHideTooltip(){this.setState({popupShown:!1,popupStyles:{},className:void 0})}};ce.contextType=te;let he=ce;const de=["categoryAxis","valueAxis","xAxis","yAxis"];function pe(e){const t={};for(let s=0;s<de.length;s++){const r=ue(e,de[s]);for(let e=0;e<r.length;e++){const s=r[e];t[s.name+s.index]=s}}return t}function ue(e,t){const s=[];if(e[t]){const r=[].concat(e[t]);for(let e=0;e<r.length;e++){const n=(r[e].crosshair||{}).tooltip;n&&n.visible&&s.push({index:e,name:t})}}return s}const me=class extends h.Component{constructor(){super(...arguments),this.context=null,this.state={tooltips:{}},this.storeUnsubscriber=Function.prototype,this.subscriber=()=>{var e;this.setState({tooltips:pe(null==(e=this.context)?void 0:e.optionsStore.getState())})}}componentDidMount(){this.storeUnsubscriber=this.context.optionsStore.subscribe(this.subscriber)}render(){const{tooltips:e}=this.state,t=Object.keys(e).map((t=>h.createElement(he,{...e[t],key:t})));return h.createElement(le,null,t)}componentWillUnmount(){this.storeUnsubscriber()}};me.contextType=te;let ve=me;const ye={name:"@progress/kendo-react-charts",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:0,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"},ge=class extends h.Component{constructor(e){super(e),this.chartInstance=null,this.surface=null,this._element=null,this.optionsStore={},this.optionsUnsubscriber=Function.prototype,this.themeStore={},this.themeUnsubscriber=Function.prototype,this.observersStore={},this.suppressTransitions=!1,this.showLicenseWatermark=!1,this.onRender=e=>{null!==this.chartInstance&&(this.surface=e.sender.surface,this.trigger("render",e))},this.onDrilldown=e=>{var t;const{series:s}=this.optionsStore.getState(),r=s.find((t=>t.name===e.series.name));if(!r.drilldownSeriesFactory)return!0;const n="onDrilldown";if(this.props.hasOwnProperty(n)){const s={seriesName:r.name,drilldownValue:e.value},a=[...(null==(t=this.props.drilldownState)?void 0:t.steps)||[],s],i=this.props.getTarget(),o={...e,currentState:this.props.drilldownState,nextState:{steps:a}},l=new k(o,i);this.props[n].call(void 0,l)}return!0},this.onLegendItemClick=e=>{if(null!==this.chartInstance)if(this.props.onLegendItemClick)this.trigger("legendItemClick",e);else{const{series:t}=this.optionsStore.getState();if(!t)return;let s={};const{seriesIndex:r,pointIndex:n}=e,a=t[r];if(void 0===n)s=Object.assign({},a,{visible:u(a.visible)});else{const e=a.pointVisibility=a.pointVisibility||[];e[n]=u(e[n]),s=Object.assign({},a)}this.optionsStore.dispatch({chartCollectionIdxKey:`series_${r}`,payload:s}),this.suppressTransitions=!0}},this.onWindowResize=()=>{null!==this.chartInstance&&this.chartInstance.resize()},this.onChartMouseLeave=e=>{const t=z(this,e);this.triggerDomEvent("onMouseLeave",t)?e.preventDefault():null!==this.chartInstance&&this.chartInstance.hideElements()},this.onChildMouseLeave=e=>{const{syntheticEvent:t}=e;return this.chartInstance&&!d(t.relatedTarget,this.element)&&this.chartInstance.hideElements(),!1},a.validatePackage(ye),this.showLicenseWatermark=a.shouldShowValidationUI(ye),this.optionsStore=Y(W),this.observersStore=Y(G),this.childrenObserver=new n.InstanceObserver(this,{onMouseLeave:"onChildMouseLeave"}),this.state={optionsStore:this.optionsStore,observersStore:this.observersStore,childrenObserver:this.childrenObserver,drilldownState:{steps:[]}},this.themeStore=Y(Z),this.chartObserver=new n.InstanceObserver(this,{render:"onRender",legendItemClick:"onLegendItemClick",drilldown:"onDrilldown"})}get element(){return this._element}static getDerivedStateFromProps(e,t){return{...t,drilldownState:e.drilldownState||[]}}componentDidMount(){var e;const t=(null==(e=this._element)?void 0:e.ownerDocument)||document;((e,t,s)=>{const r=new X(e);if(void 0===s)return void e.dispatch({type:"push",payload:n.chartBaseTheme()});const a=r.element=s.createElement("div");a.style.display="none",a.innerHTML=$,s.body.appendChild(a);try{e.dispatch({type:"push",payload:n.chartBaseTheme()}),r.setColors(),r.setFonts(),r.setSeriesColors()}finally{s.body.removeChild(r.element),delete r.element,t()}})(this.themeStore,this.instantiateCoreChart.bind(this),t),this.optionsUnsubscriber=this.optionsStore.subscribe(this.refresh.bind(this)),this.themeUnsubscriber=this.themeStore.subscribe(this.refresh.bind(this)),window.addEventListener("resize",this.onWindowResize)}componentWillUnmount(){this.optionsUnsubscriber(),this.themeUnsubscriber(),null!==this.chartInstance&&(this.chartInstance.destroy(),this.chartInstance=null),window.removeEventListener("resize",this.onWindowResize)}componentDidUpdate(e){const{dir:t,children:s,...n}=this.props;if(null!==this.chartInstance){const s=r.provideIntlService(this),a=this.chartInstance.chartService,i=s.locale!==a._intlService.locale,o=Object.entries(e).filter((e=>"dir"!==e[0]&&"children"!==e[0])).some((e=>{const[t,s]=e;return!(n.hasOwnProperty(t)&&n[t]===s)}));i&&(this.chartInstance.chartService._intlService=s,this.chartInstance.chartService.format._intlService=s,o||this.chartInstance.noTransitionsRedraw()),o&&this.refresh(),e.dir!==t&&this.chartInstance.setDirection(this.getDirection(t))}}render(){const{style:e={},className:t,wrapper:s,children:r}=this.props,n=Object.assign({},e,{position:"relative"}),i=h.createElement(s,{className:t,style:n,key:"chartElement"},h.createElement("div",{onMouseLeave:this.onChartMouseLeave,ref:e=>this._element=e,className:"k-chart-surface"},r),h.createElement(h.Fragment,null,this.showLicenseWatermark&&h.createElement(a.WatermarkOverlay,null)));return h.createElement(te.Provider,{value:this.state},h.createElement(oe,{key:"seriesTooltip"}),h.createElement(ve,{key:"crosshairTooltips"}),i)}getDirection(e){return"rtl"===(void 0!==e?e:a.canUseDOM&&window.getComputedStyle(this.element).direction||"ltr")}getChartOptions(){const{renderAs:e,pannable:t,zoomable:s,paneDefaults:r,panes:n,transitions:a,seriesColors:i,seriesDefaults:o,axisDefaults:l,deriveOptionsFromParent:c}=this.props;let h={};return void 0!==e&&(h.renderAs=e),void 0!==t&&(h.pannable=t),void 0!==s&&(h.zoomable=s),void 0!==r&&(h.paneDefaults=r),void 0!==n&&(h.panes=n),void 0!==a&&(h.transitions=a),void 0!==i&&(h.seriesColors=i),void 0!==o&&(h.seriesDefaults=o),void 0!==l&&(h.axisDefaults=l),h=Object.assign(h,this.optionsStore.getState()),c&&(h=c(h)),h}refresh(){if(null!==this.chartInstance){const e=this.themeStore.getState(),t=this.getChartOptions(),s=t.transitions;this.suppressTransitions&&(t.transitions=!1),this.props.onRefresh?this.props.onRefresh.call(void 0,t,e,this.chartInstance):this.chartInstance.setOptions(t,e),this.suppressTransitions&&(t.transitions=s,this.suppressTransitions=!1)}}instantiateCoreChart(){const{dir:e,chartConstructor:t}=this.props,s=this.getChartOptions();this.chartInstance=new t(this.element,s,this.themeStore.getState(),{rtl:this.getDirection(e),intlService:r.provideIntlService(this),observer:this.chartObserver,sender:this})}trigger(e,t){const s=function(e,t,s){if(V[e])return new V[e](t,s)}(e,t,this.props.getTarget()),r="on"+e.charAt(0).toUpperCase()+e.slice(1),n=this.observersStore.getState();let a=!1;for(let s=0;s<n.length;s++)n[s].trigger(e,t)&&(a=!0);return!1===a&&s&&this.props.hasOwnProperty(r)?(this.props[r].call(void 0,s),s.isDefaultPrevented&&s.isDefaultPrevented()):a}requiresHandlers(e){for(let t=0;t<e.length;t++){const s=e[t],r="on"+s.charAt(0).toUpperCase()+s.slice(1);if(this.props.hasOwnProperty(r))return!0}return!1}triggerDomEvent(e,t){const s=this.observersStore.getState();let r=!1;for(let n=0;n<s.length;n++)s[n].trigger(e,t)&&(r=!0);return r}};ge.propTypes={dir:s.string,renderAs:s.oneOf(["svg","canvas"])},ge.defaultProps={renderAs:"svg"};let fe=ge;r.registerForIntl(fe),n.DomEventsBuilder.register(class{static create(e,t){if("undefined"!=typeof window){const s=window.Hammer;if(!s)return void("production"!==process.env.NODE_ENV&&console.warn("Hammerjs is not loaded.Solution: http://www.telerik.com/kendo-react-ui/components/charts/troubleshooting/#toc-installation"));const r=new s(e,{recognizers:[[s.Tap],[s.Pan],[s.Pinch],[s.Press,{time:0}]]});return new g(r,t)}}});const be=class extends h.Component{constructor(e,t){super(e,t),this.context=null,this.state={donutCenterStyles:null},this.chartObserver=new n.InstanceObserver(this,{render:"onRender"}),t.observersStore.dispatch({type:"add",payload:this.chartObserver})}render(){const{render:e}=this.props,{donutCenterStyles:t}=this.state;let s=null;return e&&t&&(s=h.createElement("div",{className:"k-chart-donut-center",style:t},h.createElement(e,null))),s}onRender(e){var t;const s=null==(t=this.context)?void 0:t.optionsStore.getState().series,r=Array.isArray(s)?s[0]:null,n=e.sender._plotArea.charts;if(!r||"donut"!==r.type||0===n[0].points.length)return;const a=n[0].points[0].sector,i=a.innerRadius,o=a.center.y-i,l=a.center.x-i,c=2*i;this.setState({donutCenterStyles:{height:c,left:l,top:o,width:c}})}};be.contextType=te;let Ce=be,xe=class extends h.Component{constructor(){super(...arguments),this._baseChart=null,this.getTarget=()=>this}get chartInstance(){return null!==this._baseChart?this._baseChart.chartInstance:null}get surface(){return null!==this._baseChart?this._baseChart.surface:null}get element(){return null!==this._baseChart?this._baseChart.element:null}render(){const{donutCenterRender:e,children:t,className:s,...r}=this.props;return h.createElement(fe,{...r,ref:e=>this._baseChart=e,chartConstructor:n.Chart,getTarget:this.getTarget,wrapper:"div",className:a.classNames("k-chart k-widget",s)},t,h.createElement(Ce,{render:e}))}},Se=class extends h.Component{constructor(){super(...arguments),this._baseChart=null,this.deriveOptionsFromParent=e=>{const{type:t,data:s}=this.props,r=Object.assign({},e,{type:t,data:s});return n.Sparkline.normalizeOptions(r)},this.getTarget=()=>this}get chartInstance(){return null!==this._baseChart?this._baseChart.chartInstance:null}get surface(){return null!==this._baseChart?this._baseChart.surface:null}get element(){return null!==this._baseChart?this._baseChart.element:null}render(){const{children:e,type:t,className:s,...r}=this.props;return h.createElement(fe,{...r,ref:e=>this._baseChart=e,chartConstructor:n.Sparkline,getTarget:this.getTarget,wrapper:"span",deriveOptionsFromParent:this.deriveOptionsFromParent,className:a.classNames("k-sparkline k-widget",s)},e)}};const Ee={autoBindElements:!0,liveDrag:!1,partialRedraw:!0};let ke=class extends h.Component{constructor(){super(...arguments),this._baseChart=null,this.deriveOptionsFromParent=e=>{const t=Object.assign({},e.navigator||{},Ee);return Object.assign({},e,{navigator:t})},this.onRefresh=(e,t,s)=>{this.props.partialRedraw?(s.applyOptions(e),s.bindCategories(),s.navigator.redrawSlaves()):s.setOptions(e,t)},this.getTarget=()=>this}get chartInstance(){return null!==this._baseChart?this._baseChart.chartInstance:null}get surface(){return null!==this._baseChart?this._baseChart.surface:null}get element(){return null!==this._baseChart?this._baseChart.element:null}render(){const{children:e,className:t,...s}=this.props;return h.createElement(fe,{...s,ref:e=>this._baseChart=e,chartConstructor:n.StockChart,getTarget:this.getTarget,wrapper:"div",deriveOptionsFromParent:this.deriveOptionsFromParent,onRefresh:this.onRefresh,className:a.classNames("k-stockchart k-widget",t)},e)}};const Ie=class extends h.Component{constructor(e,t){super(e,t),this.optionsStore=t.optionsStore}renderChildren(e,t){const{children:s}=e.props,{_chartKey:r,_parentStore:n}=this.props,a={...e.props,_chartCollectionIdxKey:`${r}_${t}`,_parentStore:n};return h.cloneElement(e,a,s)}render(){const{_chartKey:e,_parentStore:t,children:s}=this.props;return(t||this.optionsStore).dispatch({chartKey:e,payload:[]}),h.Children.map(s,((e,t)=>h.isValidElement(e)?this.renderChildren(e,t):e))}};Ie.contextType=te;let we=Ie;const _e=class extends h.Component{constructor(e,t){super(e,t),this.optionsStore=t.optionsStore,this.childStore=Y(W)}render(){const{children:e}=this.props;return void 0!==e?h.Children.map(e,(e=>h.isValidElement(e)?this.renderChildren(e):e)):null}componentDidMount(){this.dispatch()}componentDidUpdate(){this.dispatch()}dispatch(){const{_chartKey:e,_chartCollectionIdxKey:t,_parentStore:s,children:r,...n}=this.props;(s||this.optionsStore).dispatch({chartKey:e,chartCollectionIdxKey:t,payload:Object.assign({},n,this.childStore.getState())})}renderChildren(e){const{children:t}=e.props,s={...e.props,_parentStore:this.childStore};return h.cloneElement(e,s,t)}};_e.contextType=te;let De=_e,Ne=class{constructor(e){this.currentState=e.currentState,this.nextState=e.nextState}};const Te=h.forwardRef(((e,t)=>{const s=h.useRef(null),r=h.useRef(null);h.useImperativeHandle(s,(()=>({element:r.current,props:e}))),h.useImperativeHandle(t,(()=>s.current));let n=[{id:"0",...e.rootItem||{text:"Home",icon:h.createElement(a.SvgIcon,{icon:l.homeIcon,style:{marginInlineEnd:"4px"}})}}];e.drilldownState&&(n=[...n,...e.drilldownState.steps.map(((e,t)=>({id:(t+1).toString(),text:e.drilldownValue})))]);const i={...e,data:n};return h.createElement("div",null,h.createElement(o.Breadcrumb,{...i,onItemSelect:t=>{var s;const r="onDrilldownStateChange";if(e.hasOwnProperty(r)){const a=n.findIndex((e=>e.id===t.id)),i={steps:((null==(s=e.drilldownState)?void 0:s.steps)||[]).slice(0,a)},o=new Ne({currentState:e.drilldownState,nextState:i});e[r].call(void 0,o)}}}))})),Ae={id:s.string,style:s.object,className:s.string,breadcrumbOrderedList:s.elementType,breadcrumbListItem:s.elementType,breadcrumbDelimiter:s.elementType,breadcrumbLink:s.elementType,dir:s.oneOf(["ltr","rtl"]),disabled:s.bool,valueField:s.string,textField:s.string,iconField:s.string,iconClassField:s.string,onItemSelect:s.func,ariaLabel:s.string,onDrilldownStateChange:s.func,drilldownState:s.shape({steps:s.array}),rootItem:s.object};Te.displayName="KendoReactChartBreadcrumb",Te.propTypes=Ae,Te.defaultProps={valueField:"id",textField:"text",iconField:"icon",iconClassField:"iconClass",data:[]};const Oe=e=>h.createElement(De,{...e,_chartKey:"title"});Oe.displayName="ChartAxisDefaultsTitle";const Ke=e=>h.createElement(De,{...e,_chartKey:"labels"});Ke.displayName="ChartAxisDefaultsLabels";const Le=e=>h.createElement(De,{visible:!0,...e,_chartKey:"crosshair"});Le.displayName="ChartAxisDefaultsCrosshair";const Re=e=>h.createElement(De,{visible:!0,...e,_chartKey:"tooltip"});Re.displayName="ChartAxisDefaultsCrosshairTooltip";const Pe=e=>h.createElement(De,{...e,_chartKey:"title"});Pe.displayName="ChartCategoryAxisTitle";const Fe=e=>h.createElement(De,{...e,_chartKey:"title"});Fe.displayName="ChartPaneDefaultsTitle";const je=e=>h.createElement(De,{...e,_chartKey:"item"});je.displayName="ChartLegendItem";const qe=e=>h.createElement(De,{...e,_chartKey:"title"});qe.displayName="ChartLegendTitle";const He=e=>h.createElement(De,{...e,_chartKey:"inactiveItems"});He.displayName="ChartLegendInactiveItems";const Ve=e=>h.createElement(De,{...e,_chartKey:"title"});Ve.displayName="ChartValueAxisTitle";const Me=e=>h.createElement(De,{...e,_chartKey:"title"});Me.displayName="ChartXAxisTitle";const ze=e=>h.createElement(De,{...e,_chartKey:"title"});ze.displayName="ChartYAxisTitle";const Ue=e=>h.createElement(De,{...e,_chartKey:"categoryAxis"});Ue.displayName="ChartNavigatorCategoryAxis";const Be=e=>h.createElement(De,{...e,_chartKey:"pane"});Be.displayName="ChartNavigatorPane";const $e=e=>h.createElement(De,{...e});$e.displayName="ChartNavigatorSeriesItem";const Xe=e=>h.createElement(we,{...e,_chartKey:"series"});Xe.propTypes={children:function(e,t,s){return p(e,t,s,$e)}};const Ye=e=>h.createElement(De,{...e});Ye.displayName="ChartCategoryAxisItem";const We=e=>h.createElement(we,{...e,_chartKey:"categoryAxis"});We.propTypes={children:function(e,t,s){return p(e,t,s,Ye)}};const Ze=e=>h.createElement(De,{...e});Ze.displayName="ChartPane";const Ge=e=>h.createElement(De,{...e,_chartKey:"paneDefaults"});Ge.displayName="ChartPaneDefaults";const Je=e=>h.createElement(we,{...e,_chartKey:"panes"});Je.propTypes={children:function(e,t,s){return p(e,t,s,Ze)}};const Qe=e=>{let t=e=>h.createElement(h.Fragment,null);e.drilldownSeriesFactory&&(t=e.drilldownSeriesFactory);const s=t=>{var s,r;return t&&(null==(r=null==(s=t.drilldownState)?void 0:s.steps)?void 0:r.find((({seriesName:t})=>t===e.name)))};return h.createElement(te.Consumer,null,(r=>s(r)?h.createElement(t,{_chartCollectionIdxKey:e._chartCollectionIdxKey,drilldownValue:s(r).drilldownValue}):h.createElement(De,{...e})))};Qe.displayName="ChartSeriesItem";const et=e=>h.createElement(we,{...e,_chartKey:"series"});et.propTypes={children:function(e,t,s){return p(e,t,s,Qe)}};const tt=e=>h.createElement(De,{...e});tt.displayName="ChartValueAxisItem";const st=e=>h.createElement(we,{...e,_chartKey:"valueAxis"});st.propTypes={children:function(e,t,s){return p(e,t,s,tt)}};const rt=e=>h.createElement(De,{...e});rt.displayName="ChartXAxisItem";const nt=e=>h.createElement(we,{...e,_chartKey:"xAxis"});nt.prototype={children:function(e,t,s){return p(e,t,s,rt)}};const at=e=>h.createElement(De,{...e});at.displayName="ChartYAxisItem";const it=e=>h.createElement(we,{...e,_chartKey:"yAxis"});it.propTypes={children:function(e,t,s){return p(e,t,s,at)}};const ot=e=>`${e.fontWeight} ${e.fontSize} ${e.fontFamily}`,lt=e=>window.getComputedStyle(e).backgroundColor,ct=`\n <div class="k-var--background"></div>\n <div class="k-var--normal-text-color"></div>\n <div class="k-var--chart-major-lines"></div>\n\n <div class="k-widget k-chart">\n <div class="k-var--chart-font"></div>\n <div class="k-var--chart-title-font"></div>\n </div>\n <div class="k-var--series-unset"></div>\n <div class="k-var--series">\n ${(()=>{let e='\n <div class="k-var--series-a"></div>\n <div class="k-var--series-b"></div>\n <div class="k-var--series-c"></div>\n <div class="k-var--series-d"></div>\n <div class="k-var--series-e"></div>\n <div class="k-var--series-f"></div>\n';for(let t=0;t<30;t++)e+=`\n <div class="k-var--series-${t+1}"></div>`;return e})()}\n </div>\n`;class ht{constructor(e){this.store=e}setStyle(e,t){const s=e.split(".");let r=this.store;s.forEach(((e,t,s)=>{t<s.length-1&&(r=r[e]=r[e]||{})}));const n=s.pop();n&&(r[n]=t)}setColors(){this.mapColor("labels.color","normal-text-color"),this.mapColor("labels.stroke.color","background"),this.mapColor("links.color","chart-major-lines"),this.mapColor("legend.labels.color","normal-text-color"),this.mapColor("title.color","normal-text-color")}setFonts(){const e=ot(this.queryStyle("chart-title-font")),t=ot(this.queryStyle("chart-font"));this.setStyle("title.font",e),this.setStyle("labels.font",t),this.setStyle("legend.labels.font",t)}setNodeColors(){const e=this.element;if(!e)return;const t=[].slice.call(e.querySelectorAll(".k-var--series div")),s=lt(e.querySelector(".k-var--series-unset")),r=t.reduce(((e,t)=>{const r=(e=>{const t=e.match(/series-([a-z])$/);if(null!==t)return(e=>e.toLowerCase().charCodeAt(0)-97)(t[1]);const s=e.split("--series-")[1];return parseInt(s,10)-1})(t.className),n=lt(t);return n!==s&&(e[r]=n),e}),[]);this.setStyle("nodeColors",r)}mapColor(e,t){this.setStyle(e,this.queryStyle(t).backgroundColor)}queryStyle(e){const t=this.element;return window.getComputedStyle(t.querySelector(`.k-var--${e}`))}}const dt=(e,t)=>{const s={nodeColors:[]},r=new ht(s),n=r.element=e.createElement("div");n.style.display="none",n.innerHTML=ct,e.body.appendChild(n);try{r.setColors(),r.setFonts(),r.setNodeColors()}finally{e.body.removeChild(r.element),r.element=null,t(s)}},pt=s.exact({left:s.number,top:s.number}),ut={left:s.number,right:s.number},mt={...ut,top:s.number,bottom:s.number},vt=s.oneOfType([s.number,s.exact(mt)]),yt=vt,gt=s.exact({width:s.number,color:s.string,opacity:s.number,dashType:s.string}),ft={visible:s.bool,font:s.string,color:s.string,opacity:s.number,align:s.oneOf(["left","right","center"]),position:s.oneOf(["inside","before","after"]),padding:yt,margin:s.exact(ut),border:gt,offset:pt},bt={color:s.string,opacity:s.number,offset:pt,padding:s.number,width:s.number},Ct={colorType:s.oneOf(["static","source","target"]),color:s.string,opacity:s.number,highlight:s.exact({opacity:s.number,inactiveOpacity:s.number})},xt=s.exact({text:s.string,...ft}),St=s.exact({id:s.oneOfType([s.string,s.number]).isRequired,label:xt.isRequired,...bt}),Et=s.exact({sourceId:s.oneOfType([s.string,s.number]).isRequired,targetId:s.oneOfType([s.string,s.number]).isRequired,value:s.number.isRequired,...Ct}),kt={data:s.exact({nodes:s.arrayOf(St.isRequired).isRequired,links:s.arrayOf(Et.isRequired).isRequired}).isRequired,links:s.exact(Ct),nodes:s.exact(bt),labels:s.exact(ft),legend:s.exact({align:s.oneOf(["start","center","end"]),background:s.string,border:gt,height:s.number,labels:s.object,margin:vt,offsetX:s.number,offsetY:s.number,orientation:s.oneOf(["vertical","horizontal"]),padding:yt,position:s.oneOf(["top","bottom","left","right","custom"]),reverse:s.bool,visible:s.bool,width:s.number,item:s.object,title:s.object}),title:s.exact({align:s.oneOf(["center","left","right"]),background:s.string,border:gt,color:s.string,font:s.string,margin:vt,padding:yt,position:s.oneOf(["top","bottom"]),text:s.string,visible:s.bool}),tooltip:s.exact({visible:s.bool,offset:s.number,followPointer:s.bool,delay:s.number,linkComponent:s.any,nodeComponent:s.any}),className:s.string,style:s.object,disableAutoLayout:s.bool,onNodeEnter:s.func,onNodeLeave:s.func,onLinkEnter:s.func,onLinkLeave:s.func,onNodeClick:s.func,onLinkClick:s.func},It="sankey.tooltipUnitFormat",wt={[It]:"({0} units)"},_t=e=>{const{Content:t,offset:s,event:{tooltipData:r,dataItem:n,nodeValue:a}}=e,i=h.useRef(null);return h.useEffect((()=>{const e=i.current;if(!r||!e)return;const t=e.offsetWidth,n=e.offsetHeight,a={...r.popupOffset},o=r.popupAlign;a.left+="left"===o.horizontal?s:-1*s,"right"===o.horizontal&&(a.left-=t),"bottom"===o.vertical?a.top-=n+s:a.top+=s,e.style.left=`${a.left}px`,e.style.top=`${a.top}px`,e.style.visibility=""}),[r]),h.createElement("div",{ref:i,style:{visibility:"hidden"},className:"k-tooltip k-sankey-tooltip k-chart-tooltip k-chart-shared-tooltip"},h.createElement("div",{className:"k-tooltip-content"},h.createElement(t,{dataItem:n,nodeValue:a})))},Dt={display:"flex",alignItems:"center"},Nt=e=>h.createElement("div",{style:{width:15,height:15,backgroundColor:e.color,display:"inline-flex",marginLeft:3}}),Tt=e=>h.createElement("span",{style:{margin:"0 3px"}},e.children),At=e=>r.useInternationalization().format(r.useLocalization().toLanguageString(It,wt[It]),[e||0]),Ot=e=>{const{color:t,label:s}=e.dataItem;return h.createElement("div",{style:Dt,className:"k-tooltip-content"},h.createElement(Nt,{color:t}),h.createElement(Tt,null,s.text),h.createElement(Tt,null,At(e.nodeValue)))},Kt=e=>{const{source:t,target:s,value:r}=e.dataItem;return h.createElement("div",{style:Dt},h.createElement(Nt,{color:t.color}),h.createElement(Tt,null,t.label.text),h.createElement(a.IconWrap,{icon:l.arrowRightIcon,name:"arrow-right"}),h.createElement(Nt,{color:s.color}),h.createElement(Tt,null,s.label.text),h.createElement(Tt,null,At(r)))},Lt=12,Rt={offset:Lt,visible:!0},Pt=["nodeEnter","nodeLeave","linkEnter","linkLeave","nodeClick","linkClick"],Ft=h.forwardRef(((e,t)=>{a.validatePackage(ye);const s=h.useRef(null),r=h.useRef(null),i=h.useRef(null),{data:o,links:l,nodes:c,labels:d,title:p,legend:u,tooltip:m=Rt,disableAutoLayout:v}=e,y=h.useRef();y.current=e;const[g,f]=h.useState(null),b=h.useCallback((e=>{const{visible:t,offset:s=Lt,nodeComponent:r=Ot,linkComponent:n=Kt}={...Rt,...m};if(t){const t={event:e,offset:s,Content:"node"===e.targetType?r:n};f(t)}}),[m]),C=h.useCallback((()=>{f(null)}),[]),x=h.useCallback(((e,t)=>{const s=y.current[e];if(s){const e={...t,nativeEvent:t.originalEvent,target:i.current};s.call(void 0,e)}}),[]);return h.useEffect((()=>{const e={data:o,links:l,nodes:c,labels:d,title:p,legend:u,disableAutoLayout:v,tooltip:{...Rt,...m}};return r.current?r.current.setOptions(e):a.canUseDOM&&s.current&&dt(s.current.ownerDocument,(t=>{r.current=new n.Sankey(s.current,e,t),((e,t)=>{e&&(e.unbind(),Pt.forEach((s=>{t[s]&&e.bind(s,t[s])})))})(r.current,{nodeEnter:e=>{x("onNodeEnter",e)},nodeLeave:e=>{x("onNodeLeave",e)},linkEnter:e=>{x("onLinkEnter",e)},linkLeave:e=>{x("onLinkLeave",e)},nodeClick:e=>{x("onNodeClick",e)},linkClick:e=>{x("onLinkClick",e)}}),r.current.bind("tooltipShow",b),r.current.bind("tooltipHide",C)})),()=>{r.current&&(r.current.destroy(),r.current=null)}}),[o,l,c,d,p,u,v,m,C,b,x]),h.useImperativeHandle(i,(()=>({get element(){return s.current},exportVisual:e=>r.current.exportVisual(e),props:e})),[]),h.useImperativeHandle(t,(()=>i.current)),h.createElement(h.Fragment,null,h.createElement("div",{ref:s,className:e.className,style:e.style}),g&&h.createElement(_t,{...g}))}));Ft.propTypes=kt,Ft.displayName="KendoReactSankey";const jt=n.createSankeyData;e.AxisLabelClickEvent=b,e.Chart=xe,e.ChartArea=e=>h.createElement(De,{...e,_chartKey:"chartArea"}),e.ChartAxisDefaults=e=>h.createElement(De,{...e,_chartKey:"axisDefaults"}),e.ChartAxisDefaultsCrosshair=Le,e.ChartAxisDefaultsCrosshairTooltip=Re,e.ChartAxisDefaultsLabels=Ke,e.ChartAxisDefaultsTitle=Oe,e.ChartBreadcrumb=Te,e.ChartCategoryAxis=We,e.ChartCategoryAxisCrosshair=e=>h.createElement(De,{visible:!0,...e,_chartKey:"crosshair"}),e.ChartCategoryAxisCrosshairTooltip=e=>h.createElement(De,{visible:!0,...e,_chartKey:"tooltip"}),e.ChartCategoryAxisItem=Ye,e.ChartCategoryAxisLabels=e=>h.createElement(De,{visible:!0,...e,_chartKey:"labels"}),e.ChartCategoryAxisNotes=e=>h.createElement(De,{...e,_chartKey:"notes"}),e.ChartCategoryAxisNotesIcon=e=>h.createElement(De,{...e,_chartKey:"icon"}),e.ChartCategoryAxisNotesLabel=e=>h.createElement(De,{...e,_chartKey:"label"}),e.ChartCategoryAxisRangeLabels=e=>h.createElement(De,{visible:!0,...e,_chartKey:"rangeLabels"}),e.ChartCategoryAxisTitle=Pe,e.ChartLegend=e=>h.createElement(De,{visible:!0,...e,_chartKey:"legend"}),e.ChartLegendInactiveItems=He,e.ChartLegendItem=je,e.ChartLegendTitle=qe,e.ChartNavigator=e=>h.createElement(De,{visible:!0,position:"bottom",...e,_chartKey:"navigator"}),e.ChartNavigatorCategoryAxis=Ue,e.ChartNavigatorHint=e=>h.createElement(De,{...e,_chartKey:"hint"}),e.ChartNavigatorPane=Be,e.ChartNavigatorSelect=e=>h.createElement(De,{...e,_chartKey:"select"}),e.ChartNavigatorSeries=Xe,e.ChartNavigatorSeriesItem=$e,e.ChartPane=Ze,e.ChartPaneDefaults=Ge,e.ChartPaneDefaultsTitle=Fe,e.ChartPanes=Je,e.ChartPlotArea=e=>h.createElement(De,{...e,_chartKey:"plotArea"}),e.ChartSeries=et,e.ChartSeriesDefaults=e=>h.createElement(De,{...e,_chartKey:"seriesDefaults"}),e.ChartSeriesErrorBars=e=>h.createElement(De,{...e,_chartKey:"errorBars"}),e.ChartSeriesExtremes=e=>h.createElement(De,{...e,_chartKey:"extremes"}),e.ChartSeriesHighlight=e=>h.createElement(De,{...e,_chartKey:"highlight"}),e.ChartSeriesItem=Qe,e.ChartSeriesItemOutliers=e=>h.createElement(De,{...e,_chartKey:"outliers"}),e.ChartSeriesItemTooltip=e=>h.createElement(De,{...e,_chartKey:"tooltip"}),e.ChartSeriesLabels=e=>h.createElement(De,{visible:!0,...e,_chartKey:"labels"}),e.ChartSeriesLabelsFrom=e=>h.createElement(De,{...e,_chartKey:"from"}),e.ChartSeriesLabelsTo=e=>h.createElement(De,{...e,_chartKey:"to"}),e.ChartSeriesMarkers=e=>h.createElement(De,{...e,_chartKey:"markers"}),e.ChartSeriesNotes=e=>h.createElement(De,{...e,_chartKey:"notes"}),e.ChartSeriesNotesIcon=e=>h.createElement(De,{...e,_chartKey:"icon"}),e.ChartSeriesNotesLabel=e=>h.createElement(De,{...e,_chartKey:"label"}),e.ChartSubtitle=e=>h.createElement(De,{...e,_chartKey:"subtitle"}),e.ChartTitle=e=>h.createElement(De,{...e,_chartKey:"title"}),e.ChartTooltip=e=>h.createElement(De,{visible:!0,...e,_chartKey:"tooltip"}),e.ChartValueAxis=st,e.ChartValueAxisCrosshair=e=>h.createElement(De,{visible:!0,...e,_chartKey:"crosshair"}),e.ChartValueAxisCrosshairTooltip=e=>h.createElement(De,{visible:!0,...e,_chartKey:"tooltip"}),e.ChartValueAxisItem=tt,e.ChartValueAxisLabels=e=>h.createElement(De,{visible:!0,...e,_chartKey:"labels"}),e.ChartValueAxisNotes=e=>h.createElement(De,{...e,_chartKey:"notes"}),e.ChartValueAxisNotesIcon=e=>h.createElement(De,{...e,_chartKey:"icon"}),e.ChartValueAxisNotesLabel=e=>h.createElement(De,{...e,_chartKey:"label"}),e.ChartValueAxisTitle=Ve,e.ChartXAxis=nt,e.ChartXAxisCrosshair=e=>h.createElement(De,{visible:!0,...e,_chartKey:"crosshair"}),e.ChartXAxisCrosshairTooltip=e=>h.createElement(De,{visible:!0,...e,_chartKey:"tooltip"}),e.ChartXAxisItem=rt,e.ChartXAxisLabels=e=>h.createElement(De,{visible:!0,...e,_chartKey:"labels"}),e.ChartXAxisNotes=e=>h.createElement(De,{...e,_chartKey:"notes"}),e.ChartXAxisNotesIcon=e=>h.createElement(De,{...e,_chartKey:"icon"}),e.ChartXAxisNotesLabel=e=>h.createElement(De,{...e,_chartKey:"label"}),e.ChartXAxisTitle=Me,e.ChartYAxis=it,e.ChartYAxisCrosshair=e=>h.createElement(De,{visible:!0,...e,_chartKey:"crosshair"}),e.ChartYAxisCrosshairTooltip=e=>h.createElement(De,{visible:!0,...e,_chartKey:"tooltip"}),e.ChartYAxisItem=at,e.ChartYAxisLabels=e=>h.createElement(De,{visible:!0,...e,_chartKey:"labels"}),e.ChartYAxisNotes=e=>h.createElement(De,{...e,_chartKey:"notes"}),e.ChartYAxisNotesIcon=e=>h.createElement(De,{...e,_chartKey:"icon"}),e.ChartYAxisNotesLabel=e=>h.createElement(De,{...e,_chartKey:"label"}),e.ChartYAxisTitle=ze,e.ChartZoomable=e=>h.createElement(De,{...e,_chartKey:"zoomable"}),e.CollectionConfigurationComponent=we,e.ConfigurationComponent=De,e.CrosshairTooltip=he,e.CrosshairTooltipContainer=ve,e.DonutCenter=Ce,e.DragEndEvent=S,e.DragEvent=x,e.DragStartEvent=E,e.DrilldownEvent=k,e.DrilldownStateChangeEvent=Ne,e.LegendItemClickEvent=w,e.LegendItemHoverEvent=I,e.NavigatorFilterEvent=_,e.NoteClickEvent=D,e.NoteHoverEvent=N,e.PlotAreaClickEvent=T,e.PlotAreaHoverEvent=A,e.RenderEvent=O,e.Sankey=Ft,e.SelectEndEvent=L,e.SelectEvent=K,e.SelectStartEvent=R,e.SeriesClickEvent=P,e.SeriesHoverEvent=F,e.SeriesTooltip=oe,e.SharedTooltipContent=ee,e.Sparkline=Se,e.StockChart=ke,e.TooltipPoint=Q,e.TooltipPopup=ae,e.ZoomEndEvent=q,e.ZoomEvent=j,e.ZoomStartEvent=H,e.createSankeyData=jt,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
@@ -33,7 +33,7 @@ import { SankeyNode } from '@progress/kendo-charts';
33
33
  import { SankeyNodeDataItem } from '@progress/kendo-charts';
34
34
  import { SankeyNodeDefaults } from '@progress/kendo-charts';
35
35
  import { SankeyOptions } from '@progress/kendo-charts';
36
- import { SankeyTooltip } from '@progress/kendo-charts';
36
+ import { SankeyTooltip as SankeyTooltip_2 } from '@progress/kendo-charts';
37
37
  import { SankeyTooltipEvent } from '@progress/kendo-charts';
38
38
  import { Surface } from '@progress/kendo-drawing';
39
39
 
@@ -4684,7 +4684,7 @@ export declare interface SankeyProps {
4684
4684
  /**
4685
4685
  * The configuration of the Sankey tooltips.
4686
4686
  */
4687
- tooltip?: SankeyTooltips;
4687
+ tooltip?: SankeyTooltip;
4688
4688
  /**
4689
4689
  * If set to `true`, the Sankey component will not perform automatic layout.
4690
4690
  */
@@ -4721,30 +4721,10 @@ export declare interface SankeyProps {
4721
4721
  export declare interface SankeyTitle extends Title {
4722
4722
  }
4723
4723
 
4724
- /**
4725
- * Represents the props of the Sankey tooltip component.
4726
- *
4727
- * @hidden
4728
- */
4729
- export declare interface SankeyTooltipProps {
4730
- /**
4731
- * The event object of the Sankey tooltip.
4732
- */
4733
- event: SankeyTooltipEvent;
4734
- /**
4735
- * The content component of the Sankey tooltip.
4736
- */
4737
- Content: React.ComponentType<TooltipContentProps>;
4738
- /**
4739
- * The distance between the tooltip and the mouse pointer in pixels.
4740
- */
4741
- offset: number;
4742
- }
4743
-
4744
4724
  /**
4745
4725
  * Represents the Sankey tooltip configuration.
4746
4726
  */
4747
- export declare interface SankeyTooltips extends SankeyTooltip {
4727
+ export declare interface SankeyTooltip extends SankeyTooltip_2 {
4748
4728
  /**
4749
4729
  * Indicates whether the Sankey tooltips will be rendered.
4750
4730
  */
@@ -4765,6 +4745,26 @@ export declare interface SankeyTooltips extends SankeyTooltip {
4765
4745
  nodeComponent?: React.ComponentType<TooltipContentProps>;
4766
4746
  }
4767
4747
 
4748
+ /**
4749
+ * Represents the props of the Sankey tooltip component.
4750
+ *
4751
+ * @hidden
4752
+ */
4753
+ export declare interface SankeyTooltipProps {
4754
+ /**
4755
+ * The event object of the Sankey tooltip.
4756
+ */
4757
+ event: SankeyTooltipEvent;
4758
+ /**
4759
+ * The content component of the Sankey tooltip.
4760
+ */
4761
+ Content: React.ComponentType<TooltipContentProps>;
4762
+ /**
4763
+ * The distance between the tooltip and the mouse pointer in pixels.
4764
+ */
4765
+ offset: number;
4766
+ }
4767
+
4768
4768
  /**
4769
4769
  * Arguments for the `selectEnd` event.
4770
4770
  */
package/index.d.ts CHANGED
@@ -33,7 +33,7 @@ import { SankeyNode } from '@progress/kendo-charts';
33
33
  import { SankeyNodeDataItem } from '@progress/kendo-charts';
34
34
  import { SankeyNodeDefaults } from '@progress/kendo-charts';
35
35
  import { SankeyOptions } from '@progress/kendo-charts';
36
- import { SankeyTooltip } from '@progress/kendo-charts';
36
+ import { SankeyTooltip as SankeyTooltip_2 } from '@progress/kendo-charts';
37
37
  import { SankeyTooltipEvent } from '@progress/kendo-charts';
38
38
  import { Surface } from '@progress/kendo-drawing';
39
39
 
@@ -4684,7 +4684,7 @@ export declare interface SankeyProps {
4684
4684
  /**
4685
4685
  * The configuration of the Sankey tooltips.
4686
4686
  */
4687
- tooltip?: SankeyTooltips;
4687
+ tooltip?: SankeyTooltip;
4688
4688
  /**
4689
4689
  * If set to `true`, the Sankey component will not perform automatic layout.
4690
4690
  */
@@ -4721,30 +4721,10 @@ export declare interface SankeyProps {
4721
4721
  export declare interface SankeyTitle extends Title {
4722
4722
  }
4723
4723
 
4724
- /**
4725
- * Represents the props of the Sankey tooltip component.
4726
- *
4727
- * @hidden
4728
- */
4729
- export declare interface SankeyTooltipProps {
4730
- /**
4731
- * The event object of the Sankey tooltip.
4732
- */
4733
- event: SankeyTooltipEvent;
4734
- /**
4735
- * The content component of the Sankey tooltip.
4736
- */
4737
- Content: React.ComponentType<TooltipContentProps>;
4738
- /**
4739
- * The distance between the tooltip and the mouse pointer in pixels.
4740
- */
4741
- offset: number;
4742
- }
4743
-
4744
4724
  /**
4745
4725
  * Represents the Sankey tooltip configuration.
4746
4726
  */
4747
- export declare interface SankeyTooltips extends SankeyTooltip {
4727
+ export declare interface SankeyTooltip extends SankeyTooltip_2 {
4748
4728
  /**
4749
4729
  * Indicates whether the Sankey tooltips will be rendered.
4750
4730
  */
@@ -4765,6 +4745,26 @@ export declare interface SankeyTooltips extends SankeyTooltip {
4765
4745
  nodeComponent?: React.ComponentType<TooltipContentProps>;
4766
4746
  }
4767
4747
 
4748
+ /**
4749
+ * Represents the props of the Sankey tooltip component.
4750
+ *
4751
+ * @hidden
4752
+ */
4753
+ export declare interface SankeyTooltipProps {
4754
+ /**
4755
+ * The event object of the Sankey tooltip.
4756
+ */
4757
+ event: SankeyTooltipEvent;
4758
+ /**
4759
+ * The content component of the Sankey tooltip.
4760
+ */
4761
+ Content: React.ComponentType<TooltipContentProps>;
4762
+ /**
4763
+ * The distance between the tooltip and the mouse pointer in pixels.
4764
+ */
4765
+ offset: number;
4766
+ }
4767
+
4768
4768
  /**
4769
4769
  * Arguments for the `selectEnd` event.
4770
4770
  */
@@ -10,7 +10,7 @@ const e = {
10
10
  name: "@progress/kendo-react-charts",
11
11
  productName: "KendoReact",
12
12
  productCodes: ["KENDOUIREACT", "KENDOUICOMPLETE"],
13
- publishDate: 1714397561,
13
+ publishDate: 1714738565,
14
14
  version: "",
15
15
  licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
16
16
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-react-charts",
3
- "version": "7.5.0-develop.10",
3
+ "version": "7.5.0-develop.12",
4
4
  "description": "React Chart renders a wide range of high-quality data visualizations. KendoReact Charts package",
5
5
  "author": "Progress",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -24,10 +24,10 @@
24
24
  "peerDependencies": {
25
25
  "@progress/kendo-drawing": "^1.20.1",
26
26
  "@progress/kendo-licensing": "^1.3.4",
27
- "@progress/kendo-react-common": "7.5.0-develop.10",
28
- "@progress/kendo-react-intl": "7.5.0-develop.10",
29
- "@progress/kendo-react-layout": "7.5.0-develop.10",
30
- "@progress/kendo-react-popup": "7.5.0-develop.10",
27
+ "@progress/kendo-react-common": "7.5.0-develop.12",
28
+ "@progress/kendo-react-intl": "7.5.0-develop.12",
29
+ "@progress/kendo-react-layout": "7.5.0-develop.12",
30
+ "@progress/kendo-react-popup": "7.5.0-develop.12",
31
31
  "@progress/kendo-svg-icons": "^2.1.0",
32
32
  "hammerjs": "^2.0.0",
33
33
  "react": "^16.8.2 || ^17.0.0 || ^18.0.0",
package/sankey/Sankey.js CHANGED
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const j=require("react"),h=require("@progress/kendo-charts"),M=require("./theme-service.js"),O=require("@progress/kendo-react-common"),D=require("../package-metadata.js"),H=require("./propTypes.js"),u=require("./SankeyTooltip.js");function x(e){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const r=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(l,o,r.get?r:{enumerable:!0,get:()=>e[o]})}}return l.default=e,Object.freeze(l)}const t=x(j),_=12,I=["nodeEnter","nodeLeave","linkEnter","linkLeave","nodeClick","linkClick"],V=(e,l)=>{e&&(e.unbind(),I.forEach(o=>{l[o]&&e.bind(o,l[o])}))},s=t.forwardRef((e,l)=>{O.validatePackage(D.packageMetadata);const o=t.useRef(null),r=t.useRef(null),c=t.useRef(null),{data:d,links:f,nodes:k,labels:y,title:m,legend:p,tooltip:b,disableAutoLayout:g}=e,[E,C]=t.useState(null),{followPointer:v,delay:T,offset:L=_}=b||{},S=t.useRef();S.current=b;const P=t.useCallback(n=>{const{visible:i=!0,nodeComponent:N=u.NodeTooltipContent,linkComponent:q=u.LinkTooltipContent}=S.current||{};if(i){const w={event:n,offset:L,Content:n.targetType==="node"?N:q};C(w)}},[L]),R=t.useCallback(()=>{C(null)},[]);t.useEffect(()=>{const n={data:d,links:f,nodes:k,labels:y,title:m,legend:p,disableAutoLayout:g,tooltip:{delay:T,followPointer:v}};return r.current?r.current.setOptions(n):O.canUseDOM&&o.current&&M.loadTheme(o.current.ownerDocument,i=>{r.current=new h.Sankey(o.current,n,i)}),()=>{r.current&&(r.current.destroy(),r.current=null)}},[d,f,k,y,m,p,g,v,T]),t.useImperativeHandle(c,()=>({get element(){return o.current},exportVisual:n=>r.current.exportVisual(n),props:e}),[]),t.useImperativeHandle(l,()=>c.current);const a=t.useCallback(n=>n&&(i=>{Object.defineProperty(i,"target",{get:()=>c.current}),i.nativeEvent=i.originalEvent||null,n.call(void 0,i)}),[]);return t.useEffect(()=>{const n=r.current;V(n,{nodeEnter:a(e.onNodeEnter),nodeLeave:a(e.onNodeLeave),linkEnter:a(e.onLinkEnter),linkLeave:a(e.onLinkLeave),nodeClick:a(e.onNodeClick),linkClick:a(e.onLinkClick)}),n&&(n.bind("tooltipShow",P),n.bind("tooltipHide",R))},[e.onNodeEnter,e.onNodeLeave,e.onLinkEnter,e.onLinkLeave]),t.createElement(t.Fragment,null,t.createElement("div",{ref:o,className:e.className,style:e.style}),E&&t.createElement(u.TooltipComponent,{...E}))});s.propTypes=H.sankeyPropTypes;s.displayName="KendoReactSankey";exports.Sankey=s;
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const j=require("react"),w=require("@progress/kendo-charts"),D=require("./theme-service.js"),h=require("@progress/kendo-react-common"),M=require("../package-metadata.js"),x=require("./propTypes.js"),p=require("./SankeyTooltip.js");function H(n){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const o in n)if(o!=="default"){const r=Object.getOwnPropertyDescriptor(n,o);Object.defineProperty(a,o,r.get?r:{enumerable:!0,get:()=>n[o]})}}return a.default=n,Object.freeze(a)}const t=H(j),P=12,f={offset:P,visible:!0},_=["nodeEnter","nodeLeave","linkEnter","linkLeave","nodeClick","linkClick"],I=(n,a)=>{n&&(n.unbind(),_.forEach(o=>{a[o]&&n.bind(o,a[o])}))},k=t.forwardRef((n,a)=>{h.validatePackage(M.packageMetadata);const o=t.useRef(null),r=t.useRef(null),u=t.useRef(null),{data:y,links:m,nodes:b,labels:g,title:v,legend:C,tooltip:s=f,disableAutoLayout:E}=n,T=t.useRef();T.current=n;const[S,L]=t.useState(null),R=t.useCallback(l=>{const{visible:i,offset:e=P,nodeComponent:d=p.NodeTooltipContent,linkComponent:q=p.LinkTooltipContent}={...f,...s};if(i){const N={event:l,offset:e,Content:l.targetType==="node"?d:q};L(N)}},[s]),O=t.useCallback(()=>{L(null)},[]),c=t.useCallback((l,i)=>{const e=T.current[l];if(e){const d={...i,nativeEvent:i.originalEvent,target:u.current};e.call(void 0,d)}},[]);return t.useEffect(()=>{const l={data:y,links:m,nodes:b,labels:g,title:v,legend:C,disableAutoLayout:E,tooltip:{...f,...s}};return r.current?r.current.setOptions(l):h.canUseDOM&&o.current&&D.loadTheme(o.current.ownerDocument,i=>{r.current=new w.Sankey(o.current,l,i),I(r.current,{nodeEnter:e=>{c("onNodeEnter",e)},nodeLeave:e=>{c("onNodeLeave",e)},linkEnter:e=>{c("onLinkEnter",e)},linkLeave:e=>{c("onLinkLeave",e)},nodeClick:e=>{c("onNodeClick",e)},linkClick:e=>{c("onLinkClick",e)}}),r.current.bind("tooltipShow",R),r.current.bind("tooltipHide",O)}),()=>{r.current&&(r.current.destroy(),r.current=null)}},[y,m,b,g,v,C,E,s,O,R,c]),t.useImperativeHandle(u,()=>({get element(){return o.current},exportVisual:l=>r.current.exportVisual(l),props:n}),[]),t.useImperativeHandle(a,()=>u.current),t.createElement(t.Fragment,null,t.createElement("div",{ref:o,className:n.className,style:n.style}),S&&t.createElement(p.TooltipComponent,{...S}))});k.propTypes=x.sankeyPropTypes;k.displayName="KendoReactSankey";exports.Sankey=k;
package/sankey/Sankey.mjs CHANGED
@@ -7,84 +7,103 @@
7
7
  */
8
8
  "use client";
9
9
  import * as t from "react";
10
- import { Sankey as O } from "@progress/kendo-charts";
10
+ import { Sankey as w } from "@progress/kendo-charts";
11
11
  import { loadTheme as x } from "./theme-service.mjs";
12
- import { validatePackage as H, canUseDOM as h } from "@progress/kendo-react-common";
13
- import { packageMetadata as D } from "../package-metadata.mjs";
12
+ import { validatePackage as O, canUseDOM as D } from "@progress/kendo-react-common";
13
+ import { packageMetadata as H } from "../package-metadata.mjs";
14
14
  import { sankeyPropTypes as I } from "./propTypes.mjs";
15
- import { TooltipComponent as M, NodeTooltipContent as V, LinkTooltipContent as j } from "./SankeyTooltip.mjs";
16
- const A = 12, F = ["nodeEnter", "nodeLeave", "linkEnter", "linkLeave", "nodeClick", "linkClick"], K = (e, a) => {
17
- e && (e.unbind(), F.forEach((o) => {
18
- a[o] && e.bind(o, a[o]);
15
+ import { TooltipComponent as M, NodeTooltipContent as V, LinkTooltipContent as A } from "./SankeyTooltip.mjs";
16
+ const h = 12, p = {
17
+ offset: h,
18
+ visible: !0
19
+ }, F = ["nodeEnter", "nodeLeave", "linkEnter", "linkLeave", "nodeClick", "linkClick"], K = (o, s) => {
20
+ o && (o.unbind(), F.forEach((r) => {
21
+ s[r] && o.bind(r, s[r]);
19
22
  }));
20
- }, g = t.forwardRef((e, a) => {
21
- H(D);
22
- const o = t.useRef(null), r = t.useRef(null), c = t.useRef(null), { data: s, links: u, nodes: d, labels: f, title: k, legend: m, tooltip: p, disableAutoLayout: y } = e, [E, C] = t.useState(null), { followPointer: L, delay: v, offset: b = A } = p || {}, T = t.useRef();
23
- T.current = p;
24
- const R = t.useCallback((n) => {
23
+ }, N = t.forwardRef((o, s) => {
24
+ O(H);
25
+ const r = t.useRef(null), n = t.useRef(null), u = t.useRef(null), { data: f, links: k, nodes: m, labels: y, title: E, legend: v, tooltip: c = p, disableAutoLayout: C } = o, b = t.useRef();
26
+ b.current = o;
27
+ const [T, g] = t.useState(null), L = t.useCallback((l) => {
25
28
  const {
26
- visible: l = !0,
27
- nodeComponent: P = V,
28
- linkComponent: S = j
29
- } = T.current || {};
30
- if (l) {
31
- const w = {
32
- event: n,
33
- offset: b,
34
- Content: n.targetType === "node" ? P : S
29
+ visible: a,
30
+ offset: e = h,
31
+ nodeComponent: d = V,
32
+ linkComponent: S = A
33
+ } = { ...p, ...c };
34
+ if (a) {
35
+ const P = {
36
+ event: l,
37
+ offset: e,
38
+ Content: l.targetType === "node" ? d : S
35
39
  };
36
- C(w);
40
+ g(P);
41
+ }
42
+ }, [c]), R = t.useCallback(() => {
43
+ g(null);
44
+ }, []), i = t.useCallback((l, a) => {
45
+ const e = b.current[l];
46
+ if (e) {
47
+ const d = {
48
+ ...a,
49
+ nativeEvent: a.originalEvent,
50
+ target: u.current
51
+ };
52
+ e.call(void 0, d);
37
53
  }
38
- }, [b]), N = t.useCallback(() => {
39
- C(null);
40
54
  }, []);
41
- t.useEffect(() => {
42
- const n = {
43
- data: s,
44
- links: u,
45
- nodes: d,
46
- labels: f,
47
- title: k,
48
- legend: m,
49
- disableAutoLayout: y,
50
- tooltip: { delay: v, followPointer: L }
55
+ return t.useEffect(() => {
56
+ const l = {
57
+ data: f,
58
+ links: k,
59
+ nodes: m,
60
+ labels: y,
61
+ title: E,
62
+ legend: v,
63
+ disableAutoLayout: C,
64
+ tooltip: { ...p, ...c }
51
65
  };
52
- return r.current ? r.current.setOptions(n) : h && o.current && x(o.current.ownerDocument, (l) => {
53
- r.current = new O(o.current, n, l);
66
+ return n.current ? n.current.setOptions(l) : D && r.current && x(r.current.ownerDocument, (a) => {
67
+ n.current = new w(r.current, l, a), K(n.current, {
68
+ nodeEnter: (e) => {
69
+ i("onNodeEnter", e);
70
+ },
71
+ nodeLeave: (e) => {
72
+ i("onNodeLeave", e);
73
+ },
74
+ linkEnter: (e) => {
75
+ i("onLinkEnter", e);
76
+ },
77
+ linkLeave: (e) => {
78
+ i("onLinkLeave", e);
79
+ },
80
+ nodeClick: (e) => {
81
+ i("onNodeClick", e);
82
+ },
83
+ linkClick: (e) => {
84
+ i("onLinkClick", e);
85
+ }
86
+ }), n.current.bind("tooltipShow", L), n.current.bind("tooltipHide", R);
54
87
  }), () => {
55
- r.current && (r.current.destroy(), r.current = null);
88
+ n.current && (n.current.destroy(), n.current = null);
56
89
  };
57
- }, [s, u, d, f, k, m, y, L, v]), t.useImperativeHandle(c, () => ({
90
+ }, [f, k, m, y, E, v, C, c, R, L, i]), t.useImperativeHandle(u, () => ({
58
91
  get element() {
59
- return o.current;
92
+ return r.current;
60
93
  },
61
- exportVisual: (n) => r.current.exportVisual(n),
62
- props: e
63
- }), []), t.useImperativeHandle(a, () => c.current);
64
- const i = t.useCallback((n) => n && ((l) => {
65
- Object.defineProperty(l, "target", { get: () => c.current }), l.nativeEvent = l.originalEvent || null, n.call(void 0, l);
66
- }), []);
67
- return t.useEffect(() => {
68
- const n = r.current;
69
- K(n, {
70
- nodeEnter: i(e.onNodeEnter),
71
- nodeLeave: i(e.onNodeLeave),
72
- linkEnter: i(e.onLinkEnter),
73
- linkLeave: i(e.onLinkLeave),
74
- nodeClick: i(e.onNodeClick),
75
- linkClick: i(e.onLinkClick)
76
- }), n && (n.bind("tooltipShow", R), n.bind("tooltipHide", N));
77
- }, [e.onNodeEnter, e.onNodeLeave, e.onLinkEnter, e.onLinkLeave]), /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(
94
+ exportVisual: (l) => n.current.exportVisual(l),
95
+ props: o
96
+ }), []), t.useImperativeHandle(s, () => u.current), /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(
78
97
  "div",
79
98
  {
80
- ref: o,
81
- className: e.className,
82
- style: e.style
99
+ ref: r,
100
+ className: o.className,
101
+ style: o.style
83
102
  }
84
- ), E && /* @__PURE__ */ t.createElement(M, { ...E }));
103
+ ), T && /* @__PURE__ */ t.createElement(M, { ...T }));
85
104
  });
86
- g.propTypes = I;
87
- g.displayName = "KendoReactSankey";
105
+ N.propTypes = I;
106
+ N.displayName = "KendoReactSankey";
88
107
  export {
89
- g as Sankey
108
+ N as Sankey
90
109
  };