mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
docs update for v15.4.1
This commit is contained in:
Binary file not shown.
Vendored
+34
-22
@@ -1,15 +1,15 @@
|
||||
/**
|
||||
* ReactDOM v15.4.0
|
||||
* ReactDOM v15.4.1
|
||||
*/
|
||||
|
||||
;(function(f) {
|
||||
// CommonJS
|
||||
if (typeof exports === "object" && typeof module !== "undefined") {
|
||||
f(require('react'));
|
||||
module.exports = f(require('react'));
|
||||
|
||||
// RequireJS
|
||||
} else if (typeof define === "function" && define.amd) {
|
||||
require(['react'], f);
|
||||
define(['react'], f);
|
||||
|
||||
// <script>
|
||||
} else {
|
||||
@@ -26,10 +26,10 @@
|
||||
// see https://github.com/facebook/react/issues/3037
|
||||
g = this;
|
||||
}
|
||||
f(g.React)
|
||||
g.ReactDOM = f(g.React);
|
||||
}
|
||||
})(function(React) {
|
||||
(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.ReactDOM = 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){
|
||||
return (function(f){return 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-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@@ -2448,6 +2448,28 @@ var getDictionaryKey = function (inst) {
|
||||
return '.' + inst._rootNodeID;
|
||||
};
|
||||
|
||||
function isInteractive(tag) {
|
||||
return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';
|
||||
}
|
||||
|
||||
function shouldPreventMouseEvent(name, type, props) {
|
||||
switch (name) {
|
||||
case 'onClick':
|
||||
case 'onClickCapture':
|
||||
case 'onDoubleClick':
|
||||
case 'onDoubleClickCapture':
|
||||
case 'onMouseDown':
|
||||
case 'onMouseDownCapture':
|
||||
case 'onMouseMove':
|
||||
case 'onMouseMoveCapture':
|
||||
case 'onMouseUp':
|
||||
case 'onMouseUpCapture':
|
||||
return !!(props.disabled && isInteractive(type));
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This is a unified interface for event plugins to be installed and configured.
|
||||
*
|
||||
@@ -2516,7 +2538,12 @@ var EventPluginHub = {
|
||||
* @return {?function} The stored callback.
|
||||
*/
|
||||
getListener: function (inst, registrationName) {
|
||||
// TODO: shouldPreventMouseEvent is DOM-specific and definitely should not
|
||||
// live here; needs to be moved to a better place soon
|
||||
var bankForRegistrationName = listenerBank[registrationName];
|
||||
if (shouldPreventMouseEvent(registrationName, inst._currentElement.type, inst._currentElement.props)) {
|
||||
return null;
|
||||
}
|
||||
var key = getDictionaryKey(inst);
|
||||
return bankForRegistrationName && bankForRegistrationName[key];
|
||||
},
|
||||
@@ -12979,7 +13006,7 @@ module.exports = ReactUpdates;
|
||||
|
||||
'use strict';
|
||||
|
||||
module.exports = '15.4.0';
|
||||
module.exports = '15.4.1';
|
||||
},{}],84:[function(_dereq_,module,exports){
|
||||
/**
|
||||
* Copyright 2013-present, Facebook, Inc.
|
||||
@@ -13556,18 +13583,6 @@ function isInteractive(tag) {
|
||||
return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';
|
||||
}
|
||||
|
||||
function shouldPreventMouseEvent(inst) {
|
||||
if (inst) {
|
||||
var disabled = inst._currentElement && inst._currentElement.props.disabled;
|
||||
|
||||
if (disabled) {
|
||||
return isInteractive(inst._tag);
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
var SimpleEventPlugin = {
|
||||
|
||||
eventTypes: eventTypes,
|
||||
@@ -13638,10 +13653,7 @@ var SimpleEventPlugin = {
|
||||
case 'topMouseDown':
|
||||
case 'topMouseMove':
|
||||
case 'topMouseUp':
|
||||
// Disabled elements should not respond to mouse events
|
||||
if (shouldPreventMouseEvent(targetInst)) {
|
||||
return null;
|
||||
}
|
||||
// TODO: Disabled elements should not respond to mouse events
|
||||
/* falls through */
|
||||
case 'topMouseOut':
|
||||
case 'topMouseOver':
|
||||
|
||||
Vendored
+24
-16
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* React v15.4.0
|
||||
* React v15.4.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){
|
||||
/**
|
||||
@@ -1351,30 +1351,38 @@ typeof Set === 'function' && isNative(Set) &&
|
||||
// Set.prototype.keys
|
||||
Set.prototype != null && typeof Set.prototype.keys === 'function' && isNative(Set.prototype.keys);
|
||||
|
||||
var setItem;
|
||||
var getItem;
|
||||
var removeItem;
|
||||
var getItemIDs;
|
||||
var addRoot;
|
||||
var removeRoot;
|
||||
var getRootIDs;
|
||||
|
||||
if (canUseCollections) {
|
||||
var itemMap = new Map();
|
||||
var rootIDSet = new Set();
|
||||
|
||||
var setItem = function (id, item) {
|
||||
setItem = function (id, item) {
|
||||
itemMap.set(id, item);
|
||||
};
|
||||
var getItem = function (id) {
|
||||
getItem = function (id) {
|
||||
return itemMap.get(id);
|
||||
};
|
||||
var removeItem = function (id) {
|
||||
removeItem = function (id) {
|
||||
itemMap['delete'](id);
|
||||
};
|
||||
var getItemIDs = function () {
|
||||
getItemIDs = function () {
|
||||
return Array.from(itemMap.keys());
|
||||
};
|
||||
|
||||
var addRoot = function (id) {
|
||||
addRoot = function (id) {
|
||||
rootIDSet.add(id);
|
||||
};
|
||||
var removeRoot = function (id) {
|
||||
removeRoot = function (id) {
|
||||
rootIDSet['delete'](id);
|
||||
};
|
||||
var getRootIDs = function () {
|
||||
getRootIDs = function () {
|
||||
return Array.from(rootIDSet.keys());
|
||||
};
|
||||
} else {
|
||||
@@ -1390,31 +1398,31 @@ if (canUseCollections) {
|
||||
return parseInt(key.substr(1), 10);
|
||||
};
|
||||
|
||||
var setItem = function (id, item) {
|
||||
setItem = function (id, item) {
|
||||
var key = getKeyFromID(id);
|
||||
itemByKey[key] = item;
|
||||
};
|
||||
var getItem = function (id) {
|
||||
getItem = function (id) {
|
||||
var key = getKeyFromID(id);
|
||||
return itemByKey[key];
|
||||
};
|
||||
var removeItem = function (id) {
|
||||
removeItem = function (id) {
|
||||
var key = getKeyFromID(id);
|
||||
delete itemByKey[key];
|
||||
};
|
||||
var getItemIDs = function () {
|
||||
getItemIDs = function () {
|
||||
return Object.keys(itemByKey).map(getIDFromKey);
|
||||
};
|
||||
|
||||
var addRoot = function (id) {
|
||||
addRoot = function (id) {
|
||||
var key = getKeyFromID(id);
|
||||
rootByKey[key] = true;
|
||||
};
|
||||
var removeRoot = function (id) {
|
||||
removeRoot = function (id) {
|
||||
var key = getKeyFromID(id);
|
||||
delete rootByKey[key];
|
||||
};
|
||||
var getRootIDs = function () {
|
||||
getRootIDs = function () {
|
||||
return Object.keys(rootByKey).map(getIDFromKey);
|
||||
};
|
||||
}
|
||||
@@ -3073,7 +3081,7 @@ module.exports = ReactUMDEntry;
|
||||
|
||||
'use strict';
|
||||
|
||||
module.exports = '15.4.0';
|
||||
module.exports = '15.4.1';
|
||||
},{}],20:[function(_dereq_,module,exports){
|
||||
/**
|
||||
* Copyright 2013-present, Facebook, Inc.
|
||||
|
||||
Reference in New Issue
Block a user