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