Skip to content

Commit 6ec152d

Browse files
committed
Reflow: Upgrade React Data Grid to React 0.14.6
1 parent 1621116 commit 6ec152d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+305
-255
lines changed

.babelrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"presets": ["react", "es2015"],
3+
"plugins": ["transform-class-properties"]
4+
}

appveyor.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ install:
3333
- npm install
3434
- gulp flow
3535
- gulp dist
36+
- gulp examples
3637

3738
# Post-install test scripts.
3839
test_script:

config/webpack.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,18 @@ var config = {
3030
commonjs2 : 'react',
3131
amd : 'react'
3232
},
33+
"react-dom": {
34+
root : 'ReactDOM',
35+
commonjs : 'react-dom',
36+
commonjs2 : 'react-dom',
37+
amd : 'react-dom'
38+
},
3339
"moment" : "moment"
3440
},
3541
module: {
3642
loaders: [
37-
{
38-
test: /\.js$/,
39-
exclude: /node_modules/,
40-
loader: 'babel-loader?optional[]=runtime'
41-
}
43+
{ test: /\.js$/, exclude: /node_modules/, loader: "babel-loader"}
44+
4245
]
4346
},
4447
postLoaders: [

examples/assets/js/ReactPlayground.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ var CodeMirrorEditor = React.createClass({
3030
componentDidMount: function() {
3131
if (IS_MOBILE) return;
3232

33-
this.editor = CodeMirror.fromTextArea(this.refs.editor.getDOMNode(), {
33+
this.editor = CodeMirror.fromTextArea(this.refs.editor, {
3434
mode: 'javascript',
3535
lineNumbers: this.props.lineNumbers,
3636
lineWrapping: true,
@@ -204,16 +204,16 @@ module.exports = React.createClass({
204204
},
205205

206206
executeCode: function() {
207-
var mountNode = this.refs.mount.getDOMNode();
207+
var mountNode = this.refs.mount;
208208

209209
try {
210-
React.unmountComponentAtNode(mountNode);
210+
ReactDOM.unmountComponentAtNode(mountNode);
211211
} catch (e) { }
212212

213213
try {
214214
var compiledCode = this.compileCode();
215215
if (this.props.renderCode) {
216-
React.render(
216+
ReactDOM.render(
217217
<CodeMirrorEditor codeText={compiledCode} readOnly={true} />,
218218
mountNode
219219
);
@@ -222,7 +222,7 @@ module.exports = React.createClass({
222222
}
223223
} catch (err) {
224224
this.setTimeout(function() {
225-
React.render(
225+
ReactDOM.render(
226226
<div className="playgroundError">{err.toString()}</div>,
227227
mountNode
228228
);

examples/assets/js/bootstrap.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/assets/js/react-router.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/assets/js/react-with-addons.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* React (with addons) v0.13.1
33
*/
4-
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.React = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
4+
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.React = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw (f.code="MODULE_NOT_FOUND", f)}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
55
/**
66
* Copyright 2013-2015, Facebook, Inc.
77
* All rights reserved.
@@ -75,7 +75,7 @@ var focusNode = _dereq_(134);
7575
var AutoFocusMixin = {
7676
componentDidMount: function() {
7777
if (this.props.autoFocus) {
78-
focusNode(React.findDOMNode(this));
78+
focusNode(ReactDOM.findDOMNode(this));
7979
}
8080
}
8181
};
@@ -4117,7 +4117,7 @@ var LocalEventTrapMixin = {
41174117
("production" !== "development" ? invariant(this.isMounted(), 'Must be mounted to trap events') : invariant(this.isMounted()));
41184118
// If a component renders to null or if another component fatals and causes
41194119
// the state of the tree to be corrupted, `node` here can be null.
4120-
var node = React.findDOMNode(this);
4120+
var node = ReactDOM.findDOMNode(this);
41214121
("production" !== "development" ? invariant(
41224122
node,
41234123
'LocalEventTrapMixin.trapBubbledEvent(...): Requires node to be rendered.'
@@ -5018,7 +5018,7 @@ var ReactCSSTransitionGroupChild = React.createClass({
50185018
displayName: 'ReactCSSTransitionGroupChild',
50195019

50205020
transition: function(animationType, finishCallback) {
5021-
var node = React.findDOMNode(this);
5021+
var node = ReactDOM.findDOMNode(this);
50225022
var className = this.props.name + '-' + animationType;
50235023
var activeClassName = className + '-active';
50245024
var noEventTimeout = null;
@@ -5066,7 +5066,7 @@ var ReactCSSTransitionGroupChild = React.createClass({
50665066
flushClassNameQueue: function() {
50675067
if (this.isMounted()) {
50685068
this.classNameQueue.forEach(
5069-
CSSCore.addClass.bind(CSSCore, React.findDOMNode(this))
5069+
CSSCore.addClass.bind(CSSCore, ReactDOM.findDOMNode(this))
50705070
);
50715071
}
50725072
this.classNameQueue.length = 0;
@@ -8759,18 +8759,18 @@ var ReactDOMInput = ReactClass.createClass({
87598759
},
87608760

87618761
componentDidMount: function() {
8762-
var id = ReactMount.getID(React.findDOMNode(this));
8762+
var id = ReactMount.getID(ReactDOM.findDOMNode(this));
87638763
instancesByReactID[id] = this;
87648764
},
87658765

87668766
componentWillUnmount: function() {
8767-
var rootNode = React.findDOMNode(this);
8767+
var rootNode = ReactDOM.findDOMNode(this);
87688768
var id = ReactMount.getID(rootNode);
87698769
delete instancesByReactID[id];
87708770
},
87718771

87728772
componentDidUpdate: function(prevProps, prevState, prevContext) {
8773-
var rootNode = React.findDOMNode(this);
8773+
var rootNode = ReactDOM.findDOMNode(this);
87748774
if (this.props.checked != null) {
87758775
DOMPropertyOperations.setValueForProperty(
87768776
rootNode,
@@ -8800,7 +8800,7 @@ var ReactDOMInput = ReactClass.createClass({
88008800

88018801
var name = this.props.name;
88028802
if (this.props.type === 'radio' && name != null) {
8803-
var rootNode = React.findDOMNode(this);
8803+
var rootNode = ReactDOM.findDOMNode(this);
88048804
var queryRoot = rootNode;
88058805

88068806
while (queryRoot.parentNode) {
@@ -9523,7 +9523,7 @@ var ReactDOMTextarea = ReactClass.createClass({
95239523
componentDidUpdate: function(prevProps, prevState, prevContext) {
95249524
var value = LinkedValueUtils.getValue(this);
95259525
if (value != null) {
9526-
var rootNode = React.findDOMNode(this);
9526+
var rootNode = ReactDOM.findDOMNode(this);
95279527
// Cast `value` to a string to ensure the value is set correctly. While
95289528
// browsers typically do this as necessary, jsdom doesn't.
95299529
DOMPropertyOperations.setValueForProperty(rootNode, 'value', '' + value);

examples/assets/js/react.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* React v0.13.1
33
*/
4-
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.React = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
4+
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.React = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw (f.code="MODULE_NOT_FOUND", f)}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
55
/**
66
* Copyright 2013-2015, Facebook, Inc.
77
* All rights reserved.
@@ -171,7 +171,7 @@ var focusNode = _dereq_(119);
171171
var AutoFocusMixin = {
172172
componentDidMount: function() {
173173
if (this.props.autoFocus) {
174-
focusNode(React.findDOMNode(this));
174+
focusNode(ReactDOM.findDOMNode(this));
175175
}
176176
}
177177
};
@@ -4062,7 +4062,7 @@ var LocalEventTrapMixin = {
40624062
("production" !== "development" ? invariant(this.isMounted(), 'Must be mounted to trap events') : invariant(this.isMounted()));
40634063
// If a component renders to null or if another component fatals and causes
40644064
// the state of the tree to be corrupted, `node` here can be null.
4065-
var node = React.findDOMNode(this);
4065+
var node = ReactDOM.findDOMNode(this);
40664066
("production" !== "development" ? invariant(
40674067
node,
40684068
'LocalEventTrapMixin.trapBubbledEvent(...): Requires node to be rendered.'
@@ -8289,18 +8289,18 @@ var ReactDOMInput = ReactClass.createClass({
82898289
},
82908290

82918291
componentDidMount: function() {
8292-
var id = ReactMount.getID(React.findDOMNode(this));
8292+
var id = ReactMount.getID(ReactDOM.findDOMNode(this));
82938293
instancesByReactID[id] = this;
82948294
},
82958295

82968296
componentWillUnmount: function() {
8297-
var rootNode = React.findDOMNode(this);
8297+
var rootNode = ReactDOM.findDOMNode(this);
82988298
var id = ReactMount.getID(rootNode);
82998299
delete instancesByReactID[id];
83008300
},
83018301

83028302
componentDidUpdate: function(prevProps, prevState, prevContext) {
8303-
var rootNode = React.findDOMNode(this);
8303+
var rootNode = ReactDOM.findDOMNode(this);
83048304
if (this.props.checked != null) {
83058305
DOMPropertyOperations.setValueForProperty(
83068306
rootNode,
@@ -8330,7 +8330,7 @@ var ReactDOMInput = ReactClass.createClass({
83308330

83318331
var name = this.props.name;
83328332
if (this.props.type === 'radio' && name != null) {
8333-
var rootNode = React.findDOMNode(this);
8333+
var rootNode = ReactDOM.findDOMNode(this);
83348334
var queryRoot = rootNode;
83358335

83368336
while (queryRoot.parentNode) {
@@ -9053,7 +9053,7 @@ var ReactDOMTextarea = ReactClass.createClass({
90539053
componentDidUpdate: function(prevProps, prevState, prevContext) {
90549054
var value = LinkedValueUtils.getValue(this);
90559055
if (value != null) {
9056-
var rootNode = React.findDOMNode(this);
9056+
var rootNode = ReactDOM.findDOMNode(this);
90579057
// Cast `value` to a string to ensure the value is set correctly. While
90589058
// browsers typically do this as necessary, jsdom doesn't.
90599059
DOMPropertyOperations.setValueForProperty(rootNode, 'value', '' + value);

examples/assets/js/respond.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.

examples/components/ColsDescription.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
/**
2-
* @jsx React.DOM
3-
*/
41
module.exports = React.createClass({
52
render : function(){
63
return(

0 commit comments

Comments
 (0)