react-test-renderer 15.5.4 → 15.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +16 -26
- package/lib/CallbackQueue.js +3 -5
- package/lib/EventConstants.js +3 -5
- package/lib/EventPluginHub.js +3 -9
- package/lib/EventPluginRegistry.js +3 -7
- package/lib/EventPluginUtils.js +3 -5
- package/lib/EventPropagators.js +3 -5
- package/lib/KeyEscapeUtils.js +3 -5
- package/lib/PluginModuleType.js +3 -5
- package/lib/PooledClass.js +3 -5
- package/lib/ReactChildFiber.js +3 -6
- package/lib/ReactChildReconciler.js +7 -10
- package/lib/ReactComponentEnvironment.js +3 -7
- package/lib/ReactCompositeComponent.js +5 -9
- package/lib/ReactCoroutine.js +3 -5
- package/lib/ReactDebugTool.js +6 -6
- package/lib/ReactDefaultBatchingStrategy.js +3 -5
- package/lib/ReactElementSymbol.js +3 -5
- package/lib/ReactEmptyComponent.js +3 -5
- package/lib/ReactErrorUtils.js +6 -6
- package/lib/ReactEventEmitterMixin.js +3 -6
- package/lib/ReactFeatureFlags.js +3 -5
- package/lib/ReactFiber.js +3 -7
- package/lib/ReactFiberBeginWork.js +3 -6
- package/lib/ReactFiberCommitWork.js +3 -6
- package/lib/ReactFiberCompleteWork.js +3 -7
- package/lib/ReactFiberReconciler.js +3 -5
- package/lib/ReactFiberRoot.js +3 -5
- package/lib/ReactFiberScheduler.js +3 -5
- package/lib/ReactFiberUpdateQueue.js +3 -5
- package/lib/ReactHostComponent.js +3 -5
- package/lib/ReactHostOperationHistoryHook.js +3 -5
- package/lib/ReactInstanceMap.js +3 -7
- package/lib/ReactInstanceType.js +3 -5
- package/lib/ReactInstrumentation.js +3 -5
- package/lib/ReactInvalidSetStateWarningHook.js +3 -5
- package/lib/ReactMultiChild.js +3 -9
- package/lib/ReactMultiChildUpdateTypes.js +3 -5
- package/lib/ReactNodeTypes.js +3 -5
- package/lib/ReactOwner.js +3 -6
- package/lib/ReactPerf.js +9 -11
- package/lib/ReactPriorityLevel.js +5 -6
- package/lib/ReactPropTypeLocationNames.js +3 -5
- package/lib/ReactPropTypeLocations.js +3 -5
- package/lib/ReactPropTypesSecret.js +3 -5
- package/lib/ReactReconciler.js +5 -9
- package/lib/ReactRef.js +3 -5
- package/lib/ReactReifiedYield.js +3 -5
- package/lib/ReactShallowRenderer.js +3 -5
- package/lib/ReactSimpleEmptyComponent.js +5 -7
- package/lib/ReactSyntheticEventType.js +3 -5
- package/lib/ReactTestEmptyComponent.js +3 -5
- package/lib/ReactTestMount.js +8 -8
- package/lib/ReactTestReconcileTransaction.js +2 -4
- package/lib/ReactTestRenderer.js +4 -5
- package/lib/ReactTestTextComponent.js +3 -5
- package/lib/ReactTypeOfWork.js +3 -5
- package/lib/ReactTypes.js +3 -5
- package/lib/ReactUpdateQueue.js +4 -8
- package/lib/ReactUpdates.js +4 -6
- package/lib/ReactVersion.js +4 -6
- package/lib/ResponderEventPlugin.js +3 -7
- package/lib/ResponderSyntheticEvent.js +3 -5
- package/lib/ResponderTouchHistoryStore.js +3 -5
- package/lib/SyntheticEvent.js +34 -33
- package/lib/Transaction.js +6 -5
- package/lib/accumulate.js +3 -5
- package/lib/accumulateInto.js +3 -5
- package/lib/adler32.js +3 -5
- package/lib/canDefineProperty.js +3 -5
- package/lib/checkReactTypeSpec.js +3 -5
- package/lib/deprecated.js +6 -8
- package/lib/flattenChildren.js +3 -5
- package/lib/forEachAccumulated.js +3 -5
- package/lib/getHostComponentFromComposite.js +3 -5
- package/lib/getIteratorFn.js +3 -5
- package/lib/instantiateReactComponent.js +4 -6
- package/lib/isTextInputElement.js +17 -19
- package/lib/lowPriorityWarning.js +62 -0
- package/lib/reactProdInvariant.js +2 -4
- package/lib/shallow/ARIADOMPropertyConfig.js +3 -5
- package/lib/shallow/AutoFocusUtils.js +3 -5
- package/lib/shallow/BeforeInputEventPlugin.js +3 -6
- package/lib/shallow/CSSProperty.js +10 -5
- package/lib/shallow/CSSPropertyOperations.js +17 -13
- package/lib/shallow/CallbackQueue.js +3 -5
- package/lib/shallow/ChangeEventPlugin.js +52 -88
- package/lib/shallow/DOMChildrenOperations.js +7 -8
- package/lib/shallow/DOMLazyTree.js +3 -5
- package/lib/shallow/DOMNamespaces.js +3 -5
- package/lib/shallow/DOMProperty.js +3 -6
- package/lib/shallow/DOMPropertyOperations.js +3 -7
- package/lib/shallow/Danger.js +3 -7
- package/lib/shallow/DefaultEventPluginOrder.js +3 -5
- package/lib/shallow/EnterLeaveEventPlugin.js +3 -7
- package/lib/shallow/EventConstants.js +3 -5
- package/lib/shallow/EventPluginHub.js +3 -9
- package/lib/shallow/EventPluginRegistry.js +3 -7
- package/lib/shallow/EventPluginUtils.js +3 -5
- package/lib/shallow/EventPropagators.js +3 -5
- package/lib/shallow/FallbackCompositionState.js +3 -5
- package/lib/shallow/HTMLDOMPropertyConfig.js +4 -5
- package/lib/shallow/KeyEscapeUtils.js +3 -5
- package/lib/shallow/LinkedValueUtils.js +10 -12
- package/lib/shallow/PluginModuleType.js +3 -5
- package/lib/shallow/PooledClass.js +3 -5
- package/lib/shallow/ReactBrowserEventEmitter.js +3 -9
- package/lib/shallow/ReactChildFiber.js +3 -6
- package/lib/shallow/ReactChildReconciler.js +7 -10
- package/lib/shallow/ReactComponentBrowserEnvironment.js +3 -7
- package/lib/shallow/ReactComponentEnvironment.js +3 -7
- package/lib/shallow/ReactCompositeComponent.js +5 -9
- package/lib/shallow/ReactCoroutine.js +3 -5
- package/lib/shallow/ReactDOM.js +5 -7
- package/lib/shallow/ReactDOMComponent.js +40 -29
- package/lib/shallow/ReactDOMComponentFlags.js +3 -5
- package/lib/shallow/ReactDOMComponentTree.js +3 -5
- package/lib/shallow/ReactDOMContainerInfo.js +3 -5
- package/lib/shallow/ReactDOMEmptyComponent.js +3 -5
- package/lib/shallow/ReactDOMFeatureFlags.js +3 -5
- package/lib/shallow/ReactDOMFiber.js +3 -6
- package/lib/shallow/ReactDOMIDOperations.js +3 -6
- package/lib/shallow/ReactDOMInput.js +8 -8
- package/lib/shallow/ReactDOMInvalidARIAHook.js +3 -5
- package/lib/shallow/ReactDOMNullInputValuePropHook.js +3 -5
- package/lib/shallow/ReactDOMOption.js +3 -6
- package/lib/shallow/ReactDOMSelect.js +3 -5
- package/lib/shallow/ReactDOMSelection.js +3 -5
- package/lib/shallow/ReactDOMServer.js +3 -5
- package/lib/shallow/ReactDOMTextComponent.js +3 -7
- package/lib/shallow/ReactDOMTextarea.js +3 -5
- package/lib/shallow/ReactDOMTreeTraversal.js +3 -5
- package/lib/shallow/ReactDOMUnknownPropertyHook.js +3 -5
- package/lib/shallow/ReactDebugTool.js +6 -6
- package/lib/shallow/ReactDefaultBatchingStrategy.js +3 -5
- package/lib/shallow/ReactDefaultInjection.js +3 -5
- package/lib/shallow/ReactElementSymbol.js +3 -5
- package/lib/shallow/ReactEmptyComponent.js +3 -5
- package/lib/shallow/ReactErrorUtils.js +6 -6
- package/lib/shallow/ReactEventEmitterMixin.js +3 -6
- package/lib/shallow/ReactEventListener.js +3 -5
- package/lib/shallow/ReactFeatureFlags.js +3 -5
- package/lib/shallow/ReactFiber.js +3 -7
- package/lib/shallow/ReactFiberBeginWork.js +3 -6
- package/lib/shallow/ReactFiberCommitWork.js +3 -6
- package/lib/shallow/ReactFiberCompleteWork.js +3 -7
- package/lib/shallow/ReactFiberReconciler.js +3 -5
- package/lib/shallow/ReactFiberRoot.js +3 -5
- package/lib/shallow/ReactFiberScheduler.js +3 -5
- package/lib/shallow/ReactFiberUpdateQueue.js +3 -5
- package/lib/shallow/ReactHostComponent.js +3 -5
- package/lib/shallow/ReactHostOperationHistoryHook.js +3 -5
- package/lib/shallow/ReactInjection.js +3 -5
- package/lib/shallow/ReactInputSelection.js +3 -6
- package/lib/shallow/ReactInstanceMap.js +3 -7
- package/lib/shallow/ReactInstanceType.js +3 -5
- package/lib/shallow/ReactInstrumentation.js +3 -5
- package/lib/shallow/ReactInvalidSetStateWarningHook.js +3 -5
- package/lib/shallow/ReactMarkupChecksum.js +3 -5
- package/lib/shallow/ReactMount.js +10 -12
- package/lib/shallow/ReactMultiChild.js +3 -9
- package/lib/shallow/ReactMultiChildUpdateTypes.js +3 -5
- package/lib/shallow/ReactNodeTypes.js +3 -5
- package/lib/shallow/ReactOwner.js +3 -6
- package/lib/shallow/ReactPerf.js +9 -11
- package/lib/shallow/ReactPriorityLevel.js +5 -6
- package/lib/shallow/ReactPropTypeLocationNames.js +3 -5
- package/lib/shallow/ReactPropTypeLocations.js +3 -5
- package/lib/shallow/ReactPropTypesSecret.js +3 -5
- package/lib/shallow/ReactReconcileTransaction.js +3 -5
- package/lib/shallow/ReactReconciler.js +5 -9
- package/lib/shallow/ReactRef.js +3 -5
- package/lib/shallow/ReactReifiedYield.js +3 -5
- package/lib/shallow/ReactServerBatchingStrategy.js +3 -5
- package/lib/shallow/ReactServerRendering.js +3 -5
- package/lib/shallow/ReactServerRenderingTransaction.js +3 -5
- package/lib/shallow/ReactServerUpdateQueue.js +3 -5
- package/lib/shallow/ReactShallowRenderer.js +3 -5
- package/lib/shallow/ReactSimpleEmptyComponent.js +5 -7
- package/lib/shallow/ReactSyntheticEventType.js +3 -5
- package/lib/shallow/ReactTestEmptyComponent.js +3 -5
- package/lib/shallow/ReactTestMount.js +8 -8
- package/lib/shallow/ReactTestReconcileTransaction.js +2 -4
- package/lib/shallow/ReactTestRenderer.js +4 -5
- package/lib/shallow/ReactTestTextComponent.js +3 -5
- package/lib/shallow/ReactTypeOfWork.js +3 -5
- package/lib/shallow/ReactTypes.js +3 -5
- package/lib/shallow/ReactUpdateQueue.js +4 -8
- package/lib/shallow/ReactUpdates.js +4 -6
- package/lib/shallow/ReactVersion.js +4 -6
- package/lib/shallow/ResponderEventPlugin.js +3 -7
- package/lib/shallow/ResponderSyntheticEvent.js +3 -5
- package/lib/shallow/ResponderTouchHistoryStore.js +3 -5
- package/lib/shallow/SVGDOMPropertyConfig.js +3 -5
- package/lib/shallow/SelectEventPlugin.js +3 -8
- package/lib/shallow/SimpleEventPlugin.js +3 -7
- package/lib/shallow/SyntheticAnimationEvent.js +3 -5
- package/lib/shallow/SyntheticClipboardEvent.js +3 -5
- package/lib/shallow/SyntheticCompositionEvent.js +3 -5
- package/lib/shallow/SyntheticDragEvent.js +3 -5
- package/lib/shallow/SyntheticEvent.js +34 -33
- package/lib/shallow/SyntheticFocusEvent.js +3 -5
- package/lib/shallow/SyntheticInputEvent.js +3 -5
- package/lib/shallow/SyntheticKeyboardEvent.js +3 -5
- package/lib/shallow/SyntheticMouseEvent.js +3 -5
- package/lib/shallow/SyntheticTouchEvent.js +3 -5
- package/lib/shallow/SyntheticTransitionEvent.js +3 -5
- package/lib/shallow/SyntheticUIEvent.js +3 -5
- package/lib/shallow/SyntheticWheelEvent.js +6 -11
- package/lib/shallow/TapEventPlugin.js +3 -7
- package/lib/shallow/Transaction.js +6 -5
- package/lib/shallow/ViewportMetrics.js +3 -7
- package/lib/shallow/accumulate.js +3 -5
- package/lib/shallow/accumulateInto.js +3 -5
- package/lib/shallow/adler32.js +3 -5
- package/lib/shallow/canDefineProperty.js +3 -5
- package/lib/shallow/checkReactTypeSpec.js +3 -5
- package/lib/shallow/createMicrosoftUnsafeLocalFunction.js +3 -5
- package/lib/shallow/dangerousStyleValue.js +5 -7
- package/lib/shallow/deprecated.js +6 -8
- package/lib/shallow/escapeTextContentForBrowser.js +3 -6
- package/lib/shallow/findDOMNode.js +3 -5
- package/lib/shallow/flattenChildren.js +3 -5
- package/lib/shallow/forEachAccumulated.js +3 -5
- package/lib/shallow/getEventCharCode.js +3 -5
- package/lib/shallow/getEventKey.js +27 -19
- package/lib/shallow/getEventModifierState.js +7 -9
- package/lib/shallow/getEventTarget.js +3 -5
- package/lib/shallow/getHostComponentFromComposite.js +3 -5
- package/lib/shallow/getIteratorFn.js +3 -5
- package/lib/shallow/getNodeForCharacterOffset.js +3 -5
- package/lib/shallow/getTextContentAccessor.js +3 -5
- package/lib/shallow/getVendorPrefixedEventName.js +3 -5
- package/lib/shallow/inputValueTracking.js +120 -0
- package/lib/shallow/instantiateReactComponent.js +4 -6
- package/lib/shallow/isEventSupported.js +3 -5
- package/lib/shallow/isTextInputElement.js +17 -19
- package/lib/shallow/lowPriorityWarning.js +62 -0
- package/lib/shallow/quoteAttributeValueForBrowser.js +3 -5
- package/lib/shallow/reactProdInvariant.js +2 -4
- package/lib/shallow/renderSubtreeIntoContainer.js +3 -5
- package/lib/shallow/setInnerHTML.js +4 -6
- package/lib/shallow/setTextContent.js +3 -5
- package/lib/shallow/shouldUpdateReactComponent.js +3 -5
- package/lib/shallow/traverseAllChildren.js +4 -6
- package/lib/shallow/validateDOMNesting.js +4 -12
- package/lib/shouldUpdateReactComponent.js +3 -5
- package/lib/traverseAllChildren.js +4 -6
- package/package.json +21 -17
- package/PATENTS +0 -33
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
3
|
-
* All rights reserved.
|
|
2
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
4
3
|
*
|
|
5
|
-
* This source code is licensed under the
|
|
6
|
-
* LICENSE file in the root directory of this source tree.
|
|
7
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
6
|
*
|
|
9
7
|
*/
|
|
10
8
|
|
|
@@ -18,15 +16,12 @@ var SyntheticMouseEvent = require('./SyntheticMouseEvent');
|
|
|
18
16
|
*/
|
|
19
17
|
var WheelEventInterface = {
|
|
20
18
|
deltaX: function (event) {
|
|
21
|
-
return 'deltaX' in event ? event.deltaX :
|
|
22
|
-
// Fallback to `wheelDeltaX` for Webkit and normalize (right is positive).
|
|
19
|
+
return 'deltaX' in event ? event.deltaX : // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive).
|
|
23
20
|
'wheelDeltaX' in event ? -event.wheelDeltaX : 0;
|
|
24
21
|
},
|
|
25
22
|
deltaY: function (event) {
|
|
26
|
-
return 'deltaY' in event ? event.deltaY :
|
|
27
|
-
// Fallback to `
|
|
28
|
-
'wheelDeltaY' in event ? -event.wheelDeltaY :
|
|
29
|
-
// Fallback to `wheelDelta` for IE<9 and normalize (down is positive).
|
|
23
|
+
return 'deltaY' in event ? event.deltaY : // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive).
|
|
24
|
+
'wheelDeltaY' in event ? -event.wheelDeltaY : // Fallback to `wheelDelta` for IE<9 and normalize (down is positive).
|
|
30
25
|
'wheelDelta' in event ? -event.wheelDelta : 0;
|
|
31
26
|
},
|
|
32
27
|
deltaZ: null,
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
3
|
-
* All rights reserved.
|
|
2
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
4
3
|
*
|
|
5
|
-
* This source code is licensed under the
|
|
6
|
-
* LICENSE file in the root directory of this source tree.
|
|
7
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
6
|
*
|
|
9
7
|
*
|
|
10
8
|
*/
|
|
@@ -74,7 +72,6 @@ var usedTouchTime = 0;
|
|
|
74
72
|
var TOUCH_DELAY = 1000;
|
|
75
73
|
|
|
76
74
|
var TapEventPlugin = {
|
|
77
|
-
|
|
78
75
|
tapMoveThreshold: tapMoveThreshold,
|
|
79
76
|
|
|
80
77
|
eventTypes: eventTypes,
|
|
@@ -109,7 +106,6 @@ var TapEventPlugin = {
|
|
|
109
106
|
EventPropagators.accumulateTwoPhaseDispatches(event);
|
|
110
107
|
return event;
|
|
111
108
|
}
|
|
112
|
-
|
|
113
109
|
};
|
|
114
110
|
|
|
115
111
|
module.exports = TapEventPlugin;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
3
|
-
* All rights reserved.
|
|
2
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
4
3
|
*
|
|
5
|
-
* This source code is licensed under the
|
|
6
|
-
* LICENSE file in the root directory of this source tree.
|
|
7
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
6
|
*
|
|
9
7
|
*
|
|
10
8
|
*/
|
|
@@ -108,6 +106,8 @@ var TransactionImpl = {
|
|
|
108
106
|
return !!this._isInTransaction;
|
|
109
107
|
},
|
|
110
108
|
|
|
109
|
+
/* eslint-disable space-before-function-paren */
|
|
110
|
+
|
|
111
111
|
/**
|
|
112
112
|
* Executes the function within a safety window. Use this for the top level
|
|
113
113
|
* methods that result in large amounts of computation/mutations that would
|
|
@@ -126,6 +126,7 @@ var TransactionImpl = {
|
|
|
126
126
|
* @return {*} Return value from `method`.
|
|
127
127
|
*/
|
|
128
128
|
perform: function (method, scope, a, b, c, d, e, f) {
|
|
129
|
+
/* eslint-enable space-before-function-paren */
|
|
129
130
|
!!this.isInTransaction() ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Transaction.perform(...): Cannot initialize a transaction when there is already an outstanding transaction.') : _prodInvariant('27') : void 0;
|
|
130
131
|
var errorThrown;
|
|
131
132
|
var ret;
|
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
3
|
-
* All rights reserved.
|
|
2
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
4
3
|
*
|
|
5
|
-
* This source code is licensed under the
|
|
6
|
-
* LICENSE file in the root directory of this source tree.
|
|
7
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
6
|
*
|
|
9
7
|
*/
|
|
10
8
|
|
|
11
9
|
'use strict';
|
|
12
10
|
|
|
13
11
|
var ViewportMetrics = {
|
|
14
|
-
|
|
15
12
|
currentScrollLeft: 0,
|
|
16
13
|
|
|
17
14
|
currentScrollTop: 0,
|
|
@@ -20,7 +17,6 @@ var ViewportMetrics = {
|
|
|
20
17
|
ViewportMetrics.currentScrollLeft = scrollPosition.x;
|
|
21
18
|
ViewportMetrics.currentScrollTop = scrollPosition.y;
|
|
22
19
|
}
|
|
23
|
-
|
|
24
20
|
};
|
|
25
21
|
|
|
26
22
|
module.exports = ViewportMetrics;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
3
|
-
* All rights reserved.
|
|
2
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
4
3
|
*
|
|
5
|
-
* This source code is licensed under the
|
|
6
|
-
* LICENSE file in the root directory of this source tree.
|
|
7
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
6
|
*
|
|
9
7
|
*
|
|
10
8
|
*/
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2014-present, Facebook, Inc.
|
|
3
|
-
* All rights reserved.
|
|
2
|
+
* Copyright (c) 2014-present, Facebook, Inc.
|
|
4
3
|
*
|
|
5
|
-
* This source code is licensed under the
|
|
6
|
-
* LICENSE file in the root directory of this source tree.
|
|
7
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
6
|
*
|
|
9
7
|
*
|
|
10
8
|
*/
|
package/lib/shallow/adler32.js
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
3
|
-
* All rights reserved.
|
|
2
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
4
3
|
*
|
|
5
|
-
* This source code is licensed under the
|
|
6
|
-
* LICENSE file in the root directory of this source tree.
|
|
7
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
6
|
*
|
|
9
7
|
*
|
|
10
8
|
*/
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
3
|
-
* All rights reserved.
|
|
2
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
4
3
|
*
|
|
5
|
-
* This source code is licensed under the
|
|
6
|
-
* LICENSE file in the root directory of this source tree.
|
|
7
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
6
|
*
|
|
9
7
|
*
|
|
10
8
|
*/
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
3
|
-
* All rights reserved.
|
|
2
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
4
3
|
*
|
|
5
|
-
* This source code is licensed under the
|
|
6
|
-
* LICENSE file in the root directory of this source tree.
|
|
7
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
6
|
*
|
|
9
7
|
*/
|
|
10
8
|
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
3
|
-
* All rights reserved.
|
|
2
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
4
3
|
*
|
|
5
|
-
* This source code is licensed under the
|
|
6
|
-
* LICENSE file in the root directory of this source tree.
|
|
7
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
6
|
*
|
|
9
7
|
*/
|
|
10
8
|
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
3
|
-
* All rights reserved.
|
|
2
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
4
3
|
*
|
|
5
|
-
* This source code is licensed under the
|
|
6
|
-
* LICENSE file in the root directory of this source tree.
|
|
7
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
6
|
*
|
|
9
7
|
*/
|
|
10
8
|
|
|
@@ -26,7 +24,7 @@ var styleWarnings = {};
|
|
|
26
24
|
* @param {ReactDOMComponent} component
|
|
27
25
|
* @return {string} Normalized style value with dimensions applied.
|
|
28
26
|
*/
|
|
29
|
-
function dangerousStyleValue(name, value, component) {
|
|
27
|
+
function dangerousStyleValue(name, value, component, isCustomProperty) {
|
|
30
28
|
// Note that we've removed escapeTextForBrowser() calls here since the
|
|
31
29
|
// whole string will be escaped when the attribute is injected into
|
|
32
30
|
// the markup. If you provide unsafe user data here they can inject
|
|
@@ -43,7 +41,7 @@ function dangerousStyleValue(name, value, component) {
|
|
|
43
41
|
}
|
|
44
42
|
|
|
45
43
|
var isNonNumeric = isNaN(value);
|
|
46
|
-
if (isNonNumeric || value === 0 || isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) {
|
|
44
|
+
if (isCustomProperty || isNonNumeric || value === 0 || isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) {
|
|
47
45
|
return '' + value; // cast to string
|
|
48
46
|
}
|
|
49
47
|
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
3
|
-
* All rights reserved.
|
|
2
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
4
3
|
*
|
|
5
|
-
* This source code is licensed under the
|
|
6
|
-
* LICENSE file in the root directory of this source tree.
|
|
7
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
6
|
*
|
|
9
7
|
*
|
|
10
8
|
*/
|
|
@@ -13,7 +11,7 @@
|
|
|
13
11
|
|
|
14
12
|
var _assign = require('object-assign');
|
|
15
13
|
|
|
16
|
-
var
|
|
14
|
+
var lowPriorityWarning = require('./lowPriorityWarning');
|
|
17
15
|
|
|
18
16
|
/**
|
|
19
17
|
* This will log a single deprecation notice per function and forward the call
|
|
@@ -30,12 +28,12 @@ function deprecated(fnName, newModule, newPackage, ctx, fn) {
|
|
|
30
28
|
var warned = false;
|
|
31
29
|
if (process.env.NODE_ENV !== 'production') {
|
|
32
30
|
var newFn = function () {
|
|
33
|
-
|
|
31
|
+
lowPriorityWarning(warned,
|
|
34
32
|
/* eslint-disable no-useless-concat */
|
|
35
33
|
// Require examples in this string must be split to prevent React's
|
|
36
34
|
// build tools from mistaking them for real requires.
|
|
37
35
|
// Otherwise the build tools will attempt to build a '%s' module.
|
|
38
|
-
'React.%s is deprecated. Please use %s.%s from require' +
|
|
36
|
+
'React.%s is deprecated. Please use %s.%s from require' + "('%s') " + 'instead.', fnName, newModule, fnName, newPackage);
|
|
39
37
|
/* eslint-enable no-useless-concat */
|
|
40
38
|
warned = true;
|
|
41
39
|
return fn.apply(ctx, arguments);
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2016-present, Facebook, Inc.
|
|
3
|
-
* All rights reserved.
|
|
2
|
+
* Copyright (c) 2016-present, Facebook, Inc.
|
|
4
3
|
*
|
|
5
|
-
* This source code is licensed under the
|
|
6
|
-
* LICENSE file in the root directory of this source tree.
|
|
7
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
6
|
*
|
|
9
7
|
* Based on the escape-html library, which is used under the MIT License below:
|
|
10
8
|
*
|
|
@@ -102,7 +100,6 @@ function escapeHtml(string) {
|
|
|
102
100
|
}
|
|
103
101
|
// end code copied and modified from escape-html
|
|
104
102
|
|
|
105
|
-
|
|
106
103
|
/**
|
|
107
104
|
* Escapes text to prevent scripting attacks.
|
|
108
105
|
*
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
3
|
-
* All rights reserved.
|
|
2
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
4
3
|
*
|
|
5
|
-
* This source code is licensed under the
|
|
6
|
-
* LICENSE file in the root directory of this source tree.
|
|
7
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
6
|
*
|
|
9
7
|
*/
|
|
10
8
|
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
3
|
-
* All rights reserved.
|
|
2
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
4
3
|
*
|
|
5
|
-
* This source code is licensed under the
|
|
6
|
-
* LICENSE file in the root directory of this source tree.
|
|
7
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
6
|
*
|
|
9
7
|
*
|
|
10
8
|
*/
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
3
|
-
* All rights reserved.
|
|
2
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
4
3
|
*
|
|
5
|
-
* This source code is licensed under the
|
|
6
|
-
* LICENSE file in the root directory of this source tree.
|
|
7
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
6
|
*
|
|
9
7
|
*
|
|
10
8
|
*/
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
3
|
-
* All rights reserved.
|
|
2
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
4
3
|
*
|
|
5
|
-
* This source code is licensed under the
|
|
6
|
-
* LICENSE file in the root directory of this source tree.
|
|
7
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
6
|
*
|
|
9
7
|
*/
|
|
10
8
|
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
3
|
-
* All rights reserved.
|
|
2
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
4
3
|
*
|
|
5
|
-
* This source code is licensed under the
|
|
6
|
-
* LICENSE file in the root directory of this source tree.
|
|
7
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
6
|
*
|
|
9
7
|
*/
|
|
10
8
|
|
|
@@ -17,18 +15,18 @@ var getEventCharCode = require('./getEventCharCode');
|
|
|
17
15
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
|
|
18
16
|
*/
|
|
19
17
|
var normalizeKey = {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
18
|
+
Esc: 'Escape',
|
|
19
|
+
Spacebar: ' ',
|
|
20
|
+
Left: 'ArrowLeft',
|
|
21
|
+
Up: 'ArrowUp',
|
|
22
|
+
Right: 'ArrowRight',
|
|
23
|
+
Down: 'ArrowDown',
|
|
24
|
+
Del: 'Delete',
|
|
25
|
+
Win: 'OS',
|
|
26
|
+
Menu: 'ContextMenu',
|
|
27
|
+
Apps: 'ContextMenu',
|
|
28
|
+
Scroll: 'ScrollLock',
|
|
29
|
+
MozPrintableKey: 'Unidentified'
|
|
32
30
|
};
|
|
33
31
|
|
|
34
32
|
/**
|
|
@@ -58,8 +56,18 @@ var translateToKey = {
|
|
|
58
56
|
40: 'ArrowDown',
|
|
59
57
|
45: 'Insert',
|
|
60
58
|
46: 'Delete',
|
|
61
|
-
112: 'F1',
|
|
62
|
-
|
|
59
|
+
112: 'F1',
|
|
60
|
+
113: 'F2',
|
|
61
|
+
114: 'F3',
|
|
62
|
+
115: 'F4',
|
|
63
|
+
116: 'F5',
|
|
64
|
+
117: 'F6',
|
|
65
|
+
118: 'F7',
|
|
66
|
+
119: 'F8',
|
|
67
|
+
120: 'F9',
|
|
68
|
+
121: 'F10',
|
|
69
|
+
122: 'F11',
|
|
70
|
+
123: 'F12',
|
|
63
71
|
144: 'NumLock',
|
|
64
72
|
145: 'ScrollLock',
|
|
65
73
|
224: 'Meta'
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
3
|
-
* All rights reserved.
|
|
2
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
4
3
|
*
|
|
5
|
-
* This source code is licensed under the
|
|
6
|
-
* LICENSE file in the root directory of this source tree.
|
|
7
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
6
|
*
|
|
9
7
|
*/
|
|
10
8
|
|
|
@@ -16,10 +14,10 @@
|
|
|
16
14
|
*/
|
|
17
15
|
|
|
18
16
|
var modifierKeyToProp = {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
Alt: 'altKey',
|
|
18
|
+
Control: 'ctrlKey',
|
|
19
|
+
Meta: 'metaKey',
|
|
20
|
+
Shift: 'shiftKey'
|
|
23
21
|
};
|
|
24
22
|
|
|
25
23
|
// IE8 does not implement getModifierState so we simply map it to the only
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
3
|
-
* All rights reserved.
|
|
2
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
4
3
|
*
|
|
5
|
-
* This source code is licensed under the
|
|
6
|
-
* LICENSE file in the root directory of this source tree.
|
|
7
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
6
|
*
|
|
9
7
|
*/
|
|
10
8
|
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
3
|
-
* All rights reserved.
|
|
2
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
4
3
|
*
|
|
5
|
-
* This source code is licensed under the
|
|
6
|
-
* LICENSE file in the root directory of this source tree.
|
|
7
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
6
|
*
|
|
9
7
|
*/
|
|
10
8
|
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
3
|
-
* All rights reserved.
|
|
2
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
4
3
|
*
|
|
5
|
-
* This source code is licensed under the
|
|
6
|
-
* LICENSE file in the root directory of this source tree.
|
|
7
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
6
|
*
|
|
9
7
|
*
|
|
10
8
|
*/
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
3
|
-
* All rights reserved.
|
|
2
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
4
3
|
*
|
|
5
|
-
* This source code is licensed under the
|
|
6
|
-
* LICENSE file in the root directory of this source tree.
|
|
7
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
6
|
*
|
|
9
7
|
*/
|
|
10
8
|
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
3
|
-
* All rights reserved.
|
|
2
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
4
3
|
*
|
|
5
|
-
* This source code is licensed under the
|
|
6
|
-
* LICENSE file in the root directory of this source tree.
|
|
7
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
6
|
*
|
|
9
7
|
*/
|
|
10
8
|
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
3
|
-
* All rights reserved.
|
|
2
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
4
3
|
*
|
|
5
|
-
* This source code is licensed under the
|
|
6
|
-
* LICENSE file in the root directory of this source tree.
|
|
7
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
6
|
*
|
|
9
7
|
*/
|
|
10
8
|
|