Commit 0fbacceb authored by Pascal Hartig's avatar Pascal Hartig

React: Upgrade to 0.11.1, fix #962

parent 0cfffc02
/** /**
* JSXTransformer v0.11.0 * JSXTransformer v0.11.1
*/ */
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.JSXTransformer=e()}}(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);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.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(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.JSXTransformer=e()}}(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);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.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){
/*! /*!
...@@ -12427,8 +12427,6 @@ var docblock = _dereq_('jstransform/src/docblock'); ...@@ -12427,8 +12427,6 @@ var docblock = _dereq_('jstransform/src/docblock');
var transform = _dereq_('jstransform').transform; var transform = _dereq_('jstransform').transform;
var visitors = _dereq_('./fbtransform/visitors'); var visitors = _dereq_('./fbtransform/visitors');
var runScripts;
var loadScripts;
var headEl; var headEl;
var dummyAnchor; var dummyAnchor;
var inlineScriptCount = 0; var inlineScriptCount = 0;
......
/** /**
* React (with addons) v0.11.0 * React (with addons) v0.11.1
*/ */
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.React=e()}}(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);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.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(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.React=e()}}(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);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.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){
/** /**
...@@ -4367,7 +4367,7 @@ if ("production" !== "development") { ...@@ -4367,7 +4367,7 @@ if ("production" !== "development") {
// Version exists only in the open-source version of React, not in Facebook's // Version exists only in the open-source version of React, not in Facebook's
// internal version. // internal version.
React.version = '0.11.0'; React.version = '0.11.1';
module.exports = React; module.exports = React;
...@@ -6644,7 +6644,15 @@ var ReactCompositeComponentMixin = { ...@@ -6644,7 +6644,15 @@ var ReactCompositeComponentMixin = {
replaceState: function(completeState, callback) { replaceState: function(completeState, callback) {
validateLifeCycleOnReplaceState(this); validateLifeCycleOnReplaceState(this);
this._pendingState = completeState; this._pendingState = completeState;
ReactUpdates.enqueueUpdate(this, callback); if (this._compositeLifeCycleState !== CompositeLifeCycle.MOUNTING) {
// If we're in a componentWillMount handler, don't enqueue a rerender
// because ReactUpdates assumes we're in a browser context (which is wrong
// for server rendering) and we're about to do a render anyway.
// TODO: The callback here is ignored when setState is called from
// componentWillMount. Either fix it or disallow doing so completely in
// favor of getInitialState.
ReactUpdates.enqueueUpdate(this, callback);
}
}, },
/** /**
...@@ -16489,7 +16497,7 @@ var MouseEventInterface = { ...@@ -16489,7 +16497,7 @@ var MouseEventInterface = {
shiftKey: null, shiftKey: null,
altKey: null, altKey: null,
metaKey: null, metaKey: null,
getEventModifierState: getEventModifierState, getModifierState: getEventModifierState,
button: function(event) { button: function(event) {
// Webkit, Firefox, IE9+ // Webkit, Firefox, IE9+
// which: 1 2 3 // which: 1 2 3
...@@ -18084,10 +18092,10 @@ module.exports = getEventKey; ...@@ -18084,10 +18092,10 @@ module.exports = getEventKey;
*/ */
var modifierKeyToProp = { var modifierKeyToProp = {
'alt': 'altKey', 'Alt': 'altKey',
'control': 'ctrlKey', 'Control': 'ctrlKey',
'meta': 'metaKey', 'Meta': 'metaKey',
'shift': 'shiftKey' 'Shift': 'shiftKey'
}; };
// IE8 does not implement getModifierState so we simply map it to the only // IE8 does not implement getModifierState so we simply map it to the only
...@@ -18100,8 +18108,8 @@ function modifierStateGetter(keyArg) { ...@@ -18100,8 +18108,8 @@ function modifierStateGetter(keyArg) {
if (nativeEvent.getModifierState) { if (nativeEvent.getModifierState) {
return nativeEvent.getModifierState(keyArg); return nativeEvent.getModifierState(keyArg);
} }
var keyProp = modifierKeyToProp[keyArg.toLowerCase()]; var keyProp = modifierKeyToProp[keyArg];
return keyProp && nativeEvent[keyProp]; return keyProp ? !!nativeEvent[keyProp] : false;
} }
function getEventModifierState(nativeEvent) { function getEventModifierState(nativeEvent) {
...@@ -19628,7 +19636,15 @@ if (ExecutionEnvironment.canUseDOM) { ...@@ -19628,7 +19636,15 @@ if (ExecutionEnvironment.canUseDOM) {
// Recover leading whitespace by temporarily prepending any character. // Recover leading whitespace by temporarily prepending any character.
// \uFEFF has the potential advantage of being zero-width/invisible. // \uFEFF has the potential advantage of being zero-width/invisible.
node.innerHTML = '\uFEFF' + html; node.innerHTML = '\uFEFF' + html;
node.firstChild.deleteData(0, 1);
// deleteData leaves an empty `TextNode` which offsets the index of all
// children. Definitely want to avoid this.
var textNode = node.firstChild;
if (textNode.data.length === 1) {
node.removeChild(textNode);
} else {
textNode.deleteData(0, 1);
}
} else { } else {
node.innerHTML = html; node.innerHTML = html;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment