Skip to content

Commit 54f06ff

Browse files
committed
Merge branch 'release/1.0.3'
2 parents fa881b3 + 900c2a9 commit 54f06ff

File tree

10 files changed

+84
-60
lines changed

10 files changed

+84
-60
lines changed

.eslintignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.publish/*
2+
dist/*
3+
example/*
4+
lib/*
5+
node_modules/*

.eslintrc

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"parser": "babel-eslint",
3+
"env": {
4+
"browser": true,
5+
"node": true
6+
},
7+
"plugins": [
8+
"react"
9+
],
10+
"rules": {
11+
"curly": [2, "multi-line"],
12+
"quotes": [2, "single", "avoid-escape"],
13+
"react/display-name": 0,
14+
"react/jsx-boolean-value": 1,
15+
"react/jsx-quotes": 1,
16+
"react/jsx-no-undef": 1,
17+
"react/jsx-sort-props": 0,
18+
"react/jsx-sort-prop-types": 1,
19+
"react/jsx-uses-react": 1,
20+
"react/jsx-uses-vars": 1,
21+
"react/no-did-mount-set-state": 1,
22+
"react/no-did-update-set-state": 1,
23+
"react/no-multi-comp": 1,
24+
"react/no-unknown-property": 1,
25+
"react/prop-types": 1,
26+
"react/react-in-jsx-scope": 1,
27+
"react/self-closing-comp": 1,
28+
"react/wrap-multilines": 1,
29+
"semi": 2,
30+
"strict": 0
31+
}
32+
}

dist/react-fusioncharts.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ var _react = (typeof window !== "undefined" ? window['React'] : typeof global !=
2020

2121
var _react2 = _interopRequireDefault(_react);
2222

23-
var FusionCharts = typeof window !== "undefined" ? window['FusionCharts'] : typeof global !== "undefined" ? global['FusionCharts'] : null;
23+
var FusionCharts = typeof window !== 'undefined' ? window['FusionCharts'] : typeof global !== 'undefined' ? global['FusionCharts'] : null;
2424

25-
if (typeof FusionCharts === "undefined") {
25+
if (typeof FusionCharts === 'undefined') {
2626
FusionCharts = require('fusioncharts');
2727
}
2828

@@ -36,13 +36,12 @@ var ReactFC = (function (_React$Component) {
3636

3737
_get(Object.getPrototypeOf(ReactFC.prototype), 'constructor', this).call(this, props);
3838

39-
this.state = {
40-
caption: props.name
41-
};
39+
var propsObj = props;
40+
41+
this.state = {};
4242

4343
this.fcConfig = props;
44-
this.renderAt = props.renderAt;
45-
// this.fcConfig.renderAt = undefined;
44+
this.renderAt = propsObj.renderAt;
4645

4746
this.chartObj = new FusionCharts(this.fcConfig);
4847

dist/react-fusioncharts.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

karma.conf.js

Lines changed: 21 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,34 @@
11
module.exports = function (config) {
22

33
config.set({
4-
"basePath": './',
5-
"browsers": [ "PhantomJS" ],
6-
"singleRun": true,
7-
"frameworks": ['mocha', 'chai'],
8-
// "frameworks": [ "mocha" ],
9-
// "plugins": [
10-
// "karma-babel-preprocessor",
11-
// "karma-mocha",
12-
// "karma-webpack",
13-
// "karma-coverage",
14-
// "karma-phantomjs-launcher"
15-
// ],
16-
"files": [ "tests.webpack.js" ],
17-
"preprocessors": {
18-
"tests.webpack.js": [ "webpack" ]
4+
'basePath': './',
5+
'browsers': [ 'PhantomJS' ],
6+
'singleRun': true,
7+
'frameworks': ['mocha', 'chai'],
8+
'files': [ 'tests.webpack.js' ],
9+
'preprocessors': {
10+
'tests.webpack.js': [ 'webpack' ]
1911
},
20-
"webpack": {
21-
// "devtool": "inline-source-map",
22-
"module": {
23-
"loaders": [{
24-
// "test": /\.js$/,
25-
"loader": "babel-loader",
26-
"query": {
27-
"presets": [ "react", "es2015" ]
12+
'webpack': {
13+
'module': {
14+
'loaders': [{
15+
'loader': 'babel-loader',
16+
'query': {
17+
'presets': [ 'react', 'es2015' ]
2818
}
2919
}]
3020
}
3121
},
32-
"coverageReporter": {
33-
"type" : 'text'
22+
'coverageReporter': {
23+
'type' : 'text'
3424
},
35-
// "reporters": ['spec'],
36-
"reporters": ['spec', 'coverage'],
37-
// "reporters": [ "dots" ],
38-
"webpackServer": {
39-
"noInfo": true
25+
'reporters': ['spec', 'coverage'],
26+
'webpackServer': {
27+
'noInfo': true
4028
},
41-
"logLevel": config.LOG_INFO,
42-
"autoWatch": false,
43-
"concurrency": Infinity
29+
'logLevel': config.LOG_INFO,
30+
'autoWatch': false,
31+
'concurrency': Infinity
4432
});
4533
};
4634

lib/ReactFC.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ var _react = require('react');
1818

1919
var _react2 = _interopRequireDefault(_react);
2020

21-
var FusionCharts = typeof window !== "undefined" ? window['FusionCharts'] : typeof global !== "undefined" ? global['FusionCharts'] : null;
21+
var FusionCharts = typeof window !== 'undefined' ? window['FusionCharts'] : typeof global !== 'undefined' ? global['FusionCharts'] : null;
2222

23-
if (typeof FusionCharts === "undefined") {
23+
if (typeof FusionCharts === 'undefined') {
2424
FusionCharts = require('fusioncharts');
2525
}
2626

@@ -34,13 +34,12 @@ var ReactFC = (function (_React$Component) {
3434

3535
_get(Object.getPrototypeOf(ReactFC.prototype), 'constructor', this).call(this, props);
3636

37-
this.state = {
38-
caption: props.name
39-
};
37+
var propsObj = props;
38+
39+
this.state = {};
4040

4141
this.fcConfig = props;
42-
this.renderAt = props.renderAt;
43-
// this.fcConfig.renderAt = undefined;
42+
this.renderAt = propsObj.renderAt;
4443

4544
this.chartObj = new FusionCharts(this.fcConfig);
4645

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-fusioncharts",
3-
"version": "1.0.2",
3+
"version": "1.0.3",
44
"description": "React FusionCharts",
55
"main": "lib/ReactFC.js",
66
"author": "FusionCharts",
@@ -16,7 +16,7 @@
1616
"bootstrap": "^3.3.7",
1717
"classnames": "^2.1.2",
1818
"colors": "^1.1.2",
19-
"fusionmaps": "^3.11.3",
19+
"fusionmaps": "^3.11.3-sr.1",
2020
"jquery": "^3.1.1",
2121
"prism": "^1.0.0",
2222
"prismjs": "^1.6.0"
@@ -31,7 +31,7 @@
3131
"eslint": "^1.6.0",
3232
"eslint-plugin-react": "^3.5.1",
3333
"expect": "^1.13.0",
34-
"fusioncharts": "^3.11.3",
34+
"fusioncharts": "^3.11.3-sr.1",
3535
"gulp": "^3.9.0",
3636
"karma": "^1.3.0",
3737
"karma-babel-preprocessor": "^6.0.1",

scripts/test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ echo " | | | |_ __ (_) |_ |_ _|__ ___| |_(_)_ __ __ _ ";
2727
echo " | | | | '_ \\| | __| | |/ _ \\/ __| __| | '_ \\ / _\` |";
2828
echo " | |_| | | | | | |_ | | __/\\__ \\ |_| | | | | (_| |";
2929
echo " \\___/|_| |_|_|\\__| |_|\\___||___/\\__|_|_| |_|\\__, |";
30-
echo " |___/ ";
30+
echo " |___/ ";
3131

3232
npm run jsunit;

src/ReactFC.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
import React from 'react';
22

3-
var FusionCharts = (typeof window !== "undefined" ? window['FusionCharts'] :
4-
typeof global !== "undefined" ? global['FusionCharts'] : null);
3+
var FusionCharts = (typeof window !== 'undefined' ? window['FusionCharts'] :
4+
typeof global !== 'undefined' ? global['FusionCharts'] : null);
55

6-
if (typeof FusionCharts === "undefined") {
6+
if (typeof FusionCharts === 'undefined') {
77
FusionCharts = require('fusioncharts');
88
}
99

1010
class ReactFC extends React.Component {
1111
constructor (props) {
1212
super(props);
1313

14+
let propsObj = props;
15+
1416
this.state = {
15-
caption: props.name
1617
};
1718

1819
this.fcConfig = props;
19-
this.renderAt = props.renderAt;
20-
// this.fcConfig.renderAt = undefined;
20+
this.renderAt = propsObj.renderAt;
2121

2222
this.chartObj = new FusionCharts(this.fcConfig);
2323

test/render-test.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,18 @@ import expect from 'expect';
66

77
import FC from 'fusioncharts';
88
import charts from 'fusioncharts/fusioncharts.charts';
9-
import ReactFusionCharts from '../lib/ReactFusionCharts';
9+
import ReactFusionCharts from '../lib/ReactFC';
1010

1111
charts(FC);
1212

1313
class FCDashboard extends React.Component {
1414
constructor(props) {
1515
super(props);
16+
let propsObj = props;
1617

1718
this.state = {
1819
name: 'React is cool',
19-
id: props.id,
20+
id: propsObj.id,
2021
type: 'Column2D',
2122
dataFormat: 'JSON',
2223
dataSource: {

0 commit comments

Comments
 (0)