@carbon/charts-react 1.11.6 → 1.11.8

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.
@@ -8,9 +8,8 @@ export default class BaseChart<Options extends BaseChartOptions = BaseChartOptio
8
8
  chart?: BaseChartCore;
9
9
  chartRef: React.RefObject<HTMLDivElement>;
10
10
  createChart(chartRef: HTMLDivElement, data: ChartTabularData, options: Options): BaseChartCore;
11
- componentDidUpdate(prevProps: Props<Options>): void;
12
- componentWillUnmount(): void;
13
11
  componentDidMount(): void;
12
+ componentDidUpdate(prevProps: Props<Options>): void;
14
13
  render(): import("react/jsx-runtime").JSX.Element;
15
14
  }
16
15
  export {};
package/dist/index.js CHANGED
@@ -106,7 +106,7 @@ Check the render method of \``+$+"`."}return""}}function Z3($){{if($!==void 0){v
106
106
 
107
107
  Check your code at `+G+":"+q+"."}return""}}var Dv={};function K3($){{var G=kv();if(!G){var q=typeof $=="string"?$:$.displayName||$.name;q&&(G=`
108
108
 
109
- Check the top-level render call using <`+q+">.")}return G}}function Rv($,G){{if(!$._store||$._store.validated||$.key!=null)return;$._store.validated=!0;var q=K3(G);if(Dv[q])return;Dv[q]=!0;var st="";$&&$._owner&&$._owner!==lu.current&&(st=" It was passed a child from "+M($._owner.type)+"."),Zr($),y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',q,st),Zr(null)}}function Iv($,G){{if(typeof $!="object")return;if(au($))for(var q=0;q<$.length;q++){var st=$[q];uu(st)&&Rv(st,G)}else if(uu($))$._store&&($._store.validated=!0);else if($){var xt=g($);if(typeof xt=="function"&&xt!==$.entries)for(var Ct=xt.call($),mt;!(mt=Ct.next()).done;)uu(mt.value)&&Rv(mt.value,G)}}}function Q3($){{var G=$.type;if(G==null||typeof G=="string")return;var q;if(typeof G=="function")q=G.propTypes;else if(typeof G=="object"&&(G.$$typeof===l||G.$$typeof===h))q=G.propTypes;else return;if(q){var st=M(G);nn(q,$.props,"prop",st,$)}else if(G.PropTypes!==void 0&&!cu){cu=!0;var xt=M(G);y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",xt||"Unknown")}typeof G.getDefaultProps=="function"&&!G.getDefaultProps.isReactClassApproved&&y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function J3($){{for(var G=Object.keys($.props),q=0;q<G.length;q++){var st=G[q];if(st!=="children"&&st!=="key"){Zr($),y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",st),Zr(null);break}}$.ref!==null&&(Zr($),y("Invalid attribute `ref` supplied to `React.Fragment`."),Zr(null))}}function Nv($,G,q,st,xt,Ct){{var mt=A($);if(!mt){var gt="";($===void 0||typeof $=="object"&&$!==null&&Object.keys($).length===0)&&(gt+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var de=Z3(xt);de?gt+=de:gt+=kv();var Gt;$===null?Gt="null":au($)?Gt="array":$!==void 0&&$.$$typeof===t?(Gt="<"+(M($.type)||"Unknown")+" />",gt=" Did you accidentally export a JSX literal instead of a component?"):Gt=typeof $,y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Gt,gt)}var Wt=X3($,G,q,xt,Ct);if(Wt==null)return Wt;if(mt){var De=G.children;if(De!==void 0)if(st)if(au(De)){for(var Kr=0;Kr<De.length;Kr++)Iv(De[Kr],$);Object.freeze&&Object.freeze(De)}else y("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Iv(De,$)}return $===r?J3(Wt):Q3(Wt),Wt}}function tV($,G,q){return Nv($,G,q,!0)}function eV($,G,q){return Nv($,G,q,!1)}var nV=eV,rV=tV;ss.Fragment=r,ss.jsx=nV,ss.jsxs=rV}()),ss}process.env.NODE_ENV==="production"?su.exports=QB():su.exports=JB();var Pt=su.exports;class Rt extends re.PureComponent{constructor(){super(...arguments);hu(this,"chart");hu(this,"chartRef",re.createRef())}createChart(n,r,i){throw new Error("Method not implemented.")}componentDidUpdate(n){var r,i;this.props.data!==n.data&&((r=this.chart)==null||r.model.setData(this.props.data)),this.props.options!==n.options&&((i=this.chart)==null||i.model.setOptions(this.props.options))}componentWillUnmount(){var n;(n=this.chart)==null||n.destroy(),this.chart=void 0}componentDidMount(){this.chartRef.current&&!this.chart&&(this.chart=this.createChart(this.chartRef.current,this.props.data,this.props.options))}render(){return Pt.jsx("div",{ref:this.chartRef,className:"chart-holder"})}}class t3 extends Rt{createChart(t,n,r){return new CB(t,{data:n,options:r})}}class e3 extends Rt{createChart(t,n,r){return new $B(t,{data:n,options:r})}}class n3 extends Rt{createChart(t,n,r){return new AB(t,{data:n,options:r})}}class r3 extends Rt{createChart(t,n,r){return new LB(t,{data:n,options:r})}}class i3 extends Rt{createChart(t,n,r){return new kB(t,{data:n,options:r})}}class s3 extends Rt{createChart(t,n,r){return new DB(t,{data:n,options:r})}}class a3 extends Rt{createChart(t,n,r){return new RB(t,{data:n,options:r})}}class o3 extends Rt{createChart(t,n,r){return new IB(t,{data:n,options:r})}}class l3 extends Rt{createChart(t,n,r){return new NB(t,{data:n,options:r})}}class c3 extends Rt{createChart(t,n,r){return new PB(t,{data:n,options:r})}}class u3 extends Rt{createChart(t,n,r){return new UB(t,{data:n,options:r})}}class h3 extends Rt{createChart(t,n,r){return new BB(t,{data:n,options:r})}}class d3 extends Rt{createChart(t,n,r){return new VB(t,{data:n,options:r})}}class f3 extends Rt{createChart(t,n,r){return new HB(t,{data:n,options:r})}}class p3 extends Rt{createChart(t,n,r){return new FB(t,{data:n,options:r})}}class g3 extends Rt{createChart(t,n,r){return new GB(t,{data:n,options:r})}}class m3 extends Rt{createChart(t,n,r){return new Ev(t,{data:n,options:r})}}class v3 extends Rt{createChart(t,n,r){return new zB(t,{data:n,options:r})}}class y3 extends Rt{createChart(t,n,r){return new jB(t,{data:n,options:r})}}class b3 extends Rt{createChart(t,n,r){return new YB(t,{data:n,options:r})}}class x3 extends Rt{createChart(t,n,r){return new XB(t,{data:n,options:r})}}class w3 extends Rt{createChart(t,n,r){return new ZB(t,{data:n,options:r})}}class _3 extends Rt{createChart(t,n,r){return new WB(t,{data:n,options:r})}}class E3 extends Rt{createChart(t,n,r){return new qB(t,{data:n,options:r})}}class S3 extends Rt{createChart(t,n,r){return new KB(t,{data:n,options:r})}}var Tv={exports:{}};/*!
109
+ Check the top-level render call using <`+q+">.")}return G}}function Rv($,G){{if(!$._store||$._store.validated||$.key!=null)return;$._store.validated=!0;var q=K3(G);if(Dv[q])return;Dv[q]=!0;var st="";$&&$._owner&&$._owner!==lu.current&&(st=" It was passed a child from "+M($._owner.type)+"."),Zr($),y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',q,st),Zr(null)}}function Iv($,G){{if(typeof $!="object")return;if(au($))for(var q=0;q<$.length;q++){var st=$[q];uu(st)&&Rv(st,G)}else if(uu($))$._store&&($._store.validated=!0);else if($){var xt=g($);if(typeof xt=="function"&&xt!==$.entries)for(var Ct=xt.call($),mt;!(mt=Ct.next()).done;)uu(mt.value)&&Rv(mt.value,G)}}}function Q3($){{var G=$.type;if(G==null||typeof G=="string")return;var q;if(typeof G=="function")q=G.propTypes;else if(typeof G=="object"&&(G.$$typeof===l||G.$$typeof===h))q=G.propTypes;else return;if(q){var st=M(G);nn(q,$.props,"prop",st,$)}else if(G.PropTypes!==void 0&&!cu){cu=!0;var xt=M(G);y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",xt||"Unknown")}typeof G.getDefaultProps=="function"&&!G.getDefaultProps.isReactClassApproved&&y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function J3($){{for(var G=Object.keys($.props),q=0;q<G.length;q++){var st=G[q];if(st!=="children"&&st!=="key"){Zr($),y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",st),Zr(null);break}}$.ref!==null&&(Zr($),y("Invalid attribute `ref` supplied to `React.Fragment`."),Zr(null))}}function Nv($,G,q,st,xt,Ct){{var mt=A($);if(!mt){var gt="";($===void 0||typeof $=="object"&&$!==null&&Object.keys($).length===0)&&(gt+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var de=Z3(xt);de?gt+=de:gt+=kv();var Gt;$===null?Gt="null":au($)?Gt="array":$!==void 0&&$.$$typeof===t?(Gt="<"+(M($.type)||"Unknown")+" />",gt=" Did you accidentally export a JSX literal instead of a component?"):Gt=typeof $,y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Gt,gt)}var Wt=X3($,G,q,xt,Ct);if(Wt==null)return Wt;if(mt){var De=G.children;if(De!==void 0)if(st)if(au(De)){for(var Kr=0;Kr<De.length;Kr++)Iv(De[Kr],$);Object.freeze&&Object.freeze(De)}else y("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Iv(De,$)}return $===r?J3(Wt):Q3(Wt),Wt}}function tV($,G,q){return Nv($,G,q,!0)}function eV($,G,q){return Nv($,G,q,!1)}var nV=eV,rV=tV;ss.Fragment=r,ss.jsx=nV,ss.jsxs=rV}()),ss}process.env.NODE_ENV==="production"?su.exports=QB():su.exports=JB();var Pt=su.exports;class Rt extends re.PureComponent{constructor(){super(...arguments);hu(this,"chart");hu(this,"chartRef",re.createRef())}createChart(n,r,i){throw new Error("Method not implemented.")}componentDidMount(){this.chartRef.current&&!this.chart&&(this.chart=this.createChart(this.chartRef.current,this.props.data,this.props.options))}componentDidUpdate(n){var r,i;this.props.data!==n.data&&((r=this.chart)==null||r.model.setData(this.props.data)),this.props.options!==n.options&&((i=this.chart)==null||i.model.setOptions(this.props.options))}render(){return Pt.jsx("div",{ref:this.chartRef,className:"chart-holder"})}}class t3 extends Rt{createChart(t,n,r){return new CB(t,{data:n,options:r})}}class e3 extends Rt{createChart(t,n,r){return new $B(t,{data:n,options:r})}}class n3 extends Rt{createChart(t,n,r){return new AB(t,{data:n,options:r})}}class r3 extends Rt{createChart(t,n,r){return new LB(t,{data:n,options:r})}}class i3 extends Rt{createChart(t,n,r){return new kB(t,{data:n,options:r})}}class s3 extends Rt{createChart(t,n,r){return new DB(t,{data:n,options:r})}}class a3 extends Rt{createChart(t,n,r){return new RB(t,{data:n,options:r})}}class o3 extends Rt{createChart(t,n,r){return new IB(t,{data:n,options:r})}}class l3 extends Rt{createChart(t,n,r){return new NB(t,{data:n,options:r})}}class c3 extends Rt{createChart(t,n,r){return new PB(t,{data:n,options:r})}}class u3 extends Rt{createChart(t,n,r){return new UB(t,{data:n,options:r})}}class h3 extends Rt{createChart(t,n,r){return new BB(t,{data:n,options:r})}}class d3 extends Rt{createChart(t,n,r){return new VB(t,{data:n,options:r})}}class f3 extends Rt{createChart(t,n,r){return new HB(t,{data:n,options:r})}}class p3 extends Rt{createChart(t,n,r){return new FB(t,{data:n,options:r})}}class g3 extends Rt{createChart(t,n,r){return new GB(t,{data:n,options:r})}}class m3 extends Rt{createChart(t,n,r){return new Ev(t,{data:n,options:r})}}class v3 extends Rt{createChart(t,n,r){return new zB(t,{data:n,options:r})}}class y3 extends Rt{createChart(t,n,r){return new jB(t,{data:n,options:r})}}class b3 extends Rt{createChart(t,n,r){return new YB(t,{data:n,options:r})}}class x3 extends Rt{createChart(t,n,r){return new XB(t,{data:n,options:r})}}class w3 extends Rt{createChart(t,n,r){return new ZB(t,{data:n,options:r})}}class _3 extends Rt{createChart(t,n,r){return new WB(t,{data:n,options:r})}}class E3 extends Rt{createChart(t,n,r){return new qB(t,{data:n,options:r})}}class S3 extends Rt{createChart(t,n,r){return new KB(t,{data:n,options:r})}}var Tv={exports:{}};/*!
110
110
  Copyright (c) 2018 Jed Watson.
111
111
  Licensed under the MIT License (MIT), see
112
112
  http://jedwatson.github.io/classnames