react 15.5.4 → 15.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +16 -26
- package/dist/react-with-addons.js +1647 -1416
- package/dist/react-with-addons.min.js +6 -8
- package/dist/react.js +1737 -1456
- package/dist/react.min.js +5 -7
- package/lib/KeyEscapeUtils.js +3 -5
- package/lib/LinkedStateMixin.js +3 -5
- package/lib/PooledClass.js +3 -5
- package/lib/React.js +48 -22
- package/lib/ReactAddonsDOMDependencies.js +3 -5
- package/lib/ReactAddonsDOMDependenciesUMDShim.js +3 -5
- package/lib/{ReactComponent.js → ReactBaseClasses.js} +32 -9
- package/lib/ReactCSSTransitionGroup.js +4 -6
- package/lib/ReactCSSTransitionGroupChild.js +3 -5
- package/lib/ReactChildren.js +3 -5
- package/lib/ReactComponentTreeDevtool.js +3 -5
- package/lib/ReactComponentTreeHook.js +52 -9
- package/lib/ReactComponentTreeHookUMDShim.js +3 -5
- package/lib/ReactComponentWithPureRenderMixin.js +3 -5
- package/lib/ReactCurrentOwner.js +3 -7
- package/lib/ReactCurrentOwnerUMDShim.js +3 -5
- package/lib/ReactDOMFactories.js +3 -6
- package/lib/ReactElement.js +3 -5
- package/lib/ReactElementSymbol.js +3 -5
- package/lib/ReactElementType.js +3 -5
- package/lib/ReactElementValidator.js +9 -9
- package/lib/ReactFragment.js +3 -5
- package/lib/ReactLink.js +4 -27
- package/lib/ReactNoopUpdateQueue.js +3 -6
- package/lib/ReactPropTypeLocationNames.js +3 -5
- package/lib/ReactPropTypeLocations.js +3 -5
- package/lib/ReactPropTypes.js +3 -5
- package/lib/ReactPropTypesSecret.js +3 -5
- package/lib/ReactStateSetters.js +3 -5
- package/lib/ReactTransitionChildMapping.js +3 -5
- package/lib/ReactTransitionEvents.js +3 -5
- package/lib/ReactTransitionGroup.js +7 -6
- package/lib/ReactUMDEntry.js +3 -5
- package/lib/ReactUMDShim.js +3 -5
- package/lib/ReactVersion.js +4 -6
- package/lib/ReactWithAddons.js +3 -5
- package/lib/ReactWithAddonsUMDEntry.js +3 -5
- package/lib/canDefineProperty.js +3 -5
- package/lib/checkReactTypeSpec.js +3 -5
- package/lib/createClass.js +20 -0
- package/lib/deprecated.js +6 -8
- package/lib/flattenChildren.js +3 -5
- package/lib/getIteratorFn.js +3 -5
- package/lib/getNextDebugID.js +3 -5
- package/lib/getNextDebugIDUMDShim.js +3 -5
- package/lib/lowPriorityWarning.js +62 -0
- package/lib/onlyChild.js +3 -5
- package/lib/reactProdInvariant.js +2 -4
- package/lib/shallowCompare.js +3 -5
- package/lib/sliceChildren.js +3 -5
- package/lib/traverseAllChildren.js +4 -6
- package/lib/update.js +3 -5
- package/package.json +4 -4
- package/PATENTS +0 -33
- package/lib/ReactClass.js +0 -722
- package/lib/ReactPureComponent.js +0 -41
package/LICENSE
CHANGED
|
@@ -1,31 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
For React software
|
|
1
|
+
MIT License
|
|
4
2
|
|
|
5
3
|
Copyright (c) 2013-present, Facebook, Inc.
|
|
6
|
-
All rights reserved.
|
|
7
|
-
|
|
8
|
-
Redistribution and use in source and binary forms, with or without modification,
|
|
9
|
-
are permitted provided that the following conditions are met:
|
|
10
|
-
|
|
11
|
-
* Redistributions of source code must retain the above copyright notice, this
|
|
12
|
-
list of conditions and the following disclaimer.
|
|
13
4
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
17
11
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
prior written permission.
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
21
14
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
30
|
-
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
31
|
-
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* React (with addons) v15.
|
|
2
|
+
* React (with addons) v15.6.2
|
|
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
|
/**
|
|
6
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
7
|
-
* All rights reserved.
|
|
6
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
8
7
|
*
|
|
9
|
-
* This source code is licensed under the
|
|
10
|
-
* LICENSE file in the root directory of this source tree.
|
|
11
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
8
|
+
* This source code is licensed under the MIT license found in the
|
|
9
|
+
* LICENSE file in the root directory of this source tree.
|
|
12
10
|
*
|
|
13
11
|
*/
|
|
14
12
|
|
|
15
13
|
'use strict';
|
|
16
14
|
|
|
17
|
-
var ExecutionEnvironment = _dereq_(
|
|
15
|
+
var ExecutionEnvironment = _dereq_(45);
|
|
18
16
|
|
|
19
17
|
/**
|
|
20
18
|
* Generate a mapping of standard vendor prefixes using the defined style property and event name.
|
|
@@ -102,14 +100,12 @@ function getVendorPrefixedEventName(eventName) {
|
|
|
102
100
|
}
|
|
103
101
|
|
|
104
102
|
module.exports = getVendorPrefixedEventName;
|
|
105
|
-
},{"
|
|
103
|
+
},{"45":45}],2:[function(_dereq_,module,exports){
|
|
106
104
|
/**
|
|
107
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
108
|
-
* All rights reserved.
|
|
105
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
109
106
|
*
|
|
110
|
-
* This source code is licensed under the
|
|
111
|
-
* LICENSE file in the root directory of this source tree.
|
|
112
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
107
|
+
* This source code is licensed under the MIT license found in the
|
|
108
|
+
* LICENSE file in the root directory of this source tree.
|
|
113
109
|
*
|
|
114
110
|
*
|
|
115
111
|
*/
|
|
@@ -163,19 +159,17 @@ var KeyEscapeUtils = {
|
|
|
163
159
|
module.exports = KeyEscapeUtils;
|
|
164
160
|
},{}],3:[function(_dereq_,module,exports){
|
|
165
161
|
/**
|
|
166
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
167
|
-
* All rights reserved.
|
|
162
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
168
163
|
*
|
|
169
|
-
* This source code is licensed under the
|
|
170
|
-
* LICENSE file in the root directory of this source tree.
|
|
171
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
164
|
+
* This source code is licensed under the MIT license found in the
|
|
165
|
+
* LICENSE file in the root directory of this source tree.
|
|
172
166
|
*
|
|
173
167
|
*/
|
|
174
168
|
|
|
175
169
|
'use strict';
|
|
176
170
|
|
|
177
|
-
var ReactLink = _dereq_(
|
|
178
|
-
var ReactStateSetters = _dereq_(
|
|
171
|
+
var ReactLink = _dereq_(19);
|
|
172
|
+
var ReactStateSetters = _dereq_(24);
|
|
179
173
|
|
|
180
174
|
/**
|
|
181
175
|
* A simple mixin around ReactLink.forState().
|
|
@@ -196,14 +190,12 @@ var LinkedStateMixin = {
|
|
|
196
190
|
};
|
|
197
191
|
|
|
198
192
|
module.exports = LinkedStateMixin;
|
|
199
|
-
},{"
|
|
193
|
+
},{"19":19,"24":24}],4:[function(_dereq_,module,exports){
|
|
200
194
|
/**
|
|
201
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
202
|
-
* All rights reserved.
|
|
195
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
203
196
|
*
|
|
204
|
-
* This source code is licensed under the
|
|
205
|
-
* LICENSE file in the root directory of this source tree.
|
|
206
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
197
|
+
* This source code is licensed under the MIT license found in the
|
|
198
|
+
* LICENSE file in the root directory of this source tree.
|
|
207
199
|
*
|
|
208
200
|
*
|
|
209
201
|
*/
|
|
@@ -212,7 +204,7 @@ module.exports = LinkedStateMixin;
|
|
|
212
204
|
|
|
213
205
|
var _prodInvariant = _dereq_(39);
|
|
214
206
|
|
|
215
|
-
var invariant = _dereq_(
|
|
207
|
+
var invariant = _dereq_(48);
|
|
216
208
|
|
|
217
209
|
/**
|
|
218
210
|
* Static poolers. Several custom versions for each potential number of
|
|
@@ -308,40 +300,37 @@ var PooledClass = {
|
|
|
308
300
|
};
|
|
309
301
|
|
|
310
302
|
module.exports = PooledClass;
|
|
311
|
-
},{"39":39,"
|
|
303
|
+
},{"39":39,"48":48}],5:[function(_dereq_,module,exports){
|
|
312
304
|
/**
|
|
313
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
314
|
-
* All rights reserved.
|
|
305
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
315
306
|
*
|
|
316
|
-
* This source code is licensed under the
|
|
317
|
-
* LICENSE file in the root directory of this source tree.
|
|
318
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
307
|
+
* This source code is licensed under the MIT license found in the
|
|
308
|
+
* LICENSE file in the root directory of this source tree.
|
|
319
309
|
*
|
|
320
310
|
*/
|
|
321
311
|
|
|
322
312
|
'use strict';
|
|
323
313
|
|
|
324
|
-
var _assign = _dereq_(
|
|
314
|
+
var _assign = _dereq_(51);
|
|
325
315
|
|
|
326
|
-
var
|
|
327
|
-
var
|
|
328
|
-
var
|
|
329
|
-
var
|
|
330
|
-
var
|
|
331
|
-
var
|
|
332
|
-
var ReactPropTypes = _dereq_(23);
|
|
333
|
-
var ReactVersion = _dereq_(30);
|
|
316
|
+
var ReactBaseClasses = _dereq_(7);
|
|
317
|
+
var ReactChildren = _dereq_(10);
|
|
318
|
+
var ReactDOMFactories = _dereq_(14);
|
|
319
|
+
var ReactElement = _dereq_(15);
|
|
320
|
+
var ReactPropTypes = _dereq_(22);
|
|
321
|
+
var ReactVersion = _dereq_(28);
|
|
334
322
|
|
|
323
|
+
var createReactClass = _dereq_(33);
|
|
335
324
|
var onlyChild = _dereq_(38);
|
|
336
|
-
var warning = _dereq_(49);
|
|
337
325
|
|
|
338
326
|
var createElement = ReactElement.createElement;
|
|
339
327
|
var createFactory = ReactElement.createFactory;
|
|
340
328
|
var cloneElement = ReactElement.cloneElement;
|
|
341
329
|
|
|
342
330
|
if ("development" !== 'production') {
|
|
343
|
-
var
|
|
344
|
-
var
|
|
331
|
+
var lowPriorityWarning = _dereq_(37);
|
|
332
|
+
var canDefineProperty = _dereq_(31);
|
|
333
|
+
var ReactElementValidator = _dereq_(17);
|
|
345
334
|
var didWarnPropTypesDeprecated = false;
|
|
346
335
|
createElement = ReactElementValidator.createElement;
|
|
347
336
|
createFactory = ReactElementValidator.createFactory;
|
|
@@ -349,18 +338,27 @@ if ("development" !== 'production') {
|
|
|
349
338
|
}
|
|
350
339
|
|
|
351
340
|
var __spread = _assign;
|
|
341
|
+
var createMixin = function (mixin) {
|
|
342
|
+
return mixin;
|
|
343
|
+
};
|
|
352
344
|
|
|
353
345
|
if ("development" !== 'production') {
|
|
354
|
-
var
|
|
346
|
+
var warnedForSpread = false;
|
|
347
|
+
var warnedForCreateMixin = false;
|
|
355
348
|
__spread = function () {
|
|
356
|
-
|
|
357
|
-
|
|
349
|
+
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.');
|
|
350
|
+
warnedForSpread = true;
|
|
358
351
|
return _assign.apply(null, arguments);
|
|
359
352
|
};
|
|
353
|
+
|
|
354
|
+
createMixin = function (mixin) {
|
|
355
|
+
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.');
|
|
356
|
+
warnedForCreateMixin = true;
|
|
357
|
+
return mixin;
|
|
358
|
+
};
|
|
360
359
|
}
|
|
361
360
|
|
|
362
361
|
var React = {
|
|
363
|
-
|
|
364
362
|
// Modern
|
|
365
363
|
|
|
366
364
|
Children: {
|
|
@@ -371,8 +369,8 @@ var React = {
|
|
|
371
369
|
only: onlyChild
|
|
372
370
|
},
|
|
373
371
|
|
|
374
|
-
Component:
|
|
375
|
-
PureComponent:
|
|
372
|
+
Component: ReactBaseClasses.Component,
|
|
373
|
+
PureComponent: ReactBaseClasses.PureComponent,
|
|
376
374
|
|
|
377
375
|
createElement: createElement,
|
|
378
376
|
cloneElement: cloneElement,
|
|
@@ -381,12 +379,9 @@ var React = {
|
|
|
381
379
|
// Classic
|
|
382
380
|
|
|
383
381
|
PropTypes: ReactPropTypes,
|
|
384
|
-
createClass:
|
|
382
|
+
createClass: createReactClass,
|
|
385
383
|
createFactory: createFactory,
|
|
386
|
-
createMixin:
|
|
387
|
-
// Currently a noop. Will be used to validate and trace mixins.
|
|
388
|
-
return mixin;
|
|
389
|
-
},
|
|
384
|
+
createMixin: createMixin,
|
|
390
385
|
|
|
391
386
|
// This looks DOM specific but these are actually isomorphic helpers
|
|
392
387
|
// since they are just generating DOM strings.
|
|
@@ -398,28 +393,49 @@ var React = {
|
|
|
398
393
|
__spread: __spread
|
|
399
394
|
};
|
|
400
395
|
|
|
401
|
-
// TODO: Fix tests so that this deprecation warning doesn't cause failures.
|
|
402
396
|
if ("development" !== 'production') {
|
|
397
|
+
var warnedForCreateClass = false;
|
|
403
398
|
if (canDefineProperty) {
|
|
404
399
|
Object.defineProperty(React, 'PropTypes', {
|
|
405
400
|
get: function () {
|
|
406
|
-
|
|
401
|
+
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
402
|
didWarnPropTypesDeprecated = true;
|
|
408
403
|
return ReactPropTypes;
|
|
409
404
|
}
|
|
410
405
|
});
|
|
406
|
+
|
|
407
|
+
Object.defineProperty(React, 'createClass', {
|
|
408
|
+
get: function () {
|
|
409
|
+
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');
|
|
410
|
+
warnedForCreateClass = true;
|
|
411
|
+
return createReactClass;
|
|
412
|
+
}
|
|
413
|
+
});
|
|
411
414
|
}
|
|
415
|
+
|
|
416
|
+
// React.DOM factories are deprecated. Wrap these methods so that
|
|
417
|
+
// invocations of the React.DOM namespace and alert users to switch
|
|
418
|
+
// to the `react-dom-factories` package.
|
|
419
|
+
React.DOM = {};
|
|
420
|
+
var warnedForFactories = false;
|
|
421
|
+
Object.keys(ReactDOMFactories).forEach(function (factory) {
|
|
422
|
+
React.DOM[factory] = function () {
|
|
423
|
+
if (!warnedForFactories) {
|
|
424
|
+
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);
|
|
425
|
+
warnedForFactories = true;
|
|
426
|
+
}
|
|
427
|
+
return ReactDOMFactories[factory].apply(ReactDOMFactories, arguments);
|
|
428
|
+
};
|
|
429
|
+
});
|
|
412
430
|
}
|
|
413
431
|
|
|
414
432
|
module.exports = React;
|
|
415
|
-
},{"10":10,"
|
|
433
|
+
},{"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
434
|
/**
|
|
417
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
418
|
-
* All rights reserved.
|
|
435
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
419
436
|
*
|
|
420
|
-
* This source code is licensed under the
|
|
421
|
-
* LICENSE file in the root directory of this source tree.
|
|
422
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
437
|
+
* This source code is licensed under the MIT license found in the
|
|
438
|
+
* LICENSE file in the root directory of this source tree.
|
|
423
439
|
*
|
|
424
440
|
*/
|
|
425
441
|
|
|
@@ -430,7 +446,7 @@ var ReactDOM;
|
|
|
430
446
|
function getReactDOM() {
|
|
431
447
|
if (!ReactDOM) {
|
|
432
448
|
// This is safe to use because current module only exists in the addons build:
|
|
433
|
-
var ReactWithAddonsUMDEntry = _dereq_(
|
|
449
|
+
var ReactWithAddonsUMDEntry = _dereq_(30);
|
|
434
450
|
// This is injected by the ReactDOM UMD build:
|
|
435
451
|
ReactDOM = ReactWithAddonsUMDEntry.__SECRET_INJECTED_REACT_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
436
452
|
}
|
|
@@ -448,20 +464,159 @@ if ("development" !== 'production') {
|
|
|
448
464
|
return getReactDOM().__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactTestUtils;
|
|
449
465
|
};
|
|
450
466
|
}
|
|
451
|
-
},{"
|
|
467
|
+
},{"30":30}],7:[function(_dereq_,module,exports){
|
|
452
468
|
/**
|
|
453
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
454
|
-
* All rights reserved.
|
|
469
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
455
470
|
*
|
|
456
|
-
* This source code is licensed under the
|
|
457
|
-
* LICENSE file in the root directory of this source tree.
|
|
458
|
-
*
|
|
471
|
+
* This source code is licensed under the MIT license found in the
|
|
472
|
+
* LICENSE file in the root directory of this source tree.
|
|
473
|
+
*
|
|
474
|
+
*/
|
|
475
|
+
|
|
476
|
+
'use strict';
|
|
477
|
+
|
|
478
|
+
var _prodInvariant = _dereq_(39),
|
|
479
|
+
_assign = _dereq_(51);
|
|
480
|
+
|
|
481
|
+
var ReactNoopUpdateQueue = _dereq_(20);
|
|
482
|
+
|
|
483
|
+
var canDefineProperty = _dereq_(31);
|
|
484
|
+
var emptyObject = _dereq_(47);
|
|
485
|
+
var invariant = _dereq_(48);
|
|
486
|
+
var lowPriorityWarning = _dereq_(37);
|
|
487
|
+
|
|
488
|
+
/**
|
|
489
|
+
* Base class helpers for the updating state of a component.
|
|
490
|
+
*/
|
|
491
|
+
function ReactComponent(props, context, updater) {
|
|
492
|
+
this.props = props;
|
|
493
|
+
this.context = context;
|
|
494
|
+
this.refs = emptyObject;
|
|
495
|
+
// We initialize the default updater but the real one gets injected by the
|
|
496
|
+
// renderer.
|
|
497
|
+
this.updater = updater || ReactNoopUpdateQueue;
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
ReactComponent.prototype.isReactComponent = {};
|
|
501
|
+
|
|
502
|
+
/**
|
|
503
|
+
* Sets a subset of the state. Always use this to mutate
|
|
504
|
+
* state. You should treat `this.state` as immutable.
|
|
505
|
+
*
|
|
506
|
+
* There is no guarantee that `this.state` will be immediately updated, so
|
|
507
|
+
* accessing `this.state` after calling this method may return the old value.
|
|
508
|
+
*
|
|
509
|
+
* There is no guarantee that calls to `setState` will run synchronously,
|
|
510
|
+
* as they may eventually be batched together. You can provide an optional
|
|
511
|
+
* callback that will be executed when the call to setState is actually
|
|
512
|
+
* completed.
|
|
513
|
+
*
|
|
514
|
+
* When a function is provided to setState, it will be called at some point in
|
|
515
|
+
* the future (not synchronously). It will be called with the up to date
|
|
516
|
+
* component arguments (state, props, context). These values can be different
|
|
517
|
+
* from this.* because your function may be called after receiveProps but before
|
|
518
|
+
* shouldComponentUpdate, and this new state, props, and context will not yet be
|
|
519
|
+
* assigned to this.
|
|
520
|
+
*
|
|
521
|
+
* @param {object|function} partialState Next partial state or function to
|
|
522
|
+
* produce next partial state to be merged with current state.
|
|
523
|
+
* @param {?function} callback Called after state is updated.
|
|
524
|
+
* @final
|
|
525
|
+
* @protected
|
|
526
|
+
*/
|
|
527
|
+
ReactComponent.prototype.setState = function (partialState, callback) {
|
|
528
|
+
!(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;
|
|
529
|
+
this.updater.enqueueSetState(this, partialState);
|
|
530
|
+
if (callback) {
|
|
531
|
+
this.updater.enqueueCallback(this, callback, 'setState');
|
|
532
|
+
}
|
|
533
|
+
};
|
|
534
|
+
|
|
535
|
+
/**
|
|
536
|
+
* Forces an update. This should only be invoked when it is known with
|
|
537
|
+
* certainty that we are **not** in a DOM transaction.
|
|
538
|
+
*
|
|
539
|
+
* You may want to call this when you know that some deeper aspect of the
|
|
540
|
+
* component's state has changed but `setState` was not called.
|
|
541
|
+
*
|
|
542
|
+
* This will not invoke `shouldComponentUpdate`, but it will invoke
|
|
543
|
+
* `componentWillUpdate` and `componentDidUpdate`.
|
|
544
|
+
*
|
|
545
|
+
* @param {?function} callback Called after update is complete.
|
|
546
|
+
* @final
|
|
547
|
+
* @protected
|
|
548
|
+
*/
|
|
549
|
+
ReactComponent.prototype.forceUpdate = function (callback) {
|
|
550
|
+
this.updater.enqueueForceUpdate(this);
|
|
551
|
+
if (callback) {
|
|
552
|
+
this.updater.enqueueCallback(this, callback, 'forceUpdate');
|
|
553
|
+
}
|
|
554
|
+
};
|
|
555
|
+
|
|
556
|
+
/**
|
|
557
|
+
* Deprecated APIs. These APIs used to exist on classic React classes but since
|
|
558
|
+
* we would like to deprecate them, we're not going to move them over to this
|
|
559
|
+
* modern base class. Instead, we define a getter that warns if it's accessed.
|
|
560
|
+
*/
|
|
561
|
+
if ("development" !== 'production') {
|
|
562
|
+
var deprecatedAPIs = {
|
|
563
|
+
isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],
|
|
564
|
+
replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']
|
|
565
|
+
};
|
|
566
|
+
var defineDeprecationWarning = function (methodName, info) {
|
|
567
|
+
if (canDefineProperty) {
|
|
568
|
+
Object.defineProperty(ReactComponent.prototype, methodName, {
|
|
569
|
+
get: function () {
|
|
570
|
+
lowPriorityWarning(false, '%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);
|
|
571
|
+
return undefined;
|
|
572
|
+
}
|
|
573
|
+
});
|
|
574
|
+
}
|
|
575
|
+
};
|
|
576
|
+
for (var fnName in deprecatedAPIs) {
|
|
577
|
+
if (deprecatedAPIs.hasOwnProperty(fnName)) {
|
|
578
|
+
defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
/**
|
|
584
|
+
* Base class helpers for the updating state of a component.
|
|
585
|
+
*/
|
|
586
|
+
function ReactPureComponent(props, context, updater) {
|
|
587
|
+
// Duplicated from ReactComponent.
|
|
588
|
+
this.props = props;
|
|
589
|
+
this.context = context;
|
|
590
|
+
this.refs = emptyObject;
|
|
591
|
+
// We initialize the default updater but the real one gets injected by the
|
|
592
|
+
// renderer.
|
|
593
|
+
this.updater = updater || ReactNoopUpdateQueue;
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
function ComponentDummy() {}
|
|
597
|
+
ComponentDummy.prototype = ReactComponent.prototype;
|
|
598
|
+
ReactPureComponent.prototype = new ComponentDummy();
|
|
599
|
+
ReactPureComponent.prototype.constructor = ReactPureComponent;
|
|
600
|
+
// Avoid an extra prototype jump for these methods.
|
|
601
|
+
_assign(ReactPureComponent.prototype, ReactComponent.prototype);
|
|
602
|
+
ReactPureComponent.prototype.isPureReactComponent = true;
|
|
603
|
+
|
|
604
|
+
module.exports = {
|
|
605
|
+
Component: ReactComponent,
|
|
606
|
+
PureComponent: ReactPureComponent
|
|
607
|
+
};
|
|
608
|
+
},{"20":20,"31":31,"37":37,"39":39,"47":47,"48":48,"51":51}],8:[function(_dereq_,module,exports){
|
|
609
|
+
/**
|
|
610
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
611
|
+
*
|
|
612
|
+
* This source code is licensed under the MIT license found in the
|
|
613
|
+
* LICENSE file in the root directory of this source tree.
|
|
459
614
|
*
|
|
460
615
|
*/
|
|
461
616
|
|
|
462
617
|
'use strict';
|
|
463
618
|
|
|
464
|
-
var _assign = _dereq_(
|
|
619
|
+
var _assign = _dereq_(51);
|
|
465
620
|
|
|
466
621
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
467
622
|
|
|
@@ -470,11 +625,11 @@ function _possibleConstructorReturn(self, call) { if (!self) { throw new Referen
|
|
|
470
625
|
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
626
|
|
|
472
627
|
var React = _dereq_(5);
|
|
473
|
-
var propTypesFactory = _dereq_(
|
|
628
|
+
var propTypesFactory = _dereq_(53);
|
|
474
629
|
var PropTypes = propTypesFactory(React.isValidElement);
|
|
475
630
|
|
|
476
|
-
var ReactTransitionGroup = _dereq_(
|
|
477
|
-
var ReactCSSTransitionGroupChild = _dereq_(
|
|
631
|
+
var ReactTransitionGroup = _dereq_(27);
|
|
632
|
+
var ReactCSSTransitionGroupChild = _dereq_(9);
|
|
478
633
|
|
|
479
634
|
function createTransitionTimeoutPropValidator(transitionType) {
|
|
480
635
|
var timeoutPropName = 'transition' + transitionType + 'Timeout';
|
|
@@ -485,7 +640,7 @@ function createTransitionTimeoutPropValidator(transitionType) {
|
|
|
485
640
|
if (props[enabledPropName]) {
|
|
486
641
|
// If no timeout duration is provided
|
|
487
642
|
if (props[timeoutPropName] == null) {
|
|
488
|
-
return new Error(timeoutPropName +
|
|
643
|
+
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
644
|
|
|
490
645
|
// If the duration isn't a number
|
|
491
646
|
} else if (typeof props[timeoutPropName] !== 'number') {
|
|
@@ -555,14 +710,12 @@ ReactCSSTransitionGroup.defaultProps = {
|
|
|
555
710
|
|
|
556
711
|
|
|
557
712
|
module.exports = ReactCSSTransitionGroup;
|
|
558
|
-
},{"
|
|
713
|
+
},{"27":27,"5":5,"51":51,"53":53,"9":9}],9:[function(_dereq_,module,exports){
|
|
559
714
|
/**
|
|
560
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
561
|
-
* All rights reserved.
|
|
715
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
562
716
|
*
|
|
563
|
-
* This source code is licensed under the
|
|
564
|
-
* LICENSE file in the root directory of this source tree.
|
|
565
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
717
|
+
* This source code is licensed under the MIT license found in the
|
|
718
|
+
* LICENSE file in the root directory of this source tree.
|
|
566
719
|
*
|
|
567
720
|
*/
|
|
568
721
|
|
|
@@ -577,11 +730,11 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
|
|
|
577
730
|
var React = _dereq_(5);
|
|
578
731
|
var ReactAddonsDOMDependencies = _dereq_(6);
|
|
579
732
|
|
|
580
|
-
var propTypesFactory = _dereq_(
|
|
733
|
+
var propTypesFactory = _dereq_(53);
|
|
581
734
|
var PropTypes = propTypesFactory(React.isValidElement);
|
|
582
735
|
|
|
583
|
-
var CSSCore = _dereq_(
|
|
584
|
-
var ReactTransitionEvents = _dereq_(
|
|
736
|
+
var CSSCore = _dereq_(44);
|
|
737
|
+
var ReactTransitionEvents = _dereq_(26);
|
|
585
738
|
|
|
586
739
|
var onlyChild = _dereq_(38);
|
|
587
740
|
|
|
@@ -740,23 +893,21 @@ ReactCSSTransitionGroupChild.propTypes = {
|
|
|
740
893
|
|
|
741
894
|
|
|
742
895
|
module.exports = ReactCSSTransitionGroupChild;
|
|
743
|
-
},{"
|
|
896
|
+
},{"26":26,"38":38,"44":44,"5":5,"53":53,"6":6}],10:[function(_dereq_,module,exports){
|
|
744
897
|
/**
|
|
745
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
746
|
-
* All rights reserved.
|
|
898
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
747
899
|
*
|
|
748
|
-
* This source code is licensed under the
|
|
749
|
-
* LICENSE file in the root directory of this source tree.
|
|
750
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
900
|
+
* This source code is licensed under the MIT license found in the
|
|
901
|
+
* LICENSE file in the root directory of this source tree.
|
|
751
902
|
*
|
|
752
903
|
*/
|
|
753
904
|
|
|
754
905
|
'use strict';
|
|
755
906
|
|
|
756
907
|
var PooledClass = _dereq_(4);
|
|
757
|
-
var ReactElement = _dereq_(
|
|
908
|
+
var ReactElement = _dereq_(15);
|
|
758
909
|
|
|
759
|
-
var emptyFunction = _dereq_(
|
|
910
|
+
var emptyFunction = _dereq_(46);
|
|
760
911
|
var traverseAllChildren = _dereq_(41);
|
|
761
912
|
|
|
762
913
|
var twoArgumentPooler = PooledClass.twoArgumentPooler;
|
|
@@ -931,910 +1082,67 @@ var ReactChildren = {
|
|
|
931
1082
|
};
|
|
932
1083
|
|
|
933
1084
|
module.exports = ReactChildren;
|
|
934
|
-
},{"
|
|
1085
|
+
},{"15":15,"4":4,"41":41,"46":46}],11:[function(_dereq_,module,exports){
|
|
935
1086
|
/**
|
|
936
|
-
* Copyright
|
|
937
|
-
* All rights reserved.
|
|
1087
|
+
* Copyright (c) 2016-present, Facebook, Inc.
|
|
938
1088
|
*
|
|
939
|
-
* This source code is licensed under the
|
|
940
|
-
* LICENSE file in the root directory of this source tree.
|
|
941
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
1089
|
+
* This source code is licensed under the MIT license found in the
|
|
1090
|
+
* LICENSE file in the root directory of this source tree.
|
|
942
1091
|
*
|
|
1092
|
+
*
|
|
943
1093
|
*/
|
|
944
1094
|
|
|
945
1095
|
'use strict';
|
|
946
1096
|
|
|
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);
|
|
1097
|
+
var _prodInvariant = _dereq_(39);
|
|
954
1098
|
|
|
955
|
-
var
|
|
956
|
-
var invariant = _dereq_(47);
|
|
957
|
-
var warning = _dereq_(49);
|
|
1099
|
+
var ReactCurrentOwner = _dereq_(13);
|
|
958
1100
|
|
|
959
|
-
var
|
|
1101
|
+
var invariant = _dereq_(48);
|
|
1102
|
+
var warning = _dereq_(50);
|
|
960
1103
|
|
|
961
|
-
|
|
962
|
-
//
|
|
963
|
-
|
|
964
|
-
|
|
1104
|
+
function isNative(fn) {
|
|
1105
|
+
// Based on isNative() from Lodash
|
|
1106
|
+
var funcToString = Function.prototype.toString;
|
|
1107
|
+
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
1108
|
+
var reIsNative = RegExp('^' + funcToString
|
|
1109
|
+
// Take an example native function source for comparison
|
|
1110
|
+
.call(hasOwnProperty
|
|
1111
|
+
// Strip regex characters so we can use it for regex
|
|
1112
|
+
).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&'
|
|
1113
|
+
// Remove hasOwnProperty from the template to make it generic
|
|
1114
|
+
).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$');
|
|
1115
|
+
try {
|
|
1116
|
+
var source = funcToString.call(fn);
|
|
1117
|
+
return reIsNative.test(source);
|
|
1118
|
+
} catch (err) {
|
|
1119
|
+
return false;
|
|
1120
|
+
}
|
|
965
1121
|
}
|
|
966
1122
|
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
1123
|
+
var canUseCollections =
|
|
1124
|
+
// Array.from
|
|
1125
|
+
typeof Array.from === 'function' &&
|
|
1126
|
+
// Map
|
|
1127
|
+
typeof Map === 'function' && isNative(Map) &&
|
|
1128
|
+
// Map.prototype.keys
|
|
1129
|
+
Map.prototype != null && typeof Map.prototype.keys === 'function' && isNative(Map.prototype.keys) &&
|
|
1130
|
+
// Set
|
|
1131
|
+
typeof Set === 'function' && isNative(Set) &&
|
|
1132
|
+
// Set.prototype.keys
|
|
1133
|
+
Set.prototype != null && typeof Set.prototype.keys === 'function' && isNative(Set.prototype.keys);
|
|
970
1134
|
|
|
1135
|
+
var setItem;
|
|
1136
|
+
var getItem;
|
|
1137
|
+
var removeItem;
|
|
1138
|
+
var getItemIDs;
|
|
1139
|
+
var addRoot;
|
|
1140
|
+
var removeRoot;
|
|
1141
|
+
var getRootIDs;
|
|
971
1142
|
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
* Composite components are higher-level components that compose other composite
|
|
976
|
-
* or host components.
|
|
977
|
-
*
|
|
978
|
-
* To create a new type of `ReactClass`, pass a specification of
|
|
979
|
-
* your new class to `React.createClass`. The only requirement of your class
|
|
980
|
-
* specification is that you implement a `render` method.
|
|
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 = {
|
|
997
|
-
|
|
998
|
-
/**
|
|
999
|
-
* An array of Mixin objects to include when defining your component.
|
|
1000
|
-
*
|
|
1001
|
-
* @type {array}
|
|
1002
|
-
* @optional
|
|
1003
|
-
*/
|
|
1004
|
-
mixins: 'DEFINE_MANY',
|
|
1005
|
-
|
|
1006
|
-
/**
|
|
1007
|
-
* An object containing properties and methods that should be defined on
|
|
1008
|
-
* the component's constructor instead of its prototype (static methods).
|
|
1009
|
-
*
|
|
1010
|
-
* @type {object}
|
|
1011
|
-
* @optional
|
|
1012
|
-
*/
|
|
1013
|
-
statics: 'DEFINE_MANY',
|
|
1014
|
-
|
|
1015
|
-
/**
|
|
1016
|
-
* Definition of prop types for this component.
|
|
1017
|
-
*
|
|
1018
|
-
* @type {object}
|
|
1019
|
-
* @optional
|
|
1020
|
-
*/
|
|
1021
|
-
propTypes: 'DEFINE_MANY',
|
|
1022
|
-
|
|
1023
|
-
/**
|
|
1024
|
-
* Definition of context types for this component.
|
|
1025
|
-
*
|
|
1026
|
-
* @type {object}
|
|
1027
|
-
* @optional
|
|
1028
|
-
*/
|
|
1029
|
-
contextTypes: 'DEFINE_MANY',
|
|
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();
|
|
1143
|
+
if (canUseCollections) {
|
|
1144
|
+
var itemMap = new Map();
|
|
1145
|
+
var rootIDSet = new Set();
|
|
1838
1146
|
|
|
1839
1147
|
setItem = function (id, item) {
|
|
1840
1148
|
itemMap.set(id, item);
|
|
@@ -2101,19 +1409,62 @@ var ReactComponentTreeHook = {
|
|
|
2101
1409
|
},
|
|
2102
1410
|
|
|
2103
1411
|
|
|
2104
|
-
getRootIDs: getRootIDs,
|
|
2105
|
-
getRegisteredIDs: getItemIDs
|
|
1412
|
+
getRootIDs: getRootIDs,
|
|
1413
|
+
getRegisteredIDs: getItemIDs,
|
|
1414
|
+
|
|
1415
|
+
pushNonStandardWarningStack: function (isCreatingElement, currentSource) {
|
|
1416
|
+
if (typeof console.reactStack !== 'function') {
|
|
1417
|
+
return;
|
|
1418
|
+
}
|
|
1419
|
+
|
|
1420
|
+
var stack = [];
|
|
1421
|
+
var currentOwner = ReactCurrentOwner.current;
|
|
1422
|
+
var id = currentOwner && currentOwner._debugID;
|
|
1423
|
+
|
|
1424
|
+
try {
|
|
1425
|
+
if (isCreatingElement) {
|
|
1426
|
+
stack.push({
|
|
1427
|
+
name: id ? ReactComponentTreeHook.getDisplayName(id) : null,
|
|
1428
|
+
fileName: currentSource ? currentSource.fileName : null,
|
|
1429
|
+
lineNumber: currentSource ? currentSource.lineNumber : null
|
|
1430
|
+
});
|
|
1431
|
+
}
|
|
1432
|
+
|
|
1433
|
+
while (id) {
|
|
1434
|
+
var element = ReactComponentTreeHook.getElement(id);
|
|
1435
|
+
var parentID = ReactComponentTreeHook.getParentID(id);
|
|
1436
|
+
var ownerID = ReactComponentTreeHook.getOwnerID(id);
|
|
1437
|
+
var ownerName = ownerID ? ReactComponentTreeHook.getDisplayName(ownerID) : null;
|
|
1438
|
+
var source = element && element._source;
|
|
1439
|
+
stack.push({
|
|
1440
|
+
name: ownerName,
|
|
1441
|
+
fileName: source ? source.fileName : null,
|
|
1442
|
+
lineNumber: source ? source.lineNumber : null
|
|
1443
|
+
});
|
|
1444
|
+
id = parentID;
|
|
1445
|
+
}
|
|
1446
|
+
} catch (err) {
|
|
1447
|
+
// Internal state is messed up.
|
|
1448
|
+
// Stop building the stack (it's just a nice to have).
|
|
1449
|
+
}
|
|
1450
|
+
|
|
1451
|
+
console.reactStack(stack);
|
|
1452
|
+
},
|
|
1453
|
+
popNonStandardWarningStack: function () {
|
|
1454
|
+
if (typeof console.reactStackEnd !== 'function') {
|
|
1455
|
+
return;
|
|
1456
|
+
}
|
|
1457
|
+
console.reactStackEnd();
|
|
1458
|
+
}
|
|
2106
1459
|
};
|
|
2107
1460
|
|
|
2108
1461
|
module.exports = ReactComponentTreeHook;
|
|
2109
|
-
},{"
|
|
1462
|
+
},{"13":13,"39":39,"48":48,"50":50}],12:[function(_dereq_,module,exports){
|
|
2110
1463
|
/**
|
|
2111
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
2112
|
-
* All rights reserved.
|
|
1464
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
2113
1465
|
*
|
|
2114
|
-
* This source code is licensed under the
|
|
2115
|
-
* LICENSE file in the root directory of this source tree.
|
|
2116
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
1466
|
+
* This source code is licensed under the MIT license found in the
|
|
1467
|
+
* LICENSE file in the root directory of this source tree.
|
|
2117
1468
|
*
|
|
2118
1469
|
*/
|
|
2119
1470
|
|
|
@@ -2154,14 +1505,12 @@ var ReactComponentWithPureRenderMixin = {
|
|
|
2154
1505
|
};
|
|
2155
1506
|
|
|
2156
1507
|
module.exports = ReactComponentWithPureRenderMixin;
|
|
2157
|
-
},{"40":40}],
|
|
1508
|
+
},{"40":40}],13:[function(_dereq_,module,exports){
|
|
2158
1509
|
/**
|
|
2159
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
2160
|
-
* All rights reserved.
|
|
1510
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
2161
1511
|
*
|
|
2162
|
-
* This source code is licensed under the
|
|
2163
|
-
* LICENSE file in the root directory of this source tree.
|
|
2164
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
1512
|
+
* This source code is licensed under the MIT license found in the
|
|
1513
|
+
* LICENSE file in the root directory of this source tree.
|
|
2165
1514
|
*
|
|
2166
1515
|
*
|
|
2167
1516
|
*/
|
|
@@ -2175,30 +1524,26 @@ module.exports = ReactComponentWithPureRenderMixin;
|
|
|
2175
1524
|
* currently being constructed.
|
|
2176
1525
|
*/
|
|
2177
1526
|
var ReactCurrentOwner = {
|
|
2178
|
-
|
|
2179
1527
|
/**
|
|
2180
1528
|
* @internal
|
|
2181
1529
|
* @type {ReactComponent}
|
|
2182
1530
|
*/
|
|
2183
1531
|
current: null
|
|
2184
|
-
|
|
2185
1532
|
};
|
|
2186
1533
|
|
|
2187
1534
|
module.exports = ReactCurrentOwner;
|
|
2188
|
-
},{}],
|
|
1535
|
+
},{}],14:[function(_dereq_,module,exports){
|
|
2189
1536
|
/**
|
|
2190
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
2191
|
-
* All rights reserved.
|
|
1537
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
2192
1538
|
*
|
|
2193
|
-
* This source code is licensed under the
|
|
2194
|
-
* LICENSE file in the root directory of this source tree.
|
|
2195
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
1539
|
+
* This source code is licensed under the MIT license found in the
|
|
1540
|
+
* LICENSE file in the root directory of this source tree.
|
|
2196
1541
|
*
|
|
2197
1542
|
*/
|
|
2198
1543
|
|
|
2199
1544
|
'use strict';
|
|
2200
1545
|
|
|
2201
|
-
var ReactElement = _dereq_(
|
|
1546
|
+
var ReactElement = _dereq_(15);
|
|
2202
1547
|
|
|
2203
1548
|
/**
|
|
2204
1549
|
* Create a factory that creates HTML tag elements.
|
|
@@ -2207,13 +1552,12 @@ var ReactElement = _dereq_(16);
|
|
|
2207
1552
|
*/
|
|
2208
1553
|
var createDOMFactory = ReactElement.createFactory;
|
|
2209
1554
|
if ("development" !== 'production') {
|
|
2210
|
-
var ReactElementValidator = _dereq_(
|
|
1555
|
+
var ReactElementValidator = _dereq_(17);
|
|
2211
1556
|
createDOMFactory = ReactElementValidator.createFactory;
|
|
2212
1557
|
}
|
|
2213
1558
|
|
|
2214
1559
|
/**
|
|
2215
1560
|
* Creates a mapping from supported HTML tags to `ReactDOMComponent` classes.
|
|
2216
|
-
* This is also accessible via `React.DOM`.
|
|
2217
1561
|
*
|
|
2218
1562
|
* @public
|
|
2219
1563
|
*/
|
|
@@ -2355,28 +1699,26 @@ var ReactDOMFactories = {
|
|
|
2355
1699
|
};
|
|
2356
1700
|
|
|
2357
1701
|
module.exports = ReactDOMFactories;
|
|
2358
|
-
},{"
|
|
1702
|
+
},{"15":15,"17":17}],15:[function(_dereq_,module,exports){
|
|
2359
1703
|
/**
|
|
2360
|
-
* Copyright 2014-present, Facebook, Inc.
|
|
2361
|
-
* All rights reserved.
|
|
1704
|
+
* Copyright (c) 2014-present, Facebook, Inc.
|
|
2362
1705
|
*
|
|
2363
|
-
* This source code is licensed under the
|
|
2364
|
-
* LICENSE file in the root directory of this source tree.
|
|
2365
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
1706
|
+
* This source code is licensed under the MIT license found in the
|
|
1707
|
+
* LICENSE file in the root directory of this source tree.
|
|
2366
1708
|
*
|
|
2367
1709
|
*/
|
|
2368
1710
|
|
|
2369
1711
|
'use strict';
|
|
2370
1712
|
|
|
2371
|
-
var _assign = _dereq_(
|
|
1713
|
+
var _assign = _dereq_(51);
|
|
2372
1714
|
|
|
2373
|
-
var ReactCurrentOwner = _dereq_(
|
|
1715
|
+
var ReactCurrentOwner = _dereq_(13);
|
|
2374
1716
|
|
|
2375
|
-
var warning = _dereq_(
|
|
2376
|
-
var canDefineProperty = _dereq_(
|
|
1717
|
+
var warning = _dereq_(50);
|
|
1718
|
+
var canDefineProperty = _dereq_(31);
|
|
2377
1719
|
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
2378
1720
|
|
|
2379
|
-
var REACT_ELEMENT_TYPE = _dereq_(
|
|
1721
|
+
var REACT_ELEMENT_TYPE = _dereq_(16);
|
|
2380
1722
|
|
|
2381
1723
|
var RESERVED_PROPS = {
|
|
2382
1724
|
key: true,
|
|
@@ -2696,14 +2038,12 @@ ReactElement.isValidElement = function (object) {
|
|
|
2696
2038
|
};
|
|
2697
2039
|
|
|
2698
2040
|
module.exports = ReactElement;
|
|
2699
|
-
},{"
|
|
2041
|
+
},{"13":13,"16":16,"31":31,"50":50,"51":51}],16:[function(_dereq_,module,exports){
|
|
2700
2042
|
/**
|
|
2701
|
-
* Copyright 2014-present, Facebook, Inc.
|
|
2702
|
-
* All rights reserved.
|
|
2043
|
+
* Copyright (c) 2014-present, Facebook, Inc.
|
|
2703
2044
|
*
|
|
2704
|
-
* This source code is licensed under the
|
|
2705
|
-
* LICENSE file in the root directory of this source tree.
|
|
2706
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
2045
|
+
* This source code is licensed under the MIT license found in the
|
|
2046
|
+
* LICENSE file in the root directory of this source tree.
|
|
2707
2047
|
*
|
|
2708
2048
|
*
|
|
2709
2049
|
*/
|
|
@@ -2716,14 +2056,12 @@ module.exports = ReactElement;
|
|
|
2716
2056
|
var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7;
|
|
2717
2057
|
|
|
2718
2058
|
module.exports = REACT_ELEMENT_TYPE;
|
|
2719
|
-
},{}],
|
|
2059
|
+
},{}],17:[function(_dereq_,module,exports){
|
|
2720
2060
|
/**
|
|
2721
|
-
* Copyright 2014-present, Facebook, Inc.
|
|
2722
|
-
* All rights reserved.
|
|
2061
|
+
* Copyright (c) 2014-present, Facebook, Inc.
|
|
2723
2062
|
*
|
|
2724
|
-
* This source code is licensed under the
|
|
2725
|
-
* LICENSE file in the root directory of this source tree.
|
|
2726
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
2063
|
+
* This source code is licensed under the MIT license found in the
|
|
2064
|
+
* LICENSE file in the root directory of this source tree.
|
|
2727
2065
|
*
|
|
2728
2066
|
*/
|
|
2729
2067
|
|
|
@@ -2736,15 +2074,16 @@ module.exports = REACT_ELEMENT_TYPE;
|
|
|
2736
2074
|
|
|
2737
2075
|
'use strict';
|
|
2738
2076
|
|
|
2739
|
-
var ReactCurrentOwner = _dereq_(
|
|
2740
|
-
var ReactComponentTreeHook = _dereq_(
|
|
2741
|
-
var ReactElement = _dereq_(
|
|
2077
|
+
var ReactCurrentOwner = _dereq_(13);
|
|
2078
|
+
var ReactComponentTreeHook = _dereq_(11);
|
|
2079
|
+
var ReactElement = _dereq_(15);
|
|
2742
2080
|
|
|
2743
|
-
var checkReactTypeSpec = _dereq_(
|
|
2081
|
+
var checkReactTypeSpec = _dereq_(32);
|
|
2744
2082
|
|
|
2745
|
-
var canDefineProperty = _dereq_(
|
|
2746
|
-
var getIteratorFn = _dereq_(
|
|
2747
|
-
var warning = _dereq_(
|
|
2083
|
+
var canDefineProperty = _dereq_(31);
|
|
2084
|
+
var getIteratorFn = _dereq_(35);
|
|
2085
|
+
var warning = _dereq_(50);
|
|
2086
|
+
var lowPriorityWarning = _dereq_(37);
|
|
2748
2087
|
|
|
2749
2088
|
function getDeclarationErrorAddendum() {
|
|
2750
2089
|
if (ReactCurrentOwner.current) {
|
|
@@ -2885,7 +2224,6 @@ function validatePropTypes(element) {
|
|
|
2885
2224
|
}
|
|
2886
2225
|
|
|
2887
2226
|
var ReactElementValidator = {
|
|
2888
|
-
|
|
2889
2227
|
createElement: function (type, props, children) {
|
|
2890
2228
|
var validType = typeof type === 'string' || typeof type === 'function';
|
|
2891
2229
|
// We warn in this case but don't throw. We expect the element creation to
|
|
@@ -2894,7 +2232,7 @@ var ReactElementValidator = {
|
|
|
2894
2232
|
if (typeof type !== 'function' && typeof type !== 'string') {
|
|
2895
2233
|
var info = '';
|
|
2896
2234
|
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 ' +
|
|
2235
|
+
info += ' You likely forgot to export your component from the file ' + "it's defined in.";
|
|
2898
2236
|
}
|
|
2899
2237
|
|
|
2900
2238
|
var sourceInfo = getSourceInfoErrorAddendum(props);
|
|
@@ -2906,7 +2244,10 @@ var ReactElementValidator = {
|
|
|
2906
2244
|
|
|
2907
2245
|
info += ReactComponentTreeHook.getCurrentStackAddendum();
|
|
2908
2246
|
|
|
2247
|
+
var currentSource = props !== null && props !== undefined && props.__source !== undefined ? props.__source : null;
|
|
2248
|
+
ReactComponentTreeHook.pushNonStandardWarningStack(true, currentSource);
|
|
2909
2249
|
"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;
|
|
2250
|
+
ReactComponentTreeHook.popNonStandardWarningStack();
|
|
2910
2251
|
}
|
|
2911
2252
|
}
|
|
2912
2253
|
|
|
@@ -2944,7 +2285,7 @@ var ReactElementValidator = {
|
|
|
2944
2285
|
Object.defineProperty(validatedFactory, 'type', {
|
|
2945
2286
|
enumerable: false,
|
|
2946
2287
|
get: function () {
|
|
2947
|
-
|
|
2288
|
+
lowPriorityWarning(false, 'Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');
|
|
2948
2289
|
Object.defineProperty(this, 'type', {
|
|
2949
2290
|
value: type
|
|
2950
2291
|
});
|
|
@@ -2965,18 +2306,15 @@ var ReactElementValidator = {
|
|
|
2965
2306
|
validatePropTypes(newElement);
|
|
2966
2307
|
return newElement;
|
|
2967
2308
|
}
|
|
2968
|
-
|
|
2969
2309
|
};
|
|
2970
2310
|
|
|
2971
2311
|
module.exports = ReactElementValidator;
|
|
2972
|
-
},{"
|
|
2312
|
+
},{"11":11,"13":13,"15":15,"31":31,"32":32,"35":35,"37":37,"50":50}],18:[function(_dereq_,module,exports){
|
|
2973
2313
|
/**
|
|
2974
|
-
* Copyright 2015-present, Facebook, Inc.
|
|
2975
|
-
* All rights reserved.
|
|
2314
|
+
* Copyright (c) 2015-present, Facebook, Inc.
|
|
2976
2315
|
*
|
|
2977
|
-
* This source code is licensed under the
|
|
2978
|
-
* LICENSE file in the root directory of this source tree.
|
|
2979
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
2316
|
+
* This source code is licensed under the MIT license found in the
|
|
2317
|
+
* LICENSE file in the root directory of this source tree.
|
|
2980
2318
|
*
|
|
2981
2319
|
*/
|
|
2982
2320
|
|
|
@@ -2984,12 +2322,12 @@ module.exports = ReactElementValidator;
|
|
|
2984
2322
|
|
|
2985
2323
|
var _prodInvariant = _dereq_(39);
|
|
2986
2324
|
|
|
2987
|
-
var ReactChildren = _dereq_(
|
|
2988
|
-
var ReactElement = _dereq_(
|
|
2325
|
+
var ReactChildren = _dereq_(10);
|
|
2326
|
+
var ReactElement = _dereq_(15);
|
|
2989
2327
|
|
|
2990
|
-
var emptyFunction = _dereq_(
|
|
2991
|
-
var invariant = _dereq_(
|
|
2992
|
-
var warning = _dereq_(
|
|
2328
|
+
var emptyFunction = _dereq_(46);
|
|
2329
|
+
var invariant = _dereq_(48);
|
|
2330
|
+
var warning = _dereq_(50);
|
|
2993
2331
|
|
|
2994
2332
|
/**
|
|
2995
2333
|
* We used to allow keyed objects to serve as a collection of ReactElements,
|
|
@@ -3038,14 +2376,12 @@ var ReactFragment = {
|
|
|
3038
2376
|
};
|
|
3039
2377
|
|
|
3040
2378
|
module.exports = ReactFragment;
|
|
3041
|
-
},{"
|
|
2379
|
+
},{"10":10,"15":15,"39":39,"46":46,"48":48,"50":50}],19:[function(_dereq_,module,exports){
|
|
3042
2380
|
/**
|
|
3043
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
3044
|
-
* All rights reserved.
|
|
2381
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
3045
2382
|
*
|
|
3046
|
-
* This source code is licensed under the
|
|
3047
|
-
* LICENSE file in the root directory of this source tree.
|
|
3048
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
2383
|
+
* This source code is licensed under the MIT license found in the
|
|
2384
|
+
* LICENSE file in the root directory of this source tree.
|
|
3049
2385
|
*
|
|
3050
2386
|
*/
|
|
3051
2387
|
|
|
@@ -3074,8 +2410,6 @@ module.exports = ReactFragment;
|
|
|
3074
2410
|
* consumption of ReactLink easier; see LinkedValueUtils and LinkedStateMixin.
|
|
3075
2411
|
*/
|
|
3076
2412
|
|
|
3077
|
-
var React = _dereq_(5);
|
|
3078
|
-
|
|
3079
2413
|
/**
|
|
3080
2414
|
* Deprecated: An an easy way to express two-way binding with React.
|
|
3081
2415
|
* See https://facebook.github.io/react/docs/two-way-binding-helpers.html
|
|
@@ -3083,46 +2417,25 @@ var React = _dereq_(5);
|
|
|
3083
2417
|
* @param {*} value current value of the link
|
|
3084
2418
|
* @param {function} requestChange callback to request a change
|
|
3085
2419
|
*/
|
|
2420
|
+
|
|
3086
2421
|
function ReactLink(value, requestChange) {
|
|
3087
2422
|
this.value = value;
|
|
3088
2423
|
this.requestChange = requestChange;
|
|
3089
2424
|
}
|
|
3090
2425
|
|
|
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
2426
|
module.exports = ReactLink;
|
|
3112
|
-
},{
|
|
2427
|
+
},{}],20:[function(_dereq_,module,exports){
|
|
3113
2428
|
/**
|
|
3114
|
-
* Copyright 2015-present, Facebook, Inc.
|
|
3115
|
-
* All rights reserved.
|
|
2429
|
+
* Copyright (c) 2015-present, Facebook, Inc.
|
|
3116
2430
|
*
|
|
3117
|
-
* This source code is licensed under the
|
|
3118
|
-
* LICENSE file in the root directory of this source tree.
|
|
3119
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
2431
|
+
* This source code is licensed under the MIT license found in the
|
|
2432
|
+
* LICENSE file in the root directory of this source tree.
|
|
3120
2433
|
*
|
|
3121
2434
|
*/
|
|
3122
2435
|
|
|
3123
2436
|
'use strict';
|
|
3124
2437
|
|
|
3125
|
-
var warning = _dereq_(
|
|
2438
|
+
var warning = _dereq_(50);
|
|
3126
2439
|
|
|
3127
2440
|
function warnNoop(publicInstance, callerName) {
|
|
3128
2441
|
if ("development" !== 'production') {
|
|
@@ -3135,7 +2448,6 @@ function warnNoop(publicInstance, callerName) {
|
|
|
3135
2448
|
* This is the abstract API for an update queue.
|
|
3136
2449
|
*/
|
|
3137
2450
|
var ReactNoopUpdateQueue = {
|
|
3138
|
-
|
|
3139
2451
|
/**
|
|
3140
2452
|
* Checks whether or not this composite component is mounted.
|
|
3141
2453
|
* @param {ReactClass} publicInstance The instance we want to test.
|
|
@@ -3205,14 +2517,12 @@ var ReactNoopUpdateQueue = {
|
|
|
3205
2517
|
};
|
|
3206
2518
|
|
|
3207
2519
|
module.exports = ReactNoopUpdateQueue;
|
|
3208
|
-
},{"
|
|
2520
|
+
},{"50":50}],21:[function(_dereq_,module,exports){
|
|
3209
2521
|
/**
|
|
3210
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
3211
|
-
* All rights reserved.
|
|
2522
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
3212
2523
|
*
|
|
3213
|
-
* This source code is licensed under the
|
|
3214
|
-
* LICENSE file in the root directory of this source tree.
|
|
3215
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
2524
|
+
* This source code is licensed under the MIT license found in the
|
|
2525
|
+
* LICENSE file in the root directory of this source tree.
|
|
3216
2526
|
*
|
|
3217
2527
|
*
|
|
3218
2528
|
*/
|
|
@@ -3230,33 +2540,29 @@ if ("development" !== 'production') {
|
|
|
3230
2540
|
}
|
|
3231
2541
|
|
|
3232
2542
|
module.exports = ReactPropTypeLocationNames;
|
|
3233
|
-
},{}],
|
|
2543
|
+
},{}],22:[function(_dereq_,module,exports){
|
|
3234
2544
|
/**
|
|
3235
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
3236
|
-
* All rights reserved.
|
|
2545
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
3237
2546
|
*
|
|
3238
|
-
* This source code is licensed under the
|
|
3239
|
-
* LICENSE file in the root directory of this source tree.
|
|
3240
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
2547
|
+
* This source code is licensed under the MIT license found in the
|
|
2548
|
+
* LICENSE file in the root directory of this source tree.
|
|
3241
2549
|
*
|
|
3242
2550
|
*/
|
|
3243
2551
|
|
|
3244
2552
|
'use strict';
|
|
3245
2553
|
|
|
3246
|
-
var _require = _dereq_(
|
|
2554
|
+
var _require = _dereq_(15),
|
|
3247
2555
|
isValidElement = _require.isValidElement;
|
|
3248
2556
|
|
|
3249
|
-
var factory = _dereq_(
|
|
2557
|
+
var factory = _dereq_(53);
|
|
3250
2558
|
|
|
3251
2559
|
module.exports = factory(isValidElement);
|
|
3252
|
-
},{"
|
|
2560
|
+
},{"15":15,"53":53}],23:[function(_dereq_,module,exports){
|
|
3253
2561
|
/**
|
|
3254
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
3255
|
-
* All rights reserved.
|
|
2562
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
3256
2563
|
*
|
|
3257
|
-
* This source code is licensed under the
|
|
3258
|
-
* LICENSE file in the root directory of this source tree.
|
|
3259
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
2564
|
+
* This source code is licensed under the MIT license found in the
|
|
2565
|
+
* LICENSE file in the root directory of this source tree.
|
|
3260
2566
|
*
|
|
3261
2567
|
*
|
|
3262
2568
|
*/
|
|
@@ -3266,56 +2572,12 @@ module.exports = factory(isValidElement);
|
|
|
3266
2572
|
var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
|
3267
2573
|
|
|
3268
2574
|
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){
|
|
2575
|
+
},{}],24:[function(_dereq_,module,exports){
|
|
3312
2576
|
/**
|
|
3313
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
3314
|
-
* All rights reserved.
|
|
2577
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
3315
2578
|
*
|
|
3316
|
-
* This source code is licensed under the
|
|
3317
|
-
* LICENSE file in the root directory of this source tree.
|
|
3318
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
2579
|
+
* This source code is licensed under the MIT license found in the
|
|
2580
|
+
* LICENSE file in the root directory of this source tree.
|
|
3319
2581
|
*
|
|
3320
2582
|
*/
|
|
3321
2583
|
|
|
@@ -3412,20 +2674,18 @@ ReactStateSetters.Mixin = {
|
|
|
3412
2674
|
};
|
|
3413
2675
|
|
|
3414
2676
|
module.exports = ReactStateSetters;
|
|
3415
|
-
},{}],
|
|
2677
|
+
},{}],25:[function(_dereq_,module,exports){
|
|
3416
2678
|
/**
|
|
3417
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
3418
|
-
* All rights reserved.
|
|
2679
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
3419
2680
|
*
|
|
3420
|
-
* This source code is licensed under the
|
|
3421
|
-
* LICENSE file in the root directory of this source tree.
|
|
3422
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
2681
|
+
* This source code is licensed under the MIT license found in the
|
|
2682
|
+
* LICENSE file in the root directory of this source tree.
|
|
3423
2683
|
*
|
|
3424
2684
|
*/
|
|
3425
2685
|
|
|
3426
2686
|
'use strict';
|
|
3427
2687
|
|
|
3428
|
-
var flattenChildren = _dereq_(
|
|
2688
|
+
var flattenChildren = _dereq_(34);
|
|
3429
2689
|
|
|
3430
2690
|
var ReactTransitionChildMapping = {
|
|
3431
2691
|
/**
|
|
@@ -3515,20 +2775,18 @@ var ReactTransitionChildMapping = {
|
|
|
3515
2775
|
};
|
|
3516
2776
|
|
|
3517
2777
|
module.exports = ReactTransitionChildMapping;
|
|
3518
|
-
},{"
|
|
2778
|
+
},{"34":34}],26:[function(_dereq_,module,exports){
|
|
3519
2779
|
/**
|
|
3520
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
3521
|
-
* All rights reserved.
|
|
2780
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
3522
2781
|
*
|
|
3523
|
-
* This source code is licensed under the
|
|
3524
|
-
* LICENSE file in the root directory of this source tree.
|
|
3525
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
2782
|
+
* This source code is licensed under the MIT license found in the
|
|
2783
|
+
* LICENSE file in the root directory of this source tree.
|
|
3526
2784
|
*
|
|
3527
2785
|
*/
|
|
3528
2786
|
|
|
3529
2787
|
'use strict';
|
|
3530
2788
|
|
|
3531
|
-
var ExecutionEnvironment = _dereq_(
|
|
2789
|
+
var ExecutionEnvironment = _dereq_(45);
|
|
3532
2790
|
|
|
3533
2791
|
var getVendorPrefixedEventName = _dereq_(1);
|
|
3534
2792
|
|
|
@@ -3588,20 +2846,18 @@ var ReactTransitionEvents = {
|
|
|
3588
2846
|
};
|
|
3589
2847
|
|
|
3590
2848
|
module.exports = ReactTransitionEvents;
|
|
3591
|
-
},{"1":1,"
|
|
2849
|
+
},{"1":1,"45":45}],27:[function(_dereq_,module,exports){
|
|
3592
2850
|
/**
|
|
3593
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
3594
|
-
* All rights reserved.
|
|
2851
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
3595
2852
|
*
|
|
3596
|
-
* This source code is licensed under the
|
|
3597
|
-
* LICENSE file in the root directory of this source tree.
|
|
3598
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
2853
|
+
* This source code is licensed under the MIT license found in the
|
|
2854
|
+
* LICENSE file in the root directory of this source tree.
|
|
3599
2855
|
*
|
|
3600
2856
|
*/
|
|
3601
2857
|
|
|
3602
2858
|
'use strict';
|
|
3603
2859
|
|
|
3604
|
-
var _assign = _dereq_(
|
|
2860
|
+
var _assign = _dereq_(51);
|
|
3605
2861
|
|
|
3606
2862
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
3607
2863
|
|
|
@@ -3610,12 +2866,12 @@ function _possibleConstructorReturn(self, call) { if (!self) { throw new Referen
|
|
|
3610
2866
|
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
2867
|
|
|
3612
2868
|
var React = _dereq_(5);
|
|
3613
|
-
var ReactTransitionChildMapping = _dereq_(
|
|
2869
|
+
var ReactTransitionChildMapping = _dereq_(25);
|
|
3614
2870
|
|
|
3615
|
-
var propTypesFactory = _dereq_(
|
|
2871
|
+
var propTypesFactory = _dereq_(53);
|
|
3616
2872
|
var PropTypes = propTypesFactory(React.isValidElement);
|
|
3617
2873
|
|
|
3618
|
-
var emptyFunction = _dereq_(
|
|
2874
|
+
var emptyFunction = _dereq_(46);
|
|
3619
2875
|
|
|
3620
2876
|
/**
|
|
3621
2877
|
* A basis for animations. When children are declaratively added or removed,
|
|
@@ -3786,7 +3042,10 @@ var ReactTransitionGroup = function (_React$Component) {
|
|
|
3786
3042
|
// already been removed. In case you need this behavior you can provide
|
|
3787
3043
|
// a childFactory function to wrap every child, even the ones that are
|
|
3788
3044
|
// leaving.
|
|
3789
|
-
childrenToRender.push(React.cloneElement(this.props.childFactory(child), {
|
|
3045
|
+
childrenToRender.push(React.cloneElement(this.props.childFactory(child), {
|
|
3046
|
+
ref: key,
|
|
3047
|
+
key: key
|
|
3048
|
+
}));
|
|
3790
3049
|
}
|
|
3791
3050
|
}
|
|
3792
3051
|
|
|
@@ -3820,28 +3079,24 @@ ReactTransitionGroup.defaultProps = {
|
|
|
3820
3079
|
|
|
3821
3080
|
|
|
3822
3081
|
module.exports = ReactTransitionGroup;
|
|
3823
|
-
},{"
|
|
3082
|
+
},{"25":25,"46":46,"5":5,"51":51,"53":53}],28:[function(_dereq_,module,exports){
|
|
3824
3083
|
/**
|
|
3825
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
3826
|
-
* All rights reserved.
|
|
3084
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
3827
3085
|
*
|
|
3828
|
-
* This source code is licensed under the
|
|
3829
|
-
* LICENSE file in the root directory of this source tree.
|
|
3830
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
3086
|
+
* This source code is licensed under the MIT license found in the
|
|
3087
|
+
* LICENSE file in the root directory of this source tree.
|
|
3831
3088
|
*
|
|
3832
3089
|
*/
|
|
3833
3090
|
|
|
3834
3091
|
'use strict';
|
|
3835
3092
|
|
|
3836
|
-
module.exports = '15.
|
|
3837
|
-
},{}],
|
|
3093
|
+
module.exports = '15.6.2';
|
|
3094
|
+
},{}],29:[function(_dereq_,module,exports){
|
|
3838
3095
|
/**
|
|
3839
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
3840
|
-
* All rights reserved.
|
|
3096
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
3841
3097
|
*
|
|
3842
|
-
* This source code is licensed under the
|
|
3843
|
-
* LICENSE file in the root directory of this source tree.
|
|
3844
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
3098
|
+
* This source code is licensed under the MIT license found in the
|
|
3099
|
+
* LICENSE file in the root directory of this source tree.
|
|
3845
3100
|
*
|
|
3846
3101
|
*/
|
|
3847
3102
|
|
|
@@ -3850,10 +3105,10 @@ module.exports = '15.5.4';
|
|
|
3850
3105
|
var LinkedStateMixin = _dereq_(3);
|
|
3851
3106
|
var React = _dereq_(5);
|
|
3852
3107
|
var ReactAddonsDOMDependencies = _dereq_(6);
|
|
3853
|
-
var ReactComponentWithPureRenderMixin = _dereq_(
|
|
3854
|
-
var ReactCSSTransitionGroup = _dereq_(
|
|
3855
|
-
var ReactFragment = _dereq_(
|
|
3856
|
-
var ReactTransitionGroup = _dereq_(
|
|
3108
|
+
var ReactComponentWithPureRenderMixin = _dereq_(12);
|
|
3109
|
+
var ReactCSSTransitionGroup = _dereq_(8);
|
|
3110
|
+
var ReactFragment = _dereq_(18);
|
|
3111
|
+
var ReactTransitionGroup = _dereq_(27);
|
|
3857
3112
|
|
|
3858
3113
|
var shallowCompare = _dereq_(40);
|
|
3859
3114
|
var update = _dereq_(42);
|
|
@@ -3887,48 +3142,44 @@ if ("development" !== 'production') {
|
|
|
3887
3142
|
}
|
|
3888
3143
|
|
|
3889
3144
|
module.exports = React;
|
|
3890
|
-
},{"
|
|
3145
|
+
},{"12":12,"18":18,"27":27,"3":3,"40":40,"42":42,"5":5,"6":6,"8":8}],30:[function(_dereq_,module,exports){
|
|
3891
3146
|
/**
|
|
3892
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
3893
|
-
* All rights reserved.
|
|
3147
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
3894
3148
|
*
|
|
3895
|
-
* This source code is licensed under the
|
|
3896
|
-
* LICENSE file in the root directory of this source tree.
|
|
3897
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
3149
|
+
* This source code is licensed under the MIT license found in the
|
|
3150
|
+
* LICENSE file in the root directory of this source tree.
|
|
3898
3151
|
*
|
|
3899
3152
|
*/
|
|
3900
3153
|
|
|
3901
3154
|
'use strict';
|
|
3902
3155
|
|
|
3903
|
-
var _assign = _dereq_(
|
|
3156
|
+
var _assign = _dereq_(51);
|
|
3904
3157
|
|
|
3905
|
-
var ReactWithAddons = _dereq_(
|
|
3158
|
+
var ReactWithAddons = _dereq_(29);
|
|
3906
3159
|
|
|
3907
3160
|
// `version` will be added here by the React module.
|
|
3908
3161
|
var ReactWithAddonsUMDEntry = _assign(ReactWithAddons, {
|
|
3909
3162
|
__SECRET_INJECTED_REACT_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: null, // Will be injected by ReactDOM UMD build.
|
|
3910
3163
|
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: {
|
|
3911
|
-
ReactCurrentOwner: _dereq_(
|
|
3164
|
+
ReactCurrentOwner: _dereq_(13)
|
|
3912
3165
|
}
|
|
3913
3166
|
});
|
|
3914
3167
|
|
|
3915
3168
|
if ("development" !== 'production') {
|
|
3916
3169
|
_assign(ReactWithAddonsUMDEntry.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, {
|
|
3917
3170
|
// ReactComponentTreeHook should not be included in production.
|
|
3918
|
-
ReactComponentTreeHook: _dereq_(
|
|
3919
|
-
getNextDebugID: _dereq_(
|
|
3171
|
+
ReactComponentTreeHook: _dereq_(11),
|
|
3172
|
+
getNextDebugID: _dereq_(36)
|
|
3920
3173
|
});
|
|
3921
3174
|
}
|
|
3922
3175
|
|
|
3923
3176
|
module.exports = ReactWithAddonsUMDEntry;
|
|
3924
|
-
},{"
|
|
3177
|
+
},{"11":11,"13":13,"29":29,"36":36,"51":51}],31:[function(_dereq_,module,exports){
|
|
3925
3178
|
/**
|
|
3926
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
3927
|
-
* All rights reserved.
|
|
3179
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
3928
3180
|
*
|
|
3929
|
-
* This source code is licensed under the
|
|
3930
|
-
* LICENSE file in the root directory of this source tree.
|
|
3931
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
3181
|
+
* This source code is licensed under the MIT license found in the
|
|
3182
|
+
* LICENSE file in the root directory of this source tree.
|
|
3932
3183
|
*
|
|
3933
3184
|
*
|
|
3934
3185
|
*/
|
|
@@ -3947,15 +3198,13 @@ if ("development" !== 'production') {
|
|
|
3947
3198
|
}
|
|
3948
3199
|
|
|
3949
3200
|
module.exports = canDefineProperty;
|
|
3950
|
-
},{}],
|
|
3201
|
+
},{}],32:[function(_dereq_,module,exports){
|
|
3951
3202
|
(function (process){
|
|
3952
3203
|
/**
|
|
3953
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
3954
|
-
* All rights reserved.
|
|
3204
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
3955
3205
|
*
|
|
3956
|
-
* This source code is licensed under the
|
|
3957
|
-
* LICENSE file in the root directory of this source tree.
|
|
3958
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
3206
|
+
* This source code is licensed under the MIT license found in the
|
|
3207
|
+
* LICENSE file in the root directory of this source tree.
|
|
3959
3208
|
*
|
|
3960
3209
|
*/
|
|
3961
3210
|
|
|
@@ -3963,11 +3212,11 @@ module.exports = canDefineProperty;
|
|
|
3963
3212
|
|
|
3964
3213
|
var _prodInvariant = _dereq_(39);
|
|
3965
3214
|
|
|
3966
|
-
var ReactPropTypeLocationNames = _dereq_(
|
|
3967
|
-
var ReactPropTypesSecret = _dereq_(
|
|
3215
|
+
var ReactPropTypeLocationNames = _dereq_(21);
|
|
3216
|
+
var ReactPropTypesSecret = _dereq_(23);
|
|
3968
3217
|
|
|
3969
|
-
var invariant = _dereq_(
|
|
3970
|
-
var warning = _dereq_(
|
|
3218
|
+
var invariant = _dereq_(48);
|
|
3219
|
+
var warning = _dereq_(50);
|
|
3971
3220
|
|
|
3972
3221
|
var ReactComponentTreeHook;
|
|
3973
3222
|
|
|
@@ -3977,7 +3226,7 @@ if (typeof process !== 'undefined' && process.env && "development" === 'test') {
|
|
|
3977
3226
|
// https://github.com/facebook/react/issues/7240
|
|
3978
3227
|
// Remove the inline requires when we don't need them anymore:
|
|
3979
3228
|
// https://github.com/facebook/react/pull/7178
|
|
3980
|
-
ReactComponentTreeHook = _dereq_(
|
|
3229
|
+
ReactComponentTreeHook = _dereq_(11);
|
|
3981
3230
|
}
|
|
3982
3231
|
|
|
3983
3232
|
var loggedTypeFailures = {};
|
|
@@ -4019,7 +3268,7 @@ function checkReactTypeSpec(typeSpecs, values, location, componentName, element,
|
|
|
4019
3268
|
|
|
4020
3269
|
if ("development" !== 'production') {
|
|
4021
3270
|
if (!ReactComponentTreeHook) {
|
|
4022
|
-
ReactComponentTreeHook = _dereq_(
|
|
3271
|
+
ReactComponentTreeHook = _dereq_(11);
|
|
4023
3272
|
}
|
|
4024
3273
|
if (debugID !== null) {
|
|
4025
3274
|
componentStackInfo = ReactComponentTreeHook.getStackAddendumByID(debugID);
|
|
@@ -4036,15 +3285,34 @@ function checkReactTypeSpec(typeSpecs, values, location, componentName, element,
|
|
|
4036
3285
|
|
|
4037
3286
|
module.exports = checkReactTypeSpec;
|
|
4038
3287
|
}).call(this,undefined)
|
|
4039
|
-
},{"
|
|
3288
|
+
},{"11":11,"21":21,"23":23,"39":39,"48":48,"50":50}],33:[function(_dereq_,module,exports){
|
|
3289
|
+
/**
|
|
3290
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
3291
|
+
*
|
|
3292
|
+
* This source code is licensed under the MIT license found in the
|
|
3293
|
+
* LICENSE file in the root directory of this source tree.
|
|
3294
|
+
*
|
|
3295
|
+
*/
|
|
3296
|
+
|
|
3297
|
+
'use strict';
|
|
3298
|
+
|
|
3299
|
+
var _require = _dereq_(7),
|
|
3300
|
+
Component = _require.Component;
|
|
3301
|
+
|
|
3302
|
+
var _require2 = _dereq_(15),
|
|
3303
|
+
isValidElement = _require2.isValidElement;
|
|
3304
|
+
|
|
3305
|
+
var ReactNoopUpdateQueue = _dereq_(20);
|
|
3306
|
+
var factory = _dereq_(43);
|
|
3307
|
+
|
|
3308
|
+
module.exports = factory(Component, isValidElement, ReactNoopUpdateQueue);
|
|
3309
|
+
},{"15":15,"20":20,"43":43,"7":7}],34:[function(_dereq_,module,exports){
|
|
4040
3310
|
(function (process){
|
|
4041
3311
|
/**
|
|
4042
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
4043
|
-
* All rights reserved.
|
|
3312
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
4044
3313
|
*
|
|
4045
|
-
* This source code is licensed under the
|
|
4046
|
-
* LICENSE file in the root directory of this source tree.
|
|
4047
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
3314
|
+
* This source code is licensed under the MIT license found in the
|
|
3315
|
+
* LICENSE file in the root directory of this source tree.
|
|
4048
3316
|
*
|
|
4049
3317
|
*
|
|
4050
3318
|
*/
|
|
@@ -4053,7 +3321,7 @@ module.exports = checkReactTypeSpec;
|
|
|
4053
3321
|
|
|
4054
3322
|
var KeyEscapeUtils = _dereq_(2);
|
|
4055
3323
|
var traverseAllChildren = _dereq_(41);
|
|
4056
|
-
var warning = _dereq_(
|
|
3324
|
+
var warning = _dereq_(50);
|
|
4057
3325
|
|
|
4058
3326
|
var ReactComponentTreeHook;
|
|
4059
3327
|
|
|
@@ -4063,7 +3331,7 @@ if (typeof process !== 'undefined' && process.env && "development" === 'test') {
|
|
|
4063
3331
|
// https://github.com/facebook/react/issues/7240
|
|
4064
3332
|
// Remove the inline requires when we don't need them anymore:
|
|
4065
3333
|
// https://github.com/facebook/react/pull/7178
|
|
4066
|
-
ReactComponentTreeHook = _dereq_(
|
|
3334
|
+
ReactComponentTreeHook = _dereq_(11);
|
|
4067
3335
|
}
|
|
4068
3336
|
|
|
4069
3337
|
/**
|
|
@@ -4079,7 +3347,7 @@ function flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID
|
|
|
4079
3347
|
var keyUnique = result[name] === undefined;
|
|
4080
3348
|
if ("development" !== 'production') {
|
|
4081
3349
|
if (!ReactComponentTreeHook) {
|
|
4082
|
-
ReactComponentTreeHook = _dereq_(
|
|
3350
|
+
ReactComponentTreeHook = _dereq_(11);
|
|
4083
3351
|
}
|
|
4084
3352
|
if (!keyUnique) {
|
|
4085
3353
|
"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,14 +3382,12 @@ function flattenChildren(children, selfDebugID) {
|
|
|
4114
3382
|
|
|
4115
3383
|
module.exports = flattenChildren;
|
|
4116
3384
|
}).call(this,undefined)
|
|
4117
|
-
},{"
|
|
3385
|
+
},{"11":11,"2":2,"41":41,"50":50}],35:[function(_dereq_,module,exports){
|
|
4118
3386
|
/**
|
|
4119
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
4120
|
-
* All rights reserved.
|
|
3387
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
4121
3388
|
*
|
|
4122
|
-
* This source code is licensed under the
|
|
4123
|
-
* LICENSE file in the root directory of this source tree.
|
|
4124
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
3389
|
+
* This source code is licensed under the MIT license found in the
|
|
3390
|
+
* LICENSE file in the root directory of this source tree.
|
|
4125
3391
|
*
|
|
4126
3392
|
*
|
|
4127
3393
|
*/
|
|
@@ -4155,14 +3421,12 @@ function getIteratorFn(maybeIterable) {
|
|
|
4155
3421
|
}
|
|
4156
3422
|
|
|
4157
3423
|
module.exports = getIteratorFn;
|
|
4158
|
-
},{}],
|
|
3424
|
+
},{}],36:[function(_dereq_,module,exports){
|
|
4159
3425
|
/**
|
|
4160
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
4161
|
-
* All rights reserved.
|
|
3426
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
4162
3427
|
*
|
|
4163
|
-
* This source code is licensed under the
|
|
4164
|
-
* LICENSE file in the root directory of this source tree.
|
|
4165
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
3428
|
+
* This source code is licensed under the MIT license found in the
|
|
3429
|
+
* LICENSE file in the root directory of this source tree.
|
|
4166
3430
|
*
|
|
4167
3431
|
*
|
|
4168
3432
|
*/
|
|
@@ -4176,23 +3440,84 @@ function getNextDebugID() {
|
|
|
4176
3440
|
}
|
|
4177
3441
|
|
|
4178
3442
|
module.exports = getNextDebugID;
|
|
3443
|
+
},{}],37:[function(_dereq_,module,exports){
|
|
3444
|
+
/**
|
|
3445
|
+
* Copyright (c) 2014-present, Facebook, Inc.
|
|
3446
|
+
*
|
|
3447
|
+
* This source code is licensed under the MIT license found in the
|
|
3448
|
+
* LICENSE file in the root directory of this source tree.
|
|
3449
|
+
*
|
|
3450
|
+
*/
|
|
3451
|
+
|
|
3452
|
+
'use strict';
|
|
3453
|
+
|
|
3454
|
+
/**
|
|
3455
|
+
* Forked from fbjs/warning:
|
|
3456
|
+
* https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js
|
|
3457
|
+
*
|
|
3458
|
+
* Only change is we use console.warn instead of console.error,
|
|
3459
|
+
* and do nothing when 'console' is not supported.
|
|
3460
|
+
* This really simplifies the code.
|
|
3461
|
+
* ---
|
|
3462
|
+
* Similar to invariant but only logs a warning if the condition is not met.
|
|
3463
|
+
* This can be used to log issues in development environments in critical
|
|
3464
|
+
* paths. Removing the logging code for production environments will keep the
|
|
3465
|
+
* same logic and follow the same code paths.
|
|
3466
|
+
*/
|
|
3467
|
+
|
|
3468
|
+
var lowPriorityWarning = function () {};
|
|
3469
|
+
|
|
3470
|
+
if ("development" !== 'production') {
|
|
3471
|
+
var printWarning = function (format) {
|
|
3472
|
+
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
3473
|
+
args[_key - 1] = arguments[_key];
|
|
3474
|
+
}
|
|
3475
|
+
|
|
3476
|
+
var argIndex = 0;
|
|
3477
|
+
var message = 'Warning: ' + format.replace(/%s/g, function () {
|
|
3478
|
+
return args[argIndex++];
|
|
3479
|
+
});
|
|
3480
|
+
if (typeof console !== 'undefined') {
|
|
3481
|
+
console.warn(message);
|
|
3482
|
+
}
|
|
3483
|
+
try {
|
|
3484
|
+
// --- Welcome to debugging React ---
|
|
3485
|
+
// This error was thrown as a convenience so that you can use this stack
|
|
3486
|
+
// to find the callsite that caused this warning to fire.
|
|
3487
|
+
throw new Error(message);
|
|
3488
|
+
} catch (x) {}
|
|
3489
|
+
};
|
|
3490
|
+
|
|
3491
|
+
lowPriorityWarning = function (condition, format) {
|
|
3492
|
+
if (format === undefined) {
|
|
3493
|
+
throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
|
|
3494
|
+
}
|
|
3495
|
+
if (!condition) {
|
|
3496
|
+
for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
|
|
3497
|
+
args[_key2 - 2] = arguments[_key2];
|
|
3498
|
+
}
|
|
3499
|
+
|
|
3500
|
+
printWarning.apply(undefined, [format].concat(args));
|
|
3501
|
+
}
|
|
3502
|
+
};
|
|
3503
|
+
}
|
|
3504
|
+
|
|
3505
|
+
module.exports = lowPriorityWarning;
|
|
4179
3506
|
},{}],38:[function(_dereq_,module,exports){
|
|
4180
3507
|
/**
|
|
4181
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
4182
|
-
* All rights reserved.
|
|
3508
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
4183
3509
|
*
|
|
4184
|
-
* This source code is licensed under the
|
|
4185
|
-
* LICENSE file in the root directory of this source tree.
|
|
4186
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
3510
|
+
* This source code is licensed under the MIT license found in the
|
|
3511
|
+
* LICENSE file in the root directory of this source tree.
|
|
4187
3512
|
*
|
|
4188
3513
|
*/
|
|
4189
3514
|
'use strict';
|
|
4190
3515
|
|
|
4191
3516
|
var _prodInvariant = _dereq_(39);
|
|
4192
3517
|
|
|
4193
|
-
var ReactElement = _dereq_(
|
|
3518
|
+
var ReactElement = _dereq_(15);
|
|
4194
3519
|
|
|
4195
|
-
var invariant = _dereq_(
|
|
3520
|
+
var invariant = _dereq_(48);
|
|
4196
3521
|
|
|
4197
3522
|
/**
|
|
4198
3523
|
* Returns the first child in a collection of children and verifies that there
|
|
@@ -4214,14 +3539,12 @@ function onlyChild(children) {
|
|
|
4214
3539
|
}
|
|
4215
3540
|
|
|
4216
3541
|
module.exports = onlyChild;
|
|
4217
|
-
},{"
|
|
3542
|
+
},{"15":15,"39":39,"48":48}],39:[function(_dereq_,module,exports){
|
|
4218
3543
|
/**
|
|
4219
3544
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
4220
|
-
* All rights reserved.
|
|
4221
3545
|
*
|
|
4222
|
-
* This source code is licensed under the
|
|
4223
|
-
* LICENSE file in the root directory of this source tree.
|
|
4224
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
3546
|
+
* This source code is licensed under the MIT license found in the
|
|
3547
|
+
* LICENSE file in the root directory of this source tree.
|
|
4225
3548
|
*
|
|
4226
3549
|
*
|
|
4227
3550
|
*/
|
|
@@ -4255,18 +3578,16 @@ function reactProdInvariant(code) {
|
|
|
4255
3578
|
module.exports = reactProdInvariant;
|
|
4256
3579
|
},{}],40:[function(_dereq_,module,exports){
|
|
4257
3580
|
/**
|
|
4258
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
4259
|
-
* All rights reserved.
|
|
3581
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
4260
3582
|
*
|
|
4261
|
-
* This source code is licensed under the
|
|
4262
|
-
* LICENSE file in the root directory of this source tree.
|
|
4263
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
3583
|
+
* This source code is licensed under the MIT license found in the
|
|
3584
|
+
* LICENSE file in the root directory of this source tree.
|
|
4264
3585
|
*
|
|
4265
3586
|
*/
|
|
4266
3587
|
|
|
4267
3588
|
'use strict';
|
|
4268
3589
|
|
|
4269
|
-
var shallowEqual = _dereq_(
|
|
3590
|
+
var shallowEqual = _dereq_(49);
|
|
4270
3591
|
|
|
4271
3592
|
/**
|
|
4272
3593
|
* Does a shallow comparison for props and state.
|
|
@@ -4278,14 +3599,12 @@ function shallowCompare(instance, nextProps, nextState) {
|
|
|
4278
3599
|
}
|
|
4279
3600
|
|
|
4280
3601
|
module.exports = shallowCompare;
|
|
4281
|
-
},{"
|
|
3602
|
+
},{"49":49}],41:[function(_dereq_,module,exports){
|
|
4282
3603
|
/**
|
|
4283
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
4284
|
-
* All rights reserved.
|
|
3604
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
4285
3605
|
*
|
|
4286
|
-
* This source code is licensed under the
|
|
4287
|
-
* LICENSE file in the root directory of this source tree.
|
|
4288
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
3606
|
+
* This source code is licensed under the MIT license found in the
|
|
3607
|
+
* LICENSE file in the root directory of this source tree.
|
|
4289
3608
|
*
|
|
4290
3609
|
*/
|
|
4291
3610
|
|
|
@@ -4293,13 +3612,13 @@ module.exports = shallowCompare;
|
|
|
4293
3612
|
|
|
4294
3613
|
var _prodInvariant = _dereq_(39);
|
|
4295
3614
|
|
|
4296
|
-
var ReactCurrentOwner = _dereq_(
|
|
4297
|
-
var REACT_ELEMENT_TYPE = _dereq_(
|
|
3615
|
+
var ReactCurrentOwner = _dereq_(13);
|
|
3616
|
+
var REACT_ELEMENT_TYPE = _dereq_(16);
|
|
4298
3617
|
|
|
4299
|
-
var getIteratorFn = _dereq_(
|
|
4300
|
-
var invariant = _dereq_(
|
|
3618
|
+
var getIteratorFn = _dereq_(35);
|
|
3619
|
+
var invariant = _dereq_(48);
|
|
4301
3620
|
var KeyEscapeUtils = _dereq_(2);
|
|
4302
|
-
var warning = _dereq_(
|
|
3621
|
+
var warning = _dereq_(50);
|
|
4303
3622
|
|
|
4304
3623
|
var SEPARATOR = '.';
|
|
4305
3624
|
var SUBSEPARATOR = ':';
|
|
@@ -4412,7 +3731,7 @@ function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext)
|
|
|
4412
3731
|
if ("development" !== 'production') {
|
|
4413
3732
|
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
3733
|
if (children._isReactElement) {
|
|
4415
|
-
addendum =
|
|
3734
|
+
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
3735
|
}
|
|
4417
3736
|
if (ReactCurrentOwner.current) {
|
|
4418
3737
|
var name = ReactCurrentOwner.current.getName();
|
|
@@ -4421,152 +3740,1024 @@ function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext)
|
|
|
4421
3740
|
}
|
|
4422
3741
|
}
|
|
4423
3742
|
}
|
|
4424
|
-
var childrenString = String(children);
|
|
4425
|
-
!false ? "development" !== 'production' ? invariant(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : _prodInvariant('31', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : void 0;
|
|
3743
|
+
var childrenString = String(children);
|
|
3744
|
+
!false ? "development" !== 'production' ? invariant(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : _prodInvariant('31', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : void 0;
|
|
3745
|
+
}
|
|
3746
|
+
}
|
|
3747
|
+
|
|
3748
|
+
return subtreeCount;
|
|
3749
|
+
}
|
|
3750
|
+
|
|
3751
|
+
/**
|
|
3752
|
+
* Traverses children that are typically specified as `props.children`, but
|
|
3753
|
+
* might also be specified through attributes:
|
|
3754
|
+
*
|
|
3755
|
+
* - `traverseAllChildren(this.props.children, ...)`
|
|
3756
|
+
* - `traverseAllChildren(this.props.leftPanelChildren, ...)`
|
|
3757
|
+
*
|
|
3758
|
+
* The `traverseContext` is an optional argument that is passed through the
|
|
3759
|
+
* entire traversal. It can be used to store accumulations or anything else that
|
|
3760
|
+
* the callback might find relevant.
|
|
3761
|
+
*
|
|
3762
|
+
* @param {?*} children Children tree object.
|
|
3763
|
+
* @param {!function} callback To invoke upon traversing each child.
|
|
3764
|
+
* @param {?*} traverseContext Context for traversal.
|
|
3765
|
+
* @return {!number} The number of children in this subtree.
|
|
3766
|
+
*/
|
|
3767
|
+
function traverseAllChildren(children, callback, traverseContext) {
|
|
3768
|
+
if (children == null) {
|
|
3769
|
+
return 0;
|
|
3770
|
+
}
|
|
3771
|
+
|
|
3772
|
+
return traverseAllChildrenImpl(children, '', callback, traverseContext);
|
|
3773
|
+
}
|
|
3774
|
+
|
|
3775
|
+
module.exports = traverseAllChildren;
|
|
3776
|
+
},{"13":13,"16":16,"2":2,"35":35,"39":39,"48":48,"50":50}],42:[function(_dereq_,module,exports){
|
|
3777
|
+
/**
|
|
3778
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
3779
|
+
*
|
|
3780
|
+
* This source code is licensed under the MIT license found in the
|
|
3781
|
+
* LICENSE file in the root directory of this source tree.
|
|
3782
|
+
*
|
|
3783
|
+
*/
|
|
3784
|
+
|
|
3785
|
+
/* global hasOwnProperty:true */
|
|
3786
|
+
|
|
3787
|
+
'use strict';
|
|
3788
|
+
|
|
3789
|
+
var _prodInvariant = _dereq_(39),
|
|
3790
|
+
_assign = _dereq_(51);
|
|
3791
|
+
|
|
3792
|
+
var invariant = _dereq_(48);
|
|
3793
|
+
var hasOwnProperty = {}.hasOwnProperty;
|
|
3794
|
+
|
|
3795
|
+
function shallowCopy(x) {
|
|
3796
|
+
if (Array.isArray(x)) {
|
|
3797
|
+
return x.concat();
|
|
3798
|
+
} else if (x && typeof x === 'object') {
|
|
3799
|
+
return _assign(new x.constructor(), x);
|
|
3800
|
+
} else {
|
|
3801
|
+
return x;
|
|
3802
|
+
}
|
|
3803
|
+
}
|
|
3804
|
+
|
|
3805
|
+
var COMMAND_PUSH = '$push';
|
|
3806
|
+
var COMMAND_UNSHIFT = '$unshift';
|
|
3807
|
+
var COMMAND_SPLICE = '$splice';
|
|
3808
|
+
var COMMAND_SET = '$set';
|
|
3809
|
+
var COMMAND_MERGE = '$merge';
|
|
3810
|
+
var COMMAND_APPLY = '$apply';
|
|
3811
|
+
|
|
3812
|
+
var ALL_COMMANDS_LIST = [COMMAND_PUSH, COMMAND_UNSHIFT, COMMAND_SPLICE, COMMAND_SET, COMMAND_MERGE, COMMAND_APPLY];
|
|
3813
|
+
|
|
3814
|
+
var ALL_COMMANDS_SET = {};
|
|
3815
|
+
|
|
3816
|
+
ALL_COMMANDS_LIST.forEach(function (command) {
|
|
3817
|
+
ALL_COMMANDS_SET[command] = true;
|
|
3818
|
+
});
|
|
3819
|
+
|
|
3820
|
+
function invariantArrayCase(value, spec, command) {
|
|
3821
|
+
!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;
|
|
3822
|
+
var specValue = spec[command];
|
|
3823
|
+
!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;
|
|
3824
|
+
}
|
|
3825
|
+
|
|
3826
|
+
/**
|
|
3827
|
+
* Returns a updated shallow copy of an object without mutating the original.
|
|
3828
|
+
* See https://facebook.github.io/react/docs/update.html for details.
|
|
3829
|
+
*/
|
|
3830
|
+
function update(value, spec) {
|
|
3831
|
+
!(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;
|
|
3832
|
+
|
|
3833
|
+
if (hasOwnProperty.call(spec, COMMAND_SET)) {
|
|
3834
|
+
!(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;
|
|
3835
|
+
|
|
3836
|
+
return spec[COMMAND_SET];
|
|
3837
|
+
}
|
|
3838
|
+
|
|
3839
|
+
var nextValue = shallowCopy(value);
|
|
3840
|
+
|
|
3841
|
+
if (hasOwnProperty.call(spec, COMMAND_MERGE)) {
|
|
3842
|
+
var mergeObj = spec[COMMAND_MERGE];
|
|
3843
|
+
!(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;
|
|
3844
|
+
!(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;
|
|
3845
|
+
_assign(nextValue, spec[COMMAND_MERGE]);
|
|
3846
|
+
}
|
|
3847
|
+
|
|
3848
|
+
if (hasOwnProperty.call(spec, COMMAND_PUSH)) {
|
|
3849
|
+
invariantArrayCase(value, spec, COMMAND_PUSH);
|
|
3850
|
+
spec[COMMAND_PUSH].forEach(function (item) {
|
|
3851
|
+
nextValue.push(item);
|
|
3852
|
+
});
|
|
3853
|
+
}
|
|
3854
|
+
|
|
3855
|
+
if (hasOwnProperty.call(spec, COMMAND_UNSHIFT)) {
|
|
3856
|
+
invariantArrayCase(value, spec, COMMAND_UNSHIFT);
|
|
3857
|
+
spec[COMMAND_UNSHIFT].forEach(function (item) {
|
|
3858
|
+
nextValue.unshift(item);
|
|
3859
|
+
});
|
|
3860
|
+
}
|
|
3861
|
+
|
|
3862
|
+
if (hasOwnProperty.call(spec, COMMAND_SPLICE)) {
|
|
3863
|
+
!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;
|
|
3864
|
+
!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;
|
|
3865
|
+
spec[COMMAND_SPLICE].forEach(function (args) {
|
|
3866
|
+
!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;
|
|
3867
|
+
nextValue.splice.apply(nextValue, args);
|
|
3868
|
+
});
|
|
3869
|
+
}
|
|
3870
|
+
|
|
3871
|
+
if (hasOwnProperty.call(spec, COMMAND_APPLY)) {
|
|
3872
|
+
!(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;
|
|
3873
|
+
nextValue = spec[COMMAND_APPLY](nextValue);
|
|
3874
|
+
}
|
|
3875
|
+
|
|
3876
|
+
for (var k in spec) {
|
|
3877
|
+
if (!(ALL_COMMANDS_SET.hasOwnProperty(k) && ALL_COMMANDS_SET[k])) {
|
|
3878
|
+
nextValue[k] = update(value[k], spec[k]);
|
|
3879
|
+
}
|
|
3880
|
+
}
|
|
3881
|
+
|
|
3882
|
+
return nextValue;
|
|
3883
|
+
}
|
|
3884
|
+
|
|
3885
|
+
module.exports = update;
|
|
3886
|
+
},{"39":39,"48":48,"51":51}],43:[function(_dereq_,module,exports){
|
|
3887
|
+
/**
|
|
3888
|
+
* Copyright 2013-present, Facebook, Inc.
|
|
3889
|
+
* All rights reserved.
|
|
3890
|
+
*
|
|
3891
|
+
* This source code is licensed under the BSD-style license found in the
|
|
3892
|
+
* LICENSE file in the root directory of this source tree. An additional grant
|
|
3893
|
+
* of patent rights can be found in the PATENTS file in the same directory.
|
|
3894
|
+
*
|
|
3895
|
+
*/
|
|
3896
|
+
|
|
3897
|
+
'use strict';
|
|
3898
|
+
|
|
3899
|
+
var _assign = _dereq_(51);
|
|
3900
|
+
|
|
3901
|
+
var emptyObject = _dereq_(47);
|
|
3902
|
+
var _invariant = _dereq_(48);
|
|
3903
|
+
|
|
3904
|
+
if ("development" !== 'production') {
|
|
3905
|
+
var warning = _dereq_(50);
|
|
3906
|
+
}
|
|
3907
|
+
|
|
3908
|
+
var MIXINS_KEY = 'mixins';
|
|
3909
|
+
|
|
3910
|
+
// Helper function to allow the creation of anonymous functions which do not
|
|
3911
|
+
// have .name set to the name of the variable being assigned to.
|
|
3912
|
+
function identity(fn) {
|
|
3913
|
+
return fn;
|
|
3914
|
+
}
|
|
3915
|
+
|
|
3916
|
+
var ReactPropTypeLocationNames;
|
|
3917
|
+
if ("development" !== 'production') {
|
|
3918
|
+
ReactPropTypeLocationNames = {
|
|
3919
|
+
prop: 'prop',
|
|
3920
|
+
context: 'context',
|
|
3921
|
+
childContext: 'child context'
|
|
3922
|
+
};
|
|
3923
|
+
} else {
|
|
3924
|
+
ReactPropTypeLocationNames = {};
|
|
3925
|
+
}
|
|
3926
|
+
|
|
3927
|
+
function factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) {
|
|
3928
|
+
/**
|
|
3929
|
+
* Policies that describe methods in `ReactClassInterface`.
|
|
3930
|
+
*/
|
|
3931
|
+
|
|
3932
|
+
var injectedMixins = [];
|
|
3933
|
+
|
|
3934
|
+
/**
|
|
3935
|
+
* Composite components are higher-level components that compose other composite
|
|
3936
|
+
* or host components.
|
|
3937
|
+
*
|
|
3938
|
+
* To create a new type of `ReactClass`, pass a specification of
|
|
3939
|
+
* your new class to `React.createClass`. The only requirement of your class
|
|
3940
|
+
* specification is that you implement a `render` method.
|
|
3941
|
+
*
|
|
3942
|
+
* var MyComponent = React.createClass({
|
|
3943
|
+
* render: function() {
|
|
3944
|
+
* return <div>Hello World</div>;
|
|
3945
|
+
* }
|
|
3946
|
+
* });
|
|
3947
|
+
*
|
|
3948
|
+
* The class specification supports a specific protocol of methods that have
|
|
3949
|
+
* special meaning (e.g. `render`). See `ReactClassInterface` for
|
|
3950
|
+
* more the comprehensive protocol. Any other properties and methods in the
|
|
3951
|
+
* class specification will be available on the prototype.
|
|
3952
|
+
*
|
|
3953
|
+
* @interface ReactClassInterface
|
|
3954
|
+
* @internal
|
|
3955
|
+
*/
|
|
3956
|
+
var ReactClassInterface = {
|
|
3957
|
+
/**
|
|
3958
|
+
* An array of Mixin objects to include when defining your component.
|
|
3959
|
+
*
|
|
3960
|
+
* @type {array}
|
|
3961
|
+
* @optional
|
|
3962
|
+
*/
|
|
3963
|
+
mixins: 'DEFINE_MANY',
|
|
3964
|
+
|
|
3965
|
+
/**
|
|
3966
|
+
* An object containing properties and methods that should be defined on
|
|
3967
|
+
* the component's constructor instead of its prototype (static methods).
|
|
3968
|
+
*
|
|
3969
|
+
* @type {object}
|
|
3970
|
+
* @optional
|
|
3971
|
+
*/
|
|
3972
|
+
statics: 'DEFINE_MANY',
|
|
3973
|
+
|
|
3974
|
+
/**
|
|
3975
|
+
* Definition of prop types for this component.
|
|
3976
|
+
*
|
|
3977
|
+
* @type {object}
|
|
3978
|
+
* @optional
|
|
3979
|
+
*/
|
|
3980
|
+
propTypes: 'DEFINE_MANY',
|
|
3981
|
+
|
|
3982
|
+
/**
|
|
3983
|
+
* Definition of context types for this component.
|
|
3984
|
+
*
|
|
3985
|
+
* @type {object}
|
|
3986
|
+
* @optional
|
|
3987
|
+
*/
|
|
3988
|
+
contextTypes: 'DEFINE_MANY',
|
|
3989
|
+
|
|
3990
|
+
/**
|
|
3991
|
+
* Definition of context types this component sets for its children.
|
|
3992
|
+
*
|
|
3993
|
+
* @type {object}
|
|
3994
|
+
* @optional
|
|
3995
|
+
*/
|
|
3996
|
+
childContextTypes: 'DEFINE_MANY',
|
|
3997
|
+
|
|
3998
|
+
// ==== Definition methods ====
|
|
3999
|
+
|
|
4000
|
+
/**
|
|
4001
|
+
* Invoked when the component is mounted. Values in the mapping will be set on
|
|
4002
|
+
* `this.props` if that prop is not specified (i.e. using an `in` check).
|
|
4003
|
+
*
|
|
4004
|
+
* This method is invoked before `getInitialState` and therefore cannot rely
|
|
4005
|
+
* on `this.state` or use `this.setState`.
|
|
4006
|
+
*
|
|
4007
|
+
* @return {object}
|
|
4008
|
+
* @optional
|
|
4009
|
+
*/
|
|
4010
|
+
getDefaultProps: 'DEFINE_MANY_MERGED',
|
|
4011
|
+
|
|
4012
|
+
/**
|
|
4013
|
+
* Invoked once before the component is mounted. The return value will be used
|
|
4014
|
+
* as the initial value of `this.state`.
|
|
4015
|
+
*
|
|
4016
|
+
* getInitialState: function() {
|
|
4017
|
+
* return {
|
|
4018
|
+
* isOn: false,
|
|
4019
|
+
* fooBaz: new BazFoo()
|
|
4020
|
+
* }
|
|
4021
|
+
* }
|
|
4022
|
+
*
|
|
4023
|
+
* @return {object}
|
|
4024
|
+
* @optional
|
|
4025
|
+
*/
|
|
4026
|
+
getInitialState: 'DEFINE_MANY_MERGED',
|
|
4027
|
+
|
|
4028
|
+
/**
|
|
4029
|
+
* @return {object}
|
|
4030
|
+
* @optional
|
|
4031
|
+
*/
|
|
4032
|
+
getChildContext: 'DEFINE_MANY_MERGED',
|
|
4033
|
+
|
|
4034
|
+
/**
|
|
4035
|
+
* Uses props from `this.props` and state from `this.state` to render the
|
|
4036
|
+
* structure of the component.
|
|
4037
|
+
*
|
|
4038
|
+
* No guarantees are made about when or how often this method is invoked, so
|
|
4039
|
+
* it must not have side effects.
|
|
4040
|
+
*
|
|
4041
|
+
* render: function() {
|
|
4042
|
+
* var name = this.props.name;
|
|
4043
|
+
* return <div>Hello, {name}!</div>;
|
|
4044
|
+
* }
|
|
4045
|
+
*
|
|
4046
|
+
* @return {ReactComponent}
|
|
4047
|
+
* @required
|
|
4048
|
+
*/
|
|
4049
|
+
render: 'DEFINE_ONCE',
|
|
4050
|
+
|
|
4051
|
+
// ==== Delegate methods ====
|
|
4052
|
+
|
|
4053
|
+
/**
|
|
4054
|
+
* Invoked when the component is initially created and about to be mounted.
|
|
4055
|
+
* This may have side effects, but any external subscriptions or data created
|
|
4056
|
+
* by this method must be cleaned up in `componentWillUnmount`.
|
|
4057
|
+
*
|
|
4058
|
+
* @optional
|
|
4059
|
+
*/
|
|
4060
|
+
componentWillMount: 'DEFINE_MANY',
|
|
4061
|
+
|
|
4062
|
+
/**
|
|
4063
|
+
* Invoked when the component has been mounted and has a DOM representation.
|
|
4064
|
+
* However, there is no guarantee that the DOM node is in the document.
|
|
4065
|
+
*
|
|
4066
|
+
* Use this as an opportunity to operate on the DOM when the component has
|
|
4067
|
+
* been mounted (initialized and rendered) for the first time.
|
|
4068
|
+
*
|
|
4069
|
+
* @param {DOMElement} rootNode DOM element representing the component.
|
|
4070
|
+
* @optional
|
|
4071
|
+
*/
|
|
4072
|
+
componentDidMount: 'DEFINE_MANY',
|
|
4073
|
+
|
|
4074
|
+
/**
|
|
4075
|
+
* Invoked before the component receives new props.
|
|
4076
|
+
*
|
|
4077
|
+
* Use this as an opportunity to react to a prop transition by updating the
|
|
4078
|
+
* state using `this.setState`. Current props are accessed via `this.props`.
|
|
4079
|
+
*
|
|
4080
|
+
* componentWillReceiveProps: function(nextProps, nextContext) {
|
|
4081
|
+
* this.setState({
|
|
4082
|
+
* likesIncreasing: nextProps.likeCount > this.props.likeCount
|
|
4083
|
+
* });
|
|
4084
|
+
* }
|
|
4085
|
+
*
|
|
4086
|
+
* NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop
|
|
4087
|
+
* transition may cause a state change, but the opposite is not true. If you
|
|
4088
|
+
* need it, you are probably looking for `componentWillUpdate`.
|
|
4089
|
+
*
|
|
4090
|
+
* @param {object} nextProps
|
|
4091
|
+
* @optional
|
|
4092
|
+
*/
|
|
4093
|
+
componentWillReceiveProps: 'DEFINE_MANY',
|
|
4094
|
+
|
|
4095
|
+
/**
|
|
4096
|
+
* Invoked while deciding if the component should be updated as a result of
|
|
4097
|
+
* receiving new props, state and/or context.
|
|
4098
|
+
*
|
|
4099
|
+
* Use this as an opportunity to `return false` when you're certain that the
|
|
4100
|
+
* transition to the new props/state/context will not require a component
|
|
4101
|
+
* update.
|
|
4102
|
+
*
|
|
4103
|
+
* shouldComponentUpdate: function(nextProps, nextState, nextContext) {
|
|
4104
|
+
* return !equal(nextProps, this.props) ||
|
|
4105
|
+
* !equal(nextState, this.state) ||
|
|
4106
|
+
* !equal(nextContext, this.context);
|
|
4107
|
+
* }
|
|
4108
|
+
*
|
|
4109
|
+
* @param {object} nextProps
|
|
4110
|
+
* @param {?object} nextState
|
|
4111
|
+
* @param {?object} nextContext
|
|
4112
|
+
* @return {boolean} True if the component should update.
|
|
4113
|
+
* @optional
|
|
4114
|
+
*/
|
|
4115
|
+
shouldComponentUpdate: 'DEFINE_ONCE',
|
|
4116
|
+
|
|
4117
|
+
/**
|
|
4118
|
+
* Invoked when the component is about to update due to a transition from
|
|
4119
|
+
* `this.props`, `this.state` and `this.context` to `nextProps`, `nextState`
|
|
4120
|
+
* and `nextContext`.
|
|
4121
|
+
*
|
|
4122
|
+
* Use this as an opportunity to perform preparation before an update occurs.
|
|
4123
|
+
*
|
|
4124
|
+
* NOTE: You **cannot** use `this.setState()` in this method.
|
|
4125
|
+
*
|
|
4126
|
+
* @param {object} nextProps
|
|
4127
|
+
* @param {?object} nextState
|
|
4128
|
+
* @param {?object} nextContext
|
|
4129
|
+
* @param {ReactReconcileTransaction} transaction
|
|
4130
|
+
* @optional
|
|
4131
|
+
*/
|
|
4132
|
+
componentWillUpdate: 'DEFINE_MANY',
|
|
4133
|
+
|
|
4134
|
+
/**
|
|
4135
|
+
* Invoked when the component's DOM representation has been updated.
|
|
4136
|
+
*
|
|
4137
|
+
* Use this as an opportunity to operate on the DOM when the component has
|
|
4138
|
+
* been updated.
|
|
4139
|
+
*
|
|
4140
|
+
* @param {object} prevProps
|
|
4141
|
+
* @param {?object} prevState
|
|
4142
|
+
* @param {?object} prevContext
|
|
4143
|
+
* @param {DOMElement} rootNode DOM element representing the component.
|
|
4144
|
+
* @optional
|
|
4145
|
+
*/
|
|
4146
|
+
componentDidUpdate: 'DEFINE_MANY',
|
|
4147
|
+
|
|
4148
|
+
/**
|
|
4149
|
+
* Invoked when the component is about to be removed from its parent and have
|
|
4150
|
+
* its DOM representation destroyed.
|
|
4151
|
+
*
|
|
4152
|
+
* Use this as an opportunity to deallocate any external resources.
|
|
4153
|
+
*
|
|
4154
|
+
* NOTE: There is no `componentDidUnmount` since your component will have been
|
|
4155
|
+
* destroyed by that point.
|
|
4156
|
+
*
|
|
4157
|
+
* @optional
|
|
4158
|
+
*/
|
|
4159
|
+
componentWillUnmount: 'DEFINE_MANY',
|
|
4160
|
+
|
|
4161
|
+
// ==== Advanced methods ====
|
|
4162
|
+
|
|
4163
|
+
/**
|
|
4164
|
+
* Updates the component's currently mounted DOM representation.
|
|
4165
|
+
*
|
|
4166
|
+
* By default, this implements React's rendering and reconciliation algorithm.
|
|
4167
|
+
* Sophisticated clients may wish to override this.
|
|
4168
|
+
*
|
|
4169
|
+
* @param {ReactReconcileTransaction} transaction
|
|
4170
|
+
* @internal
|
|
4171
|
+
* @overridable
|
|
4172
|
+
*/
|
|
4173
|
+
updateComponent: 'OVERRIDE_BASE'
|
|
4174
|
+
};
|
|
4175
|
+
|
|
4176
|
+
/**
|
|
4177
|
+
* Mapping from class specification keys to special processing functions.
|
|
4178
|
+
*
|
|
4179
|
+
* Although these are declared like instance properties in the specification
|
|
4180
|
+
* when defining classes using `React.createClass`, they are actually static
|
|
4181
|
+
* and are accessible on the constructor instead of the prototype. Despite
|
|
4182
|
+
* being static, they must be defined outside of the "statics" key under
|
|
4183
|
+
* which all other static methods are defined.
|
|
4184
|
+
*/
|
|
4185
|
+
var RESERVED_SPEC_KEYS = {
|
|
4186
|
+
displayName: function(Constructor, displayName) {
|
|
4187
|
+
Constructor.displayName = displayName;
|
|
4188
|
+
},
|
|
4189
|
+
mixins: function(Constructor, mixins) {
|
|
4190
|
+
if (mixins) {
|
|
4191
|
+
for (var i = 0; i < mixins.length; i++) {
|
|
4192
|
+
mixSpecIntoComponent(Constructor, mixins[i]);
|
|
4193
|
+
}
|
|
4194
|
+
}
|
|
4195
|
+
},
|
|
4196
|
+
childContextTypes: function(Constructor, childContextTypes) {
|
|
4197
|
+
if ("development" !== 'production') {
|
|
4198
|
+
validateTypeDef(Constructor, childContextTypes, 'childContext');
|
|
4199
|
+
}
|
|
4200
|
+
Constructor.childContextTypes = _assign(
|
|
4201
|
+
{},
|
|
4202
|
+
Constructor.childContextTypes,
|
|
4203
|
+
childContextTypes
|
|
4204
|
+
);
|
|
4205
|
+
},
|
|
4206
|
+
contextTypes: function(Constructor, contextTypes) {
|
|
4207
|
+
if ("development" !== 'production') {
|
|
4208
|
+
validateTypeDef(Constructor, contextTypes, 'context');
|
|
4209
|
+
}
|
|
4210
|
+
Constructor.contextTypes = _assign(
|
|
4211
|
+
{},
|
|
4212
|
+
Constructor.contextTypes,
|
|
4213
|
+
contextTypes
|
|
4214
|
+
);
|
|
4215
|
+
},
|
|
4216
|
+
/**
|
|
4217
|
+
* Special case getDefaultProps which should move into statics but requires
|
|
4218
|
+
* automatic merging.
|
|
4219
|
+
*/
|
|
4220
|
+
getDefaultProps: function(Constructor, getDefaultProps) {
|
|
4221
|
+
if (Constructor.getDefaultProps) {
|
|
4222
|
+
Constructor.getDefaultProps = createMergedResultFunction(
|
|
4223
|
+
Constructor.getDefaultProps,
|
|
4224
|
+
getDefaultProps
|
|
4225
|
+
);
|
|
4226
|
+
} else {
|
|
4227
|
+
Constructor.getDefaultProps = getDefaultProps;
|
|
4228
|
+
}
|
|
4229
|
+
},
|
|
4230
|
+
propTypes: function(Constructor, propTypes) {
|
|
4231
|
+
if ("development" !== 'production') {
|
|
4232
|
+
validateTypeDef(Constructor, propTypes, 'prop');
|
|
4233
|
+
}
|
|
4234
|
+
Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes);
|
|
4235
|
+
},
|
|
4236
|
+
statics: function(Constructor, statics) {
|
|
4237
|
+
mixStaticSpecIntoComponent(Constructor, statics);
|
|
4238
|
+
},
|
|
4239
|
+
autobind: function() {}
|
|
4240
|
+
};
|
|
4241
|
+
|
|
4242
|
+
function validateTypeDef(Constructor, typeDef, location) {
|
|
4243
|
+
for (var propName in typeDef) {
|
|
4244
|
+
if (typeDef.hasOwnProperty(propName)) {
|
|
4245
|
+
// use a warning instead of an _invariant so components
|
|
4246
|
+
// don't show up in prod but only in __DEV__
|
|
4247
|
+
if ("development" !== 'production') {
|
|
4248
|
+
warning(
|
|
4249
|
+
typeof typeDef[propName] === 'function',
|
|
4250
|
+
'%s: %s type `%s` is invalid; it must be a function, usually from ' +
|
|
4251
|
+
'React.PropTypes.',
|
|
4252
|
+
Constructor.displayName || 'ReactClass',
|
|
4253
|
+
ReactPropTypeLocationNames[location],
|
|
4254
|
+
propName
|
|
4255
|
+
);
|
|
4256
|
+
}
|
|
4257
|
+
}
|
|
4258
|
+
}
|
|
4259
|
+
}
|
|
4260
|
+
|
|
4261
|
+
function validateMethodOverride(isAlreadyDefined, name) {
|
|
4262
|
+
var specPolicy = ReactClassInterface.hasOwnProperty(name)
|
|
4263
|
+
? ReactClassInterface[name]
|
|
4264
|
+
: null;
|
|
4265
|
+
|
|
4266
|
+
// Disallow overriding of base class methods unless explicitly allowed.
|
|
4267
|
+
if (ReactClassMixin.hasOwnProperty(name)) {
|
|
4268
|
+
_invariant(
|
|
4269
|
+
specPolicy === 'OVERRIDE_BASE',
|
|
4270
|
+
'ReactClassInterface: You are attempting to override ' +
|
|
4271
|
+
'`%s` from your class specification. Ensure that your method names ' +
|
|
4272
|
+
'do not overlap with React methods.',
|
|
4273
|
+
name
|
|
4274
|
+
);
|
|
4275
|
+
}
|
|
4276
|
+
|
|
4277
|
+
// Disallow defining methods more than once unless explicitly allowed.
|
|
4278
|
+
if (isAlreadyDefined) {
|
|
4279
|
+
_invariant(
|
|
4280
|
+
specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED',
|
|
4281
|
+
'ReactClassInterface: You are attempting to define ' +
|
|
4282
|
+
'`%s` on your component more than once. This conflict may be due ' +
|
|
4283
|
+
'to a mixin.',
|
|
4284
|
+
name
|
|
4285
|
+
);
|
|
4286
|
+
}
|
|
4287
|
+
}
|
|
4288
|
+
|
|
4289
|
+
/**
|
|
4290
|
+
* Mixin helper which handles policy validation and reserved
|
|
4291
|
+
* specification keys when building React classes.
|
|
4292
|
+
*/
|
|
4293
|
+
function mixSpecIntoComponent(Constructor, spec) {
|
|
4294
|
+
if (!spec) {
|
|
4295
|
+
if ("development" !== 'production') {
|
|
4296
|
+
var typeofSpec = typeof spec;
|
|
4297
|
+
var isMixinValid = typeofSpec === 'object' && spec !== null;
|
|
4298
|
+
|
|
4299
|
+
if ("development" !== 'production') {
|
|
4300
|
+
warning(
|
|
4301
|
+
isMixinValid,
|
|
4302
|
+
"%s: You're attempting to include a mixin that is either null " +
|
|
4303
|
+
'or not an object. Check the mixins included by the component, ' +
|
|
4304
|
+
'as well as any mixins they include themselves. ' +
|
|
4305
|
+
'Expected object but got %s.',
|
|
4306
|
+
Constructor.displayName || 'ReactClass',
|
|
4307
|
+
spec === null ? null : typeofSpec
|
|
4308
|
+
);
|
|
4309
|
+
}
|
|
4310
|
+
}
|
|
4311
|
+
|
|
4312
|
+
return;
|
|
4313
|
+
}
|
|
4314
|
+
|
|
4315
|
+
_invariant(
|
|
4316
|
+
typeof spec !== 'function',
|
|
4317
|
+
"ReactClass: You're attempting to " +
|
|
4318
|
+
'use a component class or function as a mixin. Instead, just use a ' +
|
|
4319
|
+
'regular object.'
|
|
4320
|
+
);
|
|
4321
|
+
_invariant(
|
|
4322
|
+
!isValidElement(spec),
|
|
4323
|
+
"ReactClass: You're attempting to " +
|
|
4324
|
+
'use a component as a mixin. Instead, just use a regular object.'
|
|
4325
|
+
);
|
|
4326
|
+
|
|
4327
|
+
var proto = Constructor.prototype;
|
|
4328
|
+
var autoBindPairs = proto.__reactAutoBindPairs;
|
|
4329
|
+
|
|
4330
|
+
// By handling mixins before any other properties, we ensure the same
|
|
4331
|
+
// chaining order is applied to methods with DEFINE_MANY policy, whether
|
|
4332
|
+
// mixins are listed before or after these methods in the spec.
|
|
4333
|
+
if (spec.hasOwnProperty(MIXINS_KEY)) {
|
|
4334
|
+
RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins);
|
|
4335
|
+
}
|
|
4336
|
+
|
|
4337
|
+
for (var name in spec) {
|
|
4338
|
+
if (!spec.hasOwnProperty(name)) {
|
|
4339
|
+
continue;
|
|
4340
|
+
}
|
|
4341
|
+
|
|
4342
|
+
if (name === MIXINS_KEY) {
|
|
4343
|
+
// We have already handled mixins in a special case above.
|
|
4344
|
+
continue;
|
|
4345
|
+
}
|
|
4346
|
+
|
|
4347
|
+
var property = spec[name];
|
|
4348
|
+
var isAlreadyDefined = proto.hasOwnProperty(name);
|
|
4349
|
+
validateMethodOverride(isAlreadyDefined, name);
|
|
4350
|
+
|
|
4351
|
+
if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) {
|
|
4352
|
+
RESERVED_SPEC_KEYS[name](Constructor, property);
|
|
4353
|
+
} else {
|
|
4354
|
+
// Setup methods on prototype:
|
|
4355
|
+
// The following member methods should not be automatically bound:
|
|
4356
|
+
// 1. Expected ReactClass methods (in the "interface").
|
|
4357
|
+
// 2. Overridden methods (that were mixed in).
|
|
4358
|
+
var isReactClassMethod = ReactClassInterface.hasOwnProperty(name);
|
|
4359
|
+
var isFunction = typeof property === 'function';
|
|
4360
|
+
var shouldAutoBind =
|
|
4361
|
+
isFunction &&
|
|
4362
|
+
!isReactClassMethod &&
|
|
4363
|
+
!isAlreadyDefined &&
|
|
4364
|
+
spec.autobind !== false;
|
|
4365
|
+
|
|
4366
|
+
if (shouldAutoBind) {
|
|
4367
|
+
autoBindPairs.push(name, property);
|
|
4368
|
+
proto[name] = property;
|
|
4369
|
+
} else {
|
|
4370
|
+
if (isAlreadyDefined) {
|
|
4371
|
+
var specPolicy = ReactClassInterface[name];
|
|
4372
|
+
|
|
4373
|
+
// These cases should already be caught by validateMethodOverride.
|
|
4374
|
+
_invariant(
|
|
4375
|
+
isReactClassMethod &&
|
|
4376
|
+
(specPolicy === 'DEFINE_MANY_MERGED' ||
|
|
4377
|
+
specPolicy === 'DEFINE_MANY'),
|
|
4378
|
+
'ReactClass: Unexpected spec policy %s for key %s ' +
|
|
4379
|
+
'when mixing in component specs.',
|
|
4380
|
+
specPolicy,
|
|
4381
|
+
name
|
|
4382
|
+
);
|
|
4383
|
+
|
|
4384
|
+
// For methods which are defined more than once, call the existing
|
|
4385
|
+
// methods before calling the new property, merging if appropriate.
|
|
4386
|
+
if (specPolicy === 'DEFINE_MANY_MERGED') {
|
|
4387
|
+
proto[name] = createMergedResultFunction(proto[name], property);
|
|
4388
|
+
} else if (specPolicy === 'DEFINE_MANY') {
|
|
4389
|
+
proto[name] = createChainedFunction(proto[name], property);
|
|
4390
|
+
}
|
|
4391
|
+
} else {
|
|
4392
|
+
proto[name] = property;
|
|
4393
|
+
if ("development" !== 'production') {
|
|
4394
|
+
// Add verbose displayName to the function, which helps when looking
|
|
4395
|
+
// at profiling tools.
|
|
4396
|
+
if (typeof property === 'function' && spec.displayName) {
|
|
4397
|
+
proto[name].displayName = spec.displayName + '_' + name;
|
|
4398
|
+
}
|
|
4399
|
+
}
|
|
4400
|
+
}
|
|
4401
|
+
}
|
|
4402
|
+
}
|
|
4426
4403
|
}
|
|
4427
4404
|
}
|
|
4428
4405
|
|
|
4429
|
-
|
|
4430
|
-
|
|
4406
|
+
function mixStaticSpecIntoComponent(Constructor, statics) {
|
|
4407
|
+
if (!statics) {
|
|
4408
|
+
return;
|
|
4409
|
+
}
|
|
4410
|
+
for (var name in statics) {
|
|
4411
|
+
var property = statics[name];
|
|
4412
|
+
if (!statics.hasOwnProperty(name)) {
|
|
4413
|
+
continue;
|
|
4414
|
+
}
|
|
4431
4415
|
|
|
4432
|
-
|
|
4433
|
-
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
|
|
4440
|
-
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
4444
|
-
|
|
4445
|
-
|
|
4446
|
-
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
|
|
4450
|
-
|
|
4416
|
+
var isReserved = name in RESERVED_SPEC_KEYS;
|
|
4417
|
+
_invariant(
|
|
4418
|
+
!isReserved,
|
|
4419
|
+
'ReactClass: You are attempting to define a reserved ' +
|
|
4420
|
+
'property, `%s`, that shouldn\'t be on the "statics" key. Define it ' +
|
|
4421
|
+
'as an instance property instead; it will still be accessible on the ' +
|
|
4422
|
+
'constructor.',
|
|
4423
|
+
name
|
|
4424
|
+
);
|
|
4425
|
+
|
|
4426
|
+
var isInherited = name in Constructor;
|
|
4427
|
+
_invariant(
|
|
4428
|
+
!isInherited,
|
|
4429
|
+
'ReactClass: You are attempting to define ' +
|
|
4430
|
+
'`%s` on your component more than once. This conflict may be ' +
|
|
4431
|
+
'due to a mixin.',
|
|
4432
|
+
name
|
|
4433
|
+
);
|
|
4434
|
+
Constructor[name] = property;
|
|
4435
|
+
}
|
|
4451
4436
|
}
|
|
4452
4437
|
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
|
|
4465
|
-
|
|
4466
|
-
|
|
4438
|
+
/**
|
|
4439
|
+
* Merge two objects, but throw if both contain the same key.
|
|
4440
|
+
*
|
|
4441
|
+
* @param {object} one The first object, which is mutated.
|
|
4442
|
+
* @param {object} two The second object
|
|
4443
|
+
* @return {object} one after it has been mutated to contain everything in two.
|
|
4444
|
+
*/
|
|
4445
|
+
function mergeIntoWithNoDuplicateKeys(one, two) {
|
|
4446
|
+
_invariant(
|
|
4447
|
+
one && two && typeof one === 'object' && typeof two === 'object',
|
|
4448
|
+
'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.'
|
|
4449
|
+
);
|
|
4450
|
+
|
|
4451
|
+
for (var key in two) {
|
|
4452
|
+
if (two.hasOwnProperty(key)) {
|
|
4453
|
+
_invariant(
|
|
4454
|
+
one[key] === undefined,
|
|
4455
|
+
'mergeIntoWithNoDuplicateKeys(): ' +
|
|
4456
|
+
'Tried to merge two objects with the same key: `%s`. This conflict ' +
|
|
4457
|
+
'may be due to a mixin; in particular, this may be caused by two ' +
|
|
4458
|
+
'getInitialState() or getDefaultProps() methods returning objects ' +
|
|
4459
|
+
'with clashing keys.',
|
|
4460
|
+
key
|
|
4461
|
+
);
|
|
4462
|
+
one[key] = two[key];
|
|
4463
|
+
}
|
|
4464
|
+
}
|
|
4465
|
+
return one;
|
|
4466
|
+
}
|
|
4467
4467
|
|
|
4468
|
-
|
|
4468
|
+
/**
|
|
4469
|
+
* Creates a function that invokes two functions and merges their return values.
|
|
4470
|
+
*
|
|
4471
|
+
* @param {function} one Function to invoke first.
|
|
4472
|
+
* @param {function} two Function to invoke second.
|
|
4473
|
+
* @return {function} Function that invokes the two argument functions.
|
|
4474
|
+
* @private
|
|
4475
|
+
*/
|
|
4476
|
+
function createMergedResultFunction(one, two) {
|
|
4477
|
+
return function mergedResult() {
|
|
4478
|
+
var a = one.apply(this, arguments);
|
|
4479
|
+
var b = two.apply(this, arguments);
|
|
4480
|
+
if (a == null) {
|
|
4481
|
+
return b;
|
|
4482
|
+
} else if (b == null) {
|
|
4483
|
+
return a;
|
|
4484
|
+
}
|
|
4485
|
+
var c = {};
|
|
4486
|
+
mergeIntoWithNoDuplicateKeys(c, a);
|
|
4487
|
+
mergeIntoWithNoDuplicateKeys(c, b);
|
|
4488
|
+
return c;
|
|
4489
|
+
};
|
|
4490
|
+
}
|
|
4469
4491
|
|
|
4470
|
-
|
|
4492
|
+
/**
|
|
4493
|
+
* Creates a function that invokes two functions and ignores their return vales.
|
|
4494
|
+
*
|
|
4495
|
+
* @param {function} one Function to invoke first.
|
|
4496
|
+
* @param {function} two Function to invoke second.
|
|
4497
|
+
* @return {function} Function that invokes the two argument functions.
|
|
4498
|
+
* @private
|
|
4499
|
+
*/
|
|
4500
|
+
function createChainedFunction(one, two) {
|
|
4501
|
+
return function chainedFunction() {
|
|
4502
|
+
one.apply(this, arguments);
|
|
4503
|
+
two.apply(this, arguments);
|
|
4504
|
+
};
|
|
4505
|
+
}
|
|
4471
4506
|
|
|
4472
|
-
|
|
4473
|
-
|
|
4507
|
+
/**
|
|
4508
|
+
* Binds a method to the component.
|
|
4509
|
+
*
|
|
4510
|
+
* @param {object} component Component whose method is going to be bound.
|
|
4511
|
+
* @param {function} method Method to be bound.
|
|
4512
|
+
* @return {function} The bound method.
|
|
4513
|
+
*/
|
|
4514
|
+
function bindAutoBindMethod(component, method) {
|
|
4515
|
+
var boundMethod = method.bind(component);
|
|
4516
|
+
if ("development" !== 'production') {
|
|
4517
|
+
boundMethod.__reactBoundContext = component;
|
|
4518
|
+
boundMethod.__reactBoundMethod = method;
|
|
4519
|
+
boundMethod.__reactBoundArguments = null;
|
|
4520
|
+
var componentName = component.constructor.displayName;
|
|
4521
|
+
var _bind = boundMethod.bind;
|
|
4522
|
+
boundMethod.bind = function(newThis) {
|
|
4523
|
+
for (
|
|
4524
|
+
var _len = arguments.length,
|
|
4525
|
+
args = Array(_len > 1 ? _len - 1 : 0),
|
|
4526
|
+
_key = 1;
|
|
4527
|
+
_key < _len;
|
|
4528
|
+
_key++
|
|
4529
|
+
) {
|
|
4530
|
+
args[_key - 1] = arguments[_key];
|
|
4531
|
+
}
|
|
4474
4532
|
|
|
4475
|
-
|
|
4476
|
-
|
|
4533
|
+
// User is trying to bind() an autobound method; we effectively will
|
|
4534
|
+
// ignore the value of "this" that the user is trying to use, so
|
|
4535
|
+
// let's warn.
|
|
4536
|
+
if (newThis !== component && newThis !== null) {
|
|
4537
|
+
if ("development" !== 'production') {
|
|
4538
|
+
warning(
|
|
4539
|
+
false,
|
|
4540
|
+
'bind(): React component methods may only be bound to the ' +
|
|
4541
|
+
'component instance. See %s',
|
|
4542
|
+
componentName
|
|
4543
|
+
);
|
|
4544
|
+
}
|
|
4545
|
+
} else if (!args.length) {
|
|
4546
|
+
if ("development" !== 'production') {
|
|
4547
|
+
warning(
|
|
4548
|
+
false,
|
|
4549
|
+
'bind(): You are binding a component method to the component. ' +
|
|
4550
|
+
'React does this for you automatically in a high-performance ' +
|
|
4551
|
+
'way, so you can safely remove this call. See %s',
|
|
4552
|
+
componentName
|
|
4553
|
+
);
|
|
4554
|
+
}
|
|
4555
|
+
return boundMethod;
|
|
4556
|
+
}
|
|
4557
|
+
var reboundMethod = _bind.apply(boundMethod, arguments);
|
|
4558
|
+
reboundMethod.__reactBoundContext = component;
|
|
4559
|
+
reboundMethod.__reactBoundMethod = method;
|
|
4560
|
+
reboundMethod.__reactBoundArguments = args;
|
|
4561
|
+
return reboundMethod;
|
|
4562
|
+
};
|
|
4563
|
+
}
|
|
4564
|
+
return boundMethod;
|
|
4565
|
+
}
|
|
4477
4566
|
|
|
4478
|
-
|
|
4479
|
-
|
|
4480
|
-
|
|
4481
|
-
|
|
4482
|
-
|
|
4483
|
-
|
|
4484
|
-
|
|
4567
|
+
/**
|
|
4568
|
+
* Binds all auto-bound methods in a component.
|
|
4569
|
+
*
|
|
4570
|
+
* @param {object} component Component whose method is going to be bound.
|
|
4571
|
+
*/
|
|
4572
|
+
function bindAutoBindMethods(component) {
|
|
4573
|
+
var pairs = component.__reactAutoBindPairs;
|
|
4574
|
+
for (var i = 0; i < pairs.length; i += 2) {
|
|
4575
|
+
var autoBindKey = pairs[i];
|
|
4576
|
+
var method = pairs[i + 1];
|
|
4577
|
+
component[autoBindKey] = bindAutoBindMethod(component, method);
|
|
4578
|
+
}
|
|
4485
4579
|
}
|
|
4486
|
-
}
|
|
4487
4580
|
|
|
4488
|
-
var
|
|
4489
|
-
|
|
4490
|
-
|
|
4491
|
-
|
|
4492
|
-
|
|
4493
|
-
var COMMAND_APPLY = '$apply';
|
|
4581
|
+
var IsMountedPreMixin = {
|
|
4582
|
+
componentDidMount: function() {
|
|
4583
|
+
this.__isMounted = true;
|
|
4584
|
+
}
|
|
4585
|
+
};
|
|
4494
4586
|
|
|
4495
|
-
var
|
|
4587
|
+
var IsMountedPostMixin = {
|
|
4588
|
+
componentWillUnmount: function() {
|
|
4589
|
+
this.__isMounted = false;
|
|
4590
|
+
}
|
|
4591
|
+
};
|
|
4496
4592
|
|
|
4497
|
-
|
|
4593
|
+
/**
|
|
4594
|
+
* Add more to the ReactClass base class. These are all legacy features and
|
|
4595
|
+
* therefore not already part of the modern ReactComponent.
|
|
4596
|
+
*/
|
|
4597
|
+
var ReactClassMixin = {
|
|
4598
|
+
/**
|
|
4599
|
+
* TODO: This will be deprecated because state should always keep a consistent
|
|
4600
|
+
* type signature and the only use case for this, is to avoid that.
|
|
4601
|
+
*/
|
|
4602
|
+
replaceState: function(newState, callback) {
|
|
4603
|
+
this.updater.enqueueReplaceState(this, newState, callback);
|
|
4604
|
+
},
|
|
4605
|
+
|
|
4606
|
+
/**
|
|
4607
|
+
* Checks whether or not this composite component is mounted.
|
|
4608
|
+
* @return {boolean} True if mounted, false otherwise.
|
|
4609
|
+
* @protected
|
|
4610
|
+
* @final
|
|
4611
|
+
*/
|
|
4612
|
+
isMounted: function() {
|
|
4613
|
+
if ("development" !== 'production') {
|
|
4614
|
+
warning(
|
|
4615
|
+
this.__didWarnIsMounted,
|
|
4616
|
+
'%s: isMounted is deprecated. Instead, make sure to clean up ' +
|
|
4617
|
+
'subscriptions and pending requests in componentWillUnmount to ' +
|
|
4618
|
+
'prevent memory leaks.',
|
|
4619
|
+
(this.constructor && this.constructor.displayName) ||
|
|
4620
|
+
this.name ||
|
|
4621
|
+
'Component'
|
|
4622
|
+
);
|
|
4623
|
+
this.__didWarnIsMounted = true;
|
|
4624
|
+
}
|
|
4625
|
+
return !!this.__isMounted;
|
|
4626
|
+
}
|
|
4627
|
+
};
|
|
4498
4628
|
|
|
4499
|
-
|
|
4500
|
-
|
|
4501
|
-
|
|
4629
|
+
var ReactClassComponent = function() {};
|
|
4630
|
+
_assign(
|
|
4631
|
+
ReactClassComponent.prototype,
|
|
4632
|
+
ReactComponent.prototype,
|
|
4633
|
+
ReactClassMixin
|
|
4634
|
+
);
|
|
4502
4635
|
|
|
4503
|
-
|
|
4504
|
-
|
|
4505
|
-
|
|
4506
|
-
|
|
4507
|
-
}
|
|
4636
|
+
/**
|
|
4637
|
+
* Creates a composite component class given a class specification.
|
|
4638
|
+
* See https://facebook.github.io/react/docs/top-level-api.html#react.createclass
|
|
4639
|
+
*
|
|
4640
|
+
* @param {object} spec Class specification (which must define `render`).
|
|
4641
|
+
* @return {function} Component constructor function.
|
|
4642
|
+
* @public
|
|
4643
|
+
*/
|
|
4644
|
+
function createClass(spec) {
|
|
4645
|
+
// To keep our warnings more understandable, we'll use a little hack here to
|
|
4646
|
+
// ensure that Constructor.name !== 'Constructor'. This makes sure we don't
|
|
4647
|
+
// unnecessarily identify a class without displayName as 'Constructor'.
|
|
4648
|
+
var Constructor = identity(function(props, context, updater) {
|
|
4649
|
+
// This constructor gets overridden by mocks. The argument is used
|
|
4650
|
+
// by mocks to assert on what gets mounted.
|
|
4508
4651
|
|
|
4509
|
-
|
|
4510
|
-
|
|
4511
|
-
|
|
4512
|
-
|
|
4513
|
-
|
|
4514
|
-
|
|
4652
|
+
if ("development" !== 'production') {
|
|
4653
|
+
warning(
|
|
4654
|
+
this instanceof Constructor,
|
|
4655
|
+
'Something is calling a React component directly. Use a factory or ' +
|
|
4656
|
+
'JSX instead. See: https://fb.me/react-legacyfactory'
|
|
4657
|
+
);
|
|
4658
|
+
}
|
|
4515
4659
|
|
|
4516
|
-
|
|
4517
|
-
|
|
4660
|
+
// Wire up auto-binding
|
|
4661
|
+
if (this.__reactAutoBindPairs.length) {
|
|
4662
|
+
bindAutoBindMethods(this);
|
|
4663
|
+
}
|
|
4518
4664
|
|
|
4519
|
-
|
|
4520
|
-
|
|
4665
|
+
this.props = props;
|
|
4666
|
+
this.context = context;
|
|
4667
|
+
this.refs = emptyObject;
|
|
4668
|
+
this.updater = updater || ReactNoopUpdateQueue;
|
|
4521
4669
|
|
|
4522
|
-
|
|
4670
|
+
this.state = null;
|
|
4523
4671
|
|
|
4524
|
-
|
|
4525
|
-
|
|
4526
|
-
!(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;
|
|
4527
|
-
!(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;
|
|
4528
|
-
_assign(nextValue, spec[COMMAND_MERGE]);
|
|
4529
|
-
}
|
|
4672
|
+
// ReactClasses doesn't have constructors. Instead, they use the
|
|
4673
|
+
// getInitialState and componentWillMount methods for initialization.
|
|
4530
4674
|
|
|
4531
|
-
|
|
4532
|
-
|
|
4533
|
-
|
|
4534
|
-
|
|
4535
|
-
|
|
4536
|
-
|
|
4675
|
+
var initialState = this.getInitialState ? this.getInitialState() : null;
|
|
4676
|
+
if ("development" !== 'production') {
|
|
4677
|
+
// We allow auto-mocks to proceed as if they're returning null.
|
|
4678
|
+
if (
|
|
4679
|
+
initialState === undefined &&
|
|
4680
|
+
this.getInitialState._isMockFunction
|
|
4681
|
+
) {
|
|
4682
|
+
// This is probably bad practice. Consider warning here and
|
|
4683
|
+
// deprecating this convenience.
|
|
4684
|
+
initialState = null;
|
|
4685
|
+
}
|
|
4686
|
+
}
|
|
4687
|
+
_invariant(
|
|
4688
|
+
typeof initialState === 'object' && !Array.isArray(initialState),
|
|
4689
|
+
'%s.getInitialState(): must return an object or null',
|
|
4690
|
+
Constructor.displayName || 'ReactCompositeComponent'
|
|
4691
|
+
);
|
|
4537
4692
|
|
|
4538
|
-
|
|
4539
|
-
invariantArrayCase(value, spec, COMMAND_UNSHIFT);
|
|
4540
|
-
spec[COMMAND_UNSHIFT].forEach(function (item) {
|
|
4541
|
-
nextValue.unshift(item);
|
|
4693
|
+
this.state = initialState;
|
|
4542
4694
|
});
|
|
4543
|
-
|
|
4695
|
+
Constructor.prototype = new ReactClassComponent();
|
|
4696
|
+
Constructor.prototype.constructor = Constructor;
|
|
4697
|
+
Constructor.prototype.__reactAutoBindPairs = [];
|
|
4544
4698
|
|
|
4545
|
-
|
|
4546
|
-
!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;
|
|
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
|
-
}
|
|
4699
|
+
injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor));
|
|
4553
4700
|
|
|
4554
|
-
|
|
4555
|
-
|
|
4556
|
-
|
|
4557
|
-
}
|
|
4701
|
+
mixSpecIntoComponent(Constructor, IsMountedPreMixin);
|
|
4702
|
+
mixSpecIntoComponent(Constructor, spec);
|
|
4703
|
+
mixSpecIntoComponent(Constructor, IsMountedPostMixin);
|
|
4558
4704
|
|
|
4559
|
-
|
|
4560
|
-
if (
|
|
4561
|
-
|
|
4705
|
+
// Initialize the defaultProps property after all mixins have been merged.
|
|
4706
|
+
if (Constructor.getDefaultProps) {
|
|
4707
|
+
Constructor.defaultProps = Constructor.getDefaultProps();
|
|
4708
|
+
}
|
|
4709
|
+
|
|
4710
|
+
if ("development" !== 'production') {
|
|
4711
|
+
// This is a tag to indicate that the use of these method names is ok,
|
|
4712
|
+
// since it's used with createClass. If it's not, then it's likely a
|
|
4713
|
+
// mistake so we'll warn you to use the static property, property
|
|
4714
|
+
// initializer or constructor respectively.
|
|
4715
|
+
if (Constructor.getDefaultProps) {
|
|
4716
|
+
Constructor.getDefaultProps.isReactClassApproved = {};
|
|
4717
|
+
}
|
|
4718
|
+
if (Constructor.prototype.getInitialState) {
|
|
4719
|
+
Constructor.prototype.getInitialState.isReactClassApproved = {};
|
|
4720
|
+
}
|
|
4721
|
+
}
|
|
4722
|
+
|
|
4723
|
+
_invariant(
|
|
4724
|
+
Constructor.prototype.render,
|
|
4725
|
+
'createClass(...): Class specification must implement a `render` method.'
|
|
4726
|
+
);
|
|
4727
|
+
|
|
4728
|
+
if ("development" !== 'production') {
|
|
4729
|
+
warning(
|
|
4730
|
+
!Constructor.prototype.componentShouldUpdate,
|
|
4731
|
+
'%s has a method called ' +
|
|
4732
|
+
'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' +
|
|
4733
|
+
'The name is phrased as a question because the function is ' +
|
|
4734
|
+
'expected to return a value.',
|
|
4735
|
+
spec.displayName || 'A component'
|
|
4736
|
+
);
|
|
4737
|
+
warning(
|
|
4738
|
+
!Constructor.prototype.componentWillRecieveProps,
|
|
4739
|
+
'%s has a method called ' +
|
|
4740
|
+
'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?',
|
|
4741
|
+
spec.displayName || 'A component'
|
|
4742
|
+
);
|
|
4743
|
+
}
|
|
4744
|
+
|
|
4745
|
+
// Reduce time spent doing lookups by setting these on the prototype.
|
|
4746
|
+
for (var methodName in ReactClassInterface) {
|
|
4747
|
+
if (!Constructor.prototype[methodName]) {
|
|
4748
|
+
Constructor.prototype[methodName] = null;
|
|
4749
|
+
}
|
|
4562
4750
|
}
|
|
4751
|
+
|
|
4752
|
+
return Constructor;
|
|
4563
4753
|
}
|
|
4564
4754
|
|
|
4565
|
-
return
|
|
4755
|
+
return createClass;
|
|
4566
4756
|
}
|
|
4567
4757
|
|
|
4568
|
-
module.exports =
|
|
4569
|
-
|
|
4758
|
+
module.exports = factory;
|
|
4759
|
+
|
|
4760
|
+
},{"47":47,"48":48,"50":50,"51":51}],44:[function(_dereq_,module,exports){
|
|
4570
4761
|
'use strict';
|
|
4571
4762
|
|
|
4572
4763
|
/**
|
|
@@ -4580,7 +4771,7 @@ module.exports = update;
|
|
|
4580
4771
|
* @typechecks
|
|
4581
4772
|
*/
|
|
4582
4773
|
|
|
4583
|
-
var invariant = _dereq_(
|
|
4774
|
+
var invariant = _dereq_(48);
|
|
4584
4775
|
|
|
4585
4776
|
/**
|
|
4586
4777
|
* The CSSCore module specifies the API (and implements most of the methods)
|
|
@@ -4688,7 +4879,7 @@ var CSSCore = {
|
|
|
4688
4879
|
};
|
|
4689
4880
|
|
|
4690
4881
|
module.exports = CSSCore;
|
|
4691
|
-
},{"
|
|
4882
|
+
},{"48":48}],45:[function(_dereq_,module,exports){
|
|
4692
4883
|
/**
|
|
4693
4884
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
4694
4885
|
* All rights reserved.
|
|
@@ -4724,7 +4915,7 @@ var ExecutionEnvironment = {
|
|
|
4724
4915
|
};
|
|
4725
4916
|
|
|
4726
4917
|
module.exports = ExecutionEnvironment;
|
|
4727
|
-
},{}],
|
|
4918
|
+
},{}],46:[function(_dereq_,module,exports){
|
|
4728
4919
|
"use strict";
|
|
4729
4920
|
|
|
4730
4921
|
/**
|
|
@@ -4763,7 +4954,7 @@ emptyFunction.thatReturnsArgument = function (arg) {
|
|
|
4763
4954
|
};
|
|
4764
4955
|
|
|
4765
4956
|
module.exports = emptyFunction;
|
|
4766
|
-
},{}],
|
|
4957
|
+
},{}],47:[function(_dereq_,module,exports){
|
|
4767
4958
|
/**
|
|
4768
4959
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
4769
4960
|
* All rights reserved.
|
|
@@ -4783,7 +4974,7 @@ if ("development" !== 'production') {
|
|
|
4783
4974
|
}
|
|
4784
4975
|
|
|
4785
4976
|
module.exports = emptyObject;
|
|
4786
|
-
},{}],
|
|
4977
|
+
},{}],48:[function(_dereq_,module,exports){
|
|
4787
4978
|
/**
|
|
4788
4979
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
4789
4980
|
* All rights reserved.
|
|
@@ -4839,7 +5030,7 @@ function invariant(condition, format, a, b, c, d, e, f) {
|
|
|
4839
5030
|
}
|
|
4840
5031
|
|
|
4841
5032
|
module.exports = invariant;
|
|
4842
|
-
},{}],
|
|
5033
|
+
},{}],49:[function(_dereq_,module,exports){
|
|
4843
5034
|
/**
|
|
4844
5035
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
4845
5036
|
* All rights reserved.
|
|
@@ -4907,7 +5098,7 @@ function shallowEqual(objA, objB) {
|
|
|
4907
5098
|
}
|
|
4908
5099
|
|
|
4909
5100
|
module.exports = shallowEqual;
|
|
4910
|
-
},{}],
|
|
5101
|
+
},{}],50:[function(_dereq_,module,exports){
|
|
4911
5102
|
/**
|
|
4912
5103
|
* Copyright 2014-2015, Facebook, Inc.
|
|
4913
5104
|
* All rights reserved.
|
|
@@ -4920,7 +5111,7 @@ module.exports = shallowEqual;
|
|
|
4920
5111
|
|
|
4921
5112
|
'use strict';
|
|
4922
5113
|
|
|
4923
|
-
var emptyFunction = _dereq_(
|
|
5114
|
+
var emptyFunction = _dereq_(46);
|
|
4924
5115
|
|
|
4925
5116
|
/**
|
|
4926
5117
|
* Similar to invariant but only logs a warning if the condition is not met.
|
|
@@ -4974,7 +5165,7 @@ if ("development" !== 'production') {
|
|
|
4974
5165
|
}
|
|
4975
5166
|
|
|
4976
5167
|
module.exports = warning;
|
|
4977
|
-
},{"
|
|
5168
|
+
},{"46":46}],51:[function(_dereq_,module,exports){
|
|
4978
5169
|
/*
|
|
4979
5170
|
object-assign
|
|
4980
5171
|
(c) Sindre Sorhus
|
|
@@ -5066,7 +5257,7 @@ module.exports = shouldUseNative() ? Object.assign : function (target, source) {
|
|
|
5066
5257
|
return to;
|
|
5067
5258
|
};
|
|
5068
5259
|
|
|
5069
|
-
},{}],
|
|
5260
|
+
},{}],52:[function(_dereq_,module,exports){
|
|
5070
5261
|
/**
|
|
5071
5262
|
* Copyright 2013-present, Facebook, Inc.
|
|
5072
5263
|
* All rights reserved.
|
|
@@ -5079,9 +5270,9 @@ module.exports = shouldUseNative() ? Object.assign : function (target, source) {
|
|
|
5079
5270
|
'use strict';
|
|
5080
5271
|
|
|
5081
5272
|
if ("development" !== 'production') {
|
|
5082
|
-
var invariant = _dereq_(
|
|
5083
|
-
var warning = _dereq_(
|
|
5084
|
-
var ReactPropTypesSecret = _dereq_(
|
|
5273
|
+
var invariant = _dereq_(48);
|
|
5274
|
+
var warning = _dereq_(50);
|
|
5275
|
+
var ReactPropTypesSecret = _dereq_(55);
|
|
5085
5276
|
var loggedTypeFailures = {};
|
|
5086
5277
|
}
|
|
5087
5278
|
|
|
@@ -5129,7 +5320,7 @@ function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
|
|
|
5129
5320
|
|
|
5130
5321
|
module.exports = checkPropTypes;
|
|
5131
5322
|
|
|
5132
|
-
},{"
|
|
5323
|
+
},{"48":48,"50":50,"55":55}],53:[function(_dereq_,module,exports){
|
|
5133
5324
|
/**
|
|
5134
5325
|
* Copyright 2013-present, Facebook, Inc.
|
|
5135
5326
|
* All rights reserved.
|
|
@@ -5145,14 +5336,14 @@ module.exports = checkPropTypes;
|
|
|
5145
5336
|
// Therefore we re-export development-only version with all the PropTypes checks here.
|
|
5146
5337
|
// However if one is migrating to the `prop-types` npm library, they will go through the
|
|
5147
5338
|
// `index.js` entry point, and it will branch depending on the environment.
|
|
5148
|
-
var factory = _dereq_(
|
|
5339
|
+
var factory = _dereq_(54);
|
|
5149
5340
|
module.exports = function(isValidElement) {
|
|
5150
5341
|
// It is still allowed in 15.5.
|
|
5151
5342
|
var throwOnDirectAccess = false;
|
|
5152
5343
|
return factory(isValidElement, throwOnDirectAccess);
|
|
5153
5344
|
};
|
|
5154
5345
|
|
|
5155
|
-
},{"
|
|
5346
|
+
},{"54":54}],54:[function(_dereq_,module,exports){
|
|
5156
5347
|
/**
|
|
5157
5348
|
* Copyright 2013-present, Facebook, Inc.
|
|
5158
5349
|
* All rights reserved.
|
|
@@ -5164,12 +5355,12 @@ module.exports = function(isValidElement) {
|
|
|
5164
5355
|
|
|
5165
5356
|
'use strict';
|
|
5166
5357
|
|
|
5167
|
-
var emptyFunction = _dereq_(
|
|
5168
|
-
var invariant = _dereq_(
|
|
5169
|
-
var warning = _dereq_(
|
|
5358
|
+
var emptyFunction = _dereq_(46);
|
|
5359
|
+
var invariant = _dereq_(48);
|
|
5360
|
+
var warning = _dereq_(50);
|
|
5170
5361
|
|
|
5171
|
-
var ReactPropTypesSecret = _dereq_(
|
|
5172
|
-
var checkPropTypes = _dereq_(
|
|
5362
|
+
var ReactPropTypesSecret = _dereq_(55);
|
|
5363
|
+
var checkPropTypes = _dereq_(52);
|
|
5173
5364
|
|
|
5174
5365
|
module.exports = function(isValidElement, throwOnDirectAccess) {
|
|
5175
5366
|
/* global Symbol */
|
|
@@ -5303,6 +5494,7 @@ module.exports = function(isValidElement, throwOnDirectAccess) {
|
|
|
5303
5494
|
function createChainableTypeChecker(validate) {
|
|
5304
5495
|
if ("development" !== 'production') {
|
|
5305
5496
|
var manualPropTypeCallCache = {};
|
|
5497
|
+
var manualPropTypeWarningCount = 0;
|
|
5306
5498
|
}
|
|
5307
5499
|
function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
|
|
5308
5500
|
componentName = componentName || ANONYMOUS;
|
|
@@ -5320,7 +5512,11 @@ module.exports = function(isValidElement, throwOnDirectAccess) {
|
|
|
5320
5512
|
} else if ("development" !== 'production' && typeof console !== 'undefined') {
|
|
5321
5513
|
// Old behavior for people using React.PropTypes
|
|
5322
5514
|
var cacheKey = componentName + ':' + propName;
|
|
5323
|
-
if (
|
|
5515
|
+
if (
|
|
5516
|
+
!manualPropTypeCallCache[cacheKey] &&
|
|
5517
|
+
// Avoid spamming the console because they are often not actionable except for lib authors
|
|
5518
|
+
manualPropTypeWarningCount < 3
|
|
5519
|
+
) {
|
|
5324
5520
|
warning(
|
|
5325
5521
|
false,
|
|
5326
5522
|
'You are manually calling a React.PropTypes validation ' +
|
|
@@ -5332,6 +5528,7 @@ module.exports = function(isValidElement, throwOnDirectAccess) {
|
|
|
5332
5528
|
componentName
|
|
5333
5529
|
);
|
|
5334
5530
|
manualPropTypeCallCache[cacheKey] = true;
|
|
5531
|
+
manualPropTypeWarningCount++;
|
|
5335
5532
|
}
|
|
5336
5533
|
}
|
|
5337
5534
|
}
|
|
@@ -5469,6 +5666,20 @@ module.exports = function(isValidElement, throwOnDirectAccess) {
|
|
|
5469
5666
|
return emptyFunction.thatReturnsNull;
|
|
5470
5667
|
}
|
|
5471
5668
|
|
|
5669
|
+
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
5670
|
+
var checker = arrayOfTypeCheckers[i];
|
|
5671
|
+
if (typeof checker !== 'function') {
|
|
5672
|
+
warning(
|
|
5673
|
+
false,
|
|
5674
|
+
'Invalid argument supplid to oneOfType. Expected an array of check functions, but ' +
|
|
5675
|
+
'received %s at index %s.',
|
|
5676
|
+
getPostfixForTypeWarning(checker),
|
|
5677
|
+
i
|
|
5678
|
+
);
|
|
5679
|
+
return emptyFunction.thatReturnsNull;
|
|
5680
|
+
}
|
|
5681
|
+
}
|
|
5682
|
+
|
|
5472
5683
|
function validate(props, propName, componentName, location, propFullName) {
|
|
5473
5684
|
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
5474
5685
|
var checker = arrayOfTypeCheckers[i];
|
|
@@ -5601,6 +5812,9 @@ module.exports = function(isValidElement, throwOnDirectAccess) {
|
|
|
5601
5812
|
// This handles more types than `getPropType`. Only used for error messages.
|
|
5602
5813
|
// See `createPrimitiveTypeChecker`.
|
|
5603
5814
|
function getPreciseType(propValue) {
|
|
5815
|
+
if (typeof propValue === 'undefined' || propValue === null) {
|
|
5816
|
+
return '' + propValue;
|
|
5817
|
+
}
|
|
5604
5818
|
var propType = getPropType(propValue);
|
|
5605
5819
|
if (propType === 'object') {
|
|
5606
5820
|
if (propValue instanceof Date) {
|
|
@@ -5612,6 +5826,23 @@ module.exports = function(isValidElement, throwOnDirectAccess) {
|
|
|
5612
5826
|
return propType;
|
|
5613
5827
|
}
|
|
5614
5828
|
|
|
5829
|
+
// Returns a string that is postfixed to a warning about an invalid type.
|
|
5830
|
+
// For example, "undefined" or "of type array"
|
|
5831
|
+
function getPostfixForTypeWarning(value) {
|
|
5832
|
+
var type = getPreciseType(value);
|
|
5833
|
+
switch (type) {
|
|
5834
|
+
case 'array':
|
|
5835
|
+
case 'object':
|
|
5836
|
+
return 'an ' + type;
|
|
5837
|
+
case 'boolean':
|
|
5838
|
+
case 'date':
|
|
5839
|
+
case 'regexp':
|
|
5840
|
+
return 'a ' + type;
|
|
5841
|
+
default:
|
|
5842
|
+
return type;
|
|
5843
|
+
}
|
|
5844
|
+
}
|
|
5845
|
+
|
|
5615
5846
|
// Returns class name of the object, if any.
|
|
5616
5847
|
function getClassName(propValue) {
|
|
5617
5848
|
if (!propValue.constructor || !propValue.constructor.name) {
|
|
@@ -5626,7 +5857,7 @@ module.exports = function(isValidElement, throwOnDirectAccess) {
|
|
|
5626
5857
|
return ReactPropTypes;
|
|
5627
5858
|
};
|
|
5628
5859
|
|
|
5629
|
-
},{"
|
|
5860
|
+
},{"46":46,"48":48,"50":50,"52":52,"55":55}],55:[function(_dereq_,module,exports){
|
|
5630
5861
|
/**
|
|
5631
5862
|
* Copyright 2013-present, Facebook, Inc.
|
|
5632
5863
|
* All rights reserved.
|
|
@@ -5642,5 +5873,5 @@ var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
|
|
5642
5873
|
|
|
5643
5874
|
module.exports = ReactPropTypesSecret;
|
|
5644
5875
|
|
|
5645
|
-
},{}]},{},[
|
|
5876
|
+
},{}]},{},[30])(30)
|
|
5646
5877
|
});
|