Skip to content
This repository has been archived by the owner on Oct 2, 2021. It is now read-only.

Commit

Permalink
Reflow: Upgrade React Data Grid to React 0.14.6
Browse files Browse the repository at this point in the history
  • Loading branch information
malonecj committed Jan 26, 2016
1 parent 1621116 commit 6ec152d
Show file tree
Hide file tree
Showing 71 changed files with 305 additions and 255 deletions.
4 changes: 4 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"presets": ["react", "es2015"],
"plugins": ["transform-class-properties"]
}
1 change: 1 addition & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ install:
- npm install
- gulp flow
- gulp dist
- gulp examples

# Post-install test scripts.
test_script:
Expand Down
13 changes: 8 additions & 5 deletions config/webpack.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,18 @@ var config = {
commonjs2 : 'react',
amd : 'react'
},
"react-dom": {
root : 'ReactDOM',
commonjs : 'react-dom',
commonjs2 : 'react-dom',
amd : 'react-dom'
},
"moment" : "moment"
},
module: {
loaders: [
{
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel-loader?optional[]=runtime'
}
{ test: /\.js$/, exclude: /node_modules/, loader: "babel-loader"}

]
},
postLoaders: [
Expand Down
10 changes: 5 additions & 5 deletions examples/assets/js/ReactPlayground.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ var CodeMirrorEditor = React.createClass({
componentDidMount: function() {
if (IS_MOBILE) return;

this.editor = CodeMirror.fromTextArea(this.refs.editor.getDOMNode(), {
this.editor = CodeMirror.fromTextArea(this.refs.editor, {
mode: 'javascript',
lineNumbers: this.props.lineNumbers,
lineWrapping: true,
Expand Down Expand Up @@ -204,16 +204,16 @@ module.exports = React.createClass({
},

executeCode: function() {
var mountNode = this.refs.mount.getDOMNode();
var mountNode = this.refs.mount;

try {
React.unmountComponentAtNode(mountNode);
ReactDOM.unmountComponentAtNode(mountNode);
} catch (e) { }

try {
var compiledCode = this.compileCode();
if (this.props.renderCode) {
React.render(
ReactDOM.render(
<CodeMirrorEditor codeText={compiledCode} readOnly={true} />,
mountNode
);
Expand All @@ -222,7 +222,7 @@ module.exports = React.createClass({
}
} catch (err) {
this.setTimeout(function() {
React.render(
ReactDOM.render(
<div className="playgroundError">{err.toString()}</div>,
mountNode
);
Expand Down
4 changes: 2 additions & 2 deletions examples/assets/js/bootstrap.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions examples/assets/js/react-router.min.js

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions examples/assets/js/react-with-addons.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* React (with addons) v0.13.1
*/
(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){
(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){
/**
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.
Expand Down Expand Up @@ -75,7 +75,7 @@ var focusNode = _dereq_(134);
var AutoFocusMixin = {
componentDidMount: function() {
if (this.props.autoFocus) {
focusNode(React.findDOMNode(this));
focusNode(ReactDOM.findDOMNode(this));
}
}
};
Expand Down Expand Up @@ -4117,7 +4117,7 @@ var LocalEventTrapMixin = {
("production" !== "development" ? invariant(this.isMounted(), 'Must be mounted to trap events') : invariant(this.isMounted()));
// If a component renders to null or if another component fatals and causes
// the state of the tree to be corrupted, `node` here can be null.
var node = React.findDOMNode(this);
var node = ReactDOM.findDOMNode(this);
("production" !== "development" ? invariant(
node,
'LocalEventTrapMixin.trapBubbledEvent(...): Requires node to be rendered.'
Expand Down Expand Up @@ -5018,7 +5018,7 @@ var ReactCSSTransitionGroupChild = React.createClass({
displayName: 'ReactCSSTransitionGroupChild',

transition: function(animationType, finishCallback) {
var node = React.findDOMNode(this);
var node = ReactDOM.findDOMNode(this);
var className = this.props.name + '-' + animationType;
var activeClassName = className + '-active';
var noEventTimeout = null;
Expand Down Expand Up @@ -5066,7 +5066,7 @@ var ReactCSSTransitionGroupChild = React.createClass({
flushClassNameQueue: function() {
if (this.isMounted()) {
this.classNameQueue.forEach(
CSSCore.addClass.bind(CSSCore, React.findDOMNode(this))
CSSCore.addClass.bind(CSSCore, ReactDOM.findDOMNode(this))
);
}
this.classNameQueue.length = 0;
Expand Down Expand Up @@ -8759,18 +8759,18 @@ var ReactDOMInput = ReactClass.createClass({
},

componentDidMount: function() {
var id = ReactMount.getID(React.findDOMNode(this));
var id = ReactMount.getID(ReactDOM.findDOMNode(this));
instancesByReactID[id] = this;
},

componentWillUnmount: function() {
var rootNode = React.findDOMNode(this);
var rootNode = ReactDOM.findDOMNode(this);
var id = ReactMount.getID(rootNode);
delete instancesByReactID[id];
},

componentDidUpdate: function(prevProps, prevState, prevContext) {
var rootNode = React.findDOMNode(this);
var rootNode = ReactDOM.findDOMNode(this);
if (this.props.checked != null) {
DOMPropertyOperations.setValueForProperty(
rootNode,
Expand Down Expand Up @@ -8800,7 +8800,7 @@ var ReactDOMInput = ReactClass.createClass({

var name = this.props.name;
if (this.props.type === 'radio' && name != null) {
var rootNode = React.findDOMNode(this);
var rootNode = ReactDOM.findDOMNode(this);
var queryRoot = rootNode;

while (queryRoot.parentNode) {
Expand Down Expand Up @@ -9523,7 +9523,7 @@ var ReactDOMTextarea = ReactClass.createClass({
componentDidUpdate: function(prevProps, prevState, prevContext) {
var value = LinkedValueUtils.getValue(this);
if (value != null) {
var rootNode = React.findDOMNode(this);
var rootNode = ReactDOM.findDOMNode(this);
// Cast `value` to a string to ensure the value is set correctly. While
// browsers typically do this as necessary, jsdom doesn't.
DOMPropertyOperations.setValueForProperty(rootNode, 'value', '' + value);
Expand Down
16 changes: 8 additions & 8 deletions examples/assets/js/react.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* React v0.13.1
*/
(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){
(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){
/**
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.
Expand Down Expand Up @@ -171,7 +171,7 @@ var focusNode = _dereq_(119);
var AutoFocusMixin = {
componentDidMount: function() {
if (this.props.autoFocus) {
focusNode(React.findDOMNode(this));
focusNode(ReactDOM.findDOMNode(this));
}
}
};
Expand Down Expand Up @@ -4062,7 +4062,7 @@ var LocalEventTrapMixin = {
("production" !== "development" ? invariant(this.isMounted(), 'Must be mounted to trap events') : invariant(this.isMounted()));
// If a component renders to null or if another component fatals and causes
// the state of the tree to be corrupted, `node` here can be null.
var node = React.findDOMNode(this);
var node = ReactDOM.findDOMNode(this);
("production" !== "development" ? invariant(
node,
'LocalEventTrapMixin.trapBubbledEvent(...): Requires node to be rendered.'
Expand Down Expand Up @@ -8289,18 +8289,18 @@ var ReactDOMInput = ReactClass.createClass({
},

componentDidMount: function() {
var id = ReactMount.getID(React.findDOMNode(this));
var id = ReactMount.getID(ReactDOM.findDOMNode(this));
instancesByReactID[id] = this;
},

componentWillUnmount: function() {
var rootNode = React.findDOMNode(this);
var rootNode = ReactDOM.findDOMNode(this);
var id = ReactMount.getID(rootNode);
delete instancesByReactID[id];
},

componentDidUpdate: function(prevProps, prevState, prevContext) {
var rootNode = React.findDOMNode(this);
var rootNode = ReactDOM.findDOMNode(this);
if (this.props.checked != null) {
DOMPropertyOperations.setValueForProperty(
rootNode,
Expand Down Expand Up @@ -8330,7 +8330,7 @@ var ReactDOMInput = ReactClass.createClass({

var name = this.props.name;
if (this.props.type === 'radio' && name != null) {
var rootNode = React.findDOMNode(this);
var rootNode = ReactDOM.findDOMNode(this);
var queryRoot = rootNode;

while (queryRoot.parentNode) {
Expand Down Expand Up @@ -9053,7 +9053,7 @@ var ReactDOMTextarea = ReactClass.createClass({
componentDidUpdate: function(prevProps, prevState, prevContext) {
var value = LinkedValueUtils.getValue(this);
if (value != null) {
var rootNode = React.findDOMNode(this);
var rootNode = ReactDOM.findDOMNode(this);
// Cast `value` to a string to ensure the value is set correctly. While
// browsers typically do this as necessary, jsdom doesn't.
DOMPropertyOperations.setValueForProperty(rootNode, 'value', '' + value);
Expand Down
2 changes: 1 addition & 1 deletion examples/assets/js/respond.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions examples/components/ColsDescription.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/**
* @jsx React.DOM
*/
module.exports = React.createClass({
render : function(){
return(
Expand Down
Loading

0 comments on commit 6ec152d

Please sign in to comment.