react-highcharts
Advanced tools
Comparing version 5.0.4 to 5.0.6
@@ -1,147 +0,1 @@ | ||
(function webpackUniversalModuleDefinition(root, factory) { | ||
if(typeof exports === 'object' && typeof module === 'object') | ||
module.exports = factory(require("react")); | ||
else if(typeof define === 'function' && define.amd) | ||
define(["react"], factory); | ||
else if(typeof exports === 'object') | ||
exports["Highcharts"] = factory(require("react")); | ||
else | ||
root["Highcharts"] = factory(root["react"]); | ||
})(this, function(__WEBPACK_EXTERNAL_MODULE_5__) { | ||
return /******/ (function(modules) { // webpackBootstrap | ||
/******/ // The module cache | ||
/******/ var installedModules = {}; | ||
/******/ // The require function | ||
/******/ function __webpack_require__(moduleId) { | ||
/******/ // Check if module is in cache | ||
/******/ if(installedModules[moduleId]) | ||
/******/ return installedModules[moduleId].exports; | ||
/******/ // Create a new module (and put it into the cache) | ||
/******/ var module = installedModules[moduleId] = { | ||
/******/ exports: {}, | ||
/******/ id: moduleId, | ||
/******/ loaded: false | ||
/******/ }; | ||
/******/ // Execute the module function | ||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); | ||
/******/ // Flag the module as loaded | ||
/******/ module.loaded = true; | ||
/******/ // Return the exports of the module | ||
/******/ return module.exports; | ||
/******/ } | ||
/******/ // expose the modules object (__webpack_modules__) | ||
/******/ __webpack_require__.m = modules; | ||
/******/ // expose the module cache | ||
/******/ __webpack_require__.c = installedModules; | ||
/******/ // __webpack_public_path__ | ||
/******/ __webpack_require__.p = ""; | ||
/******/ // Load entry module and return exports | ||
/******/ return __webpack_require__(0); | ||
/******/ }) | ||
/************************************************************************/ | ||
/******/ ([ | ||
/* 0 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
module.exports = __webpack_require__(3); | ||
/***/ }, | ||
/* 1 */, | ||
/* 2 */, | ||
/* 3 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
'use strict'; | ||
var chartFactory = __webpack_require__(4); | ||
module.exports = chartFactory(Highcharts, 'Chart'); | ||
/***/ }, | ||
/* 4 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
'use strict'; | ||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
var React = __webpack_require__(5); | ||
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. '); | ||
} | ||
module.exports = function (Highcharts, chartType) { | ||
var displayName = 'Highcharts' + chartType; | ||
var result = React.createClass({ | ||
displayName: displayName, | ||
propTypes: { | ||
config: React.PropTypes.object.isRequired, | ||
isPureConfig: React.PropTypes.bool | ||
}, | ||
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 | ||
}) | ||
})); | ||
}, | ||
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); | ||
} | ||
}); | ||
result.Highcharts = Highcharts; | ||
return result; | ||
}; | ||
/***/ }, | ||
/* 5 */ | ||
/***/ function(module, exports) { | ||
module.exports = __WEBPACK_EXTERNAL_MODULE_5__; | ||
/***/ } | ||
/******/ ]) | ||
}); | ||
; | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports.Highcharts=e(require("react")):t.Highcharts=e(t.react)}(this,function(t){return function(t){function e(n){if(i[n])return i[n].exports;var o=i[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var i={};return e.m=t,e.c=i,e.p="",e(0)}([function(t,e,i){t.exports=i(3)},function(t,e,i){"use strict";var n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},o=i(2);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,e){var i="Highcharts"+e,r=o.createClass({displayName:i,propTypes:{config:o.PropTypes.object.isRequired,isPureConfig:o.PropTypes.bool},renderChart:function(o){if(!o)throw new Error("Config must be specified for the "+i+" component");var r=o.chart;this.chart=new t[e](n({},o,{chart:n({},r,{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=n({},t,{ref:"chart"}),o.createElement("div",t)}});return r.Highcharts=t,r}},function(e,i){e.exports=t},function(t,e,i){"use strict";var n=i(1);t.exports=n(Highcharts,"Chart")}])}); |
@@ -1,152 +0,1 @@ | ||
(function webpackUniversalModuleDefinition(root, factory) { | ||
if(typeof exports === 'object' && typeof module === 'object') | ||
module.exports = factory(require("react")); | ||
else if(typeof define === 'function' && define.amd) | ||
define(["react"], factory); | ||
else if(typeof exports === 'object') | ||
exports["Highcharts"] = factory(require("react")); | ||
else | ||
root["Highcharts"] = factory(root["react"]); | ||
})(this, function(__WEBPACK_EXTERNAL_MODULE_5__) { | ||
return /******/ (function(modules) { // webpackBootstrap | ||
/******/ // The module cache | ||
/******/ var installedModules = {}; | ||
/******/ // The require function | ||
/******/ function __webpack_require__(moduleId) { | ||
/******/ // Check if module is in cache | ||
/******/ if(installedModules[moduleId]) | ||
/******/ return installedModules[moduleId].exports; | ||
/******/ // Create a new module (and put it into the cache) | ||
/******/ var module = installedModules[moduleId] = { | ||
/******/ exports: {}, | ||
/******/ id: moduleId, | ||
/******/ loaded: false | ||
/******/ }; | ||
/******/ // Execute the module function | ||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); | ||
/******/ // Flag the module as loaded | ||
/******/ module.loaded = true; | ||
/******/ // Return the exports of the module | ||
/******/ return module.exports; | ||
/******/ } | ||
/******/ // expose the modules object (__webpack_modules__) | ||
/******/ __webpack_require__.m = modules; | ||
/******/ // expose the module cache | ||
/******/ __webpack_require__.c = installedModules; | ||
/******/ // __webpack_public_path__ | ||
/******/ __webpack_require__.p = ""; | ||
/******/ // Load entry module and return exports | ||
/******/ return __webpack_require__(0); | ||
/******/ }) | ||
/************************************************************************/ | ||
/******/ ([ | ||
/* 0 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
module.exports = __webpack_require__(7); | ||
/***/ }, | ||
/* 1 */, | ||
/* 2 */, | ||
/* 3 */, | ||
/* 4 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
'use strict'; | ||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
var React = __webpack_require__(5); | ||
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. '); | ||
} | ||
module.exports = function (Highcharts, chartType) { | ||
var displayName = 'Highcharts' + chartType; | ||
var result = React.createClass({ | ||
displayName: displayName, | ||
propTypes: { | ||
config: React.PropTypes.object.isRequired, | ||
isPureConfig: React.PropTypes.bool | ||
}, | ||
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 | ||
}) | ||
})); | ||
}, | ||
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); | ||
} | ||
}); | ||
result.Highcharts = Highcharts; | ||
return result; | ||
}; | ||
/***/ }, | ||
/* 5 */ | ||
/***/ function(module, exports) { | ||
module.exports = __WEBPACK_EXTERNAL_MODULE_5__; | ||
/***/ }, | ||
/* 6 */, | ||
/* 7 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
'use strict'; | ||
if (Highcharts && !Highcharts.Map) { | ||
throw Error('ReactHighmaps requires highmaps to be loaded'); | ||
} | ||
var chartFactory = __webpack_require__(4); | ||
module.exports = chartFactory(Highcharts, 'Map'); | ||
/***/ } | ||
/******/ ]) | ||
}); | ||
; | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports.Highcharts=e(require("react")):t.Highcharts=e(t.react)}(this,function(t){return function(t){function e(n){if(i[n])return i[n].exports;var o=i[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var i={};return e.m=t,e.c=i,e.p="",e(0)}([function(t,e,i){t.exports=i(5)},function(t,e,i){"use strict";var n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},o=i(2);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,e){var i="Highcharts"+e,r=o.createClass({displayName:i,propTypes:{config:o.PropTypes.object.isRequired,isPureConfig:o.PropTypes.bool},renderChart:function(o){if(!o)throw new Error("Config must be specified for the "+i+" component");var r=o.chart;this.chart=new t[e](n({},o,{chart:n({},r,{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=n({},t,{ref:"chart"}),o.createElement("div",t)}});return r.Highcharts=t,r}},function(e,i){e.exports=t},,,function(t,e,i){"use strict";if(Highcharts&&!Highcharts.Map)throw Error("ReactHighmaps requires highmaps to be loaded");var n=i(1);t.exports=n(Highcharts,"Map")}])}); |
@@ -1,154 +0,1 @@ | ||
(function webpackUniversalModuleDefinition(root, factory) { | ||
if(typeof exports === 'object' && typeof module === 'object') | ||
module.exports = factory(require("react")); | ||
else if(typeof define === 'function' && define.amd) | ||
define(["react"], factory); | ||
else if(typeof exports === 'object') | ||
exports["Highcharts"] = factory(require("react")); | ||
else | ||
root["Highcharts"] = factory(root["react"]); | ||
})(this, function(__WEBPACK_EXTERNAL_MODULE_5__) { | ||
return /******/ (function(modules) { // webpackBootstrap | ||
/******/ // The module cache | ||
/******/ var installedModules = {}; | ||
/******/ // The require function | ||
/******/ function __webpack_require__(moduleId) { | ||
/******/ // Check if module is in cache | ||
/******/ if(installedModules[moduleId]) | ||
/******/ return installedModules[moduleId].exports; | ||
/******/ // Create a new module (and put it into the cache) | ||
/******/ var module = installedModules[moduleId] = { | ||
/******/ exports: {}, | ||
/******/ id: moduleId, | ||
/******/ loaded: false | ||
/******/ }; | ||
/******/ // Execute the module function | ||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); | ||
/******/ // Flag the module as loaded | ||
/******/ module.loaded = true; | ||
/******/ // Return the exports of the module | ||
/******/ return module.exports; | ||
/******/ } | ||
/******/ // expose the modules object (__webpack_modules__) | ||
/******/ __webpack_require__.m = modules; | ||
/******/ // expose the module cache | ||
/******/ __webpack_require__.c = installedModules; | ||
/******/ // __webpack_public_path__ | ||
/******/ __webpack_require__.p = ""; | ||
/******/ // Load entry module and return exports | ||
/******/ return __webpack_require__(0); | ||
/******/ }) | ||
/************************************************************************/ | ||
/******/ ([ | ||
/* 0 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
module.exports = __webpack_require__(9); | ||
/***/ }, | ||
/* 1 */, | ||
/* 2 */, | ||
/* 3 */, | ||
/* 4 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
'use strict'; | ||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
var React = __webpack_require__(5); | ||
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. '); | ||
} | ||
module.exports = function (Highcharts, chartType) { | ||
var displayName = 'Highcharts' + chartType; | ||
var result = React.createClass({ | ||
displayName: displayName, | ||
propTypes: { | ||
config: React.PropTypes.object.isRequired, | ||
isPureConfig: React.PropTypes.bool | ||
}, | ||
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 | ||
}) | ||
})); | ||
}, | ||
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); | ||
} | ||
}); | ||
result.Highcharts = Highcharts; | ||
return result; | ||
}; | ||
/***/ }, | ||
/* 5 */ | ||
/***/ function(module, exports) { | ||
module.exports = __WEBPACK_EXTERNAL_MODULE_5__; | ||
/***/ }, | ||
/* 6 */, | ||
/* 7 */, | ||
/* 8 */, | ||
/* 9 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
'use strict'; | ||
if (Highcharts && !Highcharts.StockChart) { | ||
throw Error('ReactHighstock requires highstock to be loaded'); | ||
} | ||
var chartFactory = __webpack_require__(4); | ||
module.exports = chartFactory(Highcharts, 'StockChart'); | ||
/***/ } | ||
/******/ ]) | ||
}); | ||
; | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports.Highcharts=e(require("react")):t.Highcharts=e(t.react)}(this,function(t){return function(t){function e(n){if(i[n])return i[n].exports;var o=i[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var i={};return e.m=t,e.c=i,e.p="",e(0)}([function(t,e,i){t.exports=i(6)},function(t,e,i){"use strict";var n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},o=i(2);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,e){var i="Highcharts"+e,r=o.createClass({displayName:i,propTypes:{config:o.PropTypes.object.isRequired,isPureConfig:o.PropTypes.bool},renderChart:function(o){if(!o)throw new Error("Config must be specified for the "+i+" component");var r=o.chart;this.chart=new t[e](n({},o,{chart:n({},r,{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=n({},t,{ref:"chart"}),o.createElement("div",t)}});return r.Highcharts=t,r}},function(e,i){e.exports=t},,,,function(t,e,i){"use strict";if(Highcharts&&!Highcharts.StockChart)throw Error("ReactHighstock requires highstock to be loaded");var n=i(1);t.exports=n(Highcharts,"StockChart")}])}); |
@@ -1,147 +0,1 @@ | ||
(function webpackUniversalModuleDefinition(root, factory) { | ||
if(typeof exports === 'object' && typeof module === 'object') | ||
module.exports = factory(require("react")); | ||
else if(typeof define === 'function' && define.amd) | ||
define(["react"], factory); | ||
else if(typeof exports === 'object') | ||
exports["Highcharts"] = factory(require("react")); | ||
else | ||
root["Highcharts"] = factory(root["react"]); | ||
})(this, function(__WEBPACK_EXTERNAL_MODULE_5__) { | ||
return /******/ (function(modules) { // webpackBootstrap | ||
/******/ // The module cache | ||
/******/ var installedModules = {}; | ||
/******/ // The require function | ||
/******/ function __webpack_require__(moduleId) { | ||
/******/ // Check if module is in cache | ||
/******/ if(installedModules[moduleId]) | ||
/******/ return installedModules[moduleId].exports; | ||
/******/ // Create a new module (and put it into the cache) | ||
/******/ var module = installedModules[moduleId] = { | ||
/******/ exports: {}, | ||
/******/ id: moduleId, | ||
/******/ loaded: false | ||
/******/ }; | ||
/******/ // Execute the module function | ||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); | ||
/******/ // Flag the module as loaded | ||
/******/ module.loaded = true; | ||
/******/ // Return the exports of the module | ||
/******/ return module.exports; | ||
/******/ } | ||
/******/ // expose the modules object (__webpack_modules__) | ||
/******/ __webpack_require__.m = modules; | ||
/******/ // expose the module cache | ||
/******/ __webpack_require__.c = installedModules; | ||
/******/ // __webpack_public_path__ | ||
/******/ __webpack_require__.p = ""; | ||
/******/ // Load entry module and return exports | ||
/******/ return __webpack_require__(0); | ||
/******/ }) | ||
/************************************************************************/ | ||
/******/ ([ | ||
/* 0 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
module.exports = __webpack_require__(3); | ||
/***/ }, | ||
/* 1 */, | ||
/* 2 */, | ||
/* 3 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
'use strict'; | ||
var chartFactory = __webpack_require__(4); | ||
module.exports = chartFactory(Highcharts, 'Chart'); | ||
/***/ }, | ||
/* 4 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
'use strict'; | ||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
var React = __webpack_require__(5); | ||
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. '); | ||
} | ||
module.exports = function (Highcharts, chartType) { | ||
var displayName = 'Highcharts' + chartType; | ||
var result = React.createClass({ | ||
displayName: displayName, | ||
propTypes: { | ||
config: React.PropTypes.object.isRequired, | ||
isPureConfig: React.PropTypes.bool | ||
}, | ||
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 | ||
}) | ||
})); | ||
}, | ||
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); | ||
} | ||
}); | ||
result.Highcharts = Highcharts; | ||
return result; | ||
}; | ||
/***/ }, | ||
/* 5 */ | ||
/***/ function(module, exports) { | ||
module.exports = __WEBPACK_EXTERNAL_MODULE_5__; | ||
/***/ } | ||
/******/ ]) | ||
}); | ||
; | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports.Highcharts=e(require("react")):t.Highcharts=e(t.react)}(this,function(t){return function(t){function e(n){if(i[n])return i[n].exports;var o=i[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var i={};return e.m=t,e.c=i,e.p="",e(0)}([function(t,e,i){t.exports=i(3)},function(t,e,i){"use strict";var n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},o=i(2);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,e){var i="Highcharts"+e,r=o.createClass({displayName:i,propTypes:{config:o.PropTypes.object.isRequired,isPureConfig:o.PropTypes.bool},renderChart:function(o){if(!o)throw new Error("Config must be specified for the "+i+" component");var r=o.chart;this.chart=new t[e](n({},o,{chart:n({},r,{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=n({},t,{ref:"chart"}),o.createElement("div",t)}});return r.Highcharts=t,r}},function(e,i){e.exports=t},function(t,e,i){"use strict";var n=i(1);t.exports=n(Highcharts,"Chart")}])}); |
{ | ||
"name": "react-highcharts", | ||
"version": "5.0.4", | ||
"version": "5.0.6", | ||
"description": "React wrapper for highcharts", | ||
@@ -8,4 +8,5 @@ "main": "dist/highcharts.js", | ||
"test": "webpack && mocha", | ||
"build": "webpack && webpack -p", | ||
"demo": "cd demo && webpack && sh generate-contents.sh && ../node_modules/.bin/webpack-dev-server --content-base dist/", | ||
"prepublish": "webpack && npm run copy-bundles", | ||
"prepublish": "npm run build && npm run copy-bundles", | ||
"copy-bundles": "sh ./src/copy-bundles.sh", | ||
@@ -12,0 +13,0 @@ "deploy-demo": "./demo/deploy.sh", |
@@ -11,3 +11,3 @@ var React = require('react'); | ||
beforeEach(function () { | ||
Component = require('../dist/' + bundleName + '.js'); | ||
Component = require('../dist/' + bundleName + '.src.js'); | ||
@@ -14,0 +14,0 @@ args = undefined; |
@@ -18,3 +18,3 @@ var React = require('react'); | ||
function nonBundleTest(lib, chartName, extra){ | ||
var libPath = 'dist/' + lib + '.js'; | ||
var libPath = 'dist/' + lib + '.src.js'; | ||
describe('react-highcharts/' + lib, function (){ | ||
@@ -21,0 +21,0 @@ var Component, args, config; |
var path = require('path'); | ||
var src = (process.argv.indexOf('-p') === -1); | ||
var filenamePostfix = src ? '.src': ''; | ||
module.exports = { | ||
@@ -24,4 +27,3 @@ entry: { | ||
}, | ||
externals: | ||
[ | ||
externals: [ | ||
{ | ||
@@ -33,7 +35,7 @@ 'react': true | ||
alias: { | ||
"highstock" : "highstock-release/highstock.src.js", | ||
"highcharts" : "highcharts-release/highcharts.src.js", | ||
"highmaps" : "highmaps-release/highmaps.src.js", | ||
"highcharts-more" : "highcharts-release/highcharts-more.src.js", | ||
"highcharts-standalone-adapter" : "highcharts-release/adapters/standalone-framework.src.js", | ||
"highstock": "highstock-release/highstock.src.js", | ||
"highcharts": "highcharts-release/highcharts.src.js", | ||
"highmaps": "highmaps-release/highmaps.src.js", | ||
"highcharts-more": "highcharts-release/highcharts-more.src.js", | ||
"highcharts-standalone-adapter": "highcharts-release/adapters/standalone-framework.src.js", | ||
}, | ||
@@ -43,3 +45,3 @@ modulesDirectories: ['node_modules'] | ||
output: { | ||
filename: 'dist/[name].js', | ||
filename: 'dist/[name]' + filenamePostfix + '.js', | ||
libraryTarget: 'umd', | ||
@@ -46,0 +48,0 @@ library: 'Highcharts' |
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
6289811
54
151970
13
1