react 15.4.2 → 15.5.0-rc.1
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/dist/react-with-addons.js +737 -518
- package/dist/react-with-addons.min.js +2 -3
- package/dist/react.js +702 -483
- package/dist/react.min.js +2 -2
- package/lib/PropTypesCheckPropTypes.js +61 -0
- package/lib/PropTypesFactory.js +484 -0
- package/lib/React.js +15 -0
- package/lib/ReactClass.js +7 -1
- package/lib/ReactCreateClass.js +712 -0
- package/lib/ReactElementValidator.js +20 -1
- package/lib/ReactPropTypes.js +4 -419
- package/lib/ReactUMDEntry.js +2 -1
- package/lib/ReactVersion.js +1 -1
- package/lib/ReactWithAddonsUMDEntry.js +2 -1
- package/lib/getNextDebugIDUMDShim.js +17 -0
- package/package.json +4 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* React (with addons) v15.
|
|
2
|
+
* React (with addons) v15.5.0-rc.1
|
|
3
3
|
*/
|
|
4
4
|
(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){
|
|
5
5
|
/**
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
'use strict';
|
|
16
16
|
|
|
17
|
-
var ExecutionEnvironment = _dereq_(
|
|
17
|
+
var ExecutionEnvironment = _dereq_(44);
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* Generate a mapping of standard vendor prefixes using the defined style property and event name.
|
|
@@ -102,7 +102,7 @@ function getVendorPrefixedEventName(eventName) {
|
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
module.exports = getVendorPrefixedEventName;
|
|
105
|
-
},{"
|
|
105
|
+
},{"44":44}],2:[function(_dereq_,module,exports){
|
|
106
106
|
/**
|
|
107
107
|
* Copyright 2013-present, Facebook, Inc.
|
|
108
108
|
* All rights reserved.
|
|
@@ -210,9 +210,9 @@ module.exports = LinkedStateMixin;
|
|
|
210
210
|
|
|
211
211
|
'use strict';
|
|
212
212
|
|
|
213
|
-
var _prodInvariant = _dereq_(
|
|
213
|
+
var _prodInvariant = _dereq_(39);
|
|
214
214
|
|
|
215
|
-
var invariant = _dereq_(
|
|
215
|
+
var invariant = _dereq_(47);
|
|
216
216
|
|
|
217
217
|
/**
|
|
218
218
|
* Static poolers. Several custom versions for each potential number of
|
|
@@ -308,7 +308,7 @@ var PooledClass = {
|
|
|
308
308
|
};
|
|
309
309
|
|
|
310
310
|
module.exports = PooledClass;
|
|
311
|
-
},{"
|
|
311
|
+
},{"39":39,"47":47}],5:[function(_dereq_,module,exports){
|
|
312
312
|
/**
|
|
313
313
|
* Copyright 2013-present, Facebook, Inc.
|
|
314
314
|
* All rights reserved.
|
|
@@ -321,7 +321,7 @@ module.exports = PooledClass;
|
|
|
321
321
|
|
|
322
322
|
'use strict';
|
|
323
323
|
|
|
324
|
-
var _assign = _dereq_(
|
|
324
|
+
var _assign = _dereq_(50);
|
|
325
325
|
|
|
326
326
|
var ReactChildren = _dereq_(9);
|
|
327
327
|
var ReactComponent = _dereq_(11);
|
|
@@ -332,15 +332,17 @@ var ReactElement = _dereq_(16);
|
|
|
332
332
|
var ReactPropTypes = _dereq_(23);
|
|
333
333
|
var ReactVersion = _dereq_(30);
|
|
334
334
|
|
|
335
|
-
var onlyChild = _dereq_(
|
|
336
|
-
var warning = _dereq_(
|
|
335
|
+
var onlyChild = _dereq_(38);
|
|
336
|
+
var warning = _dereq_(49);
|
|
337
337
|
|
|
338
338
|
var createElement = ReactElement.createElement;
|
|
339
339
|
var createFactory = ReactElement.createFactory;
|
|
340
340
|
var cloneElement = ReactElement.cloneElement;
|
|
341
341
|
|
|
342
342
|
if ("development" !== 'production') {
|
|
343
|
+
var canDefineProperty = _dereq_(33);
|
|
343
344
|
var ReactElementValidator = _dereq_(18);
|
|
345
|
+
var didWarnPropTypesDeprecated = false;
|
|
344
346
|
createElement = ReactElementValidator.createElement;
|
|
345
347
|
createFactory = ReactElementValidator.createFactory;
|
|
346
348
|
cloneElement = ReactElementValidator.cloneElement;
|
|
@@ -396,8 +398,21 @@ var React = {
|
|
|
396
398
|
__spread: __spread
|
|
397
399
|
};
|
|
398
400
|
|
|
401
|
+
// TODO: Fix tests so that this deprecation warning doesn't cause failures.
|
|
402
|
+
if ("development" !== 'production') {
|
|
403
|
+
if (canDefineProperty) {
|
|
404
|
+
Object.defineProperty(React, 'PropTypes', {
|
|
405
|
+
get: function () {
|
|
406
|
+
"development" !== 'production' ? warning(didWarnPropTypesDeprecated, 'Accessing PropTypes via the main React package is deprecated. Use ' + 'the prop-types package from npm instead.') : void 0;
|
|
407
|
+
didWarnPropTypesDeprecated = true;
|
|
408
|
+
return ReactPropTypes;
|
|
409
|
+
}
|
|
410
|
+
});
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
|
|
399
414
|
module.exports = React;
|
|
400
|
-
},{"10":10,"11":11,"15":15,"16":16,"18":18,"23":23,"25":25,"30":30,"
|
|
415
|
+
},{"10":10,"11":11,"15":15,"16":16,"18":18,"23":23,"25":25,"30":30,"33":33,"38":38,"49":49,"50":50,"9":9}],6:[function(_dereq_,module,exports){
|
|
401
416
|
/**
|
|
402
417
|
* Copyright 2013-present, Facebook, Inc.
|
|
403
418
|
* All rights reserved.
|
|
@@ -446,7 +461,7 @@ if ("development" !== 'production') {
|
|
|
446
461
|
|
|
447
462
|
'use strict';
|
|
448
463
|
|
|
449
|
-
var _assign = _dereq_(
|
|
464
|
+
var _assign = _dereq_(50);
|
|
450
465
|
|
|
451
466
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
452
467
|
|
|
@@ -538,7 +553,7 @@ ReactCSSTransitionGroup.defaultProps = {
|
|
|
538
553
|
|
|
539
554
|
|
|
540
555
|
module.exports = ReactCSSTransitionGroup;
|
|
541
|
-
},{"29":29,"
|
|
556
|
+
},{"29":29,"5":5,"50":50,"8":8}],8:[function(_dereq_,module,exports){
|
|
542
557
|
/**
|
|
543
558
|
* Copyright 2013-present, Facebook, Inc.
|
|
544
559
|
* All rights reserved.
|
|
@@ -554,10 +569,10 @@ module.exports = ReactCSSTransitionGroup;
|
|
|
554
569
|
var React = _dereq_(5);
|
|
555
570
|
var ReactAddonsDOMDependencies = _dereq_(6);
|
|
556
571
|
|
|
557
|
-
var CSSCore = _dereq_(
|
|
572
|
+
var CSSCore = _dereq_(43);
|
|
558
573
|
var ReactTransitionEvents = _dereq_(28);
|
|
559
574
|
|
|
560
|
-
var onlyChild = _dereq_(
|
|
575
|
+
var onlyChild = _dereq_(38);
|
|
561
576
|
|
|
562
577
|
var TICK = 17;
|
|
563
578
|
|
|
@@ -705,7 +720,7 @@ var ReactCSSTransitionGroupChild = React.createClass({
|
|
|
705
720
|
});
|
|
706
721
|
|
|
707
722
|
module.exports = ReactCSSTransitionGroupChild;
|
|
708
|
-
},{"28":28,"
|
|
723
|
+
},{"28":28,"38":38,"43":43,"5":5,"6":6}],9:[function(_dereq_,module,exports){
|
|
709
724
|
/**
|
|
710
725
|
* Copyright 2013-present, Facebook, Inc.
|
|
711
726
|
* All rights reserved.
|
|
@@ -721,8 +736,8 @@ module.exports = ReactCSSTransitionGroupChild;
|
|
|
721
736
|
var PooledClass = _dereq_(4);
|
|
722
737
|
var ReactElement = _dereq_(16);
|
|
723
738
|
|
|
724
|
-
var emptyFunction = _dereq_(
|
|
725
|
-
var traverseAllChildren = _dereq_(
|
|
739
|
+
var emptyFunction = _dereq_(45);
|
|
740
|
+
var traverseAllChildren = _dereq_(41);
|
|
726
741
|
|
|
727
742
|
var twoArgumentPooler = PooledClass.twoArgumentPooler;
|
|
728
743
|
var fourArgumentPooler = PooledClass.fourArgumentPooler;
|
|
@@ -896,7 +911,7 @@ var ReactChildren = {
|
|
|
896
911
|
};
|
|
897
912
|
|
|
898
913
|
module.exports = ReactChildren;
|
|
899
|
-
},{"16":16,"4":4,"
|
|
914
|
+
},{"16":16,"4":4,"41":41,"45":45}],10:[function(_dereq_,module,exports){
|
|
900
915
|
/**
|
|
901
916
|
* Copyright 2013-present, Facebook, Inc.
|
|
902
917
|
* All rights reserved.
|
|
@@ -909,17 +924,17 @@ module.exports = ReactChildren;
|
|
|
909
924
|
|
|
910
925
|
'use strict';
|
|
911
926
|
|
|
912
|
-
var _prodInvariant = _dereq_(
|
|
913
|
-
_assign = _dereq_(
|
|
927
|
+
var _prodInvariant = _dereq_(39),
|
|
928
|
+
_assign = _dereq_(50);
|
|
914
929
|
|
|
915
930
|
var ReactComponent = _dereq_(11);
|
|
916
931
|
var ReactElement = _dereq_(16);
|
|
917
932
|
var ReactPropTypeLocationNames = _dereq_(22);
|
|
918
933
|
var ReactNoopUpdateQueue = _dereq_(21);
|
|
919
934
|
|
|
920
|
-
var emptyObject = _dereq_(
|
|
921
|
-
var invariant = _dereq_(
|
|
922
|
-
var warning = _dereq_(
|
|
935
|
+
var emptyObject = _dereq_(46);
|
|
936
|
+
var invariant = _dereq_(47);
|
|
937
|
+
var warning = _dereq_(49);
|
|
923
938
|
|
|
924
939
|
var MIXINS_KEY = 'mixins';
|
|
925
940
|
|
|
@@ -1050,7 +1065,6 @@ var ReactClassInterface = {
|
|
|
1050
1065
|
* }
|
|
1051
1066
|
*
|
|
1052
1067
|
* @return {ReactComponent}
|
|
1053
|
-
* @nosideeffects
|
|
1054
1068
|
* @required
|
|
1055
1069
|
*/
|
|
1056
1070
|
render: 'DEFINE_ONCE',
|
|
@@ -1506,6 +1520,8 @@ var ReactClassMixin = {
|
|
|
1506
1520
|
var ReactClassComponent = function () {};
|
|
1507
1521
|
_assign(ReactClassComponent.prototype, ReactComponent.prototype, ReactClassMixin);
|
|
1508
1522
|
|
|
1523
|
+
var didWarnDeprecated = false;
|
|
1524
|
+
|
|
1509
1525
|
/**
|
|
1510
1526
|
* Module for creating composite components.
|
|
1511
1527
|
*
|
|
@@ -1522,6 +1538,11 @@ var ReactClass = {
|
|
|
1522
1538
|
* @public
|
|
1523
1539
|
*/
|
|
1524
1540
|
createClass: function (spec) {
|
|
1541
|
+
if ("development" !== 'production') {
|
|
1542
|
+
"development" !== 'production' ? warning(didWarnDeprecated, '%s: React.createClass is deprecated and will be removed in version 16. ' + 'Use plain JavaScript classes instead. If you\'re not yet ready to ' + 'migrate, create-react-class is available on npm as a ' + 'drop-in replacement.', spec && spec.displayName || 'A Component') : void 0;
|
|
1543
|
+
didWarnDeprecated = true;
|
|
1544
|
+
}
|
|
1545
|
+
|
|
1525
1546
|
// To keep our warnings more understandable, we'll use a little hack here to
|
|
1526
1547
|
// ensure that Constructor.name !== 'Constructor'. This makes sure we don't
|
|
1527
1548
|
// unnecessarily identify a class without displayName as 'Constructor'.
|
|
@@ -1613,7 +1634,7 @@ var ReactClass = {
|
|
|
1613
1634
|
};
|
|
1614
1635
|
|
|
1615
1636
|
module.exports = ReactClass;
|
|
1616
|
-
},{"11":11,"16":16,"21":21,"22":22,"
|
|
1637
|
+
},{"11":11,"16":16,"21":21,"22":22,"39":39,"46":46,"47":47,"49":49,"50":50}],11:[function(_dereq_,module,exports){
|
|
1617
1638
|
/**
|
|
1618
1639
|
* Copyright 2013-present, Facebook, Inc.
|
|
1619
1640
|
* All rights reserved.
|
|
@@ -1626,14 +1647,14 @@ module.exports = ReactClass;
|
|
|
1626
1647
|
|
|
1627
1648
|
'use strict';
|
|
1628
1649
|
|
|
1629
|
-
var _prodInvariant = _dereq_(
|
|
1650
|
+
var _prodInvariant = _dereq_(39);
|
|
1630
1651
|
|
|
1631
1652
|
var ReactNoopUpdateQueue = _dereq_(21);
|
|
1632
1653
|
|
|
1633
1654
|
var canDefineProperty = _dereq_(33);
|
|
1634
|
-
var emptyObject = _dereq_(
|
|
1635
|
-
var invariant = _dereq_(
|
|
1636
|
-
var warning = _dereq_(
|
|
1655
|
+
var emptyObject = _dereq_(46);
|
|
1656
|
+
var invariant = _dereq_(47);
|
|
1657
|
+
var warning = _dereq_(49);
|
|
1637
1658
|
|
|
1638
1659
|
/**
|
|
1639
1660
|
* Base class helpers for the updating state of a component.
|
|
@@ -1731,7 +1752,7 @@ if ("development" !== 'production') {
|
|
|
1731
1752
|
}
|
|
1732
1753
|
|
|
1733
1754
|
module.exports = ReactComponent;
|
|
1734
|
-
},{"21":21,"33":33,"
|
|
1755
|
+
},{"21":21,"33":33,"39":39,"46":46,"47":47,"49":49}],12:[function(_dereq_,module,exports){
|
|
1735
1756
|
/**
|
|
1736
1757
|
* Copyright 2016-present, Facebook, Inc.
|
|
1737
1758
|
* All rights reserved.
|
|
@@ -1745,12 +1766,12 @@ module.exports = ReactComponent;
|
|
|
1745
1766
|
|
|
1746
1767
|
'use strict';
|
|
1747
1768
|
|
|
1748
|
-
var _prodInvariant = _dereq_(
|
|
1769
|
+
var _prodInvariant = _dereq_(39);
|
|
1749
1770
|
|
|
1750
1771
|
var ReactCurrentOwner = _dereq_(14);
|
|
1751
1772
|
|
|
1752
|
-
var invariant = _dereq_(
|
|
1753
|
-
var warning = _dereq_(
|
|
1773
|
+
var invariant = _dereq_(47);
|
|
1774
|
+
var warning = _dereq_(49);
|
|
1754
1775
|
|
|
1755
1776
|
function isNative(fn) {
|
|
1756
1777
|
// Based on isNative() from Lodash
|
|
@@ -2065,7 +2086,7 @@ var ReactComponentTreeHook = {
|
|
|
2065
2086
|
};
|
|
2066
2087
|
|
|
2067
2088
|
module.exports = ReactComponentTreeHook;
|
|
2068
|
-
},{"14":14,"
|
|
2089
|
+
},{"14":14,"39":39,"47":47,"49":49}],13:[function(_dereq_,module,exports){
|
|
2069
2090
|
/**
|
|
2070
2091
|
* Copyright 2013-present, Facebook, Inc.
|
|
2071
2092
|
* All rights reserved.
|
|
@@ -2078,7 +2099,7 @@ module.exports = ReactComponentTreeHook;
|
|
|
2078
2099
|
|
|
2079
2100
|
'use strict';
|
|
2080
2101
|
|
|
2081
|
-
var shallowCompare = _dereq_(
|
|
2102
|
+
var shallowCompare = _dereq_(40);
|
|
2082
2103
|
|
|
2083
2104
|
/**
|
|
2084
2105
|
* If your React component's render function is "pure", e.g. it will render the
|
|
@@ -2113,7 +2134,7 @@ var ReactComponentWithPureRenderMixin = {
|
|
|
2113
2134
|
};
|
|
2114
2135
|
|
|
2115
2136
|
module.exports = ReactComponentWithPureRenderMixin;
|
|
2116
|
-
},{"
|
|
2137
|
+
},{"40":40}],14:[function(_dereq_,module,exports){
|
|
2117
2138
|
/**
|
|
2118
2139
|
* Copyright 2013-present, Facebook, Inc.
|
|
2119
2140
|
* All rights reserved.
|
|
@@ -2327,11 +2348,11 @@ module.exports = ReactDOMFactories;
|
|
|
2327
2348
|
|
|
2328
2349
|
'use strict';
|
|
2329
2350
|
|
|
2330
|
-
var _assign = _dereq_(
|
|
2351
|
+
var _assign = _dereq_(50);
|
|
2331
2352
|
|
|
2332
2353
|
var ReactCurrentOwner = _dereq_(14);
|
|
2333
2354
|
|
|
2334
|
-
var warning = _dereq_(
|
|
2355
|
+
var warning = _dereq_(49);
|
|
2335
2356
|
var canDefineProperty = _dereq_(33);
|
|
2336
2357
|
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
2337
2358
|
|
|
@@ -2655,7 +2676,7 @@ ReactElement.isValidElement = function (object) {
|
|
|
2655
2676
|
};
|
|
2656
2677
|
|
|
2657
2678
|
module.exports = ReactElement;
|
|
2658
|
-
},{"14":14,"17":17,"33":33,"
|
|
2679
|
+
},{"14":14,"17":17,"33":33,"49":49,"50":50}],17:[function(_dereq_,module,exports){
|
|
2659
2680
|
/**
|
|
2660
2681
|
* Copyright 2014-present, Facebook, Inc.
|
|
2661
2682
|
* All rights reserved.
|
|
@@ -2703,7 +2724,7 @@ var checkReactTypeSpec = _dereq_(34);
|
|
|
2703
2724
|
|
|
2704
2725
|
var canDefineProperty = _dereq_(33);
|
|
2705
2726
|
var getIteratorFn = _dereq_(36);
|
|
2706
|
-
var warning = _dereq_(
|
|
2727
|
+
var warning = _dereq_(49);
|
|
2707
2728
|
|
|
2708
2729
|
function getDeclarationErrorAddendum() {
|
|
2709
2730
|
if (ReactCurrentOwner.current) {
|
|
@@ -2715,6 +2736,16 @@ function getDeclarationErrorAddendum() {
|
|
|
2715
2736
|
return '';
|
|
2716
2737
|
}
|
|
2717
2738
|
|
|
2739
|
+
function getSourceInfoErrorAddendum(elementProps) {
|
|
2740
|
+
if (elementProps !== null && elementProps !== undefined && elementProps.__source !== undefined) {
|
|
2741
|
+
var source = elementProps.__source;
|
|
2742
|
+
var fileName = source.fileName.replace(/^.*[\\\/]/, '');
|
|
2743
|
+
var lineNumber = source.lineNumber;
|
|
2744
|
+
return ' Check your code at ' + fileName + ':' + lineNumber + '.';
|
|
2745
|
+
}
|
|
2746
|
+
return '';
|
|
2747
|
+
}
|
|
2748
|
+
|
|
2718
2749
|
/**
|
|
2719
2750
|
* Warn if there's no key explicitly set on dynamic arrays of children or
|
|
2720
2751
|
* object keys are not valid. This allows us to keep track of children between
|
|
@@ -2845,7 +2876,16 @@ var ReactElementValidator = {
|
|
|
2845
2876
|
if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
|
|
2846
2877
|
info += ' You likely forgot to export your component from the file ' + 'it\'s defined in.';
|
|
2847
2878
|
}
|
|
2848
|
-
|
|
2879
|
+
|
|
2880
|
+
var sourceInfo = getSourceInfoErrorAddendum(props);
|
|
2881
|
+
if (sourceInfo) {
|
|
2882
|
+
info += sourceInfo;
|
|
2883
|
+
} else {
|
|
2884
|
+
info += getDeclarationErrorAddendum();
|
|
2885
|
+
}
|
|
2886
|
+
|
|
2887
|
+
info += ReactComponentTreeHook.getCurrentStackAddendum();
|
|
2888
|
+
|
|
2849
2889
|
"development" !== 'production' ? warning(false, 'React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', type == null ? type : typeof type, info) : void 0;
|
|
2850
2890
|
}
|
|
2851
2891
|
}
|
|
@@ -2909,7 +2949,7 @@ var ReactElementValidator = {
|
|
|
2909
2949
|
};
|
|
2910
2950
|
|
|
2911
2951
|
module.exports = ReactElementValidator;
|
|
2912
|
-
},{"12":12,"14":14,"16":16,"33":33,"34":34,"36":36,"
|
|
2952
|
+
},{"12":12,"14":14,"16":16,"33":33,"34":34,"36":36,"49":49}],19:[function(_dereq_,module,exports){
|
|
2913
2953
|
/**
|
|
2914
2954
|
* Copyright 2015-present, Facebook, Inc.
|
|
2915
2955
|
* All rights reserved.
|
|
@@ -2922,14 +2962,14 @@ module.exports = ReactElementValidator;
|
|
|
2922
2962
|
|
|
2923
2963
|
'use strict';
|
|
2924
2964
|
|
|
2925
|
-
var _prodInvariant = _dereq_(
|
|
2965
|
+
var _prodInvariant = _dereq_(39);
|
|
2926
2966
|
|
|
2927
2967
|
var ReactChildren = _dereq_(9);
|
|
2928
2968
|
var ReactElement = _dereq_(16);
|
|
2929
2969
|
|
|
2930
|
-
var emptyFunction = _dereq_(
|
|
2931
|
-
var invariant = _dereq_(
|
|
2932
|
-
var warning = _dereq_(
|
|
2970
|
+
var emptyFunction = _dereq_(45);
|
|
2971
|
+
var invariant = _dereq_(47);
|
|
2972
|
+
var warning = _dereq_(49);
|
|
2933
2973
|
|
|
2934
2974
|
/**
|
|
2935
2975
|
* We used to allow keyed objects to serve as a collection of ReactElements,
|
|
@@ -2978,7 +3018,7 @@ var ReactFragment = {
|
|
|
2978
3018
|
};
|
|
2979
3019
|
|
|
2980
3020
|
module.exports = ReactFragment;
|
|
2981
|
-
},{"16":16,"
|
|
3021
|
+
},{"16":16,"39":39,"45":45,"47":47,"49":49,"9":9}],20:[function(_dereq_,module,exports){
|
|
2982
3022
|
/**
|
|
2983
3023
|
* Copyright 2013-present, Facebook, Inc.
|
|
2984
3024
|
* All rights reserved.
|
|
@@ -3062,7 +3102,7 @@ module.exports = ReactLink;
|
|
|
3062
3102
|
|
|
3063
3103
|
'use strict';
|
|
3064
3104
|
|
|
3065
|
-
var warning = _dereq_(
|
|
3105
|
+
var warning = _dereq_(49);
|
|
3066
3106
|
|
|
3067
3107
|
function warnNoop(publicInstance, callerName) {
|
|
3068
3108
|
if ("development" !== 'production') {
|
|
@@ -3145,7 +3185,7 @@ var ReactNoopUpdateQueue = {
|
|
|
3145
3185
|
};
|
|
3146
3186
|
|
|
3147
3187
|
module.exports = ReactNoopUpdateQueue;
|
|
3148
|
-
},{"
|
|
3188
|
+
},{"49":49}],22:[function(_dereq_,module,exports){
|
|
3149
3189
|
/**
|
|
3150
3190
|
* Copyright 2013-present, Facebook, Inc.
|
|
3151
3191
|
* All rights reserved.
|
|
@@ -3183,428 +3223,13 @@ module.exports = ReactPropTypeLocationNames;
|
|
|
3183
3223
|
|
|
3184
3224
|
'use strict';
|
|
3185
3225
|
|
|
3186
|
-
var
|
|
3187
|
-
|
|
3188
|
-
var ReactPropTypesSecret = _dereq_(24);
|
|
3189
|
-
|
|
3190
|
-
var emptyFunction = _dereq_(44);
|
|
3191
|
-
var getIteratorFn = _dereq_(36);
|
|
3192
|
-
var warning = _dereq_(48);
|
|
3193
|
-
|
|
3194
|
-
/**
|
|
3195
|
-
* Collection of methods that allow declaration and validation of props that are
|
|
3196
|
-
* supplied to React components. Example usage:
|
|
3197
|
-
*
|
|
3198
|
-
* var Props = require('ReactPropTypes');
|
|
3199
|
-
* var MyArticle = React.createClass({
|
|
3200
|
-
* propTypes: {
|
|
3201
|
-
* // An optional string prop named "description".
|
|
3202
|
-
* description: Props.string,
|
|
3203
|
-
*
|
|
3204
|
-
* // A required enum prop named "category".
|
|
3205
|
-
* category: Props.oneOf(['News','Photos']).isRequired,
|
|
3206
|
-
*
|
|
3207
|
-
* // A prop named "dialog" that requires an instance of Dialog.
|
|
3208
|
-
* dialog: Props.instanceOf(Dialog).isRequired
|
|
3209
|
-
* },
|
|
3210
|
-
* render: function() { ... }
|
|
3211
|
-
* });
|
|
3212
|
-
*
|
|
3213
|
-
* A more formal specification of how these methods are used:
|
|
3214
|
-
*
|
|
3215
|
-
* type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
|
|
3216
|
-
* decl := ReactPropTypes.{type}(.isRequired)?
|
|
3217
|
-
*
|
|
3218
|
-
* Each and every declaration produces a function with the same signature. This
|
|
3219
|
-
* allows the creation of custom validation functions. For example:
|
|
3220
|
-
*
|
|
3221
|
-
* var MyLink = React.createClass({
|
|
3222
|
-
* propTypes: {
|
|
3223
|
-
* // An optional string or URI prop named "href".
|
|
3224
|
-
* href: function(props, propName, componentName) {
|
|
3225
|
-
* var propValue = props[propName];
|
|
3226
|
-
* if (propValue != null && typeof propValue !== 'string' &&
|
|
3227
|
-
* !(propValue instanceof URI)) {
|
|
3228
|
-
* return new Error(
|
|
3229
|
-
* 'Expected a string or an URI for ' + propName + ' in ' +
|
|
3230
|
-
* componentName
|
|
3231
|
-
* );
|
|
3232
|
-
* }
|
|
3233
|
-
* }
|
|
3234
|
-
* },
|
|
3235
|
-
* render: function() {...}
|
|
3236
|
-
* });
|
|
3237
|
-
*
|
|
3238
|
-
* @internal
|
|
3239
|
-
*/
|
|
3240
|
-
|
|
3241
|
-
var ANONYMOUS = '<<anonymous>>';
|
|
3242
|
-
|
|
3243
|
-
var ReactPropTypes = {
|
|
3244
|
-
array: createPrimitiveTypeChecker('array'),
|
|
3245
|
-
bool: createPrimitiveTypeChecker('boolean'),
|
|
3246
|
-
func: createPrimitiveTypeChecker('function'),
|
|
3247
|
-
number: createPrimitiveTypeChecker('number'),
|
|
3248
|
-
object: createPrimitiveTypeChecker('object'),
|
|
3249
|
-
string: createPrimitiveTypeChecker('string'),
|
|
3250
|
-
symbol: createPrimitiveTypeChecker('symbol'),
|
|
3251
|
-
|
|
3252
|
-
any: createAnyTypeChecker(),
|
|
3253
|
-
arrayOf: createArrayOfTypeChecker,
|
|
3254
|
-
element: createElementTypeChecker(),
|
|
3255
|
-
instanceOf: createInstanceTypeChecker,
|
|
3256
|
-
node: createNodeChecker(),
|
|
3257
|
-
objectOf: createObjectOfTypeChecker,
|
|
3258
|
-
oneOf: createEnumTypeChecker,
|
|
3259
|
-
oneOfType: createUnionTypeChecker,
|
|
3260
|
-
shape: createShapeTypeChecker
|
|
3261
|
-
};
|
|
3262
|
-
|
|
3263
|
-
/**
|
|
3264
|
-
* inlined Object.is polyfill to avoid requiring consumers ship their own
|
|
3265
|
-
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
|
|
3266
|
-
*/
|
|
3267
|
-
/*eslint-disable no-self-compare*/
|
|
3268
|
-
function is(x, y) {
|
|
3269
|
-
// SameValue algorithm
|
|
3270
|
-
if (x === y) {
|
|
3271
|
-
// Steps 1-5, 7-10
|
|
3272
|
-
// Steps 6.b-6.e: +0 != -0
|
|
3273
|
-
return x !== 0 || 1 / x === 1 / y;
|
|
3274
|
-
} else {
|
|
3275
|
-
// Step 6.a: NaN == NaN
|
|
3276
|
-
return x !== x && y !== y;
|
|
3277
|
-
}
|
|
3278
|
-
}
|
|
3279
|
-
/*eslint-enable no-self-compare*/
|
|
3280
|
-
|
|
3281
|
-
/**
|
|
3282
|
-
* We use an Error-like object for backward compatibility as people may call
|
|
3283
|
-
* PropTypes directly and inspect their output. However we don't use real
|
|
3284
|
-
* Errors anymore. We don't inspect their stack anyway, and creating them
|
|
3285
|
-
* is prohibitively expensive if they are created too often, such as what
|
|
3286
|
-
* happens in oneOfType() for any type before the one that matched.
|
|
3287
|
-
*/
|
|
3288
|
-
function PropTypeError(message) {
|
|
3289
|
-
this.message = message;
|
|
3290
|
-
this.stack = '';
|
|
3291
|
-
}
|
|
3292
|
-
// Make `instanceof Error` still work for returned errors.
|
|
3293
|
-
PropTypeError.prototype = Error.prototype;
|
|
3294
|
-
|
|
3295
|
-
function createChainableTypeChecker(validate) {
|
|
3296
|
-
if ("development" !== 'production') {
|
|
3297
|
-
var manualPropTypeCallCache = {};
|
|
3298
|
-
}
|
|
3299
|
-
function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
|
|
3300
|
-
componentName = componentName || ANONYMOUS;
|
|
3301
|
-
propFullName = propFullName || propName;
|
|
3302
|
-
if ("development" !== 'production') {
|
|
3303
|
-
if (secret !== ReactPropTypesSecret && typeof console !== 'undefined') {
|
|
3304
|
-
var cacheKey = componentName + ':' + propName;
|
|
3305
|
-
if (!manualPropTypeCallCache[cacheKey]) {
|
|
3306
|
-
"development" !== 'production' ? warning(false, 'You are manually calling a React.PropTypes validation ' + 'function for the `%s` prop on `%s`. This is deprecated ' + 'and will not work in production with the next major version. ' + 'You may be seeing this warning due to a third-party PropTypes ' + 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.', propFullName, componentName) : void 0;
|
|
3307
|
-
manualPropTypeCallCache[cacheKey] = true;
|
|
3308
|
-
}
|
|
3309
|
-
}
|
|
3310
|
-
}
|
|
3311
|
-
if (props[propName] == null) {
|
|
3312
|
-
var locationName = ReactPropTypeLocationNames[location];
|
|
3313
|
-
if (isRequired) {
|
|
3314
|
-
if (props[propName] === null) {
|
|
3315
|
-
return new PropTypeError('The ' + locationName + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
|
|
3316
|
-
}
|
|
3317
|
-
return new PropTypeError('The ' + locationName + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
|
|
3318
|
-
}
|
|
3319
|
-
return null;
|
|
3320
|
-
} else {
|
|
3321
|
-
return validate(props, propName, componentName, location, propFullName);
|
|
3322
|
-
}
|
|
3323
|
-
}
|
|
3324
|
-
|
|
3325
|
-
var chainedCheckType = checkType.bind(null, false);
|
|
3326
|
-
chainedCheckType.isRequired = checkType.bind(null, true);
|
|
3327
|
-
|
|
3328
|
-
return chainedCheckType;
|
|
3329
|
-
}
|
|
3330
|
-
|
|
3331
|
-
function createPrimitiveTypeChecker(expectedType) {
|
|
3332
|
-
function validate(props, propName, componentName, location, propFullName, secret) {
|
|
3333
|
-
var propValue = props[propName];
|
|
3334
|
-
var propType = getPropType(propValue);
|
|
3335
|
-
if (propType !== expectedType) {
|
|
3336
|
-
var locationName = ReactPropTypeLocationNames[location];
|
|
3337
|
-
// `propValue` being instance of, say, date/regexp, pass the 'object'
|
|
3338
|
-
// check, but we can offer a more precise error message here rather than
|
|
3339
|
-
// 'of type `object`'.
|
|
3340
|
-
var preciseType = getPreciseType(propValue);
|
|
3341
|
-
|
|
3342
|
-
return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
|
|
3343
|
-
}
|
|
3344
|
-
return null;
|
|
3345
|
-
}
|
|
3346
|
-
return createChainableTypeChecker(validate);
|
|
3347
|
-
}
|
|
3348
|
-
|
|
3349
|
-
function createAnyTypeChecker() {
|
|
3350
|
-
return createChainableTypeChecker(emptyFunction.thatReturns(null));
|
|
3351
|
-
}
|
|
3352
|
-
|
|
3353
|
-
function createArrayOfTypeChecker(typeChecker) {
|
|
3354
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
3355
|
-
if (typeof typeChecker !== 'function') {
|
|
3356
|
-
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
|
|
3357
|
-
}
|
|
3358
|
-
var propValue = props[propName];
|
|
3359
|
-
if (!Array.isArray(propValue)) {
|
|
3360
|
-
var locationName = ReactPropTypeLocationNames[location];
|
|
3361
|
-
var propType = getPropType(propValue);
|
|
3362
|
-
return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
|
|
3363
|
-
}
|
|
3364
|
-
for (var i = 0; i < propValue.length; i++) {
|
|
3365
|
-
var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
|
|
3366
|
-
if (error instanceof Error) {
|
|
3367
|
-
return error;
|
|
3368
|
-
}
|
|
3369
|
-
}
|
|
3370
|
-
return null;
|
|
3371
|
-
}
|
|
3372
|
-
return createChainableTypeChecker(validate);
|
|
3373
|
-
}
|
|
3374
|
-
|
|
3375
|
-
function createElementTypeChecker() {
|
|
3376
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
3377
|
-
var propValue = props[propName];
|
|
3378
|
-
if (!ReactElement.isValidElement(propValue)) {
|
|
3379
|
-
var locationName = ReactPropTypeLocationNames[location];
|
|
3380
|
-
var propType = getPropType(propValue);
|
|
3381
|
-
return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
|
|
3382
|
-
}
|
|
3383
|
-
return null;
|
|
3384
|
-
}
|
|
3385
|
-
return createChainableTypeChecker(validate);
|
|
3386
|
-
}
|
|
3387
|
-
|
|
3388
|
-
function createInstanceTypeChecker(expectedClass) {
|
|
3389
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
3390
|
-
if (!(props[propName] instanceof expectedClass)) {
|
|
3391
|
-
var locationName = ReactPropTypeLocationNames[location];
|
|
3392
|
-
var expectedClassName = expectedClass.name || ANONYMOUS;
|
|
3393
|
-
var actualClassName = getClassName(props[propName]);
|
|
3394
|
-
return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
|
|
3395
|
-
}
|
|
3396
|
-
return null;
|
|
3397
|
-
}
|
|
3398
|
-
return createChainableTypeChecker(validate);
|
|
3399
|
-
}
|
|
3400
|
-
|
|
3401
|
-
function createEnumTypeChecker(expectedValues) {
|
|
3402
|
-
if (!Array.isArray(expectedValues)) {
|
|
3403
|
-
"development" !== 'production' ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0;
|
|
3404
|
-
return emptyFunction.thatReturnsNull;
|
|
3405
|
-
}
|
|
3406
|
-
|
|
3407
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
3408
|
-
var propValue = props[propName];
|
|
3409
|
-
for (var i = 0; i < expectedValues.length; i++) {
|
|
3410
|
-
if (is(propValue, expectedValues[i])) {
|
|
3411
|
-
return null;
|
|
3412
|
-
}
|
|
3413
|
-
}
|
|
3414
|
-
|
|
3415
|
-
var locationName = ReactPropTypeLocationNames[location];
|
|
3416
|
-
var valuesString = JSON.stringify(expectedValues);
|
|
3417
|
-
return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
|
|
3418
|
-
}
|
|
3419
|
-
return createChainableTypeChecker(validate);
|
|
3420
|
-
}
|
|
3421
|
-
|
|
3422
|
-
function createObjectOfTypeChecker(typeChecker) {
|
|
3423
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
3424
|
-
if (typeof typeChecker !== 'function') {
|
|
3425
|
-
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
|
|
3426
|
-
}
|
|
3427
|
-
var propValue = props[propName];
|
|
3428
|
-
var propType = getPropType(propValue);
|
|
3429
|
-
if (propType !== 'object') {
|
|
3430
|
-
var locationName = ReactPropTypeLocationNames[location];
|
|
3431
|
-
return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
|
|
3432
|
-
}
|
|
3433
|
-
for (var key in propValue) {
|
|
3434
|
-
if (propValue.hasOwnProperty(key)) {
|
|
3435
|
-
var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
|
3436
|
-
if (error instanceof Error) {
|
|
3437
|
-
return error;
|
|
3438
|
-
}
|
|
3439
|
-
}
|
|
3440
|
-
}
|
|
3441
|
-
return null;
|
|
3442
|
-
}
|
|
3443
|
-
return createChainableTypeChecker(validate);
|
|
3444
|
-
}
|
|
3445
|
-
|
|
3446
|
-
function createUnionTypeChecker(arrayOfTypeCheckers) {
|
|
3447
|
-
if (!Array.isArray(arrayOfTypeCheckers)) {
|
|
3448
|
-
"development" !== 'production' ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
|
|
3449
|
-
return emptyFunction.thatReturnsNull;
|
|
3450
|
-
}
|
|
3451
|
-
|
|
3452
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
3453
|
-
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
3454
|
-
var checker = arrayOfTypeCheckers[i];
|
|
3455
|
-
if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {
|
|
3456
|
-
return null;
|
|
3457
|
-
}
|
|
3458
|
-
}
|
|
3459
|
-
|
|
3460
|
-
var locationName = ReactPropTypeLocationNames[location];
|
|
3461
|
-
return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
|
|
3462
|
-
}
|
|
3463
|
-
return createChainableTypeChecker(validate);
|
|
3464
|
-
}
|
|
3465
|
-
|
|
3466
|
-
function createNodeChecker() {
|
|
3467
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
3468
|
-
if (!isNode(props[propName])) {
|
|
3469
|
-
var locationName = ReactPropTypeLocationNames[location];
|
|
3470
|
-
return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
|
|
3471
|
-
}
|
|
3472
|
-
return null;
|
|
3473
|
-
}
|
|
3474
|
-
return createChainableTypeChecker(validate);
|
|
3475
|
-
}
|
|
3476
|
-
|
|
3477
|
-
function createShapeTypeChecker(shapeTypes) {
|
|
3478
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
3479
|
-
var propValue = props[propName];
|
|
3480
|
-
var propType = getPropType(propValue);
|
|
3481
|
-
if (propType !== 'object') {
|
|
3482
|
-
var locationName = ReactPropTypeLocationNames[location];
|
|
3483
|
-
return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
|
3484
|
-
}
|
|
3485
|
-
for (var key in shapeTypes) {
|
|
3486
|
-
var checker = shapeTypes[key];
|
|
3487
|
-
if (!checker) {
|
|
3488
|
-
continue;
|
|
3489
|
-
}
|
|
3490
|
-
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
|
3491
|
-
if (error) {
|
|
3492
|
-
return error;
|
|
3493
|
-
}
|
|
3494
|
-
}
|
|
3495
|
-
return null;
|
|
3496
|
-
}
|
|
3497
|
-
return createChainableTypeChecker(validate);
|
|
3498
|
-
}
|
|
3499
|
-
|
|
3500
|
-
function isNode(propValue) {
|
|
3501
|
-
switch (typeof propValue) {
|
|
3502
|
-
case 'number':
|
|
3503
|
-
case 'string':
|
|
3504
|
-
case 'undefined':
|
|
3505
|
-
return true;
|
|
3506
|
-
case 'boolean':
|
|
3507
|
-
return !propValue;
|
|
3508
|
-
case 'object':
|
|
3509
|
-
if (Array.isArray(propValue)) {
|
|
3510
|
-
return propValue.every(isNode);
|
|
3511
|
-
}
|
|
3512
|
-
if (propValue === null || ReactElement.isValidElement(propValue)) {
|
|
3513
|
-
return true;
|
|
3514
|
-
}
|
|
3515
|
-
|
|
3516
|
-
var iteratorFn = getIteratorFn(propValue);
|
|
3517
|
-
if (iteratorFn) {
|
|
3518
|
-
var iterator = iteratorFn.call(propValue);
|
|
3519
|
-
var step;
|
|
3520
|
-
if (iteratorFn !== propValue.entries) {
|
|
3521
|
-
while (!(step = iterator.next()).done) {
|
|
3522
|
-
if (!isNode(step.value)) {
|
|
3523
|
-
return false;
|
|
3524
|
-
}
|
|
3525
|
-
}
|
|
3526
|
-
} else {
|
|
3527
|
-
// Iterator will provide entry [k,v] tuples rather than values.
|
|
3528
|
-
while (!(step = iterator.next()).done) {
|
|
3529
|
-
var entry = step.value;
|
|
3530
|
-
if (entry) {
|
|
3531
|
-
if (!isNode(entry[1])) {
|
|
3532
|
-
return false;
|
|
3533
|
-
}
|
|
3534
|
-
}
|
|
3535
|
-
}
|
|
3536
|
-
}
|
|
3537
|
-
} else {
|
|
3538
|
-
return false;
|
|
3539
|
-
}
|
|
3540
|
-
|
|
3541
|
-
return true;
|
|
3542
|
-
default:
|
|
3543
|
-
return false;
|
|
3544
|
-
}
|
|
3545
|
-
}
|
|
3546
|
-
|
|
3547
|
-
function isSymbol(propType, propValue) {
|
|
3548
|
-
// Native Symbol.
|
|
3549
|
-
if (propType === 'symbol') {
|
|
3550
|
-
return true;
|
|
3551
|
-
}
|
|
3552
|
-
|
|
3553
|
-
// 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
|
|
3554
|
-
if (propValue['@@toStringTag'] === 'Symbol') {
|
|
3555
|
-
return true;
|
|
3556
|
-
}
|
|
3557
|
-
|
|
3558
|
-
// Fallback for non-spec compliant Symbols which are polyfilled.
|
|
3559
|
-
if (typeof Symbol === 'function' && propValue instanceof Symbol) {
|
|
3560
|
-
return true;
|
|
3561
|
-
}
|
|
3562
|
-
|
|
3563
|
-
return false;
|
|
3564
|
-
}
|
|
3565
|
-
|
|
3566
|
-
// Equivalent of `typeof` but with special handling for array and regexp.
|
|
3567
|
-
function getPropType(propValue) {
|
|
3568
|
-
var propType = typeof propValue;
|
|
3569
|
-
if (Array.isArray(propValue)) {
|
|
3570
|
-
return 'array';
|
|
3571
|
-
}
|
|
3572
|
-
if (propValue instanceof RegExp) {
|
|
3573
|
-
// Old webkits (at least until Android 4.0) return 'function' rather than
|
|
3574
|
-
// 'object' for typeof a RegExp. We'll normalize this here so that /bla/
|
|
3575
|
-
// passes PropTypes.object.
|
|
3576
|
-
return 'object';
|
|
3577
|
-
}
|
|
3578
|
-
if (isSymbol(propType, propValue)) {
|
|
3579
|
-
return 'symbol';
|
|
3580
|
-
}
|
|
3581
|
-
return propType;
|
|
3582
|
-
}
|
|
3583
|
-
|
|
3584
|
-
// This handles more types than `getPropType`. Only used for error messages.
|
|
3585
|
-
// See `createPrimitiveTypeChecker`.
|
|
3586
|
-
function getPreciseType(propValue) {
|
|
3587
|
-
var propType = getPropType(propValue);
|
|
3588
|
-
if (propType === 'object') {
|
|
3589
|
-
if (propValue instanceof Date) {
|
|
3590
|
-
return 'date';
|
|
3591
|
-
} else if (propValue instanceof RegExp) {
|
|
3592
|
-
return 'regexp';
|
|
3593
|
-
}
|
|
3594
|
-
}
|
|
3595
|
-
return propType;
|
|
3596
|
-
}
|
|
3226
|
+
var _require = _dereq_(16),
|
|
3227
|
+
isValidElement = _require.isValidElement;
|
|
3597
3228
|
|
|
3598
|
-
|
|
3599
|
-
function getClassName(propValue) {
|
|
3600
|
-
if (!propValue.constructor || !propValue.constructor.name) {
|
|
3601
|
-
return ANONYMOUS;
|
|
3602
|
-
}
|
|
3603
|
-
return propValue.constructor.name;
|
|
3604
|
-
}
|
|
3229
|
+
var factory = _dereq_(52);
|
|
3605
3230
|
|
|
3606
|
-
module.exports =
|
|
3607
|
-
},{"16":16,"
|
|
3231
|
+
module.exports = factory(isValidElement);
|
|
3232
|
+
},{"16":16,"52":52}],24:[function(_dereq_,module,exports){
|
|
3608
3233
|
/**
|
|
3609
3234
|
* Copyright 2013-present, Facebook, Inc.
|
|
3610
3235
|
* All rights reserved.
|
|
@@ -3634,12 +3259,12 @@ module.exports = ReactPropTypesSecret;
|
|
|
3634
3259
|
|
|
3635
3260
|
'use strict';
|
|
3636
3261
|
|
|
3637
|
-
var _assign = _dereq_(
|
|
3262
|
+
var _assign = _dereq_(50);
|
|
3638
3263
|
|
|
3639
3264
|
var ReactComponent = _dereq_(11);
|
|
3640
3265
|
var ReactNoopUpdateQueue = _dereq_(21);
|
|
3641
3266
|
|
|
3642
|
-
var emptyObject = _dereq_(
|
|
3267
|
+
var emptyObject = _dereq_(46);
|
|
3643
3268
|
|
|
3644
3269
|
/**
|
|
3645
3270
|
* Base class helpers for the updating state of a component.
|
|
@@ -3663,7 +3288,7 @@ _assign(ReactPureComponent.prototype, ReactComponent.prototype);
|
|
|
3663
3288
|
ReactPureComponent.prototype.isPureReactComponent = true;
|
|
3664
3289
|
|
|
3665
3290
|
module.exports = ReactPureComponent;
|
|
3666
|
-
},{"11":11,"21":21,"
|
|
3291
|
+
},{"11":11,"21":21,"46":46,"50":50}],26:[function(_dereq_,module,exports){
|
|
3667
3292
|
/**
|
|
3668
3293
|
* Copyright 2013-present, Facebook, Inc.
|
|
3669
3294
|
* All rights reserved.
|
|
@@ -3883,7 +3508,7 @@ module.exports = ReactTransitionChildMapping;
|
|
|
3883
3508
|
|
|
3884
3509
|
'use strict';
|
|
3885
3510
|
|
|
3886
|
-
var ExecutionEnvironment = _dereq_(
|
|
3511
|
+
var ExecutionEnvironment = _dereq_(44);
|
|
3887
3512
|
|
|
3888
3513
|
var getVendorPrefixedEventName = _dereq_(1);
|
|
3889
3514
|
|
|
@@ -3943,7 +3568,7 @@ var ReactTransitionEvents = {
|
|
|
3943
3568
|
};
|
|
3944
3569
|
|
|
3945
3570
|
module.exports = ReactTransitionEvents;
|
|
3946
|
-
},{"1":1,"
|
|
3571
|
+
},{"1":1,"44":44}],29:[function(_dereq_,module,exports){
|
|
3947
3572
|
/**
|
|
3948
3573
|
* Copyright 2013-present, Facebook, Inc.
|
|
3949
3574
|
* All rights reserved.
|
|
@@ -3956,7 +3581,7 @@ module.exports = ReactTransitionEvents;
|
|
|
3956
3581
|
|
|
3957
3582
|
'use strict';
|
|
3958
3583
|
|
|
3959
|
-
var _assign = _dereq_(
|
|
3584
|
+
var _assign = _dereq_(50);
|
|
3960
3585
|
|
|
3961
3586
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
3962
3587
|
|
|
@@ -3967,7 +3592,7 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
|
|
|
3967
3592
|
var React = _dereq_(5);
|
|
3968
3593
|
var ReactTransitionChildMapping = _dereq_(27);
|
|
3969
3594
|
|
|
3970
|
-
var emptyFunction = _dereq_(
|
|
3595
|
+
var emptyFunction = _dereq_(45);
|
|
3971
3596
|
|
|
3972
3597
|
/**
|
|
3973
3598
|
* A basis for animations. When children are declaratively added or removed,
|
|
@@ -4172,7 +3797,7 @@ ReactTransitionGroup.defaultProps = {
|
|
|
4172
3797
|
|
|
4173
3798
|
|
|
4174
3799
|
module.exports = ReactTransitionGroup;
|
|
4175
|
-
},{"27":27,"
|
|
3800
|
+
},{"27":27,"45":45,"5":5,"50":50}],30:[function(_dereq_,module,exports){
|
|
4176
3801
|
/**
|
|
4177
3802
|
* Copyright 2013-present, Facebook, Inc.
|
|
4178
3803
|
* All rights reserved.
|
|
@@ -4185,7 +3810,7 @@ module.exports = ReactTransitionGroup;
|
|
|
4185
3810
|
|
|
4186
3811
|
'use strict';
|
|
4187
3812
|
|
|
4188
|
-
module.exports = '15.
|
|
3813
|
+
module.exports = '15.5.0-rc.1';
|
|
4189
3814
|
},{}],31:[function(_dereq_,module,exports){
|
|
4190
3815
|
/**
|
|
4191
3816
|
* Copyright 2013-present, Facebook, Inc.
|
|
@@ -4207,8 +3832,8 @@ var ReactCSSTransitionGroup = _dereq_(7);
|
|
|
4207
3832
|
var ReactFragment = _dereq_(19);
|
|
4208
3833
|
var ReactTransitionGroup = _dereq_(29);
|
|
4209
3834
|
|
|
4210
|
-
var shallowCompare = _dereq_(
|
|
4211
|
-
var update = _dereq_(
|
|
3835
|
+
var shallowCompare = _dereq_(40);
|
|
3836
|
+
var update = _dereq_(42);
|
|
4212
3837
|
|
|
4213
3838
|
React.addons = {
|
|
4214
3839
|
CSSTransitionGroup: ReactCSSTransitionGroup,
|
|
@@ -4239,7 +3864,7 @@ if ("development" !== 'production') {
|
|
|
4239
3864
|
}
|
|
4240
3865
|
|
|
4241
3866
|
module.exports = React;
|
|
4242
|
-
},{"13":13,"19":19,"29":29,"3":3,"
|
|
3867
|
+
},{"13":13,"19":19,"29":29,"3":3,"40":40,"42":42,"5":5,"6":6,"7":7}],32:[function(_dereq_,module,exports){
|
|
4243
3868
|
/**
|
|
4244
3869
|
* Copyright 2013-present, Facebook, Inc.
|
|
4245
3870
|
* All rights reserved.
|
|
@@ -4252,7 +3877,7 @@ module.exports = React;
|
|
|
4252
3877
|
|
|
4253
3878
|
'use strict';
|
|
4254
3879
|
|
|
4255
|
-
var _assign = _dereq_(
|
|
3880
|
+
var _assign = _dereq_(50);
|
|
4256
3881
|
|
|
4257
3882
|
var ReactWithAddons = _dereq_(31);
|
|
4258
3883
|
|
|
@@ -4267,12 +3892,13 @@ var ReactWithAddonsUMDEntry = _assign({
|
|
|
4267
3892
|
if ("development" !== 'production') {
|
|
4268
3893
|
_assign(ReactWithAddonsUMDEntry.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, {
|
|
4269
3894
|
// ReactComponentTreeHook should not be included in production.
|
|
4270
|
-
ReactComponentTreeHook: _dereq_(12)
|
|
3895
|
+
ReactComponentTreeHook: _dereq_(12),
|
|
3896
|
+
getNextDebugID: _dereq_(37)
|
|
4271
3897
|
});
|
|
4272
3898
|
}
|
|
4273
3899
|
|
|
4274
3900
|
module.exports = ReactWithAddonsUMDEntry;
|
|
4275
|
-
},{"12":12,"14":14,"31":31,"
|
|
3901
|
+
},{"12":12,"14":14,"31":31,"37":37,"50":50}],33:[function(_dereq_,module,exports){
|
|
4276
3902
|
/**
|
|
4277
3903
|
* Copyright 2013-present, Facebook, Inc.
|
|
4278
3904
|
* All rights reserved.
|
|
@@ -4312,13 +3938,13 @@ module.exports = canDefineProperty;
|
|
|
4312
3938
|
|
|
4313
3939
|
'use strict';
|
|
4314
3940
|
|
|
4315
|
-
var _prodInvariant = _dereq_(
|
|
3941
|
+
var _prodInvariant = _dereq_(39);
|
|
4316
3942
|
|
|
4317
3943
|
var ReactPropTypeLocationNames = _dereq_(22);
|
|
4318
3944
|
var ReactPropTypesSecret = _dereq_(24);
|
|
4319
3945
|
|
|
4320
|
-
var invariant = _dereq_(
|
|
4321
|
-
var warning = _dereq_(
|
|
3946
|
+
var invariant = _dereq_(47);
|
|
3947
|
+
var warning = _dereq_(49);
|
|
4322
3948
|
|
|
4323
3949
|
var ReactComponentTreeHook;
|
|
4324
3950
|
|
|
@@ -4387,7 +4013,7 @@ function checkReactTypeSpec(typeSpecs, values, location, componentName, element,
|
|
|
4387
4013
|
|
|
4388
4014
|
module.exports = checkReactTypeSpec;
|
|
4389
4015
|
}).call(this,undefined)
|
|
4390
|
-
},{"12":12,"22":22,"24":24,"
|
|
4016
|
+
},{"12":12,"22":22,"24":24,"39":39,"47":47,"49":49}],35:[function(_dereq_,module,exports){
|
|
4391
4017
|
(function (process){
|
|
4392
4018
|
/**
|
|
4393
4019
|
* Copyright 2013-present, Facebook, Inc.
|
|
@@ -4403,8 +4029,8 @@ module.exports = checkReactTypeSpec;
|
|
|
4403
4029
|
'use strict';
|
|
4404
4030
|
|
|
4405
4031
|
var KeyEscapeUtils = _dereq_(2);
|
|
4406
|
-
var traverseAllChildren = _dereq_(
|
|
4407
|
-
var warning = _dereq_(
|
|
4032
|
+
var traverseAllChildren = _dereq_(41);
|
|
4033
|
+
var warning = _dereq_(49);
|
|
4408
4034
|
|
|
4409
4035
|
var ReactComponentTreeHook;
|
|
4410
4036
|
|
|
@@ -4465,7 +4091,7 @@ function flattenChildren(children, selfDebugID) {
|
|
|
4465
4091
|
|
|
4466
4092
|
module.exports = flattenChildren;
|
|
4467
4093
|
}).call(this,undefined)
|
|
4468
|
-
},{"12":12,"2":2,"
|
|
4094
|
+
},{"12":12,"2":2,"41":41,"49":49}],36:[function(_dereq_,module,exports){
|
|
4469
4095
|
/**
|
|
4470
4096
|
* Copyright 2013-present, Facebook, Inc.
|
|
4471
4097
|
* All rights reserved.
|
|
@@ -4515,14 +4141,35 @@ module.exports = getIteratorFn;
|
|
|
4515
4141
|
* LICENSE file in the root directory of this source tree. An additional grant
|
|
4516
4142
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
4517
4143
|
*
|
|
4144
|
+
*
|
|
4518
4145
|
*/
|
|
4146
|
+
|
|
4519
4147
|
'use strict';
|
|
4520
4148
|
|
|
4521
|
-
var
|
|
4149
|
+
var nextDebugID = 1;
|
|
4150
|
+
|
|
4151
|
+
function getNextDebugID() {
|
|
4152
|
+
return nextDebugID++;
|
|
4153
|
+
}
|
|
4154
|
+
|
|
4155
|
+
module.exports = getNextDebugID;
|
|
4156
|
+
},{}],38:[function(_dereq_,module,exports){
|
|
4157
|
+
/**
|
|
4158
|
+
* Copyright 2013-present, Facebook, Inc.
|
|
4159
|
+
* All rights reserved.
|
|
4160
|
+
*
|
|
4161
|
+
* This source code is licensed under the BSD-style license found in the
|
|
4162
|
+
* LICENSE file in the root directory of this source tree. An additional grant
|
|
4163
|
+
* of patent rights can be found in the PATENTS file in the same directory.
|
|
4164
|
+
*
|
|
4165
|
+
*/
|
|
4166
|
+
'use strict';
|
|
4167
|
+
|
|
4168
|
+
var _prodInvariant = _dereq_(39);
|
|
4522
4169
|
|
|
4523
4170
|
var ReactElement = _dereq_(16);
|
|
4524
4171
|
|
|
4525
|
-
var invariant = _dereq_(
|
|
4172
|
+
var invariant = _dereq_(47);
|
|
4526
4173
|
|
|
4527
4174
|
/**
|
|
4528
4175
|
* Returns the first child in a collection of children and verifies that there
|
|
@@ -4544,7 +4191,7 @@ function onlyChild(children) {
|
|
|
4544
4191
|
}
|
|
4545
4192
|
|
|
4546
4193
|
module.exports = onlyChild;
|
|
4547
|
-
},{"16":16,"
|
|
4194
|
+
},{"16":16,"39":39,"47":47}],39:[function(_dereq_,module,exports){
|
|
4548
4195
|
/**
|
|
4549
4196
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
4550
4197
|
* All rights reserved.
|
|
@@ -4583,7 +4230,7 @@ function reactProdInvariant(code) {
|
|
|
4583
4230
|
}
|
|
4584
4231
|
|
|
4585
4232
|
module.exports = reactProdInvariant;
|
|
4586
|
-
},{}],
|
|
4233
|
+
},{}],40:[function(_dereq_,module,exports){
|
|
4587
4234
|
/**
|
|
4588
4235
|
* Copyright 2013-present, Facebook, Inc.
|
|
4589
4236
|
* All rights reserved.
|
|
@@ -4596,7 +4243,7 @@ module.exports = reactProdInvariant;
|
|
|
4596
4243
|
|
|
4597
4244
|
'use strict';
|
|
4598
4245
|
|
|
4599
|
-
var shallowEqual = _dereq_(
|
|
4246
|
+
var shallowEqual = _dereq_(48);
|
|
4600
4247
|
|
|
4601
4248
|
/**
|
|
4602
4249
|
* Does a shallow comparison for props and state.
|
|
@@ -4608,7 +4255,7 @@ function shallowCompare(instance, nextProps, nextState) {
|
|
|
4608
4255
|
}
|
|
4609
4256
|
|
|
4610
4257
|
module.exports = shallowCompare;
|
|
4611
|
-
},{"
|
|
4258
|
+
},{"48":48}],41:[function(_dereq_,module,exports){
|
|
4612
4259
|
/**
|
|
4613
4260
|
* Copyright 2013-present, Facebook, Inc.
|
|
4614
4261
|
* All rights reserved.
|
|
@@ -4621,15 +4268,15 @@ module.exports = shallowCompare;
|
|
|
4621
4268
|
|
|
4622
4269
|
'use strict';
|
|
4623
4270
|
|
|
4624
|
-
var _prodInvariant = _dereq_(
|
|
4271
|
+
var _prodInvariant = _dereq_(39);
|
|
4625
4272
|
|
|
4626
4273
|
var ReactCurrentOwner = _dereq_(14);
|
|
4627
4274
|
var REACT_ELEMENT_TYPE = _dereq_(17);
|
|
4628
4275
|
|
|
4629
4276
|
var getIteratorFn = _dereq_(36);
|
|
4630
|
-
var invariant = _dereq_(
|
|
4277
|
+
var invariant = _dereq_(47);
|
|
4631
4278
|
var KeyEscapeUtils = _dereq_(2);
|
|
4632
|
-
var warning = _dereq_(
|
|
4279
|
+
var warning = _dereq_(49);
|
|
4633
4280
|
|
|
4634
4281
|
var SEPARATOR = '.';
|
|
4635
4282
|
var SUBSEPARATOR = ':';
|
|
@@ -4784,7 +4431,7 @@ function traverseAllChildren(children, callback, traverseContext) {
|
|
|
4784
4431
|
}
|
|
4785
4432
|
|
|
4786
4433
|
module.exports = traverseAllChildren;
|
|
4787
|
-
},{"14":14,"17":17,"2":2,"36":36,"
|
|
4434
|
+
},{"14":14,"17":17,"2":2,"36":36,"39":39,"47":47,"49":49}],42:[function(_dereq_,module,exports){
|
|
4788
4435
|
/**
|
|
4789
4436
|
* Copyright 2013-present, Facebook, Inc.
|
|
4790
4437
|
* All rights reserved.
|
|
@@ -4799,10 +4446,10 @@ module.exports = traverseAllChildren;
|
|
|
4799
4446
|
|
|
4800
4447
|
'use strict';
|
|
4801
4448
|
|
|
4802
|
-
var _prodInvariant = _dereq_(
|
|
4803
|
-
_assign = _dereq_(
|
|
4449
|
+
var _prodInvariant = _dereq_(39),
|
|
4450
|
+
_assign = _dereq_(50);
|
|
4804
4451
|
|
|
4805
|
-
var invariant = _dereq_(
|
|
4452
|
+
var invariant = _dereq_(47);
|
|
4806
4453
|
var hasOwnProperty = {}.hasOwnProperty;
|
|
4807
4454
|
|
|
4808
4455
|
function shallowCopy(x) {
|
|
@@ -4896,7 +4543,7 @@ function update(value, spec) {
|
|
|
4896
4543
|
}
|
|
4897
4544
|
|
|
4898
4545
|
module.exports = update;
|
|
4899
|
-
},{"
|
|
4546
|
+
},{"39":39,"47":47,"50":50}],43:[function(_dereq_,module,exports){
|
|
4900
4547
|
'use strict';
|
|
4901
4548
|
|
|
4902
4549
|
/**
|
|
@@ -4910,7 +4557,7 @@ module.exports = update;
|
|
|
4910
4557
|
* @typechecks
|
|
4911
4558
|
*/
|
|
4912
4559
|
|
|
4913
|
-
var invariant = _dereq_(
|
|
4560
|
+
var invariant = _dereq_(47);
|
|
4914
4561
|
|
|
4915
4562
|
/**
|
|
4916
4563
|
* The CSSCore module specifies the API (and implements most of the methods)
|
|
@@ -5018,7 +4665,7 @@ var CSSCore = {
|
|
|
5018
4665
|
};
|
|
5019
4666
|
|
|
5020
4667
|
module.exports = CSSCore;
|
|
5021
|
-
},{"
|
|
4668
|
+
},{"47":47}],44:[function(_dereq_,module,exports){
|
|
5022
4669
|
/**
|
|
5023
4670
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
5024
4671
|
* All rights reserved.
|
|
@@ -5054,7 +4701,7 @@ var ExecutionEnvironment = {
|
|
|
5054
4701
|
};
|
|
5055
4702
|
|
|
5056
4703
|
module.exports = ExecutionEnvironment;
|
|
5057
|
-
},{}],
|
|
4704
|
+
},{}],45:[function(_dereq_,module,exports){
|
|
5058
4705
|
"use strict";
|
|
5059
4706
|
|
|
5060
4707
|
/**
|
|
@@ -5093,7 +4740,7 @@ emptyFunction.thatReturnsArgument = function (arg) {
|
|
|
5093
4740
|
};
|
|
5094
4741
|
|
|
5095
4742
|
module.exports = emptyFunction;
|
|
5096
|
-
},{}],
|
|
4743
|
+
},{}],46:[function(_dereq_,module,exports){
|
|
5097
4744
|
/**
|
|
5098
4745
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
5099
4746
|
* All rights reserved.
|
|
@@ -5113,7 +4760,7 @@ if ("development" !== 'production') {
|
|
|
5113
4760
|
}
|
|
5114
4761
|
|
|
5115
4762
|
module.exports = emptyObject;
|
|
5116
|
-
},{}],
|
|
4763
|
+
},{}],47:[function(_dereq_,module,exports){
|
|
5117
4764
|
/**
|
|
5118
4765
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
5119
4766
|
* All rights reserved.
|
|
@@ -5169,7 +4816,7 @@ function invariant(condition, format, a, b, c, d, e, f) {
|
|
|
5169
4816
|
}
|
|
5170
4817
|
|
|
5171
4818
|
module.exports = invariant;
|
|
5172
|
-
},{}],
|
|
4819
|
+
},{}],48:[function(_dereq_,module,exports){
|
|
5173
4820
|
/**
|
|
5174
4821
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
5175
4822
|
* All rights reserved.
|
|
@@ -5237,7 +4884,7 @@ function shallowEqual(objA, objB) {
|
|
|
5237
4884
|
}
|
|
5238
4885
|
|
|
5239
4886
|
module.exports = shallowEqual;
|
|
5240
|
-
},{}],
|
|
4887
|
+
},{}],49:[function(_dereq_,module,exports){
|
|
5241
4888
|
/**
|
|
5242
4889
|
* Copyright 2014-2015, Facebook, Inc.
|
|
5243
4890
|
* All rights reserved.
|
|
@@ -5250,7 +4897,7 @@ module.exports = shallowEqual;
|
|
|
5250
4897
|
|
|
5251
4898
|
'use strict';
|
|
5252
4899
|
|
|
5253
|
-
var emptyFunction = _dereq_(
|
|
4900
|
+
var emptyFunction = _dereq_(45);
|
|
5254
4901
|
|
|
5255
4902
|
/**
|
|
5256
4903
|
* Similar to invariant but only logs a warning if the condition is not met.
|
|
@@ -5304,9 +4951,16 @@ if ("development" !== 'production') {
|
|
|
5304
4951
|
}
|
|
5305
4952
|
|
|
5306
4953
|
module.exports = warning;
|
|
5307
|
-
},{"
|
|
4954
|
+
},{"45":45}],50:[function(_dereq_,module,exports){
|
|
4955
|
+
/*
|
|
4956
|
+
object-assign
|
|
4957
|
+
(c) Sindre Sorhus
|
|
4958
|
+
@license MIT
|
|
4959
|
+
*/
|
|
4960
|
+
|
|
5308
4961
|
'use strict';
|
|
5309
4962
|
/* eslint-disable no-unused-vars */
|
|
4963
|
+
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
5310
4964
|
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
5311
4965
|
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
5312
4966
|
|
|
@@ -5327,7 +4981,7 @@ function shouldUseNative() {
|
|
|
5327
4981
|
// Detect buggy property enumeration order in older V8 versions.
|
|
5328
4982
|
|
|
5329
4983
|
// https://bugs.chromium.org/p/v8/issues/detail?id=4118
|
|
5330
|
-
var test1 = new String('abc'); // eslint-disable-line
|
|
4984
|
+
var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
|
|
5331
4985
|
test1[5] = 'de';
|
|
5332
4986
|
if (Object.getOwnPropertyNames(test1)[0] === '5') {
|
|
5333
4987
|
return false;
|
|
@@ -5356,7 +5010,7 @@ function shouldUseNative() {
|
|
|
5356
5010
|
}
|
|
5357
5011
|
|
|
5358
5012
|
return true;
|
|
5359
|
-
} catch (
|
|
5013
|
+
} catch (err) {
|
|
5360
5014
|
// We don't expect any of the above to throw, but better to be safe.
|
|
5361
5015
|
return false;
|
|
5362
5016
|
}
|
|
@@ -5376,8 +5030,8 @@ module.exports = shouldUseNative() ? Object.assign : function (target, source) {
|
|
|
5376
5030
|
}
|
|
5377
5031
|
}
|
|
5378
5032
|
|
|
5379
|
-
if (
|
|
5380
|
-
symbols =
|
|
5033
|
+
if (getOwnPropertySymbols) {
|
|
5034
|
+
symbols = getOwnPropertySymbols(from);
|
|
5381
5035
|
for (var i = 0; i < symbols.length; i++) {
|
|
5382
5036
|
if (propIsEnumerable.call(from, symbols[i])) {
|
|
5383
5037
|
to[symbols[i]] = from[symbols[i]];
|
|
@@ -5389,5 +5043,570 @@ module.exports = shouldUseNative() ? Object.assign : function (target, source) {
|
|
|
5389
5043
|
return to;
|
|
5390
5044
|
};
|
|
5391
5045
|
|
|
5046
|
+
},{}],51:[function(_dereq_,module,exports){
|
|
5047
|
+
/**
|
|
5048
|
+
* Copyright 2013-present, Facebook, Inc.
|
|
5049
|
+
* All rights reserved.
|
|
5050
|
+
*
|
|
5051
|
+
* This source code is licensed under the BSD-style license found in the
|
|
5052
|
+
* LICENSE file in the root directory of this source tree. An additional grant
|
|
5053
|
+
* of patent rights can be found in the PATENTS file in the same directory.
|
|
5054
|
+
*/
|
|
5055
|
+
|
|
5056
|
+
'use strict';
|
|
5057
|
+
|
|
5058
|
+
var invariant = _dereq_(47);
|
|
5059
|
+
var warning = _dereq_(49);
|
|
5060
|
+
|
|
5061
|
+
var ReactPropTypesSecret = _dereq_(53);
|
|
5062
|
+
|
|
5063
|
+
var loggedTypeFailures = {};
|
|
5064
|
+
|
|
5065
|
+
/**
|
|
5066
|
+
* Assert that the values match with the type specs.
|
|
5067
|
+
* Error messages are memorized and will only be shown once.
|
|
5068
|
+
*
|
|
5069
|
+
* @param {object} typeSpecs Map of name to a ReactPropType
|
|
5070
|
+
* @param {object} values Runtime values that need to be type-checked
|
|
5071
|
+
* @param {string} location e.g. "prop", "context", "child context"
|
|
5072
|
+
* @param {string} componentName Name of the component for error messages.
|
|
5073
|
+
* @param {?Function} getStack Returns the component stack.
|
|
5074
|
+
* @private
|
|
5075
|
+
*/
|
|
5076
|
+
function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
|
|
5077
|
+
if ("development" !== 'production') {
|
|
5078
|
+
for (var typeSpecName in typeSpecs) {
|
|
5079
|
+
if (typeSpecs.hasOwnProperty(typeSpecName)) {
|
|
5080
|
+
var error;
|
|
5081
|
+
// Prop type validation may throw. In case they do, we don't want to
|
|
5082
|
+
// fail the render phase where it didn't fail before. So we log it.
|
|
5083
|
+
// After these have been cleaned up, we'll let them throw.
|
|
5084
|
+
try {
|
|
5085
|
+
// This is intentionally an invariant that gets caught. It's the same
|
|
5086
|
+
// behavior as without this statement except with a better message.
|
|
5087
|
+
invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', componentName || 'React class', location, typeSpecName);
|
|
5088
|
+
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
|
|
5089
|
+
} catch (ex) {
|
|
5090
|
+
error = ex;
|
|
5091
|
+
}
|
|
5092
|
+
"development" !== 'production' ? warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error) : void 0;
|
|
5093
|
+
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
|
5094
|
+
// Only monitor this failure once because there tends to be a lot of the
|
|
5095
|
+
// same error.
|
|
5096
|
+
loggedTypeFailures[error.message] = true;
|
|
5097
|
+
|
|
5098
|
+
var stack = getStack ? getStack() : '';
|
|
5099
|
+
|
|
5100
|
+
"development" !== 'production' ? warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '') : void 0;
|
|
5101
|
+
}
|
|
5102
|
+
}
|
|
5103
|
+
}
|
|
5104
|
+
}
|
|
5105
|
+
}
|
|
5106
|
+
|
|
5107
|
+
module.exports = checkPropTypes;
|
|
5108
|
+
|
|
5109
|
+
},{"47":47,"49":49,"53":53}],52:[function(_dereq_,module,exports){
|
|
5110
|
+
/**
|
|
5111
|
+
* Copyright 2013-present, Facebook, Inc.
|
|
5112
|
+
* All rights reserved.
|
|
5113
|
+
*
|
|
5114
|
+
* This source code is licensed under the BSD-style license found in the
|
|
5115
|
+
* LICENSE file in the root directory of this source tree. An additional grant
|
|
5116
|
+
* of patent rights can be found in the PATENTS file in the same directory.
|
|
5117
|
+
*/
|
|
5118
|
+
|
|
5119
|
+
'use strict';
|
|
5120
|
+
|
|
5121
|
+
var emptyFunction = _dereq_(45);
|
|
5122
|
+
var invariant = _dereq_(47);
|
|
5123
|
+
var warning = _dereq_(49);
|
|
5124
|
+
|
|
5125
|
+
var ReactPropTypesSecret = _dereq_(53);
|
|
5126
|
+
var checkPropTypes = _dereq_(51);
|
|
5127
|
+
|
|
5128
|
+
module.exports = function (isValidElement) {
|
|
5129
|
+
/* global Symbol */
|
|
5130
|
+
var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
|
5131
|
+
var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
|
|
5132
|
+
|
|
5133
|
+
/**
|
|
5134
|
+
* Returns the iterator method function contained on the iterable object.
|
|
5135
|
+
*
|
|
5136
|
+
* Be sure to invoke the function with the iterable as context:
|
|
5137
|
+
*
|
|
5138
|
+
* var iteratorFn = getIteratorFn(myIterable);
|
|
5139
|
+
* if (iteratorFn) {
|
|
5140
|
+
* var iterator = iteratorFn.call(myIterable);
|
|
5141
|
+
* ...
|
|
5142
|
+
* }
|
|
5143
|
+
*
|
|
5144
|
+
* @param {?object} maybeIterable
|
|
5145
|
+
* @return {?function}
|
|
5146
|
+
*/
|
|
5147
|
+
function getIteratorFn(maybeIterable) {
|
|
5148
|
+
var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
|
|
5149
|
+
if (typeof iteratorFn === 'function') {
|
|
5150
|
+
return iteratorFn;
|
|
5151
|
+
}
|
|
5152
|
+
}
|
|
5153
|
+
|
|
5154
|
+
/**
|
|
5155
|
+
* Collection of methods that allow declaration and validation of props that are
|
|
5156
|
+
* supplied to React components. Example usage:
|
|
5157
|
+
*
|
|
5158
|
+
* var Props = require('ReactPropTypes');
|
|
5159
|
+
* var MyArticle = React.createClass({
|
|
5160
|
+
* propTypes: {
|
|
5161
|
+
* // An optional string prop named "description".
|
|
5162
|
+
* description: Props.string,
|
|
5163
|
+
*
|
|
5164
|
+
* // A required enum prop named "category".
|
|
5165
|
+
* category: Props.oneOf(['News','Photos']).isRequired,
|
|
5166
|
+
*
|
|
5167
|
+
* // A prop named "dialog" that requires an instance of Dialog.
|
|
5168
|
+
* dialog: Props.instanceOf(Dialog).isRequired
|
|
5169
|
+
* },
|
|
5170
|
+
* render: function() { ... }
|
|
5171
|
+
* });
|
|
5172
|
+
*
|
|
5173
|
+
* A more formal specification of how these methods are used:
|
|
5174
|
+
*
|
|
5175
|
+
* type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
|
|
5176
|
+
* decl := ReactPropTypes.{type}(.isRequired)?
|
|
5177
|
+
*
|
|
5178
|
+
* Each and every declaration produces a function with the same signature. This
|
|
5179
|
+
* allows the creation of custom validation functions. For example:
|
|
5180
|
+
*
|
|
5181
|
+
* var MyLink = React.createClass({
|
|
5182
|
+
* propTypes: {
|
|
5183
|
+
* // An optional string or URI prop named "href".
|
|
5184
|
+
* href: function(props, propName, componentName) {
|
|
5185
|
+
* var propValue = props[propName];
|
|
5186
|
+
* if (propValue != null && typeof propValue !== 'string' &&
|
|
5187
|
+
* !(propValue instanceof URI)) {
|
|
5188
|
+
* return new Error(
|
|
5189
|
+
* 'Expected a string or an URI for ' + propName + ' in ' +
|
|
5190
|
+
* componentName
|
|
5191
|
+
* );
|
|
5192
|
+
* }
|
|
5193
|
+
* }
|
|
5194
|
+
* },
|
|
5195
|
+
* render: function() {...}
|
|
5196
|
+
* });
|
|
5197
|
+
*
|
|
5198
|
+
* @internal
|
|
5199
|
+
*/
|
|
5200
|
+
|
|
5201
|
+
var ANONYMOUS = '<<anonymous>>';
|
|
5202
|
+
|
|
5203
|
+
var ReactPropTypes;
|
|
5204
|
+
|
|
5205
|
+
if ("development" !== 'production') {
|
|
5206
|
+
// Keep in sync with production version below
|
|
5207
|
+
ReactPropTypes = {
|
|
5208
|
+
array: createPrimitiveTypeChecker('array'),
|
|
5209
|
+
bool: createPrimitiveTypeChecker('boolean'),
|
|
5210
|
+
func: createPrimitiveTypeChecker('function'),
|
|
5211
|
+
number: createPrimitiveTypeChecker('number'),
|
|
5212
|
+
object: createPrimitiveTypeChecker('object'),
|
|
5213
|
+
string: createPrimitiveTypeChecker('string'),
|
|
5214
|
+
symbol: createPrimitiveTypeChecker('symbol'),
|
|
5215
|
+
|
|
5216
|
+
any: createAnyTypeChecker(),
|
|
5217
|
+
arrayOf: createArrayOfTypeChecker,
|
|
5218
|
+
element: createElementTypeChecker(),
|
|
5219
|
+
instanceOf: createInstanceTypeChecker,
|
|
5220
|
+
node: createNodeChecker(),
|
|
5221
|
+
objectOf: createObjectOfTypeChecker,
|
|
5222
|
+
oneOf: createEnumTypeChecker,
|
|
5223
|
+
oneOfType: createUnionTypeChecker,
|
|
5224
|
+
shape: createShapeTypeChecker
|
|
5225
|
+
};
|
|
5226
|
+
} else {
|
|
5227
|
+
var productionTypeChecker = function () {
|
|
5228
|
+
invariant(false, 'React.PropTypes type checking code is stripped in production.');
|
|
5229
|
+
};
|
|
5230
|
+
productionTypeChecker.isRequired = productionTypeChecker;
|
|
5231
|
+
var getProductionTypeChecker = function () {
|
|
5232
|
+
return productionTypeChecker;
|
|
5233
|
+
};
|
|
5234
|
+
// Keep in sync with development version above
|
|
5235
|
+
ReactPropTypes = {
|
|
5236
|
+
array: productionTypeChecker,
|
|
5237
|
+
bool: productionTypeChecker,
|
|
5238
|
+
func: productionTypeChecker,
|
|
5239
|
+
number: productionTypeChecker,
|
|
5240
|
+
object: productionTypeChecker,
|
|
5241
|
+
string: productionTypeChecker,
|
|
5242
|
+
symbol: productionTypeChecker,
|
|
5243
|
+
|
|
5244
|
+
any: productionTypeChecker,
|
|
5245
|
+
arrayOf: getProductionTypeChecker,
|
|
5246
|
+
element: productionTypeChecker,
|
|
5247
|
+
instanceOf: getProductionTypeChecker,
|
|
5248
|
+
node: productionTypeChecker,
|
|
5249
|
+
objectOf: getProductionTypeChecker,
|
|
5250
|
+
oneOf: getProductionTypeChecker,
|
|
5251
|
+
oneOfType: getProductionTypeChecker,
|
|
5252
|
+
shape: getProductionTypeChecker
|
|
5253
|
+
};
|
|
5254
|
+
}
|
|
5255
|
+
|
|
5256
|
+
/**
|
|
5257
|
+
* inlined Object.is polyfill to avoid requiring consumers ship their own
|
|
5258
|
+
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
|
|
5259
|
+
*/
|
|
5260
|
+
/*eslint-disable no-self-compare*/
|
|
5261
|
+
function is(x, y) {
|
|
5262
|
+
// SameValue algorithm
|
|
5263
|
+
if (x === y) {
|
|
5264
|
+
// Steps 1-5, 7-10
|
|
5265
|
+
// Steps 6.b-6.e: +0 != -0
|
|
5266
|
+
return x !== 0 || 1 / x === 1 / y;
|
|
5267
|
+
} else {
|
|
5268
|
+
// Step 6.a: NaN == NaN
|
|
5269
|
+
return x !== x && y !== y;
|
|
5270
|
+
}
|
|
5271
|
+
}
|
|
5272
|
+
/*eslint-enable no-self-compare*/
|
|
5273
|
+
|
|
5274
|
+
/**
|
|
5275
|
+
* We use an Error-like object for backward compatibility as people may call
|
|
5276
|
+
* PropTypes directly and inspect their output. However, we don't use real
|
|
5277
|
+
* Errors anymore. We don't inspect their stack anyway, and creating them
|
|
5278
|
+
* is prohibitively expensive if they are created too often, such as what
|
|
5279
|
+
* happens in oneOfType() for any type before the one that matched.
|
|
5280
|
+
*/
|
|
5281
|
+
function PropTypeError(message) {
|
|
5282
|
+
this.message = message;
|
|
5283
|
+
this.stack = '';
|
|
5284
|
+
}
|
|
5285
|
+
// Make `instanceof Error` still work for returned errors.
|
|
5286
|
+
PropTypeError.prototype = Error.prototype;
|
|
5287
|
+
|
|
5288
|
+
function createChainableTypeChecker(validate) {
|
|
5289
|
+
if ("development" !== 'production') {
|
|
5290
|
+
var manualPropTypeCallCache = {};
|
|
5291
|
+
}
|
|
5292
|
+
function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
|
|
5293
|
+
componentName = componentName || ANONYMOUS;
|
|
5294
|
+
propFullName = propFullName || propName;
|
|
5295
|
+
if ("development" !== 'production') {
|
|
5296
|
+
if (secret !== ReactPropTypesSecret && typeof console !== 'undefined') {
|
|
5297
|
+
var cacheKey = componentName + ':' + propName;
|
|
5298
|
+
if (!manualPropTypeCallCache[cacheKey]) {
|
|
5299
|
+
"development" !== 'production' ? warning(false, 'You are manually calling a React.PropTypes validation ' + 'function for the `%s` prop on `%s`. This is deprecated ' + 'and will not work in production with the next major version. ' + 'You may be seeing this warning due to a third-party PropTypes ' + 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.', propFullName, componentName) : void 0;
|
|
5300
|
+
manualPropTypeCallCache[cacheKey] = true;
|
|
5301
|
+
}
|
|
5302
|
+
}
|
|
5303
|
+
}
|
|
5304
|
+
if (props[propName] == null) {
|
|
5305
|
+
if (isRequired) {
|
|
5306
|
+
if (props[propName] === null) {
|
|
5307
|
+
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
|
|
5308
|
+
}
|
|
5309
|
+
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
|
|
5310
|
+
}
|
|
5311
|
+
return null;
|
|
5312
|
+
} else {
|
|
5313
|
+
return validate(props, propName, componentName, location, propFullName);
|
|
5314
|
+
}
|
|
5315
|
+
}
|
|
5316
|
+
|
|
5317
|
+
var chainedCheckType = checkType.bind(null, false);
|
|
5318
|
+
chainedCheckType.isRequired = checkType.bind(null, true);
|
|
5319
|
+
|
|
5320
|
+
return chainedCheckType;
|
|
5321
|
+
}
|
|
5322
|
+
|
|
5323
|
+
function createPrimitiveTypeChecker(expectedType) {
|
|
5324
|
+
function validate(props, propName, componentName, location, propFullName, secret) {
|
|
5325
|
+
var propValue = props[propName];
|
|
5326
|
+
var propType = getPropType(propValue);
|
|
5327
|
+
if (propType !== expectedType) {
|
|
5328
|
+
// `propValue` being instance of, say, date/regexp, pass the 'object'
|
|
5329
|
+
// check, but we can offer a more precise error message here rather than
|
|
5330
|
+
// 'of type `object`'.
|
|
5331
|
+
var preciseType = getPreciseType(propValue);
|
|
5332
|
+
|
|
5333
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
|
|
5334
|
+
}
|
|
5335
|
+
return null;
|
|
5336
|
+
}
|
|
5337
|
+
return createChainableTypeChecker(validate);
|
|
5338
|
+
}
|
|
5339
|
+
|
|
5340
|
+
function createAnyTypeChecker() {
|
|
5341
|
+
return createChainableTypeChecker(emptyFunction.thatReturnsNull);
|
|
5342
|
+
}
|
|
5343
|
+
|
|
5344
|
+
function createArrayOfTypeChecker(typeChecker) {
|
|
5345
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
5346
|
+
if (typeof typeChecker !== 'function') {
|
|
5347
|
+
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
|
|
5348
|
+
}
|
|
5349
|
+
var propValue = props[propName];
|
|
5350
|
+
if (!Array.isArray(propValue)) {
|
|
5351
|
+
var propType = getPropType(propValue);
|
|
5352
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
|
|
5353
|
+
}
|
|
5354
|
+
for (var i = 0; i < propValue.length; i++) {
|
|
5355
|
+
var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
|
|
5356
|
+
if (error instanceof Error) {
|
|
5357
|
+
return error;
|
|
5358
|
+
}
|
|
5359
|
+
}
|
|
5360
|
+
return null;
|
|
5361
|
+
}
|
|
5362
|
+
return createChainableTypeChecker(validate);
|
|
5363
|
+
}
|
|
5364
|
+
|
|
5365
|
+
function createElementTypeChecker() {
|
|
5366
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
5367
|
+
var propValue = props[propName];
|
|
5368
|
+
if (!isValidElement(propValue)) {
|
|
5369
|
+
var propType = getPropType(propValue);
|
|
5370
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
|
|
5371
|
+
}
|
|
5372
|
+
return null;
|
|
5373
|
+
}
|
|
5374
|
+
return createChainableTypeChecker(validate);
|
|
5375
|
+
}
|
|
5376
|
+
|
|
5377
|
+
function createInstanceTypeChecker(expectedClass) {
|
|
5378
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
5379
|
+
if (!(props[propName] instanceof expectedClass)) {
|
|
5380
|
+
var expectedClassName = expectedClass.name || ANONYMOUS;
|
|
5381
|
+
var actualClassName = getClassName(props[propName]);
|
|
5382
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
|
|
5383
|
+
}
|
|
5384
|
+
return null;
|
|
5385
|
+
}
|
|
5386
|
+
return createChainableTypeChecker(validate);
|
|
5387
|
+
}
|
|
5388
|
+
|
|
5389
|
+
function createEnumTypeChecker(expectedValues) {
|
|
5390
|
+
if (!Array.isArray(expectedValues)) {
|
|
5391
|
+
"development" !== 'production' ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0;
|
|
5392
|
+
return emptyFunction.thatReturnsNull;
|
|
5393
|
+
}
|
|
5394
|
+
|
|
5395
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
5396
|
+
var propValue = props[propName];
|
|
5397
|
+
for (var i = 0; i < expectedValues.length; i++) {
|
|
5398
|
+
if (is(propValue, expectedValues[i])) {
|
|
5399
|
+
return null;
|
|
5400
|
+
}
|
|
5401
|
+
}
|
|
5402
|
+
|
|
5403
|
+
var valuesString = JSON.stringify(expectedValues);
|
|
5404
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
|
|
5405
|
+
}
|
|
5406
|
+
return createChainableTypeChecker(validate);
|
|
5407
|
+
}
|
|
5408
|
+
|
|
5409
|
+
function createObjectOfTypeChecker(typeChecker) {
|
|
5410
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
5411
|
+
if (typeof typeChecker !== 'function') {
|
|
5412
|
+
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
|
|
5413
|
+
}
|
|
5414
|
+
var propValue = props[propName];
|
|
5415
|
+
var propType = getPropType(propValue);
|
|
5416
|
+
if (propType !== 'object') {
|
|
5417
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
|
|
5418
|
+
}
|
|
5419
|
+
for (var key in propValue) {
|
|
5420
|
+
if (propValue.hasOwnProperty(key)) {
|
|
5421
|
+
var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
|
5422
|
+
if (error instanceof Error) {
|
|
5423
|
+
return error;
|
|
5424
|
+
}
|
|
5425
|
+
}
|
|
5426
|
+
}
|
|
5427
|
+
return null;
|
|
5428
|
+
}
|
|
5429
|
+
return createChainableTypeChecker(validate);
|
|
5430
|
+
}
|
|
5431
|
+
|
|
5432
|
+
function createUnionTypeChecker(arrayOfTypeCheckers) {
|
|
5433
|
+
if (!Array.isArray(arrayOfTypeCheckers)) {
|
|
5434
|
+
"development" !== 'production' ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
|
|
5435
|
+
return emptyFunction.thatReturnsNull;
|
|
5436
|
+
}
|
|
5437
|
+
|
|
5438
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
5439
|
+
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
5440
|
+
var checker = arrayOfTypeCheckers[i];
|
|
5441
|
+
if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {
|
|
5442
|
+
return null;
|
|
5443
|
+
}
|
|
5444
|
+
}
|
|
5445
|
+
|
|
5446
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
|
|
5447
|
+
}
|
|
5448
|
+
return createChainableTypeChecker(validate);
|
|
5449
|
+
}
|
|
5450
|
+
|
|
5451
|
+
function createNodeChecker() {
|
|
5452
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
5453
|
+
if (!isNode(props[propName])) {
|
|
5454
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
|
|
5455
|
+
}
|
|
5456
|
+
return null;
|
|
5457
|
+
}
|
|
5458
|
+
return createChainableTypeChecker(validate);
|
|
5459
|
+
}
|
|
5460
|
+
|
|
5461
|
+
function createShapeTypeChecker(shapeTypes) {
|
|
5462
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
5463
|
+
var propValue = props[propName];
|
|
5464
|
+
var propType = getPropType(propValue);
|
|
5465
|
+
if (propType !== 'object') {
|
|
5466
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
|
5467
|
+
}
|
|
5468
|
+
for (var key in shapeTypes) {
|
|
5469
|
+
var checker = shapeTypes[key];
|
|
5470
|
+
if (!checker) {
|
|
5471
|
+
continue;
|
|
5472
|
+
}
|
|
5473
|
+
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
|
5474
|
+
if (error) {
|
|
5475
|
+
return error;
|
|
5476
|
+
}
|
|
5477
|
+
}
|
|
5478
|
+
return null;
|
|
5479
|
+
}
|
|
5480
|
+
return createChainableTypeChecker(validate);
|
|
5481
|
+
}
|
|
5482
|
+
|
|
5483
|
+
function isNode(propValue) {
|
|
5484
|
+
switch (typeof propValue) {
|
|
5485
|
+
case 'number':
|
|
5486
|
+
case 'string':
|
|
5487
|
+
case 'undefined':
|
|
5488
|
+
return true;
|
|
5489
|
+
case 'boolean':
|
|
5490
|
+
return !propValue;
|
|
5491
|
+
case 'object':
|
|
5492
|
+
if (Array.isArray(propValue)) {
|
|
5493
|
+
return propValue.every(isNode);
|
|
5494
|
+
}
|
|
5495
|
+
if (propValue === null || isValidElement(propValue)) {
|
|
5496
|
+
return true;
|
|
5497
|
+
}
|
|
5498
|
+
|
|
5499
|
+
var iteratorFn = getIteratorFn(propValue);
|
|
5500
|
+
if (iteratorFn) {
|
|
5501
|
+
var iterator = iteratorFn.call(propValue);
|
|
5502
|
+
var step;
|
|
5503
|
+
if (iteratorFn !== propValue.entries) {
|
|
5504
|
+
while (!(step = iterator.next()).done) {
|
|
5505
|
+
if (!isNode(step.value)) {
|
|
5506
|
+
return false;
|
|
5507
|
+
}
|
|
5508
|
+
}
|
|
5509
|
+
} else {
|
|
5510
|
+
// Iterator will provide entry [k,v] tuples rather than values.
|
|
5511
|
+
while (!(step = iterator.next()).done) {
|
|
5512
|
+
var entry = step.value;
|
|
5513
|
+
if (entry) {
|
|
5514
|
+
if (!isNode(entry[1])) {
|
|
5515
|
+
return false;
|
|
5516
|
+
}
|
|
5517
|
+
}
|
|
5518
|
+
}
|
|
5519
|
+
}
|
|
5520
|
+
} else {
|
|
5521
|
+
return false;
|
|
5522
|
+
}
|
|
5523
|
+
|
|
5524
|
+
return true;
|
|
5525
|
+
default:
|
|
5526
|
+
return false;
|
|
5527
|
+
}
|
|
5528
|
+
}
|
|
5529
|
+
|
|
5530
|
+
function isSymbol(propType, propValue) {
|
|
5531
|
+
// Native Symbol.
|
|
5532
|
+
if (propType === 'symbol') {
|
|
5533
|
+
return true;
|
|
5534
|
+
}
|
|
5535
|
+
|
|
5536
|
+
// 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
|
|
5537
|
+
if (propValue['@@toStringTag'] === 'Symbol') {
|
|
5538
|
+
return true;
|
|
5539
|
+
}
|
|
5540
|
+
|
|
5541
|
+
// Fallback for non-spec compliant Symbols which are polyfilled.
|
|
5542
|
+
if (typeof Symbol === 'function' && propValue instanceof Symbol) {
|
|
5543
|
+
return true;
|
|
5544
|
+
}
|
|
5545
|
+
|
|
5546
|
+
return false;
|
|
5547
|
+
}
|
|
5548
|
+
|
|
5549
|
+
// Equivalent of `typeof` but with special handling for array and regexp.
|
|
5550
|
+
function getPropType(propValue) {
|
|
5551
|
+
var propType = typeof propValue;
|
|
5552
|
+
if (Array.isArray(propValue)) {
|
|
5553
|
+
return 'array';
|
|
5554
|
+
}
|
|
5555
|
+
if (propValue instanceof RegExp) {
|
|
5556
|
+
// Old webkits (at least until Android 4.0) return 'function' rather than
|
|
5557
|
+
// 'object' for typeof a RegExp. We'll normalize this here so that /bla/
|
|
5558
|
+
// passes PropTypes.object.
|
|
5559
|
+
return 'object';
|
|
5560
|
+
}
|
|
5561
|
+
if (isSymbol(propType, propValue)) {
|
|
5562
|
+
return 'symbol';
|
|
5563
|
+
}
|
|
5564
|
+
return propType;
|
|
5565
|
+
}
|
|
5566
|
+
|
|
5567
|
+
// This handles more types than `getPropType`. Only used for error messages.
|
|
5568
|
+
// See `createPrimitiveTypeChecker`.
|
|
5569
|
+
function getPreciseType(propValue) {
|
|
5570
|
+
var propType = getPropType(propValue);
|
|
5571
|
+
if (propType === 'object') {
|
|
5572
|
+
if (propValue instanceof Date) {
|
|
5573
|
+
return 'date';
|
|
5574
|
+
} else if (propValue instanceof RegExp) {
|
|
5575
|
+
return 'regexp';
|
|
5576
|
+
}
|
|
5577
|
+
}
|
|
5578
|
+
return propType;
|
|
5579
|
+
}
|
|
5580
|
+
|
|
5581
|
+
// Returns class name of the object, if any.
|
|
5582
|
+
function getClassName(propValue) {
|
|
5583
|
+
if (!propValue.constructor || !propValue.constructor.name) {
|
|
5584
|
+
return ANONYMOUS;
|
|
5585
|
+
}
|
|
5586
|
+
return propValue.constructor.name;
|
|
5587
|
+
}
|
|
5588
|
+
|
|
5589
|
+
ReactPropTypes.checkPropTypes = checkPropTypes;
|
|
5590
|
+
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
5591
|
+
|
|
5592
|
+
return ReactPropTypes;
|
|
5593
|
+
};
|
|
5594
|
+
|
|
5595
|
+
},{"45":45,"47":47,"49":49,"51":51,"53":53}],53:[function(_dereq_,module,exports){
|
|
5596
|
+
/**
|
|
5597
|
+
* Copyright 2013-present, Facebook, Inc.
|
|
5598
|
+
* All rights reserved.
|
|
5599
|
+
*
|
|
5600
|
+
* This source code is licensed under the BSD-style license found in the
|
|
5601
|
+
* LICENSE file in the root directory of this source tree. An additional grant
|
|
5602
|
+
* of patent rights can be found in the PATENTS file in the same directory.
|
|
5603
|
+
*/
|
|
5604
|
+
|
|
5605
|
+
'use strict';
|
|
5606
|
+
|
|
5607
|
+
const ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
|
5608
|
+
|
|
5609
|
+
module.exports = ReactPropTypesSecret;
|
|
5610
|
+
|
|
5392
5611
|
},{}]},{},[32])(32)
|
|
5393
5612
|
});
|