@progress/kendo-react-charts
Version:
React Chart renders a wide range of high-quality data visualizations. KendoReact Charts package
9 lines (8 loc) • 1.62 kB
JavaScript
/**
* @license
*-------------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the package root for more information
*-------------------------------------------------------------------------------------------
*/
;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react"),p=require("../../store/store.js"),d=require("../../store/reducer.js"),l=require("../../ChartContext.js");function u(o){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const t in o)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(o,t);Object.defineProperty(e,t,r.get?r:{enumerable:!0,get:()=>o[t]})}}return e.default=o,Object.freeze(e)}const n=u(a),c=class c extends n.Component{constructor(e,t){super(e,t),this.optionsStore=t.optionsStore,this.childStore=p.createStore(d.optionsReducer)}render(){const{children:e}=this.props;return e!==void 0?n.Children.map(e,t=>n.isValidElement(t)?this.renderChildren(t):t):null}componentDidMount(){this.dispatch()}componentDidUpdate(){this.dispatch()}dispatch(){const{_chartKey:e,_chartCollectionIdxKey:t,_parentStore:r,children:h,...i}=this.props;(r||this.optionsStore).dispatch({chartKey:e,chartCollectionIdxKey:t,payload:Object.assign({},i,this.childStore.getState())})}renderChildren(e){const{children:t}=e.props,r={...e.props,_parentStore:this.childStore};return n.cloneElement(e,r,t)}};c.contextType=l.ChartContext;let s=c;exports.ConfigurationComponent=s;