Skip to content

Commit

Permalink
Update dependencies versions (#112)
Browse files Browse the repository at this point in the history
* Fix scrollspy throttle issue

* Fix new Scrollspy version

* add

* update to React 16

* fix testing
  • Loading branch information
barabba9174 authored and harunhasdal committed Dec 7, 2017
1 parent 868775a commit c7b37aa
Show file tree
Hide file tree
Showing 28 changed files with 124 additions and 115 deletions.
4 changes: 2 additions & 2 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"presets": [
"es2015",
"env",
"stage-0",
"stage-1",
"react"
Expand All @@ -10,4 +10,4 @@
"transform-class-properties",
"transform-object-rest-spread"
]
}
}
6 changes: 3 additions & 3 deletions examples/area-chart/App.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
/* eslint import/no-unresolved: 0 */

import React from 'react';
import React, { PureComponent } from 'react';
import ReactDom from 'react-dom';
import { escapeHTML } from '../util';
import ToolTip from '../ToolTip';
import { AreaChart } from 'react-easy-chart';
import moment from 'moment';
import { timeParse as parse } from 'd3-time-format';
import { Scrollspy } from 'react-scrollspy';
import Scrollspy from 'react-scrollspy';

class AreaChartContainer extends React.Component {
class AreaChartContainer extends PureComponent {
constructor(props) {
super(props);
// Generate multiple Areas of data
Expand Down
6 changes: 3 additions & 3 deletions examples/bar-chart/App.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/* eslint import/no-unresolved: 0 */

import React from 'react';
import React, { PureComponent } from 'react';
import ReactDOM from 'react-dom';
import { BarChart } from 'react-easy-chart';
import ToolTip from '../ToolTip';
import { escapeHTML } from '../util';
import { Scrollspy } from 'react-scrollspy';
import Scrollspy from 'react-scrollspy';

export default class BarChartContainer extends React.Component {
export default class BarChartContainer extends PureComponent {
constructor(props) {
super(props);

Expand Down
6 changes: 3 additions & 3 deletions examples/legend/App.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/* eslint import/no-unresolved: 0 */

import React from 'react';
import React, { PureComponent } from 'react';
import ReactDOM from 'react-dom';
import {
Legend,
PieChart,
ScatterplotChart
} from 'react-easy-chart';
import { escapeHTML } from '../util';
import { Scrollspy } from 'react-scrollspy';
import Scrollspy from 'react-scrollspy';

const pieData = [
{ key: 'Cats', value: 100 },
Expand Down Expand Up @@ -128,7 +128,7 @@ const bigData = [
}
];

export default class LegendContainer extends React.Component {
export default class LegendContainer extends PureComponent {

constructor(props) {
super(props);
Expand Down
6 changes: 3 additions & 3 deletions examples/line-chart/app.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
/* eslint import/no-unresolved: 0 */

import React from 'react';
import React, { PureComponent } from 'react';
import ReactDom from 'react-dom';
import { escapeHTML } from '../util';
import ToolTip from '../ToolTip';
import { LineChart } from 'react-easy-chart';
import moment from 'moment';
import { timeParse as parse } from 'd3-time-format';
import { Scrollspy } from 'react-scrollspy';
import Scrollspy from 'react-scrollspy';

class LineChartContainer extends React.Component {
class LineChartContainer extends PureComponent {
constructor(props) {
super(props);
// Generate multiple lines of data
Expand Down
6 changes: 3 additions & 3 deletions examples/pie-chart/App.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/* eslint import/no-unresolved: 0 */

import React from 'react';
import React, { PureComponent } from 'react';
import ReactDOM from 'react-dom';
import ToolTip from '../ToolTip';
import { escapeHTML } from '../util';
import { PieChart } from 'react-easy-chart';
import { Scrollspy } from 'react-scrollspy';
import Scrollspy from 'react-scrollspy';

const brandColors = {
greyBlueOne: '#1e313c',
Expand All @@ -18,7 +18,7 @@ const brandColors = {
lightGrey: '#e4e8ec'
};

export default class PieChartContainer extends React.Component {
export default class PieChartContainer extends PureComponent {
constructor(props) {
super(props);

Expand Down
6 changes: 3 additions & 3 deletions examples/scatterplot-chart/App.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/* eslint import/no-unresolved: 0 */

import React from 'react';
import React, { PureComponent } from 'react';
import ReactDOM from 'react-dom';
import { ScatterplotChart } from 'react-easy-chart';
import ToolTip from '../ToolTip';
import Legend from '../Legend';
import { escapeHTML } from '../util';
import { Scrollspy } from 'react-scrollspy';
import Scrollspy from 'react-scrollspy';

const exampleText = [
{
Expand Down Expand Up @@ -253,7 +253,7 @@ const configGen = [
}
];

export default class ScatterplotContainer extends React.Component {
export default class ScatterplotContainer extends PureComponent {
constructor(props) {
super(props);

Expand Down
9 changes: 5 additions & 4 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ module.exports = (config) => {
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: processCwd,


// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['mocha', 'chai', 'sinon', 'phantomjs-shim', 'es6-shim'],
Expand All @@ -25,9 +24,11 @@ module.exports = (config) => {
// list of files / patterns to load in the browser
files: [
'node_modules/phantomjs-polyfill/bind-polyfill.js',
'tests/index.js'
'./tests/**/*.js'
],
exclude: [
'./tests/index.js'
],


plugins: [
'karma-chai',
Expand All @@ -51,7 +52,7 @@ module.exports = (config) => {
// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {
'tests/index.js': ['webpack', 'sourcemap']
'tests/**/*.js': ['webpack', 'sourcemap']
},


Expand Down
8 changes: 4 additions & 4 deletions modules/area-chart/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { createElement } from 'react-faux-dom';
import React, { PureComponent } from 'react';
import ReactFauxDOM from 'react-faux-dom';
import {
createUniqueID,
reduce,
Expand All @@ -23,7 +23,7 @@ import { timeParse as parse } from 'd3-time-format';

const dateParser = {};

export default class AreaChart extends React.Component {
export default class AreaChart extends PureComponent {
static get propTypes() {
return {
data: PropTypes.array.isRequired,
Expand Down Expand Up @@ -95,7 +95,7 @@ export default class AreaChart extends React.Component {
}

createSvgNode({ m, w, h }) {
const node = createElement('svg');
const node = new ReactFauxDOM.Element('svg');
node.setAttribute('width', w + m.left + m.right);
node.setAttribute('height', h + m.top + m.bottom);
return node;
Expand Down
8 changes: 4 additions & 4 deletions modules/bar-chart/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import React, { PureComponent } from 'react';
import { scaleBand as band, scaleLinear as linear } from 'd3-scale';
import {
event as lastEvent,
Expand All @@ -20,7 +20,7 @@ import {
} from '../shared';
import { extent } from 'd3-array';
import { timeParse as parse } from 'd3-time-format';
import { createElement } from 'react-faux-dom';
import ReactFauxDOM from 'react-faux-dom';
import PropTypes from 'prop-types';
import { Style } from 'radium';
import merge from 'lodash.merge';
Expand All @@ -29,7 +29,7 @@ const dateParser = {};

const colorScale = scale.category20();

export default class BarChart extends React.Component {
export default class BarChart extends PureComponent {

static get propTypes() {
return {
Expand Down Expand Up @@ -154,7 +154,7 @@ export default class BarChart extends React.Component {
}

createSvgNode({ m, w, h }) {
const node = createElement('svg');
const node = new ReactFauxDOM.Element('svg');
node.setAttribute('width', w + m.left + m.right);
node.setAttribute('height', h + m.top + m.bottom);
return node;
Expand Down
4 changes: 2 additions & 2 deletions modules/legend/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { Style } from 'radium';
import { scale } from 'd3';
Expand All @@ -11,7 +11,7 @@ import defaultStyles from './defaultStyles';

const colors = scale.category20().range();

export default class Legend extends React.Component {
export default class Legend extends PureComponent {

static get propTypes() {
return {
Expand Down
4 changes: 2 additions & 2 deletions modules/line-chart/hybrid/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import React, { PureComponent } from 'react';
import {
createUniqueID,
defaultStyles,
Expand All @@ -10,7 +10,7 @@ import merge from 'lodash.merge';

import lineChart from './LineChart';

export default class LineChart extends React.Component {
export default class LineChart extends PureComponent {
constructor(props) {
super(props);
this.uid = createUniqueID();
Expand Down
5 changes: 3 additions & 2 deletions modules/line-chart/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react';
import { createElement } from 'react-faux-dom';
import ReactFauxDOM from 'react-faux-dom';

import {
event as lastEvent,
select,
Expand Down Expand Up @@ -95,7 +96,7 @@ export default class LineChart extends React.Component {
}

createSvgNode({ m, w, h }) {
const node = createElement('svg');
const node = new ReactFauxDOM.Element('svg');
node.setAttribute('width', w + m.left + m.right);
node.setAttribute('height', h + m.top + m.bottom);
return node;
Expand Down
8 changes: 4 additions & 4 deletions modules/line-chart/static/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { createElement } from 'react-faux-dom';
import React, { PureComponent } from 'react';
import ReactFauxDOM from 'react-faux-dom';
import {
event as lastEvent,
select,
Expand All @@ -24,7 +24,7 @@ import { timeParse as parse } from 'd3-time-format';

const dateParser = {};

export default class LineChart extends React.Component {
export default class LineChart extends PureComponent {
static get propTypes() {
return {
data: PropTypes.array.isRequired,
Expand Down Expand Up @@ -95,7 +95,7 @@ export default class LineChart extends React.Component {
}

createSvgNode({ m, w, h }) {
const node = createElement('svg');
const node = new ReactFauxDOM.Element('svg');
node.setAttribute('width', w + m.left + m.right);
node.setAttribute('height', h + m.top + m.bottom);
return node;
Expand Down
8 changes: 4 additions & 4 deletions modules/pie-chart/hybrid/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import React, { PureComponent } from 'react';
import {
scale,
layout,
Expand All @@ -11,7 +11,7 @@ import {
createUniqueID,
defaultStyles
} from '../../shared';
import { createElement } from 'react-faux-dom';
import ReactFauxDOM from 'react-faux-dom';
import PropTypes from 'prop-types';
import { Style } from 'radium';
import merge from 'lodash.merge';
Expand All @@ -28,7 +28,7 @@ const getSliceFill = (d, i) => (

const getLabelText = (d) => d.data.key;

export default class PieChart extends React.Component {
export default class PieChart extends PureComponent {
static get propTypes() {
return {
data: PropTypes.array.isRequired,
Expand Down Expand Up @@ -138,7 +138,7 @@ export default class PieChart extends React.Component {
}

createSvgNode({ size }) {
const node = createElement('svg');
const node = new ReactFauxDOM.Element('svg');
node.setAttribute('width', size);
node.setAttribute('height', size);
return node;
Expand Down
8 changes: 4 additions & 4 deletions modules/pie-chart/static/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import React, { PureComponent } from 'react';
import {
scale,
layout,
Expand All @@ -10,7 +10,7 @@ import {
createUniqueID,
defaultStyles
} from '../../shared';
import { createElement } from 'react-faux-dom';
import ReactFauxDOM from 'react-faux-dom';
import PropTypes from 'prop-types';
import { Style } from 'radium';
import merge from 'lodash.merge';
Expand All @@ -27,7 +27,7 @@ const getSliceFill = (d, i) => (

const getLabelText = (d) => d.data.key;

export default class PieChart extends React.Component {
export default class PieChart extends PureComponent {
static get propTypes() {
return {
data: PropTypes.array.isRequired,
Expand Down Expand Up @@ -97,7 +97,7 @@ export default class PieChart extends React.Component {
}

createSvgNode({ size }) {
const node = createElement('svg');
const node = new ReactFauxDOM.Element('svg');
node.setAttribute('width', size);
node.setAttribute('height', size);
return node;
Expand Down
Loading

0 comments on commit c7b37aa

Please sign in to comment.