Completely updated React, fixed #11, (hopefully)
This commit is contained in:
1 parent
6e0afd6e2a
commit
34e5f5139a
13674 files changed
+333460
-473219
No files matched your search
+228
-125
@@ -1,20 +1,20 @@
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('redux')) :
|
||||
typeof define === 'function' && define.amd ? define(['exports', 'react', 'redux'], factory) :
|
||||
(factory((global.ReactRedux = global.ReactRedux || {}),global.React,global.Redux));
|
||||
(factory((global.ReactRedux = {}),global.React,global.Redux));
|
||||
}(this, (function (exports,react,redux) { 'use strict';
|
||||
|
||||
var commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
||||
|
||||
function createCommonjsModule(fn, module) {
|
||||
return module = { exports: {} }, fn(module, module.exports), module.exports;
|
||||
}
|
||||
|
||||
/**
|
||||
* Copyright (c) 2013-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
*
|
||||
*/
|
||||
@@ -47,11 +47,9 @@ var emptyFunction_1 = emptyFunction;
|
||||
|
||||
/**
|
||||
* Copyright (c) 2013-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -150,13 +148,100 @@ var warning = emptyFunction_1;
|
||||
|
||||
var warning_1 = warning;
|
||||
|
||||
/*
|
||||
object-assign
|
||||
(c) Sindre Sorhus
|
||||
@license MIT
|
||||
*/
|
||||
/* eslint-disable no-unused-vars */
|
||||
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
||||
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
||||
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
||||
|
||||
function toObject(val) {
|
||||
if (val === null || val === undefined) {
|
||||
throw new TypeError('Object.assign cannot be called with null or undefined');
|
||||
}
|
||||
|
||||
return Object(val);
|
||||
}
|
||||
|
||||
function shouldUseNative() {
|
||||
try {
|
||||
if (!Object.assign) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Detect buggy property enumeration order in older V8 versions.
|
||||
|
||||
// https://bugs.chromium.org/p/v8/issues/detail?id=4118
|
||||
var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
|
||||
test1[5] = 'de';
|
||||
if (Object.getOwnPropertyNames(test1)[0] === '5') {
|
||||
return false;
|
||||
}
|
||||
|
||||
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
||||
var test2 = {};
|
||||
for (var i = 0; i < 10; i++) {
|
||||
test2['_' + String.fromCharCode(i)] = i;
|
||||
}
|
||||
var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
|
||||
return test2[n];
|
||||
});
|
||||
if (order2.join('') !== '0123456789') {
|
||||
return false;
|
||||
}
|
||||
|
||||
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
||||
var test3 = {};
|
||||
'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
|
||||
test3[letter] = letter;
|
||||
});
|
||||
if (Object.keys(Object.assign({}, test3)).join('') !==
|
||||
'abcdefghijklmnopqrst') {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
} catch (err) {
|
||||
// We don't expect any of the above to throw, but better to be safe.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
var objectAssign = shouldUseNative() ? Object.assign : function (target, source) {
|
||||
var from;
|
||||
var to = toObject(target);
|
||||
var symbols;
|
||||
|
||||
for (var s = 1; s < arguments.length; s++) {
|
||||
from = Object(arguments[s]);
|
||||
|
||||
for (var key in from) {
|
||||
if (hasOwnProperty.call(from, key)) {
|
||||
to[key] = from[key];
|
||||
}
|
||||
}
|
||||
|
||||
if (getOwnPropertySymbols) {
|
||||
symbols = getOwnPropertySymbols(from);
|
||||
for (var i = 0; i < symbols.length; i++) {
|
||||
if (propIsEnumerable.call(from, symbols[i])) {
|
||||
to[symbols[i]] = from[symbols[i]];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return to;
|
||||
};
|
||||
|
||||
/**
|
||||
* Copyright 2013-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2013-present, Facebook, Inc.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
||||
@@ -192,7 +277,7 @@ function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
|
||||
try {
|
||||
// This is intentionally an invariant that gets caught. It's the same
|
||||
// behavior as without this statement except with a better message.
|
||||
invariant$1(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', componentName || 'React class', location, typeSpecName);
|
||||
invariant$1(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'the `prop-types` package, but received `%s`.', componentName || 'React class', location, typeSpecName, typeof typeSpecs[typeSpecName]);
|
||||
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret$1);
|
||||
} catch (ex) {
|
||||
error = ex;
|
||||
@@ -308,7 +393,8 @@ var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
|
||||
objectOf: createObjectOfTypeChecker,
|
||||
oneOf: createEnumTypeChecker,
|
||||
oneOfType: createUnionTypeChecker,
|
||||
shape: createShapeTypeChecker
|
||||
shape: createShapeTypeChecker,
|
||||
exact: createStrictShapeTypeChecker,
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -523,7 +609,7 @@ var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
|
||||
if (typeof checker !== 'function') {
|
||||
warning_1(
|
||||
false,
|
||||
'Invalid argument supplid to oneOfType. Expected an array of check functions, but ' +
|
||||
'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
|
||||
'received %s at index %s.',
|
||||
getPostfixForTypeWarning(checker),
|
||||
i
|
||||
@@ -577,6 +663,36 @@ var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
|
||||
return createChainableTypeChecker(validate);
|
||||
}
|
||||
|
||||
function createStrictShapeTypeChecker(shapeTypes) {
|
||||
function validate(props, propName, componentName, location, propFullName) {
|
||||
var propValue = props[propName];
|
||||
var propType = getPropType(propValue);
|
||||
if (propType !== 'object') {
|
||||
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
||||
}
|
||||
// We need to check all keys in case some are required but missing from
|
||||
// props.
|
||||
var allKeys = objectAssign({}, props[propName], shapeTypes);
|
||||
for (var key in allKeys) {
|
||||
var checker = shapeTypes[key];
|
||||
if (!checker) {
|
||||
return new PropTypeError(
|
||||
'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
|
||||
'\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
|
||||
'\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
|
||||
);
|
||||
}
|
||||
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1);
|
||||
if (error) {
|
||||
return error;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
return createChainableTypeChecker(validate);
|
||||
}
|
||||
|
||||
function isNode(propValue) {
|
||||
switch (typeof propValue) {
|
||||
case 'number':
|
||||
@@ -709,14 +825,12 @@ var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
|
||||
return ReactPropTypes;
|
||||
};
|
||||
|
||||
var index = createCommonjsModule(function (module) {
|
||||
var propTypes = createCommonjsModule(function (module) {
|
||||
/**
|
||||
* Copyright 2013-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2013-present, Facebook, Inc.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
{
|
||||
@@ -738,17 +852,17 @@ var index = createCommonjsModule(function (module) {
|
||||
}
|
||||
});
|
||||
|
||||
var subscriptionShape = index.shape({
|
||||
trySubscribe: index.func.isRequired,
|
||||
tryUnsubscribe: index.func.isRequired,
|
||||
notifyNestedSubs: index.func.isRequired,
|
||||
isSubscribed: index.func.isRequired
|
||||
var subscriptionShape = propTypes.shape({
|
||||
trySubscribe: propTypes.func.isRequired,
|
||||
tryUnsubscribe: propTypes.func.isRequired,
|
||||
notifyNestedSubs: propTypes.func.isRequired,
|
||||
isSubscribed: propTypes.func.isRequired
|
||||
});
|
||||
|
||||
var storeShape = index.shape({
|
||||
subscribe: index.func.isRequired,
|
||||
dispatch: index.func.isRequired,
|
||||
getState: index.func.isRequired
|
||||
var storeShape = propTypes.shape({
|
||||
subscribe: propTypes.func.isRequired,
|
||||
dispatch: propTypes.func.isRequired,
|
||||
getState: propTypes.func.isRequired
|
||||
});
|
||||
|
||||
/**
|
||||
@@ -779,14 +893,6 @@ var classCallCheck = function (instance, Constructor) {
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var _extends = Object.assign || function (target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i];
|
||||
@@ -801,8 +907,6 @@ var _extends = Object.assign || function (target) {
|
||||
return target;
|
||||
};
|
||||
|
||||
|
||||
|
||||
var inherits = function (subClass, superClass) {
|
||||
if (typeof superClass !== "function" && superClass !== null) {
|
||||
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
|
||||
@@ -819,14 +923,6 @@ var inherits = function (subClass, superClass) {
|
||||
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var objectWithoutProperties = function (obj, keys) {
|
||||
var target = {};
|
||||
|
||||
@@ -900,7 +996,7 @@ function createProvider() {
|
||||
|
||||
Provider.propTypes = {
|
||||
store: storeShape.isRequired,
|
||||
children: index.element.isRequired
|
||||
children: propTypes.element.isRequired
|
||||
};
|
||||
Provider.childContextTypes = (_Provider$childContex = {}, _Provider$childContex[storeKey] = storeShape.isRequired, _Provider$childContex[subscriptionKey] = subscriptionShape, _Provider$childContex);
|
||||
|
||||
@@ -909,70 +1005,77 @@ function createProvider() {
|
||||
|
||||
var Provider = createProvider();
|
||||
|
||||
var hoistNonReactStatics = createCommonjsModule(function (module, exports) {
|
||||
/**
|
||||
* Copyright 2015, Yahoo! Inc.
|
||||
* Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
|
||||
*/
|
||||
var REACT_STATICS = {
|
||||
childContextTypes: true,
|
||||
contextTypes: true,
|
||||
defaultProps: true,
|
||||
displayName: true,
|
||||
getDefaultProps: true,
|
||||
mixins: true,
|
||||
propTypes: true,
|
||||
type: true
|
||||
};
|
||||
|
||||
var KNOWN_STATICS = {
|
||||
name: true,
|
||||
length: true,
|
||||
prototype: true,
|
||||
caller: true,
|
||||
callee: true,
|
||||
arguments: true,
|
||||
arity: true
|
||||
};
|
||||
|
||||
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
||||
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
||||
var getPrototypeOf = Object.getPrototypeOf;
|
||||
var objectPrototype = getPrototypeOf && getPrototypeOf(Object);
|
||||
var getOwnPropertyNames = Object.getOwnPropertyNames;
|
||||
|
||||
var index$1 = function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
|
||||
if (typeof sourceComponent !== 'string') { // don't hoist over string (html) components
|
||||
|
||||
if (objectPrototype) {
|
||||
var inheritedComponent = getPrototypeOf(sourceComponent);
|
||||
if (inheritedComponent && inheritedComponent !== objectPrototype) {
|
||||
hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
|
||||
(function (global, factory) {
|
||||
module.exports = factory();
|
||||
}(commonjsGlobal, (function () {
|
||||
|
||||
var REACT_STATICS = {
|
||||
childContextTypes: true,
|
||||
contextTypes: true,
|
||||
defaultProps: true,
|
||||
displayName: true,
|
||||
getDefaultProps: true,
|
||||
getDerivedStateFromProps: true,
|
||||
mixins: true,
|
||||
propTypes: true,
|
||||
type: true
|
||||
};
|
||||
|
||||
var KNOWN_STATICS = {
|
||||
name: true,
|
||||
length: true,
|
||||
prototype: true,
|
||||
caller: true,
|
||||
callee: true,
|
||||
arguments: true,
|
||||
arity: true
|
||||
};
|
||||
|
||||
var defineProperty = Object.defineProperty;
|
||||
var getOwnPropertyNames = Object.getOwnPropertyNames;
|
||||
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
||||
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
||||
var getPrototypeOf = Object.getPrototypeOf;
|
||||
var objectPrototype = getPrototypeOf && getPrototypeOf(Object);
|
||||
|
||||
return function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
|
||||
if (typeof sourceComponent !== 'string') { // don't hoist over string (html) components
|
||||
|
||||
if (objectPrototype) {
|
||||
var inheritedComponent = getPrototypeOf(sourceComponent);
|
||||
if (inheritedComponent && inheritedComponent !== objectPrototype) {
|
||||
hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var keys = getOwnPropertyNames(sourceComponent);
|
||||
|
||||
if (getOwnPropertySymbols) {
|
||||
keys = keys.concat(getOwnPropertySymbols(sourceComponent));
|
||||
}
|
||||
|
||||
for (var i = 0; i < keys.length; ++i) {
|
||||
var key = keys[i];
|
||||
if (!REACT_STATICS[key] && !KNOWN_STATICS[key] && (!blacklist || !blacklist[key])) {
|
||||
// Only hoist enumerables and non-enumerable functions
|
||||
if(propIsEnumerable.call(sourceComponent, key) || typeof sourceComponent[key] === 'function') {
|
||||
|
||||
var keys = getOwnPropertyNames(sourceComponent);
|
||||
|
||||
if (getOwnPropertySymbols) {
|
||||
keys = keys.concat(getOwnPropertySymbols(sourceComponent));
|
||||
}
|
||||
|
||||
for (var i = 0; i < keys.length; ++i) {
|
||||
var key = keys[i];
|
||||
if (!REACT_STATICS[key] && !KNOWN_STATICS[key] && (!blacklist || !blacklist[key])) {
|
||||
var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
|
||||
try { // Avoid failures from read-only properties
|
||||
targetComponent[key] = sourceComponent[key];
|
||||
defineProperty(targetComponent, key, descriptor);
|
||||
} catch (e) {}
|
||||
}
|
||||
}
|
||||
|
||||
return targetComponent;
|
||||
}
|
||||
|
||||
|
||||
return targetComponent;
|
||||
}
|
||||
|
||||
return targetComponent;
|
||||
};
|
||||
};
|
||||
})));
|
||||
});
|
||||
|
||||
/**
|
||||
* Copyright 2013-2015, Facebook, Inc.
|
||||
@@ -1181,7 +1284,7 @@ selectorFactory) {
|
||||
var childContextTypes = (_childContextTypes = {}, _childContextTypes[subscriptionKey] = subscriptionShape, _childContextTypes);
|
||||
|
||||
return function wrapWithConnect(WrappedComponent) {
|
||||
invariant_1$2(typeof WrappedComponent == 'function', 'You must pass a component to the function returned by ' + ('connect. Instead received ' + JSON.stringify(WrappedComponent)));
|
||||
invariant_1$2(typeof WrappedComponent == 'function', 'You must pass a component to the function returned by ' + (methodName + '. Instead received ' + JSON.stringify(WrappedComponent)));
|
||||
|
||||
var wrappedComponentName = WrappedComponent.displayName || WrappedComponent.name || 'Component';
|
||||
|
||||
@@ -1384,7 +1487,7 @@ selectorFactory) {
|
||||
};
|
||||
}
|
||||
|
||||
return index$1(Connect, WrappedComponent);
|
||||
return hoistNonReactStatics(Connect, WrappedComponent);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1432,20 +1535,20 @@ var root = freeGlobal || freeSelf || Function('return this')();
|
||||
var Symbol$1 = root.Symbol;
|
||||
|
||||
/** Used for built-in method references. */
|
||||
var objectProto$1 = Object.prototype;
|
||||
var objectProto = Object.prototype;
|
||||
|
||||
/** Used to check objects for own properties. */
|
||||
var hasOwnProperty$2 = objectProto$1.hasOwnProperty;
|
||||
var hasOwnProperty$1 = objectProto.hasOwnProperty;
|
||||
|
||||
/**
|
||||
* Used to resolve the
|
||||
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
||||
* of values.
|
||||
*/
|
||||
var nativeObjectToString = objectProto$1.toString;
|
||||
var nativeObjectToString = objectProto.toString;
|
||||
|
||||
/** Built-in value references. */
|
||||
var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : undefined;
|
||||
var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : undefined;
|
||||
|
||||
/**
|
||||
* A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
|
||||
@@ -1455,34 +1558,34 @@ var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : undefined;
|
||||
* @returns {string} Returns the raw `toStringTag`.
|
||||
*/
|
||||
function getRawTag(value) {
|
||||
var isOwn = hasOwnProperty$2.call(value, symToStringTag$1),
|
||||
tag = value[symToStringTag$1];
|
||||
var isOwn = hasOwnProperty$1.call(value, symToStringTag),
|
||||
tag = value[symToStringTag];
|
||||
|
||||
try {
|
||||
value[symToStringTag$1] = undefined;
|
||||
value[symToStringTag] = undefined;
|
||||
var unmasked = true;
|
||||
} catch (e) {}
|
||||
|
||||
var result = nativeObjectToString.call(value);
|
||||
if (unmasked) {
|
||||
if (isOwn) {
|
||||
value[symToStringTag$1] = tag;
|
||||
value[symToStringTag] = tag;
|
||||
} else {
|
||||
delete value[symToStringTag$1];
|
||||
delete value[symToStringTag];
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/** Used for built-in method references. */
|
||||
var objectProto$2 = Object.prototype;
|
||||
var objectProto$1 = Object.prototype;
|
||||
|
||||
/**
|
||||
* Used to resolve the
|
||||
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
||||
* of values.
|
||||
*/
|
||||
var nativeObjectToString$1 = objectProto$2.toString;
|
||||
var nativeObjectToString$1 = objectProto$1.toString;
|
||||
|
||||
/**
|
||||
* Converts `value` to a string using `Object.prototype.toString`.
|
||||
@@ -1496,11 +1599,11 @@ function objectToString(value) {
|
||||
}
|
||||
|
||||
/** `Object#toString` result references. */
|
||||
var nullTag = '[object Null]';
|
||||
var undefinedTag = '[object Undefined]';
|
||||
var nullTag = '[object Null]',
|
||||
undefinedTag = '[object Undefined]';
|
||||
|
||||
/** Built-in value references. */
|
||||
var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : undefined;
|
||||
var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : undefined;
|
||||
|
||||
/**
|
||||
* The base implementation of `getTag` without fallbacks for buggy environments.
|
||||
@@ -1513,7 +1616,7 @@ function baseGetTag(value) {
|
||||
if (value == null) {
|
||||
return value === undefined ? undefinedTag : nullTag;
|
||||
}
|
||||
return (symToStringTag && symToStringTag in Object(value))
|
||||
return (symToStringTag$1 && symToStringTag$1 in Object(value))
|
||||
? getRawTag(value)
|
||||
: objectToString(value);
|
||||
}
|
||||
@@ -1567,14 +1670,14 @@ function isObjectLike(value) {
|
||||
var objectTag = '[object Object]';
|
||||
|
||||
/** Used for built-in method references. */
|
||||
var funcProto = Function.prototype;
|
||||
var objectProto = Object.prototype;
|
||||
var funcProto = Function.prototype,
|
||||
objectProto$2 = Object.prototype;
|
||||
|
||||
/** Used to resolve the decompiled source of functions. */
|
||||
var funcToString = funcProto.toString;
|
||||
|
||||
/** Used to check objects for own properties. */
|
||||
var hasOwnProperty$1 = objectProto.hasOwnProperty;
|
||||
var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
|
||||
|
||||
/** Used to infer the `Object` constructor. */
|
||||
var objectCtorString = funcToString.call(Object);
|
||||
@@ -1615,7 +1718,7 @@ function isPlainObject(value) {
|
||||
if (proto === null) {
|
||||
return true;
|
||||
}
|
||||
var Ctor = hasOwnProperty$1.call(proto, 'constructor') && proto.constructor;
|
||||
var Ctor = hasOwnProperty$2.call(proto, 'constructor') && proto.constructor;
|
||||
return typeof Ctor == 'function' && Ctor instanceof Ctor &&
|
||||
funcToString.call(Ctor) == objectCtorString;
|
||||
}
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react"),require("redux")):"function"==typeof define&&define.amd?define(["exports","react","redux"],e):e(t.ReactRedux=t.ReactRedux||{},t.React,t.Redux)}(this,function(t,e,n){"use strict";function r(t){return function(){return t}}function o(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"store",r=arguments[1]||n+"Subscription",o=function(t){function o(e,r){q(this,o);var i=D(this,t.call(this,e,r));return i[n]=e.store,i}return M(o,t),o.prototype.getChildContext=function(){var t;return t={},t[n]=this[n],t[r]=null,t},o.prototype.render=function(){return e.Children.only(this.props.children)},o}(e.Component);return o.propTypes={store:j.isRequired,children:R.element.isRequired},o.childContextTypes=(t={},t[n]=j.isRequired,t[r]=x,t),o}function i(){var t=[],e=[];return{clear:function(){e=Y,t=Y},notify:function(){for(var n=t=e,r=0;n.length>r;r++)n[r]()},get:function(){return e},subscribe:function(n){var r=!0;return e===t&&(e=t.slice()),e.push(n),function(){r&&t!==Y&&(r=!1,e===t&&(e=t.slice()),e.splice(e.indexOf(n),1))}}}}function s(){}function u(t,e){var n={run:function(r){try{var o=t(e.getState(),r);(o!==n.props||n.error)&&(n.shouldComponentUpdate=!0,n.props=o,n.error=null)}catch(t){n.shouldComponentUpdate=!0,n.error=t}}};return n}function p(t){var n,r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=o.getDisplayName,p=void 0===i?function(t){return"ConnectAdvanced("+t+")"}:i,a=o.methodName,c=void 0===a?"connectAdvanced":a,d=o.renderCountProp,f=void 0===d?void 0:d,l=o.shouldHandleStateChanges,h=void 0===l||l,y=o.storeKey,b=void 0===y?"store":y,v=o.withRef,m=void 0!==v&&v,P=U(o,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef"]),O=b+"Subscription",g=z++,S=(n={},n[b]=j,n[O]=x,n),C=(r={},r[O]=x,r);return function(n){V("function"==typeof n,"You must pass a component to the function returned by connect. Instead received "+JSON.stringify(n));var r=n.displayName||n.name||"Component",o=p(r),i=N({},P,{getDisplayName:p,methodName:c,renderCountProp:f,shouldHandleStateChanges:h,storeKey:b,withRef:m,displayName:o,wrappedComponentName:r,WrappedComponent:n}),a=function(r){function p(t,e){q(this,p);var n=D(this,r.call(this,t,e));return n.version=g,n.state={},n.renderCount=0,n.store=t[b]||e[b],n.propsMode=!!t[b],n.setWrappedInstance=n.setWrappedInstance.bind(n),V(n.store,'Could not find "'+b+'" in either the context or props of "'+o+'". Either wrap the root component in a <Provider>, or explicitly pass "'+b+'" as a prop to "'+o+'".'),n.initSelector(),n.initSubscription(),n}return M(p,r),p.prototype.getChildContext=function(){var t,e=this.propsMode?null:this.subscription;return t={},t[O]=e||this.context[O],t},p.prototype.componentDidMount=function(){h&&(this.subscription.trySubscribe(),this.selector.run(this.props),this.selector.shouldComponentUpdate&&this.forceUpdate())},p.prototype.componentWillReceiveProps=function(t){this.selector.run(t)},p.prototype.shouldComponentUpdate=function(){return this.selector.shouldComponentUpdate},p.prototype.componentWillUnmount=function(){this.subscription&&this.subscription.tryUnsubscribe(),this.subscription=null,this.notifyNestedSubs=s,this.store=null,this.selector.run=s,this.selector.shouldComponentUpdate=!1},p.prototype.getWrappedInstance=function(){return V(m,"To access the wrapped instance, you need to specify { withRef: true } in the options argument of the "+c+"() call."),this.wrappedInstance},p.prototype.setWrappedInstance=function(t){this.wrappedInstance=t},p.prototype.initSelector=function(){var e=t(this.store.dispatch,i);(this.selector=u(e,this.store)).run(this.props)},p.prototype.initSubscription=function(){if(h){var t=(this.propsMode?this.props:this.context)[O];this.subscription=new J(this.store,t,this.onStateChange.bind(this)),this.notifyNestedSubs=this.subscription.notifyNestedSubs.bind(this.subscription)}},p.prototype.onStateChange=function(){this.selector.run(this.props),this.selector.shouldComponentUpdate?(this.componentDidUpdate=this.notifyNestedSubsOnComponentDidUpdate,this.setState(G)):this.notifyNestedSubs()},p.prototype.notifyNestedSubsOnComponentDidUpdate=function(){this.componentDidUpdate=void 0,this.notifyNestedSubs()},p.prototype.isSubscribed=function(){return!!this.subscription&&this.subscription.isSubscribed()},p.prototype.addExtraProps=function(t){if(!(m||f||this.propsMode&&this.subscription))return t;var e=N({},t);return m&&(e.ref=this.setWrappedInstance),f&&(e[f]=this.renderCount++),this.propsMode&&this.subscription&&(e[O]=this.subscription),e},p.prototype.render=function(){var t=this.selector;if(t.shouldComponentUpdate=!1,t.error)throw t.error;return e.createElement(n,this.addExtraProps(t.props))},p}(e.Component);return a.WrappedComponent=n,a.displayName=o,a.childContextTypes=C,a.contextTypes=S,a.propTypes=S,L(a,n)}}function a(t,e){return t===e?0!==t||0!==e||1/t==1/e:t!==t&&e!==e}function c(t,e){if(a(t,e))rLine truncated
|
||||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react"),require("redux")):"function"==typeof define&&define.amd?define(["exports","react","redux"],e):e(t.ReactRedux={},t.React,t.Redux)}(this,function(t,e,n){"use strict";"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function r(t,e){return t(e={exports:{}},e.exports),e.exports}function o(t){return function(){return t}}var i=function(){};i.thatReturns=o,i.thatReturnsFalse=o(!1),i.thatReturnsTrue=o(!0),i.thatReturnsNull=o(null),i.thatReturnsThis=function(){return this},i.thatReturnsArgument=function(t){return t};var s=i;var u=function(t,e,n,r,o,i,s,u){if(!t){var p;if(void 0===e)p=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var a=[n,r,o,i,s,u],c=0;(p=Error(e.replace(/%s/g,function(){return a[c++]}))).name="Invariant Violation"}throw p.framesToPop=1,p}},p="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",a=r(function(t){t.exports=function(){function t(t,e,n,r,o,i){i!==p&&u(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e};return n.checkPropTypes=s,n.PropTypes=n,n}()}),c=a.shape({trySubscribe:a.func.isRequired,tryUnsubscribe:a.func.isRequired,notifyNestedSubs:a.func.isRequired,isSubscribed:a.func.isRequired}),d=a.shape({subscribe:a.func.isRequired,dispatch:a.func.isRequired,getState:a.func.isRequired}),f=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},l=Object.assign||function(t){for(var e=1;arguments.length>e;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},h=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)},y=function(t,e){var n={};for(var r in t)0>e.indexOf(r)&&Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n},b=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e};function v(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"store",r=arguments[1]||n+"Subscription",o=function(t){function o(e,r){f(this,o);var i=b(this,t.call(this,e,r));return i[n]=e.store,i}return h(o,t),o.prototype.getChildContext=function(){var t;return(t={})[n]=this[n],t[r]=null,t},o.prototype.render=function(){return e.Children.only(this.props.children)},o}(e.Component);return o.propTypes={store:d.isRequired,children:a.element.isRequired},o.childContextTypes=((t={})[n]=d.isRequired,t[r]=c,t),o}var m=v(),P=r(function(t,e){var n,r,o,i,s,u,p,a;t.exports=(n={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},r={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o=Object.defineProperty,i=Object.getOwnPropertyNames,s=Object.getOwnPropertySymbols,u=Object.getOwnPropertyDescriptor,a=(p=Object.getPrototypeOf)&&p(Object),function t(e,c,d){if("string"!=typeof c){if(a){var f=p(c);f&&f!==a&&t(e,f,d)}var l=i(c);s&&(l=l.concat(s(c)));for(var h=0;l.length>h;++h){var y=l[h];if(!(n[y]||r[y]||d&&d[y])){var b=u(c,y);try{o(e,y,b)}catch(t){}}}return e}return e})}),g=function(t,e,n,r,o,i,s,u){if(!t){var p;if(void 0===e)p=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var a=[n,r,o,i,s,u],c=0;(p=Error(e.replace(/%s/g,function(){return a[c++]}))).name="Invariant Violation"}throw p.framesToPop=1,p}},O=null,S={notify:function(){}};var w=function(){function t(e,n,r){f(this,t),this.store=e,this.parentSub=n,this.onStateChange=r,this.unsubscribe=null,this.listeners=S}return t.prototype.addNestedSub=function(t){return this.trySubscribe(),this.listeners.subscribe(t)},t.prototype.notifyNestedSubs=function(){this.listeners.notify()},t.prototype.isSubscribed=function(){return!!this.unsubscribe},t.prototype.trySubscribe=function(){var t,e;this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.onStateChange):this.store.subscribe(this.onStateChange),this.listeners=(t=[],e=[],{clear:function(){e=O,t=O},notify:function(){for(var n=t=e,r=0;n.length>r;r++)n[r]()},get:function(){return e},subscribe:function(n){var r=!0;return e===t&&(e=t.slice()),e.push(n),function(){r&&t!==O&&(r=!1,e===t&&(e=t.slice())Line truncated
|
||||
Reference in new issue
Block a user