react 15.4.2 → 15.5.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/README.md +0 -7
- package/dist/react-with-addons.js +876 -634
- package/dist/react-with-addons.min.js +3 -3
- package/dist/react.js +704 -485
- package/dist/react.min.js +2 -2
- package/lib/React.js +15 -0
- package/lib/ReactCSSTransitionGroup.js +5 -3
- package/lib/ReactCSSTransitionGroupChild.js +131 -113
- package/lib/ReactClass.js +7 -1
- package/lib/ReactElementValidator.js +20 -1
- package/lib/ReactPropTypes.js +4 -419
- package/lib/ReactTransitionGroup.js +5 -2
- package/lib/ReactUMDEntry.js +4 -3
- package/lib/ReactVersion.js +1 -1
- package/lib/ReactWithAddonsUMDEntry.js +4 -3
- package/lib/getNextDebugIDUMDShim.js +17 -0
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -13,11 +13,4 @@ To use React in production mode, set the environment variable `NODE_ENV` to `pro
|
|
|
13
13
|
|
|
14
14
|
```js
|
|
15
15
|
var React = require('react');
|
|
16
|
-
|
|
17
|
-
// Addons are in separate packages:
|
|
18
|
-
var createFragment = require('react-addons-create-fragment');
|
|
19
|
-
var immutabilityHelpers = require('react-addons-update');
|
|
20
|
-
var CSSTransitionGroup = require('react-addons-css-transition-group');
|
|
21
16
|
```
|
|
22
|
-
|
|
23
|
-
For a complete list of addons visit the [addons documentation page](https://facebook.github.io/react/docs/addons.html).
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* React (with addons) v15.
|
|
2
|
+
* React (with addons) v15.5.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
|
|
|
@@ -455,6 +470,8 @@ function _possibleConstructorReturn(self, call) { if (!self) { throw new Referen
|
|
|
455
470
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
456
471
|
|
|
457
472
|
var React = _dereq_(5);
|
|
473
|
+
var propTypesFactory = _dereq_(52);
|
|
474
|
+
var PropTypes = propTypesFactory(React.isValidElement);
|
|
458
475
|
|
|
459
476
|
var ReactTransitionGroup = _dereq_(29);
|
|
460
477
|
var ReactCSSTransitionGroupChild = _dereq_(8);
|
|
@@ -523,9 +540,9 @@ ReactCSSTransitionGroup.displayName = 'ReactCSSTransitionGroup';
|
|
|
523
540
|
ReactCSSTransitionGroup.propTypes = {
|
|
524
541
|
transitionName: ReactCSSTransitionGroupChild.propTypes.name,
|
|
525
542
|
|
|
526
|
-
transitionAppear:
|
|
527
|
-
transitionEnter:
|
|
528
|
-
transitionLeave:
|
|
543
|
+
transitionAppear: PropTypes.bool,
|
|
544
|
+
transitionEnter: PropTypes.bool,
|
|
545
|
+
transitionLeave: PropTypes.bool,
|
|
529
546
|
transitionAppearTimeout: createTransitionTimeoutPropValidator('Appear'),
|
|
530
547
|
transitionEnterTimeout: createTransitionTimeoutPropValidator('Enter'),
|
|
531
548
|
transitionLeaveTimeout: createTransitionTimeoutPropValidator('Leave')
|
|
@@ -538,7 +555,7 @@ ReactCSSTransitionGroup.defaultProps = {
|
|
|
538
555
|
|
|
539
556
|
|
|
540
557
|
module.exports = ReactCSSTransitionGroup;
|
|
541
|
-
},{"29":29,"
|
|
558
|
+
},{"29":29,"5":5,"50":50,"52":52,"8":8}],8:[function(_dereq_,module,exports){
|
|
542
559
|
/**
|
|
543
560
|
* Copyright 2013-present, Facebook, Inc.
|
|
544
561
|
* All rights reserved.
|
|
@@ -551,120 +568,134 @@ module.exports = ReactCSSTransitionGroup;
|
|
|
551
568
|
|
|
552
569
|
'use strict';
|
|
553
570
|
|
|
571
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
572
|
+
|
|
573
|
+
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
574
|
+
|
|
575
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
576
|
+
|
|
554
577
|
var React = _dereq_(5);
|
|
555
578
|
var ReactAddonsDOMDependencies = _dereq_(6);
|
|
556
579
|
|
|
557
|
-
var
|
|
580
|
+
var propTypesFactory = _dereq_(52);
|
|
581
|
+
var PropTypes = propTypesFactory(React.isValidElement);
|
|
582
|
+
|
|
583
|
+
var CSSCore = _dereq_(43);
|
|
558
584
|
var ReactTransitionEvents = _dereq_(28);
|
|
559
585
|
|
|
560
|
-
var onlyChild = _dereq_(
|
|
586
|
+
var onlyChild = _dereq_(38);
|
|
561
587
|
|
|
562
588
|
var TICK = 17;
|
|
563
589
|
|
|
564
|
-
var ReactCSSTransitionGroupChild =
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
propTypes: {
|
|
568
|
-
name: React.PropTypes.oneOfType([React.PropTypes.string, React.PropTypes.shape({
|
|
569
|
-
enter: React.PropTypes.string,
|
|
570
|
-
leave: React.PropTypes.string,
|
|
571
|
-
active: React.PropTypes.string
|
|
572
|
-
}), React.PropTypes.shape({
|
|
573
|
-
enter: React.PropTypes.string,
|
|
574
|
-
enterActive: React.PropTypes.string,
|
|
575
|
-
leave: React.PropTypes.string,
|
|
576
|
-
leaveActive: React.PropTypes.string,
|
|
577
|
-
appear: React.PropTypes.string,
|
|
578
|
-
appearActive: React.PropTypes.string
|
|
579
|
-
})]).isRequired,
|
|
580
|
-
|
|
581
|
-
// Once we require timeouts to be specified, we can remove the
|
|
582
|
-
// boolean flags (appear etc.) and just accept a number
|
|
583
|
-
// or a bool for the timeout flags (appearTimeout etc.)
|
|
584
|
-
appear: React.PropTypes.bool,
|
|
585
|
-
enter: React.PropTypes.bool,
|
|
586
|
-
leave: React.PropTypes.bool,
|
|
587
|
-
appearTimeout: React.PropTypes.number,
|
|
588
|
-
enterTimeout: React.PropTypes.number,
|
|
589
|
-
leaveTimeout: React.PropTypes.number
|
|
590
|
-
},
|
|
590
|
+
var ReactCSSTransitionGroupChild = function (_React$Component) {
|
|
591
|
+
_inherits(ReactCSSTransitionGroupChild, _React$Component);
|
|
591
592
|
|
|
592
|
-
|
|
593
|
-
var
|
|
593
|
+
function ReactCSSTransitionGroupChild() {
|
|
594
|
+
var _temp, _this, _ret;
|
|
594
595
|
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
return;
|
|
596
|
+
_classCallCheck(this, ReactCSSTransitionGroupChild);
|
|
597
|
+
|
|
598
|
+
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
|
599
|
+
args[_key] = arguments[_key];
|
|
600
600
|
}
|
|
601
601
|
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
var timeout = null;
|
|
602
|
+
return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this._isMounted = false, _this.transition = function (animationType, finishCallback, userSpecifiedDelay) {
|
|
603
|
+
var node = ReactAddonsDOMDependencies.getReactDOM().findDOMNode(_this);
|
|
605
604
|
|
|
606
|
-
|
|
607
|
-
|
|
605
|
+
if (!node) {
|
|
606
|
+
if (finishCallback) {
|
|
607
|
+
finishCallback();
|
|
608
|
+
}
|
|
608
609
|
return;
|
|
609
610
|
}
|
|
610
611
|
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
CSSCore.removeClass(node, activeClassName);
|
|
612
|
+
var className = _this.props.name[animationType] || _this.props.name + '-' + animationType;
|
|
613
|
+
var activeClassName = _this.props.name[animationType + 'Active'] || className + '-active';
|
|
614
|
+
var timeout = null;
|
|
615
615
|
|
|
616
|
-
|
|
616
|
+
var endListener = function (e) {
|
|
617
|
+
if (e && e.target !== node) {
|
|
618
|
+
return;
|
|
619
|
+
}
|
|
617
620
|
|
|
618
|
-
|
|
619
|
-
// a leave animation and telling it to remove the child.
|
|
620
|
-
if (finishCallback) {
|
|
621
|
-
finishCallback();
|
|
622
|
-
}
|
|
623
|
-
};
|
|
621
|
+
clearTimeout(timeout);
|
|
624
622
|
|
|
625
|
-
|
|
623
|
+
CSSCore.removeClass(node, className);
|
|
624
|
+
CSSCore.removeClass(node, activeClassName);
|
|
626
625
|
|
|
627
|
-
|
|
628
|
-
this.queueClassAndNode(activeClassName, node);
|
|
626
|
+
ReactTransitionEvents.removeEndEventListener(node, endListener);
|
|
629
627
|
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
// DEPRECATED: this listener will be removed in a future version of react
|
|
637
|
-
ReactTransitionEvents.addEndEventListener(node, endListener);
|
|
638
|
-
}
|
|
639
|
-
},
|
|
628
|
+
// Usually this optional callback is used for informing an owner of
|
|
629
|
+
// a leave animation and telling it to remove the child.
|
|
630
|
+
if (finishCallback) {
|
|
631
|
+
finishCallback();
|
|
632
|
+
}
|
|
633
|
+
};
|
|
640
634
|
|
|
641
|
-
|
|
642
|
-
this.classNameAndNodeQueue.push({
|
|
643
|
-
className: className,
|
|
644
|
-
node: node
|
|
645
|
-
});
|
|
635
|
+
CSSCore.addClass(node, className);
|
|
646
636
|
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
}
|
|
650
|
-
},
|
|
637
|
+
// Need to do this to actually trigger a transition.
|
|
638
|
+
_this.queueClassAndNode(activeClassName, node);
|
|
651
639
|
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
640
|
+
// If the user specified a timeout delay.
|
|
641
|
+
if (userSpecifiedDelay) {
|
|
642
|
+
// Clean-up the animation after the specified delay
|
|
643
|
+
timeout = setTimeout(endListener, userSpecifiedDelay);
|
|
644
|
+
_this.transitionTimeouts.push(timeout);
|
|
645
|
+
} else {
|
|
646
|
+
// DEPRECATED: this listener will be removed in a future version of react
|
|
647
|
+
ReactTransitionEvents.addEndEventListener(node, endListener);
|
|
648
|
+
}
|
|
649
|
+
}, _this.queueClassAndNode = function (className, node) {
|
|
650
|
+
_this.classNameAndNodeQueue.push({
|
|
651
|
+
className: className,
|
|
652
|
+
node: node
|
|
656
653
|
});
|
|
657
|
-
}
|
|
658
|
-
this.classNameAndNodeQueue.length = 0;
|
|
659
|
-
this.timeout = null;
|
|
660
|
-
},
|
|
661
654
|
|
|
662
|
-
|
|
655
|
+
if (!_this.timeout) {
|
|
656
|
+
_this.timeout = setTimeout(_this.flushClassNameAndNodeQueue, TICK);
|
|
657
|
+
}
|
|
658
|
+
}, _this.flushClassNameAndNodeQueue = function () {
|
|
659
|
+
if (_this._isMounted) {
|
|
660
|
+
_this.classNameAndNodeQueue.forEach(function (obj) {
|
|
661
|
+
CSSCore.addClass(obj.node, obj.className);
|
|
662
|
+
});
|
|
663
|
+
}
|
|
664
|
+
_this.classNameAndNodeQueue.length = 0;
|
|
665
|
+
_this.timeout = null;
|
|
666
|
+
}, _this.componentWillAppear = function (done) {
|
|
667
|
+
if (_this.props.appear) {
|
|
668
|
+
_this.transition('appear', done, _this.props.appearTimeout);
|
|
669
|
+
} else {
|
|
670
|
+
done();
|
|
671
|
+
}
|
|
672
|
+
}, _this.componentWillEnter = function (done) {
|
|
673
|
+
if (_this.props.enter) {
|
|
674
|
+
_this.transition('enter', done, _this.props.enterTimeout);
|
|
675
|
+
} else {
|
|
676
|
+
done();
|
|
677
|
+
}
|
|
678
|
+
}, _this.componentWillLeave = function (done) {
|
|
679
|
+
if (_this.props.leave) {
|
|
680
|
+
_this.transition('leave', done, _this.props.leaveTimeout);
|
|
681
|
+
} else {
|
|
682
|
+
done();
|
|
683
|
+
}
|
|
684
|
+
}, _temp), _possibleConstructorReturn(_this, _ret);
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
ReactCSSTransitionGroupChild.prototype.componentWillMount = function componentWillMount() {
|
|
663
688
|
this.classNameAndNodeQueue = [];
|
|
664
689
|
this.transitionTimeouts = [];
|
|
665
|
-
}
|
|
690
|
+
};
|
|
691
|
+
|
|
692
|
+
ReactCSSTransitionGroupChild.prototype.componentDidMount = function componentDidMount() {
|
|
693
|
+
this._isMounted = true;
|
|
694
|
+
};
|
|
695
|
+
|
|
696
|
+
ReactCSSTransitionGroupChild.prototype.componentWillUnmount = function componentWillUnmount() {
|
|
697
|
+
this._isMounted = false;
|
|
666
698
|
|
|
667
|
-
componentWillUnmount: function () {
|
|
668
699
|
if (this.timeout) {
|
|
669
700
|
clearTimeout(this.timeout);
|
|
670
701
|
}
|
|
@@ -673,39 +704,43 @@ var ReactCSSTransitionGroupChild = React.createClass({
|
|
|
673
704
|
});
|
|
674
705
|
|
|
675
706
|
this.classNameAndNodeQueue.length = 0;
|
|
676
|
-
}
|
|
707
|
+
};
|
|
677
708
|
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
} else {
|
|
682
|
-
done();
|
|
683
|
-
}
|
|
684
|
-
},
|
|
709
|
+
ReactCSSTransitionGroupChild.prototype.render = function render() {
|
|
710
|
+
return onlyChild(this.props.children);
|
|
711
|
+
};
|
|
685
712
|
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
this.transition('enter', done, this.props.enterTimeout);
|
|
689
|
-
} else {
|
|
690
|
-
done();
|
|
691
|
-
}
|
|
692
|
-
},
|
|
713
|
+
return ReactCSSTransitionGroupChild;
|
|
714
|
+
}(React.Component);
|
|
693
715
|
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
716
|
+
ReactCSSTransitionGroupChild.propTypes = {
|
|
717
|
+
name: PropTypes.oneOfType([PropTypes.string, PropTypes.shape({
|
|
718
|
+
enter: PropTypes.string,
|
|
719
|
+
leave: PropTypes.string,
|
|
720
|
+
active: PropTypes.string
|
|
721
|
+
}), PropTypes.shape({
|
|
722
|
+
enter: PropTypes.string,
|
|
723
|
+
enterActive: PropTypes.string,
|
|
724
|
+
leave: PropTypes.string,
|
|
725
|
+
leaveActive: PropTypes.string,
|
|
726
|
+
appear: PropTypes.string,
|
|
727
|
+
appearActive: PropTypes.string
|
|
728
|
+
})]).isRequired,
|
|
729
|
+
|
|
730
|
+
// Once we require timeouts to be specified, we can remove the
|
|
731
|
+
// boolean flags (appear etc.) and just accept a number
|
|
732
|
+
// or a bool for the timeout flags (appearTimeout etc.)
|
|
733
|
+
appear: PropTypes.bool,
|
|
734
|
+
enter: PropTypes.bool,
|
|
735
|
+
leave: PropTypes.bool,
|
|
736
|
+
appearTimeout: PropTypes.number,
|
|
737
|
+
enterTimeout: PropTypes.number,
|
|
738
|
+
leaveTimeout: PropTypes.number
|
|
739
|
+
};
|
|
701
740
|
|
|
702
|
-
render: function () {
|
|
703
|
-
return onlyChild(this.props.children);
|
|
704
|
-
}
|
|
705
|
-
});
|
|
706
741
|
|
|
707
742
|
module.exports = ReactCSSTransitionGroupChild;
|
|
708
|
-
},{"28":28,"
|
|
743
|
+
},{"28":28,"38":38,"43":43,"5":5,"52":52,"6":6}],9:[function(_dereq_,module,exports){
|
|
709
744
|
/**
|
|
710
745
|
* Copyright 2013-present, Facebook, Inc.
|
|
711
746
|
* All rights reserved.
|
|
@@ -721,8 +756,8 @@ module.exports = ReactCSSTransitionGroupChild;
|
|
|
721
756
|
var PooledClass = _dereq_(4);
|
|
722
757
|
var ReactElement = _dereq_(16);
|
|
723
758
|
|
|
724
|
-
var emptyFunction = _dereq_(
|
|
725
|
-
var traverseAllChildren = _dereq_(
|
|
759
|
+
var emptyFunction = _dereq_(45);
|
|
760
|
+
var traverseAllChildren = _dereq_(41);
|
|
726
761
|
|
|
727
762
|
var twoArgumentPooler = PooledClass.twoArgumentPooler;
|
|
728
763
|
var fourArgumentPooler = PooledClass.fourArgumentPooler;
|
|
@@ -896,7 +931,7 @@ var ReactChildren = {
|
|
|
896
931
|
};
|
|
897
932
|
|
|
898
933
|
module.exports = ReactChildren;
|
|
899
|
-
},{"16":16,"4":4,"
|
|
934
|
+
},{"16":16,"4":4,"41":41,"45":45}],10:[function(_dereq_,module,exports){
|
|
900
935
|
/**
|
|
901
936
|
* Copyright 2013-present, Facebook, Inc.
|
|
902
937
|
* All rights reserved.
|
|
@@ -909,17 +944,17 @@ module.exports = ReactChildren;
|
|
|
909
944
|
|
|
910
945
|
'use strict';
|
|
911
946
|
|
|
912
|
-
var _prodInvariant = _dereq_(
|
|
913
|
-
_assign = _dereq_(
|
|
947
|
+
var _prodInvariant = _dereq_(39),
|
|
948
|
+
_assign = _dereq_(50);
|
|
914
949
|
|
|
915
950
|
var ReactComponent = _dereq_(11);
|
|
916
951
|
var ReactElement = _dereq_(16);
|
|
917
952
|
var ReactPropTypeLocationNames = _dereq_(22);
|
|
918
953
|
var ReactNoopUpdateQueue = _dereq_(21);
|
|
919
954
|
|
|
920
|
-
var emptyObject = _dereq_(
|
|
921
|
-
var invariant = _dereq_(
|
|
922
|
-
var warning = _dereq_(
|
|
955
|
+
var emptyObject = _dereq_(46);
|
|
956
|
+
var invariant = _dereq_(47);
|
|
957
|
+
var warning = _dereq_(49);
|
|
923
958
|
|
|
924
959
|
var MIXINS_KEY = 'mixins';
|
|
925
960
|
|
|
@@ -1050,7 +1085,6 @@ var ReactClassInterface = {
|
|
|
1050
1085
|
* }
|
|
1051
1086
|
*
|
|
1052
1087
|
* @return {ReactComponent}
|
|
1053
|
-
* @nosideeffects
|
|
1054
1088
|
* @required
|
|
1055
1089
|
*/
|
|
1056
1090
|
render: 'DEFINE_ONCE',
|
|
@@ -1506,6 +1540,8 @@ var ReactClassMixin = {
|
|
|
1506
1540
|
var ReactClassComponent = function () {};
|
|
1507
1541
|
_assign(ReactClassComponent.prototype, ReactComponent.prototype, ReactClassMixin);
|
|
1508
1542
|
|
|
1543
|
+
var didWarnDeprecated = false;
|
|
1544
|
+
|
|
1509
1545
|
/**
|
|
1510
1546
|
* Module for creating composite components.
|
|
1511
1547
|
*
|
|
@@ -1522,6 +1558,11 @@ var ReactClass = {
|
|
|
1522
1558
|
* @public
|
|
1523
1559
|
*/
|
|
1524
1560
|
createClass: function (spec) {
|
|
1561
|
+
if ("development" !== 'production') {
|
|
1562
|
+
"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;
|
|
1563
|
+
didWarnDeprecated = true;
|
|
1564
|
+
}
|
|
1565
|
+
|
|
1525
1566
|
// To keep our warnings more understandable, we'll use a little hack here to
|
|
1526
1567
|
// ensure that Constructor.name !== 'Constructor'. This makes sure we don't
|
|
1527
1568
|
// unnecessarily identify a class without displayName as 'Constructor'.
|
|
@@ -1613,7 +1654,7 @@ var ReactClass = {
|
|
|
1613
1654
|
};
|
|
1614
1655
|
|
|
1615
1656
|
module.exports = ReactClass;
|
|
1616
|
-
},{"11":11,"16":16,"21":21,"22":22,"
|
|
1657
|
+
},{"11":11,"16":16,"21":21,"22":22,"39":39,"46":46,"47":47,"49":49,"50":50}],11:[function(_dereq_,module,exports){
|
|
1617
1658
|
/**
|
|
1618
1659
|
* Copyright 2013-present, Facebook, Inc.
|
|
1619
1660
|
* All rights reserved.
|
|
@@ -1626,14 +1667,14 @@ module.exports = ReactClass;
|
|
|
1626
1667
|
|
|
1627
1668
|
'use strict';
|
|
1628
1669
|
|
|
1629
|
-
var _prodInvariant = _dereq_(
|
|
1670
|
+
var _prodInvariant = _dereq_(39);
|
|
1630
1671
|
|
|
1631
1672
|
var ReactNoopUpdateQueue = _dereq_(21);
|
|
1632
1673
|
|
|
1633
1674
|
var canDefineProperty = _dereq_(33);
|
|
1634
|
-
var emptyObject = _dereq_(
|
|
1635
|
-
var invariant = _dereq_(
|
|
1636
|
-
var warning = _dereq_(
|
|
1675
|
+
var emptyObject = _dereq_(46);
|
|
1676
|
+
var invariant = _dereq_(47);
|
|
1677
|
+
var warning = _dereq_(49);
|
|
1637
1678
|
|
|
1638
1679
|
/**
|
|
1639
1680
|
* Base class helpers for the updating state of a component.
|
|
@@ -1731,7 +1772,7 @@ if ("development" !== 'production') {
|
|
|
1731
1772
|
}
|
|
1732
1773
|
|
|
1733
1774
|
module.exports = ReactComponent;
|
|
1734
|
-
},{"21":21,"33":33,"
|
|
1775
|
+
},{"21":21,"33":33,"39":39,"46":46,"47":47,"49":49}],12:[function(_dereq_,module,exports){
|
|
1735
1776
|
/**
|
|
1736
1777
|
* Copyright 2016-present, Facebook, Inc.
|
|
1737
1778
|
* All rights reserved.
|
|
@@ -1745,12 +1786,12 @@ module.exports = ReactComponent;
|
|
|
1745
1786
|
|
|
1746
1787
|
'use strict';
|
|
1747
1788
|
|
|
1748
|
-
var _prodInvariant = _dereq_(
|
|
1789
|
+
var _prodInvariant = _dereq_(39);
|
|
1749
1790
|
|
|
1750
1791
|
var ReactCurrentOwner = _dereq_(14);
|
|
1751
1792
|
|
|
1752
|
-
var invariant = _dereq_(
|
|
1753
|
-
var warning = _dereq_(
|
|
1793
|
+
var invariant = _dereq_(47);
|
|
1794
|
+
var warning = _dereq_(49);
|
|
1754
1795
|
|
|
1755
1796
|
function isNative(fn) {
|
|
1756
1797
|
// Based on isNative() from Lodash
|
|
@@ -2065,7 +2106,7 @@ var ReactComponentTreeHook = {
|
|
|
2065
2106
|
};
|
|
2066
2107
|
|
|
2067
2108
|
module.exports = ReactComponentTreeHook;
|
|
2068
|
-
},{"14":14,"
|
|
2109
|
+
},{"14":14,"39":39,"47":47,"49":49}],13:[function(_dereq_,module,exports){
|
|
2069
2110
|
/**
|
|
2070
2111
|
* Copyright 2013-present, Facebook, Inc.
|
|
2071
2112
|
* All rights reserved.
|
|
@@ -2078,7 +2119,7 @@ module.exports = ReactComponentTreeHook;
|
|
|
2078
2119
|
|
|
2079
2120
|
'use strict';
|
|
2080
2121
|
|
|
2081
|
-
var shallowCompare = _dereq_(
|
|
2122
|
+
var shallowCompare = _dereq_(40);
|
|
2082
2123
|
|
|
2083
2124
|
/**
|
|
2084
2125
|
* If your React component's render function is "pure", e.g. it will render the
|
|
@@ -2113,7 +2154,7 @@ var ReactComponentWithPureRenderMixin = {
|
|
|
2113
2154
|
};
|
|
2114
2155
|
|
|
2115
2156
|
module.exports = ReactComponentWithPureRenderMixin;
|
|
2116
|
-
},{"
|
|
2157
|
+
},{"40":40}],14:[function(_dereq_,module,exports){
|
|
2117
2158
|
/**
|
|
2118
2159
|
* Copyright 2013-present, Facebook, Inc.
|
|
2119
2160
|
* All rights reserved.
|
|
@@ -2327,11 +2368,11 @@ module.exports = ReactDOMFactories;
|
|
|
2327
2368
|
|
|
2328
2369
|
'use strict';
|
|
2329
2370
|
|
|
2330
|
-
var _assign = _dereq_(
|
|
2371
|
+
var _assign = _dereq_(50);
|
|
2331
2372
|
|
|
2332
2373
|
var ReactCurrentOwner = _dereq_(14);
|
|
2333
2374
|
|
|
2334
|
-
var warning = _dereq_(
|
|
2375
|
+
var warning = _dereq_(49);
|
|
2335
2376
|
var canDefineProperty = _dereq_(33);
|
|
2336
2377
|
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
2337
2378
|
|
|
@@ -2655,7 +2696,7 @@ ReactElement.isValidElement = function (object) {
|
|
|
2655
2696
|
};
|
|
2656
2697
|
|
|
2657
2698
|
module.exports = ReactElement;
|
|
2658
|
-
},{"14":14,"17":17,"33":33,"
|
|
2699
|
+
},{"14":14,"17":17,"33":33,"49":49,"50":50}],17:[function(_dereq_,module,exports){
|
|
2659
2700
|
/**
|
|
2660
2701
|
* Copyright 2014-present, Facebook, Inc.
|
|
2661
2702
|
* All rights reserved.
|
|
@@ -2703,7 +2744,7 @@ var checkReactTypeSpec = _dereq_(34);
|
|
|
2703
2744
|
|
|
2704
2745
|
var canDefineProperty = _dereq_(33);
|
|
2705
2746
|
var getIteratorFn = _dereq_(36);
|
|
2706
|
-
var warning = _dereq_(
|
|
2747
|
+
var warning = _dereq_(49);
|
|
2707
2748
|
|
|
2708
2749
|
function getDeclarationErrorAddendum() {
|
|
2709
2750
|
if (ReactCurrentOwner.current) {
|
|
@@ -2715,6 +2756,16 @@ function getDeclarationErrorAddendum() {
|
|
|
2715
2756
|
return '';
|
|
2716
2757
|
}
|
|
2717
2758
|
|
|
2759
|
+
function getSourceInfoErrorAddendum(elementProps) {
|
|
2760
|
+
if (elementProps !== null && elementProps !== undefined && elementProps.__source !== undefined) {
|
|
2761
|
+
var source = elementProps.__source;
|
|
2762
|
+
var fileName = source.fileName.replace(/^.*[\\\/]/, '');
|
|
2763
|
+
var lineNumber = source.lineNumber;
|
|
2764
|
+
return ' Check your code at ' + fileName + ':' + lineNumber + '.';
|
|
2765
|
+
}
|
|
2766
|
+
return '';
|
|
2767
|
+
}
|
|
2768
|
+
|
|
2718
2769
|
/**
|
|
2719
2770
|
* Warn if there's no key explicitly set on dynamic arrays of children or
|
|
2720
2771
|
* object keys are not valid. This allows us to keep track of children between
|
|
@@ -2845,7 +2896,16 @@ var ReactElementValidator = {
|
|
|
2845
2896
|
if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
|
|
2846
2897
|
info += ' You likely forgot to export your component from the file ' + 'it\'s defined in.';
|
|
2847
2898
|
}
|
|
2848
|
-
|
|
2899
|
+
|
|
2900
|
+
var sourceInfo = getSourceInfoErrorAddendum(props);
|
|
2901
|
+
if (sourceInfo) {
|
|
2902
|
+
info += sourceInfo;
|
|
2903
|
+
} else {
|
|
2904
|
+
info += getDeclarationErrorAddendum();
|
|
2905
|
+
}
|
|
2906
|
+
|
|
2907
|
+
info += ReactComponentTreeHook.getCurrentStackAddendum();
|
|
2908
|
+
|
|
2849
2909
|
"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
2910
|
}
|
|
2851
2911
|
}
|
|
@@ -2909,7 +2969,7 @@ var ReactElementValidator = {
|
|
|
2909
2969
|
};
|
|
2910
2970
|
|
|
2911
2971
|
module.exports = ReactElementValidator;
|
|
2912
|
-
},{"12":12,"14":14,"16":16,"33":33,"34":34,"36":36,"
|
|
2972
|
+
},{"12":12,"14":14,"16":16,"33":33,"34":34,"36":36,"49":49}],19:[function(_dereq_,module,exports){
|
|
2913
2973
|
/**
|
|
2914
2974
|
* Copyright 2015-present, Facebook, Inc.
|
|
2915
2975
|
* All rights reserved.
|
|
@@ -2922,14 +2982,14 @@ module.exports = ReactElementValidator;
|
|
|
2922
2982
|
|
|
2923
2983
|
'use strict';
|
|
2924
2984
|
|
|
2925
|
-
var _prodInvariant = _dereq_(
|
|
2985
|
+
var _prodInvariant = _dereq_(39);
|
|
2926
2986
|
|
|
2927
2987
|
var ReactChildren = _dereq_(9);
|
|
2928
2988
|
var ReactElement = _dereq_(16);
|
|
2929
2989
|
|
|
2930
|
-
var emptyFunction = _dereq_(
|
|
2931
|
-
var invariant = _dereq_(
|
|
2932
|
-
var warning = _dereq_(
|
|
2990
|
+
var emptyFunction = _dereq_(45);
|
|
2991
|
+
var invariant = _dereq_(47);
|
|
2992
|
+
var warning = _dereq_(49);
|
|
2933
2993
|
|
|
2934
2994
|
/**
|
|
2935
2995
|
* We used to allow keyed objects to serve as a collection of ReactElements,
|
|
@@ -2978,7 +3038,7 @@ var ReactFragment = {
|
|
|
2978
3038
|
};
|
|
2979
3039
|
|
|
2980
3040
|
module.exports = ReactFragment;
|
|
2981
|
-
},{"16":16,"
|
|
3041
|
+
},{"16":16,"39":39,"45":45,"47":47,"49":49,"9":9}],20:[function(_dereq_,module,exports){
|
|
2982
3042
|
/**
|
|
2983
3043
|
* Copyright 2013-present, Facebook, Inc.
|
|
2984
3044
|
* All rights reserved.
|
|
@@ -3062,7 +3122,7 @@ module.exports = ReactLink;
|
|
|
3062
3122
|
|
|
3063
3123
|
'use strict';
|
|
3064
3124
|
|
|
3065
|
-
var warning = _dereq_(
|
|
3125
|
+
var warning = _dereq_(49);
|
|
3066
3126
|
|
|
3067
3127
|
function warnNoop(publicInstance, callerName) {
|
|
3068
3128
|
if ("development" !== 'production') {
|
|
@@ -3145,7 +3205,7 @@ var ReactNoopUpdateQueue = {
|
|
|
3145
3205
|
};
|
|
3146
3206
|
|
|
3147
3207
|
module.exports = ReactNoopUpdateQueue;
|
|
3148
|
-
},{"
|
|
3208
|
+
},{"49":49}],22:[function(_dereq_,module,exports){
|
|
3149
3209
|
/**
|
|
3150
3210
|
* Copyright 2013-present, Facebook, Inc.
|
|
3151
3211
|
* All rights reserved.
|
|
@@ -3183,428 +3243,13 @@ module.exports = ReactPropTypeLocationNames;
|
|
|
3183
3243
|
|
|
3184
3244
|
'use strict';
|
|
3185
3245
|
|
|
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
|
-
};
|
|
3246
|
+
var _require = _dereq_(16),
|
|
3247
|
+
isValidElement = _require.isValidElement;
|
|
3262
3248
|
|
|
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*/
|
|
3249
|
+
var factory = _dereq_(52);
|
|
3280
3250
|
|
|
3281
|
-
|
|
3282
|
-
|
|
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
|
-
}
|
|
3597
|
-
|
|
3598
|
-
// Returns class name of the object, if any.
|
|
3599
|
-
function getClassName(propValue) {
|
|
3600
|
-
if (!propValue.constructor || !propValue.constructor.name) {
|
|
3601
|
-
return ANONYMOUS;
|
|
3602
|
-
}
|
|
3603
|
-
return propValue.constructor.name;
|
|
3604
|
-
}
|
|
3605
|
-
|
|
3606
|
-
module.exports = ReactPropTypes;
|
|
3607
|
-
},{"16":16,"22":22,"24":24,"36":36,"44":44,"48":48}],24:[function(_dereq_,module,exports){
|
|
3251
|
+
module.exports = factory(isValidElement);
|
|
3252
|
+
},{"16":16,"52":52}],24:[function(_dereq_,module,exports){
|
|
3608
3253
|
/**
|
|
3609
3254
|
* Copyright 2013-present, Facebook, Inc.
|
|
3610
3255
|
* All rights reserved.
|
|
@@ -3634,12 +3279,12 @@ module.exports = ReactPropTypesSecret;
|
|
|
3634
3279
|
|
|
3635
3280
|
'use strict';
|
|
3636
3281
|
|
|
3637
|
-
var _assign = _dereq_(
|
|
3282
|
+
var _assign = _dereq_(50);
|
|
3638
3283
|
|
|
3639
3284
|
var ReactComponent = _dereq_(11);
|
|
3640
3285
|
var ReactNoopUpdateQueue = _dereq_(21);
|
|
3641
3286
|
|
|
3642
|
-
var emptyObject = _dereq_(
|
|
3287
|
+
var emptyObject = _dereq_(46);
|
|
3643
3288
|
|
|
3644
3289
|
/**
|
|
3645
3290
|
* Base class helpers for the updating state of a component.
|
|
@@ -3663,7 +3308,7 @@ _assign(ReactPureComponent.prototype, ReactComponent.prototype);
|
|
|
3663
3308
|
ReactPureComponent.prototype.isPureReactComponent = true;
|
|
3664
3309
|
|
|
3665
3310
|
module.exports = ReactPureComponent;
|
|
3666
|
-
},{"11":11,"21":21,"
|
|
3311
|
+
},{"11":11,"21":21,"46":46,"50":50}],26:[function(_dereq_,module,exports){
|
|
3667
3312
|
/**
|
|
3668
3313
|
* Copyright 2013-present, Facebook, Inc.
|
|
3669
3314
|
* All rights reserved.
|
|
@@ -3883,7 +3528,7 @@ module.exports = ReactTransitionChildMapping;
|
|
|
3883
3528
|
|
|
3884
3529
|
'use strict';
|
|
3885
3530
|
|
|
3886
|
-
var ExecutionEnvironment = _dereq_(
|
|
3531
|
+
var ExecutionEnvironment = _dereq_(44);
|
|
3887
3532
|
|
|
3888
3533
|
var getVendorPrefixedEventName = _dereq_(1);
|
|
3889
3534
|
|
|
@@ -3943,7 +3588,7 @@ var ReactTransitionEvents = {
|
|
|
3943
3588
|
};
|
|
3944
3589
|
|
|
3945
3590
|
module.exports = ReactTransitionEvents;
|
|
3946
|
-
},{"1":1,"
|
|
3591
|
+
},{"1":1,"44":44}],29:[function(_dereq_,module,exports){
|
|
3947
3592
|
/**
|
|
3948
3593
|
* Copyright 2013-present, Facebook, Inc.
|
|
3949
3594
|
* All rights reserved.
|
|
@@ -3956,7 +3601,7 @@ module.exports = ReactTransitionEvents;
|
|
|
3956
3601
|
|
|
3957
3602
|
'use strict';
|
|
3958
3603
|
|
|
3959
|
-
var _assign = _dereq_(
|
|
3604
|
+
var _assign = _dereq_(50);
|
|
3960
3605
|
|
|
3961
3606
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
3962
3607
|
|
|
@@ -3967,7 +3612,10 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
|
|
|
3967
3612
|
var React = _dereq_(5);
|
|
3968
3613
|
var ReactTransitionChildMapping = _dereq_(27);
|
|
3969
3614
|
|
|
3970
|
-
var
|
|
3615
|
+
var propTypesFactory = _dereq_(52);
|
|
3616
|
+
var PropTypes = propTypesFactory(React.isValidElement);
|
|
3617
|
+
|
|
3618
|
+
var emptyFunction = _dereq_(45);
|
|
3971
3619
|
|
|
3972
3620
|
/**
|
|
3973
3621
|
* A basis for animations. When children are declaratively added or removed,
|
|
@@ -4162,8 +3810,8 @@ var ReactTransitionGroup = function (_React$Component) {
|
|
|
4162
3810
|
|
|
4163
3811
|
ReactTransitionGroup.displayName = 'ReactTransitionGroup';
|
|
4164
3812
|
ReactTransitionGroup.propTypes = {
|
|
4165
|
-
component:
|
|
4166
|
-
childFactory:
|
|
3813
|
+
component: PropTypes.any,
|
|
3814
|
+
childFactory: PropTypes.func
|
|
4167
3815
|
};
|
|
4168
3816
|
ReactTransitionGroup.defaultProps = {
|
|
4169
3817
|
component: 'span',
|
|
@@ -4172,7 +3820,7 @@ ReactTransitionGroup.defaultProps = {
|
|
|
4172
3820
|
|
|
4173
3821
|
|
|
4174
3822
|
module.exports = ReactTransitionGroup;
|
|
4175
|
-
},{"27":27,"
|
|
3823
|
+
},{"27":27,"45":45,"5":5,"50":50,"52":52}],30:[function(_dereq_,module,exports){
|
|
4176
3824
|
/**
|
|
4177
3825
|
* Copyright 2013-present, Facebook, Inc.
|
|
4178
3826
|
* All rights reserved.
|
|
@@ -4185,7 +3833,7 @@ module.exports = ReactTransitionGroup;
|
|
|
4185
3833
|
|
|
4186
3834
|
'use strict';
|
|
4187
3835
|
|
|
4188
|
-
module.exports = '15.
|
|
3836
|
+
module.exports = '15.5.1';
|
|
4189
3837
|
},{}],31:[function(_dereq_,module,exports){
|
|
4190
3838
|
/**
|
|
4191
3839
|
* Copyright 2013-present, Facebook, Inc.
|
|
@@ -4207,8 +3855,8 @@ var ReactCSSTransitionGroup = _dereq_(7);
|
|
|
4207
3855
|
var ReactFragment = _dereq_(19);
|
|
4208
3856
|
var ReactTransitionGroup = _dereq_(29);
|
|
4209
3857
|
|
|
4210
|
-
var shallowCompare = _dereq_(
|
|
4211
|
-
var update = _dereq_(
|
|
3858
|
+
var shallowCompare = _dereq_(40);
|
|
3859
|
+
var update = _dereq_(42);
|
|
4212
3860
|
|
|
4213
3861
|
React.addons = {
|
|
4214
3862
|
CSSTransitionGroup: ReactCSSTransitionGroup,
|
|
@@ -4239,7 +3887,7 @@ if ("development" !== 'production') {
|
|
|
4239
3887
|
}
|
|
4240
3888
|
|
|
4241
3889
|
module.exports = React;
|
|
4242
|
-
},{"13":13,"19":19,"29":29,"3":3,"
|
|
3890
|
+
},{"13":13,"19":19,"29":29,"3":3,"40":40,"42":42,"5":5,"6":6,"7":7}],32:[function(_dereq_,module,exports){
|
|
4243
3891
|
/**
|
|
4244
3892
|
* Copyright 2013-present, Facebook, Inc.
|
|
4245
3893
|
* All rights reserved.
|
|
@@ -4252,27 +3900,28 @@ module.exports = React;
|
|
|
4252
3900
|
|
|
4253
3901
|
'use strict';
|
|
4254
3902
|
|
|
4255
|
-
var _assign = _dereq_(
|
|
3903
|
+
var _assign = _dereq_(50);
|
|
4256
3904
|
|
|
4257
3905
|
var ReactWithAddons = _dereq_(31);
|
|
4258
3906
|
|
|
4259
3907
|
// `version` will be added here by the React module.
|
|
4260
|
-
var ReactWithAddonsUMDEntry = _assign({
|
|
3908
|
+
var ReactWithAddonsUMDEntry = _assign(ReactWithAddons, {
|
|
4261
3909
|
__SECRET_INJECTED_REACT_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: null, // Will be injected by ReactDOM UMD build.
|
|
4262
3910
|
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: {
|
|
4263
3911
|
ReactCurrentOwner: _dereq_(14)
|
|
4264
3912
|
}
|
|
4265
|
-
}
|
|
3913
|
+
});
|
|
4266
3914
|
|
|
4267
3915
|
if ("development" !== 'production') {
|
|
4268
3916
|
_assign(ReactWithAddonsUMDEntry.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, {
|
|
4269
3917
|
// ReactComponentTreeHook should not be included in production.
|
|
4270
|
-
ReactComponentTreeHook: _dereq_(12)
|
|
3918
|
+
ReactComponentTreeHook: _dereq_(12),
|
|
3919
|
+
getNextDebugID: _dereq_(37)
|
|
4271
3920
|
});
|
|
4272
3921
|
}
|
|
4273
3922
|
|
|
4274
3923
|
module.exports = ReactWithAddonsUMDEntry;
|
|
4275
|
-
},{"12":12,"14":14,"31":31,"
|
|
3924
|
+
},{"12":12,"14":14,"31":31,"37":37,"50":50}],33:[function(_dereq_,module,exports){
|
|
4276
3925
|
/**
|
|
4277
3926
|
* Copyright 2013-present, Facebook, Inc.
|
|
4278
3927
|
* All rights reserved.
|
|
@@ -4312,13 +3961,13 @@ module.exports = canDefineProperty;
|
|
|
4312
3961
|
|
|
4313
3962
|
'use strict';
|
|
4314
3963
|
|
|
4315
|
-
var _prodInvariant = _dereq_(
|
|
3964
|
+
var _prodInvariant = _dereq_(39);
|
|
4316
3965
|
|
|
4317
3966
|
var ReactPropTypeLocationNames = _dereq_(22);
|
|
4318
3967
|
var ReactPropTypesSecret = _dereq_(24);
|
|
4319
3968
|
|
|
4320
|
-
var invariant = _dereq_(
|
|
4321
|
-
var warning = _dereq_(
|
|
3969
|
+
var invariant = _dereq_(47);
|
|
3970
|
+
var warning = _dereq_(49);
|
|
4322
3971
|
|
|
4323
3972
|
var ReactComponentTreeHook;
|
|
4324
3973
|
|
|
@@ -4387,7 +4036,7 @@ function checkReactTypeSpec(typeSpecs, values, location, componentName, element,
|
|
|
4387
4036
|
|
|
4388
4037
|
module.exports = checkReactTypeSpec;
|
|
4389
4038
|
}).call(this,undefined)
|
|
4390
|
-
},{"12":12,"22":22,"24":24,"
|
|
4039
|
+
},{"12":12,"22":22,"24":24,"39":39,"47":47,"49":49}],35:[function(_dereq_,module,exports){
|
|
4391
4040
|
(function (process){
|
|
4392
4041
|
/**
|
|
4393
4042
|
* Copyright 2013-present, Facebook, Inc.
|
|
@@ -4403,8 +4052,8 @@ module.exports = checkReactTypeSpec;
|
|
|
4403
4052
|
'use strict';
|
|
4404
4053
|
|
|
4405
4054
|
var KeyEscapeUtils = _dereq_(2);
|
|
4406
|
-
var traverseAllChildren = _dereq_(
|
|
4407
|
-
var warning = _dereq_(
|
|
4055
|
+
var traverseAllChildren = _dereq_(41);
|
|
4056
|
+
var warning = _dereq_(49);
|
|
4408
4057
|
|
|
4409
4058
|
var ReactComponentTreeHook;
|
|
4410
4059
|
|
|
@@ -4465,7 +4114,7 @@ function flattenChildren(children, selfDebugID) {
|
|
|
4465
4114
|
|
|
4466
4115
|
module.exports = flattenChildren;
|
|
4467
4116
|
}).call(this,undefined)
|
|
4468
|
-
},{"12":12,"2":2,"
|
|
4117
|
+
},{"12":12,"2":2,"41":41,"49":49}],36:[function(_dereq_,module,exports){
|
|
4469
4118
|
/**
|
|
4470
4119
|
* Copyright 2013-present, Facebook, Inc.
|
|
4471
4120
|
* All rights reserved.
|
|
@@ -4515,14 +4164,35 @@ module.exports = getIteratorFn;
|
|
|
4515
4164
|
* LICENSE file in the root directory of this source tree. An additional grant
|
|
4516
4165
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
4517
4166
|
*
|
|
4167
|
+
*
|
|
4518
4168
|
*/
|
|
4169
|
+
|
|
4519
4170
|
'use strict';
|
|
4520
4171
|
|
|
4521
|
-
var
|
|
4172
|
+
var nextDebugID = 1;
|
|
4173
|
+
|
|
4174
|
+
function getNextDebugID() {
|
|
4175
|
+
return nextDebugID++;
|
|
4176
|
+
}
|
|
4177
|
+
|
|
4178
|
+
module.exports = getNextDebugID;
|
|
4179
|
+
},{}],38:[function(_dereq_,module,exports){
|
|
4180
|
+
/**
|
|
4181
|
+
* Copyright 2013-present, Facebook, Inc.
|
|
4182
|
+
* All rights reserved.
|
|
4183
|
+
*
|
|
4184
|
+
* This source code is licensed under the BSD-style license found in the
|
|
4185
|
+
* LICENSE file in the root directory of this source tree. An additional grant
|
|
4186
|
+
* of patent rights can be found in the PATENTS file in the same directory.
|
|
4187
|
+
*
|
|
4188
|
+
*/
|
|
4189
|
+
'use strict';
|
|
4190
|
+
|
|
4191
|
+
var _prodInvariant = _dereq_(39);
|
|
4522
4192
|
|
|
4523
4193
|
var ReactElement = _dereq_(16);
|
|
4524
4194
|
|
|
4525
|
-
var invariant = _dereq_(
|
|
4195
|
+
var invariant = _dereq_(47);
|
|
4526
4196
|
|
|
4527
4197
|
/**
|
|
4528
4198
|
* Returns the first child in a collection of children and verifies that there
|
|
@@ -4544,7 +4214,7 @@ function onlyChild(children) {
|
|
|
4544
4214
|
}
|
|
4545
4215
|
|
|
4546
4216
|
module.exports = onlyChild;
|
|
4547
|
-
},{"16":16,"
|
|
4217
|
+
},{"16":16,"39":39,"47":47}],39:[function(_dereq_,module,exports){
|
|
4548
4218
|
/**
|
|
4549
4219
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
4550
4220
|
* All rights reserved.
|
|
@@ -4583,7 +4253,7 @@ function reactProdInvariant(code) {
|
|
|
4583
4253
|
}
|
|
4584
4254
|
|
|
4585
4255
|
module.exports = reactProdInvariant;
|
|
4586
|
-
},{}],
|
|
4256
|
+
},{}],40:[function(_dereq_,module,exports){
|
|
4587
4257
|
/**
|
|
4588
4258
|
* Copyright 2013-present, Facebook, Inc.
|
|
4589
4259
|
* All rights reserved.
|
|
@@ -4596,7 +4266,7 @@ module.exports = reactProdInvariant;
|
|
|
4596
4266
|
|
|
4597
4267
|
'use strict';
|
|
4598
4268
|
|
|
4599
|
-
var shallowEqual = _dereq_(
|
|
4269
|
+
var shallowEqual = _dereq_(48);
|
|
4600
4270
|
|
|
4601
4271
|
/**
|
|
4602
4272
|
* Does a shallow comparison for props and state.
|
|
@@ -4608,7 +4278,7 @@ function shallowCompare(instance, nextProps, nextState) {
|
|
|
4608
4278
|
}
|
|
4609
4279
|
|
|
4610
4280
|
module.exports = shallowCompare;
|
|
4611
|
-
},{"
|
|
4281
|
+
},{"48":48}],41:[function(_dereq_,module,exports){
|
|
4612
4282
|
/**
|
|
4613
4283
|
* Copyright 2013-present, Facebook, Inc.
|
|
4614
4284
|
* All rights reserved.
|
|
@@ -4621,15 +4291,15 @@ module.exports = shallowCompare;
|
|
|
4621
4291
|
|
|
4622
4292
|
'use strict';
|
|
4623
4293
|
|
|
4624
|
-
var _prodInvariant = _dereq_(
|
|
4294
|
+
var _prodInvariant = _dereq_(39);
|
|
4625
4295
|
|
|
4626
4296
|
var ReactCurrentOwner = _dereq_(14);
|
|
4627
4297
|
var REACT_ELEMENT_TYPE = _dereq_(17);
|
|
4628
4298
|
|
|
4629
4299
|
var getIteratorFn = _dereq_(36);
|
|
4630
|
-
var invariant = _dereq_(
|
|
4300
|
+
var invariant = _dereq_(47);
|
|
4631
4301
|
var KeyEscapeUtils = _dereq_(2);
|
|
4632
|
-
var warning = _dereq_(
|
|
4302
|
+
var warning = _dereq_(49);
|
|
4633
4303
|
|
|
4634
4304
|
var SEPARATOR = '.';
|
|
4635
4305
|
var SUBSEPARATOR = ':';
|
|
@@ -4784,7 +4454,7 @@ function traverseAllChildren(children, callback, traverseContext) {
|
|
|
4784
4454
|
}
|
|
4785
4455
|
|
|
4786
4456
|
module.exports = traverseAllChildren;
|
|
4787
|
-
},{"14":14,"17":17,"2":2,"36":36,"
|
|
4457
|
+
},{"14":14,"17":17,"2":2,"36":36,"39":39,"47":47,"49":49}],42:[function(_dereq_,module,exports){
|
|
4788
4458
|
/**
|
|
4789
4459
|
* Copyright 2013-present, Facebook, Inc.
|
|
4790
4460
|
* All rights reserved.
|
|
@@ -4799,10 +4469,10 @@ module.exports = traverseAllChildren;
|
|
|
4799
4469
|
|
|
4800
4470
|
'use strict';
|
|
4801
4471
|
|
|
4802
|
-
var _prodInvariant = _dereq_(
|
|
4803
|
-
_assign = _dereq_(
|
|
4472
|
+
var _prodInvariant = _dereq_(39),
|
|
4473
|
+
_assign = _dereq_(50);
|
|
4804
4474
|
|
|
4805
|
-
var invariant = _dereq_(
|
|
4475
|
+
var invariant = _dereq_(47);
|
|
4806
4476
|
var hasOwnProperty = {}.hasOwnProperty;
|
|
4807
4477
|
|
|
4808
4478
|
function shallowCopy(x) {
|
|
@@ -4896,7 +4566,7 @@ function update(value, spec) {
|
|
|
4896
4566
|
}
|
|
4897
4567
|
|
|
4898
4568
|
module.exports = update;
|
|
4899
|
-
},{"
|
|
4569
|
+
},{"39":39,"47":47,"50":50}],43:[function(_dereq_,module,exports){
|
|
4900
4570
|
'use strict';
|
|
4901
4571
|
|
|
4902
4572
|
/**
|
|
@@ -4910,7 +4580,7 @@ module.exports = update;
|
|
|
4910
4580
|
* @typechecks
|
|
4911
4581
|
*/
|
|
4912
4582
|
|
|
4913
|
-
var invariant = _dereq_(
|
|
4583
|
+
var invariant = _dereq_(47);
|
|
4914
4584
|
|
|
4915
4585
|
/**
|
|
4916
4586
|
* The CSSCore module specifies the API (and implements most of the methods)
|
|
@@ -5018,7 +4688,7 @@ var CSSCore = {
|
|
|
5018
4688
|
};
|
|
5019
4689
|
|
|
5020
4690
|
module.exports = CSSCore;
|
|
5021
|
-
},{"
|
|
4691
|
+
},{"47":47}],44:[function(_dereq_,module,exports){
|
|
5022
4692
|
/**
|
|
5023
4693
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
5024
4694
|
* All rights reserved.
|
|
@@ -5054,7 +4724,7 @@ var ExecutionEnvironment = {
|
|
|
5054
4724
|
};
|
|
5055
4725
|
|
|
5056
4726
|
module.exports = ExecutionEnvironment;
|
|
5057
|
-
},{}],
|
|
4727
|
+
},{}],45:[function(_dereq_,module,exports){
|
|
5058
4728
|
"use strict";
|
|
5059
4729
|
|
|
5060
4730
|
/**
|
|
@@ -5093,7 +4763,7 @@ emptyFunction.thatReturnsArgument = function (arg) {
|
|
|
5093
4763
|
};
|
|
5094
4764
|
|
|
5095
4765
|
module.exports = emptyFunction;
|
|
5096
|
-
},{}],
|
|
4766
|
+
},{}],46:[function(_dereq_,module,exports){
|
|
5097
4767
|
/**
|
|
5098
4768
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
5099
4769
|
* All rights reserved.
|
|
@@ -5113,7 +4783,7 @@ if ("development" !== 'production') {
|
|
|
5113
4783
|
}
|
|
5114
4784
|
|
|
5115
4785
|
module.exports = emptyObject;
|
|
5116
|
-
},{}],
|
|
4786
|
+
},{}],47:[function(_dereq_,module,exports){
|
|
5117
4787
|
/**
|
|
5118
4788
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
5119
4789
|
* All rights reserved.
|
|
@@ -5169,7 +4839,7 @@ function invariant(condition, format, a, b, c, d, e, f) {
|
|
|
5169
4839
|
}
|
|
5170
4840
|
|
|
5171
4841
|
module.exports = invariant;
|
|
5172
|
-
},{}],
|
|
4842
|
+
},{}],48:[function(_dereq_,module,exports){
|
|
5173
4843
|
/**
|
|
5174
4844
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
5175
4845
|
* All rights reserved.
|
|
@@ -5237,7 +4907,7 @@ function shallowEqual(objA, objB) {
|
|
|
5237
4907
|
}
|
|
5238
4908
|
|
|
5239
4909
|
module.exports = shallowEqual;
|
|
5240
|
-
},{}],
|
|
4910
|
+
},{}],49:[function(_dereq_,module,exports){
|
|
5241
4911
|
/**
|
|
5242
4912
|
* Copyright 2014-2015, Facebook, Inc.
|
|
5243
4913
|
* All rights reserved.
|
|
@@ -5250,7 +4920,7 @@ module.exports = shallowEqual;
|
|
|
5250
4920
|
|
|
5251
4921
|
'use strict';
|
|
5252
4922
|
|
|
5253
|
-
var emptyFunction = _dereq_(
|
|
4923
|
+
var emptyFunction = _dereq_(45);
|
|
5254
4924
|
|
|
5255
4925
|
/**
|
|
5256
4926
|
* Similar to invariant but only logs a warning if the condition is not met.
|
|
@@ -5304,9 +4974,16 @@ if ("development" !== 'production') {
|
|
|
5304
4974
|
}
|
|
5305
4975
|
|
|
5306
4976
|
module.exports = warning;
|
|
5307
|
-
},{"
|
|
4977
|
+
},{"45":45}],50:[function(_dereq_,module,exports){
|
|
4978
|
+
/*
|
|
4979
|
+
object-assign
|
|
4980
|
+
(c) Sindre Sorhus
|
|
4981
|
+
@license MIT
|
|
4982
|
+
*/
|
|
4983
|
+
|
|
5308
4984
|
'use strict';
|
|
5309
4985
|
/* eslint-disable no-unused-vars */
|
|
4986
|
+
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
5310
4987
|
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
5311
4988
|
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
5312
4989
|
|
|
@@ -5327,7 +5004,7 @@ function shouldUseNative() {
|
|
|
5327
5004
|
// Detect buggy property enumeration order in older V8 versions.
|
|
5328
5005
|
|
|
5329
5006
|
// https://bugs.chromium.org/p/v8/issues/detail?id=4118
|
|
5330
|
-
var test1 = new String('abc'); // eslint-disable-line
|
|
5007
|
+
var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
|
|
5331
5008
|
test1[5] = 'de';
|
|
5332
5009
|
if (Object.getOwnPropertyNames(test1)[0] === '5') {
|
|
5333
5010
|
return false;
|
|
@@ -5356,7 +5033,7 @@ function shouldUseNative() {
|
|
|
5356
5033
|
}
|
|
5357
5034
|
|
|
5358
5035
|
return true;
|
|
5359
|
-
} catch (
|
|
5036
|
+
} catch (err) {
|
|
5360
5037
|
// We don't expect any of the above to throw, but better to be safe.
|
|
5361
5038
|
return false;
|
|
5362
5039
|
}
|
|
@@ -5376,8 +5053,8 @@ module.exports = shouldUseNative() ? Object.assign : function (target, source) {
|
|
|
5376
5053
|
}
|
|
5377
5054
|
}
|
|
5378
5055
|
|
|
5379
|
-
if (
|
|
5380
|
-
symbols =
|
|
5056
|
+
if (getOwnPropertySymbols) {
|
|
5057
|
+
symbols = getOwnPropertySymbols(from);
|
|
5381
5058
|
for (var i = 0; i < symbols.length; i++) {
|
|
5382
5059
|
if (propIsEnumerable.call(from, symbols[i])) {
|
|
5383
5060
|
to[symbols[i]] = from[symbols[i]];
|
|
@@ -5389,5 +5066,570 @@ module.exports = shouldUseNative() ? Object.assign : function (target, source) {
|
|
|
5389
5066
|
return to;
|
|
5390
5067
|
};
|
|
5391
5068
|
|
|
5069
|
+
},{}],51:[function(_dereq_,module,exports){
|
|
5070
|
+
/**
|
|
5071
|
+
* Copyright 2013-present, Facebook, Inc.
|
|
5072
|
+
* All rights reserved.
|
|
5073
|
+
*
|
|
5074
|
+
* This source code is licensed under the BSD-style license found in the
|
|
5075
|
+
* LICENSE file in the root directory of this source tree. An additional grant
|
|
5076
|
+
* of patent rights can be found in the PATENTS file in the same directory.
|
|
5077
|
+
*/
|
|
5078
|
+
|
|
5079
|
+
'use strict';
|
|
5080
|
+
|
|
5081
|
+
var invariant = _dereq_(47);
|
|
5082
|
+
var warning = _dereq_(49);
|
|
5083
|
+
|
|
5084
|
+
var ReactPropTypesSecret = _dereq_(53);
|
|
5085
|
+
|
|
5086
|
+
var loggedTypeFailures = {};
|
|
5087
|
+
|
|
5088
|
+
/**
|
|
5089
|
+
* Assert that the values match with the type specs.
|
|
5090
|
+
* Error messages are memorized and will only be shown once.
|
|
5091
|
+
*
|
|
5092
|
+
* @param {object} typeSpecs Map of name to a ReactPropType
|
|
5093
|
+
* @param {object} values Runtime values that need to be type-checked
|
|
5094
|
+
* @param {string} location e.g. "prop", "context", "child context"
|
|
5095
|
+
* @param {string} componentName Name of the component for error messages.
|
|
5096
|
+
* @param {?Function} getStack Returns the component stack.
|
|
5097
|
+
* @private
|
|
5098
|
+
*/
|
|
5099
|
+
function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
|
|
5100
|
+
if ("development" !== 'production') {
|
|
5101
|
+
for (var typeSpecName in typeSpecs) {
|
|
5102
|
+
if (typeSpecs.hasOwnProperty(typeSpecName)) {
|
|
5103
|
+
var error;
|
|
5104
|
+
// Prop type validation may throw. In case they do, we don't want to
|
|
5105
|
+
// fail the render phase where it didn't fail before. So we log it.
|
|
5106
|
+
// After these have been cleaned up, we'll let them throw.
|
|
5107
|
+
try {
|
|
5108
|
+
// This is intentionally an invariant that gets caught. It's the same
|
|
5109
|
+
// behavior as without this statement except with a better message.
|
|
5110
|
+
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);
|
|
5111
|
+
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
|
|
5112
|
+
} catch (ex) {
|
|
5113
|
+
error = ex;
|
|
5114
|
+
}
|
|
5115
|
+
"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;
|
|
5116
|
+
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
|
5117
|
+
// Only monitor this failure once because there tends to be a lot of the
|
|
5118
|
+
// same error.
|
|
5119
|
+
loggedTypeFailures[error.message] = true;
|
|
5120
|
+
|
|
5121
|
+
var stack = getStack ? getStack() : '';
|
|
5122
|
+
|
|
5123
|
+
"development" !== 'production' ? warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '') : void 0;
|
|
5124
|
+
}
|
|
5125
|
+
}
|
|
5126
|
+
}
|
|
5127
|
+
}
|
|
5128
|
+
}
|
|
5129
|
+
|
|
5130
|
+
module.exports = checkPropTypes;
|
|
5131
|
+
|
|
5132
|
+
},{"47":47,"49":49,"53":53}],52:[function(_dereq_,module,exports){
|
|
5133
|
+
/**
|
|
5134
|
+
* Copyright 2013-present, Facebook, Inc.
|
|
5135
|
+
* All rights reserved.
|
|
5136
|
+
*
|
|
5137
|
+
* This source code is licensed under the BSD-style license found in the
|
|
5138
|
+
* LICENSE file in the root directory of this source tree. An additional grant
|
|
5139
|
+
* of patent rights can be found in the PATENTS file in the same directory.
|
|
5140
|
+
*/
|
|
5141
|
+
|
|
5142
|
+
'use strict';
|
|
5143
|
+
|
|
5144
|
+
var emptyFunction = _dereq_(45);
|
|
5145
|
+
var invariant = _dereq_(47);
|
|
5146
|
+
var warning = _dereq_(49);
|
|
5147
|
+
|
|
5148
|
+
var ReactPropTypesSecret = _dereq_(53);
|
|
5149
|
+
var checkPropTypes = _dereq_(51);
|
|
5150
|
+
|
|
5151
|
+
module.exports = function (isValidElement) {
|
|
5152
|
+
/* global Symbol */
|
|
5153
|
+
var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
|
5154
|
+
var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
|
|
5155
|
+
|
|
5156
|
+
/**
|
|
5157
|
+
* Returns the iterator method function contained on the iterable object.
|
|
5158
|
+
*
|
|
5159
|
+
* Be sure to invoke the function with the iterable as context:
|
|
5160
|
+
*
|
|
5161
|
+
* var iteratorFn = getIteratorFn(myIterable);
|
|
5162
|
+
* if (iteratorFn) {
|
|
5163
|
+
* var iterator = iteratorFn.call(myIterable);
|
|
5164
|
+
* ...
|
|
5165
|
+
* }
|
|
5166
|
+
*
|
|
5167
|
+
* @param {?object} maybeIterable
|
|
5168
|
+
* @return {?function}
|
|
5169
|
+
*/
|
|
5170
|
+
function getIteratorFn(maybeIterable) {
|
|
5171
|
+
var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
|
|
5172
|
+
if (typeof iteratorFn === 'function') {
|
|
5173
|
+
return iteratorFn;
|
|
5174
|
+
}
|
|
5175
|
+
}
|
|
5176
|
+
|
|
5177
|
+
/**
|
|
5178
|
+
* Collection of methods that allow declaration and validation of props that are
|
|
5179
|
+
* supplied to React components. Example usage:
|
|
5180
|
+
*
|
|
5181
|
+
* var Props = require('ReactPropTypes');
|
|
5182
|
+
* var MyArticle = React.createClass({
|
|
5183
|
+
* propTypes: {
|
|
5184
|
+
* // An optional string prop named "description".
|
|
5185
|
+
* description: Props.string,
|
|
5186
|
+
*
|
|
5187
|
+
* // A required enum prop named "category".
|
|
5188
|
+
* category: Props.oneOf(['News','Photos']).isRequired,
|
|
5189
|
+
*
|
|
5190
|
+
* // A prop named "dialog" that requires an instance of Dialog.
|
|
5191
|
+
* dialog: Props.instanceOf(Dialog).isRequired
|
|
5192
|
+
* },
|
|
5193
|
+
* render: function() { ... }
|
|
5194
|
+
* });
|
|
5195
|
+
*
|
|
5196
|
+
* A more formal specification of how these methods are used:
|
|
5197
|
+
*
|
|
5198
|
+
* type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
|
|
5199
|
+
* decl := ReactPropTypes.{type}(.isRequired)?
|
|
5200
|
+
*
|
|
5201
|
+
* Each and every declaration produces a function with the same signature. This
|
|
5202
|
+
* allows the creation of custom validation functions. For example:
|
|
5203
|
+
*
|
|
5204
|
+
* var MyLink = React.createClass({
|
|
5205
|
+
* propTypes: {
|
|
5206
|
+
* // An optional string or URI prop named "href".
|
|
5207
|
+
* href: function(props, propName, componentName) {
|
|
5208
|
+
* var propValue = props[propName];
|
|
5209
|
+
* if (propValue != null && typeof propValue !== 'string' &&
|
|
5210
|
+
* !(propValue instanceof URI)) {
|
|
5211
|
+
* return new Error(
|
|
5212
|
+
* 'Expected a string or an URI for ' + propName + ' in ' +
|
|
5213
|
+
* componentName
|
|
5214
|
+
* );
|
|
5215
|
+
* }
|
|
5216
|
+
* }
|
|
5217
|
+
* },
|
|
5218
|
+
* render: function() {...}
|
|
5219
|
+
* });
|
|
5220
|
+
*
|
|
5221
|
+
* @internal
|
|
5222
|
+
*/
|
|
5223
|
+
|
|
5224
|
+
var ANONYMOUS = '<<anonymous>>';
|
|
5225
|
+
|
|
5226
|
+
var ReactPropTypes;
|
|
5227
|
+
|
|
5228
|
+
if ("development" !== 'production') {
|
|
5229
|
+
// Keep in sync with production version below
|
|
5230
|
+
ReactPropTypes = {
|
|
5231
|
+
array: createPrimitiveTypeChecker('array'),
|
|
5232
|
+
bool: createPrimitiveTypeChecker('boolean'),
|
|
5233
|
+
func: createPrimitiveTypeChecker('function'),
|
|
5234
|
+
number: createPrimitiveTypeChecker('number'),
|
|
5235
|
+
object: createPrimitiveTypeChecker('object'),
|
|
5236
|
+
string: createPrimitiveTypeChecker('string'),
|
|
5237
|
+
symbol: createPrimitiveTypeChecker('symbol'),
|
|
5238
|
+
|
|
5239
|
+
any: createAnyTypeChecker(),
|
|
5240
|
+
arrayOf: createArrayOfTypeChecker,
|
|
5241
|
+
element: createElementTypeChecker(),
|
|
5242
|
+
instanceOf: createInstanceTypeChecker,
|
|
5243
|
+
node: createNodeChecker(),
|
|
5244
|
+
objectOf: createObjectOfTypeChecker,
|
|
5245
|
+
oneOf: createEnumTypeChecker,
|
|
5246
|
+
oneOfType: createUnionTypeChecker,
|
|
5247
|
+
shape: createShapeTypeChecker
|
|
5248
|
+
};
|
|
5249
|
+
} else {
|
|
5250
|
+
var productionTypeChecker = function () {
|
|
5251
|
+
invariant(false, 'React.PropTypes type checking code is stripped in production.');
|
|
5252
|
+
};
|
|
5253
|
+
productionTypeChecker.isRequired = productionTypeChecker;
|
|
5254
|
+
var getProductionTypeChecker = function () {
|
|
5255
|
+
return productionTypeChecker;
|
|
5256
|
+
};
|
|
5257
|
+
// Keep in sync with development version above
|
|
5258
|
+
ReactPropTypes = {
|
|
5259
|
+
array: productionTypeChecker,
|
|
5260
|
+
bool: productionTypeChecker,
|
|
5261
|
+
func: productionTypeChecker,
|
|
5262
|
+
number: productionTypeChecker,
|
|
5263
|
+
object: productionTypeChecker,
|
|
5264
|
+
string: productionTypeChecker,
|
|
5265
|
+
symbol: productionTypeChecker,
|
|
5266
|
+
|
|
5267
|
+
any: productionTypeChecker,
|
|
5268
|
+
arrayOf: getProductionTypeChecker,
|
|
5269
|
+
element: productionTypeChecker,
|
|
5270
|
+
instanceOf: getProductionTypeChecker,
|
|
5271
|
+
node: productionTypeChecker,
|
|
5272
|
+
objectOf: getProductionTypeChecker,
|
|
5273
|
+
oneOf: getProductionTypeChecker,
|
|
5274
|
+
oneOfType: getProductionTypeChecker,
|
|
5275
|
+
shape: getProductionTypeChecker
|
|
5276
|
+
};
|
|
5277
|
+
}
|
|
5278
|
+
|
|
5279
|
+
/**
|
|
5280
|
+
* inlined Object.is polyfill to avoid requiring consumers ship their own
|
|
5281
|
+
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
|
|
5282
|
+
*/
|
|
5283
|
+
/*eslint-disable no-self-compare*/
|
|
5284
|
+
function is(x, y) {
|
|
5285
|
+
// SameValue algorithm
|
|
5286
|
+
if (x === y) {
|
|
5287
|
+
// Steps 1-5, 7-10
|
|
5288
|
+
// Steps 6.b-6.e: +0 != -0
|
|
5289
|
+
return x !== 0 || 1 / x === 1 / y;
|
|
5290
|
+
} else {
|
|
5291
|
+
// Step 6.a: NaN == NaN
|
|
5292
|
+
return x !== x && y !== y;
|
|
5293
|
+
}
|
|
5294
|
+
}
|
|
5295
|
+
/*eslint-enable no-self-compare*/
|
|
5296
|
+
|
|
5297
|
+
/**
|
|
5298
|
+
* We use an Error-like object for backward compatibility as people may call
|
|
5299
|
+
* PropTypes directly and inspect their output. However, we don't use real
|
|
5300
|
+
* Errors anymore. We don't inspect their stack anyway, and creating them
|
|
5301
|
+
* is prohibitively expensive if they are created too often, such as what
|
|
5302
|
+
* happens in oneOfType() for any type before the one that matched.
|
|
5303
|
+
*/
|
|
5304
|
+
function PropTypeError(message) {
|
|
5305
|
+
this.message = message;
|
|
5306
|
+
this.stack = '';
|
|
5307
|
+
}
|
|
5308
|
+
// Make `instanceof Error` still work for returned errors.
|
|
5309
|
+
PropTypeError.prototype = Error.prototype;
|
|
5310
|
+
|
|
5311
|
+
function createChainableTypeChecker(validate) {
|
|
5312
|
+
if ("development" !== 'production') {
|
|
5313
|
+
var manualPropTypeCallCache = {};
|
|
5314
|
+
}
|
|
5315
|
+
function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
|
|
5316
|
+
componentName = componentName || ANONYMOUS;
|
|
5317
|
+
propFullName = propFullName || propName;
|
|
5318
|
+
if ("development" !== 'production') {
|
|
5319
|
+
if (secret !== ReactPropTypesSecret && typeof console !== 'undefined') {
|
|
5320
|
+
var cacheKey = componentName + ':' + propName;
|
|
5321
|
+
if (!manualPropTypeCallCache[cacheKey]) {
|
|
5322
|
+
"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;
|
|
5323
|
+
manualPropTypeCallCache[cacheKey] = true;
|
|
5324
|
+
}
|
|
5325
|
+
}
|
|
5326
|
+
}
|
|
5327
|
+
if (props[propName] == null) {
|
|
5328
|
+
if (isRequired) {
|
|
5329
|
+
if (props[propName] === null) {
|
|
5330
|
+
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
|
|
5331
|
+
}
|
|
5332
|
+
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
|
|
5333
|
+
}
|
|
5334
|
+
return null;
|
|
5335
|
+
} else {
|
|
5336
|
+
return validate(props, propName, componentName, location, propFullName);
|
|
5337
|
+
}
|
|
5338
|
+
}
|
|
5339
|
+
|
|
5340
|
+
var chainedCheckType = checkType.bind(null, false);
|
|
5341
|
+
chainedCheckType.isRequired = checkType.bind(null, true);
|
|
5342
|
+
|
|
5343
|
+
return chainedCheckType;
|
|
5344
|
+
}
|
|
5345
|
+
|
|
5346
|
+
function createPrimitiveTypeChecker(expectedType) {
|
|
5347
|
+
function validate(props, propName, componentName, location, propFullName, secret) {
|
|
5348
|
+
var propValue = props[propName];
|
|
5349
|
+
var propType = getPropType(propValue);
|
|
5350
|
+
if (propType !== expectedType) {
|
|
5351
|
+
// `propValue` being instance of, say, date/regexp, pass the 'object'
|
|
5352
|
+
// check, but we can offer a more precise error message here rather than
|
|
5353
|
+
// 'of type `object`'.
|
|
5354
|
+
var preciseType = getPreciseType(propValue);
|
|
5355
|
+
|
|
5356
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
|
|
5357
|
+
}
|
|
5358
|
+
return null;
|
|
5359
|
+
}
|
|
5360
|
+
return createChainableTypeChecker(validate);
|
|
5361
|
+
}
|
|
5362
|
+
|
|
5363
|
+
function createAnyTypeChecker() {
|
|
5364
|
+
return createChainableTypeChecker(emptyFunction.thatReturnsNull);
|
|
5365
|
+
}
|
|
5366
|
+
|
|
5367
|
+
function createArrayOfTypeChecker(typeChecker) {
|
|
5368
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
5369
|
+
if (typeof typeChecker !== 'function') {
|
|
5370
|
+
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
|
|
5371
|
+
}
|
|
5372
|
+
var propValue = props[propName];
|
|
5373
|
+
if (!Array.isArray(propValue)) {
|
|
5374
|
+
var propType = getPropType(propValue);
|
|
5375
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
|
|
5376
|
+
}
|
|
5377
|
+
for (var i = 0; i < propValue.length; i++) {
|
|
5378
|
+
var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
|
|
5379
|
+
if (error instanceof Error) {
|
|
5380
|
+
return error;
|
|
5381
|
+
}
|
|
5382
|
+
}
|
|
5383
|
+
return null;
|
|
5384
|
+
}
|
|
5385
|
+
return createChainableTypeChecker(validate);
|
|
5386
|
+
}
|
|
5387
|
+
|
|
5388
|
+
function createElementTypeChecker() {
|
|
5389
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
5390
|
+
var propValue = props[propName];
|
|
5391
|
+
if (!isValidElement(propValue)) {
|
|
5392
|
+
var propType = getPropType(propValue);
|
|
5393
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
|
|
5394
|
+
}
|
|
5395
|
+
return null;
|
|
5396
|
+
}
|
|
5397
|
+
return createChainableTypeChecker(validate);
|
|
5398
|
+
}
|
|
5399
|
+
|
|
5400
|
+
function createInstanceTypeChecker(expectedClass) {
|
|
5401
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
5402
|
+
if (!(props[propName] instanceof expectedClass)) {
|
|
5403
|
+
var expectedClassName = expectedClass.name || ANONYMOUS;
|
|
5404
|
+
var actualClassName = getClassName(props[propName]);
|
|
5405
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
|
|
5406
|
+
}
|
|
5407
|
+
return null;
|
|
5408
|
+
}
|
|
5409
|
+
return createChainableTypeChecker(validate);
|
|
5410
|
+
}
|
|
5411
|
+
|
|
5412
|
+
function createEnumTypeChecker(expectedValues) {
|
|
5413
|
+
if (!Array.isArray(expectedValues)) {
|
|
5414
|
+
"development" !== 'production' ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0;
|
|
5415
|
+
return emptyFunction.thatReturnsNull;
|
|
5416
|
+
}
|
|
5417
|
+
|
|
5418
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
5419
|
+
var propValue = props[propName];
|
|
5420
|
+
for (var i = 0; i < expectedValues.length; i++) {
|
|
5421
|
+
if (is(propValue, expectedValues[i])) {
|
|
5422
|
+
return null;
|
|
5423
|
+
}
|
|
5424
|
+
}
|
|
5425
|
+
|
|
5426
|
+
var valuesString = JSON.stringify(expectedValues);
|
|
5427
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
|
|
5428
|
+
}
|
|
5429
|
+
return createChainableTypeChecker(validate);
|
|
5430
|
+
}
|
|
5431
|
+
|
|
5432
|
+
function createObjectOfTypeChecker(typeChecker) {
|
|
5433
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
5434
|
+
if (typeof typeChecker !== 'function') {
|
|
5435
|
+
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
|
|
5436
|
+
}
|
|
5437
|
+
var propValue = props[propName];
|
|
5438
|
+
var propType = getPropType(propValue);
|
|
5439
|
+
if (propType !== 'object') {
|
|
5440
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
|
|
5441
|
+
}
|
|
5442
|
+
for (var key in propValue) {
|
|
5443
|
+
if (propValue.hasOwnProperty(key)) {
|
|
5444
|
+
var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
|
5445
|
+
if (error instanceof Error) {
|
|
5446
|
+
return error;
|
|
5447
|
+
}
|
|
5448
|
+
}
|
|
5449
|
+
}
|
|
5450
|
+
return null;
|
|
5451
|
+
}
|
|
5452
|
+
return createChainableTypeChecker(validate);
|
|
5453
|
+
}
|
|
5454
|
+
|
|
5455
|
+
function createUnionTypeChecker(arrayOfTypeCheckers) {
|
|
5456
|
+
if (!Array.isArray(arrayOfTypeCheckers)) {
|
|
5457
|
+
"development" !== 'production' ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
|
|
5458
|
+
return emptyFunction.thatReturnsNull;
|
|
5459
|
+
}
|
|
5460
|
+
|
|
5461
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
5462
|
+
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
5463
|
+
var checker = arrayOfTypeCheckers[i];
|
|
5464
|
+
if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {
|
|
5465
|
+
return null;
|
|
5466
|
+
}
|
|
5467
|
+
}
|
|
5468
|
+
|
|
5469
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
|
|
5470
|
+
}
|
|
5471
|
+
return createChainableTypeChecker(validate);
|
|
5472
|
+
}
|
|
5473
|
+
|
|
5474
|
+
function createNodeChecker() {
|
|
5475
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
5476
|
+
if (!isNode(props[propName])) {
|
|
5477
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
|
|
5478
|
+
}
|
|
5479
|
+
return null;
|
|
5480
|
+
}
|
|
5481
|
+
return createChainableTypeChecker(validate);
|
|
5482
|
+
}
|
|
5483
|
+
|
|
5484
|
+
function createShapeTypeChecker(shapeTypes) {
|
|
5485
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
5486
|
+
var propValue = props[propName];
|
|
5487
|
+
var propType = getPropType(propValue);
|
|
5488
|
+
if (propType !== 'object') {
|
|
5489
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
|
5490
|
+
}
|
|
5491
|
+
for (var key in shapeTypes) {
|
|
5492
|
+
var checker = shapeTypes[key];
|
|
5493
|
+
if (!checker) {
|
|
5494
|
+
continue;
|
|
5495
|
+
}
|
|
5496
|
+
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
|
5497
|
+
if (error) {
|
|
5498
|
+
return error;
|
|
5499
|
+
}
|
|
5500
|
+
}
|
|
5501
|
+
return null;
|
|
5502
|
+
}
|
|
5503
|
+
return createChainableTypeChecker(validate);
|
|
5504
|
+
}
|
|
5505
|
+
|
|
5506
|
+
function isNode(propValue) {
|
|
5507
|
+
switch (typeof propValue) {
|
|
5508
|
+
case 'number':
|
|
5509
|
+
case 'string':
|
|
5510
|
+
case 'undefined':
|
|
5511
|
+
return true;
|
|
5512
|
+
case 'boolean':
|
|
5513
|
+
return !propValue;
|
|
5514
|
+
case 'object':
|
|
5515
|
+
if (Array.isArray(propValue)) {
|
|
5516
|
+
return propValue.every(isNode);
|
|
5517
|
+
}
|
|
5518
|
+
if (propValue === null || isValidElement(propValue)) {
|
|
5519
|
+
return true;
|
|
5520
|
+
}
|
|
5521
|
+
|
|
5522
|
+
var iteratorFn = getIteratorFn(propValue);
|
|
5523
|
+
if (iteratorFn) {
|
|
5524
|
+
var iterator = iteratorFn.call(propValue);
|
|
5525
|
+
var step;
|
|
5526
|
+
if (iteratorFn !== propValue.entries) {
|
|
5527
|
+
while (!(step = iterator.next()).done) {
|
|
5528
|
+
if (!isNode(step.value)) {
|
|
5529
|
+
return false;
|
|
5530
|
+
}
|
|
5531
|
+
}
|
|
5532
|
+
} else {
|
|
5533
|
+
// Iterator will provide entry [k,v] tuples rather than values.
|
|
5534
|
+
while (!(step = iterator.next()).done) {
|
|
5535
|
+
var entry = step.value;
|
|
5536
|
+
if (entry) {
|
|
5537
|
+
if (!isNode(entry[1])) {
|
|
5538
|
+
return false;
|
|
5539
|
+
}
|
|
5540
|
+
}
|
|
5541
|
+
}
|
|
5542
|
+
}
|
|
5543
|
+
} else {
|
|
5544
|
+
return false;
|
|
5545
|
+
}
|
|
5546
|
+
|
|
5547
|
+
return true;
|
|
5548
|
+
default:
|
|
5549
|
+
return false;
|
|
5550
|
+
}
|
|
5551
|
+
}
|
|
5552
|
+
|
|
5553
|
+
function isSymbol(propType, propValue) {
|
|
5554
|
+
// Native Symbol.
|
|
5555
|
+
if (propType === 'symbol') {
|
|
5556
|
+
return true;
|
|
5557
|
+
}
|
|
5558
|
+
|
|
5559
|
+
// 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
|
|
5560
|
+
if (propValue['@@toStringTag'] === 'Symbol') {
|
|
5561
|
+
return true;
|
|
5562
|
+
}
|
|
5563
|
+
|
|
5564
|
+
// Fallback for non-spec compliant Symbols which are polyfilled.
|
|
5565
|
+
if (typeof Symbol === 'function' && propValue instanceof Symbol) {
|
|
5566
|
+
return true;
|
|
5567
|
+
}
|
|
5568
|
+
|
|
5569
|
+
return false;
|
|
5570
|
+
}
|
|
5571
|
+
|
|
5572
|
+
// Equivalent of `typeof` but with special handling for array and regexp.
|
|
5573
|
+
function getPropType(propValue) {
|
|
5574
|
+
var propType = typeof propValue;
|
|
5575
|
+
if (Array.isArray(propValue)) {
|
|
5576
|
+
return 'array';
|
|
5577
|
+
}
|
|
5578
|
+
if (propValue instanceof RegExp) {
|
|
5579
|
+
// Old webkits (at least until Android 4.0) return 'function' rather than
|
|
5580
|
+
// 'object' for typeof a RegExp. We'll normalize this here so that /bla/
|
|
5581
|
+
// passes PropTypes.object.
|
|
5582
|
+
return 'object';
|
|
5583
|
+
}
|
|
5584
|
+
if (isSymbol(propType, propValue)) {
|
|
5585
|
+
return 'symbol';
|
|
5586
|
+
}
|
|
5587
|
+
return propType;
|
|
5588
|
+
}
|
|
5589
|
+
|
|
5590
|
+
// This handles more types than `getPropType`. Only used for error messages.
|
|
5591
|
+
// See `createPrimitiveTypeChecker`.
|
|
5592
|
+
function getPreciseType(propValue) {
|
|
5593
|
+
var propType = getPropType(propValue);
|
|
5594
|
+
if (propType === 'object') {
|
|
5595
|
+
if (propValue instanceof Date) {
|
|
5596
|
+
return 'date';
|
|
5597
|
+
} else if (propValue instanceof RegExp) {
|
|
5598
|
+
return 'regexp';
|
|
5599
|
+
}
|
|
5600
|
+
}
|
|
5601
|
+
return propType;
|
|
5602
|
+
}
|
|
5603
|
+
|
|
5604
|
+
// Returns class name of the object, if any.
|
|
5605
|
+
function getClassName(propValue) {
|
|
5606
|
+
if (!propValue.constructor || !propValue.constructor.name) {
|
|
5607
|
+
return ANONYMOUS;
|
|
5608
|
+
}
|
|
5609
|
+
return propValue.constructor.name;
|
|
5610
|
+
}
|
|
5611
|
+
|
|
5612
|
+
ReactPropTypes.checkPropTypes = checkPropTypes;
|
|
5613
|
+
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
5614
|
+
|
|
5615
|
+
return ReactPropTypes;
|
|
5616
|
+
};
|
|
5617
|
+
|
|
5618
|
+
},{"45":45,"47":47,"49":49,"51":51,"53":53}],53:[function(_dereq_,module,exports){
|
|
5619
|
+
/**
|
|
5620
|
+
* Copyright 2013-present, Facebook, Inc.
|
|
5621
|
+
* All rights reserved.
|
|
5622
|
+
*
|
|
5623
|
+
* This source code is licensed under the BSD-style license found in the
|
|
5624
|
+
* LICENSE file in the root directory of this source tree. An additional grant
|
|
5625
|
+
* of patent rights can be found in the PATENTS file in the same directory.
|
|
5626
|
+
*/
|
|
5627
|
+
|
|
5628
|
+
'use strict';
|
|
5629
|
+
|
|
5630
|
+
const ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
|
5631
|
+
|
|
5632
|
+
module.exports = ReactPropTypesSecret;
|
|
5633
|
+
|
|
5392
5634
|
},{}]},{},[32])(32)
|
|
5393
5635
|
});
|