react-highcharts
Advanced tools
Comparing version 8.0.2 to 8.0.3
@@ -1,1 +0,1 @@ | ||
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n(require("react")):"function"==typeof define&&define.amd?define(["react"],n):"object"==typeof exports?exports.RedrawOnPrint=n(require("react")):e.RedrawOnPrint=n(e.React)}(this,function(e){return function(e){function n(t){if(r[t])return r[t].exports;var i=r[t]={exports:{},id:t,loaded:!1};return e[t].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}var r={};return n.m=e,n.c=r,n.p="",n(0)}([function(e,n,r){e.exports=r(7)},function(n,r){n.exports=e},,,,,,function(e,n,r){"use strict";var t=r(1),i=t.createClass({displayName:"RedrawOnPrint",componentDidMount:function(){if(window.matchMedia){var e=window.matchMedia("print");e.addListener(this._reflowChildren)}},componentWillUnmount:function(){if(window.matchMedia){var e=window.matchMedia("print");e.removeListener(this._reflowChildren)}},_reflowChildren:function(){this.children&&this.children.map(function(e){if(!e||!e.chart)throw new Error("RedrawOnPrint child should be a highcharts");e.chart.reflow()})},render:function(){var e=this;return t.createElement("div",null,t.Children.map(this.props.children,function(n){return t.cloneElement(n,{ref:function(n){e.children||(e.children=[]),e.children.push(n)}})}))}});e.exports=i}])}); | ||
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("react")):"function"==typeof define&&define.amd?define(["react"],r):"object"==typeof exports?exports.RedrawOnPrint=r(require("react")):e.RedrawOnPrint=r(e.React)}(this,function(e){return function(e){function r(n){if(t[n])return t[n].exports;var i=t[n]={exports:{},id:n,loaded:!1};return e[n].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}var t={};return r.m=e,r.c=t,r.p="",r(0)}([function(e,r,t){e.exports=t(7)},function(r,t){r.exports=e},,,,,,function(e,r,t){"use strict";var n=t(1),i=n.createClass({displayName:"RedrawOnPrint",componentDidMount:function(){if(window.matchMedia){var e=window.matchMedia("print");e.addListener(this._reflowChildren)}},componentWillUnmount:function(){if(window.matchMedia){var e=window.matchMedia("print");e.removeListener(this._reflowChildren)}},_reflowChildren:function(){this.children.map(function(e){if(!e||!e.chart)throw new Error("RedrawOnPrint child should be a highcharts");e.chart.reflow()})},render:function(){var e=this;return this.children=[],n.createElement("div",null,n.Children.map(this.props.children,function(r){return n.cloneElement(r,{ref:function(r){return r&&e.children.push(r)}})}))}});e.exports=i}])}); |
@@ -79,3 +79,2 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
displayName: 'RedrawOnPrint', | ||
componentDidMount: function componentDidMount() { | ||
@@ -90,3 +89,2 @@ // This is a listiner bind to the print media query | ||
}, | ||
componentWillUnmount: function componentWillUnmount() { | ||
@@ -98,18 +96,14 @@ if (window.matchMedia) { | ||
}, | ||
_reflowChildren: function _reflowChildren() { | ||
if (this.children) { | ||
this.children.map(function (child) { | ||
if (!child || !child.chart) { | ||
throw new Error('RedrawOnPrint child should be a highcharts'); | ||
} | ||
child.chart.reflow(); | ||
}); | ||
} | ||
this.children.map(function (child) { | ||
if (!child || !child.chart) { | ||
throw new Error('RedrawOnPrint child should be a highcharts'); | ||
} | ||
child.chart.reflow(); | ||
}); | ||
}, | ||
render: function render() { | ||
var _this = this; | ||
this.children = []; | ||
return React.createElement( | ||
@@ -121,6 +115,3 @@ 'div', | ||
ref: function ref(c) { | ||
if (!_this.children) { | ||
_this.children = []; | ||
} | ||
_this.children.push(c); | ||
return c && _this.children.push(c); | ||
} | ||
@@ -127,0 +118,0 @@ }); |
@@ -1,1 +0,1 @@ | ||
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n(require("react")):"function"==typeof define&&define.amd?define(["react"],n):"object"==typeof exports?exports.RedrawOnPrint=n(require("react")):e.RedrawOnPrint=n(e.React)}(this,function(e){return function(e){function n(t){if(r[t])return r[t].exports;var i=r[t]={exports:{},id:t,loaded:!1};return e[t].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}var r={};return n.m=e,n.c=r,n.p="",n(0)}([function(e,n,r){e.exports=r(7)},function(n,r){n.exports=e},,,,,,function(e,n,r){"use strict";var t=r(1),i=t.createClass({displayName:"RedrawOnPrint",componentDidMount:function(){if(window.matchMedia){var e=window.matchMedia("print");e.addListener(this._reflowChildren)}},componentWillUnmount:function(){if(window.matchMedia){var e=window.matchMedia("print");e.removeListener(this._reflowChildren)}},_reflowChildren:function(){this.children&&this.children.map(function(e){if(!e||!e.chart)throw new Error("RedrawOnPrint child should be a highcharts");e.chart.reflow()})},render:function(){var e=this;return t.createElement("div",null,t.Children.map(this.props.children,function(n){return t.cloneElement(n,{ref:function(n){e.children||(e.children=[]),e.children.push(n)}})}))}});e.exports=i}])}); | ||
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("react")):"function"==typeof define&&define.amd?define(["react"],r):"object"==typeof exports?exports.RedrawOnPrint=r(require("react")):e.RedrawOnPrint=r(e.React)}(this,function(e){return function(e){function r(n){if(t[n])return t[n].exports;var i=t[n]={exports:{},id:n,loaded:!1};return e[n].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}var t={};return r.m=e,r.c=t,r.p="",r(0)}([function(e,r,t){e.exports=t(7)},function(r,t){r.exports=e},,,,,,function(e,r,t){"use strict";var n=t(1),i=n.createClass({displayName:"RedrawOnPrint",componentDidMount:function(){if(window.matchMedia){var e=window.matchMedia("print");e.addListener(this._reflowChildren)}},componentWillUnmount:function(){if(window.matchMedia){var e=window.matchMedia("print");e.removeListener(this._reflowChildren)}},_reflowChildren:function(){this.children.map(function(e){if(!e||!e.chart)throw new Error("RedrawOnPrint child should be a highcharts");e.chart.reflow()})},render:function(){var e=this;return this.children=[],n.createElement("div",null,n.Children.map(this.props.children,function(r){return n.cloneElement(r,{ref:function(r){return r&&e.children.push(r)}})}))}});e.exports=i}])}); |
@@ -79,3 +79,2 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
displayName: 'RedrawOnPrint', | ||
componentDidMount: function componentDidMount() { | ||
@@ -90,3 +89,2 @@ // This is a listiner bind to the print media query | ||
}, | ||
componentWillUnmount: function componentWillUnmount() { | ||
@@ -98,18 +96,14 @@ if (window.matchMedia) { | ||
}, | ||
_reflowChildren: function _reflowChildren() { | ||
if (this.children) { | ||
this.children.map(function (child) { | ||
if (!child || !child.chart) { | ||
throw new Error('RedrawOnPrint child should be a highcharts'); | ||
} | ||
child.chart.reflow(); | ||
}); | ||
} | ||
this.children.map(function (child) { | ||
if (!child || !child.chart) { | ||
throw new Error('RedrawOnPrint child should be a highcharts'); | ||
} | ||
child.chart.reflow(); | ||
}); | ||
}, | ||
render: function render() { | ||
var _this = this; | ||
this.children = []; | ||
return React.createElement( | ||
@@ -121,6 +115,3 @@ 'div', | ||
ref: function ref(c) { | ||
if (!_this.children) { | ||
_this.children = []; | ||
} | ||
_this.children.push(c); | ||
return c && _this.children.push(c); | ||
} | ||
@@ -127,0 +118,0 @@ }); |
@@ -1,1 +0,1 @@ | ||
!function(r,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("highcharts")):"function"==typeof define&&define.amd?define(["react","highcharts"],t):"object"==typeof exports?exports.index=t(require("react"),require("highcharts")):r.index=t(r.React,r.Highcharts)}(this,function(r,t){return function(r){function t(n){if(e[n])return e[n].exports;var o=e[n]={exports:{},id:n,loaded:!1};return r[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var e={};return t.m=r,t.c=e,t.p="",t(0)}([function(r,t,e){r.exports=e(3)},function(t,e){t.exports=r},function(r,t,e){(function(t){"use strict";var n=Object.assign||function(r){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n])}return r},o=e(1);r.exports=function(r,e){var i="Highcharts"+r,s=o.createClass({displayName:i,propTypes:{config:o.PropTypes.object.isRequired,isPureConfig:o.PropTypes.bool},renderChart:function(o){var s=this;if(!o)throw new Error("Config must be specified for the "+i+" component");var c=o.chart;this.chart=new e[r](n({},o,{chart:n({},c,{renderTo:this.refs.chart})})),t.requestAnimationFrame&&requestAnimationFrame(function(){s.chart.reflow()})},shouldComponentUpdate:function(r){return this.props.isPureConfig&&this.props.config===r.config||this.renderChart(r.config),!0},getChart:function(){if(!this.chart)throw new Error("getChart() should not be called before the component is mounted");return this.chart},componentDidMount:function(){this.renderChart(this.props.config)},render:function(){var r=this.props;return r=n({},r,{ref:"chart"}),o.createElement("div",r)}});return s.Highcharts=e,s}}).call(t,function(){return this}())},function(r,t,e){"use strict";r.exports=e(2)("Chart",e(4))},function(r,e){r.exports=t}])}); | ||
!function(t,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("react"),require("highcharts")):"function"==typeof define&&define.amd?define(["react","highcharts"],r):"object"==typeof exports?exports.index=r(require("react"),require("highcharts")):t.index=r(t.React,t.Highcharts)}(this,function(t,r){return function(t){function r(n){if(e[n])return e[n].exports;var o=e[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}var e={};return r.m=t,r.c=e,r.p="",r(0)}([function(t,r,e){t.exports=e(3)},function(r,e){r.exports=t},function(t,r,e){(function(r){"use strict";var n=Object.assign||function(t){for(var r=1;r<arguments.length;r++){var e=arguments[r];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t},o=e(1);t.exports=function(t,e){var i="Highcharts"+t,c=o.createClass({displayName:i,propTypes:{config:o.PropTypes.object.isRequired,isPureConfig:o.PropTypes.bool},renderChart:function(o){var c=this;if(!o)throw new Error("Config must be specified for the "+i+" component");var s=o.chart;this.chart=new e[t](n({},o,{chart:n({},s,{renderTo:this.refs.chart})})),r.requestAnimationFrame&&requestAnimationFrame(function(){c.chart.reflow()})},shouldComponentUpdate:function(t){return this.props.isPureConfig&&this.props.config===t.config||this.renderChart(t.config),!0},getChart:function(){if(!this.chart)throw new Error("getChart() should not be called before the component is mounted");return this.chart},componentDidMount:function(){this.renderChart(this.props.config)},componentWillUnmount:function(){this.chart.destroy()},render:function(){var t=this.props;return t=n({},t,{ref:"chart"}),o.createElement("div",t)}});return c.Highcharts=e,c}}).call(r,function(){return this}())},function(t,r,e){"use strict";t.exports=e(2)("Chart",e(4))},function(t,e){t.exports=r}])}); |
@@ -125,2 +125,7 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
componentWillUnmount: function componentWillUnmount() { | ||
this.chart.destroy(); | ||
}, | ||
render: function render() { | ||
@@ -127,0 +132,0 @@ var props = this.props; |
@@ -1,1 +0,1 @@ | ||
!function(t,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("react"),require("highcharts")):"function"==typeof define&&define.amd?define(["react","highcharts"],r):"object"==typeof exports?exports.ReactHighcharts=r(require("react"),require("highcharts")):t.ReactHighcharts=r(t.React,t.Highcharts)}(this,function(t,r){return function(t){function r(n){if(e[n])return e[n].exports;var o=e[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}var e={};return r.m=t,r.c=e,r.p="",r(0)}([function(t,r,e){t.exports=e(3)},function(r,e){r.exports=t},function(t,r,e){(function(r){"use strict";var n=Object.assign||function(t){for(var r=1;r<arguments.length;r++){var e=arguments[r];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t},o=e(1);t.exports=function(t,e){var i="Highcharts"+t,c=o.createClass({displayName:i,propTypes:{config:o.PropTypes.object.isRequired,isPureConfig:o.PropTypes.bool},renderChart:function(o){var c=this;if(!o)throw new Error("Config must be specified for the "+i+" component");var s=o.chart;this.chart=new e[t](n({},o,{chart:n({},s,{renderTo:this.refs.chart})})),r.requestAnimationFrame&&requestAnimationFrame(function(){c.chart.reflow()})},shouldComponentUpdate:function(t){return this.props.isPureConfig&&this.props.config===t.config||this.renderChart(t.config),!0},getChart:function(){if(!this.chart)throw new Error("getChart() should not be called before the component is mounted");return this.chart},componentDidMount:function(){this.renderChart(this.props.config)},render:function(){var t=this.props;return t=n({},t,{ref:"chart"}),o.createElement("div",t)}});return c.Highcharts=e,c}}).call(r,function(){return this}())},function(t,r,e){"use strict";t.exports=e(2)("Chart",e(4))},function(t,e){t.exports=r}])}); | ||
!function(t,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("react"),require("highcharts")):"function"==typeof define&&define.amd?define(["react","highcharts"],r):"object"==typeof exports?exports.ReactHighcharts=r(require("react"),require("highcharts")):t.ReactHighcharts=r(t.React,t.Highcharts)}(this,function(t,r){return function(t){function r(n){if(e[n])return e[n].exports;var o=e[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}var e={};return r.m=t,r.c=e,r.p="",r(0)}([function(t,r,e){t.exports=e(3)},function(r,e){r.exports=t},function(t,r,e){(function(r){"use strict";var n=Object.assign||function(t){for(var r=1;r<arguments.length;r++){var e=arguments[r];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t},o=e(1);t.exports=function(t,e){var i="Highcharts"+t,c=o.createClass({displayName:i,propTypes:{config:o.PropTypes.object.isRequired,isPureConfig:o.PropTypes.bool},renderChart:function(o){var c=this;if(!o)throw new Error("Config must be specified for the "+i+" component");var s=o.chart;this.chart=new e[t](n({},o,{chart:n({},s,{renderTo:this.refs.chart})})),r.requestAnimationFrame&&requestAnimationFrame(function(){c.chart.reflow()})},shouldComponentUpdate:function(t){return this.props.isPureConfig&&this.props.config===t.config||this.renderChart(t.config),!0},getChart:function(){if(!this.chart)throw new Error("getChart() should not be called before the component is mounted");return this.chart},componentDidMount:function(){this.renderChart(this.props.config)},componentWillUnmount:function(){this.chart.destroy()},render:function(){var t=this.props;return t=n({},t,{ref:"chart"}),o.createElement("div",t)}});return c.Highcharts=e,c}}).call(r,function(){return this}())},function(t,r,e){"use strict";t.exports=e(2)("Chart",e(4))},function(t,e){t.exports=r}])}); |
@@ -125,2 +125,7 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
componentWillUnmount: function componentWillUnmount() { | ||
this.chart.destroy(); | ||
}, | ||
render: function render() { | ||
@@ -127,0 +132,0 @@ var props = this.props; |
@@ -1,1 +0,1 @@ | ||
!function(t,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("react"),require("highcharts/highmaps")):"function"==typeof define&&define.amd?define(["react","highcharts/highmaps"],r):"object"==typeof exports?exports.ReactHighmaps=r(require("react"),require("highcharts/highmaps")):t.ReactHighmaps=r(t.React,t.Highcharts)}(this,function(t,r){return function(t){function r(n){if(e[n])return e[n].exports;var o=e[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}var e={};return r.m=t,r.c=e,r.p="",r(0)}([function(t,r,e){t.exports=e(5)},function(r,e){r.exports=t},function(t,r,e){(function(r){"use strict";var n=Object.assign||function(t){for(var r=1;r<arguments.length;r++){var e=arguments[r];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t},o=e(1);t.exports=function(t,e){var i="Highcharts"+t,s=o.createClass({displayName:i,propTypes:{config:o.PropTypes.object.isRequired,isPureConfig:o.PropTypes.bool},renderChart:function(o){var s=this;if(!o)throw new Error("Config must be specified for the "+i+" component");var c=o.chart;this.chart=new e[t](n({},o,{chart:n({},c,{renderTo:this.refs.chart})})),r.requestAnimationFrame&&requestAnimationFrame(function(){s.chart.reflow()})},shouldComponentUpdate:function(t){return this.props.isPureConfig&&this.props.config===t.config||this.renderChart(t.config),!0},getChart:function(){if(!this.chart)throw new Error("getChart() should not be called before the component is mounted");return this.chart},componentDidMount:function(){this.renderChart(this.props.config)},render:function(){var t=this.props;return t=n({},t,{ref:"chart"}),o.createElement("div",t)}});return s.Highcharts=e,s}}).call(r,function(){return this}())},,,function(t,r,e){"use strict";t.exports=e(2)("Map",e(8))},,,function(t,e){t.exports=r}])}); | ||
!function(t,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("react"),require("highcharts/highmaps")):"function"==typeof define&&define.amd?define(["react","highcharts/highmaps"],r):"object"==typeof exports?exports.ReactHighmaps=r(require("react"),require("highcharts/highmaps")):t.ReactHighmaps=r(t.React,t.Highcharts)}(this,function(t,r){return function(t){function r(n){if(e[n])return e[n].exports;var o=e[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}var e={};return r.m=t,r.c=e,r.p="",r(0)}([function(t,r,e){t.exports=e(5)},function(r,e){r.exports=t},function(t,r,e){(function(r){"use strict";var n=Object.assign||function(t){for(var r=1;r<arguments.length;r++){var e=arguments[r];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t},o=e(1);t.exports=function(t,e){var i="Highcharts"+t,s=o.createClass({displayName:i,propTypes:{config:o.PropTypes.object.isRequired,isPureConfig:o.PropTypes.bool},renderChart:function(o){var s=this;if(!o)throw new Error("Config must be specified for the "+i+" component");var c=o.chart;this.chart=new e[t](n({},o,{chart:n({},c,{renderTo:this.refs.chart})})),r.requestAnimationFrame&&requestAnimationFrame(function(){s.chart.reflow()})},shouldComponentUpdate:function(t){return this.props.isPureConfig&&this.props.config===t.config||this.renderChart(t.config),!0},getChart:function(){if(!this.chart)throw new Error("getChart() should not be called before the component is mounted");return this.chart},componentDidMount:function(){this.renderChart(this.props.config)},componentWillUnmount:function(){this.chart.destroy()},render:function(){var t=this.props;return t=n({},t,{ref:"chart"}),o.createElement("div",t)}});return s.Highcharts=e,s}}).call(r,function(){return this}())},,,function(t,r,e){"use strict";t.exports=e(2)("Map",e(8))},,,function(t,e){t.exports=r}])}); |
@@ -118,2 +118,7 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
componentWillUnmount: function componentWillUnmount() { | ||
this.chart.destroy(); | ||
}, | ||
render: function render() { | ||
@@ -120,0 +125,0 @@ var props = this.props; |
@@ -1,1 +0,1 @@ | ||
!function(t,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("react"),require("highcharts/highstock")):"function"==typeof define&&define.amd?define(["react","highcharts/highstock"],r):"object"==typeof exports?exports.ReactHighstock=r(require("react"),require("highcharts/highstock")):t.ReactHighstock=r(t.React,t.Highcharts)}(this,function(t,r){return function(t){function r(o){if(e[o])return e[o].exports;var n=e[o]={exports:{},id:o,loaded:!1};return t[o].call(n.exports,n,n.exports,r),n.loaded=!0,n.exports}var e={};return r.m=t,r.c=e,r.p="",r(0)}([function(t,r,e){t.exports=e(6)},function(r,e){r.exports=t},function(t,r,e){(function(r){"use strict";var o=Object.assign||function(t){for(var r=1;r<arguments.length;r++){var e=arguments[r];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},n=e(1);t.exports=function(t,e){var i="Highcharts"+t,c=n.createClass({displayName:i,propTypes:{config:n.PropTypes.object.isRequired,isPureConfig:n.PropTypes.bool},renderChart:function(n){var c=this;if(!n)throw new Error("Config must be specified for the "+i+" component");var s=n.chart;this.chart=new e[t](o({},n,{chart:o({},s,{renderTo:this.refs.chart})})),r.requestAnimationFrame&&requestAnimationFrame(function(){c.chart.reflow()})},shouldComponentUpdate:function(t){return this.props.isPureConfig&&this.props.config===t.config||this.renderChart(t.config),!0},getChart:function(){if(!this.chart)throw new Error("getChart() should not be called before the component is mounted");return this.chart},componentDidMount:function(){this.renderChart(this.props.config)},render:function(){var t=this.props;return t=o({},t,{ref:"chart"}),n.createElement("div",t)}});return c.Highcharts=e,c}}).call(r,function(){return this}())},,,,function(t,r,e){"use strict";t.exports=e(2)("StockChart",e(9))},,,function(t,e){t.exports=r}])}); | ||
!function(t,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("react"),require("highcharts/highstock")):"function"==typeof define&&define.amd?define(["react","highcharts/highstock"],r):"object"==typeof exports?exports.ReactHighstock=r(require("react"),require("highcharts/highstock")):t.ReactHighstock=r(t.React,t.Highcharts)}(this,function(t,r){return function(t){function r(o){if(e[o])return e[o].exports;var n=e[o]={exports:{},id:o,loaded:!1};return t[o].call(n.exports,n,n.exports,r),n.loaded=!0,n.exports}var e={};return r.m=t,r.c=e,r.p="",r(0)}([function(t,r,e){t.exports=e(6)},function(r,e){r.exports=t},function(t,r,e){(function(r){"use strict";var o=Object.assign||function(t){for(var r=1;r<arguments.length;r++){var e=arguments[r];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},n=e(1);t.exports=function(t,e){var i="Highcharts"+t,c=n.createClass({displayName:i,propTypes:{config:n.PropTypes.object.isRequired,isPureConfig:n.PropTypes.bool},renderChart:function(n){var c=this;if(!n)throw new Error("Config must be specified for the "+i+" component");var s=n.chart;this.chart=new e[t](o({},n,{chart:o({},s,{renderTo:this.refs.chart})})),r.requestAnimationFrame&&requestAnimationFrame(function(){c.chart.reflow()})},shouldComponentUpdate:function(t){return this.props.isPureConfig&&this.props.config===t.config||this.renderChart(t.config),!0},getChart:function(){if(!this.chart)throw new Error("getChart() should not be called before the component is mounted");return this.chart},componentDidMount:function(){this.renderChart(this.props.config)},componentWillUnmount:function(){this.chart.destroy()},render:function(){var t=this.props;return t=o({},t,{ref:"chart"}),n.createElement("div",t)}});return c.Highcharts=e,c}}).call(r,function(){return this}())},,,,function(t,r,e){"use strict";t.exports=e(2)("StockChart",e(9))},,,function(t,e){t.exports=r}])}); |
@@ -118,2 +118,7 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
componentWillUnmount: function componentWillUnmount() { | ||
this.chart.destroy(); | ||
}, | ||
render: function render() { | ||
@@ -120,0 +125,0 @@ var props = this.props; |
@@ -1,1 +0,1 @@ | ||
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n(require("react")):"function"==typeof define&&define.amd?define(["react"],n):"object"==typeof exports?exports.RedrawOnPrint=n(require("react")):e.RedrawOnPrint=n(e.React)}(this,function(e){return function(e){function n(t){if(r[t])return r[t].exports;var i=r[t]={exports:{},id:t,loaded:!1};return e[t].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}var r={};return n.m=e,n.c=r,n.p="",n(0)}([function(e,n,r){e.exports=r(7)},function(n,r){n.exports=e},,,,,,function(e,n,r){"use strict";var t=r(1),i=t.createClass({displayName:"RedrawOnPrint",componentDidMount:function(){if(window.matchMedia){var e=window.matchMedia("print");e.addListener(this._reflowChildren)}},componentWillUnmount:function(){if(window.matchMedia){var e=window.matchMedia("print");e.removeListener(this._reflowChildren)}},_reflowChildren:function(){this.children&&this.children.map(function(e){if(!e||!e.chart)throw new Error("RedrawOnPrint child should be a highcharts");e.chart.reflow()})},render:function(){var e=this;return t.createElement("div",null,t.Children.map(this.props.children,function(n){return t.cloneElement(n,{ref:function(n){e.children||(e.children=[]),e.children.push(n)}})}))}});e.exports=i}])}); | ||
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("react")):"function"==typeof define&&define.amd?define(["react"],r):"object"==typeof exports?exports.RedrawOnPrint=r(require("react")):e.RedrawOnPrint=r(e.React)}(this,function(e){return function(e){function r(n){if(t[n])return t[n].exports;var i=t[n]={exports:{},id:n,loaded:!1};return e[n].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}var t={};return r.m=e,r.c=t,r.p="",r(0)}([function(e,r,t){e.exports=t(7)},function(r,t){r.exports=e},,,,,,function(e,r,t){"use strict";var n=t(1),i=n.createClass({displayName:"RedrawOnPrint",componentDidMount:function(){if(window.matchMedia){var e=window.matchMedia("print");e.addListener(this._reflowChildren)}},componentWillUnmount:function(){if(window.matchMedia){var e=window.matchMedia("print");e.removeListener(this._reflowChildren)}},_reflowChildren:function(){this.children.map(function(e){if(!e||!e.chart)throw new Error("RedrawOnPrint child should be a highcharts");e.chart.reflow()})},render:function(){var e=this;return this.children=[],n.createElement("div",null,n.Children.map(this.props.children,function(r){return n.cloneElement(r,{ref:function(r){return r&&e.children.push(r)}})}))}});e.exports=i}])}); |
@@ -79,3 +79,2 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
displayName: 'RedrawOnPrint', | ||
componentDidMount: function componentDidMount() { | ||
@@ -90,3 +89,2 @@ // This is a listiner bind to the print media query | ||
}, | ||
componentWillUnmount: function componentWillUnmount() { | ||
@@ -98,18 +96,14 @@ if (window.matchMedia) { | ||
}, | ||
_reflowChildren: function _reflowChildren() { | ||
if (this.children) { | ||
this.children.map(function (child) { | ||
if (!child || !child.chart) { | ||
throw new Error('RedrawOnPrint child should be a highcharts'); | ||
} | ||
child.chart.reflow(); | ||
}); | ||
} | ||
this.children.map(function (child) { | ||
if (!child || !child.chart) { | ||
throw new Error('RedrawOnPrint child should be a highcharts'); | ||
} | ||
child.chart.reflow(); | ||
}); | ||
}, | ||
render: function render() { | ||
var _this = this; | ||
this.children = []; | ||
return React.createElement( | ||
@@ -121,6 +115,3 @@ 'div', | ||
ref: function ref(c) { | ||
if (!_this.children) { | ||
_this.children = []; | ||
} | ||
_this.children.push(c); | ||
return c && _this.children.push(c); | ||
} | ||
@@ -127,0 +118,0 @@ }); |
{ | ||
"name": "react-highcharts", | ||
"version": "8.0.2", | ||
"version": "8.0.3", | ||
"description": "React wrapper for highcharts", | ||
@@ -52,3 +52,3 @@ "main": "dist/ReactHighcharts.js", | ||
"react-dom": "~0.14", | ||
"react-highlight": "^0.6.1", | ||
"react-highlight": "^0.7.0", | ||
"webpack": "^1.5.3", | ||
@@ -55,0 +55,0 @@ "webpack-dev-server": "^1.10.1" |
@@ -39,4 +39,3 @@ react-highcharts | ||
var React = require('react'); | ||
var Highcharts = require('highcharts'); | ||
var ReactHighcharts = require('react-highcharts')(Highcharts); // Expects that Highcharts was loaded in the code. | ||
var ReactHighcharts = require('react-highcharts'); // Expects that Highcharts was loaded in the code. | ||
@@ -43,0 +42,0 @@ var config = { |
@@ -49,2 +49,6 @@ var React = require('react'); | ||
componentWillUnmount() { | ||
this.chart.destroy(); | ||
}, | ||
render: function (){ | ||
@@ -51,0 +55,0 @@ let props = this.props; |
var React = require('react'); | ||
var RedrawOnPrint = React.createClass({ | ||
componentDidMount: function (){ | ||
componentDidMount() { | ||
// This is a listiner bind to the print media query | ||
@@ -14,3 +14,3 @@ // it call reflow since highcharts doesn't reflow upon print | ||
componentWillUnmount: function (){ | ||
componentWillUnmount() { | ||
if (window.matchMedia) { | ||
@@ -23,13 +23,12 @@ var mediaQueryList = window.matchMedia('print'); | ||
_reflowChildren() { | ||
if (this.children) { | ||
this.children.map((child) =>{ | ||
if (!child || !child.chart) { | ||
throw new Error('RedrawOnPrint child should be a highcharts'); | ||
} | ||
child.chart.reflow(); | ||
}); | ||
} | ||
this.children.map((child) =>{ | ||
if (!child || !child.chart) { | ||
throw new Error('RedrawOnPrint child should be a highcharts'); | ||
} | ||
child.chart.reflow(); | ||
}); | ||
}, | ||
render: function (){ | ||
render() { | ||
this.children = []; | ||
return ( | ||
@@ -39,10 +38,5 @@ <div> | ||
return React.cloneElement(child, { | ||
ref: (c) => { | ||
if (!this.children) { | ||
this.children = []; | ||
} | ||
this.children.push(c); | ||
} | ||
}) | ||
})} | ||
ref: (c) => c && this.children.push(c) | ||
}) | ||
})} | ||
</div> | ||
@@ -49,0 +43,0 @@ ); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
3069271
13646
105