react 15.5.2 → 15.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/react-with-addons.js +1455 -1316
- package/dist/react-with-addons.min.js +3 -3
- package/dist/react.js +1595 -1439
- package/dist/react.min.js +2 -2
- package/lib/React.js +45 -17
- package/lib/{ReactComponent.js → ReactBaseClasses.js} +29 -4
- package/lib/ReactCSSTransitionGroup.js +1 -1
- package/lib/ReactComponentTreeHook.js +49 -4
- package/lib/ReactCurrentOwner.js +0 -2
- package/lib/ReactDOMFactories.js +0 -1
- package/lib/ReactElementValidator.js +6 -4
- package/lib/ReactLink.js +0 -20
- package/lib/ReactNoopUpdateQueue.js +0 -1
- package/lib/ReactTransitionGroup.js +4 -1
- package/lib/ReactVersion.js +1 -1
- package/lib/createClass.js +22 -0
- package/lib/deprecated.js +3 -3
- package/lib/lowPriorityWarning.js +64 -0
- package/lib/traverseAllChildren.js +1 -1
- package/package.json +3 -2
- package/lib/ReactClass.js +0 -722
- package/lib/ReactPureComponent.js +0 -41
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* React (with addons) v15.
|
|
2
|
+
* React (with addons) v15.6.0
|
|
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_(45);
|
|
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
|
+
},{"45":45}],2:[function(_dereq_,module,exports){
|
|
106
106
|
/**
|
|
107
107
|
* Copyright 2013-present, Facebook, Inc.
|
|
108
108
|
* All rights reserved.
|
|
@@ -174,8 +174,8 @@ module.exports = KeyEscapeUtils;
|
|
|
174
174
|
|
|
175
175
|
'use strict';
|
|
176
176
|
|
|
177
|
-
var ReactLink = _dereq_(
|
|
178
|
-
var ReactStateSetters = _dereq_(
|
|
177
|
+
var ReactLink = _dereq_(19);
|
|
178
|
+
var ReactStateSetters = _dereq_(24);
|
|
179
179
|
|
|
180
180
|
/**
|
|
181
181
|
* A simple mixin around ReactLink.forState().
|
|
@@ -196,7 +196,7 @@ var LinkedStateMixin = {
|
|
|
196
196
|
};
|
|
197
197
|
|
|
198
198
|
module.exports = LinkedStateMixin;
|
|
199
|
-
},{"
|
|
199
|
+
},{"19":19,"24":24}],4:[function(_dereq_,module,exports){
|
|
200
200
|
/**
|
|
201
201
|
* Copyright 2013-present, Facebook, Inc.
|
|
202
202
|
* All rights reserved.
|
|
@@ -212,7 +212,7 @@ module.exports = LinkedStateMixin;
|
|
|
212
212
|
|
|
213
213
|
var _prodInvariant = _dereq_(39);
|
|
214
214
|
|
|
215
|
-
var invariant = _dereq_(
|
|
215
|
+
var invariant = _dereq_(48);
|
|
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
|
-
},{"39":39,"
|
|
311
|
+
},{"39":39,"48":48}],5:[function(_dereq_,module,exports){
|
|
312
312
|
/**
|
|
313
313
|
* Copyright 2013-present, Facebook, Inc.
|
|
314
314
|
* All rights reserved.
|
|
@@ -321,27 +321,26 @@ module.exports = PooledClass;
|
|
|
321
321
|
|
|
322
322
|
'use strict';
|
|
323
323
|
|
|
324
|
-
var _assign = _dereq_(
|
|
324
|
+
var _assign = _dereq_(51);
|
|
325
325
|
|
|
326
|
-
var
|
|
327
|
-
var
|
|
328
|
-
var
|
|
329
|
-
var
|
|
330
|
-
var
|
|
331
|
-
var
|
|
332
|
-
var ReactPropTypes = _dereq_(23);
|
|
333
|
-
var ReactVersion = _dereq_(30);
|
|
326
|
+
var ReactBaseClasses = _dereq_(7);
|
|
327
|
+
var ReactChildren = _dereq_(10);
|
|
328
|
+
var ReactDOMFactories = _dereq_(14);
|
|
329
|
+
var ReactElement = _dereq_(15);
|
|
330
|
+
var ReactPropTypes = _dereq_(22);
|
|
331
|
+
var ReactVersion = _dereq_(28);
|
|
334
332
|
|
|
333
|
+
var createReactClass = _dereq_(33);
|
|
335
334
|
var onlyChild = _dereq_(38);
|
|
336
|
-
var warning = _dereq_(49);
|
|
337
335
|
|
|
338
336
|
var createElement = ReactElement.createElement;
|
|
339
337
|
var createFactory = ReactElement.createFactory;
|
|
340
338
|
var cloneElement = ReactElement.cloneElement;
|
|
341
339
|
|
|
342
340
|
if ("development" !== 'production') {
|
|
343
|
-
var
|
|
344
|
-
var
|
|
341
|
+
var lowPriorityWarning = _dereq_(37);
|
|
342
|
+
var canDefineProperty = _dereq_(31);
|
|
343
|
+
var ReactElementValidator = _dereq_(17);
|
|
345
344
|
var didWarnPropTypesDeprecated = false;
|
|
346
345
|
createElement = ReactElementValidator.createElement;
|
|
347
346
|
createFactory = ReactElementValidator.createFactory;
|
|
@@ -349,18 +348,27 @@ if ("development" !== 'production') {
|
|
|
349
348
|
}
|
|
350
349
|
|
|
351
350
|
var __spread = _assign;
|
|
351
|
+
var createMixin = function (mixin) {
|
|
352
|
+
return mixin;
|
|
353
|
+
};
|
|
352
354
|
|
|
353
355
|
if ("development" !== 'production') {
|
|
354
|
-
var
|
|
356
|
+
var warnedForSpread = false;
|
|
357
|
+
var warnedForCreateMixin = false;
|
|
355
358
|
__spread = function () {
|
|
356
|
-
|
|
357
|
-
|
|
359
|
+
lowPriorityWarning(warnedForSpread, 'React.__spread is deprecated and should not be used. Use ' + 'Object.assign directly or another helper function with similar ' + 'semantics. You may be seeing this warning due to your compiler. ' + 'See https://fb.me/react-spread-deprecation for more details.');
|
|
360
|
+
warnedForSpread = true;
|
|
358
361
|
return _assign.apply(null, arguments);
|
|
359
362
|
};
|
|
363
|
+
|
|
364
|
+
createMixin = function (mixin) {
|
|
365
|
+
lowPriorityWarning(warnedForCreateMixin, 'React.createMixin is deprecated and should not be used. ' + 'In React v16.0, it will be removed. ' + 'You can use this mixin directly instead. ' + 'See https://fb.me/createmixin-was-never-implemented for more info.');
|
|
366
|
+
warnedForCreateMixin = true;
|
|
367
|
+
return mixin;
|
|
368
|
+
};
|
|
360
369
|
}
|
|
361
370
|
|
|
362
371
|
var React = {
|
|
363
|
-
|
|
364
372
|
// Modern
|
|
365
373
|
|
|
366
374
|
Children: {
|
|
@@ -371,8 +379,8 @@ var React = {
|
|
|
371
379
|
only: onlyChild
|
|
372
380
|
},
|
|
373
381
|
|
|
374
|
-
Component:
|
|
375
|
-
PureComponent:
|
|
382
|
+
Component: ReactBaseClasses.Component,
|
|
383
|
+
PureComponent: ReactBaseClasses.PureComponent,
|
|
376
384
|
|
|
377
385
|
createElement: createElement,
|
|
378
386
|
cloneElement: cloneElement,
|
|
@@ -381,12 +389,9 @@ var React = {
|
|
|
381
389
|
// Classic
|
|
382
390
|
|
|
383
391
|
PropTypes: ReactPropTypes,
|
|
384
|
-
createClass:
|
|
392
|
+
createClass: createReactClass,
|
|
385
393
|
createFactory: createFactory,
|
|
386
|
-
createMixin:
|
|
387
|
-
// Currently a noop. Will be used to validate and trace mixins.
|
|
388
|
-
return mixin;
|
|
389
|
-
},
|
|
394
|
+
createMixin: createMixin,
|
|
390
395
|
|
|
391
396
|
// This looks DOM specific but these are actually isomorphic helpers
|
|
392
397
|
// since they are just generating DOM strings.
|
|
@@ -398,21 +403,44 @@ var React = {
|
|
|
398
403
|
__spread: __spread
|
|
399
404
|
};
|
|
400
405
|
|
|
401
|
-
// TODO: Fix tests so that this deprecation warning doesn't cause failures.
|
|
402
406
|
if ("development" !== 'production') {
|
|
407
|
+
var warnedForCreateClass = false;
|
|
403
408
|
if (canDefineProperty) {
|
|
404
409
|
Object.defineProperty(React, 'PropTypes', {
|
|
405
410
|
get: function () {
|
|
406
|
-
|
|
411
|
+
lowPriorityWarning(didWarnPropTypesDeprecated, 'Accessing PropTypes via the main React package is deprecated,' + ' and will be removed in React v16.0.' + ' Use the latest available v15.* prop-types package from npm instead.' + ' For info on usage, compatibility, migration and more, see ' + 'https://fb.me/prop-types-docs');
|
|
407
412
|
didWarnPropTypesDeprecated = true;
|
|
408
413
|
return ReactPropTypes;
|
|
409
414
|
}
|
|
410
415
|
});
|
|
416
|
+
|
|
417
|
+
Object.defineProperty(React, 'createClass', {
|
|
418
|
+
get: function () {
|
|
419
|
+
lowPriorityWarning(warnedForCreateClass, 'Accessing createClass via the main React package is deprecated,' + ' and will be removed in React v16.0.' + " Use a plain JavaScript class instead. If you're not yet " + 'ready to migrate, create-react-class v15.* is available ' + 'on npm as a temporary, drop-in replacement. ' + 'For more info see https://fb.me/react-create-class');
|
|
420
|
+
warnedForCreateClass = true;
|
|
421
|
+
return createReactClass;
|
|
422
|
+
}
|
|
423
|
+
});
|
|
411
424
|
}
|
|
425
|
+
|
|
426
|
+
// React.DOM factories are deprecated. Wrap these methods so that
|
|
427
|
+
// invocations of the React.DOM namespace and alert users to switch
|
|
428
|
+
// to the `react-dom-factories` package.
|
|
429
|
+
React.DOM = {};
|
|
430
|
+
var warnedForFactories = false;
|
|
431
|
+
Object.keys(ReactDOMFactories).forEach(function (factory) {
|
|
432
|
+
React.DOM[factory] = function () {
|
|
433
|
+
if (!warnedForFactories) {
|
|
434
|
+
lowPriorityWarning(false, 'Accessing factories like React.DOM.%s has been deprecated ' + 'and will be removed in v16.0+. Use the ' + 'react-dom-factories package instead. ' + ' Version 1.0 provides a drop-in replacement.' + ' For more info, see https://fb.me/react-dom-factories', factory);
|
|
435
|
+
warnedForFactories = true;
|
|
436
|
+
}
|
|
437
|
+
return ReactDOMFactories[factory].apply(ReactDOMFactories, arguments);
|
|
438
|
+
};
|
|
439
|
+
});
|
|
412
440
|
}
|
|
413
441
|
|
|
414
442
|
module.exports = React;
|
|
415
|
-
},{"10":10,"
|
|
443
|
+
},{"10":10,"14":14,"15":15,"17":17,"22":22,"28":28,"31":31,"33":33,"37":37,"38":38,"51":51,"7":7}],6:[function(_dereq_,module,exports){
|
|
416
444
|
/**
|
|
417
445
|
* Copyright 2013-present, Facebook, Inc.
|
|
418
446
|
* All rights reserved.
|
|
@@ -430,7 +458,7 @@ var ReactDOM;
|
|
|
430
458
|
function getReactDOM() {
|
|
431
459
|
if (!ReactDOM) {
|
|
432
460
|
// This is safe to use because current module only exists in the addons build:
|
|
433
|
-
var ReactWithAddonsUMDEntry = _dereq_(
|
|
461
|
+
var ReactWithAddonsUMDEntry = _dereq_(30);
|
|
434
462
|
// This is injected by the ReactDOM UMD build:
|
|
435
463
|
ReactDOM = ReactWithAddonsUMDEntry.__SECRET_INJECTED_REACT_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
436
464
|
}
|
|
@@ -448,7 +476,150 @@ if ("development" !== 'production') {
|
|
|
448
476
|
return getReactDOM().__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactTestUtils;
|
|
449
477
|
};
|
|
450
478
|
}
|
|
451
|
-
},{"
|
|
479
|
+
},{"30":30}],7:[function(_dereq_,module,exports){
|
|
480
|
+
/**
|
|
481
|
+
* Copyright 2013-present, Facebook, Inc.
|
|
482
|
+
* All rights reserved.
|
|
483
|
+
*
|
|
484
|
+
* This source code is licensed under the BSD-style license found in the
|
|
485
|
+
* LICENSE file in the root directory of this source tree. An additional grant
|
|
486
|
+
* of patent rights can be found in the PATENTS file in the same directory.
|
|
487
|
+
*
|
|
488
|
+
*/
|
|
489
|
+
|
|
490
|
+
'use strict';
|
|
491
|
+
|
|
492
|
+
var _prodInvariant = _dereq_(39),
|
|
493
|
+
_assign = _dereq_(51);
|
|
494
|
+
|
|
495
|
+
var ReactNoopUpdateQueue = _dereq_(20);
|
|
496
|
+
|
|
497
|
+
var canDefineProperty = _dereq_(31);
|
|
498
|
+
var emptyObject = _dereq_(47);
|
|
499
|
+
var invariant = _dereq_(48);
|
|
500
|
+
var lowPriorityWarning = _dereq_(37);
|
|
501
|
+
|
|
502
|
+
/**
|
|
503
|
+
* Base class helpers for the updating state of a component.
|
|
504
|
+
*/
|
|
505
|
+
function ReactComponent(props, context, updater) {
|
|
506
|
+
this.props = props;
|
|
507
|
+
this.context = context;
|
|
508
|
+
this.refs = emptyObject;
|
|
509
|
+
// We initialize the default updater but the real one gets injected by the
|
|
510
|
+
// renderer.
|
|
511
|
+
this.updater = updater || ReactNoopUpdateQueue;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
ReactComponent.prototype.isReactComponent = {};
|
|
515
|
+
|
|
516
|
+
/**
|
|
517
|
+
* Sets a subset of the state. Always use this to mutate
|
|
518
|
+
* state. You should treat `this.state` as immutable.
|
|
519
|
+
*
|
|
520
|
+
* There is no guarantee that `this.state` will be immediately updated, so
|
|
521
|
+
* accessing `this.state` after calling this method may return the old value.
|
|
522
|
+
*
|
|
523
|
+
* There is no guarantee that calls to `setState` will run synchronously,
|
|
524
|
+
* as they may eventually be batched together. You can provide an optional
|
|
525
|
+
* callback that will be executed when the call to setState is actually
|
|
526
|
+
* completed.
|
|
527
|
+
*
|
|
528
|
+
* When a function is provided to setState, it will be called at some point in
|
|
529
|
+
* the future (not synchronously). It will be called with the up to date
|
|
530
|
+
* component arguments (state, props, context). These values can be different
|
|
531
|
+
* from this.* because your function may be called after receiveProps but before
|
|
532
|
+
* shouldComponentUpdate, and this new state, props, and context will not yet be
|
|
533
|
+
* assigned to this.
|
|
534
|
+
*
|
|
535
|
+
* @param {object|function} partialState Next partial state or function to
|
|
536
|
+
* produce next partial state to be merged with current state.
|
|
537
|
+
* @param {?function} callback Called after state is updated.
|
|
538
|
+
* @final
|
|
539
|
+
* @protected
|
|
540
|
+
*/
|
|
541
|
+
ReactComponent.prototype.setState = function (partialState, callback) {
|
|
542
|
+
!(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null) ? "development" !== 'production' ? invariant(false, 'setState(...): takes an object of state variables to update or a function which returns an object of state variables.') : _prodInvariant('85') : void 0;
|
|
543
|
+
this.updater.enqueueSetState(this, partialState);
|
|
544
|
+
if (callback) {
|
|
545
|
+
this.updater.enqueueCallback(this, callback, 'setState');
|
|
546
|
+
}
|
|
547
|
+
};
|
|
548
|
+
|
|
549
|
+
/**
|
|
550
|
+
* Forces an update. This should only be invoked when it is known with
|
|
551
|
+
* certainty that we are **not** in a DOM transaction.
|
|
552
|
+
*
|
|
553
|
+
* You may want to call this when you know that some deeper aspect of the
|
|
554
|
+
* component's state has changed but `setState` was not called.
|
|
555
|
+
*
|
|
556
|
+
* This will not invoke `shouldComponentUpdate`, but it will invoke
|
|
557
|
+
* `componentWillUpdate` and `componentDidUpdate`.
|
|
558
|
+
*
|
|
559
|
+
* @param {?function} callback Called after update is complete.
|
|
560
|
+
* @final
|
|
561
|
+
* @protected
|
|
562
|
+
*/
|
|
563
|
+
ReactComponent.prototype.forceUpdate = function (callback) {
|
|
564
|
+
this.updater.enqueueForceUpdate(this);
|
|
565
|
+
if (callback) {
|
|
566
|
+
this.updater.enqueueCallback(this, callback, 'forceUpdate');
|
|
567
|
+
}
|
|
568
|
+
};
|
|
569
|
+
|
|
570
|
+
/**
|
|
571
|
+
* Deprecated APIs. These APIs used to exist on classic React classes but since
|
|
572
|
+
* we would like to deprecate them, we're not going to move them over to this
|
|
573
|
+
* modern base class. Instead, we define a getter that warns if it's accessed.
|
|
574
|
+
*/
|
|
575
|
+
if ("development" !== 'production') {
|
|
576
|
+
var deprecatedAPIs = {
|
|
577
|
+
isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],
|
|
578
|
+
replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']
|
|
579
|
+
};
|
|
580
|
+
var defineDeprecationWarning = function (methodName, info) {
|
|
581
|
+
if (canDefineProperty) {
|
|
582
|
+
Object.defineProperty(ReactComponent.prototype, methodName, {
|
|
583
|
+
get: function () {
|
|
584
|
+
lowPriorityWarning(false, '%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);
|
|
585
|
+
return undefined;
|
|
586
|
+
}
|
|
587
|
+
});
|
|
588
|
+
}
|
|
589
|
+
};
|
|
590
|
+
for (var fnName in deprecatedAPIs) {
|
|
591
|
+
if (deprecatedAPIs.hasOwnProperty(fnName)) {
|
|
592
|
+
defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
/**
|
|
598
|
+
* Base class helpers for the updating state of a component.
|
|
599
|
+
*/
|
|
600
|
+
function ReactPureComponent(props, context, updater) {
|
|
601
|
+
// Duplicated from ReactComponent.
|
|
602
|
+
this.props = props;
|
|
603
|
+
this.context = context;
|
|
604
|
+
this.refs = emptyObject;
|
|
605
|
+
// We initialize the default updater but the real one gets injected by the
|
|
606
|
+
// renderer.
|
|
607
|
+
this.updater = updater || ReactNoopUpdateQueue;
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
function ComponentDummy() {}
|
|
611
|
+
ComponentDummy.prototype = ReactComponent.prototype;
|
|
612
|
+
ReactPureComponent.prototype = new ComponentDummy();
|
|
613
|
+
ReactPureComponent.prototype.constructor = ReactPureComponent;
|
|
614
|
+
// Avoid an extra prototype jump for these methods.
|
|
615
|
+
_assign(ReactPureComponent.prototype, ReactComponent.prototype);
|
|
616
|
+
ReactPureComponent.prototype.isPureReactComponent = true;
|
|
617
|
+
|
|
618
|
+
module.exports = {
|
|
619
|
+
Component: ReactComponent,
|
|
620
|
+
PureComponent: ReactPureComponent
|
|
621
|
+
};
|
|
622
|
+
},{"20":20,"31":31,"37":37,"39":39,"47":47,"48":48,"51":51}],8:[function(_dereq_,module,exports){
|
|
452
623
|
/**
|
|
453
624
|
* Copyright 2013-present, Facebook, Inc.
|
|
454
625
|
* All rights reserved.
|
|
@@ -461,7 +632,7 @@ if ("development" !== 'production') {
|
|
|
461
632
|
|
|
462
633
|
'use strict';
|
|
463
634
|
|
|
464
|
-
var _assign = _dereq_(
|
|
635
|
+
var _assign = _dereq_(51);
|
|
465
636
|
|
|
466
637
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
467
638
|
|
|
@@ -470,11 +641,11 @@ function _possibleConstructorReturn(self, call) { if (!self) { throw new Referen
|
|
|
470
641
|
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; }
|
|
471
642
|
|
|
472
643
|
var React = _dereq_(5);
|
|
473
|
-
var propTypesFactory = _dereq_(
|
|
644
|
+
var propTypesFactory = _dereq_(53);
|
|
474
645
|
var PropTypes = propTypesFactory(React.isValidElement);
|
|
475
646
|
|
|
476
|
-
var ReactTransitionGroup = _dereq_(
|
|
477
|
-
var ReactCSSTransitionGroupChild = _dereq_(
|
|
647
|
+
var ReactTransitionGroup = _dereq_(27);
|
|
648
|
+
var ReactCSSTransitionGroupChild = _dereq_(9);
|
|
478
649
|
|
|
479
650
|
function createTransitionTimeoutPropValidator(transitionType) {
|
|
480
651
|
var timeoutPropName = 'transition' + transitionType + 'Timeout';
|
|
@@ -485,7 +656,7 @@ function createTransitionTimeoutPropValidator(transitionType) {
|
|
|
485
656
|
if (props[enabledPropName]) {
|
|
486
657
|
// If no timeout duration is provided
|
|
487
658
|
if (props[timeoutPropName] == null) {
|
|
488
|
-
return new Error(timeoutPropName +
|
|
659
|
+
return new Error(timeoutPropName + " wasn't supplied to ReactCSSTransitionGroup: " + "this can cause unreliable animations and won't be supported in " + 'a future version of React. See ' + 'https://fb.me/react-animation-transition-group-timeout for more ' + 'information.');
|
|
489
660
|
|
|
490
661
|
// If the duration isn't a number
|
|
491
662
|
} else if (typeof props[timeoutPropName] !== 'number') {
|
|
@@ -555,7 +726,7 @@ ReactCSSTransitionGroup.defaultProps = {
|
|
|
555
726
|
|
|
556
727
|
|
|
557
728
|
module.exports = ReactCSSTransitionGroup;
|
|
558
|
-
},{"
|
|
729
|
+
},{"27":27,"5":5,"51":51,"53":53,"9":9}],9:[function(_dereq_,module,exports){
|
|
559
730
|
/**
|
|
560
731
|
* Copyright 2013-present, Facebook, Inc.
|
|
561
732
|
* All rights reserved.
|
|
@@ -577,11 +748,11 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
|
|
|
577
748
|
var React = _dereq_(5);
|
|
578
749
|
var ReactAddonsDOMDependencies = _dereq_(6);
|
|
579
750
|
|
|
580
|
-
var propTypesFactory = _dereq_(
|
|
751
|
+
var propTypesFactory = _dereq_(53);
|
|
581
752
|
var PropTypes = propTypesFactory(React.isValidElement);
|
|
582
753
|
|
|
583
|
-
var CSSCore = _dereq_(
|
|
584
|
-
var ReactTransitionEvents = _dereq_(
|
|
754
|
+
var CSSCore = _dereq_(44);
|
|
755
|
+
var ReactTransitionEvents = _dereq_(26);
|
|
585
756
|
|
|
586
757
|
var onlyChild = _dereq_(38);
|
|
587
758
|
|
|
@@ -740,7 +911,7 @@ ReactCSSTransitionGroupChild.propTypes = {
|
|
|
740
911
|
|
|
741
912
|
|
|
742
913
|
module.exports = ReactCSSTransitionGroupChild;
|
|
743
|
-
},{"
|
|
914
|
+
},{"26":26,"38":38,"44":44,"5":5,"53":53,"6":6}],10:[function(_dereq_,module,exports){
|
|
744
915
|
/**
|
|
745
916
|
* Copyright 2013-present, Facebook, Inc.
|
|
746
917
|
* All rights reserved.
|
|
@@ -754,9 +925,9 @@ module.exports = ReactCSSTransitionGroupChild;
|
|
|
754
925
|
'use strict';
|
|
755
926
|
|
|
756
927
|
var PooledClass = _dereq_(4);
|
|
757
|
-
var ReactElement = _dereq_(
|
|
928
|
+
var ReactElement = _dereq_(15);
|
|
758
929
|
|
|
759
|
-
var emptyFunction = _dereq_(
|
|
930
|
+
var emptyFunction = _dereq_(46);
|
|
760
931
|
var traverseAllChildren = _dereq_(41);
|
|
761
932
|
|
|
762
933
|
var twoArgumentPooler = PooledClass.twoArgumentPooler;
|
|
@@ -931,945 +1102,104 @@ var ReactChildren = {
|
|
|
931
1102
|
};
|
|
932
1103
|
|
|
933
1104
|
module.exports = ReactChildren;
|
|
934
|
-
},{"
|
|
1105
|
+
},{"15":15,"4":4,"41":41,"46":46}],11:[function(_dereq_,module,exports){
|
|
935
1106
|
/**
|
|
936
|
-
* Copyright
|
|
1107
|
+
* Copyright 2016-present, Facebook, Inc.
|
|
937
1108
|
* All rights reserved.
|
|
938
1109
|
*
|
|
939
1110
|
* This source code is licensed under the BSD-style license found in the
|
|
940
1111
|
* LICENSE file in the root directory of this source tree. An additional grant
|
|
941
1112
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
942
1113
|
*
|
|
1114
|
+
*
|
|
943
1115
|
*/
|
|
944
1116
|
|
|
945
1117
|
'use strict';
|
|
946
1118
|
|
|
947
|
-
var _prodInvariant = _dereq_(39)
|
|
948
|
-
_assign = _dereq_(50);
|
|
949
|
-
|
|
950
|
-
var ReactComponent = _dereq_(11);
|
|
951
|
-
var ReactElement = _dereq_(16);
|
|
952
|
-
var ReactPropTypeLocationNames = _dereq_(22);
|
|
953
|
-
var ReactNoopUpdateQueue = _dereq_(21);
|
|
1119
|
+
var _prodInvariant = _dereq_(39);
|
|
954
1120
|
|
|
955
|
-
var
|
|
956
|
-
var invariant = _dereq_(47);
|
|
957
|
-
var warning = _dereq_(49);
|
|
1121
|
+
var ReactCurrentOwner = _dereq_(13);
|
|
958
1122
|
|
|
959
|
-
var
|
|
1123
|
+
var invariant = _dereq_(48);
|
|
1124
|
+
var warning = _dereq_(50);
|
|
960
1125
|
|
|
961
|
-
|
|
962
|
-
//
|
|
963
|
-
|
|
964
|
-
|
|
1126
|
+
function isNative(fn) {
|
|
1127
|
+
// Based on isNative() from Lodash
|
|
1128
|
+
var funcToString = Function.prototype.toString;
|
|
1129
|
+
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
1130
|
+
var reIsNative = RegExp('^' + funcToString
|
|
1131
|
+
// Take an example native function source for comparison
|
|
1132
|
+
.call(hasOwnProperty
|
|
1133
|
+
// Strip regex characters so we can use it for regex
|
|
1134
|
+
).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&'
|
|
1135
|
+
// Remove hasOwnProperty from the template to make it generic
|
|
1136
|
+
).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$');
|
|
1137
|
+
try {
|
|
1138
|
+
var source = funcToString.call(fn);
|
|
1139
|
+
return reIsNative.test(source);
|
|
1140
|
+
} catch (err) {
|
|
1141
|
+
return false;
|
|
1142
|
+
}
|
|
965
1143
|
}
|
|
966
1144
|
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
1145
|
+
var canUseCollections =
|
|
1146
|
+
// Array.from
|
|
1147
|
+
typeof Array.from === 'function' &&
|
|
1148
|
+
// Map
|
|
1149
|
+
typeof Map === 'function' && isNative(Map) &&
|
|
1150
|
+
// Map.prototype.keys
|
|
1151
|
+
Map.prototype != null && typeof Map.prototype.keys === 'function' && isNative(Map.prototype.keys) &&
|
|
1152
|
+
// Set
|
|
1153
|
+
typeof Set === 'function' && isNative(Set) &&
|
|
1154
|
+
// Set.prototype.keys
|
|
1155
|
+
Set.prototype != null && typeof Set.prototype.keys === 'function' && isNative(Set.prototype.keys);
|
|
973
1156
|
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
*
|
|
982
|
-
* var MyComponent = React.createClass({
|
|
983
|
-
* render: function() {
|
|
984
|
-
* return <div>Hello World</div>;
|
|
985
|
-
* }
|
|
986
|
-
* });
|
|
987
|
-
*
|
|
988
|
-
* The class specification supports a specific protocol of methods that have
|
|
989
|
-
* special meaning (e.g. `render`). See `ReactClassInterface` for
|
|
990
|
-
* more the comprehensive protocol. Any other properties and methods in the
|
|
991
|
-
* class specification will be available on the prototype.
|
|
992
|
-
*
|
|
993
|
-
* @interface ReactClassInterface
|
|
994
|
-
* @internal
|
|
995
|
-
*/
|
|
996
|
-
var ReactClassInterface = {
|
|
1157
|
+
var setItem;
|
|
1158
|
+
var getItem;
|
|
1159
|
+
var removeItem;
|
|
1160
|
+
var getItemIDs;
|
|
1161
|
+
var addRoot;
|
|
1162
|
+
var removeRoot;
|
|
1163
|
+
var getRootIDs;
|
|
997
1164
|
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
* @type {array}
|
|
1002
|
-
* @optional
|
|
1003
|
-
*/
|
|
1004
|
-
mixins: 'DEFINE_MANY',
|
|
1165
|
+
if (canUseCollections) {
|
|
1166
|
+
var itemMap = new Map();
|
|
1167
|
+
var rootIDSet = new Set();
|
|
1005
1168
|
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1169
|
+
setItem = function (id, item) {
|
|
1170
|
+
itemMap.set(id, item);
|
|
1171
|
+
};
|
|
1172
|
+
getItem = function (id) {
|
|
1173
|
+
return itemMap.get(id);
|
|
1174
|
+
};
|
|
1175
|
+
removeItem = function (id) {
|
|
1176
|
+
itemMap['delete'](id);
|
|
1177
|
+
};
|
|
1178
|
+
getItemIDs = function () {
|
|
1179
|
+
return Array.from(itemMap.keys());
|
|
1180
|
+
};
|
|
1014
1181
|
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1182
|
+
addRoot = function (id) {
|
|
1183
|
+
rootIDSet.add(id);
|
|
1184
|
+
};
|
|
1185
|
+
removeRoot = function (id) {
|
|
1186
|
+
rootIDSet['delete'](id);
|
|
1187
|
+
};
|
|
1188
|
+
getRootIDs = function () {
|
|
1189
|
+
return Array.from(rootIDSet.keys());
|
|
1190
|
+
};
|
|
1191
|
+
} else {
|
|
1192
|
+
var itemByKey = {};
|
|
1193
|
+
var rootByKey = {};
|
|
1022
1194
|
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
/**
|
|
1032
|
-
* Definition of context types this component sets for its children.
|
|
1033
|
-
*
|
|
1034
|
-
* @type {object}
|
|
1035
|
-
* @optional
|
|
1036
|
-
*/
|
|
1037
|
-
childContextTypes: 'DEFINE_MANY',
|
|
1038
|
-
|
|
1039
|
-
// ==== Definition methods ====
|
|
1040
|
-
|
|
1041
|
-
/**
|
|
1042
|
-
* Invoked when the component is mounted. Values in the mapping will be set on
|
|
1043
|
-
* `this.props` if that prop is not specified (i.e. using an `in` check).
|
|
1044
|
-
*
|
|
1045
|
-
* This method is invoked before `getInitialState` and therefore cannot rely
|
|
1046
|
-
* on `this.state` or use `this.setState`.
|
|
1047
|
-
*
|
|
1048
|
-
* @return {object}
|
|
1049
|
-
* @optional
|
|
1050
|
-
*/
|
|
1051
|
-
getDefaultProps: 'DEFINE_MANY_MERGED',
|
|
1052
|
-
|
|
1053
|
-
/**
|
|
1054
|
-
* Invoked once before the component is mounted. The return value will be used
|
|
1055
|
-
* as the initial value of `this.state`.
|
|
1056
|
-
*
|
|
1057
|
-
* getInitialState: function() {
|
|
1058
|
-
* return {
|
|
1059
|
-
* isOn: false,
|
|
1060
|
-
* fooBaz: new BazFoo()
|
|
1061
|
-
* }
|
|
1062
|
-
* }
|
|
1063
|
-
*
|
|
1064
|
-
* @return {object}
|
|
1065
|
-
* @optional
|
|
1066
|
-
*/
|
|
1067
|
-
getInitialState: 'DEFINE_MANY_MERGED',
|
|
1068
|
-
|
|
1069
|
-
/**
|
|
1070
|
-
* @return {object}
|
|
1071
|
-
* @optional
|
|
1072
|
-
*/
|
|
1073
|
-
getChildContext: 'DEFINE_MANY_MERGED',
|
|
1074
|
-
|
|
1075
|
-
/**
|
|
1076
|
-
* Uses props from `this.props` and state from `this.state` to render the
|
|
1077
|
-
* structure of the component.
|
|
1078
|
-
*
|
|
1079
|
-
* No guarantees are made about when or how often this method is invoked, so
|
|
1080
|
-
* it must not have side effects.
|
|
1081
|
-
*
|
|
1082
|
-
* render: function() {
|
|
1083
|
-
* var name = this.props.name;
|
|
1084
|
-
* return <div>Hello, {name}!</div>;
|
|
1085
|
-
* }
|
|
1086
|
-
*
|
|
1087
|
-
* @return {ReactComponent}
|
|
1088
|
-
* @required
|
|
1089
|
-
*/
|
|
1090
|
-
render: 'DEFINE_ONCE',
|
|
1091
|
-
|
|
1092
|
-
// ==== Delegate methods ====
|
|
1093
|
-
|
|
1094
|
-
/**
|
|
1095
|
-
* Invoked when the component is initially created and about to be mounted.
|
|
1096
|
-
* This may have side effects, but any external subscriptions or data created
|
|
1097
|
-
* by this method must be cleaned up in `componentWillUnmount`.
|
|
1098
|
-
*
|
|
1099
|
-
* @optional
|
|
1100
|
-
*/
|
|
1101
|
-
componentWillMount: 'DEFINE_MANY',
|
|
1102
|
-
|
|
1103
|
-
/**
|
|
1104
|
-
* Invoked when the component has been mounted and has a DOM representation.
|
|
1105
|
-
* However, there is no guarantee that the DOM node is in the document.
|
|
1106
|
-
*
|
|
1107
|
-
* Use this as an opportunity to operate on the DOM when the component has
|
|
1108
|
-
* been mounted (initialized and rendered) for the first time.
|
|
1109
|
-
*
|
|
1110
|
-
* @param {DOMElement} rootNode DOM element representing the component.
|
|
1111
|
-
* @optional
|
|
1112
|
-
*/
|
|
1113
|
-
componentDidMount: 'DEFINE_MANY',
|
|
1114
|
-
|
|
1115
|
-
/**
|
|
1116
|
-
* Invoked before the component receives new props.
|
|
1117
|
-
*
|
|
1118
|
-
* Use this as an opportunity to react to a prop transition by updating the
|
|
1119
|
-
* state using `this.setState`. Current props are accessed via `this.props`.
|
|
1120
|
-
*
|
|
1121
|
-
* componentWillReceiveProps: function(nextProps, nextContext) {
|
|
1122
|
-
* this.setState({
|
|
1123
|
-
* likesIncreasing: nextProps.likeCount > this.props.likeCount
|
|
1124
|
-
* });
|
|
1125
|
-
* }
|
|
1126
|
-
*
|
|
1127
|
-
* NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop
|
|
1128
|
-
* transition may cause a state change, but the opposite is not true. If you
|
|
1129
|
-
* need it, you are probably looking for `componentWillUpdate`.
|
|
1130
|
-
*
|
|
1131
|
-
* @param {object} nextProps
|
|
1132
|
-
* @optional
|
|
1133
|
-
*/
|
|
1134
|
-
componentWillReceiveProps: 'DEFINE_MANY',
|
|
1135
|
-
|
|
1136
|
-
/**
|
|
1137
|
-
* Invoked while deciding if the component should be updated as a result of
|
|
1138
|
-
* receiving new props, state and/or context.
|
|
1139
|
-
*
|
|
1140
|
-
* Use this as an opportunity to `return false` when you're certain that the
|
|
1141
|
-
* transition to the new props/state/context will not require a component
|
|
1142
|
-
* update.
|
|
1143
|
-
*
|
|
1144
|
-
* shouldComponentUpdate: function(nextProps, nextState, nextContext) {
|
|
1145
|
-
* return !equal(nextProps, this.props) ||
|
|
1146
|
-
* !equal(nextState, this.state) ||
|
|
1147
|
-
* !equal(nextContext, this.context);
|
|
1148
|
-
* }
|
|
1149
|
-
*
|
|
1150
|
-
* @param {object} nextProps
|
|
1151
|
-
* @param {?object} nextState
|
|
1152
|
-
* @param {?object} nextContext
|
|
1153
|
-
* @return {boolean} True if the component should update.
|
|
1154
|
-
* @optional
|
|
1155
|
-
*/
|
|
1156
|
-
shouldComponentUpdate: 'DEFINE_ONCE',
|
|
1157
|
-
|
|
1158
|
-
/**
|
|
1159
|
-
* Invoked when the component is about to update due to a transition from
|
|
1160
|
-
* `this.props`, `this.state` and `this.context` to `nextProps`, `nextState`
|
|
1161
|
-
* and `nextContext`.
|
|
1162
|
-
*
|
|
1163
|
-
* Use this as an opportunity to perform preparation before an update occurs.
|
|
1164
|
-
*
|
|
1165
|
-
* NOTE: You **cannot** use `this.setState()` in this method.
|
|
1166
|
-
*
|
|
1167
|
-
* @param {object} nextProps
|
|
1168
|
-
* @param {?object} nextState
|
|
1169
|
-
* @param {?object} nextContext
|
|
1170
|
-
* @param {ReactReconcileTransaction} transaction
|
|
1171
|
-
* @optional
|
|
1172
|
-
*/
|
|
1173
|
-
componentWillUpdate: 'DEFINE_MANY',
|
|
1174
|
-
|
|
1175
|
-
/**
|
|
1176
|
-
* Invoked when the component's DOM representation has been updated.
|
|
1177
|
-
*
|
|
1178
|
-
* Use this as an opportunity to operate on the DOM when the component has
|
|
1179
|
-
* been updated.
|
|
1180
|
-
*
|
|
1181
|
-
* @param {object} prevProps
|
|
1182
|
-
* @param {?object} prevState
|
|
1183
|
-
* @param {?object} prevContext
|
|
1184
|
-
* @param {DOMElement} rootNode DOM element representing the component.
|
|
1185
|
-
* @optional
|
|
1186
|
-
*/
|
|
1187
|
-
componentDidUpdate: 'DEFINE_MANY',
|
|
1188
|
-
|
|
1189
|
-
/**
|
|
1190
|
-
* Invoked when the component is about to be removed from its parent and have
|
|
1191
|
-
* its DOM representation destroyed.
|
|
1192
|
-
*
|
|
1193
|
-
* Use this as an opportunity to deallocate any external resources.
|
|
1194
|
-
*
|
|
1195
|
-
* NOTE: There is no `componentDidUnmount` since your component will have been
|
|
1196
|
-
* destroyed by that point.
|
|
1197
|
-
*
|
|
1198
|
-
* @optional
|
|
1199
|
-
*/
|
|
1200
|
-
componentWillUnmount: 'DEFINE_MANY',
|
|
1201
|
-
|
|
1202
|
-
// ==== Advanced methods ====
|
|
1203
|
-
|
|
1204
|
-
/**
|
|
1205
|
-
* Updates the component's currently mounted DOM representation.
|
|
1206
|
-
*
|
|
1207
|
-
* By default, this implements React's rendering and reconciliation algorithm.
|
|
1208
|
-
* Sophisticated clients may wish to override this.
|
|
1209
|
-
*
|
|
1210
|
-
* @param {ReactReconcileTransaction} transaction
|
|
1211
|
-
* @internal
|
|
1212
|
-
* @overridable
|
|
1213
|
-
*/
|
|
1214
|
-
updateComponent: 'OVERRIDE_BASE'
|
|
1215
|
-
|
|
1216
|
-
};
|
|
1217
|
-
|
|
1218
|
-
/**
|
|
1219
|
-
* Mapping from class specification keys to special processing functions.
|
|
1220
|
-
*
|
|
1221
|
-
* Although these are declared like instance properties in the specification
|
|
1222
|
-
* when defining classes using `React.createClass`, they are actually static
|
|
1223
|
-
* and are accessible on the constructor instead of the prototype. Despite
|
|
1224
|
-
* being static, they must be defined outside of the "statics" key under
|
|
1225
|
-
* which all other static methods are defined.
|
|
1226
|
-
*/
|
|
1227
|
-
var RESERVED_SPEC_KEYS = {
|
|
1228
|
-
displayName: function (Constructor, displayName) {
|
|
1229
|
-
Constructor.displayName = displayName;
|
|
1230
|
-
},
|
|
1231
|
-
mixins: function (Constructor, mixins) {
|
|
1232
|
-
if (mixins) {
|
|
1233
|
-
for (var i = 0; i < mixins.length; i++) {
|
|
1234
|
-
mixSpecIntoComponent(Constructor, mixins[i]);
|
|
1235
|
-
}
|
|
1236
|
-
}
|
|
1237
|
-
},
|
|
1238
|
-
childContextTypes: function (Constructor, childContextTypes) {
|
|
1239
|
-
if ("development" !== 'production') {
|
|
1240
|
-
validateTypeDef(Constructor, childContextTypes, 'childContext');
|
|
1241
|
-
}
|
|
1242
|
-
Constructor.childContextTypes = _assign({}, Constructor.childContextTypes, childContextTypes);
|
|
1243
|
-
},
|
|
1244
|
-
contextTypes: function (Constructor, contextTypes) {
|
|
1245
|
-
if ("development" !== 'production') {
|
|
1246
|
-
validateTypeDef(Constructor, contextTypes, 'context');
|
|
1247
|
-
}
|
|
1248
|
-
Constructor.contextTypes = _assign({}, Constructor.contextTypes, contextTypes);
|
|
1249
|
-
},
|
|
1250
|
-
/**
|
|
1251
|
-
* Special case getDefaultProps which should move into statics but requires
|
|
1252
|
-
* automatic merging.
|
|
1253
|
-
*/
|
|
1254
|
-
getDefaultProps: function (Constructor, getDefaultProps) {
|
|
1255
|
-
if (Constructor.getDefaultProps) {
|
|
1256
|
-
Constructor.getDefaultProps = createMergedResultFunction(Constructor.getDefaultProps, getDefaultProps);
|
|
1257
|
-
} else {
|
|
1258
|
-
Constructor.getDefaultProps = getDefaultProps;
|
|
1259
|
-
}
|
|
1260
|
-
},
|
|
1261
|
-
propTypes: function (Constructor, propTypes) {
|
|
1262
|
-
if ("development" !== 'production') {
|
|
1263
|
-
validateTypeDef(Constructor, propTypes, 'prop');
|
|
1264
|
-
}
|
|
1265
|
-
Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes);
|
|
1266
|
-
},
|
|
1267
|
-
statics: function (Constructor, statics) {
|
|
1268
|
-
mixStaticSpecIntoComponent(Constructor, statics);
|
|
1269
|
-
},
|
|
1270
|
-
autobind: function () {} };
|
|
1271
|
-
|
|
1272
|
-
function validateTypeDef(Constructor, typeDef, location) {
|
|
1273
|
-
for (var propName in typeDef) {
|
|
1274
|
-
if (typeDef.hasOwnProperty(propName)) {
|
|
1275
|
-
// use a warning instead of an invariant so components
|
|
1276
|
-
// don't show up in prod but only in __DEV__
|
|
1277
|
-
"development" !== 'production' ? warning(typeof typeDef[propName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', Constructor.displayName || 'ReactClass', ReactPropTypeLocationNames[location], propName) : void 0;
|
|
1278
|
-
}
|
|
1279
|
-
}
|
|
1280
|
-
}
|
|
1281
|
-
|
|
1282
|
-
function validateMethodOverride(isAlreadyDefined, name) {
|
|
1283
|
-
var specPolicy = ReactClassInterface.hasOwnProperty(name) ? ReactClassInterface[name] : null;
|
|
1284
|
-
|
|
1285
|
-
// Disallow overriding of base class methods unless explicitly allowed.
|
|
1286
|
-
if (ReactClassMixin.hasOwnProperty(name)) {
|
|
1287
|
-
!(specPolicy === 'OVERRIDE_BASE') ? "development" !== 'production' ? invariant(false, 'ReactClassInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.', name) : _prodInvariant('73', name) : void 0;
|
|
1288
|
-
}
|
|
1289
|
-
|
|
1290
|
-
// Disallow defining methods more than once unless explicitly allowed.
|
|
1291
|
-
if (isAlreadyDefined) {
|
|
1292
|
-
!(specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED') ? "development" !== 'production' ? invariant(false, 'ReactClassInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.', name) : _prodInvariant('74', name) : void 0;
|
|
1293
|
-
}
|
|
1294
|
-
}
|
|
1295
|
-
|
|
1296
|
-
/**
|
|
1297
|
-
* Mixin helper which handles policy validation and reserved
|
|
1298
|
-
* specification keys when building React classes.
|
|
1299
|
-
*/
|
|
1300
|
-
function mixSpecIntoComponent(Constructor, spec) {
|
|
1301
|
-
if (!spec) {
|
|
1302
|
-
if ("development" !== 'production') {
|
|
1303
|
-
var typeofSpec = typeof spec;
|
|
1304
|
-
var isMixinValid = typeofSpec === 'object' && spec !== null;
|
|
1305
|
-
|
|
1306
|
-
"development" !== 'production' ? warning(isMixinValid, '%s: You\'re attempting to include a mixin that is either null ' + 'or not an object. Check the mixins included by the component, ' + 'as well as any mixins they include themselves. ' + 'Expected object but got %s.', Constructor.displayName || 'ReactClass', spec === null ? null : typeofSpec) : void 0;
|
|
1307
|
-
}
|
|
1308
|
-
|
|
1309
|
-
return;
|
|
1310
|
-
}
|
|
1311
|
-
|
|
1312
|
-
!(typeof spec !== 'function') ? "development" !== 'production' ? invariant(false, 'ReactClass: You\'re attempting to use a component class or function as a mixin. Instead, just use a regular object.') : _prodInvariant('75') : void 0;
|
|
1313
|
-
!!ReactElement.isValidElement(spec) ? "development" !== 'production' ? invariant(false, 'ReactClass: You\'re attempting to use a component as a mixin. Instead, just use a regular object.') : _prodInvariant('76') : void 0;
|
|
1314
|
-
|
|
1315
|
-
var proto = Constructor.prototype;
|
|
1316
|
-
var autoBindPairs = proto.__reactAutoBindPairs;
|
|
1317
|
-
|
|
1318
|
-
// By handling mixins before any other properties, we ensure the same
|
|
1319
|
-
// chaining order is applied to methods with DEFINE_MANY policy, whether
|
|
1320
|
-
// mixins are listed before or after these methods in the spec.
|
|
1321
|
-
if (spec.hasOwnProperty(MIXINS_KEY)) {
|
|
1322
|
-
RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins);
|
|
1323
|
-
}
|
|
1324
|
-
|
|
1325
|
-
for (var name in spec) {
|
|
1326
|
-
if (!spec.hasOwnProperty(name)) {
|
|
1327
|
-
continue;
|
|
1328
|
-
}
|
|
1329
|
-
|
|
1330
|
-
if (name === MIXINS_KEY) {
|
|
1331
|
-
// We have already handled mixins in a special case above.
|
|
1332
|
-
continue;
|
|
1333
|
-
}
|
|
1334
|
-
|
|
1335
|
-
var property = spec[name];
|
|
1336
|
-
var isAlreadyDefined = proto.hasOwnProperty(name);
|
|
1337
|
-
validateMethodOverride(isAlreadyDefined, name);
|
|
1338
|
-
|
|
1339
|
-
if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) {
|
|
1340
|
-
RESERVED_SPEC_KEYS[name](Constructor, property);
|
|
1341
|
-
} else {
|
|
1342
|
-
// Setup methods on prototype:
|
|
1343
|
-
// The following member methods should not be automatically bound:
|
|
1344
|
-
// 1. Expected ReactClass methods (in the "interface").
|
|
1345
|
-
// 2. Overridden methods (that were mixed in).
|
|
1346
|
-
var isReactClassMethod = ReactClassInterface.hasOwnProperty(name);
|
|
1347
|
-
var isFunction = typeof property === 'function';
|
|
1348
|
-
var shouldAutoBind = isFunction && !isReactClassMethod && !isAlreadyDefined && spec.autobind !== false;
|
|
1349
|
-
|
|
1350
|
-
if (shouldAutoBind) {
|
|
1351
|
-
autoBindPairs.push(name, property);
|
|
1352
|
-
proto[name] = property;
|
|
1353
|
-
} else {
|
|
1354
|
-
if (isAlreadyDefined) {
|
|
1355
|
-
var specPolicy = ReactClassInterface[name];
|
|
1356
|
-
|
|
1357
|
-
// These cases should already be caught by validateMethodOverride.
|
|
1358
|
-
!(isReactClassMethod && (specPolicy === 'DEFINE_MANY_MERGED' || specPolicy === 'DEFINE_MANY')) ? "development" !== 'production' ? invariant(false, 'ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.', specPolicy, name) : _prodInvariant('77', specPolicy, name) : void 0;
|
|
1359
|
-
|
|
1360
|
-
// For methods which are defined more than once, call the existing
|
|
1361
|
-
// methods before calling the new property, merging if appropriate.
|
|
1362
|
-
if (specPolicy === 'DEFINE_MANY_MERGED') {
|
|
1363
|
-
proto[name] = createMergedResultFunction(proto[name], property);
|
|
1364
|
-
} else if (specPolicy === 'DEFINE_MANY') {
|
|
1365
|
-
proto[name] = createChainedFunction(proto[name], property);
|
|
1366
|
-
}
|
|
1367
|
-
} else {
|
|
1368
|
-
proto[name] = property;
|
|
1369
|
-
if ("development" !== 'production') {
|
|
1370
|
-
// Add verbose displayName to the function, which helps when looking
|
|
1371
|
-
// at profiling tools.
|
|
1372
|
-
if (typeof property === 'function' && spec.displayName) {
|
|
1373
|
-
proto[name].displayName = spec.displayName + '_' + name;
|
|
1374
|
-
}
|
|
1375
|
-
}
|
|
1376
|
-
}
|
|
1377
|
-
}
|
|
1378
|
-
}
|
|
1379
|
-
}
|
|
1380
|
-
}
|
|
1381
|
-
|
|
1382
|
-
function mixStaticSpecIntoComponent(Constructor, statics) {
|
|
1383
|
-
if (!statics) {
|
|
1384
|
-
return;
|
|
1385
|
-
}
|
|
1386
|
-
for (var name in statics) {
|
|
1387
|
-
var property = statics[name];
|
|
1388
|
-
if (!statics.hasOwnProperty(name)) {
|
|
1389
|
-
continue;
|
|
1390
|
-
}
|
|
1391
|
-
|
|
1392
|
-
var isReserved = name in RESERVED_SPEC_KEYS;
|
|
1393
|
-
!!isReserved ? "development" !== 'production' ? invariant(false, 'ReactClass: You are attempting to define a reserved property, `%s`, that shouldn\'t be on the "statics" key. Define it as an instance property instead; it will still be accessible on the constructor.', name) : _prodInvariant('78', name) : void 0;
|
|
1394
|
-
|
|
1395
|
-
var isInherited = name in Constructor;
|
|
1396
|
-
!!isInherited ? "development" !== 'production' ? invariant(false, 'ReactClass: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.', name) : _prodInvariant('79', name) : void 0;
|
|
1397
|
-
Constructor[name] = property;
|
|
1398
|
-
}
|
|
1399
|
-
}
|
|
1400
|
-
|
|
1401
|
-
/**
|
|
1402
|
-
* Merge two objects, but throw if both contain the same key.
|
|
1403
|
-
*
|
|
1404
|
-
* @param {object} one The first object, which is mutated.
|
|
1405
|
-
* @param {object} two The second object
|
|
1406
|
-
* @return {object} one after it has been mutated to contain everything in two.
|
|
1407
|
-
*/
|
|
1408
|
-
function mergeIntoWithNoDuplicateKeys(one, two) {
|
|
1409
|
-
!(one && two && typeof one === 'object' && typeof two === 'object') ? "development" !== 'production' ? invariant(false, 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.') : _prodInvariant('80') : void 0;
|
|
1410
|
-
|
|
1411
|
-
for (var key in two) {
|
|
1412
|
-
if (two.hasOwnProperty(key)) {
|
|
1413
|
-
!(one[key] === undefined) ? "development" !== 'production' ? invariant(false, 'mergeIntoWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.', key) : _prodInvariant('81', key) : void 0;
|
|
1414
|
-
one[key] = two[key];
|
|
1415
|
-
}
|
|
1416
|
-
}
|
|
1417
|
-
return one;
|
|
1418
|
-
}
|
|
1419
|
-
|
|
1420
|
-
/**
|
|
1421
|
-
* Creates a function that invokes two functions and merges their return values.
|
|
1422
|
-
*
|
|
1423
|
-
* @param {function} one Function to invoke first.
|
|
1424
|
-
* @param {function} two Function to invoke second.
|
|
1425
|
-
* @return {function} Function that invokes the two argument functions.
|
|
1426
|
-
* @private
|
|
1427
|
-
*/
|
|
1428
|
-
function createMergedResultFunction(one, two) {
|
|
1429
|
-
return function mergedResult() {
|
|
1430
|
-
var a = one.apply(this, arguments);
|
|
1431
|
-
var b = two.apply(this, arguments);
|
|
1432
|
-
if (a == null) {
|
|
1433
|
-
return b;
|
|
1434
|
-
} else if (b == null) {
|
|
1435
|
-
return a;
|
|
1436
|
-
}
|
|
1437
|
-
var c = {};
|
|
1438
|
-
mergeIntoWithNoDuplicateKeys(c, a);
|
|
1439
|
-
mergeIntoWithNoDuplicateKeys(c, b);
|
|
1440
|
-
return c;
|
|
1441
|
-
};
|
|
1442
|
-
}
|
|
1443
|
-
|
|
1444
|
-
/**
|
|
1445
|
-
* Creates a function that invokes two functions and ignores their return vales.
|
|
1446
|
-
*
|
|
1447
|
-
* @param {function} one Function to invoke first.
|
|
1448
|
-
* @param {function} two Function to invoke second.
|
|
1449
|
-
* @return {function} Function that invokes the two argument functions.
|
|
1450
|
-
* @private
|
|
1451
|
-
*/
|
|
1452
|
-
function createChainedFunction(one, two) {
|
|
1453
|
-
return function chainedFunction() {
|
|
1454
|
-
one.apply(this, arguments);
|
|
1455
|
-
two.apply(this, arguments);
|
|
1456
|
-
};
|
|
1457
|
-
}
|
|
1458
|
-
|
|
1459
|
-
/**
|
|
1460
|
-
* Binds a method to the component.
|
|
1461
|
-
*
|
|
1462
|
-
* @param {object} component Component whose method is going to be bound.
|
|
1463
|
-
* @param {function} method Method to be bound.
|
|
1464
|
-
* @return {function} The bound method.
|
|
1465
|
-
*/
|
|
1466
|
-
function bindAutoBindMethod(component, method) {
|
|
1467
|
-
var boundMethod = method.bind(component);
|
|
1468
|
-
if ("development" !== 'production') {
|
|
1469
|
-
boundMethod.__reactBoundContext = component;
|
|
1470
|
-
boundMethod.__reactBoundMethod = method;
|
|
1471
|
-
boundMethod.__reactBoundArguments = null;
|
|
1472
|
-
var componentName = component.constructor.displayName;
|
|
1473
|
-
var _bind = boundMethod.bind;
|
|
1474
|
-
boundMethod.bind = function (newThis) {
|
|
1475
|
-
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
1476
|
-
args[_key - 1] = arguments[_key];
|
|
1477
|
-
}
|
|
1478
|
-
|
|
1479
|
-
// User is trying to bind() an autobound method; we effectively will
|
|
1480
|
-
// ignore the value of "this" that the user is trying to use, so
|
|
1481
|
-
// let's warn.
|
|
1482
|
-
if (newThis !== component && newThis !== null) {
|
|
1483
|
-
"development" !== 'production' ? warning(false, 'bind(): React component methods may only be bound to the ' + 'component instance. See %s', componentName) : void 0;
|
|
1484
|
-
} else if (!args.length) {
|
|
1485
|
-
"development" !== 'production' ? warning(false, 'bind(): You are binding a component method to the component. ' + 'React does this for you automatically in a high-performance ' + 'way, so you can safely remove this call. See %s', componentName) : void 0;
|
|
1486
|
-
return boundMethod;
|
|
1487
|
-
}
|
|
1488
|
-
var reboundMethod = _bind.apply(boundMethod, arguments);
|
|
1489
|
-
reboundMethod.__reactBoundContext = component;
|
|
1490
|
-
reboundMethod.__reactBoundMethod = method;
|
|
1491
|
-
reboundMethod.__reactBoundArguments = args;
|
|
1492
|
-
return reboundMethod;
|
|
1493
|
-
};
|
|
1494
|
-
}
|
|
1495
|
-
return boundMethod;
|
|
1496
|
-
}
|
|
1497
|
-
|
|
1498
|
-
/**
|
|
1499
|
-
* Binds all auto-bound methods in a component.
|
|
1500
|
-
*
|
|
1501
|
-
* @param {object} component Component whose method is going to be bound.
|
|
1502
|
-
*/
|
|
1503
|
-
function bindAutoBindMethods(component) {
|
|
1504
|
-
var pairs = component.__reactAutoBindPairs;
|
|
1505
|
-
for (var i = 0; i < pairs.length; i += 2) {
|
|
1506
|
-
var autoBindKey = pairs[i];
|
|
1507
|
-
var method = pairs[i + 1];
|
|
1508
|
-
component[autoBindKey] = bindAutoBindMethod(component, method);
|
|
1509
|
-
}
|
|
1510
|
-
}
|
|
1511
|
-
|
|
1512
|
-
/**
|
|
1513
|
-
* Add more to the ReactClass base class. These are all legacy features and
|
|
1514
|
-
* therefore not already part of the modern ReactComponent.
|
|
1515
|
-
*/
|
|
1516
|
-
var ReactClassMixin = {
|
|
1517
|
-
|
|
1518
|
-
/**
|
|
1519
|
-
* TODO: This will be deprecated because state should always keep a consistent
|
|
1520
|
-
* type signature and the only use case for this, is to avoid that.
|
|
1521
|
-
*/
|
|
1522
|
-
replaceState: function (newState, callback) {
|
|
1523
|
-
this.updater.enqueueReplaceState(this, newState);
|
|
1524
|
-
if (callback) {
|
|
1525
|
-
this.updater.enqueueCallback(this, callback, 'replaceState');
|
|
1526
|
-
}
|
|
1527
|
-
},
|
|
1528
|
-
|
|
1529
|
-
/**
|
|
1530
|
-
* Checks whether or not this composite component is mounted.
|
|
1531
|
-
* @return {boolean} True if mounted, false otherwise.
|
|
1532
|
-
* @protected
|
|
1533
|
-
* @final
|
|
1534
|
-
*/
|
|
1535
|
-
isMounted: function () {
|
|
1536
|
-
return this.updater.isMounted(this);
|
|
1537
|
-
}
|
|
1538
|
-
};
|
|
1539
|
-
|
|
1540
|
-
var ReactClassComponent = function () {};
|
|
1541
|
-
_assign(ReactClassComponent.prototype, ReactComponent.prototype, ReactClassMixin);
|
|
1542
|
-
|
|
1543
|
-
var didWarnDeprecated = false;
|
|
1544
|
-
|
|
1545
|
-
/**
|
|
1546
|
-
* Module for creating composite components.
|
|
1547
|
-
*
|
|
1548
|
-
* @class ReactClass
|
|
1549
|
-
*/
|
|
1550
|
-
var ReactClass = {
|
|
1551
|
-
|
|
1552
|
-
/**
|
|
1553
|
-
* Creates a composite component class given a class specification.
|
|
1554
|
-
* See https://facebook.github.io/react/docs/top-level-api.html#react.createclass
|
|
1555
|
-
*
|
|
1556
|
-
* @param {object} spec Class specification (which must define `render`).
|
|
1557
|
-
* @return {function} Component constructor function.
|
|
1558
|
-
* @public
|
|
1559
|
-
*/
|
|
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
|
-
|
|
1566
|
-
// To keep our warnings more understandable, we'll use a little hack here to
|
|
1567
|
-
// ensure that Constructor.name !== 'Constructor'. This makes sure we don't
|
|
1568
|
-
// unnecessarily identify a class without displayName as 'Constructor'.
|
|
1569
|
-
var Constructor = identity(function (props, context, updater) {
|
|
1570
|
-
// This constructor gets overridden by mocks. The argument is used
|
|
1571
|
-
// by mocks to assert on what gets mounted.
|
|
1572
|
-
|
|
1573
|
-
if ("development" !== 'production') {
|
|
1574
|
-
"development" !== 'production' ? warning(this instanceof Constructor, 'Something is calling a React component directly. Use a factory or ' + 'JSX instead. See: https://fb.me/react-legacyfactory') : void 0;
|
|
1575
|
-
}
|
|
1576
|
-
|
|
1577
|
-
// Wire up auto-binding
|
|
1578
|
-
if (this.__reactAutoBindPairs.length) {
|
|
1579
|
-
bindAutoBindMethods(this);
|
|
1580
|
-
}
|
|
1581
|
-
|
|
1582
|
-
this.props = props;
|
|
1583
|
-
this.context = context;
|
|
1584
|
-
this.refs = emptyObject;
|
|
1585
|
-
this.updater = updater || ReactNoopUpdateQueue;
|
|
1586
|
-
|
|
1587
|
-
this.state = null;
|
|
1588
|
-
|
|
1589
|
-
// ReactClasses doesn't have constructors. Instead, they use the
|
|
1590
|
-
// getInitialState and componentWillMount methods for initialization.
|
|
1591
|
-
|
|
1592
|
-
var initialState = this.getInitialState ? this.getInitialState() : null;
|
|
1593
|
-
if ("development" !== 'production') {
|
|
1594
|
-
// We allow auto-mocks to proceed as if they're returning null.
|
|
1595
|
-
if (initialState === undefined && this.getInitialState._isMockFunction) {
|
|
1596
|
-
// This is probably bad practice. Consider warning here and
|
|
1597
|
-
// deprecating this convenience.
|
|
1598
|
-
initialState = null;
|
|
1599
|
-
}
|
|
1600
|
-
}
|
|
1601
|
-
!(typeof initialState === 'object' && !Array.isArray(initialState)) ? "development" !== 'production' ? invariant(false, '%s.getInitialState(): must return an object or null', Constructor.displayName || 'ReactCompositeComponent') : _prodInvariant('82', Constructor.displayName || 'ReactCompositeComponent') : void 0;
|
|
1602
|
-
|
|
1603
|
-
this.state = initialState;
|
|
1604
|
-
});
|
|
1605
|
-
Constructor.prototype = new ReactClassComponent();
|
|
1606
|
-
Constructor.prototype.constructor = Constructor;
|
|
1607
|
-
Constructor.prototype.__reactAutoBindPairs = [];
|
|
1608
|
-
|
|
1609
|
-
injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor));
|
|
1610
|
-
|
|
1611
|
-
mixSpecIntoComponent(Constructor, spec);
|
|
1612
|
-
|
|
1613
|
-
// Initialize the defaultProps property after all mixins have been merged.
|
|
1614
|
-
if (Constructor.getDefaultProps) {
|
|
1615
|
-
Constructor.defaultProps = Constructor.getDefaultProps();
|
|
1616
|
-
}
|
|
1617
|
-
|
|
1618
|
-
if ("development" !== 'production') {
|
|
1619
|
-
// This is a tag to indicate that the use of these method names is ok,
|
|
1620
|
-
// since it's used with createClass. If it's not, then it's likely a
|
|
1621
|
-
// mistake so we'll warn you to use the static property, property
|
|
1622
|
-
// initializer or constructor respectively.
|
|
1623
|
-
if (Constructor.getDefaultProps) {
|
|
1624
|
-
Constructor.getDefaultProps.isReactClassApproved = {};
|
|
1625
|
-
}
|
|
1626
|
-
if (Constructor.prototype.getInitialState) {
|
|
1627
|
-
Constructor.prototype.getInitialState.isReactClassApproved = {};
|
|
1628
|
-
}
|
|
1629
|
-
}
|
|
1630
|
-
|
|
1631
|
-
!Constructor.prototype.render ? "development" !== 'production' ? invariant(false, 'createClass(...): Class specification must implement a `render` method.') : _prodInvariant('83') : void 0;
|
|
1632
|
-
|
|
1633
|
-
if ("development" !== 'production') {
|
|
1634
|
-
"development" !== 'production' ? warning(!Constructor.prototype.componentShouldUpdate, '%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', spec.displayName || 'A component') : void 0;
|
|
1635
|
-
"development" !== 'production' ? warning(!Constructor.prototype.componentWillRecieveProps, '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', spec.displayName || 'A component') : void 0;
|
|
1636
|
-
}
|
|
1637
|
-
|
|
1638
|
-
// Reduce time spent doing lookups by setting these on the prototype.
|
|
1639
|
-
for (var methodName in ReactClassInterface) {
|
|
1640
|
-
if (!Constructor.prototype[methodName]) {
|
|
1641
|
-
Constructor.prototype[methodName] = null;
|
|
1642
|
-
}
|
|
1643
|
-
}
|
|
1644
|
-
|
|
1645
|
-
return Constructor;
|
|
1646
|
-
},
|
|
1647
|
-
|
|
1648
|
-
injection: {
|
|
1649
|
-
injectMixin: function (mixin) {
|
|
1650
|
-
injectedMixins.push(mixin);
|
|
1651
|
-
}
|
|
1652
|
-
}
|
|
1653
|
-
|
|
1654
|
-
};
|
|
1655
|
-
|
|
1656
|
-
module.exports = ReactClass;
|
|
1657
|
-
},{"11":11,"16":16,"21":21,"22":22,"39":39,"46":46,"47":47,"49":49,"50":50}],11:[function(_dereq_,module,exports){
|
|
1658
|
-
/**
|
|
1659
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
1660
|
-
* All rights reserved.
|
|
1661
|
-
*
|
|
1662
|
-
* This source code is licensed under the BSD-style license found in the
|
|
1663
|
-
* LICENSE file in the root directory of this source tree. An additional grant
|
|
1664
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
1665
|
-
*
|
|
1666
|
-
*/
|
|
1667
|
-
|
|
1668
|
-
'use strict';
|
|
1669
|
-
|
|
1670
|
-
var _prodInvariant = _dereq_(39);
|
|
1671
|
-
|
|
1672
|
-
var ReactNoopUpdateQueue = _dereq_(21);
|
|
1673
|
-
|
|
1674
|
-
var canDefineProperty = _dereq_(33);
|
|
1675
|
-
var emptyObject = _dereq_(46);
|
|
1676
|
-
var invariant = _dereq_(47);
|
|
1677
|
-
var warning = _dereq_(49);
|
|
1678
|
-
|
|
1679
|
-
/**
|
|
1680
|
-
* Base class helpers for the updating state of a component.
|
|
1681
|
-
*/
|
|
1682
|
-
function ReactComponent(props, context, updater) {
|
|
1683
|
-
this.props = props;
|
|
1684
|
-
this.context = context;
|
|
1685
|
-
this.refs = emptyObject;
|
|
1686
|
-
// We initialize the default updater but the real one gets injected by the
|
|
1687
|
-
// renderer.
|
|
1688
|
-
this.updater = updater || ReactNoopUpdateQueue;
|
|
1689
|
-
}
|
|
1690
|
-
|
|
1691
|
-
ReactComponent.prototype.isReactComponent = {};
|
|
1692
|
-
|
|
1693
|
-
/**
|
|
1694
|
-
* Sets a subset of the state. Always use this to mutate
|
|
1695
|
-
* state. You should treat `this.state` as immutable.
|
|
1696
|
-
*
|
|
1697
|
-
* There is no guarantee that `this.state` will be immediately updated, so
|
|
1698
|
-
* accessing `this.state` after calling this method may return the old value.
|
|
1699
|
-
*
|
|
1700
|
-
* There is no guarantee that calls to `setState` will run synchronously,
|
|
1701
|
-
* as they may eventually be batched together. You can provide an optional
|
|
1702
|
-
* callback that will be executed when the call to setState is actually
|
|
1703
|
-
* completed.
|
|
1704
|
-
*
|
|
1705
|
-
* When a function is provided to setState, it will be called at some point in
|
|
1706
|
-
* the future (not synchronously). It will be called with the up to date
|
|
1707
|
-
* component arguments (state, props, context). These values can be different
|
|
1708
|
-
* from this.* because your function may be called after receiveProps but before
|
|
1709
|
-
* shouldComponentUpdate, and this new state, props, and context will not yet be
|
|
1710
|
-
* assigned to this.
|
|
1711
|
-
*
|
|
1712
|
-
* @param {object|function} partialState Next partial state or function to
|
|
1713
|
-
* produce next partial state to be merged with current state.
|
|
1714
|
-
* @param {?function} callback Called after state is updated.
|
|
1715
|
-
* @final
|
|
1716
|
-
* @protected
|
|
1717
|
-
*/
|
|
1718
|
-
ReactComponent.prototype.setState = function (partialState, callback) {
|
|
1719
|
-
!(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null) ? "development" !== 'production' ? invariant(false, 'setState(...): takes an object of state variables to update or a function which returns an object of state variables.') : _prodInvariant('85') : void 0;
|
|
1720
|
-
this.updater.enqueueSetState(this, partialState);
|
|
1721
|
-
if (callback) {
|
|
1722
|
-
this.updater.enqueueCallback(this, callback, 'setState');
|
|
1723
|
-
}
|
|
1724
|
-
};
|
|
1725
|
-
|
|
1726
|
-
/**
|
|
1727
|
-
* Forces an update. This should only be invoked when it is known with
|
|
1728
|
-
* certainty that we are **not** in a DOM transaction.
|
|
1729
|
-
*
|
|
1730
|
-
* You may want to call this when you know that some deeper aspect of the
|
|
1731
|
-
* component's state has changed but `setState` was not called.
|
|
1732
|
-
*
|
|
1733
|
-
* This will not invoke `shouldComponentUpdate`, but it will invoke
|
|
1734
|
-
* `componentWillUpdate` and `componentDidUpdate`.
|
|
1735
|
-
*
|
|
1736
|
-
* @param {?function} callback Called after update is complete.
|
|
1737
|
-
* @final
|
|
1738
|
-
* @protected
|
|
1739
|
-
*/
|
|
1740
|
-
ReactComponent.prototype.forceUpdate = function (callback) {
|
|
1741
|
-
this.updater.enqueueForceUpdate(this);
|
|
1742
|
-
if (callback) {
|
|
1743
|
-
this.updater.enqueueCallback(this, callback, 'forceUpdate');
|
|
1744
|
-
}
|
|
1745
|
-
};
|
|
1746
|
-
|
|
1747
|
-
/**
|
|
1748
|
-
* Deprecated APIs. These APIs used to exist on classic React classes but since
|
|
1749
|
-
* we would like to deprecate them, we're not going to move them over to this
|
|
1750
|
-
* modern base class. Instead, we define a getter that warns if it's accessed.
|
|
1751
|
-
*/
|
|
1752
|
-
if ("development" !== 'production') {
|
|
1753
|
-
var deprecatedAPIs = {
|
|
1754
|
-
isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],
|
|
1755
|
-
replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']
|
|
1756
|
-
};
|
|
1757
|
-
var defineDeprecationWarning = function (methodName, info) {
|
|
1758
|
-
if (canDefineProperty) {
|
|
1759
|
-
Object.defineProperty(ReactComponent.prototype, methodName, {
|
|
1760
|
-
get: function () {
|
|
1761
|
-
"development" !== 'production' ? warning(false, '%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]) : void 0;
|
|
1762
|
-
return undefined;
|
|
1763
|
-
}
|
|
1764
|
-
});
|
|
1765
|
-
}
|
|
1766
|
-
};
|
|
1767
|
-
for (var fnName in deprecatedAPIs) {
|
|
1768
|
-
if (deprecatedAPIs.hasOwnProperty(fnName)) {
|
|
1769
|
-
defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
|
|
1770
|
-
}
|
|
1771
|
-
}
|
|
1772
|
-
}
|
|
1773
|
-
|
|
1774
|
-
module.exports = ReactComponent;
|
|
1775
|
-
},{"21":21,"33":33,"39":39,"46":46,"47":47,"49":49}],12:[function(_dereq_,module,exports){
|
|
1776
|
-
/**
|
|
1777
|
-
* Copyright 2016-present, Facebook, Inc.
|
|
1778
|
-
* All rights reserved.
|
|
1779
|
-
*
|
|
1780
|
-
* This source code is licensed under the BSD-style license found in the
|
|
1781
|
-
* LICENSE file in the root directory of this source tree. An additional grant
|
|
1782
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
1783
|
-
*
|
|
1784
|
-
*
|
|
1785
|
-
*/
|
|
1786
|
-
|
|
1787
|
-
'use strict';
|
|
1788
|
-
|
|
1789
|
-
var _prodInvariant = _dereq_(39);
|
|
1790
|
-
|
|
1791
|
-
var ReactCurrentOwner = _dereq_(14);
|
|
1792
|
-
|
|
1793
|
-
var invariant = _dereq_(47);
|
|
1794
|
-
var warning = _dereq_(49);
|
|
1795
|
-
|
|
1796
|
-
function isNative(fn) {
|
|
1797
|
-
// Based on isNative() from Lodash
|
|
1798
|
-
var funcToString = Function.prototype.toString;
|
|
1799
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
1800
|
-
var reIsNative = RegExp('^' + funcToString
|
|
1801
|
-
// Take an example native function source for comparison
|
|
1802
|
-
.call(hasOwnProperty)
|
|
1803
|
-
// Strip regex characters so we can use it for regex
|
|
1804
|
-
.replace(/[\\^$.*+?()[\]{}|]/g, '\\$&')
|
|
1805
|
-
// Remove hasOwnProperty from the template to make it generic
|
|
1806
|
-
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$');
|
|
1807
|
-
try {
|
|
1808
|
-
var source = funcToString.call(fn);
|
|
1809
|
-
return reIsNative.test(source);
|
|
1810
|
-
} catch (err) {
|
|
1811
|
-
return false;
|
|
1812
|
-
}
|
|
1813
|
-
}
|
|
1814
|
-
|
|
1815
|
-
var canUseCollections =
|
|
1816
|
-
// Array.from
|
|
1817
|
-
typeof Array.from === 'function' &&
|
|
1818
|
-
// Map
|
|
1819
|
-
typeof Map === 'function' && isNative(Map) &&
|
|
1820
|
-
// Map.prototype.keys
|
|
1821
|
-
Map.prototype != null && typeof Map.prototype.keys === 'function' && isNative(Map.prototype.keys) &&
|
|
1822
|
-
// Set
|
|
1823
|
-
typeof Set === 'function' && isNative(Set) &&
|
|
1824
|
-
// Set.prototype.keys
|
|
1825
|
-
Set.prototype != null && typeof Set.prototype.keys === 'function' && isNative(Set.prototype.keys);
|
|
1826
|
-
|
|
1827
|
-
var setItem;
|
|
1828
|
-
var getItem;
|
|
1829
|
-
var removeItem;
|
|
1830
|
-
var getItemIDs;
|
|
1831
|
-
var addRoot;
|
|
1832
|
-
var removeRoot;
|
|
1833
|
-
var getRootIDs;
|
|
1834
|
-
|
|
1835
|
-
if (canUseCollections) {
|
|
1836
|
-
var itemMap = new Map();
|
|
1837
|
-
var rootIDSet = new Set();
|
|
1838
|
-
|
|
1839
|
-
setItem = function (id, item) {
|
|
1840
|
-
itemMap.set(id, item);
|
|
1841
|
-
};
|
|
1842
|
-
getItem = function (id) {
|
|
1843
|
-
return itemMap.get(id);
|
|
1844
|
-
};
|
|
1845
|
-
removeItem = function (id) {
|
|
1846
|
-
itemMap['delete'](id);
|
|
1847
|
-
};
|
|
1848
|
-
getItemIDs = function () {
|
|
1849
|
-
return Array.from(itemMap.keys());
|
|
1850
|
-
};
|
|
1851
|
-
|
|
1852
|
-
addRoot = function (id) {
|
|
1853
|
-
rootIDSet.add(id);
|
|
1854
|
-
};
|
|
1855
|
-
removeRoot = function (id) {
|
|
1856
|
-
rootIDSet['delete'](id);
|
|
1857
|
-
};
|
|
1858
|
-
getRootIDs = function () {
|
|
1859
|
-
return Array.from(rootIDSet.keys());
|
|
1860
|
-
};
|
|
1861
|
-
} else {
|
|
1862
|
-
var itemByKey = {};
|
|
1863
|
-
var rootByKey = {};
|
|
1864
|
-
|
|
1865
|
-
// Use non-numeric keys to prevent V8 performance issues:
|
|
1866
|
-
// https://github.com/facebook/react/pull/7232
|
|
1867
|
-
var getKeyFromID = function (id) {
|
|
1868
|
-
return '.' + id;
|
|
1869
|
-
};
|
|
1870
|
-
var getIDFromKey = function (key) {
|
|
1871
|
-
return parseInt(key.substr(1), 10);
|
|
1872
|
-
};
|
|
1195
|
+
// Use non-numeric keys to prevent V8 performance issues:
|
|
1196
|
+
// https://github.com/facebook/react/pull/7232
|
|
1197
|
+
var getKeyFromID = function (id) {
|
|
1198
|
+
return '.' + id;
|
|
1199
|
+
};
|
|
1200
|
+
var getIDFromKey = function (key) {
|
|
1201
|
+
return parseInt(key.substr(1), 10);
|
|
1202
|
+
};
|
|
1873
1203
|
|
|
1874
1204
|
setItem = function (id, item) {
|
|
1875
1205
|
var key = getKeyFromID(id);
|
|
@@ -2102,11 +1432,56 @@ var ReactComponentTreeHook = {
|
|
|
2102
1432
|
|
|
2103
1433
|
|
|
2104
1434
|
getRootIDs: getRootIDs,
|
|
2105
|
-
getRegisteredIDs: getItemIDs
|
|
1435
|
+
getRegisteredIDs: getItemIDs,
|
|
1436
|
+
|
|
1437
|
+
pushNonStandardWarningStack: function (isCreatingElement, currentSource) {
|
|
1438
|
+
if (typeof console.reactStack !== 'function') {
|
|
1439
|
+
return;
|
|
1440
|
+
}
|
|
1441
|
+
|
|
1442
|
+
var stack = [];
|
|
1443
|
+
var currentOwner = ReactCurrentOwner.current;
|
|
1444
|
+
var id = currentOwner && currentOwner._debugID;
|
|
1445
|
+
|
|
1446
|
+
try {
|
|
1447
|
+
if (isCreatingElement) {
|
|
1448
|
+
stack.push({
|
|
1449
|
+
name: id ? ReactComponentTreeHook.getDisplayName(id) : null,
|
|
1450
|
+
fileName: currentSource ? currentSource.fileName : null,
|
|
1451
|
+
lineNumber: currentSource ? currentSource.lineNumber : null
|
|
1452
|
+
});
|
|
1453
|
+
}
|
|
1454
|
+
|
|
1455
|
+
while (id) {
|
|
1456
|
+
var element = ReactComponentTreeHook.getElement(id);
|
|
1457
|
+
var parentID = ReactComponentTreeHook.getParentID(id);
|
|
1458
|
+
var ownerID = ReactComponentTreeHook.getOwnerID(id);
|
|
1459
|
+
var ownerName = ownerID ? ReactComponentTreeHook.getDisplayName(ownerID) : null;
|
|
1460
|
+
var source = element && element._source;
|
|
1461
|
+
stack.push({
|
|
1462
|
+
name: ownerName,
|
|
1463
|
+
fileName: source ? source.fileName : null,
|
|
1464
|
+
lineNumber: source ? source.lineNumber : null
|
|
1465
|
+
});
|
|
1466
|
+
id = parentID;
|
|
1467
|
+
}
|
|
1468
|
+
} catch (err) {
|
|
1469
|
+
// Internal state is messed up.
|
|
1470
|
+
// Stop building the stack (it's just a nice to have).
|
|
1471
|
+
}
|
|
1472
|
+
|
|
1473
|
+
console.reactStack(stack);
|
|
1474
|
+
},
|
|
1475
|
+
popNonStandardWarningStack: function () {
|
|
1476
|
+
if (typeof console.reactStackEnd !== 'function') {
|
|
1477
|
+
return;
|
|
1478
|
+
}
|
|
1479
|
+
console.reactStackEnd();
|
|
1480
|
+
}
|
|
2106
1481
|
};
|
|
2107
1482
|
|
|
2108
1483
|
module.exports = ReactComponentTreeHook;
|
|
2109
|
-
},{"
|
|
1484
|
+
},{"13":13,"39":39,"48":48,"50":50}],12:[function(_dereq_,module,exports){
|
|
2110
1485
|
/**
|
|
2111
1486
|
* Copyright 2013-present, Facebook, Inc.
|
|
2112
1487
|
* All rights reserved.
|
|
@@ -2154,7 +1529,7 @@ var ReactComponentWithPureRenderMixin = {
|
|
|
2154
1529
|
};
|
|
2155
1530
|
|
|
2156
1531
|
module.exports = ReactComponentWithPureRenderMixin;
|
|
2157
|
-
},{"40":40}],
|
|
1532
|
+
},{"40":40}],13:[function(_dereq_,module,exports){
|
|
2158
1533
|
/**
|
|
2159
1534
|
* Copyright 2013-present, Facebook, Inc.
|
|
2160
1535
|
* All rights reserved.
|
|
@@ -2175,17 +1550,15 @@ module.exports = ReactComponentWithPureRenderMixin;
|
|
|
2175
1550
|
* currently being constructed.
|
|
2176
1551
|
*/
|
|
2177
1552
|
var ReactCurrentOwner = {
|
|
2178
|
-
|
|
2179
1553
|
/**
|
|
2180
1554
|
* @internal
|
|
2181
1555
|
* @type {ReactComponent}
|
|
2182
1556
|
*/
|
|
2183
1557
|
current: null
|
|
2184
|
-
|
|
2185
1558
|
};
|
|
2186
1559
|
|
|
2187
1560
|
module.exports = ReactCurrentOwner;
|
|
2188
|
-
},{}],
|
|
1561
|
+
},{}],14:[function(_dereq_,module,exports){
|
|
2189
1562
|
/**
|
|
2190
1563
|
* Copyright 2013-present, Facebook, Inc.
|
|
2191
1564
|
* All rights reserved.
|
|
@@ -2198,7 +1571,7 @@ module.exports = ReactCurrentOwner;
|
|
|
2198
1571
|
|
|
2199
1572
|
'use strict';
|
|
2200
1573
|
|
|
2201
|
-
var ReactElement = _dereq_(
|
|
1574
|
+
var ReactElement = _dereq_(15);
|
|
2202
1575
|
|
|
2203
1576
|
/**
|
|
2204
1577
|
* Create a factory that creates HTML tag elements.
|
|
@@ -2207,13 +1580,12 @@ var ReactElement = _dereq_(16);
|
|
|
2207
1580
|
*/
|
|
2208
1581
|
var createDOMFactory = ReactElement.createFactory;
|
|
2209
1582
|
if ("development" !== 'production') {
|
|
2210
|
-
var ReactElementValidator = _dereq_(
|
|
1583
|
+
var ReactElementValidator = _dereq_(17);
|
|
2211
1584
|
createDOMFactory = ReactElementValidator.createFactory;
|
|
2212
1585
|
}
|
|
2213
1586
|
|
|
2214
1587
|
/**
|
|
2215
1588
|
* Creates a mapping from supported HTML tags to `ReactDOMComponent` classes.
|
|
2216
|
-
* This is also accessible via `React.DOM`.
|
|
2217
1589
|
*
|
|
2218
1590
|
* @public
|
|
2219
1591
|
*/
|
|
@@ -2355,7 +1727,7 @@ var ReactDOMFactories = {
|
|
|
2355
1727
|
};
|
|
2356
1728
|
|
|
2357
1729
|
module.exports = ReactDOMFactories;
|
|
2358
|
-
},{"
|
|
1730
|
+
},{"15":15,"17":17}],15:[function(_dereq_,module,exports){
|
|
2359
1731
|
/**
|
|
2360
1732
|
* Copyright 2014-present, Facebook, Inc.
|
|
2361
1733
|
* All rights reserved.
|
|
@@ -2368,15 +1740,15 @@ module.exports = ReactDOMFactories;
|
|
|
2368
1740
|
|
|
2369
1741
|
'use strict';
|
|
2370
1742
|
|
|
2371
|
-
var _assign = _dereq_(
|
|
1743
|
+
var _assign = _dereq_(51);
|
|
2372
1744
|
|
|
2373
|
-
var ReactCurrentOwner = _dereq_(
|
|
1745
|
+
var ReactCurrentOwner = _dereq_(13);
|
|
2374
1746
|
|
|
2375
|
-
var warning = _dereq_(
|
|
2376
|
-
var canDefineProperty = _dereq_(
|
|
1747
|
+
var warning = _dereq_(50);
|
|
1748
|
+
var canDefineProperty = _dereq_(31);
|
|
2377
1749
|
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
2378
1750
|
|
|
2379
|
-
var REACT_ELEMENT_TYPE = _dereq_(
|
|
1751
|
+
var REACT_ELEMENT_TYPE = _dereq_(16);
|
|
2380
1752
|
|
|
2381
1753
|
var RESERVED_PROPS = {
|
|
2382
1754
|
key: true,
|
|
@@ -2696,7 +2068,7 @@ ReactElement.isValidElement = function (object) {
|
|
|
2696
2068
|
};
|
|
2697
2069
|
|
|
2698
2070
|
module.exports = ReactElement;
|
|
2699
|
-
},{"
|
|
2071
|
+
},{"13":13,"16":16,"31":31,"50":50,"51":51}],16:[function(_dereq_,module,exports){
|
|
2700
2072
|
/**
|
|
2701
2073
|
* Copyright 2014-present, Facebook, Inc.
|
|
2702
2074
|
* All rights reserved.
|
|
@@ -2716,7 +2088,7 @@ module.exports = ReactElement;
|
|
|
2716
2088
|
var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7;
|
|
2717
2089
|
|
|
2718
2090
|
module.exports = REACT_ELEMENT_TYPE;
|
|
2719
|
-
},{}],
|
|
2091
|
+
},{}],17:[function(_dereq_,module,exports){
|
|
2720
2092
|
/**
|
|
2721
2093
|
* Copyright 2014-present, Facebook, Inc.
|
|
2722
2094
|
* All rights reserved.
|
|
@@ -2736,15 +2108,16 @@ module.exports = REACT_ELEMENT_TYPE;
|
|
|
2736
2108
|
|
|
2737
2109
|
'use strict';
|
|
2738
2110
|
|
|
2739
|
-
var ReactCurrentOwner = _dereq_(
|
|
2740
|
-
var ReactComponentTreeHook = _dereq_(
|
|
2741
|
-
var ReactElement = _dereq_(
|
|
2111
|
+
var ReactCurrentOwner = _dereq_(13);
|
|
2112
|
+
var ReactComponentTreeHook = _dereq_(11);
|
|
2113
|
+
var ReactElement = _dereq_(15);
|
|
2742
2114
|
|
|
2743
|
-
var checkReactTypeSpec = _dereq_(
|
|
2115
|
+
var checkReactTypeSpec = _dereq_(32);
|
|
2744
2116
|
|
|
2745
|
-
var canDefineProperty = _dereq_(
|
|
2746
|
-
var getIteratorFn = _dereq_(
|
|
2747
|
-
var warning = _dereq_(
|
|
2117
|
+
var canDefineProperty = _dereq_(31);
|
|
2118
|
+
var getIteratorFn = _dereq_(35);
|
|
2119
|
+
var warning = _dereq_(50);
|
|
2120
|
+
var lowPriorityWarning = _dereq_(37);
|
|
2748
2121
|
|
|
2749
2122
|
function getDeclarationErrorAddendum() {
|
|
2750
2123
|
if (ReactCurrentOwner.current) {
|
|
@@ -2885,7 +2258,6 @@ function validatePropTypes(element) {
|
|
|
2885
2258
|
}
|
|
2886
2259
|
|
|
2887
2260
|
var ReactElementValidator = {
|
|
2888
|
-
|
|
2889
2261
|
createElement: function (type, props, children) {
|
|
2890
2262
|
var validType = typeof type === 'string' || typeof type === 'function';
|
|
2891
2263
|
// We warn in this case but don't throw. We expect the element creation to
|
|
@@ -2894,7 +2266,7 @@ var ReactElementValidator = {
|
|
|
2894
2266
|
if (typeof type !== 'function' && typeof type !== 'string') {
|
|
2895
2267
|
var info = '';
|
|
2896
2268
|
if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
|
|
2897
|
-
info += ' You likely forgot to export your component from the file ' +
|
|
2269
|
+
info += ' You likely forgot to export your component from the file ' + "it's defined in.";
|
|
2898
2270
|
}
|
|
2899
2271
|
|
|
2900
2272
|
var sourceInfo = getSourceInfoErrorAddendum(props);
|
|
@@ -2906,7 +2278,10 @@ var ReactElementValidator = {
|
|
|
2906
2278
|
|
|
2907
2279
|
info += ReactComponentTreeHook.getCurrentStackAddendum();
|
|
2908
2280
|
|
|
2281
|
+
var currentSource = props !== null && props !== undefined && props.__source !== undefined ? props.__source : null;
|
|
2282
|
+
ReactComponentTreeHook.pushNonStandardWarningStack(true, currentSource);
|
|
2909
2283
|
"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;
|
|
2284
|
+
ReactComponentTreeHook.popNonStandardWarningStack();
|
|
2910
2285
|
}
|
|
2911
2286
|
}
|
|
2912
2287
|
|
|
@@ -2944,7 +2319,7 @@ var ReactElementValidator = {
|
|
|
2944
2319
|
Object.defineProperty(validatedFactory, 'type', {
|
|
2945
2320
|
enumerable: false,
|
|
2946
2321
|
get: function () {
|
|
2947
|
-
|
|
2322
|
+
lowPriorityWarning(false, 'Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');
|
|
2948
2323
|
Object.defineProperty(this, 'type', {
|
|
2949
2324
|
value: type
|
|
2950
2325
|
});
|
|
@@ -2965,11 +2340,10 @@ var ReactElementValidator = {
|
|
|
2965
2340
|
validatePropTypes(newElement);
|
|
2966
2341
|
return newElement;
|
|
2967
2342
|
}
|
|
2968
|
-
|
|
2969
2343
|
};
|
|
2970
2344
|
|
|
2971
2345
|
module.exports = ReactElementValidator;
|
|
2972
|
-
},{"
|
|
2346
|
+
},{"11":11,"13":13,"15":15,"31":31,"32":32,"35":35,"37":37,"50":50}],18:[function(_dereq_,module,exports){
|
|
2973
2347
|
/**
|
|
2974
2348
|
* Copyright 2015-present, Facebook, Inc.
|
|
2975
2349
|
* All rights reserved.
|
|
@@ -2984,12 +2358,12 @@ module.exports = ReactElementValidator;
|
|
|
2984
2358
|
|
|
2985
2359
|
var _prodInvariant = _dereq_(39);
|
|
2986
2360
|
|
|
2987
|
-
var ReactChildren = _dereq_(
|
|
2988
|
-
var ReactElement = _dereq_(
|
|
2361
|
+
var ReactChildren = _dereq_(10);
|
|
2362
|
+
var ReactElement = _dereq_(15);
|
|
2989
2363
|
|
|
2990
|
-
var emptyFunction = _dereq_(
|
|
2991
|
-
var invariant = _dereq_(
|
|
2992
|
-
var warning = _dereq_(
|
|
2364
|
+
var emptyFunction = _dereq_(46);
|
|
2365
|
+
var invariant = _dereq_(48);
|
|
2366
|
+
var warning = _dereq_(50);
|
|
2993
2367
|
|
|
2994
2368
|
/**
|
|
2995
2369
|
* We used to allow keyed objects to serve as a collection of ReactElements,
|
|
@@ -3038,7 +2412,7 @@ var ReactFragment = {
|
|
|
3038
2412
|
};
|
|
3039
2413
|
|
|
3040
2414
|
module.exports = ReactFragment;
|
|
3041
|
-
},{"
|
|
2415
|
+
},{"10":10,"15":15,"39":39,"46":46,"48":48,"50":50}],19:[function(_dereq_,module,exports){
|
|
3042
2416
|
/**
|
|
3043
2417
|
* Copyright 2013-present, Facebook, Inc.
|
|
3044
2418
|
* All rights reserved.
|
|
@@ -3088,28 +2462,8 @@ function ReactLink(value, requestChange) {
|
|
|
3088
2462
|
this.requestChange = requestChange;
|
|
3089
2463
|
}
|
|
3090
2464
|
|
|
3091
|
-
/**
|
|
3092
|
-
* Creates a PropType that enforces the ReactLink API and optionally checks the
|
|
3093
|
-
* type of the value being passed inside the link. Example:
|
|
3094
|
-
*
|
|
3095
|
-
* MyComponent.propTypes = {
|
|
3096
|
-
* tabIndexLink: ReactLink.PropTypes.link(React.PropTypes.number)
|
|
3097
|
-
* }
|
|
3098
|
-
*/
|
|
3099
|
-
function createLinkTypeChecker(linkType) {
|
|
3100
|
-
var shapes = {
|
|
3101
|
-
value: linkType === undefined ? React.PropTypes.any.isRequired : linkType.isRequired,
|
|
3102
|
-
requestChange: React.PropTypes.func.isRequired
|
|
3103
|
-
};
|
|
3104
|
-
return React.PropTypes.shape(shapes);
|
|
3105
|
-
}
|
|
3106
|
-
|
|
3107
|
-
ReactLink.PropTypes = {
|
|
3108
|
-
link: createLinkTypeChecker
|
|
3109
|
-
};
|
|
3110
|
-
|
|
3111
2465
|
module.exports = ReactLink;
|
|
3112
|
-
},{"5":5}],
|
|
2466
|
+
},{"5":5}],20:[function(_dereq_,module,exports){
|
|
3113
2467
|
/**
|
|
3114
2468
|
* Copyright 2015-present, Facebook, Inc.
|
|
3115
2469
|
* All rights reserved.
|
|
@@ -3122,7 +2476,7 @@ module.exports = ReactLink;
|
|
|
3122
2476
|
|
|
3123
2477
|
'use strict';
|
|
3124
2478
|
|
|
3125
|
-
var warning = _dereq_(
|
|
2479
|
+
var warning = _dereq_(50);
|
|
3126
2480
|
|
|
3127
2481
|
function warnNoop(publicInstance, callerName) {
|
|
3128
2482
|
if ("development" !== 'production') {
|
|
@@ -3135,7 +2489,6 @@ function warnNoop(publicInstance, callerName) {
|
|
|
3135
2489
|
* This is the abstract API for an update queue.
|
|
3136
2490
|
*/
|
|
3137
2491
|
var ReactNoopUpdateQueue = {
|
|
3138
|
-
|
|
3139
2492
|
/**
|
|
3140
2493
|
* Checks whether or not this composite component is mounted.
|
|
3141
2494
|
* @param {ReactClass} publicInstance The instance we want to test.
|
|
@@ -3205,7 +2558,7 @@ var ReactNoopUpdateQueue = {
|
|
|
3205
2558
|
};
|
|
3206
2559
|
|
|
3207
2560
|
module.exports = ReactNoopUpdateQueue;
|
|
3208
|
-
},{"
|
|
2561
|
+
},{"50":50}],21:[function(_dereq_,module,exports){
|
|
3209
2562
|
/**
|
|
3210
2563
|
* Copyright 2013-present, Facebook, Inc.
|
|
3211
2564
|
* All rights reserved.
|
|
@@ -3230,7 +2583,7 @@ if ("development" !== 'production') {
|
|
|
3230
2583
|
}
|
|
3231
2584
|
|
|
3232
2585
|
module.exports = ReactPropTypeLocationNames;
|
|
3233
|
-
},{}],
|
|
2586
|
+
},{}],22:[function(_dereq_,module,exports){
|
|
3234
2587
|
/**
|
|
3235
2588
|
* Copyright 2013-present, Facebook, Inc.
|
|
3236
2589
|
* All rights reserved.
|
|
@@ -3243,13 +2596,13 @@ module.exports = ReactPropTypeLocationNames;
|
|
|
3243
2596
|
|
|
3244
2597
|
'use strict';
|
|
3245
2598
|
|
|
3246
|
-
var _require = _dereq_(
|
|
2599
|
+
var _require = _dereq_(15),
|
|
3247
2600
|
isValidElement = _require.isValidElement;
|
|
3248
2601
|
|
|
3249
|
-
var factory = _dereq_(
|
|
2602
|
+
var factory = _dereq_(53);
|
|
3250
2603
|
|
|
3251
2604
|
module.exports = factory(isValidElement);
|
|
3252
|
-
},{"
|
|
2605
|
+
},{"15":15,"53":53}],23:[function(_dereq_,module,exports){
|
|
3253
2606
|
/**
|
|
3254
2607
|
* Copyright 2013-present, Facebook, Inc.
|
|
3255
2608
|
* All rights reserved.
|
|
@@ -3266,49 +2619,7 @@ module.exports = factory(isValidElement);
|
|
|
3266
2619
|
var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
|
3267
2620
|
|
|
3268
2621
|
module.exports = ReactPropTypesSecret;
|
|
3269
|
-
},{}],
|
|
3270
|
-
/**
|
|
3271
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
3272
|
-
* All rights reserved.
|
|
3273
|
-
*
|
|
3274
|
-
* This source code is licensed under the BSD-style license found in the
|
|
3275
|
-
* LICENSE file in the root directory of this source tree. An additional grant
|
|
3276
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
3277
|
-
*
|
|
3278
|
-
*/
|
|
3279
|
-
|
|
3280
|
-
'use strict';
|
|
3281
|
-
|
|
3282
|
-
var _assign = _dereq_(50);
|
|
3283
|
-
|
|
3284
|
-
var ReactComponent = _dereq_(11);
|
|
3285
|
-
var ReactNoopUpdateQueue = _dereq_(21);
|
|
3286
|
-
|
|
3287
|
-
var emptyObject = _dereq_(46);
|
|
3288
|
-
|
|
3289
|
-
/**
|
|
3290
|
-
* Base class helpers for the updating state of a component.
|
|
3291
|
-
*/
|
|
3292
|
-
function ReactPureComponent(props, context, updater) {
|
|
3293
|
-
// Duplicated from ReactComponent.
|
|
3294
|
-
this.props = props;
|
|
3295
|
-
this.context = context;
|
|
3296
|
-
this.refs = emptyObject;
|
|
3297
|
-
// We initialize the default updater but the real one gets injected by the
|
|
3298
|
-
// renderer.
|
|
3299
|
-
this.updater = updater || ReactNoopUpdateQueue;
|
|
3300
|
-
}
|
|
3301
|
-
|
|
3302
|
-
function ComponentDummy() {}
|
|
3303
|
-
ComponentDummy.prototype = ReactComponent.prototype;
|
|
3304
|
-
ReactPureComponent.prototype = new ComponentDummy();
|
|
3305
|
-
ReactPureComponent.prototype.constructor = ReactPureComponent;
|
|
3306
|
-
// Avoid an extra prototype jump for these methods.
|
|
3307
|
-
_assign(ReactPureComponent.prototype, ReactComponent.prototype);
|
|
3308
|
-
ReactPureComponent.prototype.isPureReactComponent = true;
|
|
3309
|
-
|
|
3310
|
-
module.exports = ReactPureComponent;
|
|
3311
|
-
},{"11":11,"21":21,"46":46,"50":50}],26:[function(_dereq_,module,exports){
|
|
2622
|
+
},{}],24:[function(_dereq_,module,exports){
|
|
3312
2623
|
/**
|
|
3313
2624
|
* Copyright 2013-present, Facebook, Inc.
|
|
3314
2625
|
* All rights reserved.
|
|
@@ -3412,7 +2723,7 @@ ReactStateSetters.Mixin = {
|
|
|
3412
2723
|
};
|
|
3413
2724
|
|
|
3414
2725
|
module.exports = ReactStateSetters;
|
|
3415
|
-
},{}],
|
|
2726
|
+
},{}],25:[function(_dereq_,module,exports){
|
|
3416
2727
|
/**
|
|
3417
2728
|
* Copyright 2013-present, Facebook, Inc.
|
|
3418
2729
|
* All rights reserved.
|
|
@@ -3425,7 +2736,7 @@ module.exports = ReactStateSetters;
|
|
|
3425
2736
|
|
|
3426
2737
|
'use strict';
|
|
3427
2738
|
|
|
3428
|
-
var flattenChildren = _dereq_(
|
|
2739
|
+
var flattenChildren = _dereq_(34);
|
|
3429
2740
|
|
|
3430
2741
|
var ReactTransitionChildMapping = {
|
|
3431
2742
|
/**
|
|
@@ -3515,7 +2826,7 @@ var ReactTransitionChildMapping = {
|
|
|
3515
2826
|
};
|
|
3516
2827
|
|
|
3517
2828
|
module.exports = ReactTransitionChildMapping;
|
|
3518
|
-
},{"
|
|
2829
|
+
},{"34":34}],26:[function(_dereq_,module,exports){
|
|
3519
2830
|
/**
|
|
3520
2831
|
* Copyright 2013-present, Facebook, Inc.
|
|
3521
2832
|
* All rights reserved.
|
|
@@ -3528,7 +2839,7 @@ module.exports = ReactTransitionChildMapping;
|
|
|
3528
2839
|
|
|
3529
2840
|
'use strict';
|
|
3530
2841
|
|
|
3531
|
-
var ExecutionEnvironment = _dereq_(
|
|
2842
|
+
var ExecutionEnvironment = _dereq_(45);
|
|
3532
2843
|
|
|
3533
2844
|
var getVendorPrefixedEventName = _dereq_(1);
|
|
3534
2845
|
|
|
@@ -3588,7 +2899,7 @@ var ReactTransitionEvents = {
|
|
|
3588
2899
|
};
|
|
3589
2900
|
|
|
3590
2901
|
module.exports = ReactTransitionEvents;
|
|
3591
|
-
},{"1":1,"
|
|
2902
|
+
},{"1":1,"45":45}],27:[function(_dereq_,module,exports){
|
|
3592
2903
|
/**
|
|
3593
2904
|
* Copyright 2013-present, Facebook, Inc.
|
|
3594
2905
|
* All rights reserved.
|
|
@@ -3601,7 +2912,7 @@ module.exports = ReactTransitionEvents;
|
|
|
3601
2912
|
|
|
3602
2913
|
'use strict';
|
|
3603
2914
|
|
|
3604
|
-
var _assign = _dereq_(
|
|
2915
|
+
var _assign = _dereq_(51);
|
|
3605
2916
|
|
|
3606
2917
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
3607
2918
|
|
|
@@ -3610,12 +2921,12 @@ function _possibleConstructorReturn(self, call) { if (!self) { throw new Referen
|
|
|
3610
2921
|
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; }
|
|
3611
2922
|
|
|
3612
2923
|
var React = _dereq_(5);
|
|
3613
|
-
var ReactTransitionChildMapping = _dereq_(
|
|
2924
|
+
var ReactTransitionChildMapping = _dereq_(25);
|
|
3614
2925
|
|
|
3615
|
-
var propTypesFactory = _dereq_(
|
|
2926
|
+
var propTypesFactory = _dereq_(53);
|
|
3616
2927
|
var PropTypes = propTypesFactory(React.isValidElement);
|
|
3617
2928
|
|
|
3618
|
-
var emptyFunction = _dereq_(
|
|
2929
|
+
var emptyFunction = _dereq_(46);
|
|
3619
2930
|
|
|
3620
2931
|
/**
|
|
3621
2932
|
* A basis for animations. When children are declaratively added or removed,
|
|
@@ -3786,7 +3097,10 @@ var ReactTransitionGroup = function (_React$Component) {
|
|
|
3786
3097
|
// already been removed. In case you need this behavior you can provide
|
|
3787
3098
|
// a childFactory function to wrap every child, even the ones that are
|
|
3788
3099
|
// leaving.
|
|
3789
|
-
childrenToRender.push(React.cloneElement(this.props.childFactory(child), {
|
|
3100
|
+
childrenToRender.push(React.cloneElement(this.props.childFactory(child), {
|
|
3101
|
+
ref: key,
|
|
3102
|
+
key: key
|
|
3103
|
+
}));
|
|
3790
3104
|
}
|
|
3791
3105
|
}
|
|
3792
3106
|
|
|
@@ -3820,7 +3134,7 @@ ReactTransitionGroup.defaultProps = {
|
|
|
3820
3134
|
|
|
3821
3135
|
|
|
3822
3136
|
module.exports = ReactTransitionGroup;
|
|
3823
|
-
},{"
|
|
3137
|
+
},{"25":25,"46":46,"5":5,"51":51,"53":53}],28:[function(_dereq_,module,exports){
|
|
3824
3138
|
/**
|
|
3825
3139
|
* Copyright 2013-present, Facebook, Inc.
|
|
3826
3140
|
* All rights reserved.
|
|
@@ -3833,8 +3147,8 @@ module.exports = ReactTransitionGroup;
|
|
|
3833
3147
|
|
|
3834
3148
|
'use strict';
|
|
3835
3149
|
|
|
3836
|
-
module.exports = '15.
|
|
3837
|
-
},{}],
|
|
3150
|
+
module.exports = '15.6.0';
|
|
3151
|
+
},{}],29:[function(_dereq_,module,exports){
|
|
3838
3152
|
/**
|
|
3839
3153
|
* Copyright 2013-present, Facebook, Inc.
|
|
3840
3154
|
* All rights reserved.
|
|
@@ -3850,10 +3164,10 @@ module.exports = '15.5.2';
|
|
|
3850
3164
|
var LinkedStateMixin = _dereq_(3);
|
|
3851
3165
|
var React = _dereq_(5);
|
|
3852
3166
|
var ReactAddonsDOMDependencies = _dereq_(6);
|
|
3853
|
-
var ReactComponentWithPureRenderMixin = _dereq_(
|
|
3854
|
-
var ReactCSSTransitionGroup = _dereq_(
|
|
3855
|
-
var ReactFragment = _dereq_(
|
|
3856
|
-
var ReactTransitionGroup = _dereq_(
|
|
3167
|
+
var ReactComponentWithPureRenderMixin = _dereq_(12);
|
|
3168
|
+
var ReactCSSTransitionGroup = _dereq_(8);
|
|
3169
|
+
var ReactFragment = _dereq_(18);
|
|
3170
|
+
var ReactTransitionGroup = _dereq_(27);
|
|
3857
3171
|
|
|
3858
3172
|
var shallowCompare = _dereq_(40);
|
|
3859
3173
|
var update = _dereq_(42);
|
|
@@ -3887,7 +3201,7 @@ if ("development" !== 'production') {
|
|
|
3887
3201
|
}
|
|
3888
3202
|
|
|
3889
3203
|
module.exports = React;
|
|
3890
|
-
},{"
|
|
3204
|
+
},{"12":12,"18":18,"27":27,"3":3,"40":40,"42":42,"5":5,"6":6,"8":8}],30:[function(_dereq_,module,exports){
|
|
3891
3205
|
/**
|
|
3892
3206
|
* Copyright 2013-present, Facebook, Inc.
|
|
3893
3207
|
* All rights reserved.
|
|
@@ -3900,28 +3214,28 @@ module.exports = React;
|
|
|
3900
3214
|
|
|
3901
3215
|
'use strict';
|
|
3902
3216
|
|
|
3903
|
-
var _assign = _dereq_(
|
|
3217
|
+
var _assign = _dereq_(51);
|
|
3904
3218
|
|
|
3905
|
-
var ReactWithAddons = _dereq_(
|
|
3219
|
+
var ReactWithAddons = _dereq_(29);
|
|
3906
3220
|
|
|
3907
3221
|
// `version` will be added here by the React module.
|
|
3908
3222
|
var ReactWithAddonsUMDEntry = _assign(ReactWithAddons, {
|
|
3909
3223
|
__SECRET_INJECTED_REACT_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: null, // Will be injected by ReactDOM UMD build.
|
|
3910
3224
|
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: {
|
|
3911
|
-
ReactCurrentOwner: _dereq_(
|
|
3225
|
+
ReactCurrentOwner: _dereq_(13)
|
|
3912
3226
|
}
|
|
3913
3227
|
});
|
|
3914
3228
|
|
|
3915
3229
|
if ("development" !== 'production') {
|
|
3916
3230
|
_assign(ReactWithAddonsUMDEntry.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, {
|
|
3917
3231
|
// ReactComponentTreeHook should not be included in production.
|
|
3918
|
-
ReactComponentTreeHook: _dereq_(
|
|
3919
|
-
getNextDebugID: _dereq_(
|
|
3232
|
+
ReactComponentTreeHook: _dereq_(11),
|
|
3233
|
+
getNextDebugID: _dereq_(36)
|
|
3920
3234
|
});
|
|
3921
3235
|
}
|
|
3922
3236
|
|
|
3923
3237
|
module.exports = ReactWithAddonsUMDEntry;
|
|
3924
|
-
},{"
|
|
3238
|
+
},{"11":11,"13":13,"29":29,"36":36,"51":51}],31:[function(_dereq_,module,exports){
|
|
3925
3239
|
/**
|
|
3926
3240
|
* Copyright 2013-present, Facebook, Inc.
|
|
3927
3241
|
* All rights reserved.
|
|
@@ -3947,7 +3261,7 @@ if ("development" !== 'production') {
|
|
|
3947
3261
|
}
|
|
3948
3262
|
|
|
3949
3263
|
module.exports = canDefineProperty;
|
|
3950
|
-
},{}],
|
|
3264
|
+
},{}],32:[function(_dereq_,module,exports){
|
|
3951
3265
|
(function (process){
|
|
3952
3266
|
/**
|
|
3953
3267
|
* Copyright 2013-present, Facebook, Inc.
|
|
@@ -3963,11 +3277,11 @@ module.exports = canDefineProperty;
|
|
|
3963
3277
|
|
|
3964
3278
|
var _prodInvariant = _dereq_(39);
|
|
3965
3279
|
|
|
3966
|
-
var ReactPropTypeLocationNames = _dereq_(
|
|
3967
|
-
var ReactPropTypesSecret = _dereq_(
|
|
3280
|
+
var ReactPropTypeLocationNames = _dereq_(21);
|
|
3281
|
+
var ReactPropTypesSecret = _dereq_(23);
|
|
3968
3282
|
|
|
3969
|
-
var invariant = _dereq_(
|
|
3970
|
-
var warning = _dereq_(
|
|
3283
|
+
var invariant = _dereq_(48);
|
|
3284
|
+
var warning = _dereq_(50);
|
|
3971
3285
|
|
|
3972
3286
|
var ReactComponentTreeHook;
|
|
3973
3287
|
|
|
@@ -3977,7 +3291,7 @@ if (typeof process !== 'undefined' && process.env && "development" === 'test') {
|
|
|
3977
3291
|
// https://github.com/facebook/react/issues/7240
|
|
3978
3292
|
// Remove the inline requires when we don't need them anymore:
|
|
3979
3293
|
// https://github.com/facebook/react/pull/7178
|
|
3980
|
-
ReactComponentTreeHook = _dereq_(
|
|
3294
|
+
ReactComponentTreeHook = _dereq_(11);
|
|
3981
3295
|
}
|
|
3982
3296
|
|
|
3983
3297
|
var loggedTypeFailures = {};
|
|
@@ -4019,7 +3333,7 @@ function checkReactTypeSpec(typeSpecs, values, location, componentName, element,
|
|
|
4019
3333
|
|
|
4020
3334
|
if ("development" !== 'production') {
|
|
4021
3335
|
if (!ReactComponentTreeHook) {
|
|
4022
|
-
ReactComponentTreeHook = _dereq_(
|
|
3336
|
+
ReactComponentTreeHook = _dereq_(11);
|
|
4023
3337
|
}
|
|
4024
3338
|
if (debugID !== null) {
|
|
4025
3339
|
componentStackInfo = ReactComponentTreeHook.getStackAddendumByID(debugID);
|
|
@@ -4036,7 +3350,30 @@ function checkReactTypeSpec(typeSpecs, values, location, componentName, element,
|
|
|
4036
3350
|
|
|
4037
3351
|
module.exports = checkReactTypeSpec;
|
|
4038
3352
|
}).call(this,undefined)
|
|
4039
|
-
},{"
|
|
3353
|
+
},{"11":11,"21":21,"23":23,"39":39,"48":48,"50":50}],33:[function(_dereq_,module,exports){
|
|
3354
|
+
/**
|
|
3355
|
+
* Copyright 2013-present, Facebook, Inc.
|
|
3356
|
+
* All rights reserved.
|
|
3357
|
+
*
|
|
3358
|
+
* This source code is licensed under the BSD-style license found in the
|
|
3359
|
+
* LICENSE file in the root directory of this source tree. An additional grant
|
|
3360
|
+
* of patent rights can be found in the PATENTS file in the same directory.
|
|
3361
|
+
*
|
|
3362
|
+
*/
|
|
3363
|
+
|
|
3364
|
+
'use strict';
|
|
3365
|
+
|
|
3366
|
+
var _require = _dereq_(7),
|
|
3367
|
+
Component = _require.Component;
|
|
3368
|
+
|
|
3369
|
+
var _require2 = _dereq_(15),
|
|
3370
|
+
isValidElement = _require2.isValidElement;
|
|
3371
|
+
|
|
3372
|
+
var ReactNoopUpdateQueue = _dereq_(20);
|
|
3373
|
+
var factory = _dereq_(43);
|
|
3374
|
+
|
|
3375
|
+
module.exports = factory(Component, isValidElement, ReactNoopUpdateQueue);
|
|
3376
|
+
},{"15":15,"20":20,"43":43,"7":7}],34:[function(_dereq_,module,exports){
|
|
4040
3377
|
(function (process){
|
|
4041
3378
|
/**
|
|
4042
3379
|
* Copyright 2013-present, Facebook, Inc.
|
|
@@ -4053,7 +3390,7 @@ module.exports = checkReactTypeSpec;
|
|
|
4053
3390
|
|
|
4054
3391
|
var KeyEscapeUtils = _dereq_(2);
|
|
4055
3392
|
var traverseAllChildren = _dereq_(41);
|
|
4056
|
-
var warning = _dereq_(
|
|
3393
|
+
var warning = _dereq_(50);
|
|
4057
3394
|
|
|
4058
3395
|
var ReactComponentTreeHook;
|
|
4059
3396
|
|
|
@@ -4063,7 +3400,7 @@ if (typeof process !== 'undefined' && process.env && "development" === 'test') {
|
|
|
4063
3400
|
// https://github.com/facebook/react/issues/7240
|
|
4064
3401
|
// Remove the inline requires when we don't need them anymore:
|
|
4065
3402
|
// https://github.com/facebook/react/pull/7178
|
|
4066
|
-
ReactComponentTreeHook = _dereq_(
|
|
3403
|
+
ReactComponentTreeHook = _dereq_(11);
|
|
4067
3404
|
}
|
|
4068
3405
|
|
|
4069
3406
|
/**
|
|
@@ -4079,7 +3416,7 @@ function flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID
|
|
|
4079
3416
|
var keyUnique = result[name] === undefined;
|
|
4080
3417
|
if ("development" !== 'production') {
|
|
4081
3418
|
if (!ReactComponentTreeHook) {
|
|
4082
|
-
ReactComponentTreeHook = _dereq_(
|
|
3419
|
+
ReactComponentTreeHook = _dereq_(11);
|
|
4083
3420
|
}
|
|
4084
3421
|
if (!keyUnique) {
|
|
4085
3422
|
"development" !== 'production' ? warning(false, 'flattenChildren(...): Encountered two children with the same key, ' + '`%s`. Child keys must be unique; when two children share a key, only ' + 'the first child will be used.%s', KeyEscapeUtils.unescape(name), ReactComponentTreeHook.getStackAddendumByID(selfDebugID)) : void 0;
|
|
@@ -4114,7 +3451,7 @@ function flattenChildren(children, selfDebugID) {
|
|
|
4114
3451
|
|
|
4115
3452
|
module.exports = flattenChildren;
|
|
4116
3453
|
}).call(this,undefined)
|
|
4117
|
-
},{"
|
|
3454
|
+
},{"11":11,"2":2,"41":41,"50":50}],35:[function(_dereq_,module,exports){
|
|
4118
3455
|
/**
|
|
4119
3456
|
* Copyright 2013-present, Facebook, Inc.
|
|
4120
3457
|
* All rights reserved.
|
|
@@ -4155,7 +3492,7 @@ function getIteratorFn(maybeIterable) {
|
|
|
4155
3492
|
}
|
|
4156
3493
|
|
|
4157
3494
|
module.exports = getIteratorFn;
|
|
4158
|
-
},{}],
|
|
3495
|
+
},{}],36:[function(_dereq_,module,exports){
|
|
4159
3496
|
/**
|
|
4160
3497
|
* Copyright 2013-present, Facebook, Inc.
|
|
4161
3498
|
* All rights reserved.
|
|
@@ -4169,13 +3506,78 @@ module.exports = getIteratorFn;
|
|
|
4169
3506
|
|
|
4170
3507
|
'use strict';
|
|
4171
3508
|
|
|
4172
|
-
var nextDebugID = 1;
|
|
3509
|
+
var nextDebugID = 1;
|
|
3510
|
+
|
|
3511
|
+
function getNextDebugID() {
|
|
3512
|
+
return nextDebugID++;
|
|
3513
|
+
}
|
|
3514
|
+
|
|
3515
|
+
module.exports = getNextDebugID;
|
|
3516
|
+
},{}],37:[function(_dereq_,module,exports){
|
|
3517
|
+
/**
|
|
3518
|
+
* Copyright 2014-2015, Facebook, Inc.
|
|
3519
|
+
* All rights reserved.
|
|
3520
|
+
*
|
|
3521
|
+
* This source code is licensed under the BSD-style license found in the
|
|
3522
|
+
* LICENSE file in the root directory of this source tree. An additional grant
|
|
3523
|
+
* of patent rights can be found in the PATENTS file in the same directory.
|
|
3524
|
+
*
|
|
3525
|
+
*/
|
|
3526
|
+
|
|
3527
|
+
'use strict';
|
|
3528
|
+
|
|
3529
|
+
/**
|
|
3530
|
+
* Forked from fbjs/warning:
|
|
3531
|
+
* https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js
|
|
3532
|
+
*
|
|
3533
|
+
* Only change is we use console.warn instead of console.error,
|
|
3534
|
+
* and do nothing when 'console' is not supported.
|
|
3535
|
+
* This really simplifies the code.
|
|
3536
|
+
* ---
|
|
3537
|
+
* Similar to invariant but only logs a warning if the condition is not met.
|
|
3538
|
+
* This can be used to log issues in development environments in critical
|
|
3539
|
+
* paths. Removing the logging code for production environments will keep the
|
|
3540
|
+
* same logic and follow the same code paths.
|
|
3541
|
+
*/
|
|
3542
|
+
|
|
3543
|
+
var lowPriorityWarning = function () {};
|
|
3544
|
+
|
|
3545
|
+
if ("development" !== 'production') {
|
|
3546
|
+
var printWarning = function (format) {
|
|
3547
|
+
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
3548
|
+
args[_key - 1] = arguments[_key];
|
|
3549
|
+
}
|
|
3550
|
+
|
|
3551
|
+
var argIndex = 0;
|
|
3552
|
+
var message = 'Warning: ' + format.replace(/%s/g, function () {
|
|
3553
|
+
return args[argIndex++];
|
|
3554
|
+
});
|
|
3555
|
+
if (typeof console !== 'undefined') {
|
|
3556
|
+
console.warn(message);
|
|
3557
|
+
}
|
|
3558
|
+
try {
|
|
3559
|
+
// --- Welcome to debugging React ---
|
|
3560
|
+
// This error was thrown as a convenience so that you can use this stack
|
|
3561
|
+
// to find the callsite that caused this warning to fire.
|
|
3562
|
+
throw new Error(message);
|
|
3563
|
+
} catch (x) {}
|
|
3564
|
+
};
|
|
3565
|
+
|
|
3566
|
+
lowPriorityWarning = function (condition, format) {
|
|
3567
|
+
if (format === undefined) {
|
|
3568
|
+
throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
|
|
3569
|
+
}
|
|
3570
|
+
if (!condition) {
|
|
3571
|
+
for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
|
|
3572
|
+
args[_key2 - 2] = arguments[_key2];
|
|
3573
|
+
}
|
|
4173
3574
|
|
|
4174
|
-
|
|
4175
|
-
|
|
3575
|
+
printWarning.apply(undefined, [format].concat(args));
|
|
3576
|
+
}
|
|
3577
|
+
};
|
|
4176
3578
|
}
|
|
4177
3579
|
|
|
4178
|
-
module.exports =
|
|
3580
|
+
module.exports = lowPriorityWarning;
|
|
4179
3581
|
},{}],38:[function(_dereq_,module,exports){
|
|
4180
3582
|
/**
|
|
4181
3583
|
* Copyright 2013-present, Facebook, Inc.
|
|
@@ -4190,9 +3592,9 @@ module.exports = getNextDebugID;
|
|
|
4190
3592
|
|
|
4191
3593
|
var _prodInvariant = _dereq_(39);
|
|
4192
3594
|
|
|
4193
|
-
var ReactElement = _dereq_(
|
|
3595
|
+
var ReactElement = _dereq_(15);
|
|
4194
3596
|
|
|
4195
|
-
var invariant = _dereq_(
|
|
3597
|
+
var invariant = _dereq_(48);
|
|
4196
3598
|
|
|
4197
3599
|
/**
|
|
4198
3600
|
* Returns the first child in a collection of children and verifies that there
|
|
@@ -4214,7 +3616,7 @@ function onlyChild(children) {
|
|
|
4214
3616
|
}
|
|
4215
3617
|
|
|
4216
3618
|
module.exports = onlyChild;
|
|
4217
|
-
},{"
|
|
3619
|
+
},{"15":15,"39":39,"48":48}],39:[function(_dereq_,module,exports){
|
|
4218
3620
|
/**
|
|
4219
3621
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
4220
3622
|
* All rights reserved.
|
|
@@ -4266,7 +3668,7 @@ module.exports = reactProdInvariant;
|
|
|
4266
3668
|
|
|
4267
3669
|
'use strict';
|
|
4268
3670
|
|
|
4269
|
-
var shallowEqual = _dereq_(
|
|
3671
|
+
var shallowEqual = _dereq_(49);
|
|
4270
3672
|
|
|
4271
3673
|
/**
|
|
4272
3674
|
* Does a shallow comparison for props and state.
|
|
@@ -4278,7 +3680,7 @@ function shallowCompare(instance, nextProps, nextState) {
|
|
|
4278
3680
|
}
|
|
4279
3681
|
|
|
4280
3682
|
module.exports = shallowCompare;
|
|
4281
|
-
},{"
|
|
3683
|
+
},{"49":49}],41:[function(_dereq_,module,exports){
|
|
4282
3684
|
/**
|
|
4283
3685
|
* Copyright 2013-present, Facebook, Inc.
|
|
4284
3686
|
* All rights reserved.
|
|
@@ -4293,13 +3695,13 @@ module.exports = shallowCompare;
|
|
|
4293
3695
|
|
|
4294
3696
|
var _prodInvariant = _dereq_(39);
|
|
4295
3697
|
|
|
4296
|
-
var ReactCurrentOwner = _dereq_(
|
|
4297
|
-
var REACT_ELEMENT_TYPE = _dereq_(
|
|
3698
|
+
var ReactCurrentOwner = _dereq_(13);
|
|
3699
|
+
var REACT_ELEMENT_TYPE = _dereq_(16);
|
|
4298
3700
|
|
|
4299
|
-
var getIteratorFn = _dereq_(
|
|
4300
|
-
var invariant = _dereq_(
|
|
3701
|
+
var getIteratorFn = _dereq_(35);
|
|
3702
|
+
var invariant = _dereq_(48);
|
|
4301
3703
|
var KeyEscapeUtils = _dereq_(2);
|
|
4302
|
-
var warning = _dereq_(
|
|
3704
|
+
var warning = _dereq_(50);
|
|
4303
3705
|
|
|
4304
3706
|
var SEPARATOR = '.';
|
|
4305
3707
|
var SUBSEPARATOR = ':';
|
|
@@ -4412,7 +3814,7 @@ function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext)
|
|
|
4412
3814
|
if ("development" !== 'production') {
|
|
4413
3815
|
addendum = ' If you meant to render a collection of children, use an array ' + 'instead or wrap the object using createFragment(object) from the ' + 'React add-ons.';
|
|
4414
3816
|
if (children._isReactElement) {
|
|
4415
|
-
addendum =
|
|
3817
|
+
addendum = " It looks like you're using an element created by a different " + 'version of React. Make sure to use only one copy of React.';
|
|
4416
3818
|
}
|
|
4417
3819
|
if (ReactCurrentOwner.current) {
|
|
4418
3820
|
var name = ReactCurrentOwner.current.getName();
|
|
@@ -4426,147 +3828,873 @@ function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext)
|
|
|
4426
3828
|
}
|
|
4427
3829
|
}
|
|
4428
3830
|
|
|
4429
|
-
return subtreeCount;
|
|
4430
|
-
}
|
|
3831
|
+
return subtreeCount;
|
|
3832
|
+
}
|
|
3833
|
+
|
|
3834
|
+
/**
|
|
3835
|
+
* Traverses children that are typically specified as `props.children`, but
|
|
3836
|
+
* might also be specified through attributes:
|
|
3837
|
+
*
|
|
3838
|
+
* - `traverseAllChildren(this.props.children, ...)`
|
|
3839
|
+
* - `traverseAllChildren(this.props.leftPanelChildren, ...)`
|
|
3840
|
+
*
|
|
3841
|
+
* The `traverseContext` is an optional argument that is passed through the
|
|
3842
|
+
* entire traversal. It can be used to store accumulations or anything else that
|
|
3843
|
+
* the callback might find relevant.
|
|
3844
|
+
*
|
|
3845
|
+
* @param {?*} children Children tree object.
|
|
3846
|
+
* @param {!function} callback To invoke upon traversing each child.
|
|
3847
|
+
* @param {?*} traverseContext Context for traversal.
|
|
3848
|
+
* @return {!number} The number of children in this subtree.
|
|
3849
|
+
*/
|
|
3850
|
+
function traverseAllChildren(children, callback, traverseContext) {
|
|
3851
|
+
if (children == null) {
|
|
3852
|
+
return 0;
|
|
3853
|
+
}
|
|
3854
|
+
|
|
3855
|
+
return traverseAllChildrenImpl(children, '', callback, traverseContext);
|
|
3856
|
+
}
|
|
3857
|
+
|
|
3858
|
+
module.exports = traverseAllChildren;
|
|
3859
|
+
},{"13":13,"16":16,"2":2,"35":35,"39":39,"48":48,"50":50}],42:[function(_dereq_,module,exports){
|
|
3860
|
+
/**
|
|
3861
|
+
* Copyright 2013-present, Facebook, Inc.
|
|
3862
|
+
* All rights reserved.
|
|
3863
|
+
*
|
|
3864
|
+
* This source code is licensed under the BSD-style license found in the
|
|
3865
|
+
* LICENSE file in the root directory of this source tree. An additional grant
|
|
3866
|
+
* of patent rights can be found in the PATENTS file in the same directory.
|
|
3867
|
+
*
|
|
3868
|
+
*/
|
|
3869
|
+
|
|
3870
|
+
/* global hasOwnProperty:true */
|
|
3871
|
+
|
|
3872
|
+
'use strict';
|
|
3873
|
+
|
|
3874
|
+
var _prodInvariant = _dereq_(39),
|
|
3875
|
+
_assign = _dereq_(51);
|
|
3876
|
+
|
|
3877
|
+
var invariant = _dereq_(48);
|
|
3878
|
+
var hasOwnProperty = {}.hasOwnProperty;
|
|
3879
|
+
|
|
3880
|
+
function shallowCopy(x) {
|
|
3881
|
+
if (Array.isArray(x)) {
|
|
3882
|
+
return x.concat();
|
|
3883
|
+
} else if (x && typeof x === 'object') {
|
|
3884
|
+
return _assign(new x.constructor(), x);
|
|
3885
|
+
} else {
|
|
3886
|
+
return x;
|
|
3887
|
+
}
|
|
3888
|
+
}
|
|
3889
|
+
|
|
3890
|
+
var COMMAND_PUSH = '$push';
|
|
3891
|
+
var COMMAND_UNSHIFT = '$unshift';
|
|
3892
|
+
var COMMAND_SPLICE = '$splice';
|
|
3893
|
+
var COMMAND_SET = '$set';
|
|
3894
|
+
var COMMAND_MERGE = '$merge';
|
|
3895
|
+
var COMMAND_APPLY = '$apply';
|
|
3896
|
+
|
|
3897
|
+
var ALL_COMMANDS_LIST = [COMMAND_PUSH, COMMAND_UNSHIFT, COMMAND_SPLICE, COMMAND_SET, COMMAND_MERGE, COMMAND_APPLY];
|
|
3898
|
+
|
|
3899
|
+
var ALL_COMMANDS_SET = {};
|
|
3900
|
+
|
|
3901
|
+
ALL_COMMANDS_LIST.forEach(function (command) {
|
|
3902
|
+
ALL_COMMANDS_SET[command] = true;
|
|
3903
|
+
});
|
|
3904
|
+
|
|
3905
|
+
function invariantArrayCase(value, spec, command) {
|
|
3906
|
+
!Array.isArray(value) ? "development" !== 'production' ? invariant(false, 'update(): expected target of %s to be an array; got %s.', command, value) : _prodInvariant('1', command, value) : void 0;
|
|
3907
|
+
var specValue = spec[command];
|
|
3908
|
+
!Array.isArray(specValue) ? "development" !== 'production' ? invariant(false, 'update(): expected spec of %s to be an array; got %s. Did you forget to wrap your parameter in an array?', command, specValue) : _prodInvariant('2', command, specValue) : void 0;
|
|
3909
|
+
}
|
|
3910
|
+
|
|
3911
|
+
/**
|
|
3912
|
+
* Returns a updated shallow copy of an object without mutating the original.
|
|
3913
|
+
* See https://facebook.github.io/react/docs/update.html for details.
|
|
3914
|
+
*/
|
|
3915
|
+
function update(value, spec) {
|
|
3916
|
+
!(typeof spec === 'object') ? "development" !== 'production' ? invariant(false, 'update(): You provided a key path to update() that did not contain one of %s. Did you forget to include {%s: ...}?', ALL_COMMANDS_LIST.join(', '), COMMAND_SET) : _prodInvariant('3', ALL_COMMANDS_LIST.join(', '), COMMAND_SET) : void 0;
|
|
3917
|
+
|
|
3918
|
+
if (hasOwnProperty.call(spec, COMMAND_SET)) {
|
|
3919
|
+
!(Object.keys(spec).length === 1) ? "development" !== 'production' ? invariant(false, 'Cannot have more than one key in an object with %s', COMMAND_SET) : _prodInvariant('4', COMMAND_SET) : void 0;
|
|
3920
|
+
|
|
3921
|
+
return spec[COMMAND_SET];
|
|
3922
|
+
}
|
|
3923
|
+
|
|
3924
|
+
var nextValue = shallowCopy(value);
|
|
3925
|
+
|
|
3926
|
+
if (hasOwnProperty.call(spec, COMMAND_MERGE)) {
|
|
3927
|
+
var mergeObj = spec[COMMAND_MERGE];
|
|
3928
|
+
!(mergeObj && typeof mergeObj === 'object') ? "development" !== 'production' ? invariant(false, 'update(): %s expects a spec of type \'object\'; got %s', COMMAND_MERGE, mergeObj) : _prodInvariant('5', COMMAND_MERGE, mergeObj) : void 0;
|
|
3929
|
+
!(nextValue && typeof nextValue === 'object') ? "development" !== 'production' ? invariant(false, 'update(): %s expects a target of type \'object\'; got %s', COMMAND_MERGE, nextValue) : _prodInvariant('6', COMMAND_MERGE, nextValue) : void 0;
|
|
3930
|
+
_assign(nextValue, spec[COMMAND_MERGE]);
|
|
3931
|
+
}
|
|
3932
|
+
|
|
3933
|
+
if (hasOwnProperty.call(spec, COMMAND_PUSH)) {
|
|
3934
|
+
invariantArrayCase(value, spec, COMMAND_PUSH);
|
|
3935
|
+
spec[COMMAND_PUSH].forEach(function (item) {
|
|
3936
|
+
nextValue.push(item);
|
|
3937
|
+
});
|
|
3938
|
+
}
|
|
3939
|
+
|
|
3940
|
+
if (hasOwnProperty.call(spec, COMMAND_UNSHIFT)) {
|
|
3941
|
+
invariantArrayCase(value, spec, COMMAND_UNSHIFT);
|
|
3942
|
+
spec[COMMAND_UNSHIFT].forEach(function (item) {
|
|
3943
|
+
nextValue.unshift(item);
|
|
3944
|
+
});
|
|
3945
|
+
}
|
|
3946
|
+
|
|
3947
|
+
if (hasOwnProperty.call(spec, COMMAND_SPLICE)) {
|
|
3948
|
+
!Array.isArray(value) ? "development" !== 'production' ? invariant(false, 'Expected %s target to be an array; got %s', COMMAND_SPLICE, value) : _prodInvariant('7', COMMAND_SPLICE, value) : void 0;
|
|
3949
|
+
!Array.isArray(spec[COMMAND_SPLICE]) ? "development" !== 'production' ? invariant(false, 'update(): expected spec of %s to be an array of arrays; got %s. Did you forget to wrap your parameters in an array?', COMMAND_SPLICE, spec[COMMAND_SPLICE]) : _prodInvariant('8', COMMAND_SPLICE, spec[COMMAND_SPLICE]) : void 0;
|
|
3950
|
+
spec[COMMAND_SPLICE].forEach(function (args) {
|
|
3951
|
+
!Array.isArray(args) ? "development" !== 'production' ? invariant(false, 'update(): expected spec of %s to be an array of arrays; got %s. Did you forget to wrap your parameters in an array?', COMMAND_SPLICE, spec[COMMAND_SPLICE]) : _prodInvariant('8', COMMAND_SPLICE, spec[COMMAND_SPLICE]) : void 0;
|
|
3952
|
+
nextValue.splice.apply(nextValue, args);
|
|
3953
|
+
});
|
|
3954
|
+
}
|
|
3955
|
+
|
|
3956
|
+
if (hasOwnProperty.call(spec, COMMAND_APPLY)) {
|
|
3957
|
+
!(typeof spec[COMMAND_APPLY] === 'function') ? "development" !== 'production' ? invariant(false, 'update(): expected spec of %s to be a function; got %s.', COMMAND_APPLY, spec[COMMAND_APPLY]) : _prodInvariant('9', COMMAND_APPLY, spec[COMMAND_APPLY]) : void 0;
|
|
3958
|
+
nextValue = spec[COMMAND_APPLY](nextValue);
|
|
3959
|
+
}
|
|
3960
|
+
|
|
3961
|
+
for (var k in spec) {
|
|
3962
|
+
if (!(ALL_COMMANDS_SET.hasOwnProperty(k) && ALL_COMMANDS_SET[k])) {
|
|
3963
|
+
nextValue[k] = update(value[k], spec[k]);
|
|
3964
|
+
}
|
|
3965
|
+
}
|
|
3966
|
+
|
|
3967
|
+
return nextValue;
|
|
3968
|
+
}
|
|
3969
|
+
|
|
3970
|
+
module.exports = update;
|
|
3971
|
+
},{"39":39,"48":48,"51":51}],43:[function(_dereq_,module,exports){
|
|
3972
|
+
/**
|
|
3973
|
+
* Copyright 2013-present, Facebook, Inc.
|
|
3974
|
+
* All rights reserved.
|
|
3975
|
+
*
|
|
3976
|
+
* This source code is licensed under the BSD-style license found in the
|
|
3977
|
+
* LICENSE file in the root directory of this source tree. An additional grant
|
|
3978
|
+
* of patent rights can be found in the PATENTS file in the same directory.
|
|
3979
|
+
*
|
|
3980
|
+
*/
|
|
3981
|
+
|
|
3982
|
+
'use strict';
|
|
3983
|
+
|
|
3984
|
+
var _assign = _dereq_(51);
|
|
3985
|
+
|
|
3986
|
+
var emptyObject = _dereq_(47);
|
|
3987
|
+
var _invariant = _dereq_(48);
|
|
3988
|
+
|
|
3989
|
+
if ("development" !== 'production') {
|
|
3990
|
+
var warning = _dereq_(50);
|
|
3991
|
+
}
|
|
3992
|
+
|
|
3993
|
+
var MIXINS_KEY = 'mixins';
|
|
3994
|
+
|
|
3995
|
+
// Helper function to allow the creation of anonymous functions which do not
|
|
3996
|
+
// have .name set to the name of the variable being assigned to.
|
|
3997
|
+
function identity(fn) {
|
|
3998
|
+
return fn;
|
|
3999
|
+
}
|
|
4000
|
+
|
|
4001
|
+
var ReactPropTypeLocationNames;
|
|
4002
|
+
if ("development" !== 'production') {
|
|
4003
|
+
ReactPropTypeLocationNames = {
|
|
4004
|
+
prop: 'prop',
|
|
4005
|
+
context: 'context',
|
|
4006
|
+
childContext: 'child context',
|
|
4007
|
+
};
|
|
4008
|
+
} else {
|
|
4009
|
+
ReactPropTypeLocationNames = {};
|
|
4010
|
+
}
|
|
4011
|
+
|
|
4012
|
+
function factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) {
|
|
4013
|
+
/**
|
|
4014
|
+
* Policies that describe methods in `ReactClassInterface`.
|
|
4015
|
+
*/
|
|
4016
|
+
|
|
4017
|
+
|
|
4018
|
+
var injectedMixins = [];
|
|
4019
|
+
|
|
4020
|
+
/**
|
|
4021
|
+
* Composite components are higher-level components that compose other composite
|
|
4022
|
+
* or host components.
|
|
4023
|
+
*
|
|
4024
|
+
* To create a new type of `ReactClass`, pass a specification of
|
|
4025
|
+
* your new class to `React.createClass`. The only requirement of your class
|
|
4026
|
+
* specification is that you implement a `render` method.
|
|
4027
|
+
*
|
|
4028
|
+
* var MyComponent = React.createClass({
|
|
4029
|
+
* render: function() {
|
|
4030
|
+
* return <div>Hello World</div>;
|
|
4031
|
+
* }
|
|
4032
|
+
* });
|
|
4033
|
+
*
|
|
4034
|
+
* The class specification supports a specific protocol of methods that have
|
|
4035
|
+
* special meaning (e.g. `render`). See `ReactClassInterface` for
|
|
4036
|
+
* more the comprehensive protocol. Any other properties and methods in the
|
|
4037
|
+
* class specification will be available on the prototype.
|
|
4038
|
+
*
|
|
4039
|
+
* @interface ReactClassInterface
|
|
4040
|
+
* @internal
|
|
4041
|
+
*/
|
|
4042
|
+
var ReactClassInterface = {
|
|
4043
|
+
|
|
4044
|
+
/**
|
|
4045
|
+
* An array of Mixin objects to include when defining your component.
|
|
4046
|
+
*
|
|
4047
|
+
* @type {array}
|
|
4048
|
+
* @optional
|
|
4049
|
+
*/
|
|
4050
|
+
mixins: 'DEFINE_MANY',
|
|
4051
|
+
|
|
4052
|
+
/**
|
|
4053
|
+
* An object containing properties and methods that should be defined on
|
|
4054
|
+
* the component's constructor instead of its prototype (static methods).
|
|
4055
|
+
*
|
|
4056
|
+
* @type {object}
|
|
4057
|
+
* @optional
|
|
4058
|
+
*/
|
|
4059
|
+
statics: 'DEFINE_MANY',
|
|
4060
|
+
|
|
4061
|
+
/**
|
|
4062
|
+
* Definition of prop types for this component.
|
|
4063
|
+
*
|
|
4064
|
+
* @type {object}
|
|
4065
|
+
* @optional
|
|
4066
|
+
*/
|
|
4067
|
+
propTypes: 'DEFINE_MANY',
|
|
4068
|
+
|
|
4069
|
+
/**
|
|
4070
|
+
* Definition of context types for this component.
|
|
4071
|
+
*
|
|
4072
|
+
* @type {object}
|
|
4073
|
+
* @optional
|
|
4074
|
+
*/
|
|
4075
|
+
contextTypes: 'DEFINE_MANY',
|
|
4076
|
+
|
|
4077
|
+
/**
|
|
4078
|
+
* Definition of context types this component sets for its children.
|
|
4079
|
+
*
|
|
4080
|
+
* @type {object}
|
|
4081
|
+
* @optional
|
|
4082
|
+
*/
|
|
4083
|
+
childContextTypes: 'DEFINE_MANY',
|
|
4084
|
+
|
|
4085
|
+
// ==== Definition methods ====
|
|
4086
|
+
|
|
4087
|
+
/**
|
|
4088
|
+
* Invoked when the component is mounted. Values in the mapping will be set on
|
|
4089
|
+
* `this.props` if that prop is not specified (i.e. using an `in` check).
|
|
4090
|
+
*
|
|
4091
|
+
* This method is invoked before `getInitialState` and therefore cannot rely
|
|
4092
|
+
* on `this.state` or use `this.setState`.
|
|
4093
|
+
*
|
|
4094
|
+
* @return {object}
|
|
4095
|
+
* @optional
|
|
4096
|
+
*/
|
|
4097
|
+
getDefaultProps: 'DEFINE_MANY_MERGED',
|
|
4098
|
+
|
|
4099
|
+
/**
|
|
4100
|
+
* Invoked once before the component is mounted. The return value will be used
|
|
4101
|
+
* as the initial value of `this.state`.
|
|
4102
|
+
*
|
|
4103
|
+
* getInitialState: function() {
|
|
4104
|
+
* return {
|
|
4105
|
+
* isOn: false,
|
|
4106
|
+
* fooBaz: new BazFoo()
|
|
4107
|
+
* }
|
|
4108
|
+
* }
|
|
4109
|
+
*
|
|
4110
|
+
* @return {object}
|
|
4111
|
+
* @optional
|
|
4112
|
+
*/
|
|
4113
|
+
getInitialState: 'DEFINE_MANY_MERGED',
|
|
4114
|
+
|
|
4115
|
+
/**
|
|
4116
|
+
* @return {object}
|
|
4117
|
+
* @optional
|
|
4118
|
+
*/
|
|
4119
|
+
getChildContext: 'DEFINE_MANY_MERGED',
|
|
4120
|
+
|
|
4121
|
+
/**
|
|
4122
|
+
* Uses props from `this.props` and state from `this.state` to render the
|
|
4123
|
+
* structure of the component.
|
|
4124
|
+
*
|
|
4125
|
+
* No guarantees are made about when or how often this method is invoked, so
|
|
4126
|
+
* it must not have side effects.
|
|
4127
|
+
*
|
|
4128
|
+
* render: function() {
|
|
4129
|
+
* var name = this.props.name;
|
|
4130
|
+
* return <div>Hello, {name}!</div>;
|
|
4131
|
+
* }
|
|
4132
|
+
*
|
|
4133
|
+
* @return {ReactComponent}
|
|
4134
|
+
* @nosideeffects
|
|
4135
|
+
* @required
|
|
4136
|
+
*/
|
|
4137
|
+
render: 'DEFINE_ONCE',
|
|
4138
|
+
|
|
4139
|
+
// ==== Delegate methods ====
|
|
4140
|
+
|
|
4141
|
+
/**
|
|
4142
|
+
* Invoked when the component is initially created and about to be mounted.
|
|
4143
|
+
* This may have side effects, but any external subscriptions or data created
|
|
4144
|
+
* by this method must be cleaned up in `componentWillUnmount`.
|
|
4145
|
+
*
|
|
4146
|
+
* @optional
|
|
4147
|
+
*/
|
|
4148
|
+
componentWillMount: 'DEFINE_MANY',
|
|
4149
|
+
|
|
4150
|
+
/**
|
|
4151
|
+
* Invoked when the component has been mounted and has a DOM representation.
|
|
4152
|
+
* However, there is no guarantee that the DOM node is in the document.
|
|
4153
|
+
*
|
|
4154
|
+
* Use this as an opportunity to operate on the DOM when the component has
|
|
4155
|
+
* been mounted (initialized and rendered) for the first time.
|
|
4156
|
+
*
|
|
4157
|
+
* @param {DOMElement} rootNode DOM element representing the component.
|
|
4158
|
+
* @optional
|
|
4159
|
+
*/
|
|
4160
|
+
componentDidMount: 'DEFINE_MANY',
|
|
4161
|
+
|
|
4162
|
+
/**
|
|
4163
|
+
* Invoked before the component receives new props.
|
|
4164
|
+
*
|
|
4165
|
+
* Use this as an opportunity to react to a prop transition by updating the
|
|
4166
|
+
* state using `this.setState`. Current props are accessed via `this.props`.
|
|
4167
|
+
*
|
|
4168
|
+
* componentWillReceiveProps: function(nextProps, nextContext) {
|
|
4169
|
+
* this.setState({
|
|
4170
|
+
* likesIncreasing: nextProps.likeCount > this.props.likeCount
|
|
4171
|
+
* });
|
|
4172
|
+
* }
|
|
4173
|
+
*
|
|
4174
|
+
* NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop
|
|
4175
|
+
* transition may cause a state change, but the opposite is not true. If you
|
|
4176
|
+
* need it, you are probably looking for `componentWillUpdate`.
|
|
4177
|
+
*
|
|
4178
|
+
* @param {object} nextProps
|
|
4179
|
+
* @optional
|
|
4180
|
+
*/
|
|
4181
|
+
componentWillReceiveProps: 'DEFINE_MANY',
|
|
4182
|
+
|
|
4183
|
+
/**
|
|
4184
|
+
* Invoked while deciding if the component should be updated as a result of
|
|
4185
|
+
* receiving new props, state and/or context.
|
|
4186
|
+
*
|
|
4187
|
+
* Use this as an opportunity to `return false` when you're certain that the
|
|
4188
|
+
* transition to the new props/state/context will not require a component
|
|
4189
|
+
* update.
|
|
4190
|
+
*
|
|
4191
|
+
* shouldComponentUpdate: function(nextProps, nextState, nextContext) {
|
|
4192
|
+
* return !equal(nextProps, this.props) ||
|
|
4193
|
+
* !equal(nextState, this.state) ||
|
|
4194
|
+
* !equal(nextContext, this.context);
|
|
4195
|
+
* }
|
|
4196
|
+
*
|
|
4197
|
+
* @param {object} nextProps
|
|
4198
|
+
* @param {?object} nextState
|
|
4199
|
+
* @param {?object} nextContext
|
|
4200
|
+
* @return {boolean} True if the component should update.
|
|
4201
|
+
* @optional
|
|
4202
|
+
*/
|
|
4203
|
+
shouldComponentUpdate: 'DEFINE_ONCE',
|
|
4204
|
+
|
|
4205
|
+
/**
|
|
4206
|
+
* Invoked when the component is about to update due to a transition from
|
|
4207
|
+
* `this.props`, `this.state` and `this.context` to `nextProps`, `nextState`
|
|
4208
|
+
* and `nextContext`.
|
|
4209
|
+
*
|
|
4210
|
+
* Use this as an opportunity to perform preparation before an update occurs.
|
|
4211
|
+
*
|
|
4212
|
+
* NOTE: You **cannot** use `this.setState()` in this method.
|
|
4213
|
+
*
|
|
4214
|
+
* @param {object} nextProps
|
|
4215
|
+
* @param {?object} nextState
|
|
4216
|
+
* @param {?object} nextContext
|
|
4217
|
+
* @param {ReactReconcileTransaction} transaction
|
|
4218
|
+
* @optional
|
|
4219
|
+
*/
|
|
4220
|
+
componentWillUpdate: 'DEFINE_MANY',
|
|
4221
|
+
|
|
4222
|
+
/**
|
|
4223
|
+
* Invoked when the component's DOM representation has been updated.
|
|
4224
|
+
*
|
|
4225
|
+
* Use this as an opportunity to operate on the DOM when the component has
|
|
4226
|
+
* been updated.
|
|
4227
|
+
*
|
|
4228
|
+
* @param {object} prevProps
|
|
4229
|
+
* @param {?object} prevState
|
|
4230
|
+
* @param {?object} prevContext
|
|
4231
|
+
* @param {DOMElement} rootNode DOM element representing the component.
|
|
4232
|
+
* @optional
|
|
4233
|
+
*/
|
|
4234
|
+
componentDidUpdate: 'DEFINE_MANY',
|
|
4235
|
+
|
|
4236
|
+
/**
|
|
4237
|
+
* Invoked when the component is about to be removed from its parent and have
|
|
4238
|
+
* its DOM representation destroyed.
|
|
4239
|
+
*
|
|
4240
|
+
* Use this as an opportunity to deallocate any external resources.
|
|
4241
|
+
*
|
|
4242
|
+
* NOTE: There is no `componentDidUnmount` since your component will have been
|
|
4243
|
+
* destroyed by that point.
|
|
4244
|
+
*
|
|
4245
|
+
* @optional
|
|
4246
|
+
*/
|
|
4247
|
+
componentWillUnmount: 'DEFINE_MANY',
|
|
4248
|
+
|
|
4249
|
+
// ==== Advanced methods ====
|
|
4250
|
+
|
|
4251
|
+
/**
|
|
4252
|
+
* Updates the component's currently mounted DOM representation.
|
|
4253
|
+
*
|
|
4254
|
+
* By default, this implements React's rendering and reconciliation algorithm.
|
|
4255
|
+
* Sophisticated clients may wish to override this.
|
|
4256
|
+
*
|
|
4257
|
+
* @param {ReactReconcileTransaction} transaction
|
|
4258
|
+
* @internal
|
|
4259
|
+
* @overridable
|
|
4260
|
+
*/
|
|
4261
|
+
updateComponent: 'OVERRIDE_BASE'
|
|
4262
|
+
|
|
4263
|
+
};
|
|
4264
|
+
|
|
4265
|
+
/**
|
|
4266
|
+
* Mapping from class specification keys to special processing functions.
|
|
4267
|
+
*
|
|
4268
|
+
* Although these are declared like instance properties in the specification
|
|
4269
|
+
* when defining classes using `React.createClass`, they are actually static
|
|
4270
|
+
* and are accessible on the constructor instead of the prototype. Despite
|
|
4271
|
+
* being static, they must be defined outside of the "statics" key under
|
|
4272
|
+
* which all other static methods are defined.
|
|
4273
|
+
*/
|
|
4274
|
+
var RESERVED_SPEC_KEYS = {
|
|
4275
|
+
displayName: function (Constructor, displayName) {
|
|
4276
|
+
Constructor.displayName = displayName;
|
|
4277
|
+
},
|
|
4278
|
+
mixins: function (Constructor, mixins) {
|
|
4279
|
+
if (mixins) {
|
|
4280
|
+
for (var i = 0; i < mixins.length; i++) {
|
|
4281
|
+
mixSpecIntoComponent(Constructor, mixins[i]);
|
|
4282
|
+
}
|
|
4283
|
+
}
|
|
4284
|
+
},
|
|
4285
|
+
childContextTypes: function (Constructor, childContextTypes) {
|
|
4286
|
+
if ("development" !== 'production') {
|
|
4287
|
+
validateTypeDef(Constructor, childContextTypes, 'childContext');
|
|
4288
|
+
}
|
|
4289
|
+
Constructor.childContextTypes = _assign({}, Constructor.childContextTypes, childContextTypes);
|
|
4290
|
+
},
|
|
4291
|
+
contextTypes: function (Constructor, contextTypes) {
|
|
4292
|
+
if ("development" !== 'production') {
|
|
4293
|
+
validateTypeDef(Constructor, contextTypes, 'context');
|
|
4294
|
+
}
|
|
4295
|
+
Constructor.contextTypes = _assign({}, Constructor.contextTypes, contextTypes);
|
|
4296
|
+
},
|
|
4297
|
+
/**
|
|
4298
|
+
* Special case getDefaultProps which should move into statics but requires
|
|
4299
|
+
* automatic merging.
|
|
4300
|
+
*/
|
|
4301
|
+
getDefaultProps: function (Constructor, getDefaultProps) {
|
|
4302
|
+
if (Constructor.getDefaultProps) {
|
|
4303
|
+
Constructor.getDefaultProps = createMergedResultFunction(Constructor.getDefaultProps, getDefaultProps);
|
|
4304
|
+
} else {
|
|
4305
|
+
Constructor.getDefaultProps = getDefaultProps;
|
|
4306
|
+
}
|
|
4307
|
+
},
|
|
4308
|
+
propTypes: function (Constructor, propTypes) {
|
|
4309
|
+
if ("development" !== 'production') {
|
|
4310
|
+
validateTypeDef(Constructor, propTypes, 'prop');
|
|
4311
|
+
}
|
|
4312
|
+
Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes);
|
|
4313
|
+
},
|
|
4314
|
+
statics: function (Constructor, statics) {
|
|
4315
|
+
mixStaticSpecIntoComponent(Constructor, statics);
|
|
4316
|
+
},
|
|
4317
|
+
autobind: function () {} };
|
|
4318
|
+
|
|
4319
|
+
function validateTypeDef(Constructor, typeDef, location) {
|
|
4320
|
+
for (var propName in typeDef) {
|
|
4321
|
+
if (typeDef.hasOwnProperty(propName)) {
|
|
4322
|
+
// use a warning instead of an _invariant so components
|
|
4323
|
+
// don't show up in prod but only in __DEV__
|
|
4324
|
+
"development" !== 'production' ? warning(typeof typeDef[propName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', Constructor.displayName || 'ReactClass', ReactPropTypeLocationNames[location], propName) : void 0;
|
|
4325
|
+
}
|
|
4326
|
+
}
|
|
4327
|
+
}
|
|
4328
|
+
|
|
4329
|
+
function validateMethodOverride(isAlreadyDefined, name) {
|
|
4330
|
+
var specPolicy = ReactClassInterface.hasOwnProperty(name) ? ReactClassInterface[name] : null;
|
|
4331
|
+
|
|
4332
|
+
// Disallow overriding of base class methods unless explicitly allowed.
|
|
4333
|
+
if (ReactClassMixin.hasOwnProperty(name)) {
|
|
4334
|
+
_invariant(specPolicy === 'OVERRIDE_BASE', 'ReactClassInterface: You are attempting to override ' + '`%s` from your class specification. Ensure that your method names ' + 'do not overlap with React methods.', name);
|
|
4335
|
+
}
|
|
4336
|
+
|
|
4337
|
+
// Disallow defining methods more than once unless explicitly allowed.
|
|
4338
|
+
if (isAlreadyDefined) {
|
|
4339
|
+
_invariant(specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED', 'ReactClassInterface: You are attempting to define ' + '`%s` on your component more than once. This conflict may be due ' + 'to a mixin.', name);
|
|
4340
|
+
}
|
|
4341
|
+
}
|
|
4342
|
+
|
|
4343
|
+
/**
|
|
4344
|
+
* Mixin helper which handles policy validation and reserved
|
|
4345
|
+
* specification keys when building React classes.
|
|
4346
|
+
*/
|
|
4347
|
+
function mixSpecIntoComponent(Constructor, spec) {
|
|
4348
|
+
if (!spec) {
|
|
4349
|
+
if ("development" !== 'production') {
|
|
4350
|
+
var typeofSpec = typeof spec;
|
|
4351
|
+
var isMixinValid = typeofSpec === 'object' && spec !== null;
|
|
4352
|
+
|
|
4353
|
+
"development" !== 'production' ? warning(isMixinValid, '%s: You\'re attempting to include a mixin that is either null ' + 'or not an object. Check the mixins included by the component, ' + 'as well as any mixins they include themselves. ' + 'Expected object but got %s.', Constructor.displayName || 'ReactClass', spec === null ? null : typeofSpec) : void 0;
|
|
4354
|
+
}
|
|
4355
|
+
|
|
4356
|
+
return;
|
|
4357
|
+
}
|
|
4358
|
+
|
|
4359
|
+
_invariant(typeof spec !== 'function', 'ReactClass: You\'re attempting to ' + 'use a component class or function as a mixin. Instead, just use a ' + 'regular object.');
|
|
4360
|
+
_invariant(!isValidElement(spec), 'ReactClass: You\'re attempting to ' + 'use a component as a mixin. Instead, just use a regular object.');
|
|
4361
|
+
|
|
4362
|
+
var proto = Constructor.prototype;
|
|
4363
|
+
var autoBindPairs = proto.__reactAutoBindPairs;
|
|
4364
|
+
|
|
4365
|
+
// By handling mixins before any other properties, we ensure the same
|
|
4366
|
+
// chaining order is applied to methods with DEFINE_MANY policy, whether
|
|
4367
|
+
// mixins are listed before or after these methods in the spec.
|
|
4368
|
+
if (spec.hasOwnProperty(MIXINS_KEY)) {
|
|
4369
|
+
RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins);
|
|
4370
|
+
}
|
|
4371
|
+
|
|
4372
|
+
for (var name in spec) {
|
|
4373
|
+
if (!spec.hasOwnProperty(name)) {
|
|
4374
|
+
continue;
|
|
4375
|
+
}
|
|
4376
|
+
|
|
4377
|
+
if (name === MIXINS_KEY) {
|
|
4378
|
+
// We have already handled mixins in a special case above.
|
|
4379
|
+
continue;
|
|
4380
|
+
}
|
|
4381
|
+
|
|
4382
|
+
var property = spec[name];
|
|
4383
|
+
var isAlreadyDefined = proto.hasOwnProperty(name);
|
|
4384
|
+
validateMethodOverride(isAlreadyDefined, name);
|
|
4385
|
+
|
|
4386
|
+
if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) {
|
|
4387
|
+
RESERVED_SPEC_KEYS[name](Constructor, property);
|
|
4388
|
+
} else {
|
|
4389
|
+
// Setup methods on prototype:
|
|
4390
|
+
// The following member methods should not be automatically bound:
|
|
4391
|
+
// 1. Expected ReactClass methods (in the "interface").
|
|
4392
|
+
// 2. Overridden methods (that were mixed in).
|
|
4393
|
+
var isReactClassMethod = ReactClassInterface.hasOwnProperty(name);
|
|
4394
|
+
var isFunction = typeof property === 'function';
|
|
4395
|
+
var shouldAutoBind = isFunction && !isReactClassMethod && !isAlreadyDefined && spec.autobind !== false;
|
|
4396
|
+
|
|
4397
|
+
if (shouldAutoBind) {
|
|
4398
|
+
autoBindPairs.push(name, property);
|
|
4399
|
+
proto[name] = property;
|
|
4400
|
+
} else {
|
|
4401
|
+
if (isAlreadyDefined) {
|
|
4402
|
+
var specPolicy = ReactClassInterface[name];
|
|
4403
|
+
|
|
4404
|
+
// These cases should already be caught by validateMethodOverride.
|
|
4405
|
+
_invariant(isReactClassMethod && (specPolicy === 'DEFINE_MANY_MERGED' || specPolicy === 'DEFINE_MANY'), 'ReactClass: Unexpected spec policy %s for key %s ' + 'when mixing in component specs.', specPolicy, name);
|
|
4406
|
+
|
|
4407
|
+
// For methods which are defined more than once, call the existing
|
|
4408
|
+
// methods before calling the new property, merging if appropriate.
|
|
4409
|
+
if (specPolicy === 'DEFINE_MANY_MERGED') {
|
|
4410
|
+
proto[name] = createMergedResultFunction(proto[name], property);
|
|
4411
|
+
} else if (specPolicy === 'DEFINE_MANY') {
|
|
4412
|
+
proto[name] = createChainedFunction(proto[name], property);
|
|
4413
|
+
}
|
|
4414
|
+
} else {
|
|
4415
|
+
proto[name] = property;
|
|
4416
|
+
if ("development" !== 'production') {
|
|
4417
|
+
// Add verbose displayName to the function, which helps when looking
|
|
4418
|
+
// at profiling tools.
|
|
4419
|
+
if (typeof property === 'function' && spec.displayName) {
|
|
4420
|
+
proto[name].displayName = spec.displayName + '_' + name;
|
|
4421
|
+
}
|
|
4422
|
+
}
|
|
4423
|
+
}
|
|
4424
|
+
}
|
|
4425
|
+
}
|
|
4426
|
+
}
|
|
4427
|
+
}
|
|
4428
|
+
|
|
4429
|
+
function mixStaticSpecIntoComponent(Constructor, statics) {
|
|
4430
|
+
if (!statics) {
|
|
4431
|
+
return;
|
|
4432
|
+
}
|
|
4433
|
+
for (var name in statics) {
|
|
4434
|
+
var property = statics[name];
|
|
4435
|
+
if (!statics.hasOwnProperty(name)) {
|
|
4436
|
+
continue;
|
|
4437
|
+
}
|
|
4438
|
+
|
|
4439
|
+
var isReserved = name in RESERVED_SPEC_KEYS;
|
|
4440
|
+
_invariant(!isReserved, 'ReactClass: You are attempting to define a reserved ' + 'property, `%s`, that shouldn\'t be on the "statics" key. Define it ' + 'as an instance property instead; it will still be accessible on the ' + 'constructor.', name);
|
|
4431
4441
|
|
|
4432
|
-
|
|
4433
|
-
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
-
* - `traverseAllChildren(this.props.children, ...)`
|
|
4437
|
-
* - `traverseAllChildren(this.props.leftPanelChildren, ...)`
|
|
4438
|
-
*
|
|
4439
|
-
* The `traverseContext` is an optional argument that is passed through the
|
|
4440
|
-
* entire traversal. It can be used to store accumulations or anything else that
|
|
4441
|
-
* the callback might find relevant.
|
|
4442
|
-
*
|
|
4443
|
-
* @param {?*} children Children tree object.
|
|
4444
|
-
* @param {!function} callback To invoke upon traversing each child.
|
|
4445
|
-
* @param {?*} traverseContext Context for traversal.
|
|
4446
|
-
* @return {!number} The number of children in this subtree.
|
|
4447
|
-
*/
|
|
4448
|
-
function traverseAllChildren(children, callback, traverseContext) {
|
|
4449
|
-
if (children == null) {
|
|
4450
|
-
return 0;
|
|
4442
|
+
var isInherited = name in Constructor;
|
|
4443
|
+
_invariant(!isInherited, 'ReactClass: You are attempting to define ' + '`%s` on your component more than once. This conflict may be ' + 'due to a mixin.', name);
|
|
4444
|
+
Constructor[name] = property;
|
|
4445
|
+
}
|
|
4451
4446
|
}
|
|
4452
4447
|
|
|
4453
|
-
|
|
4454
|
-
|
|
4448
|
+
/**
|
|
4449
|
+
* Merge two objects, but throw if both contain the same key.
|
|
4450
|
+
*
|
|
4451
|
+
* @param {object} one The first object, which is mutated.
|
|
4452
|
+
* @param {object} two The second object
|
|
4453
|
+
* @return {object} one after it has been mutated to contain everything in two.
|
|
4454
|
+
*/
|
|
4455
|
+
function mergeIntoWithNoDuplicateKeys(one, two) {
|
|
4456
|
+
_invariant(one && two && typeof one === 'object' && typeof two === 'object', 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.');
|
|
4455
4457
|
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
4465
|
-
*
|
|
4466
|
-
*/
|
|
4458
|
+
for (var key in two) {
|
|
4459
|
+
if (two.hasOwnProperty(key)) {
|
|
4460
|
+
_invariant(one[key] === undefined, 'mergeIntoWithNoDuplicateKeys(): ' + 'Tried to merge two objects with the same key: `%s`. This conflict ' + 'may be due to a mixin; in particular, this may be caused by two ' + 'getInitialState() or getDefaultProps() methods returning objects ' + 'with clashing keys.', key);
|
|
4461
|
+
one[key] = two[key];
|
|
4462
|
+
}
|
|
4463
|
+
}
|
|
4464
|
+
return one;
|
|
4465
|
+
}
|
|
4467
4466
|
|
|
4468
|
-
|
|
4467
|
+
/**
|
|
4468
|
+
* Creates a function that invokes two functions and merges their return values.
|
|
4469
|
+
*
|
|
4470
|
+
* @param {function} one Function to invoke first.
|
|
4471
|
+
* @param {function} two Function to invoke second.
|
|
4472
|
+
* @return {function} Function that invokes the two argument functions.
|
|
4473
|
+
* @private
|
|
4474
|
+
*/
|
|
4475
|
+
function createMergedResultFunction(one, two) {
|
|
4476
|
+
return function mergedResult() {
|
|
4477
|
+
var a = one.apply(this, arguments);
|
|
4478
|
+
var b = two.apply(this, arguments);
|
|
4479
|
+
if (a == null) {
|
|
4480
|
+
return b;
|
|
4481
|
+
} else if (b == null) {
|
|
4482
|
+
return a;
|
|
4483
|
+
}
|
|
4484
|
+
var c = {};
|
|
4485
|
+
mergeIntoWithNoDuplicateKeys(c, a);
|
|
4486
|
+
mergeIntoWithNoDuplicateKeys(c, b);
|
|
4487
|
+
return c;
|
|
4488
|
+
};
|
|
4489
|
+
}
|
|
4469
4490
|
|
|
4470
|
-
|
|
4491
|
+
/**
|
|
4492
|
+
* Creates a function that invokes two functions and ignores their return vales.
|
|
4493
|
+
*
|
|
4494
|
+
* @param {function} one Function to invoke first.
|
|
4495
|
+
* @param {function} two Function to invoke second.
|
|
4496
|
+
* @return {function} Function that invokes the two argument functions.
|
|
4497
|
+
* @private
|
|
4498
|
+
*/
|
|
4499
|
+
function createChainedFunction(one, two) {
|
|
4500
|
+
return function chainedFunction() {
|
|
4501
|
+
one.apply(this, arguments);
|
|
4502
|
+
two.apply(this, arguments);
|
|
4503
|
+
};
|
|
4504
|
+
}
|
|
4471
4505
|
|
|
4472
|
-
|
|
4473
|
-
|
|
4506
|
+
/**
|
|
4507
|
+
* Binds a method to the component.
|
|
4508
|
+
*
|
|
4509
|
+
* @param {object} component Component whose method is going to be bound.
|
|
4510
|
+
* @param {function} method Method to be bound.
|
|
4511
|
+
* @return {function} The bound method.
|
|
4512
|
+
*/
|
|
4513
|
+
function bindAutoBindMethod(component, method) {
|
|
4514
|
+
var boundMethod = method.bind(component);
|
|
4515
|
+
if ("development" !== 'production') {
|
|
4516
|
+
boundMethod.__reactBoundContext = component;
|
|
4517
|
+
boundMethod.__reactBoundMethod = method;
|
|
4518
|
+
boundMethod.__reactBoundArguments = null;
|
|
4519
|
+
var componentName = component.constructor.displayName;
|
|
4520
|
+
var _bind = boundMethod.bind;
|
|
4521
|
+
boundMethod.bind = function (newThis) {
|
|
4522
|
+
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
4523
|
+
args[_key - 1] = arguments[_key];
|
|
4524
|
+
}
|
|
4474
4525
|
|
|
4475
|
-
|
|
4476
|
-
|
|
4526
|
+
// User is trying to bind() an autobound method; we effectively will
|
|
4527
|
+
// ignore the value of "this" that the user is trying to use, so
|
|
4528
|
+
// let's warn.
|
|
4529
|
+
if (newThis !== component && newThis !== null) {
|
|
4530
|
+
"development" !== 'production' ? warning(false, 'bind(): React component methods may only be bound to the ' + 'component instance. See %s', componentName) : void 0;
|
|
4531
|
+
} else if (!args.length) {
|
|
4532
|
+
"development" !== 'production' ? warning(false, 'bind(): You are binding a component method to the component. ' + 'React does this for you automatically in a high-performance ' + 'way, so you can safely remove this call. See %s', componentName) : void 0;
|
|
4533
|
+
return boundMethod;
|
|
4534
|
+
}
|
|
4535
|
+
var reboundMethod = _bind.apply(boundMethod, arguments);
|
|
4536
|
+
reboundMethod.__reactBoundContext = component;
|
|
4537
|
+
reboundMethod.__reactBoundMethod = method;
|
|
4538
|
+
reboundMethod.__reactBoundArguments = args;
|
|
4539
|
+
return reboundMethod;
|
|
4540
|
+
};
|
|
4541
|
+
}
|
|
4542
|
+
return boundMethod;
|
|
4543
|
+
}
|
|
4477
4544
|
|
|
4478
|
-
|
|
4479
|
-
|
|
4480
|
-
|
|
4481
|
-
|
|
4482
|
-
|
|
4483
|
-
|
|
4484
|
-
|
|
4545
|
+
/**
|
|
4546
|
+
* Binds all auto-bound methods in a component.
|
|
4547
|
+
*
|
|
4548
|
+
* @param {object} component Component whose method is going to be bound.
|
|
4549
|
+
*/
|
|
4550
|
+
function bindAutoBindMethods(component) {
|
|
4551
|
+
var pairs = component.__reactAutoBindPairs;
|
|
4552
|
+
for (var i = 0; i < pairs.length; i += 2) {
|
|
4553
|
+
var autoBindKey = pairs[i];
|
|
4554
|
+
var method = pairs[i + 1];
|
|
4555
|
+
component[autoBindKey] = bindAutoBindMethod(component, method);
|
|
4556
|
+
}
|
|
4485
4557
|
}
|
|
4486
|
-
}
|
|
4487
4558
|
|
|
4488
|
-
var
|
|
4489
|
-
|
|
4490
|
-
|
|
4491
|
-
|
|
4492
|
-
|
|
4493
|
-
|
|
4559
|
+
var IsMountedMixin = {
|
|
4560
|
+
componentDidMount: function () {
|
|
4561
|
+
this.__isMounted = true;
|
|
4562
|
+
},
|
|
4563
|
+
componentWillUnmount: function () {
|
|
4564
|
+
this.__isMounted = false;
|
|
4565
|
+
}
|
|
4566
|
+
};
|
|
4494
4567
|
|
|
4495
|
-
|
|
4568
|
+
/**
|
|
4569
|
+
* Add more to the ReactClass base class. These are all legacy features and
|
|
4570
|
+
* therefore not already part of the modern ReactComponent.
|
|
4571
|
+
*/
|
|
4572
|
+
var ReactClassMixin = {
|
|
4573
|
+
|
|
4574
|
+
/**
|
|
4575
|
+
* TODO: This will be deprecated because state should always keep a consistent
|
|
4576
|
+
* type signature and the only use case for this, is to avoid that.
|
|
4577
|
+
*/
|
|
4578
|
+
replaceState: function (newState, callback) {
|
|
4579
|
+
this.updater.enqueueReplaceState(this, newState, callback);
|
|
4580
|
+
},
|
|
4581
|
+
|
|
4582
|
+
/**
|
|
4583
|
+
* Checks whether or not this composite component is mounted.
|
|
4584
|
+
* @return {boolean} True if mounted, false otherwise.
|
|
4585
|
+
* @protected
|
|
4586
|
+
* @final
|
|
4587
|
+
*/
|
|
4588
|
+
isMounted: function () {
|
|
4589
|
+
if ("development" !== 'production') {
|
|
4590
|
+
"development" !== 'production' ? warning(this.__didWarnIsMounted, '%s: isMounted is deprecated. Instead, make sure to clean up ' + 'subscriptions and pending requests in componentWillUnmount to ' + 'prevent memory leaks.', this.constructor && this.constructor.displayName || this.name || 'Component') : void 0;
|
|
4591
|
+
this.__didWarnIsMounted = true;
|
|
4592
|
+
}
|
|
4593
|
+
return !!this.__isMounted;
|
|
4594
|
+
}
|
|
4595
|
+
};
|
|
4496
4596
|
|
|
4497
|
-
var
|
|
4597
|
+
var ReactClassComponent = function () {};
|
|
4598
|
+
_assign(ReactClassComponent.prototype, ReactComponent.prototype, ReactClassMixin);
|
|
4498
4599
|
|
|
4499
|
-
|
|
4500
|
-
|
|
4501
|
-
|
|
4600
|
+
/**
|
|
4601
|
+
* Creates a composite component class given a class specification.
|
|
4602
|
+
* See https://facebook.github.io/react/docs/top-level-api.html#react.createclass
|
|
4603
|
+
*
|
|
4604
|
+
* @param {object} spec Class specification (which must define `render`).
|
|
4605
|
+
* @return {function} Component constructor function.
|
|
4606
|
+
* @public
|
|
4607
|
+
*/
|
|
4608
|
+
function createClass(spec) {
|
|
4609
|
+
// To keep our warnings more understandable, we'll use a little hack here to
|
|
4610
|
+
// ensure that Constructor.name !== 'Constructor'. This makes sure we don't
|
|
4611
|
+
// unnecessarily identify a class without displayName as 'Constructor'.
|
|
4612
|
+
var Constructor = identity(function (props, context, updater) {
|
|
4613
|
+
// This constructor gets overridden by mocks. The argument is used
|
|
4614
|
+
// by mocks to assert on what gets mounted.
|
|
4502
4615
|
|
|
4503
|
-
|
|
4504
|
-
|
|
4505
|
-
|
|
4506
|
-
!Array.isArray(specValue) ? "development" !== 'production' ? invariant(false, 'update(): expected spec of %s to be an array; got %s. Did you forget to wrap your parameter in an array?', command, specValue) : _prodInvariant('2', command, specValue) : void 0;
|
|
4507
|
-
}
|
|
4616
|
+
if ("development" !== 'production') {
|
|
4617
|
+
"development" !== 'production' ? warning(this instanceof Constructor, 'Something is calling a React component directly. Use a factory or ' + 'JSX instead. See: https://fb.me/react-legacyfactory') : void 0;
|
|
4618
|
+
}
|
|
4508
4619
|
|
|
4509
|
-
|
|
4510
|
-
|
|
4511
|
-
|
|
4512
|
-
|
|
4513
|
-
function update(value, spec) {
|
|
4514
|
-
!(typeof spec === 'object') ? "development" !== 'production' ? invariant(false, 'update(): You provided a key path to update() that did not contain one of %s. Did you forget to include {%s: ...}?', ALL_COMMANDS_LIST.join(', '), COMMAND_SET) : _prodInvariant('3', ALL_COMMANDS_LIST.join(', '), COMMAND_SET) : void 0;
|
|
4620
|
+
// Wire up auto-binding
|
|
4621
|
+
if (this.__reactAutoBindPairs.length) {
|
|
4622
|
+
bindAutoBindMethods(this);
|
|
4623
|
+
}
|
|
4515
4624
|
|
|
4516
|
-
|
|
4517
|
-
|
|
4625
|
+
this.props = props;
|
|
4626
|
+
this.context = context;
|
|
4627
|
+
this.refs = emptyObject;
|
|
4628
|
+
this.updater = updater || ReactNoopUpdateQueue;
|
|
4518
4629
|
|
|
4519
|
-
|
|
4520
|
-
}
|
|
4630
|
+
this.state = null;
|
|
4521
4631
|
|
|
4522
|
-
|
|
4632
|
+
// ReactClasses doesn't have constructors. Instead, they use the
|
|
4633
|
+
// getInitialState and componentWillMount methods for initialization.
|
|
4523
4634
|
|
|
4524
|
-
|
|
4525
|
-
|
|
4526
|
-
|
|
4527
|
-
|
|
4528
|
-
|
|
4529
|
-
|
|
4635
|
+
var initialState = this.getInitialState ? this.getInitialState() : null;
|
|
4636
|
+
if ("development" !== 'production') {
|
|
4637
|
+
// We allow auto-mocks to proceed as if they're returning null.
|
|
4638
|
+
if (initialState === undefined && this.getInitialState._isMockFunction) {
|
|
4639
|
+
// This is probably bad practice. Consider warning here and
|
|
4640
|
+
// deprecating this convenience.
|
|
4641
|
+
initialState = null;
|
|
4642
|
+
}
|
|
4643
|
+
}
|
|
4644
|
+
_invariant(typeof initialState === 'object' && !Array.isArray(initialState), '%s.getInitialState(): must return an object or null', Constructor.displayName || 'ReactCompositeComponent');
|
|
4530
4645
|
|
|
4531
|
-
|
|
4532
|
-
invariantArrayCase(value, spec, COMMAND_PUSH);
|
|
4533
|
-
spec[COMMAND_PUSH].forEach(function (item) {
|
|
4534
|
-
nextValue.push(item);
|
|
4646
|
+
this.state = initialState;
|
|
4535
4647
|
});
|
|
4536
|
-
|
|
4648
|
+
Constructor.prototype = new ReactClassComponent();
|
|
4649
|
+
Constructor.prototype.constructor = Constructor;
|
|
4650
|
+
Constructor.prototype.__reactAutoBindPairs = [];
|
|
4537
4651
|
|
|
4538
|
-
|
|
4539
|
-
invariantArrayCase(value, spec, COMMAND_UNSHIFT);
|
|
4540
|
-
spec[COMMAND_UNSHIFT].forEach(function (item) {
|
|
4541
|
-
nextValue.unshift(item);
|
|
4542
|
-
});
|
|
4543
|
-
}
|
|
4652
|
+
injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor));
|
|
4544
4653
|
|
|
4545
|
-
|
|
4546
|
-
|
|
4547
|
-
!Array.isArray(spec[COMMAND_SPLICE]) ? "development" !== 'production' ? invariant(false, 'update(): expected spec of %s to be an array of arrays; got %s. Did you forget to wrap your parameters in an array?', COMMAND_SPLICE, spec[COMMAND_SPLICE]) : _prodInvariant('8', COMMAND_SPLICE, spec[COMMAND_SPLICE]) : void 0;
|
|
4548
|
-
spec[COMMAND_SPLICE].forEach(function (args) {
|
|
4549
|
-
!Array.isArray(args) ? "development" !== 'production' ? invariant(false, 'update(): expected spec of %s to be an array of arrays; got %s. Did you forget to wrap your parameters in an array?', COMMAND_SPLICE, spec[COMMAND_SPLICE]) : _prodInvariant('8', COMMAND_SPLICE, spec[COMMAND_SPLICE]) : void 0;
|
|
4550
|
-
nextValue.splice.apply(nextValue, args);
|
|
4551
|
-
});
|
|
4552
|
-
}
|
|
4654
|
+
mixSpecIntoComponent(Constructor, IsMountedMixin);
|
|
4655
|
+
mixSpecIntoComponent(Constructor, spec);
|
|
4553
4656
|
|
|
4554
|
-
|
|
4555
|
-
|
|
4556
|
-
|
|
4557
|
-
|
|
4657
|
+
// Initialize the defaultProps property after all mixins have been merged.
|
|
4658
|
+
if (Constructor.getDefaultProps) {
|
|
4659
|
+
Constructor.defaultProps = Constructor.getDefaultProps();
|
|
4660
|
+
}
|
|
4558
4661
|
|
|
4559
|
-
|
|
4560
|
-
|
|
4561
|
-
|
|
4662
|
+
if ("development" !== 'production') {
|
|
4663
|
+
// This is a tag to indicate that the use of these method names is ok,
|
|
4664
|
+
// since it's used with createClass. If it's not, then it's likely a
|
|
4665
|
+
// mistake so we'll warn you to use the static property, property
|
|
4666
|
+
// initializer or constructor respectively.
|
|
4667
|
+
if (Constructor.getDefaultProps) {
|
|
4668
|
+
Constructor.getDefaultProps.isReactClassApproved = {};
|
|
4669
|
+
}
|
|
4670
|
+
if (Constructor.prototype.getInitialState) {
|
|
4671
|
+
Constructor.prototype.getInitialState.isReactClassApproved = {};
|
|
4672
|
+
}
|
|
4673
|
+
}
|
|
4674
|
+
|
|
4675
|
+
_invariant(Constructor.prototype.render, 'createClass(...): Class specification must implement a `render` method.');
|
|
4676
|
+
|
|
4677
|
+
if ("development" !== 'production') {
|
|
4678
|
+
"development" !== 'production' ? warning(!Constructor.prototype.componentShouldUpdate, '%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', spec.displayName || 'A component') : void 0;
|
|
4679
|
+
"development" !== 'production' ? warning(!Constructor.prototype.componentWillRecieveProps, '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', spec.displayName || 'A component') : void 0;
|
|
4680
|
+
}
|
|
4681
|
+
|
|
4682
|
+
// Reduce time spent doing lookups by setting these on the prototype.
|
|
4683
|
+
for (var methodName in ReactClassInterface) {
|
|
4684
|
+
if (!Constructor.prototype[methodName]) {
|
|
4685
|
+
Constructor.prototype[methodName] = null;
|
|
4686
|
+
}
|
|
4562
4687
|
}
|
|
4688
|
+
|
|
4689
|
+
return Constructor;
|
|
4563
4690
|
}
|
|
4564
4691
|
|
|
4565
|
-
return
|
|
4692
|
+
return createClass;
|
|
4566
4693
|
}
|
|
4567
4694
|
|
|
4568
|
-
module.exports =
|
|
4569
|
-
|
|
4695
|
+
module.exports = factory;
|
|
4696
|
+
|
|
4697
|
+
},{"47":47,"48":48,"50":50,"51":51}],44:[function(_dereq_,module,exports){
|
|
4570
4698
|
'use strict';
|
|
4571
4699
|
|
|
4572
4700
|
/**
|
|
@@ -4580,7 +4708,7 @@ module.exports = update;
|
|
|
4580
4708
|
* @typechecks
|
|
4581
4709
|
*/
|
|
4582
4710
|
|
|
4583
|
-
var invariant = _dereq_(
|
|
4711
|
+
var invariant = _dereq_(48);
|
|
4584
4712
|
|
|
4585
4713
|
/**
|
|
4586
4714
|
* The CSSCore module specifies the API (and implements most of the methods)
|
|
@@ -4688,7 +4816,7 @@ var CSSCore = {
|
|
|
4688
4816
|
};
|
|
4689
4817
|
|
|
4690
4818
|
module.exports = CSSCore;
|
|
4691
|
-
},{"
|
|
4819
|
+
},{"48":48}],45:[function(_dereq_,module,exports){
|
|
4692
4820
|
/**
|
|
4693
4821
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
4694
4822
|
* All rights reserved.
|
|
@@ -4724,7 +4852,7 @@ var ExecutionEnvironment = {
|
|
|
4724
4852
|
};
|
|
4725
4853
|
|
|
4726
4854
|
module.exports = ExecutionEnvironment;
|
|
4727
|
-
},{}],
|
|
4855
|
+
},{}],46:[function(_dereq_,module,exports){
|
|
4728
4856
|
"use strict";
|
|
4729
4857
|
|
|
4730
4858
|
/**
|
|
@@ -4763,7 +4891,7 @@ emptyFunction.thatReturnsArgument = function (arg) {
|
|
|
4763
4891
|
};
|
|
4764
4892
|
|
|
4765
4893
|
module.exports = emptyFunction;
|
|
4766
|
-
},{}],
|
|
4894
|
+
},{}],47:[function(_dereq_,module,exports){
|
|
4767
4895
|
/**
|
|
4768
4896
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
4769
4897
|
* All rights reserved.
|
|
@@ -4783,7 +4911,7 @@ if ("development" !== 'production') {
|
|
|
4783
4911
|
}
|
|
4784
4912
|
|
|
4785
4913
|
module.exports = emptyObject;
|
|
4786
|
-
},{}],
|
|
4914
|
+
},{}],48:[function(_dereq_,module,exports){
|
|
4787
4915
|
/**
|
|
4788
4916
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
4789
4917
|
* All rights reserved.
|
|
@@ -4839,7 +4967,7 @@ function invariant(condition, format, a, b, c, d, e, f) {
|
|
|
4839
4967
|
}
|
|
4840
4968
|
|
|
4841
4969
|
module.exports = invariant;
|
|
4842
|
-
},{}],
|
|
4970
|
+
},{}],49:[function(_dereq_,module,exports){
|
|
4843
4971
|
/**
|
|
4844
4972
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
4845
4973
|
* All rights reserved.
|
|
@@ -4907,7 +5035,7 @@ function shallowEqual(objA, objB) {
|
|
|
4907
5035
|
}
|
|
4908
5036
|
|
|
4909
5037
|
module.exports = shallowEqual;
|
|
4910
|
-
},{}],
|
|
5038
|
+
},{}],50:[function(_dereq_,module,exports){
|
|
4911
5039
|
/**
|
|
4912
5040
|
* Copyright 2014-2015, Facebook, Inc.
|
|
4913
5041
|
* All rights reserved.
|
|
@@ -4920,7 +5048,7 @@ module.exports = shallowEqual;
|
|
|
4920
5048
|
|
|
4921
5049
|
'use strict';
|
|
4922
5050
|
|
|
4923
|
-
var emptyFunction = _dereq_(
|
|
5051
|
+
var emptyFunction = _dereq_(46);
|
|
4924
5052
|
|
|
4925
5053
|
/**
|
|
4926
5054
|
* Similar to invariant but only logs a warning if the condition is not met.
|
|
@@ -4974,7 +5102,7 @@ if ("development" !== 'production') {
|
|
|
4974
5102
|
}
|
|
4975
5103
|
|
|
4976
5104
|
module.exports = warning;
|
|
4977
|
-
},{"
|
|
5105
|
+
},{"46":46}],51:[function(_dereq_,module,exports){
|
|
4978
5106
|
/*
|
|
4979
5107
|
object-assign
|
|
4980
5108
|
(c) Sindre Sorhus
|
|
@@ -5066,7 +5194,7 @@ module.exports = shouldUseNative() ? Object.assign : function (target, source) {
|
|
|
5066
5194
|
return to;
|
|
5067
5195
|
};
|
|
5068
5196
|
|
|
5069
|
-
},{}],
|
|
5197
|
+
},{}],52:[function(_dereq_,module,exports){
|
|
5070
5198
|
/**
|
|
5071
5199
|
* Copyright 2013-present, Facebook, Inc.
|
|
5072
5200
|
* All rights reserved.
|
|
@@ -5078,12 +5206,12 @@ module.exports = shouldUseNative() ? Object.assign : function (target, source) {
|
|
|
5078
5206
|
|
|
5079
5207
|
'use strict';
|
|
5080
5208
|
|
|
5081
|
-
|
|
5082
|
-
var
|
|
5083
|
-
|
|
5084
|
-
var ReactPropTypesSecret = _dereq_(
|
|
5085
|
-
|
|
5086
|
-
|
|
5209
|
+
if ("development" !== 'production') {
|
|
5210
|
+
var invariant = _dereq_(48);
|
|
5211
|
+
var warning = _dereq_(50);
|
|
5212
|
+
var ReactPropTypesSecret = _dereq_(55);
|
|
5213
|
+
var loggedTypeFailures = {};
|
|
5214
|
+
}
|
|
5087
5215
|
|
|
5088
5216
|
/**
|
|
5089
5217
|
* Assert that the values match with the type specs.
|
|
@@ -5112,7 +5240,7 @@ function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
|
|
|
5112
5240
|
} catch (ex) {
|
|
5113
5241
|
error = ex;
|
|
5114
5242
|
}
|
|
5115
|
-
|
|
5243
|
+
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);
|
|
5116
5244
|
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
|
5117
5245
|
// Only monitor this failure once because there tends to be a lot of the
|
|
5118
5246
|
// same error.
|
|
@@ -5120,7 +5248,7 @@ function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
|
|
|
5120
5248
|
|
|
5121
5249
|
var stack = getStack ? getStack() : '';
|
|
5122
5250
|
|
|
5123
|
-
|
|
5251
|
+
warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '');
|
|
5124
5252
|
}
|
|
5125
5253
|
}
|
|
5126
5254
|
}
|
|
@@ -5129,7 +5257,30 @@ function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
|
|
|
5129
5257
|
|
|
5130
5258
|
module.exports = checkPropTypes;
|
|
5131
5259
|
|
|
5132
|
-
},{"
|
|
5260
|
+
},{"48":48,"50":50,"55":55}],53:[function(_dereq_,module,exports){
|
|
5261
|
+
/**
|
|
5262
|
+
* Copyright 2013-present, Facebook, Inc.
|
|
5263
|
+
* All rights reserved.
|
|
5264
|
+
*
|
|
5265
|
+
* This source code is licensed under the BSD-style license found in the
|
|
5266
|
+
* LICENSE file in the root directory of this source tree. An additional grant
|
|
5267
|
+
* of patent rights can be found in the PATENTS file in the same directory.
|
|
5268
|
+
*/
|
|
5269
|
+
|
|
5270
|
+
'use strict';
|
|
5271
|
+
|
|
5272
|
+
// React 15.5 references this module, and assumes PropTypes are still callable in production.
|
|
5273
|
+
// Therefore we re-export development-only version with all the PropTypes checks here.
|
|
5274
|
+
// However if one is migrating to the `prop-types` npm library, they will go through the
|
|
5275
|
+
// `index.js` entry point, and it will branch depending on the environment.
|
|
5276
|
+
var factory = _dereq_(54);
|
|
5277
|
+
module.exports = function(isValidElement) {
|
|
5278
|
+
// It is still allowed in 15.5.
|
|
5279
|
+
var throwOnDirectAccess = false;
|
|
5280
|
+
return factory(isValidElement, throwOnDirectAccess);
|
|
5281
|
+
};
|
|
5282
|
+
|
|
5283
|
+
},{"54":54}],54:[function(_dereq_,module,exports){
|
|
5133
5284
|
/**
|
|
5134
5285
|
* Copyright 2013-present, Facebook, Inc.
|
|
5135
5286
|
* All rights reserved.
|
|
@@ -5141,14 +5292,14 @@ module.exports = checkPropTypes;
|
|
|
5141
5292
|
|
|
5142
5293
|
'use strict';
|
|
5143
5294
|
|
|
5144
|
-
var emptyFunction = _dereq_(
|
|
5145
|
-
var invariant = _dereq_(
|
|
5146
|
-
var warning = _dereq_(
|
|
5295
|
+
var emptyFunction = _dereq_(46);
|
|
5296
|
+
var invariant = _dereq_(48);
|
|
5297
|
+
var warning = _dereq_(50);
|
|
5147
5298
|
|
|
5148
|
-
var ReactPropTypesSecret = _dereq_(
|
|
5149
|
-
var checkPropTypes = _dereq_(
|
|
5299
|
+
var ReactPropTypesSecret = _dereq_(55);
|
|
5300
|
+
var checkPropTypes = _dereq_(52);
|
|
5150
5301
|
|
|
5151
|
-
module.exports = function
|
|
5302
|
+
module.exports = function(isValidElement, throwOnDirectAccess) {
|
|
5152
5303
|
/* global Symbol */
|
|
5153
5304
|
var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
|
5154
5305
|
var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
|
|
@@ -5223,58 +5374,27 @@ module.exports = function (isValidElement) {
|
|
|
5223
5374
|
|
|
5224
5375
|
var ANONYMOUS = '<<anonymous>>';
|
|
5225
5376
|
|
|
5226
|
-
|
|
5227
|
-
|
|
5228
|
-
|
|
5229
|
-
|
|
5230
|
-
|
|
5231
|
-
|
|
5232
|
-
|
|
5233
|
-
|
|
5234
|
-
|
|
5235
|
-
|
|
5236
|
-
|
|
5237
|
-
|
|
5238
|
-
|
|
5239
|
-
|
|
5240
|
-
|
|
5241
|
-
|
|
5242
|
-
|
|
5243
|
-
|
|
5244
|
-
|
|
5245
|
-
|
|
5246
|
-
|
|
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
|
-
}
|
|
5377
|
+
// Important!
|
|
5378
|
+
// Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
|
|
5379
|
+
var ReactPropTypes = {
|
|
5380
|
+
array: createPrimitiveTypeChecker('array'),
|
|
5381
|
+
bool: createPrimitiveTypeChecker('boolean'),
|
|
5382
|
+
func: createPrimitiveTypeChecker('function'),
|
|
5383
|
+
number: createPrimitiveTypeChecker('number'),
|
|
5384
|
+
object: createPrimitiveTypeChecker('object'),
|
|
5385
|
+
string: createPrimitiveTypeChecker('string'),
|
|
5386
|
+
symbol: createPrimitiveTypeChecker('symbol'),
|
|
5387
|
+
|
|
5388
|
+
any: createAnyTypeChecker(),
|
|
5389
|
+
arrayOf: createArrayOfTypeChecker,
|
|
5390
|
+
element: createElementTypeChecker(),
|
|
5391
|
+
instanceOf: createInstanceTypeChecker,
|
|
5392
|
+
node: createNodeChecker(),
|
|
5393
|
+
objectOf: createObjectOfTypeChecker,
|
|
5394
|
+
oneOf: createEnumTypeChecker,
|
|
5395
|
+
oneOfType: createUnionTypeChecker,
|
|
5396
|
+
shape: createShapeTypeChecker
|
|
5397
|
+
};
|
|
5278
5398
|
|
|
5279
5399
|
/**
|
|
5280
5400
|
* inlined Object.is polyfill to avoid requiring consumers ship their own
|
|
@@ -5315,11 +5435,30 @@ module.exports = function (isValidElement) {
|
|
|
5315
5435
|
function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
|
|
5316
5436
|
componentName = componentName || ANONYMOUS;
|
|
5317
5437
|
propFullName = propFullName || propName;
|
|
5318
|
-
|
|
5319
|
-
|
|
5438
|
+
|
|
5439
|
+
if (secret !== ReactPropTypesSecret) {
|
|
5440
|
+
if (throwOnDirectAccess) {
|
|
5441
|
+
// New behavior only for users of `prop-types` package
|
|
5442
|
+
invariant(
|
|
5443
|
+
false,
|
|
5444
|
+
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
|
5445
|
+
'Use `PropTypes.checkPropTypes()` to call them. ' +
|
|
5446
|
+
'Read more at http://fb.me/use-check-prop-types'
|
|
5447
|
+
);
|
|
5448
|
+
} else if ("development" !== 'production' && typeof console !== 'undefined') {
|
|
5449
|
+
// Old behavior for people using React.PropTypes
|
|
5320
5450
|
var cacheKey = componentName + ':' + propName;
|
|
5321
5451
|
if (!manualPropTypeCallCache[cacheKey]) {
|
|
5322
|
-
|
|
5452
|
+
warning(
|
|
5453
|
+
false,
|
|
5454
|
+
'You are manually calling a React.PropTypes validation ' +
|
|
5455
|
+
'function for the `%s` prop on `%s`. This is deprecated ' +
|
|
5456
|
+
'and will throw in the standalone `prop-types` package. ' +
|
|
5457
|
+
'You may be seeing this warning due to a third-party PropTypes ' +
|
|
5458
|
+
'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.',
|
|
5459
|
+
propFullName,
|
|
5460
|
+
componentName
|
|
5461
|
+
);
|
|
5323
5462
|
manualPropTypeCallCache[cacheKey] = true;
|
|
5324
5463
|
}
|
|
5325
5464
|
}
|
|
@@ -5615,7 +5754,7 @@ module.exports = function (isValidElement) {
|
|
|
5615
5754
|
return ReactPropTypes;
|
|
5616
5755
|
};
|
|
5617
5756
|
|
|
5618
|
-
},{"
|
|
5757
|
+
},{"46":46,"48":48,"50":50,"52":52,"55":55}],55:[function(_dereq_,module,exports){
|
|
5619
5758
|
/**
|
|
5620
5759
|
* Copyright 2013-present, Facebook, Inc.
|
|
5621
5760
|
* All rights reserved.
|
|
@@ -5631,5 +5770,5 @@ var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
|
|
5631
5770
|
|
|
5632
5771
|
module.exports = ReactPropTypesSecret;
|
|
5633
5772
|
|
|
5634
|
-
},{}]},{},[
|
|
5773
|
+
},{}]},{},[30])(30)
|
|
5635
5774
|
});
|