react 16.0.0-alpha.12 → 16.0.0-alpha.13
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/cjs/react.development.js +197 -478
- package/cjs/react.production.min.js +1 -1
- package/package.json +1 -2
- package/umd/react.development.js +233 -1712
- package/umd/react.production.min.js +2 -2
package/cjs/react.development.js
CHANGED
|
@@ -6,8 +6,6 @@ var emptyObject = require('fbjs/lib/emptyObject');
|
|
|
6
6
|
var invariant = require('fbjs/lib/invariant');
|
|
7
7
|
var emptyFunction = require('fbjs/lib/emptyFunction');
|
|
8
8
|
var checkPropTypes = require('prop-types/checkPropTypes');
|
|
9
|
-
var propTypes = require('prop-types');
|
|
10
|
-
var factory = require('create-react-class/factory');
|
|
11
9
|
|
|
12
10
|
/**
|
|
13
11
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
@@ -99,29 +97,68 @@ var ReactNoopUpdateQueue = {
|
|
|
99
97
|
var ReactNoopUpdateQueue_1 = ReactNoopUpdateQueue;
|
|
100
98
|
|
|
101
99
|
/**
|
|
102
|
-
* Copyright
|
|
100
|
+
* Copyright 2014-2015, Facebook, Inc.
|
|
103
101
|
* All rights reserved.
|
|
104
102
|
*
|
|
105
103
|
* This source code is licensed under the BSD-style license found in the
|
|
106
104
|
* LICENSE file in the root directory of this source tree. An additional grant
|
|
107
105
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
108
106
|
*
|
|
109
|
-
*
|
|
110
|
-
* @providesModule canDefineProperty
|
|
107
|
+
* @providesModule lowPriorityWarning
|
|
111
108
|
*/
|
|
112
109
|
|
|
113
|
-
|
|
110
|
+
/**
|
|
111
|
+
* Forked from fbjs/warning:
|
|
112
|
+
* https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js
|
|
113
|
+
*
|
|
114
|
+
* Only change is we use console.warn instead of console.error,
|
|
115
|
+
* and do nothing when 'console' is not supported.
|
|
116
|
+
* This really simplifies the code.
|
|
117
|
+
* ---
|
|
118
|
+
* Similar to invariant but only logs a warning if the condition is not met.
|
|
119
|
+
* This can be used to log issues in development environments in critical
|
|
120
|
+
* paths. Removing the logging code for production environments will keep the
|
|
121
|
+
* same logic and follow the same code paths.
|
|
122
|
+
*/
|
|
123
|
+
|
|
124
|
+
var lowPriorityWarning = function () {};
|
|
125
|
+
|
|
114
126
|
{
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
127
|
+
var printWarning = function (format) {
|
|
128
|
+
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
129
|
+
args[_key - 1] = arguments[_key];
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
var argIndex = 0;
|
|
133
|
+
var message = 'Warning: ' + format.replace(/%s/g, function () {
|
|
134
|
+
return args[argIndex++];
|
|
135
|
+
});
|
|
136
|
+
if (typeof console !== 'undefined') {
|
|
137
|
+
console.warn(message);
|
|
138
|
+
}
|
|
139
|
+
try {
|
|
140
|
+
// --- Welcome to debugging React ---
|
|
141
|
+
// This error was thrown as a convenience so that you can use this stack
|
|
142
|
+
// to find the callsite that caused this warning to fire.
|
|
143
|
+
throw new Error(message);
|
|
144
|
+
} catch (x) {}
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
lowPriorityWarning = function (condition, format) {
|
|
148
|
+
if (format === undefined) {
|
|
149
|
+
throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
|
|
150
|
+
}
|
|
151
|
+
if (!condition) {
|
|
152
|
+
for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
|
|
153
|
+
args[_key2 - 2] = arguments[_key2];
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
printWarning.apply(undefined, [format].concat(args));
|
|
157
|
+
}
|
|
158
|
+
};
|
|
122
159
|
}
|
|
123
160
|
|
|
124
|
-
var
|
|
161
|
+
var lowPriorityWarning_1 = lowPriorityWarning;
|
|
125
162
|
|
|
126
163
|
/**
|
|
127
164
|
* Base class helpers for the updating state of a component.
|
|
@@ -196,14 +233,12 @@ ReactComponent.prototype.forceUpdate = function (callback) {
|
|
|
196
233
|
replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']
|
|
197
234
|
};
|
|
198
235
|
var defineDeprecationWarning = function (methodName, info) {
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
});
|
|
206
|
-
}
|
|
236
|
+
Object.defineProperty(ReactComponent.prototype, methodName, {
|
|
237
|
+
get: function () {
|
|
238
|
+
lowPriorityWarning_1(false, '%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);
|
|
239
|
+
return undefined;
|
|
240
|
+
}
|
|
241
|
+
});
|
|
207
242
|
};
|
|
208
243
|
for (var fnName in deprecatedAPIs) {
|
|
209
244
|
if (deprecatedAPIs.hasOwnProperty(fnName)) {
|
|
@@ -361,29 +396,12 @@ var ReactCurrentOwner = {
|
|
|
361
396
|
|
|
362
397
|
var ReactCurrentOwner_1 = ReactCurrentOwner;
|
|
363
398
|
|
|
364
|
-
|
|
365
|
-
* Copyright 2014-present, Facebook, Inc.
|
|
366
|
-
* All rights reserved.
|
|
367
|
-
*
|
|
368
|
-
* This source code is licensed under the BSD-style license found in the
|
|
369
|
-
* LICENSE file in the root directory of this source tree. An additional grant
|
|
370
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
371
|
-
*
|
|
372
|
-
* @providesModule ReactElementSymbol
|
|
373
|
-
*
|
|
374
|
-
*/
|
|
399
|
+
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
375
400
|
|
|
376
401
|
// The Symbol used to tag the ReactElement type. If there is no native Symbol
|
|
377
402
|
// nor polyfill, then a plain number is used for performance.
|
|
378
|
-
|
|
379
403
|
var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7;
|
|
380
404
|
|
|
381
|
-
var ReactElementSymbol = REACT_ELEMENT_TYPE;
|
|
382
|
-
|
|
383
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
405
|
var RESERVED_PROPS = {
|
|
388
406
|
key: true,
|
|
389
407
|
ref: true,
|
|
@@ -469,7 +487,7 @@ function defineRefPropWarningGetter(props, displayName) {
|
|
|
469
487
|
var ReactElement = function (type, key, ref, self, source, owner, props) {
|
|
470
488
|
var element = {
|
|
471
489
|
// This tag allow us to uniquely identify this as a React Element
|
|
472
|
-
$$typeof:
|
|
490
|
+
$$typeof: REACT_ELEMENT_TYPE,
|
|
473
491
|
|
|
474
492
|
// Built-in properties that belong on the element
|
|
475
493
|
type: type,
|
|
@@ -492,33 +510,27 @@ var ReactElement = function (type, key, ref, self, source, owner, props) {
|
|
|
492
510
|
// the validation flag non-enumerable (where possible, which should
|
|
493
511
|
// include every environment we run tests in), so the test framework
|
|
494
512
|
// ignores it.
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
});
|
|
517
|
-
} else {
|
|
518
|
-
element._store.validated = false;
|
|
519
|
-
element._self = self;
|
|
520
|
-
element._source = source;
|
|
521
|
-
}
|
|
513
|
+
Object.defineProperty(element._store, 'validated', {
|
|
514
|
+
configurable: false,
|
|
515
|
+
enumerable: false,
|
|
516
|
+
writable: true,
|
|
517
|
+
value: false
|
|
518
|
+
});
|
|
519
|
+
// self and source are DEV only properties.
|
|
520
|
+
Object.defineProperty(element, '_self', {
|
|
521
|
+
configurable: false,
|
|
522
|
+
enumerable: false,
|
|
523
|
+
writable: false,
|
|
524
|
+
value: self
|
|
525
|
+
});
|
|
526
|
+
// Two elements created in two different places should be considered
|
|
527
|
+
// equal for testing purposes and therefore we hide it from enumeration.
|
|
528
|
+
Object.defineProperty(element, '_source', {
|
|
529
|
+
configurable: false,
|
|
530
|
+
enumerable: false,
|
|
531
|
+
writable: false,
|
|
532
|
+
value: source
|
|
533
|
+
});
|
|
522
534
|
if (Object.freeze) {
|
|
523
535
|
Object.freeze(element.props);
|
|
524
536
|
Object.freeze(element);
|
|
@@ -590,7 +602,7 @@ ReactElement.createElement = function (type, config, children) {
|
|
|
590
602
|
}
|
|
591
603
|
{
|
|
592
604
|
if (key || ref) {
|
|
593
|
-
if (typeof props.$$typeof === 'undefined' || props.$$typeof !==
|
|
605
|
+
if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {
|
|
594
606
|
var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
|
|
595
607
|
if (key) {
|
|
596
608
|
defineKeyPropWarningGetter(props, displayName);
|
|
@@ -609,14 +621,14 @@ ReactElement.createElement = function (type, config, children) {
|
|
|
609
621
|
* See https://facebook.github.io/react/docs/react-api.html#createfactory
|
|
610
622
|
*/
|
|
611
623
|
ReactElement.createFactory = function (type) {
|
|
612
|
-
var factory
|
|
624
|
+
var factory = ReactElement.createElement.bind(null, type);
|
|
613
625
|
// Expose the type on the factory and the prototype so that it can be
|
|
614
626
|
// easily accessed on elements. E.g. `<Foo />.type === Foo`.
|
|
615
627
|
// This should not be named `constructor` since this may not be the function
|
|
616
628
|
// that created the element, and it may not even be a constructor.
|
|
617
629
|
// Legacy hook TODO: Warn if this is accessed
|
|
618
|
-
factory
|
|
619
|
-
return factory
|
|
630
|
+
factory.type = type;
|
|
631
|
+
return factory;
|
|
620
632
|
};
|
|
621
633
|
|
|
622
634
|
ReactElement.cloneAndReplaceKey = function (oldElement, newKey) {
|
|
@@ -699,109 +711,11 @@ ReactElement.cloneElement = function (element, config, children) {
|
|
|
699
711
|
* @final
|
|
700
712
|
*/
|
|
701
713
|
ReactElement.isValidElement = function (object) {
|
|
702
|
-
return typeof object === 'object' && object !== null && object.$$typeof ===
|
|
714
|
+
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
703
715
|
};
|
|
704
716
|
|
|
705
717
|
var ReactElement_1 = ReactElement;
|
|
706
718
|
|
|
707
|
-
/**
|
|
708
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
709
|
-
* All rights reserved.
|
|
710
|
-
*
|
|
711
|
-
* This source code is licensed under the BSD-style license found in the
|
|
712
|
-
* LICENSE file in the root directory of this source tree. An additional grant
|
|
713
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
714
|
-
*
|
|
715
|
-
* @providesModule getIteratorFn
|
|
716
|
-
*
|
|
717
|
-
*/
|
|
718
|
-
|
|
719
|
-
/* global Symbol */
|
|
720
|
-
|
|
721
|
-
var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
|
722
|
-
var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
|
|
723
|
-
|
|
724
|
-
/**
|
|
725
|
-
* Returns the iterator method function contained on the iterable object.
|
|
726
|
-
*
|
|
727
|
-
* Be sure to invoke the function with the iterable as context:
|
|
728
|
-
*
|
|
729
|
-
* var iteratorFn = getIteratorFn(myIterable);
|
|
730
|
-
* if (iteratorFn) {
|
|
731
|
-
* var iterator = iteratorFn.call(myIterable);
|
|
732
|
-
* ...
|
|
733
|
-
* }
|
|
734
|
-
*
|
|
735
|
-
* @param {?object} maybeIterable
|
|
736
|
-
* @return {?function}
|
|
737
|
-
*/
|
|
738
|
-
function getIteratorFn(maybeIterable) {
|
|
739
|
-
var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
|
|
740
|
-
if (typeof iteratorFn === 'function') {
|
|
741
|
-
return iteratorFn;
|
|
742
|
-
}
|
|
743
|
-
}
|
|
744
|
-
|
|
745
|
-
var getIteratorFn_1 = getIteratorFn;
|
|
746
|
-
|
|
747
|
-
/**
|
|
748
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
749
|
-
* All rights reserved.
|
|
750
|
-
*
|
|
751
|
-
* This source code is licensed under the BSD-style license found in the
|
|
752
|
-
* LICENSE file in the root directory of this source tree. An additional grant
|
|
753
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
754
|
-
*
|
|
755
|
-
* @providesModule KeyEscapeUtils
|
|
756
|
-
*
|
|
757
|
-
*/
|
|
758
|
-
|
|
759
|
-
/**
|
|
760
|
-
* Escape and wrap key so it is safe to use as a reactid
|
|
761
|
-
*
|
|
762
|
-
* @param {string} key to be escaped.
|
|
763
|
-
* @return {string} the escaped key.
|
|
764
|
-
*/
|
|
765
|
-
|
|
766
|
-
function escape(key) {
|
|
767
|
-
var escapeRegex = /[=:]/g;
|
|
768
|
-
var escaperLookup = {
|
|
769
|
-
'=': '=0',
|
|
770
|
-
':': '=2'
|
|
771
|
-
};
|
|
772
|
-
var escapedString = ('' + key).replace(escapeRegex, function (match) {
|
|
773
|
-
return escaperLookup[match];
|
|
774
|
-
});
|
|
775
|
-
|
|
776
|
-
return '$' + escapedString;
|
|
777
|
-
}
|
|
778
|
-
|
|
779
|
-
/**
|
|
780
|
-
* Unescape and unwrap key for human-readable display
|
|
781
|
-
*
|
|
782
|
-
* @param {string} key to unescape.
|
|
783
|
-
* @return {string} the unescaped key.
|
|
784
|
-
*/
|
|
785
|
-
function unescape(key) {
|
|
786
|
-
var unescapeRegex = /(=0|=2)/g;
|
|
787
|
-
var unescaperLookup = {
|
|
788
|
-
'=0': '=',
|
|
789
|
-
'=2': ':'
|
|
790
|
-
};
|
|
791
|
-
var keySubstring = key[0] === '.' && key[1] === '$' ? key.substring(2) : key.substring(1);
|
|
792
|
-
|
|
793
|
-
return ('' + keySubstring).replace(unescapeRegex, function (match) {
|
|
794
|
-
return unescaperLookup[match];
|
|
795
|
-
});
|
|
796
|
-
}
|
|
797
|
-
|
|
798
|
-
var KeyEscapeUtils = {
|
|
799
|
-
escape: escape,
|
|
800
|
-
unescape: unescape
|
|
801
|
-
};
|
|
802
|
-
|
|
803
|
-
var KeyEscapeUtils_1 = KeyEscapeUtils;
|
|
804
|
-
|
|
805
719
|
/**
|
|
806
720
|
* Copyright 2013-present, Facebook, Inc.
|
|
807
721
|
* All rights reserved.
|
|
@@ -1236,6 +1150,12 @@ var ReactComponentTreeHook = {
|
|
|
1236
1150
|
|
|
1237
1151
|
var ReactComponentTreeHook_1 = ReactComponentTreeHook;
|
|
1238
1152
|
|
|
1153
|
+
var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
|
1154
|
+
var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
|
|
1155
|
+
// The Symbol used to tag the ReactElement type. If there is no native Symbol
|
|
1156
|
+
// nor polyfill, then a plain number is used for performance.
|
|
1157
|
+
var REACT_ELEMENT_TYPE$1 = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7;
|
|
1158
|
+
|
|
1239
1159
|
{
|
|
1240
1160
|
var _require = ReactComponentTreeHook_1,
|
|
1241
1161
|
getCurrentStackAddendum = _require.getCurrentStackAddendum;
|
|
@@ -1245,10 +1165,45 @@ var SEPARATOR = '.';
|
|
|
1245
1165
|
var SUBSEPARATOR = ':';
|
|
1246
1166
|
|
|
1247
1167
|
/**
|
|
1248
|
-
*
|
|
1249
|
-
* isomorphic and renderers. We could extract this to a
|
|
1168
|
+
* Escape and wrap key so it is safe to use as a reactid
|
|
1250
1169
|
*
|
|
1170
|
+
* @param {string} key to be escaped.
|
|
1171
|
+
* @return {string} the escaped key.
|
|
1251
1172
|
*/
|
|
1173
|
+
function escape(key) {
|
|
1174
|
+
var escapeRegex = /[=:]/g;
|
|
1175
|
+
var escaperLookup = {
|
|
1176
|
+
'=': '=0',
|
|
1177
|
+
':': '=2'
|
|
1178
|
+
};
|
|
1179
|
+
var escapedString = ('' + key).replace(escapeRegex, function (match) {
|
|
1180
|
+
return escaperLookup[match];
|
|
1181
|
+
});
|
|
1182
|
+
|
|
1183
|
+
return '$' + escapedString;
|
|
1184
|
+
}
|
|
1185
|
+
|
|
1186
|
+
var unescapeInDev = emptyFunction;
|
|
1187
|
+
{
|
|
1188
|
+
/**
|
|
1189
|
+
* Unescape and unwrap key for human-readable display
|
|
1190
|
+
*
|
|
1191
|
+
* @param {string} key to unescape.
|
|
1192
|
+
* @return {string} the unescaped key.
|
|
1193
|
+
*/
|
|
1194
|
+
unescapeInDev = function (key) {
|
|
1195
|
+
var unescapeRegex = /(=0|=2)/g;
|
|
1196
|
+
var unescaperLookup = {
|
|
1197
|
+
'=0': '=',
|
|
1198
|
+
'=2': ':'
|
|
1199
|
+
};
|
|
1200
|
+
var keySubstring = key[0] === '.' && key[1] === '$' ? key.substring(2) : key.substring(1);
|
|
1201
|
+
|
|
1202
|
+
return ('' + keySubstring).replace(unescapeRegex, function (match) {
|
|
1203
|
+
return unescaperLookup[match];
|
|
1204
|
+
});
|
|
1205
|
+
};
|
|
1206
|
+
}
|
|
1252
1207
|
|
|
1253
1208
|
/**
|
|
1254
1209
|
* TODO: Test that a single child and an array with one item have the same key
|
|
@@ -1269,7 +1224,7 @@ function getComponentKey(component, index) {
|
|
|
1269
1224
|
// that we don't block potential future ES APIs.
|
|
1270
1225
|
if (typeof component === 'object' && component !== null && component.key != null) {
|
|
1271
1226
|
// Explicit key
|
|
1272
|
-
return
|
|
1227
|
+
return escape(component.key);
|
|
1273
1228
|
}
|
|
1274
1229
|
// Implicit key determined by the index in the set
|
|
1275
1230
|
return index.toString(36);
|
|
@@ -1294,11 +1249,11 @@ function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext)
|
|
|
1294
1249
|
if (children === null || type === 'string' || type === 'number' ||
|
|
1295
1250
|
// The following is inlined from ReactElement. This means we can optimize
|
|
1296
1251
|
// some checks. React Fiber also inlines this logic for similar purposes.
|
|
1297
|
-
type === 'object' && children.$$typeof ===
|
|
1252
|
+
type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE$1) {
|
|
1298
1253
|
callback(traverseContext, children,
|
|
1299
1254
|
// If it's the only child, treat the name as if it was wrapped in an array
|
|
1300
1255
|
// so that it's consistent if the number of children grows.
|
|
1301
|
-
nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar);
|
|
1256
|
+
nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar, unescapeInDev);
|
|
1302
1257
|
return 1;
|
|
1303
1258
|
}
|
|
1304
1259
|
|
|
@@ -1314,8 +1269,8 @@ function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext)
|
|
|
1314
1269
|
subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
|
|
1315
1270
|
}
|
|
1316
1271
|
} else {
|
|
1317
|
-
var iteratorFn =
|
|
1318
|
-
if (iteratorFn) {
|
|
1272
|
+
var iteratorFn = ITERATOR_SYMBOL && children[ITERATOR_SYMBOL] || children[FAUX_ITERATOR_SYMBOL];
|
|
1273
|
+
if (typeof iteratorFn === 'function') {
|
|
1319
1274
|
{
|
|
1320
1275
|
// Warn about using Maps as children
|
|
1321
1276
|
if (iteratorFn === children.entries) {
|
|
@@ -1544,6 +1499,40 @@ var ReactChildren = {
|
|
|
1544
1499
|
|
|
1545
1500
|
var ReactChildren_1 = ReactChildren;
|
|
1546
1501
|
|
|
1502
|
+
/**
|
|
1503
|
+
* Copyright 2013-present, Facebook, Inc.
|
|
1504
|
+
* All rights reserved.
|
|
1505
|
+
*
|
|
1506
|
+
* This source code is licensed under the BSD-style license found in the
|
|
1507
|
+
* LICENSE file in the root directory of this source tree. An additional grant
|
|
1508
|
+
* of patent rights can be found in the PATENTS file in the same directory.
|
|
1509
|
+
*
|
|
1510
|
+
* @providesModule ReactVersion
|
|
1511
|
+
*/
|
|
1512
|
+
|
|
1513
|
+
var ReactVersion = '16.0.0-alpha.13';
|
|
1514
|
+
|
|
1515
|
+
/**
|
|
1516
|
+
* Returns the first child in a collection of children and verifies that there
|
|
1517
|
+
* is only one child in the collection.
|
|
1518
|
+
*
|
|
1519
|
+
* See https://facebook.github.io/react/docs/react-api.html#react.children.only
|
|
1520
|
+
*
|
|
1521
|
+
* The current implementation of this function assumes that a single child gets
|
|
1522
|
+
* passed without a wrapper, but the purpose of this helper function is to
|
|
1523
|
+
* abstract away the particular structure of children.
|
|
1524
|
+
*
|
|
1525
|
+
* @param {?object} children Child collection structure.
|
|
1526
|
+
* @return {ReactElement} The first and only `ReactElement` contained in the
|
|
1527
|
+
* structure.
|
|
1528
|
+
*/
|
|
1529
|
+
function onlyChild(children) {
|
|
1530
|
+
!ReactElement_1.isValidElement(children) ? invariant(false, 'React.Children.only expected to receive a single React element child.') : void 0;
|
|
1531
|
+
return children;
|
|
1532
|
+
}
|
|
1533
|
+
|
|
1534
|
+
var onlyChild_1 = onlyChild;
|
|
1535
|
+
|
|
1547
1536
|
var ReactDebugCurrentFrame$1 = {};
|
|
1548
1537
|
|
|
1549
1538
|
{
|
|
@@ -1551,8 +1540,8 @@ var ReactDebugCurrentFrame$1 = {};
|
|
|
1551
1540
|
getStackAddendumByID = _require$2.getStackAddendumByID,
|
|
1552
1541
|
getCurrentStackAddendum$2 = _require$2.getCurrentStackAddendum;
|
|
1553
1542
|
|
|
1554
|
-
var _require2
|
|
1555
|
-
getStackAddendumByWorkInProgressFiber$2 = _require2
|
|
1543
|
+
var _require2 = ReactFiberComponentTreeHook,
|
|
1544
|
+
getStackAddendumByWorkInProgressFiber$2 = _require2.getStackAddendumByWorkInProgressFiber;
|
|
1556
1545
|
|
|
1557
1546
|
// Component that is being worked on
|
|
1558
1547
|
|
|
@@ -1589,13 +1578,17 @@ var ReactDebugCurrentFrame_1 = ReactDebugCurrentFrame$1;
|
|
|
1589
1578
|
|
|
1590
1579
|
{
|
|
1591
1580
|
var checkPropTypes$1 = checkPropTypes;
|
|
1592
|
-
var
|
|
1581
|
+
var lowPriorityWarning$1 = lowPriorityWarning_1;
|
|
1593
1582
|
var ReactDebugCurrentFrame = ReactDebugCurrentFrame_1;
|
|
1583
|
+
var warning$1 = warning;
|
|
1594
1584
|
|
|
1595
1585
|
var _require$1 = ReactComponentTreeHook_1,
|
|
1596
1586
|
getCurrentStackAddendum$1 = _require$1.getCurrentStackAddendum;
|
|
1597
1587
|
}
|
|
1598
1588
|
|
|
1589
|
+
var ITERATOR_SYMBOL$1 = typeof Symbol === 'function' && Symbol.iterator;
|
|
1590
|
+
var FAUX_ITERATOR_SYMBOL$1 = '@@iterator'; // Before Symbol spec.
|
|
1591
|
+
|
|
1599
1592
|
function getDeclarationErrorAddendum() {
|
|
1600
1593
|
if (ReactCurrentOwner_1.current) {
|
|
1601
1594
|
var name = getComponentName_1(ReactCurrentOwner_1.current);
|
|
@@ -1667,7 +1660,7 @@ function validateExplicitKey(element, parentType) {
|
|
|
1667
1660
|
childOwner = ' It was passed a child from ' + getComponentName_1(element._owner) + '.';
|
|
1668
1661
|
}
|
|
1669
1662
|
|
|
1670
|
-
warning$
|
|
1663
|
+
warning$1(false, 'Each child in an array or iterator should have a unique "key" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.%s', currentComponentErrorInfo, childOwner, getCurrentStackAddendum$1(element));
|
|
1671
1664
|
}
|
|
1672
1665
|
|
|
1673
1666
|
/**
|
|
@@ -1696,9 +1689,10 @@ function validateChildKeys(node, parentType) {
|
|
|
1696
1689
|
node._store.validated = true;
|
|
1697
1690
|
}
|
|
1698
1691
|
} else if (node) {
|
|
1699
|
-
var iteratorFn =
|
|
1700
|
-
|
|
1701
|
-
|
|
1692
|
+
var iteratorFn = ITERATOR_SYMBOL$1 && node[ITERATOR_SYMBOL$1] || node[FAUX_ITERATOR_SYMBOL$1];
|
|
1693
|
+
if (typeof iteratorFn === 'function') {
|
|
1694
|
+
// Entry iterators used to provide implicit keys,
|
|
1695
|
+
// but now we print a separate warning for them later.
|
|
1702
1696
|
if (iteratorFn !== node.entries) {
|
|
1703
1697
|
var iterator = iteratorFn.call(node);
|
|
1704
1698
|
var step;
|
|
@@ -1730,17 +1724,17 @@ function validatePropTypes(element) {
|
|
|
1730
1724
|
// Avoid triggering that warning during validation using the temporary workaround,
|
|
1731
1725
|
// __propTypesSecretDontUseThesePlease.
|
|
1732
1726
|
// TODO (bvaughn) Revert this particular change any time after April 1 ReactNative tag.
|
|
1733
|
-
var propTypes
|
|
1727
|
+
var propTypes = typeof componentClass.__propTypesSecretDontUseThesePlease === 'object' ? componentClass.__propTypesSecretDontUseThesePlease : componentClass.propTypes;
|
|
1734
1728
|
|
|
1735
|
-
if (propTypes
|
|
1736
|
-
checkPropTypes$1(propTypes
|
|
1729
|
+
if (propTypes) {
|
|
1730
|
+
checkPropTypes$1(propTypes, element.props, 'prop', name, ReactDebugCurrentFrame.getStackAddendum);
|
|
1737
1731
|
}
|
|
1738
1732
|
if (typeof componentClass.getDefaultProps === 'function') {
|
|
1739
|
-
warning$
|
|
1733
|
+
warning$1(componentClass.getDefaultProps.isReactClassApproved, 'getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
|
|
1740
1734
|
}
|
|
1741
1735
|
}
|
|
1742
1736
|
|
|
1743
|
-
var ReactElementValidator$
|
|
1737
|
+
var ReactElementValidator$1 = {
|
|
1744
1738
|
createElement: function (type, props, children) {
|
|
1745
1739
|
var validType = typeof type === 'string' || typeof type === 'function';
|
|
1746
1740
|
// We warn in this case but don't throw. We expect the element creation to
|
|
@@ -1760,7 +1754,7 @@ var ReactElementValidator$2 = {
|
|
|
1760
1754
|
|
|
1761
1755
|
info += getCurrentStackAddendum$1();
|
|
1762
1756
|
|
|
1763
|
-
warning$
|
|
1757
|
+
warning$1(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);
|
|
1764
1758
|
}
|
|
1765
1759
|
|
|
1766
1760
|
var element = ReactElement_1.createElement.apply(this, arguments);
|
|
@@ -1796,23 +1790,21 @@ var ReactElementValidator$2 = {
|
|
|
1796
1790
|
},
|
|
1797
1791
|
|
|
1798
1792
|
createFactory: function (type) {
|
|
1799
|
-
var validatedFactory = ReactElementValidator$
|
|
1793
|
+
var validatedFactory = ReactElementValidator$1.createElement.bind(null, type);
|
|
1800
1794
|
// Legacy hook TODO: Warn if this is accessed
|
|
1801
1795
|
validatedFactory.type = type;
|
|
1802
1796
|
|
|
1803
1797
|
{
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
});
|
|
1815
|
-
}
|
|
1798
|
+
Object.defineProperty(validatedFactory, 'type', {
|
|
1799
|
+
enumerable: false,
|
|
1800
|
+
get: function () {
|
|
1801
|
+
lowPriorityWarning$1(false, 'Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');
|
|
1802
|
+
Object.defineProperty(this, 'type', {
|
|
1803
|
+
value: type
|
|
1804
|
+
});
|
|
1805
|
+
return type;
|
|
1806
|
+
}
|
|
1807
|
+
});
|
|
1816
1808
|
}
|
|
1817
1809
|
|
|
1818
1810
|
return validatedFactory;
|
|
@@ -1834,228 +1826,20 @@ var ReactElementValidator$2 = {
|
|
|
1834
1826
|
}
|
|
1835
1827
|
};
|
|
1836
1828
|
|
|
1837
|
-
var ReactElementValidator_1 = ReactElementValidator$
|
|
1838
|
-
|
|
1839
|
-
/**
|
|
1840
|
-
* Create a factory that creates HTML tag elements.
|
|
1841
|
-
*
|
|
1842
|
-
* @private
|
|
1843
|
-
*/
|
|
1844
|
-
var createDOMFactory = ReactElement_1.createFactory;
|
|
1845
|
-
{
|
|
1846
|
-
var ReactElementValidator$1 = ReactElementValidator_1;
|
|
1847
|
-
createDOMFactory = ReactElementValidator$1.createFactory;
|
|
1848
|
-
}
|
|
1849
|
-
|
|
1850
|
-
/**
|
|
1851
|
-
* Creates a mapping from supported HTML tags to `ReactDOMComponent` classes.
|
|
1852
|
-
*
|
|
1853
|
-
* @public
|
|
1854
|
-
*/
|
|
1855
|
-
var ReactDOMFactories = {
|
|
1856
|
-
a: createDOMFactory('a'),
|
|
1857
|
-
abbr: createDOMFactory('abbr'),
|
|
1858
|
-
address: createDOMFactory('address'),
|
|
1859
|
-
area: createDOMFactory('area'),
|
|
1860
|
-
article: createDOMFactory('article'),
|
|
1861
|
-
aside: createDOMFactory('aside'),
|
|
1862
|
-
audio: createDOMFactory('audio'),
|
|
1863
|
-
b: createDOMFactory('b'),
|
|
1864
|
-
base: createDOMFactory('base'),
|
|
1865
|
-
bdi: createDOMFactory('bdi'),
|
|
1866
|
-
bdo: createDOMFactory('bdo'),
|
|
1867
|
-
big: createDOMFactory('big'),
|
|
1868
|
-
blockquote: createDOMFactory('blockquote'),
|
|
1869
|
-
body: createDOMFactory('body'),
|
|
1870
|
-
br: createDOMFactory('br'),
|
|
1871
|
-
button: createDOMFactory('button'),
|
|
1872
|
-
canvas: createDOMFactory('canvas'),
|
|
1873
|
-
caption: createDOMFactory('caption'),
|
|
1874
|
-
cite: createDOMFactory('cite'),
|
|
1875
|
-
code: createDOMFactory('code'),
|
|
1876
|
-
col: createDOMFactory('col'),
|
|
1877
|
-
colgroup: createDOMFactory('colgroup'),
|
|
1878
|
-
data: createDOMFactory('data'),
|
|
1879
|
-
datalist: createDOMFactory('datalist'),
|
|
1880
|
-
dd: createDOMFactory('dd'),
|
|
1881
|
-
del: createDOMFactory('del'),
|
|
1882
|
-
details: createDOMFactory('details'),
|
|
1883
|
-
dfn: createDOMFactory('dfn'),
|
|
1884
|
-
dialog: createDOMFactory('dialog'),
|
|
1885
|
-
div: createDOMFactory('div'),
|
|
1886
|
-
dl: createDOMFactory('dl'),
|
|
1887
|
-
dt: createDOMFactory('dt'),
|
|
1888
|
-
em: createDOMFactory('em'),
|
|
1889
|
-
embed: createDOMFactory('embed'),
|
|
1890
|
-
fieldset: createDOMFactory('fieldset'),
|
|
1891
|
-
figcaption: createDOMFactory('figcaption'),
|
|
1892
|
-
figure: createDOMFactory('figure'),
|
|
1893
|
-
footer: createDOMFactory('footer'),
|
|
1894
|
-
form: createDOMFactory('form'),
|
|
1895
|
-
h1: createDOMFactory('h1'),
|
|
1896
|
-
h2: createDOMFactory('h2'),
|
|
1897
|
-
h3: createDOMFactory('h3'),
|
|
1898
|
-
h4: createDOMFactory('h4'),
|
|
1899
|
-
h5: createDOMFactory('h5'),
|
|
1900
|
-
h6: createDOMFactory('h6'),
|
|
1901
|
-
head: createDOMFactory('head'),
|
|
1902
|
-
header: createDOMFactory('header'),
|
|
1903
|
-
hgroup: createDOMFactory('hgroup'),
|
|
1904
|
-
hr: createDOMFactory('hr'),
|
|
1905
|
-
html: createDOMFactory('html'),
|
|
1906
|
-
i: createDOMFactory('i'),
|
|
1907
|
-
iframe: createDOMFactory('iframe'),
|
|
1908
|
-
img: createDOMFactory('img'),
|
|
1909
|
-
input: createDOMFactory('input'),
|
|
1910
|
-
ins: createDOMFactory('ins'),
|
|
1911
|
-
kbd: createDOMFactory('kbd'),
|
|
1912
|
-
keygen: createDOMFactory('keygen'),
|
|
1913
|
-
label: createDOMFactory('label'),
|
|
1914
|
-
legend: createDOMFactory('legend'),
|
|
1915
|
-
li: createDOMFactory('li'),
|
|
1916
|
-
link: createDOMFactory('link'),
|
|
1917
|
-
main: createDOMFactory('main'),
|
|
1918
|
-
map: createDOMFactory('map'),
|
|
1919
|
-
mark: createDOMFactory('mark'),
|
|
1920
|
-
menu: createDOMFactory('menu'),
|
|
1921
|
-
menuitem: createDOMFactory('menuitem'),
|
|
1922
|
-
meta: createDOMFactory('meta'),
|
|
1923
|
-
meter: createDOMFactory('meter'),
|
|
1924
|
-
nav: createDOMFactory('nav'),
|
|
1925
|
-
noscript: createDOMFactory('noscript'),
|
|
1926
|
-
object: createDOMFactory('object'),
|
|
1927
|
-
ol: createDOMFactory('ol'),
|
|
1928
|
-
optgroup: createDOMFactory('optgroup'),
|
|
1929
|
-
option: createDOMFactory('option'),
|
|
1930
|
-
output: createDOMFactory('output'),
|
|
1931
|
-
p: createDOMFactory('p'),
|
|
1932
|
-
param: createDOMFactory('param'),
|
|
1933
|
-
picture: createDOMFactory('picture'),
|
|
1934
|
-
pre: createDOMFactory('pre'),
|
|
1935
|
-
progress: createDOMFactory('progress'),
|
|
1936
|
-
q: createDOMFactory('q'),
|
|
1937
|
-
rp: createDOMFactory('rp'),
|
|
1938
|
-
rt: createDOMFactory('rt'),
|
|
1939
|
-
ruby: createDOMFactory('ruby'),
|
|
1940
|
-
s: createDOMFactory('s'),
|
|
1941
|
-
samp: createDOMFactory('samp'),
|
|
1942
|
-
script: createDOMFactory('script'),
|
|
1943
|
-
section: createDOMFactory('section'),
|
|
1944
|
-
select: createDOMFactory('select'),
|
|
1945
|
-
small: createDOMFactory('small'),
|
|
1946
|
-
source: createDOMFactory('source'),
|
|
1947
|
-
span: createDOMFactory('span'),
|
|
1948
|
-
strong: createDOMFactory('strong'),
|
|
1949
|
-
style: createDOMFactory('style'),
|
|
1950
|
-
sub: createDOMFactory('sub'),
|
|
1951
|
-
summary: createDOMFactory('summary'),
|
|
1952
|
-
sup: createDOMFactory('sup'),
|
|
1953
|
-
table: createDOMFactory('table'),
|
|
1954
|
-
tbody: createDOMFactory('tbody'),
|
|
1955
|
-
td: createDOMFactory('td'),
|
|
1956
|
-
textarea: createDOMFactory('textarea'),
|
|
1957
|
-
tfoot: createDOMFactory('tfoot'),
|
|
1958
|
-
th: createDOMFactory('th'),
|
|
1959
|
-
thead: createDOMFactory('thead'),
|
|
1960
|
-
time: createDOMFactory('time'),
|
|
1961
|
-
title: createDOMFactory('title'),
|
|
1962
|
-
tr: createDOMFactory('tr'),
|
|
1963
|
-
track: createDOMFactory('track'),
|
|
1964
|
-
u: createDOMFactory('u'),
|
|
1965
|
-
ul: createDOMFactory('ul'),
|
|
1966
|
-
'var': createDOMFactory('var'),
|
|
1967
|
-
video: createDOMFactory('video'),
|
|
1968
|
-
wbr: createDOMFactory('wbr'),
|
|
1969
|
-
|
|
1970
|
-
// SVG
|
|
1971
|
-
circle: createDOMFactory('circle'),
|
|
1972
|
-
clipPath: createDOMFactory('clipPath'),
|
|
1973
|
-
defs: createDOMFactory('defs'),
|
|
1974
|
-
ellipse: createDOMFactory('ellipse'),
|
|
1975
|
-
g: createDOMFactory('g'),
|
|
1976
|
-
image: createDOMFactory('image'),
|
|
1977
|
-
line: createDOMFactory('line'),
|
|
1978
|
-
linearGradient: createDOMFactory('linearGradient'),
|
|
1979
|
-
mask: createDOMFactory('mask'),
|
|
1980
|
-
path: createDOMFactory('path'),
|
|
1981
|
-
pattern: createDOMFactory('pattern'),
|
|
1982
|
-
polygon: createDOMFactory('polygon'),
|
|
1983
|
-
polyline: createDOMFactory('polyline'),
|
|
1984
|
-
radialGradient: createDOMFactory('radialGradient'),
|
|
1985
|
-
rect: createDOMFactory('rect'),
|
|
1986
|
-
stop: createDOMFactory('stop'),
|
|
1987
|
-
svg: createDOMFactory('svg'),
|
|
1988
|
-
text: createDOMFactory('text'),
|
|
1989
|
-
tspan: createDOMFactory('tspan')
|
|
1990
|
-
};
|
|
1991
|
-
|
|
1992
|
-
var ReactDOMFactories_1 = ReactDOMFactories;
|
|
1993
|
-
|
|
1994
|
-
var ReactPropTypes = propTypes;
|
|
1995
|
-
|
|
1996
|
-
/**
|
|
1997
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
1998
|
-
* All rights reserved.
|
|
1999
|
-
*
|
|
2000
|
-
* This source code is licensed under the BSD-style license found in the
|
|
2001
|
-
* LICENSE file in the root directory of this source tree. An additional grant
|
|
2002
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
2003
|
-
*
|
|
2004
|
-
* @providesModule ReactVersion
|
|
2005
|
-
*/
|
|
2006
|
-
|
|
2007
|
-
var ReactVersion = '16.0.0-alpha.12';
|
|
2008
|
-
|
|
2009
|
-
/**
|
|
2010
|
-
* Returns the first child in a collection of children and verifies that there
|
|
2011
|
-
* is only one child in the collection.
|
|
2012
|
-
*
|
|
2013
|
-
* See https://facebook.github.io/react/docs/react-api.html#react.children.only
|
|
2014
|
-
*
|
|
2015
|
-
* The current implementation of this function assumes that a single child gets
|
|
2016
|
-
* passed without a wrapper, but the purpose of this helper function is to
|
|
2017
|
-
* abstract away the particular structure of children.
|
|
2018
|
-
*
|
|
2019
|
-
* @param {?object} children Child collection structure.
|
|
2020
|
-
* @return {ReactElement} The first and only `ReactElement` contained in the
|
|
2021
|
-
* structure.
|
|
2022
|
-
*/
|
|
2023
|
-
function onlyChild(children) {
|
|
2024
|
-
!ReactElement_1.isValidElement(children) ? invariant(false, 'React.Children.only expected to receive a single React element child.') : void 0;
|
|
2025
|
-
return children;
|
|
2026
|
-
}
|
|
2027
|
-
|
|
2028
|
-
var onlyChild_1 = onlyChild;
|
|
2029
|
-
|
|
2030
|
-
var Component = ReactBaseClasses.Component;
|
|
2031
|
-
|
|
2032
|
-
var isValidElement = ReactElement_1.isValidElement;
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
var createClass = factory(Component, isValidElement, ReactNoopUpdateQueue_1);
|
|
1829
|
+
var ReactElementValidator_1 = ReactElementValidator$1;
|
|
2038
1830
|
|
|
2039
1831
|
var createElement = ReactElement_1.createElement;
|
|
2040
1832
|
var createFactory = ReactElement_1.createFactory;
|
|
2041
1833
|
var cloneElement = ReactElement_1.cloneElement;
|
|
2042
1834
|
|
|
2043
1835
|
{
|
|
2044
|
-
var warning$1 = warning;
|
|
2045
|
-
var canDefineProperty = canDefineProperty_1;
|
|
2046
1836
|
var ReactElementValidator = ReactElementValidator_1;
|
|
2047
1837
|
createElement = ReactElementValidator.createElement;
|
|
2048
1838
|
createFactory = ReactElementValidator.createFactory;
|
|
2049
1839
|
cloneElement = ReactElementValidator.cloneElement;
|
|
2050
1840
|
}
|
|
2051
1841
|
|
|
2052
|
-
var createMixin = function (mixin) {
|
|
2053
|
-
return mixin;
|
|
2054
|
-
};
|
|
2055
|
-
|
|
2056
1842
|
var React = {
|
|
2057
|
-
// Modern
|
|
2058
|
-
|
|
2059
1843
|
Children: {
|
|
2060
1844
|
map: ReactChildren_1.map,
|
|
2061
1845
|
forEach: ReactChildren_1.forEach,
|
|
@@ -2071,19 +1855,7 @@ var React = {
|
|
|
2071
1855
|
cloneElement: cloneElement,
|
|
2072
1856
|
isValidElement: ReactElement_1.isValidElement,
|
|
2073
1857
|
|
|
2074
|
-
// TODO (bvaughn) Remove these getters before 16.0.0
|
|
2075
|
-
PropTypes: ReactPropTypes,
|
|
2076
|
-
checkPropTypes: checkPropTypes,
|
|
2077
|
-
createClass: createClass,
|
|
2078
|
-
|
|
2079
|
-
// Classic
|
|
2080
|
-
|
|
2081
1858
|
createFactory: createFactory,
|
|
2082
|
-
createMixin: createMixin,
|
|
2083
|
-
|
|
2084
|
-
// This looks DOM specific but these are actually isomorphic helpers
|
|
2085
|
-
// since they are just generating DOM strings.
|
|
2086
|
-
DOM: ReactDOMFactories_1,
|
|
2087
1859
|
|
|
2088
1860
|
version: ReactVersion,
|
|
2089
1861
|
|
|
@@ -2098,59 +1870,6 @@ var React = {
|
|
|
2098
1870
|
ReactComponentTreeHook: ReactComponentTreeHook_1,
|
|
2099
1871
|
ReactDebugCurrentFrame: ReactDebugCurrentFrame_1
|
|
2100
1872
|
});
|
|
2101
|
-
|
|
2102
|
-
var warnedForCheckPropTypes = false;
|
|
2103
|
-
var warnedForCreateMixin = false;
|
|
2104
|
-
var warnedForCreateClass = false;
|
|
2105
|
-
var warnedForPropTypes = false;
|
|
2106
|
-
|
|
2107
|
-
React.createMixin = function (mixin) {
|
|
2108
|
-
warning$1(warnedForCreateMixin, 'React.createMixin is deprecated and should not be used. You ' + 'can use this mixin directly instead.');
|
|
2109
|
-
warnedForCreateMixin = true;
|
|
2110
|
-
return mixin;
|
|
2111
|
-
};
|
|
2112
|
-
|
|
2113
|
-
// TODO (bvaughn) Remove all of these accessors before 16.0.0
|
|
2114
|
-
if (canDefineProperty) {
|
|
2115
|
-
Object.defineProperty(React, 'checkPropTypes', {
|
|
2116
|
-
get: function () {
|
|
2117
|
-
warning$1(warnedForCheckPropTypes, 'checkPropTypes has been moved to a separate package. ' + 'Accessing React.checkPropTypes is no longer supported ' + 'and will be removed completely in React 16. ' + 'Use the prop-types package on npm instead. ' + '(https://fb.me/migrating-from-react-proptypes)');
|
|
2118
|
-
warnedForCheckPropTypes = true;
|
|
2119
|
-
return checkPropTypes;
|
|
2120
|
-
}
|
|
2121
|
-
});
|
|
2122
|
-
|
|
2123
|
-
Object.defineProperty(React, 'createClass', {
|
|
2124
|
-
get: function () {
|
|
2125
|
-
warning$1(warnedForCreateClass, 'React.createClass is no longer supported. Use a plain JavaScript ' + "class instead. If you're not yet ready to migrate, " + 'create-react-class is available on npm as a drop-in replacement. ' + '(https://fb.me/migrating-from-react-create-class)');
|
|
2126
|
-
warnedForCreateClass = true;
|
|
2127
|
-
return createClass;
|
|
2128
|
-
}
|
|
2129
|
-
});
|
|
2130
|
-
|
|
2131
|
-
Object.defineProperty(React, 'PropTypes', {
|
|
2132
|
-
get: function () {
|
|
2133
|
-
warning$1(warnedForPropTypes, 'PropTypes has been moved to a separate package. ' + 'Accessing React.PropTypes is no longer supported ' + 'and will be removed completely in React 16. ' + 'Use the prop-types package on npm instead. ' + '(https://fb.me/migrating-from-react-proptypes)');
|
|
2134
|
-
warnedForPropTypes = true;
|
|
2135
|
-
return ReactPropTypes;
|
|
2136
|
-
}
|
|
2137
|
-
});
|
|
2138
|
-
}
|
|
2139
|
-
|
|
2140
|
-
// React.DOM factories are deprecated. Wrap these methods so that
|
|
2141
|
-
// invocations of the React.DOM namespace and alert users to switch
|
|
2142
|
-
// to the `react-addons-dom-factories` package.
|
|
2143
|
-
React.DOM = {};
|
|
2144
|
-
var warnedForFactories = false;
|
|
2145
|
-
Object.keys(ReactDOMFactories_1).forEach(function (factory$$1) {
|
|
2146
|
-
React.DOM[factory$$1] = function () {
|
|
2147
|
-
if (!warnedForFactories) {
|
|
2148
|
-
warning$1(false, 'Accessing factories like React.DOM.%s has been deprecated ' + 'and will be removed in the future. Use the ' + 'react-addons-dom-factories package instead.', factory$$1);
|
|
2149
|
-
warnedForFactories = true;
|
|
2150
|
-
}
|
|
2151
|
-
return ReactDOMFactories_1[factory$$1].apply(ReactDOMFactories_1, arguments);
|
|
2152
|
-
};
|
|
2153
|
-
});
|
|
2154
1873
|
}
|
|
2155
1874
|
|
|
2156
1875
|
var React_1 = React;
|