You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

react-highcharts

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 6.0.1 to 7.0.0

bundle/ReactHighcharts.js

2

dist/index.js

@@ -1,1 +0,1 @@

!function(t,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("react")):"function"==typeof define&&define.amd?define(["react"],r):"object"==typeof exports?exports.Highcharts=r(require("react")):t.Highcharts=r(t.react)}(this,function(t){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(3)},function(r,e){r.exports=t},function(t,r,e){"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);if("undefined"==typeof Highcharts)throw Error('Starting with version 3 of react-highcharts, Highcharts is not bundled by default. use "react-highcharts/dist/bundle/highcharts" instead, or include highcharts. ');t.exports=function(t,r){var e="Highcharts"+r,i=n.createClass({displayName:e,propTypes:{config:n.PropTypes.object.isRequired,isPureConfig:n.PropTypes.bool},renderChart:function(n){if(!n)throw new Error("Config must be specified for the "+e+" component");var i=n.chart;this.chart=new t[r](o({},n,{chart:o({},i,{renderTo:this.refs.chart})}))},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 i.Highcharts=t,i}},function(t,r,e){"use strict";var o=e(2);t.exports=o(Highcharts,"Chart")}])});
!function(t,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("react")):"function"==typeof define&&define.amd?define(["react"],r):"object"==typeof exports?exports.index=r(require("react")):t.index=r(t.react)}(this,function(t){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(3)},function(r,e){r.exports=t},function(t,r,e){"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};if("undefined"==typeof Highcharts)throw Error("Starting with version 3 of react-highcharts, Highcharts is not bundled by default. please include highcharts. ");!function(r){if(!r&&(r=e(1),!r))throw Error("react-highcharts does not include React");t.exports=function(t,e){var n="Highcharts"+e,i=r.createClass({displayName:n,propTypes:{config:r.PropTypes.object.isRequired,isPureConfig:r.PropTypes.bool},renderChart:function(r){if(!r)throw new Error("Config must be specified for the "+n+" component");var i=r.chart;this.chart=new t[e](o({},r,{chart:o({},i,{renderTo:this.refs.chart})}))},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"}),r.createElement("div",t)}});return i.Highcharts=t,i}}("undefined"!=typeof React&&React)},function(t,r,e){"use strict";var o=e(2);t.exports=o(Highcharts,"Chart")}])});

@@ -7,6 +7,6 @@ (function webpackUniversalModuleDefinition(root, factory) {

else if(typeof exports === 'object')
exports["Highcharts"] = factory(require("react"));
exports["index"] = factory(require("react"));
else
root["Highcharts"] = factory(root["react"]);
})(this, function(__WEBPACK_EXTERNAL_MODULE_2__) {
root["index"] = factory(root["react"]);
})(this, function(__WEBPACK_EXTERNAL_MODULE_3__) {
return /******/ (function(modules) { // webpackBootstrap

@@ -58,15 +58,7 @@ /******/ // The module cache

module.exports = __webpack_require__(4);
module.exports = __webpack_require__(1);
/***/ },
/* 1 */,
/* 2 */
/***/ function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_2__;
/***/ },
/* 3 */,
/* 4 */
/* 1 */
/***/ function(module, exports, __webpack_require__) {

@@ -76,7 +68,7 @@

var chartFactory = __webpack_require__(5);
var chartFactory = __webpack_require__(2);
module.exports = chartFactory(Highcharts, 'Chart');
/***/ },
/* 5 */
/* 2 */
/***/ function(module, exports, __webpack_require__) {

@@ -88,60 +80,73 @@

var React = __webpack_require__(2);
if (typeof Highcharts === 'undefined') {
throw Error('Starting with version 3 of react-highcharts, Highcharts is not bundled by default. ' + ' use "react-highcharts/dist/bundle/highcharts" instead, or include highcharts. ');
throw Error('Starting with version 3 of react-highcharts, Highcharts is not bundled by default. ' + ' please include highcharts. ');
}
module.exports = function (Highcharts, chartType) {
var displayName = 'Highcharts' + chartType;
var result = React.createClass({
displayName: displayName,
(function (React) {
if (!React) {
React = __webpack_require__(3);
if (!React) {
throw Error("react-highcharts does not include React");
}
}
propTypes: {
config: React.PropTypes.object.isRequired,
isPureConfig: React.PropTypes.bool
},
module.exports = function (Highcharts, chartType) {
var displayName = 'Highcharts' + chartType;
var result = React.createClass({
displayName: displayName,
renderChart: function renderChart(config) {
if (!config) {
throw new Error('Config must be specified for the ' + displayName + ' component');
}
var chartConfig = config.chart;
this.chart = new Highcharts[chartType](_extends({}, config, {
chart: _extends({}, chartConfig, {
renderTo: this.refs.chart
})
}));
},
propTypes: {
config: React.PropTypes.object.isRequired,
isPureConfig: React.PropTypes.bool
},
shouldComponentUpdate: function shouldComponentUpdate(nextProps) {
if (!this.props.isPureConfig || !(this.props.config === nextProps.config)) {
this.renderChart(nextProps.config);
}
return true;
},
renderChart: function renderChart(config) {
if (!config) {
throw new Error('Config must be specified for the ' + displayName + ' component');
}
var chartConfig = config.chart;
this.chart = new Highcharts[chartType](_extends({}, config, {
chart: _extends({}, chartConfig, {
renderTo: this.refs.chart
})
}));
},
getChart: function getChart() {
if (!this.chart) {
throw new Error('getChart() should not be called before the component is mounted');
shouldComponentUpdate: function shouldComponentUpdate(nextProps) {
if (!this.props.isPureConfig || !(this.props.config === nextProps.config)) {
this.renderChart(nextProps.config);
}
return true;
},
getChart: function getChart() {
if (!this.chart) {
throw new Error('getChart() should not be called before the component is mounted');
}
return this.chart;
},
componentDidMount: function componentDidMount() {
this.renderChart(this.props.config);
},
render: function render() {
var props = this.props;
props = _extends({}, props, {
ref: 'chart'
});
return React.createElement('div', props);
}
return this.chart;
},
});
componentDidMount: function componentDidMount() {
this.renderChart(this.props.config);
},
result.Highcharts = Highcharts;
return result;
};
})(typeof React !== 'undefined' && React);
render: function render() {
var props = this.props;
props = _extends({}, props, {
ref: 'chart'
});
return React.createElement('div', props);
}
});
/***/ },
/* 3 */
/***/ function(module, exports) {
result.Highcharts = Highcharts;
return result;
};
module.exports = __WEBPACK_EXTERNAL_MODULE_3__;

@@ -148,0 +153,0 @@ /***/ }

@@ -1,1 +0,1 @@

!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.Highcharts=r(require("react")):e.Highcharts=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&&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 n.createElement("div",null,n.Children.map(this.props.children,function(r){return n.cloneElement(r,{ref:function(r){e.children||(e.children=[]),e.children.push(r)}})}))}});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(t){if(n[t])return n[t].exports;var i=n[t]={exports:{},id:t,loaded:!1};return e[t].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}var n={};return r.m=e,r.c=n,r.p="",r(0)}([function(e,r,n){e.exports=n(7)},function(r,n){r.exports=e},,,,,,function(e,r,n){"use strict";var t=n(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(r){return t.cloneElement(r,{ref:function(r){e.children||(e.children=[]),e.children.push(r)}})}))}});e.exports=i}])});

@@ -7,6 +7,6 @@ (function webpackUniversalModuleDefinition(root, factory) {

else if(typeof exports === 'object')
exports["Highcharts"] = factory(require("react"));
exports["RedrawOnPrint"] = factory(require("react"));
else
root["Highcharts"] = factory(root["react"]);
})(this, function(__WEBPACK_EXTERNAL_MODULE_2__) {
root["RedrawOnPrint"] = factory(root["react"]);
})(this, function(__WEBPACK_EXTERNAL_MODULE_3__) {
return /******/ (function(modules) { // webpackBootstrap

@@ -58,7 +58,17 @@ /******/ // The module cache

module.exports = __webpack_require__(1);
module.exports = __webpack_require__(6);
/***/ },
/* 1 */
/* 1 */,
/* 2 */,
/* 3 */
/***/ function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_3__;
/***/ },
/* 4 */,
/* 5 */,
/* 6 */
/***/ function(module, exports, __webpack_require__) {

@@ -68,3 +78,3 @@

var React = __webpack_require__(2);
var React = __webpack_require__(3);

@@ -124,8 +134,2 @@ var RedrawOnPrint = React.createClass({

/***/ },
/* 2 */
/***/ function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_2__;
/***/ }

@@ -132,0 +136,0 @@ /******/ ])

{
"name": "react-highcharts",
"version": "6.0.1",
"version": "7.0.0",
"description": "React wrapper for highcharts",
"main": "dist/highcharts.js",
"main": "dist/ReactHighcharts.js",
"scripts": {

@@ -7,0 +7,0 @@ "test": "webpack && mocha",

@@ -54,3 +54,3 @@ react-highcharts

var React = require('react');
var ReactHighcharts = require('react-highcharts/bundle/highcharts'); // Highcharts is bundled
var ReactHighcharts = require('react-highcharts/bundle/ReactHighcharts'); // Highcharts is bundled

@@ -88,9 +88,9 @@ var config = {

## Using highmaps
Require Highmaps first, and then `require('react-highcharts/highmaps');`
Or use bundled version: `require('react-highcharts/bundle/highmaps');`
Require Highmaps first, and then `require('react-highcharts/ReactHighmaps');`
Or use bundled version: `require('react-highcharts/bundle/ReactHighmaps');`
* see [the demo](http://kirjs.github.io/react-highcharts/highmaps.html)
## Using highstock
Require Highstock first, and then `require('react-highcharts/highstock');`
Or use bundled version: `require('react-highcharts/bundle/highstock');`
Require Highstock first, and then `require('react-highcharts/ReactHighstock');`
Or use bundled version: `require('react-highcharts/bundle/ReactHighstock');`
* see [the demo](http://kirjs.github.io/react-highcharts/highstock.html)

@@ -97,0 +97,0 @@

@@ -48,3 +48,3 @@ # React-highcharts recipes

```jsx
import ReactHighcharts from 'react-highcharts/bundle/highcharts';
import ReactHighcharts from 'react-highcharts/bundle/ReactHighcharts';
import RedrawOnPrint from 'react-highcharts/RedrawOnPrint';

@@ -51,0 +51,0 @@

@@ -1,63 +0,71 @@

var React = require('react');
if(typeof Highcharts === 'undefined'){
throw Error('Starting with version 3 of react-highcharts, Highcharts is not bundled by default. ' +
' use "react-highcharts/dist/bundle/highcharts" instead, or include highcharts. '
' please include highcharts. '
);
}
module.exports = function (Highcharts, chartType) {
var displayName = 'Highcharts' + chartType;
var result = React.createClass({
displayName: displayName,
(function(React){
if(!React){
React = require('react');
if(!React) {
throw Error("react-highcharts does not include React");
}
}
propTypes: {
config: React.PropTypes.object.isRequired,
isPureConfig: React.PropTypes.bool
},
module.exports = function (Highcharts, chartType){
var displayName = 'Highcharts' + chartType;
var result = React.createClass({
displayName: displayName,
renderChart: function (config) {
if (!config) {
throw new Error('Config must be specified for the ' + displayName + ' component');
}
let chartConfig = config.chart;
this.chart = new Highcharts[chartType]({
...config,
chart: {
...chartConfig,
renderTo: this.refs.chart
propTypes: {
config: React.PropTypes.object.isRequired,
isPureConfig: React.PropTypes.bool
},
renderChart: function (config){
if (!config) {
throw new Error('Config must be specified for the ' + displayName + ' component');
}
});
},
let chartConfig = config.chart;
this.chart = new Highcharts[chartType]({
...config,
chart: {
...chartConfig,
renderTo: this.refs.chart
}
});
},
shouldComponentUpdate(nextProps) {
if (!this.props.isPureConfig || !(this.props.config === nextProps.config)) {
this.renderChart(nextProps.config);
}
return true;
},
shouldComponentUpdate(nextProps) {
if (!this.props.isPureConfig || !(this.props.config === nextProps.config)) {
this.renderChart(nextProps.config);
}
return true;
},
getChart: function () {
if (!this.chart) {
throw new Error('getChart() should not be called before the component is mounted');
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 (){
let props = this.props;
props = {
...props,
ref: 'chart'
};
return <div {...props} />;
}
return this.chart;
},
});
componentDidMount: function () {
this.renderChart(this.props.config);
},
result.Highcharts = Highcharts;
return result;
};
render: function () {
let props = this.props;
props = {
...props,
ref: 'chart'
};
return <div {...props} />;
}
});
result.Highcharts = Highcharts;
return result;
};
}(typeof React !== 'undefined' && React ));

@@ -39,5 +39,5 @@ var React = require('react');

bundleTest('bundle/highcharts', 'Chart');
bundleTest('bundle/highstock', 'StockChart');
bundleTest('bundle/highmaps', 'Map');
bundleTest('bundle/ReactHighcharts', 'Chart');
bundleTest('bundle/ReactHighstock', 'StockChart');
bundleTest('bundle/ReactHighmaps', 'Map');

@@ -64,7 +64,7 @@ var React = require('react');

nonBundleTest('highcharts', 'Chart');
nonBundleTest('highstock', 'StockChart', {shouldThrow: true});
nonBundleTest('highmaps', 'Map', {shouldThrow: true});
nonBundleTest('ReactHighcharts', 'Chart');
nonBundleTest('ReactHighstock', 'StockChart', {shouldThrow: true});
nonBundleTest('ReactHighmaps', 'Map', {shouldThrow: true});

@@ -9,11 +9,11 @@ var path = require('path');

// Array syntax to workaround https://github.com/webpack/webpack/issues/300
'index': ['./src/Highcharts.jsx'],
'highcharts': ['./src/Highcharts.jsx'],
'highstock': ['./src/Highstock.jsx'],
'highmaps': ['./src/Highmaps.jsx'],
'index': ['./src/ReactHighcharts.jsx'],
'ReactHighcharts': ['./src/ReactHighcharts.jsx'],
'ReactHighstock': ['./src/Highstock.jsx'],
'ReactHighmaps': ['./src/Highmaps.jsx'],
'RedrawOnPrint': ['./src/RedrawOnPrint.jsx'],
'bundle/index': './src/bundle/Highcharts.jsx',
'bundle/highcharts': './src/bundle/Highcharts.jsx',
'bundle/highstock': './src/bundle/Highstock.jsx',
'bundle/highmaps': './src/bundle/Highmaps.jsx'
'bundle/index': './src/bundle/ReactHighcharts.jsx',
'bundle/ReactHighcharts': './src/bundle/ReactHighcharts.jsx',
'bundle/ReactHighstock': './src/bundle/ReactHighstock.jsx',
'bundle/ReactHighmaps': './src/bundle/ReactHighmaps.jsx'

@@ -40,4 +40,4 @@ },

libraryTarget: 'umd',
library: 'Highcharts'
library: '[name]'
}
};

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc